ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 26 Jul 2018 22:36:57 +0200Expressing a symmetric polynomial in terms of elementary symmetric polynomialshttps://ask.sagemath.org/question/42872/expressing-a-symmetric-polynomial-in-terms-of-elementary-symmetric-polynomials/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?
Mon, 09 Jul 2018 23:08:56 +0200https://ask.sagemath.org/question/42872/expressing-a-symmetric-polynomial-in-terms-of-elementary-symmetric-polynomials/Comment by slelievre for <p>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.</p>
<pre><code>R.<x,y> = PolynomialRing(QQ)
e = SymmetricFunctions(QQ).elementary()
e.from_polynomial(x^2*y^2)
</code></pre>
<p>The output I get is </p>
<pre><code>e[2, 2] - 2*e[3, 1] + 2*e[4],
</code></pre>
<p>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? </p>
https://ask.sagemath.org/question/42872/expressing-a-symmetric-polynomial-in-terms-of-elementary-symmetric-polynomials/?comment=43167#post-id-43167Possibly related questions (including the present one):
- [Ask Sage 9737 (2013-01): Symmetric polynomials of squares of variables](https://ask.sagemath.org/question/9737)
- [Ask Sage 32569 (2016-02): Symmetric polynomial as polynomial on elementary symmetric polynomials](https://ask.sagemath.org/question/32569)
- [Ask Sage 33378 (2016-05): Symmetric function as polynomial on elementary symmetric functions](https://ask.sagemath.org/question/33378)
- [Ask Sage 42872 (2018-07): Symmetric polynomial in terms of elementary symmetric polynomials](https://ask.sagemath.org/question/42872)Thu, 26 Jul 2018 22:33:21 +0200https://ask.sagemath.org/question/42872/expressing-a-symmetric-polynomial-in-terms-of-elementary-symmetric-polynomials/?comment=43167#post-id-43167Comment by slelievre for <p>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.</p>
<pre><code>R.<x,y> = PolynomialRing(QQ)
e = SymmetricFunctions(QQ).elementary()
e.from_polynomial(x^2*y^2)
</code></pre>
<p>The output I get is </p>
<pre><code>e[2, 2] - 2*e[3, 1] + 2*e[4],
</code></pre>
<p>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? </p>
https://ask.sagemath.org/question/42872/expressing-a-symmetric-polynomial-in-terms-of-elementary-symmetric-polynomials/?comment=43168#post-id-43168Documentation and tutorials:
- [SageMath documentation on symmetric functions](http://doc.sagemath.org/html/en/reference/combinat/sage/combinat/sf/sf.html)
- [Demo on symmetric functions](https://more-sagemath-tutorials.readthedocs.io/en/latest/demo-symmetric-functions.html)
- [Tutorial on symmetric functions](https://more-sagemath-tutorials.readthedocs.io/en/latest/tutorial-symmetric-functions.html)Thu, 26 Jul 2018 22:36:57 +0200https://ask.sagemath.org/question/42872/expressing-a-symmetric-polynomial-in-terms-of-elementary-symmetric-polynomials/?comment=43168#post-id-43168