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.000102021 seconds elapsed
 -- 0.000134631 seconds elapsed
 -- 0.000111041 seconds elapsed
 -- 0.000051541 seconds elapsed
 -- 0.000113851 seconds elapsed
 -- 0.000105601 seconds elapsed
 -- 0.00005208 seconds elapsed
 -- 0.000118221 seconds elapsed
 -- 0.000104381 seconds elapsed
 -- 0.00005041 seconds elapsed
 -- 0.000107361 seconds elapsed
 -- 0.000111741 seconds elapsed
 -- 0.000093992 seconds elapsed
 -- 0.000261031 seconds elapsed
 -- 0.000120292 seconds elapsed
 -- 0.00005362 seconds elapsed
 -- 0.000292543 seconds elapsed
 -- 0.000121791 seconds elapsed
 -- 0.00005665 seconds elapsed
 -- 0.000244253 seconds elapsed
 -- 0.000117751 seconds elapsed
 -- 0.000054791 seconds elapsed
 -- 0.000373203 seconds elapsed
 -- 0.000128951 seconds elapsed
 -- 0.00005241 seconds elapsed
 -- 0.000208113 seconds elapsed
 -- 0.000120621 seconds elapsed
 -- 0.000051849 seconds elapsed
 -- 0.000248102 seconds elapsed
 -- 0.000120511 seconds elapsed
 -- 0.00005219 seconds elapsed
 -- 0.000321263 seconds elapsed
 -- 0.000176402 seconds elapsed
 -- 0.000054571 seconds elapsed
 -- 0.000111841 seconds elapsed
 -- 0.000185721 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.00009615 seconds elapsed
 -- 0.00009853 seconds elapsed
 -- 0.00009867 seconds elapsed
 -- 0.000051621 seconds elapsed
 -- 0.000100562 seconds elapsed
 -- 0.000099381 seconds elapsed
 -- 0.000072621 seconds elapsed
 -- 0.000103291 seconds elapsed
 -- 0.000101221 seconds elapsed
 -- 0.000099461 seconds elapsed
 -- 0.000104852 seconds elapsed
 -- 0.000102901 seconds elapsed
 -- 0.000054051 seconds elapsed
 -- 0.00010659 seconds elapsed
 -- 0.000102022 seconds elapsed
 -- 0.00005382 seconds elapsed
 -- 0.000123501 seconds elapsed
 -- 0.000109721 seconds elapsed
 -- 0.000064001 seconds elapsed
 -- 0.000120101 seconds elapsed
 -- 0.000148041 seconds elapsed
 -- 0.00005513 seconds elapsed
 -- 0.000108712 seconds elapsed
 -- 0.000149752 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.