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.000175636 seconds elapsed
 -- 0.000237813 seconds elapsed
 -- 0.000197768 seconds elapsed
 -- 0.000093695 seconds elapsed
 -- 0.000214611 seconds elapsed
 -- 0.000191487 seconds elapsed
 -- 0.000092382 seconds elapsed
 -- 0.000235629 seconds elapsed
 -- 0.000194322 seconds elapsed
 -- 0.000120313 seconds elapsed
 -- 0.000212567 seconds elapsed
 -- 0.000210954 seconds elapsed
 -- 0.000173764 seconds elapsed
 -- 0.00049892 seconds elapsed
 -- 0.000240127 seconds elapsed
 -- 0.000092943 seconds elapsed
 -- 0.000582886 seconds elapsed
 -- 0.000220041 seconds elapsed
 -- 0.000094286 seconds elapsed
 -- 0.000483241 seconds elapsed
 -- 0.000247672 seconds elapsed
 -- 0.000094527 seconds elapsed
 -- 0.000703381 seconds elapsed
 -- 0.000228896 seconds elapsed
 -- 0.000094977 seconds elapsed
 -- 0.00039199 seconds elapsed
 -- 0.000216292 seconds elapsed
 -- 0.000094777 seconds elapsed
 -- 0.000447745 seconds elapsed
 -- 0.000254234 seconds elapsed
 -- 0.000093003 seconds elapsed
 -- 0.000610819 seconds elapsed
 -- 0.000333292 seconds elapsed
 -- 0.00009075 seconds elapsed
 -- 0.000202457 seconds elapsed
 -- 0.000320748 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.000172852 seconds elapsed
 -- 0.000179855 seconds elapsed
 -- 0.00017702 seconds elapsed
 -- 0.000097652 seconds elapsed
 -- 0.000190586 seconds elapsed
 -- 0.000180487 seconds elapsed
 -- 0.000092943 seconds elapsed
 -- 0.000191086 seconds elapsed
 -- 0.000186507 seconds elapsed
 -- 0.000171038 seconds elapsed
 -- 0.000177551 seconds elapsed
 -- 0.000172051 seconds elapsed
 -- 0.000102762 seconds elapsed
 -- 0.000192738 seconds elapsed
 -- 0.000178743 seconds elapsed
 -- 0.000095569 seconds elapsed
 -- 0.000205954 seconds elapsed
 -- 0.000177881 seconds elapsed
 -- 0.000094146 seconds elapsed
 -- 0.000200834 seconds elapsed
 -- 0.000293887 seconds elapsed
 -- 0.000090338 seconds elapsed
 -- 0.0001991 seconds elapsed
 -- 0.000251779 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.