up previous next
Eval

substitute numbers or polynomials for indeterminates
Syntax

Eval(E:POLY/RATFUN/VECTOR/LIST/MAT, L:LIST):OBJECT


Description
This function substitutes L[I] for Indet(I) in the expression E which must be of type POLY, RATFUN, VECTOR, LIST, or MAT, and defined in the current ring. For more general substitutions use Subst .

If Len(L) is different from NumIndets() then only the first N substitutions are performed, where N is the minumum of the two values.

Example
  Use QQ[x,y];
  Eval(x^2+y, [2, 3]);
7
-------------------------------
  Eval(x^2+y, [2]);
y + 4
-------------------------------
  F := x(x-1)(x-2)y(y-1)(y-2)/36;
  P := [1/2, -2/3];
  Eval(F, P);
-5/162
-------------------------------
  Eval([x+y,x-y], [2,1]);
[3, 1]
-------------------------------
  Eval([x+y,x-y], [x^2,y^2]);
[x^2 + y^2, x^2 - y^2]
-------------------------------
  Eval([x+y,x-y], [y]);
[2y, 0]
-------------------------------


See Also