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.00017462 seconds elapsed
 -- 0.00021989 seconds elapsed
 -- 0.00017558 seconds elapsed
 -- 0.000082421 seconds elapsed
 -- 0.000193626 seconds elapsed
 -- 0.000175456 seconds elapsed
 -- 0.000089135 seconds elapsed
 -- 0.000202768 seconds elapsed
 -- 0.000183348 seconds elapsed
 -- 0.000089032 seconds elapsed
 -- 0.000200049 seconds elapsed
 -- 0.000191315 seconds elapsed
 -- 0.000163994 seconds elapsed
 -- 0.000404142 seconds elapsed
 -- 0.000212632 seconds elapsed
 -- 0.000086643 seconds elapsed
 -- 0.000418713 seconds elapsed
 -- 0.000197765 seconds elapsed
 -- 0.000089279 seconds elapsed
 -- 0.000374905 seconds elapsed
 -- 0.000194224 seconds elapsed
 -- 0.000086989 seconds elapsed
 -- 0.000560308 seconds elapsed
 -- 0.000205981 seconds elapsed
 -- 0.000084516 seconds elapsed
 -- 0.000318806 seconds elapsed
 -- 0.000201273 seconds elapsed
 -- 0.00008478 seconds elapsed
 -- 0.000362622 seconds elapsed
 -- 0.000206945 seconds elapsed
 -- 0.000082068 seconds elapsed
 -- 0.000454018 seconds elapsed
 -- 0.000268906 seconds elapsed
 -- 0.000078744 seconds elapsed
 -- 0.000169019 seconds elapsed
 -- 0.000226074 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.000169667 seconds elapsed
 -- 0.000170377 seconds elapsed
 -- 0.000166504 seconds elapsed
 -- 0.000092435 seconds elapsed
 -- 0.00017259 seconds elapsed
 -- 0.000167372 seconds elapsed
 -- 0.000086456 seconds elapsed
 -- 0.000181018 seconds elapsed
 -- 0.000173629 seconds elapsed
 -- 0.000191066 seconds elapsed
 -- 0.00019463 seconds elapsed
 -- 0.000184759 seconds elapsed
 -- 0.000093594 seconds elapsed
 -- 0.000181861 seconds elapsed
 -- 0.000187476 seconds elapsed
 -- 0.000085851 seconds elapsed
 -- 0.00018436 seconds elapsed
 -- 0.000179242 seconds elapsed
 -- 0.000085951 seconds elapsed
 -- 0.000179481 seconds elapsed
 -- 0.000221809 seconds elapsed
 -- 0.000090291 seconds elapsed
 -- 0.000194766 seconds elapsed
 -- 0.000221351 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.