Ask Your Question

# Convert a symmetric function into a polynomial on elementary symmetric functions

The following is a variant of a previous question (32569). What command fills in the blank?

sage: e = SymmetricFunctions(QQ).e()
sage: u = e[3](e[2])
sage: u
e[3, 3] + e[4, 1, 1] - 2*e[4, 2] - e[5, 1] + e[6]
sage: R.<e1,e2,e3,e4,e5,e6> = PolynomialRing(QQ, 6)
sage: p = _the_blank_() # What command goes here?
sage: p
e1^2*e4 + e3^2 - 2*e2*e4 - e1*e5 + e6

edit retag close merge delete

## Comments

( 2018-07-26 22:40:24 +0200 )edit

Documentation and tutorials:

( 2018-07-26 22:40:54 +0200 )edit

## 1 Answer

Sort by ยป oldest newest most voted

You can access the parts of u (or iterate over them, in particular make a sum from them):

sage: list(u)
[([3, 3], 1), ([4, 1, 1], 1), ([4, 2], -2), ([5, 1], -1), ([6], 1)]


Each element is a pair ([partition], coefficient). For each partition, you want to susbtitute the integer i by the monomial ei and then multiply them (together with the coefficient). You can get the list (actually a tuple) of ei as follows:

sage: R.gens()
(e1, e2, e3, e4, e5, e6)


So that you can recover ei from i as follows (note the shift by 1):

sage: R.gens()[0]
e1
sage: R.gens()[1]
e2
sage: R.gens()[2]
e3


Mixing all those ingredients together, you get the following one-liner:

sage: sum(c*prod(R.gens()[i-1] for i in P) for P,c in u)
e1^2*e4 + e3^2 - 2*e2*e4 - e1*e5 + e6

more

## Your Answer

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

Add Answer

## Stats

Asked: 2016-05-12 01:22:07 +0200

Seen: 1,106 times

Last updated: May 12 '16