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.000156263 seconds elapsed
 -- 0.000205659 seconds elapsed
 -- 0.000174782 seconds elapsed
 -- 0.000094105 seconds elapsed
 -- 0.0001845 seconds elapsed
 -- 0.000172759 seconds elapsed
 -- 0.000089155 seconds elapsed
 -- 0.000186131 seconds elapsed
 -- 0.000187821 seconds elapsed
 -- 0.000089788 seconds elapsed
 -- 0.000179656 seconds elapsed
 -- 0.000179385 seconds elapsed
 -- 0.000160487 seconds elapsed
 -- 0.000400432 seconds elapsed
 -- 0.000193032 seconds elapsed
 -- 0.000084343 seconds elapsed
 -- 0.000425407 seconds elapsed
 -- 0.000195375 seconds elapsed
 -- 0.000085167 seconds elapsed
 -- 0.00038966 seconds elapsed
 -- 0.000188043 seconds elapsed
 -- 0.000085562 seconds elapsed
 -- 0.00056086 seconds elapsed
 -- 0.00020064 seconds elapsed
 -- 0.000085356 seconds elapsed
 -- 0.000312231 seconds elapsed
 -- 0.000196349 seconds elapsed
 -- 0.000083499 seconds elapsed
 -- 0.000361736 seconds elapsed
 -- 0.000199582 seconds elapsed
 -- 0.000081613 seconds elapsed
 -- 0.000452327 seconds elapsed
 -- 0.000263899 seconds elapsed
 -- 0.000080871 seconds elapsed
 -- 0.000164257 seconds elapsed
 -- 0.00022313 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.000160484 seconds elapsed
 -- 0.000170722 seconds elapsed
 -- 0.00016249 seconds elapsed
 -- 0.000087965 seconds elapsed
 -- 0.000171639 seconds elapsed
 -- 0.000179348 seconds elapsed
 -- 0.000089829 seconds elapsed
 -- 0.000173735 seconds elapsed
 -- 0.000177903 seconds elapsed
 -- 0.000159138 seconds elapsed
 -- 0.000175147 seconds elapsed
 -- 0.000163581 seconds elapsed
 -- 0.000092456 seconds elapsed
 -- 0.000166991 seconds elapsed
 -- 0.000161721 seconds elapsed
 -- 0.000084578 seconds elapsed
 -- 0.00018091 seconds elapsed
 -- 0.000167335 seconds elapsed
 -- 0.000082653 seconds elapsed
 -- 0.000188395 seconds elapsed
 -- 0.000217054 seconds elapsed
 -- 0.000090263 seconds elapsed
 -- 0.000191865 seconds elapsed
 -- 0.000255287 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.