next | previous | forward | backward | up | top | index | toc | 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.000206307 seconds elapsed
 -- 0.000264044 seconds elapsed
 -- 0.000250889 seconds elapsed
 -- 0.000106759 seconds elapsed
 -- 0.000227297 seconds elapsed
 -- 0.00020326 seconds elapsed
 -- 0.000102943 seconds elapsed
 -- 0.000226263 seconds elapsed
 -- 0.000219581 seconds elapsed
 -- 0.000105567 seconds elapsed
 -- 0.000223028 seconds elapsed
 -- 0.00022986 seconds elapsed
 -- 0.000243786 seconds elapsed
 -- 0.000542787 seconds elapsed
 -- 0.000240791 seconds elapsed
 -- 0.000104475 seconds elapsed
 -- 0.000673702 seconds elapsed
 -- 0.000237395 seconds elapsed
 -- 0.00010119 seconds elapsed
 -- 0.000487692 seconds elapsed
 -- 0.00024546 seconds elapsed
 -- 0.000102222 seconds elapsed
 -- 0.00072104 seconds elapsed
 -- 0.000250869 seconds elapsed
 -- 0.000101641 seconds elapsed
 -- 0.000404087 seconds elapsed
 -- 0.000232034 seconds elapsed
 -- 0.000101671 seconds elapsed
 -- 0.000462125 seconds elapsed
 -- 0.000251932 seconds elapsed
 -- 0.000097773 seconds elapsed
 -- 0.000658453 seconds elapsed
 -- 0.000361536 seconds elapsed
 -- 0.000099337 seconds elapsed
 -- 0.000210233 seconds elapsed
 -- 0.000323435 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.00019169 seconds elapsed
 -- 0.000203942 seconds elapsed
 -- 0.000209442 seconds elapsed
 -- 0.000098645 seconds elapsed
 -- 0.000472756 seconds elapsed
 -- 0.000201858 seconds elapsed
 -- 0.000100097 seconds elapsed
 -- 0.000206948 seconds elapsed
 -- 0.000199685 seconds elapsed
 -- 0.00024001 seconds elapsed
 -- 0.000264225 seconds elapsed
 -- 0.000211226 seconds elapsed
 -- 0.000101009 seconds elapsed
 -- 0.000218278 seconds elapsed
 -- 0.000196879 seconds elapsed
 -- 0.000105728 seconds elapsed
 -- 0.000248286 seconds elapsed
 -- 0.000197109 seconds elapsed
 -- 0.000099767 seconds elapsed
 -- 0.000213369 seconds elapsed
 -- 0.000283631 seconds elapsed
 -- 0.000102672 seconds elapsed
 -- 0.000210204 seconds elapsed
 -- 0.000275185 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.