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.000106942 seconds elapsed
 -- 0.000139874 seconds elapsed
 -- 0.000113214 seconds elapsed
 -- 0.000055205 seconds elapsed
 -- 0.000118203 seconds elapsed
 -- 0.000122431 seconds elapsed
 -- 0.000057278 seconds elapsed
 -- 0.00012184 seconds elapsed
 -- 0.000117012 seconds elapsed
 -- 0.000057399 seconds elapsed
 -- 0.000125356 seconds elapsed
 -- 0.000120266 seconds elapsed
 -- 0.000107323 seconds elapsed
 -- 0.000298013 seconds elapsed
 -- 0.000130516 seconds elapsed
 -- 0.000054312 seconds elapsed
 -- 0.000319103 seconds elapsed
 -- 0.000129514 seconds elapsed
 -- 0.00006378 seconds elapsed
 -- 0.000356673 seconds elapsed
 -- 0.000133903 seconds elapsed
 -- 0.000054272 seconds elapsed
 -- 0.000395416 seconds elapsed
 -- 0.000158188 seconds elapsed
 -- 0.000070903 seconds elapsed
 -- 0.000217592 seconds elapsed
 -- 0.000160192 seconds elapsed
 -- 0.000053531 seconds elapsed
 -- 0.000255602 seconds elapsed
 -- 0.000144142 seconds elapsed
 -- 0.000058241 seconds elapsed
 -- 0.000355361 seconds elapsed
 -- 0.000188917 seconds elapsed
 -- 0.000057028 seconds elapsed
 -- 0.000113334 seconds elapsed
 -- 0.000176272 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.000107362 seconds elapsed
 -- 0.000105349 seconds elapsed
 -- 0.000106071 seconds elapsed
 -- 0.000054583 seconds elapsed
 -- 0.000119286 seconds elapsed
 -- 0.000106221 seconds elapsed
 -- 0.000055625 seconds elapsed
 -- 0.000106792 seconds elapsed
 -- 0.000104146 seconds elapsed
 -- 0.000103225 seconds elapsed
 -- 0.000104177 seconds elapsed
 -- 0.000119636 seconds elapsed
 -- 0.000055896 seconds elapsed
 -- 0.000108875 seconds elapsed
 -- 0.000134333 seconds elapsed
 -- 0.000057207 seconds elapsed
 -- 0.000125186 seconds elapsed
 -- 0.000123953 seconds elapsed
 -- 0.000058911 seconds elapsed
 -- 0.000114767 seconds elapsed
 -- 0.000149202 seconds elapsed
 -- 0.000057199 seconds elapsed
 -- 0.000139563 seconds elapsed
 -- 0.00015938 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.