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

verifyDivisor -- Checks to make sure a divisor is valid

Synopsis

Description

Given a WDiv/QDiv/RDiv/BasicDiv, this function tries to verify that this really is a valid divisor. It checks that the coefficients are from the right ring (in the WDiv/QDiv/RDiv cases at least). It also checks to make sure all the ideals are from the same ring, are prime, and have height one. If Verbose is set to true (it is true by default), then it will print an error message explaining why the divisor was not valid.

i1 : R = QQ[x,y];
i2 : verifyDivisor(divisor({1}, {ideal(x)}, Unsafe=>true))

o2 = true
i3 : verifyDivisor(divisor({1/2}, {ideal(x)}, Unsafe=>true))
verifyDivisor: Not all coefficients are integers

o3 = false
i4 : verifyDivisor(divisor({1/2}, {ideal(x)}, Unsafe=>true, CoeffType=>QQ))

o4 = true
i5 : verifyDivisor(divisor({1}, {ideal(x,y)}, Unsafe=>true))
verifyDivisor: Not all ideals are height one

o5 = false
i6 : verifyDivisor(divisor({1}, {ideal(x^2)}, Unsafe=>true))
verifyDivisor: Not all ideals are prime

o6 = false
i7 : S = QQ[a,b];
i8 : verifyDivisor(divisor({1,2}, {ideal(x), ideal(a)}, Unsafe=>true))
verifyDivisor: Not all ideals have the same ambient ring

o8 = false

See also

Ways to use verifyDivisor :