I thought I'd ask a variation of an earlier question that was unanswered.
I use:
P.<x,y>=PolynomialRing(QQ)
S=SymmetricFunctions(QQ)
S.inject_shorthands()
f=x+y
e(S.from_polynomial(f))
resulting in e[1]
(or x+y)
So that works, but when I try to do that for a polynomial with parameters, say
f=x+y+a+b
it complains that a
and b
are not defined. If I add them to the ring I get e[1]
, but I suspect this is equivalent now to x+y+a+b
(I didn't check because it should be e[1]+a+b
).
Do I need to keep the ring defined the same but define maybe S as;
S = SymmetricFunctions(QQ[x,y])
?
This causes the error claiming that the function is not a symmetric polynomial.