Hi everyone,
I want to get the coefficients of symmetric polynomials, and then make them a vector. I tried the following code:
Sym = SymmetricFunctions(QQ)
e = Sym.elementary()
g = e[2, 1] - 3*e[3]
g.coefficients()
The output is [1, -3]
, but my desired result is [0, 1, -3]
, where the zero is the coefficient of e[1, 1, 1]
.
I found this question get the coefficients from the polynomial, but it seems .coefficients(sparse=False)
and .list()
only work for the univariate polynomial ring.
Thank you in advance for your answer and comments!