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.000144621 seconds elapsed
 -- 0.000170994 seconds elapsed
 -- 0.000131818 seconds elapsed
 -- 0.00006732 seconds elapsed
 -- 0.000140996 seconds elapsed
 -- 0.000131195 seconds elapsed
 -- 0.000079639 seconds elapsed
 -- 0.00016566 seconds elapsed
 -- 0.000144167 seconds elapsed
 -- 0.000063293 seconds elapsed
 -- 0.000133532 seconds elapsed
 -- 0.000143872 seconds elapsed
 -- 0.0001177 seconds elapsed
 -- 0.00029445 seconds elapsed
 -- 0.000140175 seconds elapsed
 -- 0.000064446 seconds elapsed
 -- 0.00033142 seconds elapsed
 -- 0.000146116 seconds elapsed
 -- 0.000082194 seconds elapsed
 -- 0.000305351 seconds elapsed
 -- 0.000148422 seconds elapsed
 -- 0.000065918 seconds elapsed
 -- 0.000430761 seconds elapsed
 -- 0.000148744 seconds elapsed
 -- 0.000061558 seconds elapsed
 -- 0.000300839 seconds elapsed
 -- 0.000201121 seconds elapsed
 -- 0.000064688 seconds elapsed
 -- 0.000278837 seconds elapsed
 -- 0.000139156 seconds elapsed
 -- 0.000065963 seconds elapsed
 -- 0.000351698 seconds elapsed
 -- 0.000207284 seconds elapsed
 -- 0.000075998 seconds elapsed
 -- 0.000146433 seconds elapsed
 -- 0.000201455 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.000115011 seconds elapsed
 -- 0.000124629 seconds elapsed
 -- 0.0001248 seconds elapsed
 -- 0.000065155 seconds elapsed
 -- 0.000119118 seconds elapsed
 -- 0.000121249 seconds elapsed
 -- 0.000081955 seconds elapsed
 -- 0.000136511 seconds elapsed
 -- 0.000139183 seconds elapsed
 -- 0.000116294 seconds elapsed
 -- 0.000128617 seconds elapsed
 -- 0.000123053 seconds elapsed
 -- 0.000074742 seconds elapsed
 -- 0.000149487 seconds elapsed
 -- 0.000140561 seconds elapsed
 -- 0.000063114 seconds elapsed
 -- 0.000139928 seconds elapsed
 -- 0.000128429 seconds elapsed
 -- 0.000068165 seconds elapsed
 -- 0.000137857 seconds elapsed
 -- 0.000176526 seconds elapsed
 -- 0.000097404 seconds elapsed
 -- 0.000174305 seconds elapsed
 -- 0.000201436 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.