Macaulay2 » Documentation
Packages » RealRoots :: traceCount
next | previous | forward | backward | up | index | toc

traceCount -- the degree of the reduced scheme of an Artinian ring

Description

This computes the degree of the reduced scheme of an Artinian ring S over any field, which is the number of distinct points of Spec S, after a base change to an algebraically-closed field.

This counts the number of roots of a univariate polynomial f.

i1 : R = QQ[x,y]

o1 = R

o1 : PolynomialRing
i2 : f = (x^2 + 1)*(x + 1)*(x - 2)^2

      5     4    3    2
o2 = x  - 3x  + x  + x  + 4

o2 : R
i3 : traceCount(f)

o3 = 4

If I is a zero-dimensional ideal of a polynomial ring, this computes the number of distinct points of Spec (ring I)/I.

i4 : I = ideal(5 - 3*x^2 - 3*y^2 + x^2*y^2, 1 + 2*x*y - 4*x*y^2 + 3*x^2*y)

             2 2     2     2        2        2
o4 = ideal (x y  - 3x  - 3y  + 5, 3x y - 4x*y  + 2x*y + 1)

o4 : Ideal of R
i5 : traceCount(I)

o5 = 8

If l is a system of rational polynomials, then this computes the number of distinct solutions.

i6 : l = {y^2 - x^2 - 1,x - y^2 + 4*y - 2}

         2    2         2
o6 = {- x  + y  - 1, - y  + x + 4y - 2}

o6 : List
i7 : traceCount(l)

o7 = 4

See also

Ways to use traceCount:

  • traceCount(Ideal)
  • traceCount(List)
  • traceCount(QuotientRing)
  • traceCount(RingElement)

For the programmer

The object traceCount is a method function.


The source of this document is in RealRoots.m2:1021:0.