Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I guess that's because f is a not a function but polynomial. Whether f is symmetric can be seen from whether its conversion to a symmetric function succeeds - like in the code below:

from sage.combinat.sf.sfa import is_SymmetricFunction
R.<x1,x2,x3>=PolynomialRing(QQ,3); 
S = SymmetricFunctions(QQ)
s = S.schur();
f=s([2,1]).expand(3,'x1,x2,x3');
try:
    S.from_polynomial(f)
    print('f is symmetric')
except ValueError:
    print('f is not symmetric')

I guess that's because f is a not a function but polynomial. Whether f is symmetric can be seen from whether its conversion to a symmetric function succeeds - like in the code below:

from sage.combinat.sf.sfa import is_SymmetricFunction
R.<x1,x2,x3>=PolynomialRing(QQ,3); 
S = SymmetricFunctions(QQ)
s = S.schur();
f=s([2,1]).expand(3,'x1,x2,x3');
try:
    S.from_polynomial(f)
    print('f is symmetric')
except ValueError:
    print('f is not symmetric')