Expressing a symmetric polynomial in terms of elementary symmetric polynomials

asked 2018-07-09 16:08:56 -0600

dkrumm gravatar image

Given a symmetric polynomial $P$ in $n$ variables, I'm trying to write code to express $P$ as a polynomial in the elementary symmetric polynomials in $n$ variables. My understanding is that SymmetricFunctions can be used for this, but it's not clear to me how this works. Below is the code for one simple example.

R.<x,y> = PolynomialRing(QQ)
e = SymmetricFunctions(QQ).elementary()

The output I get is

e[2, 2] - 2*e[3, 1] + 2*e[4],

which does not make sense to me; the expression should be e[2,2], I believe. Can anybody point out what I'm doing wrong?

edit retag flag offensive close merge delete