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.000155441 seconds elapsed
 -- 0.000161121 seconds elapsed
 -- 0.000153441 seconds elapsed
 -- 0.000084441 seconds elapsed
 -- 0.000163441 seconds elapsed
 -- 0.000152641 seconds elapsed
 -- 0.000111481 seconds elapsed
 -- 0.000626005 seconds elapsed
 -- 0.000708925 seconds elapsed
 -- 0.000120441 seconds elapsed
 -- 0.000171921 seconds elapsed
 -- 0.000165202 seconds elapsed
 -- 0.000150641 seconds elapsed
 -- 0.000316843 seconds elapsed
 -- 0.000174801 seconds elapsed
 -- 0.000088401 seconds elapsed
 -- 0.000383603 seconds elapsed
 -- 0.000177322 seconds elapsed
 -- 0.000083761 seconds elapsed
 -- 0.000294842 seconds elapsed
 -- 0.000171682 seconds elapsed
 -- 0.000086201 seconds elapsed
 -- 0.000408563 seconds elapsed
 -- 0.000180482 seconds elapsed
 -- 0.000084401 seconds elapsed
 -- 0.000251522 seconds elapsed
 -- 0.000167521 seconds elapsed
 -- 0.00008516 seconds elapsed
 -- 0.000290963 seconds elapsed
 -- 0.000172761 seconds elapsed
 -- 0.000110841 seconds elapsed
 -- 0.000373923 seconds elapsed
 -- 0.000225242 seconds elapsed
 -- 0.0000818 seconds elapsed
 -- 0.000154041 seconds elapsed
 -- 0.000204282 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.000152641 seconds elapsed
 -- 0.000157402 seconds elapsed
 -- 0.000141481 seconds elapsed
 -- 0.000083041 seconds elapsed
 -- 0.000146201 seconds elapsed
 -- 0.000141281 seconds elapsed
 -- 0.00008464 seconds elapsed
 -- 0.000178482 seconds elapsed
 -- 0.000148681 seconds elapsed
 -- 0.000184961 seconds elapsed
 -- 0.000133321 seconds elapsed
 -- 0.000141401 seconds elapsed
 -- 0.00008364 seconds elapsed
 -- 0.000148761 seconds elapsed
 -- 0.000140121 seconds elapsed
 -- 0.000117921 seconds elapsed
 -- 0.000167481 seconds elapsed
 -- 0.000144801 seconds elapsed
 -- 0.000130441 seconds elapsed
 -- 0.000166081 seconds elapsed
 -- 0.000184881 seconds elapsed
 -- 0.00011068 seconds elapsed
 -- 0.000158322 seconds elapsed
 -- 0.000195121 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.