next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Divisor :: isPrime(BasicDivisor)

isPrime(BasicDivisor) -- whether a divisor is prime

Synopsis

Description

This function returns true if the divisor is prime (with coefficient 1), otherwise it returns false.

i1 : R = QQ[x, y];
i2 : D1 = divisor(x^2 * y)

o2 = 2*Div(x) + Div(y)

o2 : WeilDivisor on R
i3 : D2 = divisor(x^2)

o3 = 2*Div(x)

o3 : WeilDivisor on R
i4 : D3 = divisor(y)

o4 = Div(y)

o4 : WeilDivisor on R
i5 : isPrime( D1 )

o5 = false
i6 : isPrime( D2 )

o6 = false
i7 : isPrime( D3 )

o7 = true