The convert command does many conversions (see Section 10.1.10). Among other things, it can convert between a polynomial in internal sparse multivariate format and a list representing the polynomial.
p:=symb2poly(x^2-x*y+2y,[x,y]) |
|
l:=convert(p,list) |
or:
l:=convert(p) |
|
which is a list of the coefficients followed by a list of the variable powers.
convert(l,polynom) |
|