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.000101137 seconds elapsed
 -- 0.000149543 seconds elapsed
 -- 0.000110023 seconds elapsed
 -- 0.000055647 seconds elapsed
 -- 0.00010946 seconds elapsed
 -- 0.00010831 seconds elapsed
 -- 0.000053975 seconds elapsed
 -- 0.000108717 seconds elapsed
 -- 0.000101625 seconds elapsed
 -- 0.000053852 seconds elapsed
 -- 0.000109571 seconds elapsed
 -- 0.00011371 seconds elapsed
 -- 0.000113659 seconds elapsed
 -- 0.000228105 seconds elapsed
 -- 0.000113526 seconds elapsed
 -- 0.00006418 seconds elapsed
 -- 0.000269838 seconds elapsed
 -- 0.000119911 seconds elapsed
 -- 0.000049871 seconds elapsed
 -- 0.000230628 seconds elapsed
 -- 0.00011967 seconds elapsed
 -- 0.00005199 seconds elapsed
 -- 0.000334504 seconds elapsed
 -- 0.000128423 seconds elapsed
 -- 0.000053045 seconds elapsed
 -- 0.000188389 seconds elapsed
 -- 0.000117296 seconds elapsed
 -- 0.000049204 seconds elapsed
 -- 0.000228633 seconds elapsed
 -- 0.000123019 seconds elapsed
 -- 0.00005223 seconds elapsed
 -- 0.000280015 seconds elapsed
 -- 0.000163664 seconds elapsed
 -- 0.000051348 seconds elapsed
 -- 0.000096446 seconds elapsed
 -- 0.000167621 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.000098952 seconds elapsed
 -- 0.000088277 seconds elapsed
 -- 0.000120705 seconds elapsed
 -- 0.000051198 seconds elapsed
 -- 0.000093561 seconds elapsed
 -- 0.000091533 seconds elapsed
 -- 0.00005161 seconds elapsed
 -- 0.000093133 seconds elapsed
 -- 0.000099185 seconds elapsed
 -- 0.000125491 seconds elapsed
 -- 0.000090279 seconds elapsed
 -- 0.0001005 seconds elapsed
 -- 0.000055204 seconds elapsed
 -- 0.000102629 seconds elapsed
 -- 0.000097495 seconds elapsed
 -- 0.000053756 seconds elapsed
 -- 0.000131971 seconds elapsed
 -- 0.000098067 seconds elapsed
 -- 0.000053119 seconds elapsed
 -- 0.000122916 seconds elapsed
 -- 0.000133811 seconds elapsed
 -- 0.000050137 seconds elapsed
 -- 0.000105447 seconds elapsed
 -- 0.000138441 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.