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.00010956 seconds elapsed
 -- 0.000130071 seconds elapsed
 -- 0.00011446 seconds elapsed
 -- 0.000061248 seconds elapsed
 -- 0.000121888 seconds elapsed
 -- 0.000107159 seconds elapsed
 -- 0.000061531 seconds elapsed
 -- 0.00012338 seconds elapsed
 -- 0.000113043 seconds elapsed
 -- 0.000060052 seconds elapsed
 -- 0.000117984 seconds elapsed
 -- 0.000118334 seconds elapsed
 -- 0.000112162 seconds elapsed
 -- 0.000260426 seconds elapsed
 -- 0.0001258 seconds elapsed
 -- 0.00006027 seconds elapsed
 -- 0.000298499 seconds elapsed
 -- 0.00013159 seconds elapsed
 -- 0.00005977 seconds elapsed
 -- 0.000255242 seconds elapsed
 -- 0.000125019 seconds elapsed
 -- 0.000059253 seconds elapsed
 -- 0.000382812 seconds elapsed
 -- 0.000133069 seconds elapsed
 -- 0.000064275 seconds elapsed
 -- 0.000211556 seconds elapsed
 -- 0.000123874 seconds elapsed
 -- 0.000060414 seconds elapsed
 -- 0.000241541 seconds elapsed
 -- 0.00012764 seconds elapsed
 -- 0.000058963 seconds elapsed
 -- 0.000325274 seconds elapsed
 -- 0.000176726 seconds elapsed
 -- 0.000052943 seconds elapsed
 -- 0.000114901 seconds elapsed
 -- 0.000153689 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.000107865 seconds elapsed
 -- 0.000100579 seconds elapsed
 -- 0.000107124 seconds elapsed
 -- 0.000061509 seconds elapsed
 -- 0.000110635 seconds elapsed
 -- 0.000105748 seconds elapsed
 -- 0.000062431 seconds elapsed
 -- 0.000113737 seconds elapsed
 -- 0.000105753 seconds elapsed
 -- 0.000110885 seconds elapsed
 -- 0.000099805 seconds elapsed
 -- 0.000105351 seconds elapsed
 -- 0.000062033 seconds elapsed
 -- 0.000109226 seconds elapsed
 -- 0.000106677 seconds elapsed
 -- 0.000059221 seconds elapsed
 -- 0.000114905 seconds elapsed
 -- 0.000105169 seconds elapsed
 -- 0.000065745 seconds elapsed
 -- 0.000117179 seconds elapsed
 -- 0.000143618 seconds elapsed
 -- 0.000055398 seconds elapsed
 -- 0.000113585 seconds elapsed
 -- 0.000138033 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.