Macaulay2 » Documentation
Packages » Divisor :: isWellDefined(BasicDivisor)
next | previous | forward | backward | up | index | toc

isWellDefined(BasicDivisor) -- whether a divisor is valid

Synopsis

Description

This function tries to verify that this is a valid divisor. It checks that the coefficients are from the right ring (in the WeilDivisor/QWeilDivisor/RWeilDivisor cases at least). It also checks to make sure all the ideals are from the same ring, are prime, and have height one. If debugLevel > 0, the function will print an message explaining why the divisor was not valid.

i1 : debugLevel = 1;
i2 : R = QQ[x,y];
i3 : isWellDefined(divisor({1}, {ideal(x)} ))
 -- 1 : (ContainmentHooks) with Strategy => Inhomogeneous from FunctionClosure[/usr/local/share/Macaulay2/Core/modules2.m2:113:60-113:98]
 -- (minimalPrimes,Ideal) with Strategy => Monomial from FunctionClosure[/usr/local/share/Macaulay2/MinimalPrimes.m2:304:26-313:60]
 -- (trim,Module) with Strategy => PID from FunctionClosure[/usr/local/share/Macaulay2/Core/matrix2.m2:263:14-265:125]
 -- (trim,Module) with Strategy => Complement from FunctionClosure[/usr/local/share/Macaulay2/Core/matrix2.m2:248:61-248:112]
 -- (codim,Module) with Strategy => Default from FunctionClosure[/usr/local/share/Macaulay2/Core/monideal.m2:37:56-49:51]
 -- (codim,Module) with Strategy => Default from FunctionClosure[/usr/local/share/Macaulay2/Core/monideal.m2:37:56-49:51]

o3 = true
i4 : isWellDefined(divisor({1/2}, {ideal(x)} ))
(isWellDefined, BasicDivisor): Not all coefficients are integers

o4 = false
i5 : isWellDefined(divisor({1/2}, {ideal(x)}, CoefficientType=>QQ))
 -- 1 : (ContainmentHooks) with Strategy => Inhomogeneous from FunctionClosure[/usr/local/share/Macaulay2/Core/modules2.m2:113:60-113:98]
 -- (minimalPrimes,Ideal) with Strategy => Monomial from FunctionClosure[/usr/local/share/Macaulay2/MinimalPrimes.m2:304:26-313:60]
 -- (trim,Module) with Strategy => PID from FunctionClosure[/usr/local/share/Macaulay2/Core/matrix2.m2:263:14-265:125]
 -- (trim,Module) with Strategy => Complement from FunctionClosure[/usr/local/share/Macaulay2/Core/matrix2.m2:248:61-248:112]
 -- (codim,Module) with Strategy => Default from FunctionClosure[/usr/local/share/Macaulay2/Core/monideal.m2:37:56-49:51]
 -- (codim,Module) with Strategy => Default from FunctionClosure[/usr/local/share/Macaulay2/Core/monideal.m2:37:56-49:51]

o5 = true
i6 : isWellDefined(divisor({1}, {ideal(x,y)}))
 -- 1 : (ContainmentHooks) with Strategy => Inhomogeneous from FunctionClosure[/usr/local/share/Macaulay2/Core/modules2.m2:113:60-113:98]
 -- (minimalPrimes,Ideal) with Strategy => Monomial from FunctionClosure[/usr/local/share/Macaulay2/MinimalPrimes.m2:304:26-313:60]
 -- (trim,Module) with Strategy => PID from FunctionClosure[/usr/local/share/Macaulay2/Core/matrix2.m2:263:14-265:125]
 -- (trim,Module) with Strategy => Complement from FunctionClosure[/usr/local/share/Macaulay2/Core/matrix2.m2:248:61-248:112]
 -- (codim,Module) with Strategy => Default from FunctionClosure[/usr/local/share/Macaulay2/Core/monideal.m2:37:56-49:51]
 -- 1 : (ContainmentHooks) with Strategy => Inhomogeneous from FunctionClosure[/usr/local/share/Macaulay2/Core/modules2.m2:113:60-113:98]
 -- 1 : (ContainmentHooks) with Strategy => Inhomogeneous from FunctionClosure[/usr/local/share/Macaulay2/Core/modules2.m2:113:60-113:98]
 -- (codim,Module) with Strategy => Default from FunctionClosure[/usr/local/share/Macaulay2/Core/monideal.m2:37:56-49:51]
(isWellDefined, BasicDivisor): Not all ideals are height one

o6 = false
i7 : isWellDefined(divisor({1}, {ideal(x^2)}))
 -- 1 : (ContainmentHooks) with Strategy => Inhomogeneous from FunctionClosure[/usr/local/share/Macaulay2/Core/modules2.m2:113:60-113:98]
 -- (minimalPrimes,Ideal) with Strategy => Monomial from FunctionClosure[/usr/local/share/Macaulay2/MinimalPrimes.m2:304:26-313:60]
 -- (trim,Module) with Strategy => PID from FunctionClosure[/usr/local/share/Macaulay2/Core/matrix2.m2:263:14-265:125]
 -- (trim,Module) with Strategy => Complement from FunctionClosure[/usr/local/share/Macaulay2/Core/matrix2.m2:248:61-248:112]
 -- (codim,Module) with Strategy => Default from FunctionClosure[/usr/local/share/Macaulay2/Core/monideal.m2:37:56-49:51]
 -- 1 : (ContainmentHooks) with Strategy => Inhomogeneous from FunctionClosure[/usr/local/share/Macaulay2/Core/modules2.m2:113:60-113:98]
(isWellDefined, BasicDivisor): Not all ideals are prime

o7 = false
i8 : S = QQ[a,b];
i9 : isWellDefined(divisor({1,2}, {ideal(x), ideal(a)}))
(isWellDefined, BasicDivisor): Not all ideals have the same ambient ring

o9 = false

See also

Ways to use this method: