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.000253423 seconds elapsed
 -- 0.000242792 seconds elapsed
 -- 0.000212971 seconds elapsed
 -- 0.000135061 seconds elapsed
 -- 0.000297283 seconds elapsed
 -- 0.000223022 seconds elapsed
 -- 0.000133701 seconds elapsed
 -- 0.000240093 seconds elapsed
 -- 0.000264492 seconds elapsed
 -- 0.000142272 seconds elapsed
 -- 0.000240553 seconds elapsed
 -- 0.000232162 seconds elapsed
 -- 0.000244602 seconds elapsed
 -- 0.000565766 seconds elapsed
 -- 0.000240112 seconds elapsed
 -- 0.000133072 seconds elapsed
 -- 0.000599297 seconds elapsed
 -- 0.000253603 seconds elapsed
 -- 0.000136802 seconds elapsed
 -- 0.000486086 seconds elapsed
 -- 0.000311304 seconds elapsed
 -- 0.000128841 seconds elapsed
 -- 0.000706078 seconds elapsed
 -- 0.000248294 seconds elapsed
 -- 0.000127911 seconds elapsed
 -- 0.000404864 seconds elapsed
 -- 0.000230331 seconds elapsed
 -- 0.000132372 seconds elapsed
 -- 0.000455875 seconds elapsed
 -- 0.000231642 seconds elapsed
 -- 0.000153011 seconds elapsed
 -- 0.000735479 seconds elapsed
 -- 0.000366565 seconds elapsed
 -- 0.000134412 seconds elapsed
 -- 0.000246433 seconds elapsed
 -- 0.000320163 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.000247442 seconds elapsed
 -- 0.000189322 seconds elapsed
 -- 0.000197183 seconds elapsed
 -- 0.000128791 seconds elapsed
 -- 0.000162502 seconds elapsed
 -- 0.000131331 seconds elapsed
 -- 0.000111142 seconds elapsed
 -- 0.000165182 seconds elapsed
 -- 0.000148082 seconds elapsed
 -- 0.000220033 seconds elapsed
 -- 0.000177162 seconds elapsed
 -- 0.000137102 seconds elapsed
 -- 0.000116592 seconds elapsed
 -- 0.000224662 seconds elapsed
 -- 0.000192372 seconds elapsed
 -- 0.000134921 seconds elapsed
 -- 0.000321952 seconds elapsed
 -- 0.000204862 seconds elapsed
 -- 0.000134102 seconds elapsed
 -- 0.000208982 seconds elapsed
 -- 0.000194142 seconds elapsed
 -- 0.000070751 seconds elapsed
 -- 0.000154521 seconds elapsed
 -- 0.000181573 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.