Home Online Manual
Top
Back: elimRing
Forward: elim1
FastBack:
FastForward:
Up: elim_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.4.6.3 elim

Procedure from library elim.lib (see elim_lib).

Usage:
elim(id,arg[,s]); id ideal/module, arg can be either an intvec v or a product p of variables (type poly), s a string determining the method which can be "slimgb" or "std" or, additionally, "withWeigts".

Return:
ideal/module obtained from id by eliminating either the variables with indices appearing in v or the variables appearing in p. Does not work in a qring.

Method:
elim uses elimRing to create a ring with an elimination ordering for the variables to be eliminated and then applies std if "std" is given, or slimgb if "slimgb" is given, or a heuristically chosen method.
If the variables in the basering have weights these weights are used in elimRing. If a string "withWeigts" as (optional) argument is given Singular computes weights for the variables to make the input as homogeneous as possible.
The method is different from that used by eliminate and elim1; depending on the example, any of these commands can be faster.

Note:
No special monomial ordering is required, i.e. the ordering can be local or mixed. The result is a SB with respect to the ordering of the second block used by elimRing. E.g. if the first var not to be eliminated is global, resp. local, this ordering is dp, resp. ds (or wp, resp. ws, with the given weights for these variables). If printlevel > 0 the ring for which the output is a SB is shown.

Example:
 
LIB "elim.lib";
ring r=0,(x,y,u,v,w),dp;
ideal i=x-u,y-u2,w-u3,v-x+y3;
elim(i,3..4);
==> _[1]=y2-xw
==> _[2]=xy-w
==> _[3]=x2-y
elim(i,uv);
==> _[1]=y2-xw
==> _[2]=xy-w
==> _[3]=x2-y
int p = printlevel;
printlevel = 2;
elim(i,uv,"withWeights","slimgb");
==> // result is a SB in the following ring:
==> // coefficients: QQ
==> // number of vars : 5
==> //        block   1 : ordering a
==> //                  : names    u v x y w
==> //                  : weights  5 21 0 0 0
==> //        block   2 : ordering wp
==> //                  : names    u v x y w
==> //                  : weights  5 7 5 21 15
==> //        block   3 : ordering C
==> _[1]=x3-w
==> _[2]=-x2+y
printlevel = p;
ring S =  (0,a),(x,y,z,u,v),ws(1,2,3,4,5);
minpoly = a2+1;
ideal i=x-u,y-u2,az-u3,v-x+ay3;
module m=i*gen(1)+i*gen(2);
m=elim(m,xy);
show(m);
==> // module, 4 generator(s)
==> [0,z+(a)*u3]
==> [z+(a)*u3]
==> [0,u-v+(-a)*u6]
==> [u-v+(-a)*u6]
See also: elim1; eliminate.