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.000126749 seconds elapsed
 -- 0.000134113 seconds elapsed
 -- 0.000114637 seconds elapsed
 -- 0.000054362 seconds elapsed
 -- 0.000117292 seconds elapsed
 -- 0.000112111 seconds elapsed
 -- 0.000056637 seconds elapsed
 -- 0.000125116 seconds elapsed
 -- 0.000114256 seconds elapsed
 -- 0.000055405 seconds elapsed
 -- 0.000262054 seconds elapsed
 -- 0.000151625 seconds elapsed
 -- 0.00010103 seconds elapsed
 -- 0.000276291 seconds elapsed
 -- 0.000129894 seconds elapsed
 -- 0.000053431 seconds elapsed
 -- 0.000303472 seconds elapsed
 -- 0.000129956 seconds elapsed
 -- 0.000057017 seconds elapsed
 -- 0.000252227 seconds elapsed
 -- 0.000128512 seconds elapsed
 -- 0.000078718 seconds elapsed
 -- 0.000387671 seconds elapsed
 -- 0.000141738 seconds elapsed
 -- 0.000055193 seconds elapsed
 -- 0.000212561 seconds elapsed
 -- 0.000126959 seconds elapsed
 -- 0.000056286 seconds elapsed
 -- 0.000263536 seconds elapsed
 -- 0.00012744 seconds elapsed
 -- 0.000053892 seconds elapsed
 -- 0.000332627 seconds elapsed
 -- 0.000187804 seconds elapsed
 -- 0.000055193 seconds elapsed
 -- 0.000113375 seconds elapsed
 -- 0.000177465 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.000100419 seconds elapsed
 -- 0.000122442 seconds elapsed
 -- 0.000105408 seconds elapsed
 -- 0.000055896 seconds elapsed
 -- 0.000106441 seconds elapsed
 -- 0.00010611 seconds elapsed
 -- 0.000053592 seconds elapsed
 -- 0.000105849 seconds elapsed
 -- 0.000103936 seconds elapsed
 -- 0.000102273 seconds elapsed
 -- 0.00010614 seconds elapsed
 -- 0.000107544 seconds elapsed
 -- 0.000054622 seconds elapsed
 -- 0.000135276 seconds elapsed
 -- 0.000110008 seconds elapsed
 -- 0.000059332 seconds elapsed
 -- 0.000123482 seconds elapsed
 -- 0.00011156 seconds elapsed
 -- 0.000056295 seconds elapsed
 -- 0.000111481 seconds elapsed
 -- 0.000149652 seconds elapsed
 -- 0.000054644 seconds elapsed
 -- 0.00011109 seconds elapsed
 -- 0.000176392 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.