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.000159162 seconds elapsed
 -- 0.000169642 seconds elapsed
 -- 0.000153281 seconds elapsed
 -- 0.00008032 seconds elapsed
 -- 0.000154721 seconds elapsed
 -- 0.000149561 seconds elapsed
 -- 0.000081761 seconds elapsed
 -- 0.000157721 seconds elapsed
 -- 0.000149321 seconds elapsed
 -- 0.000109521 seconds elapsed
 -- 0.000219762 seconds elapsed
 -- 0.000216081 seconds elapsed
 -- 0.000148801 seconds elapsed
 -- 0.000298963 seconds elapsed
 -- 0.000166761 seconds elapsed
 -- 0.00008032 seconds elapsed
 -- 0.000329922 seconds elapsed
 -- 0.000165281 seconds elapsed
 -- 0.000077961 seconds elapsed
 -- 0.000295123 seconds elapsed
 -- 0.000172121 seconds elapsed
 -- 0.000078961 seconds elapsed
 -- 0.000408603 seconds elapsed
 -- 0.000175081 seconds elapsed
 -- 0.000084361 seconds elapsed
 -- 0.000307803 seconds elapsed
 -- 0.000169442 seconds elapsed
 -- 0.000079121 seconds elapsed
 -- 0.000272042 seconds elapsed
 -- 0.000172121 seconds elapsed
 -- 0.00008116 seconds elapsed
 -- 0.000358123 seconds elapsed
 -- 0.000231122 seconds elapsed
 -- 0.000079921 seconds elapsed
 -- 0.000147081 seconds elapsed
 -- 0.000209321 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.000149161 seconds elapsed
 -- 0.000129721 seconds elapsed
 -- 0.000141361 seconds elapsed
 -- 0.000079 seconds elapsed
 -- 0.000146401 seconds elapsed
 -- 0.000137161 seconds elapsed
 -- 0.00008072 seconds elapsed
 -- 0.000143241 seconds elapsed
 -- 0.000139521 seconds elapsed
 -- 0.000150961 seconds elapsed
 -- 0.000123281 seconds elapsed
 -- 0.000139842 seconds elapsed
 -- 0.000084201 seconds elapsed
 -- 0.000151282 seconds elapsed
 -- 0.000143721 seconds elapsed
 -- 0.000086321 seconds elapsed
 -- 0.000167682 seconds elapsed
 -- 0.000149761 seconds elapsed
 -- 0.000087281 seconds elapsed
 -- 0.000158961 seconds elapsed
 -- 0.000200481 seconds elapsed
 -- 0.000075881 seconds elapsed
 -- 0.000162561 seconds elapsed
 -- 0.000196321 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.