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.000191834 seconds elapsed
 -- 0.000232842 seconds elapsed
 -- 0.000174529 seconds elapsed
 -- 0.000098354 seconds elapsed
 -- 0.000200062 seconds elapsed
 -- 0.000171477 seconds elapsed
 -- 0.0000979 seconds elapsed
 -- 0.000195734 seconds elapsed
 -- 0.000199837 seconds elapsed
 -- 0.000092602 seconds elapsed
 -- 0.000182362 seconds elapsed
 -- 0.000175919 seconds elapsed
 -- 0.000179887 seconds elapsed
 -- 0.000399447 seconds elapsed
 -- 0.000201259 seconds elapsed
 -- 0.000098328 seconds elapsed
 -- 0.000464441 seconds elapsed
 -- 0.000203033 seconds elapsed
 -- 0.000093529 seconds elapsed
 -- 0.000392665 seconds elapsed
 -- 0.000195113 seconds elapsed
 -- 0.000095108 seconds elapsed
 -- 0.000568839 seconds elapsed
 -- 0.000208776 seconds elapsed
 -- 0.000093485 seconds elapsed
 -- 0.000302188 seconds elapsed
 -- 0.000205811 seconds elapsed
 -- 0.000095 seconds elapsed
 -- 0.000356984 seconds elapsed
 -- 0.000186393 seconds elapsed
 -- 0.000108301 seconds elapsed
 -- 0.000498554 seconds elapsed
 -- 0.000269099 seconds elapsed
 -- 0.000089518 seconds elapsed
 -- 0.00018522 seconds elapsed
 -- 0.000233482 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.000190192 seconds elapsed
 -- 0.00020279 seconds elapsed
 -- 0.000173151 seconds elapsed
 -- 0.000092489 seconds elapsed
 -- 0.000172982 seconds elapsed
 -- 0.000165947 seconds elapsed
 -- 0.000102555 seconds elapsed
 -- 0.000188133 seconds elapsed
 -- 0.000172943 seconds elapsed
 -- 0.000194061 seconds elapsed
 -- 0.000163641 seconds elapsed
 -- 0.000206659 seconds elapsed
 -- 0.000104179 seconds elapsed
 -- 0.000206552 seconds elapsed
 -- 0.000171988 seconds elapsed
 -- 0.000099927 seconds elapsed
 -- 0.000214237 seconds elapsed
 -- 0.000164764 seconds elapsed
 -- 0.000095615 seconds elapsed
 -- 0.000189896 seconds elapsed
 -- 0.000209361 seconds elapsed
 -- 0.000089156 seconds elapsed
 -- 0.00022198 seconds elapsed
 -- 0.000227312 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.