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.000135579 seconds elapsed
 -- 0.000149276 seconds elapsed
 -- 0.000127215 seconds elapsed
 -- 0.000063524 seconds elapsed
 -- 0.000134588 seconds elapsed
 -- 0.000129021 seconds elapsed
 -- 0.000059935 seconds elapsed
 -- 0.000134726 seconds elapsed
 -- 0.000127954 seconds elapsed
 -- 0.000079308 seconds elapsed
 -- 0.000152593 seconds elapsed
 -- 0.000151358 seconds elapsed
 -- 0.000121475 seconds elapsed
 -- 0.00029425 seconds elapsed
 -- 0.000143669 seconds elapsed
 -- 0.000059984 seconds elapsed
 -- 0.000342747 seconds elapsed
 -- 0.000144039 seconds elapsed
 -- 0.000066288 seconds elapsed
 -- 0.000287474 seconds elapsed
 -- 0.000149305 seconds elapsed
 -- 0.000072948 seconds elapsed
 -- 0.000431606 seconds elapsed
 -- 0.000156327 seconds elapsed
 -- 0.000061307 seconds elapsed
 -- 0.00023293 seconds elapsed
 -- 0.000142708 seconds elapsed
 -- 0.000143539 seconds elapsed
 -- 0.000585059 seconds elapsed
 -- 0.00031904 seconds elapsed
 -- 0.000066085 seconds elapsed
 -- 0.000356581 seconds elapsed
 -- 0.000208635 seconds elapsed
 -- 0.000063762 seconds elapsed
 -- 0.000123258 seconds elapsed
 -- 0.000189273 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.000139583 seconds elapsed
 -- 0.000209515 seconds elapsed
 -- 0.000169869 seconds elapsed
 -- 0.000066282 seconds elapsed
 -- 0.000124371 seconds elapsed
 -- 0.000120899 seconds elapsed
 -- 0.000071185 seconds elapsed
 -- 0.000146192 seconds elapsed
 -- 0.000132024 seconds elapsed
 -- 0.000127846 seconds elapsed
 -- 0.000125555 seconds elapsed
 -- 0.000134713 seconds elapsed
 -- 0.000069403 seconds elapsed
 -- 0.000133481 seconds elapsed
 -- 0.000124058 seconds elapsed
 -- 0.000061315 seconds elapsed
 -- 0.000115895 seconds elapsed
 -- 0.000121119 seconds elapsed
 -- 0.00006525 seconds elapsed
 -- 0.000124603 seconds elapsed
 -- 0.000211664 seconds elapsed
 -- 0.000075131 seconds elapsed
 -- 0.000143007 seconds elapsed
 -- 0.000179201 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.