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.000245116 seconds elapsed
 -- 0.000333132 seconds elapsed
 -- 0.000276035 seconds elapsed
 -- 0.00012208 seconds elapsed
 -- 0.000289751 seconds elapsed
 -- 0.000265288 seconds elapsed
 -- 0.000124124 seconds elapsed
 -- 0.000292028 seconds elapsed
 -- 0.000271994 seconds elapsed
 -- 0.000124882 seconds elapsed
 -- 0.000275368 seconds elapsed
 -- 0.000294337 seconds elapsed
 -- 0.00024403 seconds elapsed
 -- 0.000976464 seconds elapsed
 -- 0.000305249 seconds elapsed
 -- 0.000136204 seconds elapsed
 -- 0.000777051 seconds elapsed
 -- 0.000310543 seconds elapsed
 -- 0.000135551 seconds elapsed
 -- 0.000662368 seconds elapsed
 -- 0.000333054 seconds elapsed
 -- 0.000138644 seconds elapsed
 -- 0.00128402 seconds elapsed
 -- 0.000326564 seconds elapsed
 -- 0.000129034 seconds elapsed
 -- 0.000537139 seconds elapsed
 -- 0.000304532 seconds elapsed
 -- 0.000135294 seconds elapsed
 -- 0.000634637 seconds elapsed
 -- 0.000308821 seconds elapsed
 -- 0.000120037 seconds elapsed
 -- 0.000831628 seconds elapsed
 -- 0.000452468 seconds elapsed
 -- 0.00012241 seconds elapsed
 -- 0.000267794 seconds elapsed
 -- 0.000420027 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.000231821 seconds elapsed
 -- 0.000252719 seconds elapsed
 -- 0.000250432 seconds elapsed
 -- 0.000122467 seconds elapsed
 -- 0.00025614 seconds elapsed
 -- 0.000259851 seconds elapsed
 -- 0.000123493 seconds elapsed
 -- 0.000257133 seconds elapsed
 -- 0.000266746 seconds elapsed
 -- 0.000275421 seconds elapsed
 -- 0.00026534 seconds elapsed
 -- 0.000275175 seconds elapsed
 -- 0.000123666 seconds elapsed
 -- 0.000313754 seconds elapsed
 -- 0.000271117 seconds elapsed
 -- 0.000119236 seconds elapsed
 -- 0.000270243 seconds elapsed
 -- 0.000253823 seconds elapsed
 -- 0.000120944 seconds elapsed
 -- 0.000310086 seconds elapsed
 -- 0.000381566 seconds elapsed
 -- 0.000131163 seconds elapsed
 -- 0.000316762 seconds elapsed
 -- 0.000371728 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.