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.000266729 seconds elapsed
 -- 0.000326065 seconds elapsed
 -- 0.00027974 seconds elapsed
 -- 0.000130754 seconds elapsed
 -- 0.000290231 seconds elapsed
 -- 0.000286511 seconds elapsed
 -- 0.000126258 seconds elapsed
 -- 0.000296246 seconds elapsed
 -- 0.000285721 seconds elapsed
 -- 0.000133099 seconds elapsed
 -- 0.000281805 seconds elapsed
 -- 0.00028716 seconds elapsed
 -- 0.000262708 seconds elapsed
 -- 0.000601429 seconds elapsed
 -- 0.000309468 seconds elapsed
 -- 0.000134279 seconds elapsed
 -- 0.000643554 seconds elapsed
 -- 0.000304297 seconds elapsed
 -- 0.000128339 seconds elapsed
 -- 0.000584957 seconds elapsed
 -- 0.000301837 seconds elapsed
 -- 0.000128309 seconds elapsed
 -- 0.000803841 seconds elapsed
 -- 0.00032345 seconds elapsed
 -- 0.000132549 seconds elapsed
 -- 0.000486597 seconds elapsed
 -- 0.000304653 seconds elapsed
 -- 0.000124668 seconds elapsed
 -- 0.000557384 seconds elapsed
 -- 0.000310568 seconds elapsed
 -- 0.00013666 seconds elapsed
 -- 0.00079164 seconds elapsed
 -- 0.000493977 seconds elapsed
 -- 0.00013891 seconds elapsed
 -- 0.000305583 seconds elapsed
 -- 0.000451543 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.000256873 seconds elapsed
 -- 0.000258028 seconds elapsed
 -- 0.000259058 seconds elapsed
 -- 0.00013521 seconds elapsed
 -- 0.000272224 seconds elapsed
 -- 0.000261333 seconds elapsed
 -- 0.000151536 seconds elapsed
 -- 0.000258912 seconds elapsed
 -- 0.000269889 seconds elapsed
 -- 0.000244821 seconds elapsed
 -- 0.000244056 seconds elapsed
 -- 0.00027916 seconds elapsed
 -- 0.000128034 seconds elapsed
 -- 0.000268883 seconds elapsed
 -- 0.00028087 seconds elapsed
 -- 0.000131394 seconds elapsed
 -- 0.000286196 seconds elapsed
 -- 0.000269059 seconds elapsed
 -- 0.000127864 seconds elapsed
 -- 0.000284546 seconds elapsed
 -- 0.000365604 seconds elapsed
 -- 0.000126084 seconds elapsed
 -- 0.000268884 seconds elapsed
 -- 0.000361889 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.