next | previous | forward | backward | up | top | index | toc | home
Macaulay2 > basic commutative algebra > M2SingularBook > Singular Book 1.8.4

Singular Book 1.8.4 -- elimination of variables

There are several methods to eliminate variables in Macaulay2.
i1 : loadPackage "Elimination";
i2 : A = QQ[t,x,y,z];
i3 : I = ideal"t2+x2+y2+z2,t2+2x2-xy-z2,t+y3-z3";

o3 : Ideal of A
i4 : eliminate(I,t)

             2          2     2   6     3 3    6           2     2
o4 = ideal (x  - x*y - y  - 2z , y  - 2y z  + z  + x*y + 2y  + 3z )

o4 : Ideal of A

Alternatively, one may do it by hand: the elements of the Groebner basis under an elimination order not involving t generate the elimination ideal.

i5 : A1 = QQ[t,x,y,z,MonomialOrder=>{1,3}];
i6 : I = substitute(I,A1);

o6 : Ideal of A1
i7 : transpose gens gb I

o7 = {-2} | x2-xy-y2-2z2           |
     {-6} | y6-2y3z3+z6+xy+2y2+3z2 |
     {-3} | t+y3-z3                |

              3        1
o7 : Matrix A1  <--- A1

Here is another elimination ideal. Weights not given are assumed to be zero.

i8 : A2 = QQ[t,x,y,z,MonomialOrder=>Weights=>{1}];
i9 : I = substitute(I,A2);

o9 : Ideal of A2
i10 : transpose gens gb I

o10 = {-2} | x2-xy-y2-2z2           |
      {-6} | y6-2y3z3+z6+xy+2y2+3z2 |
      {-3} | t+y3-z3                |

               3        1
o10 : Matrix A2  <--- A2

The same order as the previous one:

i11 : A3 = QQ[t,x,y,z,MonomialOrder=>Eliminate 1];
i12 : I = substitute(I,A3);

o12 : Ideal of A3
i13 : transpose gens gb I

o13 = {-2} | x2-xy-y2-2z2           |
      {-6} | y6-2y3z3+z6+xy+2y2+3z2 |
      {-3} | t+y3-z3                |

               3        1
o13 : Matrix A3  <--- A3