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.Fri, 18 Feb 2022 07:41:36 +0100Jack Symmetric function and expansion in power symmetric basishttps://ask.sagemath.org/question/61137/jack-symmetric-function-and-expansion-in-power-symmetric-basis/The question involves SageMath and its Symmetric functions package.
Particularly I am interested in Jack symmetric functions.
So to define Jack symmetric functions in SageMath:
sage: Sym = SymmetricFunctions(QQ)
sage: Zonal = Sym.jack(t=2).J()
sage: Schur = Sym.jack(t=2).J()
sage: s = Sym.schur()
My interest in all these functions as expansion in power symmetric basis hence
sage: P = Sym.p() # to expand symmetric functions in power symmetric basis
sage: P(Zonal([2,2]))
p[1, 1, 1, 1] + 2*p[2, 1, 1] + 7*p[2, 2] - 8*p[3, 1] - 2*p[4]
Similarly
sage: P(Schur([2,2]))
1/12*p[1, 1, 1, 1] + 1/4*p[2, 2] + (-1/3)*p[3, 1]
Now the problem is that `p[2,1,1]` is equal to $p_2 p_1^2$
but with the Sage representation I cannot work by replacing
$p_i$ with $p_i/h$ for example. As I know the character formula
for Schur functions, I wrote my own programme using `symmetrica.charvalue`
and for `shur([2,1,1])` it returns
$$
1/8*p_1^4/h^4 - 1/4*p_1^2*p_2/h^3 - 1/8*p_2^2/h^2 + 1/4*p_4/h
$$
My question is: can I do it without writing a whole code
just by using the predefined Schur function that is
jack symmetric function for $t = 1$?
The second question is about the same thing for $t = 2$ Zonal polynomials.
The zonal polynomial can be written in a power symmetric basis in SageMath,
but I want it as a product of the $p_i$, not `p[Partition]`. Is there
a formula that exists in literature to do that or can I just do it
in SageMath using the existing Jack function?
I can rewrite the code if I have a reference for zonal polynomial
in a power symmetric basis.Wed, 16 Feb 2022 23:23:24 +0100https://ask.sagemath.org/question/61137/jack-symmetric-function-and-expansion-in-power-symmetric-basis/Answer by rburing for <p>The question involves SageMath and its Symmetric functions package.
Particularly I am interested in Jack symmetric functions.
So to define Jack symmetric functions in SageMath:</p>
<pre><code>sage: Sym = SymmetricFunctions(QQ)
sage: Zonal = Sym.jack(t=2).J()
sage: Schur = Sym.jack(t=2).J()
sage: s = Sym.schur()
</code></pre>
<p>My interest in all these functions as expansion in power symmetric basis hence </p>
<pre><code>sage: P = Sym.p() # to expand symmetric functions in power symmetric basis
sage: P(Zonal([2,2]))
p[1, 1, 1, 1] + 2*p[2, 1, 1] + 7*p[2, 2] - 8*p[3, 1] - 2*p[4]
</code></pre>
<p>Similarly</p>
<pre><code>sage: P(Schur([2,2]))
1/12*p[1, 1, 1, 1] + 1/4*p[2, 2] + (-1/3)*p[3, 1]
</code></pre>
<p>Now the problem is that <code>p[2,1,1]</code> is equal to $p_2 p_1^2$
but with the Sage representation I cannot work by replacing
$p_i$ with $p_i/h$ for example. As I know the character formula
for Schur functions, I wrote my own programme using <code>symmetrica.charvalue</code>
and for <code>shur([2,1,1])</code> it returns
$$
1/8<em>p_1^4/h^4 - 1/4</em>p_1^2<em>p_2/h^3 - 1/8</em>p_2^2/h^2 + 1/4*p_4/h
$$</p>
<p>My question is: can I do it without writing a whole code
just by using the predefined Schur function that is
jack symmetric function for $t = 1$?</p>
<p>The second question is about the same thing for $t = 2$ Zonal polynomials.
The zonal polynomial can be written in a power symmetric basis in SageMath,
but I want it as a product of the $p_i$, not <code>p[Partition]</code>. Is there
a formula that exists in literature to do that or can I just do it
in SageMath using the existing Jack function?</p>
<p>I can rewrite the code if I have a reference for zonal polynomial
in a power symmetric basis.</p>
https://ask.sagemath.org/question/61137/jack-symmetric-function-and-expansion-in-power-symmetric-basis/?answer=61144#post-id-61144These objects created by SageMath are *iterable* in a nice way, containing exactly the information you need:
sage: P(Schur([2,1,1]))
p[1, 1, 1, 1] - p[2, 1, 1] - 2*p[2, 2] - 2*p[3, 1] + 4*p[4]
sage: list(P(Schur([2,1,1])))
[([2, 1, 1], -1), ([3, 1], -2), ([2, 2], -2), ([4], 4), ([1, 1, 1, 1], 1)]
So you can do e.g. the following:
sage: var('h')
sage: sum(coeff*prod(var('p_{}'.format(k))/h for k in partition) for partition, coeff in P(Schur([2,1,1])))
p_1^4/h^4 - p_1^2*p_2/h^3 - 2*p_2^2/h^2 - 2*p_1*p_3/h^2 + 4*p_4/h
Or e.g. with generators of a polynomial ring:
sage: P_ring = PolynomialRing(QQ, names=['p_{}'.format(k+1) for k in range(4)] + ['h'])
sage: p = P_ring.gens()[:-1]
sage: h = P_ring.gens()[-1]
sage: sum(coeff*prod(p[k-1]/h for k in partition) for partition, coeff in P(Schur([2,1,1])))
(p_1^4 - p_1^2*p_2*h - 2*p_2^2*h^2 - 2*p_1*p_3*h^2 + 4*p_4*h^3)/h^4Thu, 17 Feb 2022 10:43:43 +0100https://ask.sagemath.org/question/61137/jack-symmetric-function-and-expansion-in-power-symmetric-basis/?answer=61144#post-id-61144Comment by Anupamsage for <p>These objects created by SageMath are <em>iterable</em> in a nice way, containing exactly the information you need:</p>
<pre><code>sage: P(Schur([2,1,1]))
p[1, 1, 1, 1] - p[2, 1, 1] - 2*p[2, 2] - 2*p[3, 1] + 4*p[4]
sage: list(P(Schur([2,1,1])))
[([2, 1, 1], -1), ([3, 1], -2), ([2, 2], -2), ([4], 4), ([1, 1, 1, 1], 1)]
</code></pre>
<p>So you can do e.g. the following:</p>
<pre><code>sage: var('h')
sage: sum(coeff*prod(var('p_{}'.format(k))/h for k in partition) for partition, coeff in P(Schur([2,1,1])))
p_1^4/h^4 - p_1^2*p_2/h^3 - 2*p_2^2/h^2 - 2*p_1*p_3/h^2 + 4*p_4/h
</code></pre>
<p>Or e.g. with generators of a polynomial ring:</p>
<pre><code>sage: P_ring = PolynomialRing(QQ, names=['p_{}'.format(k+1) for k in range(4)] + ['h'])
sage: p = P_ring.gens()[:-1]
sage: h = P_ring.gens()[-1]
sage: sum(coeff*prod(p[k-1]/h for k in partition) for partition, coeff in P(Schur([2,1,1])))
(p_1^4 - p_1^2*p_2*h - 2*p_2^2*h^2 - 2*p_1*p_3*h^2 + 4*p_4*h^3)/h^4
</code></pre>
https://ask.sagemath.org/question/61137/jack-symmetric-function-and-expansion-in-power-symmetric-basis/?comment=61176#post-id-61176Thanks a lot, I think you meant P(Zonal([2,1,1]) it for zonal polynomial.Fri, 18 Feb 2022 07:41:36 +0100https://ask.sagemath.org/question/61137/jack-symmetric-function-and-expansion-in-power-symmetric-basis/?comment=61176#post-id-61176