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.000083417 seconds elapsed
 -- 0.000081417 seconds elapsed
 -- 0.000067334 seconds elapsed
 -- 0.000039792 seconds elapsed
 -- 0.000081 seconds elapsed
 -- 0.000057208 seconds elapsed
 -- 0.000071167 seconds elapsed
 -- 0.000101917 seconds elapsed
 -- 0.000085167 seconds elapsed
 -- 0.000043709 seconds elapsed
 -- 0.000074667 seconds elapsed
 -- 0.000074583 seconds elapsed
 -- 0.00007 seconds elapsed
 -- 0.000151208 seconds elapsed
 -- 0.000068291 seconds elapsed
 -- 0.000159917 seconds elapsed
 -- 0.000213666 seconds elapsed
 -- 0.000098458 seconds elapsed
 -- 0.000033542 seconds elapsed
 -- 0.000143042 seconds elapsed
 -- 0.000065458 seconds elapsed
 -- 0.000032791 seconds elapsed
 -- 0.000205375 seconds elapsed
 -- 0.000071917 seconds elapsed
 -- 0.000034334 seconds elapsed
 -- 0.000121584 seconds elapsed
 -- 0.000067417 seconds elapsed
 -- 0.000036458 seconds elapsed
 -- 0.000133083 seconds elapsed
 -- 0.00006525 seconds elapsed
 -- 0.000053625 seconds elapsed
 -- 0.000193208 seconds elapsed
 -- 0.000105541 seconds elapsed
 -- 0.000027041 seconds elapsed
 -- 0.000061875 seconds elapsed
 -- 0.000113834 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.000083833 seconds elapsed
 -- 0.000066458 seconds elapsed
 -- 0.000061667 seconds elapsed
 -- 0.000035666 seconds elapsed
 -- 0.000071 seconds elapsed
 -- 0.000058042 seconds elapsed
 -- 0.000035333 seconds elapsed
 -- 0.000068625 seconds elapsed
 -- 0.000058291 seconds elapsed
 -- 0.000079625 seconds elapsed
 -- 0.000065167 seconds elapsed
 -- 0.000058833 seconds elapsed
 -- 0.000042166 seconds elapsed
 -- 0.000070625 seconds elapsed
 -- 0.000056834 seconds elapsed
 -- 0.0000355 seconds elapsed
 -- 0.000067792 seconds elapsed
 -- 0.000055916 seconds elapsed
 -- 0.000041625 seconds elapsed
 -- 0.000076791 seconds elapsed
 -- 0.000079166 seconds elapsed
 -- 0.000036833 seconds elapsed
 -- 0.000072083 seconds elapsed
 -- 0.000088584 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.