Ask Your Question
1

Expressing a symmetric polynomial in terms of elementary symmetric polynomials

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

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()
e.from_polynomial(x^2*y^2)

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

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-07-10 05:40:07 -0500

slelievre gravatar image

See the "monomial" basis and the "elementary" basis for symmetric functions.

See section "The classical bases" in the SageMath documentation page for symmetric functions.

sage: S = SymmetricFunctions(QQ)

sage: e = S.elementary()
sage: m = S.monomial()

sage: A = ['a', 'b', 'c', 'd']

sage: m22 = m[2, 2].expand(4, alphabet=A)
sage: m22
a^2*b^2 + a^2*c^2 + b^2*c^2 + a^2*d^2 + b^2*d^2 + c^2*d^2

sage: e22 = e[2, 2].expand(4, alphabet=A)
sage: e31 = e[3, 1].expand(4, alphabet=A)
sage: e4 = e[4].expand(4, alphabet=A)

sage: e22
a^2*b^2 + 2*a^2*b*c + 2*a*b^2*c + a^2*c^2 + 2*a*b*c^2
+ b^2*c^2 + 2*a^2*b*d + 2*a*b^2*d + 2*a^2*c*d + 6*a*b*c*d
+ 2*b^2*c*d + 2*a*c^2*d + 2*b*c^2*d + a^2*d^2 + 2*a*b*d^2
+ b^2*d^2 + 2*a*c*d^2 + 2*b*c*d^2 + c^2*d^2
sage: e31
a^2*b*c + a*b^2*c + a*b*c^2 + a^2*b*d + a*b^2*d
+ a^2*c*d + 4*a*b*c*d + b^2*c*d + a*c^2*d + b*c^2*d
+ a*b*d^2 + a*c*d^2 + b*c*d^2
sage: e4
a*b*c*d

sage: e22 - 2*e31 + 2*e4
a^2*b^2 + a^2*c^2 + b^2*c^2 + a^2*d^2 + b^2*d^2 + c^2*d^2

sage: e22 - 2*e31 + 2*e4 == m22
True

Other bases

sage: h = S.homogeneous()
sage: f = S.forgotten()
sage: p = S.powersum()
sage: s = S.schur()

See also

sage: S.inject_shorthands()
edit flag offensive delete link more

Comments

It is not clear to me how this answer helps. I want to express a symmetric polynomial $P(x,y)$ in terms of $x+y$ and $xy$, the two elementary symmetric polynomials in $x$ and $y$. How can I modify my code to do this?

dkrumm gravatar imagedkrumm ( 2018-07-10 21:37:21 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-07-09 16:08:56 -0500

Seen: 27 times

Last updated: Jul 10