# Revision history [back]

This is a bit more subtle. Here is a way.

sage: P.<x,y>=PolynomialRing(QQ['a','b'])
sage: BR = P.base_ring()
sage: S1 = SymmetricFunctions(QQ)
sage: S2 = SymmetricFunctions(BR)
sage: a,b = BR.gens()
sage: f = x+y+a+b
sage: step1 = S2.from_polynomial(f);step1
(a+b)*m[] + m
sage: sum(S1.m()(i).tensor(S1.from_polynomial(c)) for i,c in step1)
m[] # m + m # m[]


The key point to understand is that you need to explain sage in what you answer lives. Here it is the tensor product of symmetric functions with themselves.

This is a bit more subtle. Here is a way.

sage: P.<x,y>=PolynomialRing(QQ['a','b'])
sage: BR = P.base_ring()
sage: S1 = SymmetricFunctions(QQ)
sage: S2 = SymmetricFunctions(BR)
sage: a,b = BR.gens()
sage: f = x+y+a+b
sage: step1 = S2.from_polynomial(f);step1
(a+b)*m[] + m
sage: sum(S1.m()(i).tensor(S1.from_polynomial(c)) for i,c in step1)
m[] # m + m # m[]


The key point to understand is that you need to explain sage in what you your answer lives. Here it is the tensor product of symmetric functions with themselves.

This is a bit more subtle. Here is a way.

sage: P.<x,y>=PolynomialRing(QQ['a','b'])
sage: BR = P.base_ring()
sage: S1 = SymmetricFunctions(QQ)
SymmetricFunctions(QQ).e()
sage: S2 = SymmetricFunctions(BR)
SymmetricFunctions(BR).e()
sage: a,b = BR.gens()
sage: f = x+y+a+b
sage: step1 = S2.from_polynomial(f);step1
(a+b)*m[] (a+b)*e[] + m
e
sage: sum(S1.m()(i).tensor(S1.from_polynomial(c)) sum(S1(i).tensor(S1.from_polynomial(c)) for i,c i, c in step1)
m[] e[] # m e + m e # m[]
e[]


The key point to understand is that you need to explain sage in what your answer lives. Here it is the tensor product of symmetric functions with themselves.

EDIT: I have changed the answer above to use the elementary basis.