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.000114201 seconds elapsed
 -- 0.000184723 seconds elapsed
 -- 0.000114261 seconds elapsed
 -- 0.000059931 seconds elapsed
 -- 0.000124411 seconds elapsed
 -- 0.000141353 seconds elapsed
 -- 0.000054131 seconds elapsed
 -- 0.000121962 seconds elapsed
 -- 0.000111232 seconds elapsed
 -- 0.000055771 seconds elapsed
 -- 0.000114082 seconds elapsed
 -- 0.00011975 seconds elapsed
 -- 0.000110721 seconds elapsed
 -- 0.000280413 seconds elapsed
 -- 0.000125741 seconds elapsed
 -- 0.000056661 seconds elapsed
 -- 0.000303364 seconds elapsed
 -- 0.000125051 seconds elapsed
 -- 0.000055781 seconds elapsed
 -- 0.000262932 seconds elapsed
 -- 0.000126092 seconds elapsed
 -- 0.000055412 seconds elapsed
 -- 0.000389736 seconds elapsed
 -- 0.000131113 seconds elapsed
 -- 0.00005398 seconds elapsed
 -- 0.000214594 seconds elapsed
 -- 0.000120293 seconds elapsed
 -- 0.00005474 seconds elapsed
 -- 0.000239954 seconds elapsed
 -- 0.000124321 seconds elapsed
 -- 0.00005725 seconds elapsed
 -- 0.000353324 seconds elapsed
 -- 0.000185212 seconds elapsed
 -- 0.00005752 seconds elapsed
 -- 0.00013485 seconds elapsed
 -- 0.000173972 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.00010145 seconds elapsed
 -- 0.000127331 seconds elapsed
 -- 0.000116331 seconds elapsed
 -- 0.000055201 seconds elapsed
 -- 0.00011049 seconds elapsed
 -- 0.000110931 seconds elapsed
 -- 0.000054981 seconds elapsed
 -- 0.000109072 seconds elapsed
 -- 0.000102342 seconds elapsed
 -- 0.000124193 seconds elapsed
 -- 0.000110861 seconds elapsed
 -- 0.000110301 seconds elapsed
 -- 0.000052749 seconds elapsed
 -- 0.000104492 seconds elapsed
 -- 0.000129921 seconds elapsed
 -- 0.00005573 seconds elapsed
 -- 0.000138862 seconds elapsed
 -- 0.000107121 seconds elapsed
 -- 0.000053192 seconds elapsed
 -- 0.000111402 seconds elapsed
 -- 0.00013437 seconds elapsed
 -- 0.00005385 seconds elapsed
 -- 0.000278094 seconds elapsed
 -- 0.000162222 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.