next | previous | forward | backward | up | top | index | toc | packages | Macaulay2 website
SubalgebraBases :: isSAGBI

isSAGBI -- Check if the generators are a sagbi basis

Synopsis

Description

This checks whether the generators of a subring or the sagbi generators of a computation object form a sagbi basis. After running sagbi on a subring, note that the result of the computation is stored in that subring. If new sagbi generators need to be added to S to make it a sagbi basis then isSAGBI will return false. If isSAGBI is run on a ring for which no sagbi computation has been performed, then isSAGBI will perform a test to see if the generators form a sagbi basis. This test can be skipped by setting Compute to false, and, in that case, isSAGBI will return null.

i1 : R = QQ[x,y,z];
i2 : S = subring {x+y+z,x*y+x*z+y*z, x*y*z, (x-y)*(x-z)*(y-z)};
i3 : isSAGBI S

o3 = false
i4 : sagbi(S, Limit => 5)

o4 = Partial SAGBIBasis Computation Object with 6 generators, Limit = 5.

o4 : SAGBIBasis
i5 : isSAGBI S
 -- 0.000158033 seconds elapsed
 -- 0.000173329 seconds elapsed
 -- 0.000134944 seconds elapsed
 -- 0.000078886 seconds elapsed
 -- 0.000166386 seconds elapsed
 -- 0.00012912 seconds elapsed
 -- 0.000076792 seconds elapsed
 -- 0.000159139 seconds elapsed
 -- 0.000128333 seconds elapsed
 -- 0.000079004 seconds elapsed
 -- 0.000151291 seconds elapsed
 -- 0.000137547 seconds elapsed
 -- 0.000151655 seconds elapsed
 -- 0.000288295 seconds elapsed
 -- 0.00014573 seconds elapsed
 -- 0.00007546 seconds elapsed
 -- 0.000329622 seconds elapsed
 -- 0.00014963 seconds elapsed
 -- 0.000076079 seconds elapsed
 -- 0.000295147 seconds elapsed
 -- 0.000142654 seconds elapsed
 -- 0.000073704 seconds elapsed
 -- 0.000398384 seconds elapsed
 -- 0.000168689 seconds elapsed
 -- 0.000076201 seconds elapsed
 -- 0.000259907 seconds elapsed
 -- 0.000141756 seconds elapsed
 -- 0.000078775 seconds elapsed
 -- 0.000272482 seconds elapsed
 -- 0.000145007 seconds elapsed
 -- 0.000081789 seconds elapsed
 -- 0.000359663 seconds elapsed
 -- 0.000194258 seconds elapsed
 -- 0.000067036 seconds elapsed
 -- 0.000155487 seconds elapsed
 -- 0.000181803 seconds elapsed
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction

o5 = false
i6 : S' = subring {x+y+z,x*y+x*z+y*z, x*y*z};
i7 : isSAGBI S'

o7 = true
i8 : sagbi(S', Limit => 5)

o8 = SAGBIBasis Computation Object with 3 generators, Limit = 5.

o8 : SAGBIBasis
i9 : isSAGBI S'
 -- 0.000155921 seconds elapsed
 -- 0.000124966 seconds elapsed
 -- 0.000125287 seconds elapsed
 -- 0.000081864 seconds elapsed
 -- 0.000148178 seconds elapsed
 -- 0.000128972 seconds elapsed
 -- 0.000080698 seconds elapsed
 -- 0.000147567 seconds elapsed
 -- 0.00012527 seconds elapsed
 -- 0.000161787 seconds elapsed
 -- 0.000135407 seconds elapsed
 -- 0.000129228 seconds elapsed
 -- 0.00007921 seconds elapsed
 -- 0.000144306 seconds elapsed
 -- 0.000125256 seconds elapsed
 -- 0.000082172 seconds elapsed
 -- 0.000172849 seconds elapsed
 -- 0.000123574 seconds elapsed
 -- 0.000116272 seconds elapsed
 -- 0.000161177 seconds elapsed
 -- 0.000162694 seconds elapsed
 -- 0.000067296 seconds elapsed
 -- 0.000153949 seconds elapsed
 -- 0.000166867 seconds elapsed
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction
timing raw subduction

o9 = true

If isSAGBI is supplied a SAGBIBasis then the generators of the subring can be checked for being a sagbi basis by setting UseSubringGens to true.

A note of caution. Excessive use of isSAGBI may impact performance. The inputs and outputs of isSAGBI are stored and never deleted. Since the inputs and outputs include pointers objects such as SAGBIBasis computation objects, these objects will not be garbage collected.

See also

Ways to use isSAGBI :

For the programmer

The object isSAGBI is a method function with options.