up previous next
CoeffListWRT

list of coefficients of a polynomial wrt and indet

Syntax
CoeffListWRT(F: RINGELEM, X: RINGELEM): LIST of RINGELEM

Description
This function returns the list of the coefficients of F seen as a univariate polynomial in X , an indeterminate or a list of indeterminates. All entries in the returned list are RingElems belonging to RingOf(F) .

Note that the returned list is reversed from the CoCoA-4 analogue Coefficients(F,X) thus to re-use old code you should call reversed(CoeffListWRT(F,X)) .

Example
/**/  Use R ::= QQ[x,y,z];
/**/  F := 5*y^2 + (3*x^2-x)*y;
/**/  L := CoeffListWRT(F, y);  Print L;
[0, 3*x^2 -x, 5]
/**/  F = sum([L[d+1]*y^d | d in 0..(len(L)-1)]);
true

See Also