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.000234661 seconds elapsed
 -- 0.000306391 seconds elapsed
 -- 0.000257691 seconds elapsed
 -- 0.000110484 seconds elapsed
 -- 0.000261311 seconds elapsed
 -- 0.000253902 seconds elapsed
 -- 0.000113109 seconds elapsed
 -- 0.000260873 seconds elapsed
 -- 0.000258488 seconds elapsed
 -- 0.000116691 seconds elapsed
 -- 0.000255576 seconds elapsed
 -- 0.000285266 seconds elapsed
 -- 0.000235979 seconds elapsed
 -- 0.000602167 seconds elapsed
 -- 0.000288816 seconds elapsed
 -- 0.000103039 seconds elapsed
 -- 0.000636294 seconds elapsed
 -- 0.000276259 seconds elapsed
 -- 0.00011056 seconds elapsed
 -- 0.000538158 seconds elapsed
 -- 0.000279476 seconds elapsed
 -- 0.000121206 seconds elapsed
 -- 0.000829718 seconds elapsed
 -- 0.000294263 seconds elapsed
 -- 0.000110074 seconds elapsed
 -- 0.000459983 seconds elapsed
 -- 0.000272376 seconds elapsed
 -- 0.000115447 seconds elapsed
 -- 0.00051343 seconds elapsed
 -- 0.00027938 seconds elapsed
 -- 0.000114406 seconds elapsed
 -- 0.000715049 seconds elapsed
 -- 0.000424814 seconds elapsed
 -- 0.000114187 seconds elapsed
 -- 0.000245349 seconds elapsed
 -- 0.000398631 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.000247119 seconds elapsed
 -- 0.000243932 seconds elapsed
 -- 0.000247345 seconds elapsed
 -- 0.000116822 seconds elapsed
 -- 0.000237405 seconds elapsed
 -- 0.000251545 seconds elapsed
 -- 0.000115382 seconds elapsed
 -- 0.000233456 seconds elapsed
 -- 0.000261568 seconds elapsed
 -- 0.000251811 seconds elapsed
 -- 0.000246658 seconds elapsed
 -- 0.000254254 seconds elapsed
 -- 0.000116427 seconds elapsed
 -- 0.000246287 seconds elapsed
 -- 0.000262617 seconds elapsed
 -- 0.000112871 seconds elapsed
 -- 0.000244839 seconds elapsed
 -- 0.000243632 seconds elapsed
 -- 0.00010866 seconds elapsed
 -- 0.000237496 seconds elapsed
 -- 0.000343514 seconds elapsed
 -- 0.000106474 seconds elapsed
 -- 0.000223572 seconds elapsed
 -- 0.000333646 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.