Question: multivariate polynomial

I have a multivariate polynomial P (written with the order "tdeg")in the (x_i)_i ; the coefficients are functions of the (a_i)_i. I'd want the set of the monomials that appear in the development of P. For instance P=a_1xy^2z^3+a_2x^4yz^2+a_3 is associated to {xy^2z^3,x^4yz^2,1}. Does there exist a command to do that ?

In a second time, I'd want the coefficients of {xy^2z^3,x^4yz^2,1} in the same order. Does there exist a command to do that ?

Thanks in advance.

Please Wait...