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.000201181 seconds elapsed
 -- 0.000193552 seconds elapsed
 -- 0.000184959 seconds elapsed
 -- 0.000099925 seconds elapsed
 -- 0.000199298 seconds elapsed
 -- 0.000183693 seconds elapsed
 -- 0.000094093 seconds elapsed
 -- 0.000191279 seconds elapsed
 -- 0.00021975 seconds elapsed
 -- 0.000092895 seconds elapsed
 -- 0.000203595 seconds elapsed
 -- 0.000193201 seconds elapsed
 -- 0.000205697 seconds elapsed
 -- 0.000367307 seconds elapsed
 -- 0.000202544 seconds elapsed
 -- 0.000095344 seconds elapsed
 -- 0.000447742 seconds elapsed
 -- 0.000209507 seconds elapsed
 -- 0.000094571 seconds elapsed
 -- 0.00035141 seconds elapsed
 -- 0.000204275 seconds elapsed
 -- 0.000094958 seconds elapsed
 -- 0.000535265 seconds elapsed
 -- 0.000211995 seconds elapsed
 -- 0.000087678 seconds elapsed
 -- 0.000343152 seconds elapsed
 -- 0.000194655 seconds elapsed
 -- 0.000091204 seconds elapsed
 -- 0.00033451 seconds elapsed
 -- 0.000208987 seconds elapsed
 -- 0.000090891 seconds elapsed
 -- 0.000445797 seconds elapsed
 -- 0.000303954 seconds elapsed
 -- 0.000100986 seconds elapsed
 -- 0.000173991 seconds elapsed
 -- 0.000237774 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.00017205 seconds elapsed
 -- 0.000161949 seconds elapsed
 -- 0.000161229 seconds elapsed
 -- 0.000092027 seconds elapsed
 -- 0.000177895 seconds elapsed
 -- 0.000173049 seconds elapsed
 -- 0.000087698 seconds elapsed
 -- 0.000162841 seconds elapsed
 -- 0.000173462 seconds elapsed
 -- 0.000168936 seconds elapsed
 -- 0.000166865 seconds elapsed
 -- 0.000171036 seconds elapsed
 -- 0.000090772 seconds elapsed
 -- 0.00018532 seconds elapsed
 -- 0.000165963 seconds elapsed
 -- 0.000094804 seconds elapsed
 -- 0.000208487 seconds elapsed
 -- 0.000176932 seconds elapsed
 -- 0.000092777 seconds elapsed
 -- 0.000183654 seconds elapsed
 -- 0.000237289 seconds elapsed
 -- 0.000087824 seconds elapsed
 -- 0.000190874 seconds elapsed
 -- 0.000234841 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.