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.00010334 seconds elapsed
 -- 0.000139511 seconds elapsed
 -- 0.000113161 seconds elapsed
 -- 0.000055151 seconds elapsed
 -- 0.000119741 seconds elapsed
 -- 0.000110991 seconds elapsed
 -- 0.000058281 seconds elapsed
 -- 0.000121651 seconds elapsed
 -- 0.000122111 seconds elapsed
 -- 0.000057421 seconds elapsed
 -- 0.000122721 seconds elapsed
 -- 0.000124791 seconds elapsed
 -- 0.00010273 seconds elapsed
 -- 0.000275322 seconds elapsed
 -- 0.000125491 seconds elapsed
 -- 0.000056271 seconds elapsed
 -- 0.000304853 seconds elapsed
 -- 0.000126921 seconds elapsed
 -- 0.000059231 seconds elapsed
 -- 0.000252722 seconds elapsed
 -- 0.000120921 seconds elapsed
 -- 0.00005572 seconds elapsed
 -- 0.000397744 seconds elapsed
 -- 0.000135961 seconds elapsed
 -- 0.000052631 seconds elapsed
 -- 0.000237792 seconds elapsed
 -- 0.000122461 seconds elapsed
 -- 0.00005277 seconds elapsed
 -- 0.000255332 seconds elapsed
 -- 0.000128831 seconds elapsed
 -- 0.00005595 seconds elapsed
 -- 0.000329273 seconds elapsed
 -- 0.000183062 seconds elapsed
 -- 0.000057941 seconds elapsed
 -- 0.000120681 seconds elapsed
 -- 0.000174152 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.000102591 seconds elapsed
 -- 0.000120441 seconds elapsed
 -- 0.000105111 seconds elapsed
 -- 0.000054981 seconds elapsed
 -- 0.000105571 seconds elapsed
 -- 0.000107951 seconds elapsed
 -- 0.000053121 seconds elapsed
 -- 0.000121351 seconds elapsed
 -- 0.000101501 seconds elapsed
 -- 0.000102021 seconds elapsed
 -- 0.000105111 seconds elapsed
 -- 0.000106111 seconds elapsed
 -- 0.00005771 seconds elapsed
 -- 0.000121111 seconds elapsed
 -- 0.00010624 seconds elapsed
 -- 0.00005617 seconds elapsed
 -- 0.000138832 seconds elapsed
 -- 0.000100941 seconds elapsed
 -- 0.00005402 seconds elapsed
 -- 0.000126551 seconds elapsed
 -- 0.000173601 seconds elapsed
 -- 0.00005541 seconds elapsed
 -- 0.000116821 seconds elapsed
 -- 0.000161662 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.