Macaulay2 » Documentation
Packages » Msolve :: msolveLeadMonomials
next | previous | forward | backward | up | index | toc

msolveLeadMonomials -- compute the leading monomials of a Groebner basis in GRevLex order

Synopsis

Description

This functions uses the F4 implementation in the msolve package to compute leading monomials via a Groebner basis, in GRevLex order, of a polynomial ideal with either rational coefficients or finite field coefficients with characteristic less than $2^{31}$. If the input ideal is a polynomial ring with monomial order other than GRevLex a GRevLex basis is returned (and no warning is given). The input ideal may also be given in a ring with integer coefficients, in this case a Groebner basis for the given ideal over the rationals will be computed, denominators will be cleared, and the output will be a Groebner basis over the rationals in GRevLex order with integer coefficients.

First an example over a finite field

i1 : R=ZZ/1073741827[z_1..z_3]

o1 = R

o1 : PolynomialRing
i2 : I=ideal(7*z_1*z_2+5*z_2*z_3+z_3^2+z_1+5*z_3+10,8*z_1^2+13*z_1*z_3+10*z_3^2+z_2+z_1)

                             2                    2               2
o2 = ideal (7z z  + 5z z  + z  + z  + 5z  + 10, 8z  + 13z z  + 10z  + z  +
              1 2     2 3    3    1     3         1      1 3      3    1  
     ------------------------------------------------------------------------
     z )
      2

o2 : Ideal of R
i3 : lm=monomialIdeal msolveLeadMonomials I

                     2           2   2 2
o3 = monomialIdeal (z , z z , z z , z z )
                     1   1 2   1 3   2 3

o3 : MonomialIdeal of R
i4 : degree lm

o4 = 4
i5 : dim lm

o5 = 1

Now the same example over the rationals; note over the rationals msolve first computes over a finite field and when only the leading monomials are asked for the correct leading monomials will be returned but the full Groebner basis over QQ will not be computed. Hence if only degree and dimension are desired this command will often be faster that the Groebner basis command.

i6 : R=QQ[z_1..z_3]

o6 = R

o6 : PolynomialRing
i7 : I=ideal(7*z_1*z_2+5*z_2*z_3+z_3^2+z_1+5*z_3+10,8*z_1^2+13*z_1*z_3+10*z_3^2+z_2+z_1)

                             2                    2               2
o7 = ideal (7z z  + 5z z  + z  + z  + 5z  + 10, 8z  + 13z z  + 10z  + z  +
              1 2     2 3    3    1     3         1      1 3      3    1  
     ------------------------------------------------------------------------
     z )
      2

o7 : Ideal of R
i8 : lm=monomialIdeal msolveLeadMonomials I

                     2           2   2 2
o8 = monomialIdeal (z , z z , z z , z z )
                     1   1 2   1 3   2 3

o8 : MonomialIdeal of R
i9 : lt=monomialIdeal leadTerm groebnerBasis I

                     2           2   2 2
o9 = monomialIdeal (z , z z , z z , z z )
                     1   1 2   1 3   2 3

o9 : MonomialIdeal of R
i10 : lm==lt

o10 = true
i11 : degree lm

o11 = 4
i12 : dim lm

o12 = 1

Ways to use msolveLeadMonomials:

For the programmer

The object msolveLeadMonomials is a method function with options.