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.000113711 seconds elapsed
 -- 0.00014509 seconds elapsed
 -- 0.00011649 seconds elapsed
 -- 0.0000553 seconds elapsed
 -- 0.000135872 seconds elapsed
 -- 0.00012229 seconds elapsed
 -- 0.00006107 seconds elapsed
 -- 0.000138051 seconds elapsed
 -- 0.00015429 seconds elapsed
 -- 0.00006441 seconds elapsed
 -- 0.000128091 seconds elapsed
 -- 0.00014169 seconds elapsed
 -- 0.000125731 seconds elapsed
 -- 0.000292901 seconds elapsed
 -- 0.000130891 seconds elapsed
 -- 0.00005674 seconds elapsed
 -- 0.000312253 seconds elapsed
 -- 0.00013042 seconds elapsed
 -- 0.00005829 seconds elapsed
 -- 0.000275481 seconds elapsed
 -- 0.000134029 seconds elapsed
 -- 0.00005504 seconds elapsed
 -- 0.000396152 seconds elapsed
 -- 0.00015414 seconds elapsed
 -- 0.00005592 seconds elapsed
 -- 0.000221722 seconds elapsed
 -- 0.000129121 seconds elapsed
 -- 0.000055851 seconds elapsed
 -- 0.000250672 seconds elapsed
 -- 0.000128672 seconds elapsed
 -- 0.00006525 seconds elapsed
 -- 0.000370872 seconds elapsed
 -- 0.000180711 seconds elapsed
 -- 0.00005879 seconds elapsed
 -- 0.000124521 seconds elapsed
 -- 0.000173401 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.000123001 seconds elapsed
 -- 0.000129251 seconds elapsed
 -- 0.00011374 seconds elapsed
 -- 0.000068552 seconds elapsed
 -- 0.000161549 seconds elapsed
 -- 0.000108601 seconds elapsed
 -- 0.00006611 seconds elapsed
 -- 0.000125421 seconds elapsed
 -- 0.00013377 seconds elapsed
 -- 0.000123731 seconds elapsed
 -- 0.00011353 seconds elapsed
 -- 0.000108241 seconds elapsed
 -- 0.000058001 seconds elapsed
 -- 0.00011518 seconds elapsed
 -- 0.000116041 seconds elapsed
 -- 0.000060181 seconds elapsed
 -- 0.00015054 seconds elapsed
 -- 0.000107861 seconds elapsed
 -- 0.000068421 seconds elapsed
 -- 0.00012833 seconds elapsed
 -- 0.000143711 seconds elapsed
 -- 0.000063841 seconds elapsed
 -- 0.00013843 seconds elapsed
 -- 0.000198 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.