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.000184676 seconds elapsed
 -- 0.000227839 seconds elapsed
 -- 0.000186728 seconds elapsed
 -- 0.000090267 seconds elapsed
 -- 0.000201454 seconds elapsed
 -- 0.000179406 seconds elapsed
 -- 0.000090061 seconds elapsed
 -- 0.000199268 seconds elapsed
 -- 0.000179666 seconds elapsed
 -- 0.00010339 seconds elapsed
 -- 0.000160563 seconds elapsed
 -- 0.000169506 seconds elapsed
 -- 0.000137953 seconds elapsed
 -- 0.000336664 seconds elapsed
 -- 0.000162359 seconds elapsed
 -- 0.000088878 seconds elapsed
 -- 0.000400899 seconds elapsed
 -- 0.000165509 seconds elapsed
 -- 0.00007598 seconds elapsed
 -- 0.000325547 seconds elapsed
 -- 0.000161791 seconds elapsed
 -- 0.000073736 seconds elapsed
 -- 0.000477208 seconds elapsed
 -- 0.000176685 seconds elapsed
 -- 0.000084191 seconds elapsed
 -- 0.000291478 seconds elapsed
 -- 0.000165433 seconds elapsed
 -- 0.00007927 seconds elapsed
 -- 0.000309072 seconds elapsed
 -- 0.000160667 seconds elapsed
 -- 0.000074525 seconds elapsed
 -- 0.000411326 seconds elapsed
 -- 0.000231922 seconds elapsed
 -- 0.000074132 seconds elapsed
 -- 0.000149281 seconds elapsed
 -- 0.000202793 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.000139854 seconds elapsed
 -- 0.000138553 seconds elapsed
 -- 0.000142456 seconds elapsed
 -- 0.000077607 seconds elapsed
 -- 0.000150344 seconds elapsed
 -- 0.000143994 seconds elapsed
 -- 0.000076996 seconds elapsed
 -- 0.000152107 seconds elapsed
 -- 0.00014064 seconds elapsed
 -- 0.000135222 seconds elapsed
 -- 0.000151888 seconds elapsed
 -- 0.000145756 seconds elapsed
 -- 0.000076205 seconds elapsed
 -- 0.000143 seconds elapsed
 -- 0.000142795 seconds elapsed
 -- 0.000075516 seconds elapsed
 -- 0.000150672 seconds elapsed
 -- 0.000138163 seconds elapsed
 -- 0.000076284 seconds elapsed
 -- 0.000182327 seconds elapsed
 -- 0.000195725 seconds elapsed
 -- 0.000079369 seconds elapsed
 -- 0.00015478 seconds elapsed
 -- 0.000194454 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.