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.000473894 seconds elapsed
 -- 0.000924487 seconds elapsed
 -- 0.000515958 seconds elapsed
 -- 0.000129014 seconds elapsed
 -- 0.000264022 seconds elapsed
 -- 0.000227522 seconds elapsed
 -- 0.000237318 seconds elapsed
 -- 0.000555812 seconds elapsed
 -- 0.000548638 seconds elapsed
 -- 0.000261801 seconds elapsed
 -- 0.00050425 seconds elapsed
 -- 0.000504328 seconds elapsed
 -- 0.000449813 seconds elapsed
 -- 0.00104253 seconds elapsed
 -- 0.000557948 seconds elapsed
 -- 0.000273405 seconds elapsed
 -- 0.00122587 seconds elapsed
 -- 0.0005573 seconds elapsed
 -- 0.000228259 seconds elapsed
 -- 0.000997798 seconds elapsed
 -- 0.000638735 seconds elapsed
 -- 0.000241341 seconds elapsed
 -- 0.00147608 seconds elapsed
 -- 0.000595021 seconds elapsed
 -- 0.000257624 seconds elapsed
 -- 0.000887434 seconds elapsed
 -- 0.000538799 seconds elapsed
 -- 0.000233687 seconds elapsed
 -- 0.00098885 seconds elapsed
 -- 0.000566297 seconds elapsed
 -- 0.000226869 seconds elapsed
 -- 0.00129388 seconds elapsed
 -- 0.000775969 seconds elapsed
 -- 0.000227709 seconds elapsed
 -- 0.000495618 seconds elapsed
 -- 0.000710877 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.000453344 seconds elapsed
 -- 0.000481162 seconds elapsed
 -- 0.000483024 seconds elapsed
 -- 0.000248712 seconds elapsed
 -- 0.000488807 seconds elapsed
 -- 0.000486868 seconds elapsed
 -- 0.000248048 seconds elapsed
 -- 0.000486507 seconds elapsed
 -- 0.000487446 seconds elapsed
 -- 0.000203983 seconds elapsed
 -- 0.00021445 seconds elapsed
 -- 0.000208763 seconds elapsed
 -- 0.000113948 seconds elapsed
 -- 0.000208398 seconds elapsed
 -- 0.000205013 seconds elapsed
 -- 0.000240203 seconds elapsed
 -- 0.000520056 seconds elapsed
 -- 0.000489049 seconds elapsed
 -- 0.000112846 seconds elapsed
 -- 0.000240838 seconds elapsed
 -- 0.000273677 seconds elapsed
 -- 0.00010299 seconds elapsed
 -- 0.000215593 seconds elapsed
 -- 0.000277229 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.