symmetric functions, unexpanded

45 views
Skip to first unread message

john_perry_usm

unread,
Jan 23, 2015, 5:12:18 PM1/23/15
to sage-s...@googlegroups.com
Hello!

In the manual (www.sagemath.org/doc/reference/combinat/sage/combinat/sf/monomial.html) there is a nice example of enumerating and expanding symmetric functions in terms of x's.

Is there a way to write the monomial symmetric functions in terms of the elementary symmetric polynomials, without the expansion? i.e., I want m(4,2,1) in terms of e1=x1+x2+x3, e2=x1*x2+x1*x3+x2*x3, etc. not in terms of the xi themselves. So m(4,2,1)=e3*(e1^2*e2 - 2*e2^2 - e1*e3).

regards
john perry

R. Andrew Ohana

unread,
Jan 23, 2015, 5:31:59 PM1/23/15
to sage-support
Try the following:

sage: e = SymmetricFunctions(QQ).e() # construct the symmetric functions with the e basis
sage: m = SymmetricFunctions(QQ).m() # ditto but with the monomial basis
sage: m421 = m[4, 2, 1] # create the monomial you care about
sage: e(m421) # coerce the monomial into the ring with the e basis
e[3, 2, 1, 1] - 2*e[3, 2, 2] ...


regards
john perry

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To post to this group, send email to sage-s...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.



--
Andrew

john_perry_usm

unread,
Jan 23, 2015, 11:13:52 PM1/23/15
to sage-s...@googlegroups.com

Try the following:

sage: e = SymmetricFunctions(QQ).e() # construct the symmetric functions with the e basis
sage: m = SymmetricFunctions(QQ).m() # ditto but with the monomial basis
sage: m421 = m[4, 2, 1] # create the monomial you care about
sage: e(m421) # coerce the monomial into the ring with the e basis
e[3, 2, 1, 1] - 2*e[3, 2, 2] ...

That's not obviously the same as the result I specified. I left out that I know the number of variables I have available; in the example above, I have three variables, so I'm looking specifically for e1=x1+x2+x3, etc. I don't see how I get that from the expression e[3,2,1,1] - 2*e[3,2,2] ...

I'm quite new to this topic, hence my lack of clarity. Sorry about this.

john perry

Dima Pasechnik

unread,
Jan 24, 2015, 9:05:30 AM1/24/15
to sage-s...@googlegroups.com
You can do e[3,2,1,1].expand(3) to get it expanded in x0, x1, and x2.
(more generally, x[i1,i2,...,im].expand(k) will give the expansion in
x0,x1,...,x(k-1).

Dima

john_perry_usm

unread,
Jan 24, 2015, 12:52:25 PM1/24/15
to sage-s...@googlegroups.com

You can do e[3,2,1,1].expand(3) to get it expanded in x0, x1, and x2.
(more generally, x[i1,i2,...,im].expand(k) will give the expansion in
x0,x1,...,x(k-1).

I *don't* want it in the x's, though; I want it the e's. I wrote e1=x1+x2+x3 merely to illustrate what I meant by e1.  Look back at my original example; I already know that, in three variables, m[4,2,1] corresponds to e3*(e1^2*e2 - 2*e2^2 - e1*e3). I want *that* expansion in general, not the expansion into x's, nor the e[3,2,1,1]+..., which despite being in e's is obviously different from the expansion I refer to.

In my noggin I imagine that the algorithm has to go through the e's before it goes into x's. I guess I should look at the code to see.

john perry

R. Andrew Ohana

unread,
Jan 24, 2015, 3:54:22 PM1/24/15
to sage-support
On Fri, Jan 23, 2015 at 8:13 PM, john_perry_usm <john....@usm.edu> wrote:

Try the following:

sage: e = SymmetricFunctions(QQ).e() # construct the symmetric functions with the e basis
sage: m = SymmetricFunctions(QQ).m() # ditto but with the monomial basis
sage: m421 = m[4, 2, 1] # create the monomial you care about
sage: e(m421) # coerce the monomial into the ring with the e basis
e[3, 2, 1, 1] - 2*e[3, 2, 2] ...

That's not obviously the same as the result I specified.

Well, it is the result in when working with (countably) infinitely many variables. There is a standard map from these to symmetric polynomials in 3 variables (obtained by setting x_i = 0 for i > 3), however from what I can tell, the only way sage implements this is with the expand method -- which is not what you want.

In the case of the elementary symmetric polynomials basis (and only that basis), you can obtain the result that you are looking for by restricting the size of the parts to the number of variables you are working with. In sage this can be done with the following code (continuing from where I left off before):

sage: em421 = e(m421) # coerce the monomial into the e basis
sage: em421.restrict_parts(3) # restrict the size of the parts to at most 3
e[3, 2, 1, 1] - 2*e[3, 2, 2] - e[3, 3, 1]


This agrees with the result that you got by hand since e[a, b, c, ...] = e_a*e_b*e_c*...
 
I left out that I know the number of variables I have available; in the example above, I have three variables, so I'm looking specifically for e1=x1+x2+x3, etc. I don't see how I get that from the expression e[3,2,1,1] - 2*e[3,2,2] ...

I'm quite new to this topic, hence my lack of clarity. Sorry about this.

john perry

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To post to this group, send email to sage-s...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.



--
Andrew

Dima Pasechnik

unread,
Jan 24, 2015, 4:08:58 PM1/24/15
to sage-s...@googlegroups.com
On 2015-01-24, john_perry_usm <john....@usm.edu> wrote:
>
>
>> You can do e[3,2,1,1].expand(3) to get it expanded in x0, x1, and x2.
>> (more generally, x[i1,i2,...,im].expand(k) will give the expansion in
>> x0,x1,...,x(k-1).
>>
>
> I *don't* want it in the x's, though; I want it the e's. I wrote
> e1=x1+x2+x3 merely to illustrate what I meant by e1. Look back at my
> original example; I already know that, in three variables, m[4,2,1]
> corresponds to e3*(e1^2*e2 - 2*e2^2 - e1*e3). I want *that* expansion in



> general, not the expansion into x's, nor the e[3,2,1,1]+..., which despite
> being in e's is obviously different from the expansion I refer to.
no, it's not different; namely, e[a1,a2,...ak] is just e(a1)*e(a2)*e(a3)*e(ak).

e.g. in your case you get
m[4,2,1]=e3*(e1^2*e2 - 2*e2^2 - e1*e3)=e[3,2,1,1] - 2*e[3,2,2]-e[3,3,1].
(which is only valid if you restrict to the 3st 3 vars).

The different expansion you get in Sage
is due to the fact that whenever k1>3 then e[k1,...]=0.

Thus, no need to expand in x_i, you can just cut out all the e[]'s of this kind.
You can parse the expression using .terms(), and then take .support() of
each e[k1,k2,...].
E.g. e[4,1,1,1].support()[0] gives [4,1,1,1], and
E.g. e[4,1,1,1].support()[0][0] gives 4.
So you can filter these terms out. Perhaps there is a specail function
for this, I don't know, but anyhow it is easy to DIY.

HTH,
Dima

john_perry_usm

unread,
Jan 29, 2015, 6:52:08 PM1/29/15
to sage-s...@googlegroups.com
Gentlemen! I only returned to this today, but I get it now. Thanks! I'm not sure whom to mark as "best answer", though; both seem equally good.

john perry
Reply all
Reply to author
Forward
0 new messages