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

msolveEliminate -- compute the elimination ideal of a given ideal

Synopsis

Description

This function takes as input a polynomial ideal and computes the elimination ideal given by eliminating the variables specified in the inputted list.

The behavior is very different over finite (prime) fields, and the rationals. Over QQ, the subideal over a smaller set of variables eliminating the given ones is returned. Over a finite field, the Groebner basis in the product order eliminating the given block of variables is returned (warning: this is a copy of the ring with potentially permuted variables).

First an example over the rationals.

i1 : R = QQ[x,a,b,c,d]

o1 = R

o1 : PolynomialRing
i2 : f = 7*x^2+a*x+b

       2
o2 = 7x  + x*a + b

o2 : R
i3 : g = 2*x^2+c*x+d

       2
o3 = 2x  + x*c + d

o3 : R
i4 : M2elim=eliminate(x,ideal(f,g))

                        2     2               2              2
o4 = ideal(2a*b*c - 7b*c  - 2a d + 7a*c*d - 4b  + 28b*d - 49d )

o4 : Ideal of R
i5 : Msolveelim=msolveEliminate(x,ideal(f,g))

                        2     2               2              2
o5 = ideal(2a*b*c - 7b*c  - 2a d + 7a*c*d - 4b  + 28b*d - 49d )

o5 : Ideal of QQ[a..d]
i6 : sub(M2elim,ring Msolveelim)==Msolveelim

o6 = true

We can also work over a finite field. Here we get the full Groebner basis in the permuted variables with a block order.

i7 : R = ZZ/1073741827[x,y,a,b,c,d]

o7 = R

o7 : PolynomialRing
i8 : f = c*x^2+a*x+b*y^2+d*x*y+y

      2     2
o8 = y b + x c + x*y*d + x*a + y

o8 : R
i9 : g = diff(x,f)

o9 = 2x*c + y*d + a

o9 : R
i10 : h = diff(y,f)

o10 = 2y*b + x*d + 1

o10 : R
i11 : M2elim = eliminate({x,y}, ideal(f,g,h))

             2
o11 = ideal(a b - a*d + c)

o11 : Ideal of R
i12 : Msolveelim = msolveEliminate({x,y}, ideal(f,g,h))

              2                             2                      2
o12 = ideal (a b - a*d + c, y*a*d - 2y*c + a , y*b*c - 268435457y*d  -
      -----------------------------------------------------------------------
      268435457a*d - 536870913c, y*a*b + 536870913y*d - 536870913a, x*d +
      -----------------------------------------------------------------------
      2y*b + 1, x*c - 536870913y*d - 536870913a, x*a + y)

                   ZZ
o12 : Ideal of ----------[x..y, a..d]
               1073741827
i13 : M2elim_0 == sub(Msolveelim_0, R)

o13 = true

Ways to use msolveEliminate:

For the programmer

The object msolveEliminate is a method function with options.