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.000175537 seconds elapsed
 -- 0.00025179 seconds elapsed
 -- 0.000206215 seconds elapsed
 -- 0.000100668 seconds elapsed
 -- 0.000215332 seconds elapsed
 -- 0.000215693 seconds elapsed
 -- 0.000098585 seconds elapsed
 -- 0.000222806 seconds elapsed
 -- 0.000198791 seconds elapsed
 -- 0.000094578 seconds elapsed
 -- 0.00019286 seconds elapsed
 -- 0.000215973 seconds elapsed
 -- 0.000172192 seconds elapsed
 -- 0.000479306 seconds elapsed
 -- 0.000215303 seconds elapsed
 -- 0.000098013 seconds elapsed
 -- 0.000500625 seconds elapsed
 -- 0.000211405 seconds elapsed
 -- 0.00009601 seconds elapsed
 -- 0.000440633 seconds elapsed
 -- 0.000220732 seconds elapsed
 -- 0.00008563 seconds elapsed
 -- 0.000662828 seconds elapsed
 -- 0.000217777 seconds elapsed
 -- 0.000092202 seconds elapsed
 -- 0.000396911 seconds elapsed
 -- 0.000210212 seconds elapsed
 -- 0.000089248 seconds elapsed
 -- 0.000395189 seconds elapsed
 -- 0.000215203 seconds elapsed
 -- 0.000102121 seconds elapsed
 -- 0.000560247 seconds elapsed
 -- 0.000318646 seconds elapsed
 -- 0.000086932 seconds elapsed
 -- 0.000211595 seconds elapsed
 -- 0.00028322 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.000158265 seconds elapsed
 -- 0.00020338 seconds elapsed
 -- 0.000177651 seconds elapsed
 -- 0.000081853 seconds elapsed
 -- 0.000177452 seconds elapsed
 -- 0.000166901 seconds elapsed
 -- 0.000082034 seconds elapsed
 -- 0.000189133 seconds elapsed
 -- 0.000178344 seconds elapsed
 -- 0.000155771 seconds elapsed
 -- 0.000191889 seconds elapsed
 -- 0.00016632 seconds elapsed
 -- 0.000083455 seconds elapsed
 -- 0.000181409 seconds elapsed
 -- 0.000204582 seconds elapsed
 -- 0.00008569 seconds elapsed
 -- 0.000196498 seconds elapsed
 -- 0.000168644 seconds elapsed
 -- 0.00009047 seconds elapsed
 -- 0.000180166 seconds elapsed
 -- 0.000228507 seconds elapsed
 -- 0.000081251 seconds elapsed
 -- 0.000167724 seconds elapsed
 -- 0.000238035 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.