next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Divisor :: isPrincipal

isPrincipal -- whether a Weil divisor is globally principal



This function returns true if the Weil divisor D is principal, otherwise false. If IsGraded is set to true, then this checks whether the divisor corresponds to a principal divisor on the Proj of the ambient ring. Note that this function may return a false negative if the defining equations of the divisor are not homogeneous (it warns the user if this occurs).

i1 : R = QQ[x, y, z];
i2 : D = divisor(x);

o2 : WeilDivisor on R
i3 : isPrincipal(D, IsGraded => true)

o3 = false

By default, IsGraded is set to false. Regardless of the format, the check is done by determining whether or not $O(D)$ is free.

i4 : R = QQ[x, y, z]/ideal(x^2 - y*z);
i5 : D = divisor(x);

o5 : WeilDivisor on R
i6 : E = divisor(ideal(x,z));

o6 : WeilDivisor on R
i7 : isPrincipal( D )

o7 = true
i8 : isPrincipal( E )

o8 = false

The output value of this function is stored in the divisor's cache with the value of the last IsGraded option. If you change the IsGraded option, the value will be recomputed.

See also

Ways to use isPrincipal :

For the programmer

The object isPrincipal is a method function with options.