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.000161941 seconds elapsed
 -- 0.000150921 seconds elapsed
 -- 0.000122231 seconds elapsed
 -- 0.000087689 seconds elapsed
 -- 0.000160592 seconds elapsed
 -- 0.000124132 seconds elapsed
 -- 0.000089811 seconds elapsed
 -- 0.000160721 seconds elapsed
 -- 0.000118452 seconds elapsed
 -- 0.00009237 seconds elapsed
 -- 0.000151841 seconds elapsed
 -- 0.000161321 seconds elapsed
 -- 0.000132901 seconds elapsed
 -- 0.000298412 seconds elapsed
 -- 0.000133491 seconds elapsed
 -- 0.00007136 seconds elapsed
 -- 0.000342962 seconds elapsed
 -- 0.000139971 seconds elapsed
 -- 0.00006866 seconds elapsed
 -- 0.000279352 seconds elapsed
 -- 0.000130171 seconds elapsed
 -- 0.000075752 seconds elapsed
 -- 0.000451272 seconds elapsed
 -- 0.00015071 seconds elapsed
 -- 0.0000699 seconds elapsed
 -- 0.000243893 seconds elapsed
 -- 0.000129952 seconds elapsed
 -- 0.000073641 seconds elapsed
 -- 0.000279542 seconds elapsed
 -- 0.000132772 seconds elapsed
 -- 0.00009533 seconds elapsed
 -- 0.000381443 seconds elapsed
 -- 0.000194012 seconds elapsed
 -- 0.00005972 seconds elapsed
 -- 0.00013243 seconds elapsed
 -- 0.00017619 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.000138221 seconds elapsed
 -- 0.000111341 seconds elapsed
 -- 0.000110669 seconds elapsed
 -- 0.000073751 seconds elapsed
 -- 0.00013304 seconds elapsed
 -- 0.00010873 seconds elapsed
 -- 0.000065429 seconds elapsed
 -- 0.000125001 seconds elapsed
 -- 0.000111241 seconds elapsed
 -- 0.000179571 seconds elapsed
 -- 0.000112431 seconds elapsed
 -- 0.00010985 seconds elapsed
 -- 0.000080881 seconds elapsed
 -- 0.000172121 seconds elapsed
 -- 0.000112171 seconds elapsed
 -- 0.00006941 seconds elapsed
 -- 0.000183272 seconds elapsed
 -- 0.000111272 seconds elapsed
 -- 0.000109112 seconds elapsed
 -- 0.000167321 seconds elapsed
 -- 0.000171101 seconds elapsed
 -- 0.00005736 seconds elapsed
 -- 0.000129712 seconds elapsed
 -- 0.00015661 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.