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.000184705 seconds elapsed
 -- 0.000248756 seconds elapsed
 -- 0.000200496 seconds elapsed
 -- 0.000094156 seconds elapsed
 -- 0.000252463 seconds elapsed
 -- 0.000196448 seconds elapsed
 -- 0.000096741 seconds elapsed
 -- 0.000227777 seconds elapsed
 -- 0.000198422 seconds elapsed
 -- 0.000098425 seconds elapsed
 -- 0.000202028 seconds elapsed
 -- 0.000211036 seconds elapsed
 -- 0.00018701 seconds elapsed
 -- 0.000535222 seconds elapsed
 -- 0.000221955 seconds elapsed
 -- 0.000101089 seconds elapsed
 -- 0.000634318 seconds elapsed
 -- 0.000232286 seconds elapsed
 -- 0.000158928 seconds elapsed
 -- 0.000576088 seconds elapsed
 -- 0.000268563 seconds elapsed
 -- 0.000098063 seconds elapsed
 -- 0.000732983 seconds elapsed
 -- 0.000269636 seconds elapsed
 -- 0.000093866 seconds elapsed
 -- 0.000402634 seconds elapsed
 -- 0.000224129 seconds elapsed
 -- 0.000093796 seconds elapsed
 -- 0.000481833 seconds elapsed
 -- 0.000234819 seconds elapsed
 -- 0.000094678 seconds elapsed
 -- 0.000637924 seconds elapsed
 -- 0.000324889 seconds elapsed
 -- 0.000094988 seconds elapsed
 -- 0.000209072 seconds elapsed
 -- 0.000306344 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.000742862 seconds elapsed
 -- 0.00019789 seconds elapsed
 -- 0.000194794 seconds elapsed
 -- 0.00009611 seconds elapsed
 -- 0.000197128 seconds elapsed
 -- 0.000190037 seconds elapsed
 -- 0.000099026 seconds elapsed
 -- 0.000199864 seconds elapsed
 -- 0.00022476 seconds elapsed
 -- 0.000191549 seconds elapsed
 -- 0.000328436 seconds elapsed
 -- 0.00019276 seconds elapsed
 -- 0.000118011 seconds elapsed
 -- 0.000201388 seconds elapsed
 -- 0.000193313 seconds elapsed
 -- 0.000099466 seconds elapsed
 -- 0.000234419 seconds elapsed
 -- 0.000199554 seconds elapsed
 -- 0.000098725 seconds elapsed
 -- 0.000208931 seconds elapsed
 -- 0.000265788 seconds elapsed
 -- 0.000098685 seconds elapsed
 -- 0.000209483 seconds elapsed
 -- 0.000274344 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.