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.00017532 seconds elapsed
-- 0.00024509 seconds elapsed
-- 0.000175461 seconds elapsed
-- 0.000091892 seconds elapsed
-- 0.000204205 seconds elapsed
-- 0.000201859 seconds elapsed
-- 0.000074099 seconds elapsed
-- 0.000185198 seconds elapsed
-- 0.000197411 seconds elapsed
-- 0.000089179 seconds elapsed
-- 0.000192612 seconds elapsed
-- 0.000187763 seconds elapsed
-- 0.000183294 seconds elapsed
-- 0.000421091 seconds elapsed
-- 0.000195117 seconds elapsed
-- 0.000080653 seconds elapsed
-- 0.000501422 seconds elapsed
-- 0.000198774 seconds elapsed
-- 0.000082304 seconds elapsed
-- 0.00040436 seconds elapsed
-- 0.000190017 seconds elapsed
-- 0.000080902 seconds elapsed
-- 0.00082474 seconds elapsed
-- 0.000203293 seconds elapsed
-- 0.000078868 seconds elapsed
-- 0.000370157 seconds elapsed
-- 0.000194665 seconds elapsed
-- 0.000072577 seconds elapsed
-- 0.000378481 seconds elapsed
-- 0.000202109 seconds elapsed
-- 0.000084178 seconds elapsed
-- 0.000540275 seconds elapsed
-- 0.000281558 seconds elapsed
-- 0.000083348 seconds elapsed
-- 0.000167554 seconds elapsed
-- 0.000245542 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.000163688 seconds elapsed
-- 0.000159058 seconds elapsed
-- 0.000159691 seconds elapsed
-- 0.000076754 seconds elapsed
-- 0.000162084 seconds elapsed
-- 0.000182864 seconds elapsed
-- 0.000078488 seconds elapsed
-- 0.00015377 seconds elapsed
-- 0.000161022 seconds elapsed
-- 0.000145314 seconds elapsed
-- 0.000170891 seconds elapsed
-- 0.000163879 seconds elapsed
-- 0.000082234 seconds elapsed
-- 0.000155403 seconds elapsed
-- 0.000345901 seconds elapsed
-- 0.000083036 seconds elapsed
-- 0.000200646 seconds elapsed
-- 0.000114285 seconds elapsed
-- 0.000112451 seconds elapsed
-- 0.000169169 seconds elapsed
-- 0.000216317 seconds elapsed
-- 0.000091884 seconds elapsed
-- 0.000181641 seconds elapsed
-- 0.000270479 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.