next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Divisor :: getPrimeCount

getPrimeCount -- Get the number of height one primes in the support of the divisor

Synopsis

Description

Returns the number of height one prime ideals corresponding to the components of a BasicDiv. Note that if you don’t call simplifyDiv, this can return primes with coefficient equal to zero.

i1 : R = QQ[x,y,u,v]/ideal(x*y-u*v)

o1 = R

o1 : QuotientRing
i2 : D = divisor(x)

o2 = 1*Div(v, x) + 1*Div(u, x) of R

o2 : WDiv
i3 : getPrimeCount(D)

o3 = 2
i4 : E = divisor(x*u)

o4 = 1*Div(u, y) + 1*Div(v, x) + 2*Div(u, x) of R

o4 : WDiv
i5 : getPrimeCount(E)

o5 = 3

See also

Ways to use getPrimeCount :