Macaulay2 » Documentation
Packages » Elimination :: eliminate
next | previous | forward | backward | up | index | toc

eliminate

Synopsis

Description

If the ideal J is homogeneous, then an effort is made to use the Hilbert function to speed up the computation.
i1 : R = ZZ/101[x,a,b,c,d]	  

o1 = R

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

      2
o2 = x  + x*a + b

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

      2
o3 = x  + x*c + d

o3 : R
i4 : time eliminate(x,ideal(f,g))
     -- used 0.00192075 seconds

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

o4 : Ideal of R
i5 : time ideal resultant(f,g,x)
     -- used 0.000990837 seconds

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

o5 : Ideal of R
i6 : sylvesterMatrix(f,g,x)

o6 = {-3} | 1 a b 0 |
     {-2} | 0 1 a b |
     {-3} | 1 c d 0 |
     {-2} | 0 1 c d |

             4      4
o6 : Matrix R  <-- R
i7 : discriminant(f,x)

        2
o7 = - a  + 4b

o7 : R

One may also switch the order of arguments: the ideal being the first argument. This usage has been deprecated, and should no longer be used.

Caveat

The ring R should not be a quotient ring, or a non-commutative ring. Additionally, it would be nice to be able to use a DegreeLimit, or to be able to interrupt the computation.

See also

Ways to use eliminate :

For the programmer

The object eliminate is a method function.