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] o1 = R o1 : PolynomialRing |
i2 : D = divisor(x) o2 = 1*Div(x) of R o2 : WDiv |
i3 : isDivPrincipal(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] o4 = R o4 : PolynomialRing |
i5 : D = divisor(x) o5 = 1*Div(x) of R o5 : WDiv |
i6 : E = divisor(x^2 * y) o6 = 1*Div(y) + 2*Div(x) of R o6 : WDiv |
i7 : isDivPrincipal( D ) o7 = true |
i8 : isDivPrincipal( E ) o8 = true |