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.000250228 seconds elapsed
 -- 0.000217331 seconds elapsed
 -- 0.000173955 seconds elapsed
 -- 0.000094983 seconds elapsed
 -- 0.000184738 seconds elapsed
 -- 0.000163004 seconds elapsed
 -- 0.000088466 seconds elapsed
 -- 0.000178002 seconds elapsed
 -- 0.000201791 seconds elapsed
 -- 0.000094645 seconds elapsed
 -- 0.000181956 seconds elapsed
 -- 0.000198006 seconds elapsed
 -- 0.000175285 seconds elapsed
 -- 0.000399518 seconds elapsed
 -- 0.000188529 seconds elapsed
 -- 0.000088109 seconds elapsed
 -- 0.000386885 seconds elapsed
 -- 0.000183014 seconds elapsed
 -- 0.000113156 seconds elapsed
 -- 0.00033663 seconds elapsed
 -- 0.000183642 seconds elapsed
 -- 0.000087279 seconds elapsed
 -- 0.00051289 seconds elapsed
 -- 0.000256349 seconds elapsed
 -- 0.000098142 seconds elapsed
 -- 0.000280802 seconds elapsed
 -- 0.000177887 seconds elapsed
 -- 0.00008483 seconds elapsed
 -- 0.000316669 seconds elapsed
 -- 0.000178748 seconds elapsed
 -- 0.000127637 seconds elapsed
 -- 0.000440784 seconds elapsed
 -- 0.000291001 seconds elapsed
 -- 0.000090073 seconds elapsed
 -- 0.000177722 seconds elapsed
 -- 0.00023625 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.000179721 seconds elapsed
 -- 0.000139906 seconds elapsed
 -- 0.000151872 seconds elapsed
 -- 0.000088832 seconds elapsed
 -- 0.000168765 seconds elapsed
 -- 0.000158909 seconds elapsed
 -- 0.000087478 seconds elapsed
 -- 0.000161621 seconds elapsed
 -- 0.000154207 seconds elapsed
 -- 0.000169247 seconds elapsed
 -- 0.000221328 seconds elapsed
 -- 0.000167495 seconds elapsed
 -- 0.00008366 seconds elapsed
 -- 0.000166908 seconds elapsed
 -- 0.000220698 seconds elapsed
 -- 0.000080926 seconds elapsed
 -- 0.00018308 seconds elapsed
 -- 0.000156552 seconds elapsed
 -- 0.000093765 seconds elapsed
 -- 0.000169734 seconds elapsed
 -- 0.000209231 seconds elapsed
 -- 0.000087812 seconds elapsed
 -- 0.000199905 seconds elapsed
 -- 0.000309292 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.