Monomial symmetric functions

class sage.combinat.sf.monomial.SymmetricFunctionAlgebra_monomial(R)

Bases: sage.combinat.sf.classical.SymmetricFunctionAlgebra_classical

class Element(M, x)

Bases: sage.combinat.sf.classical.SymmetricFunctionAlgebra_classical.Element

expand(n, alphabet='x')

Expands the symmetric function as a symmetric polynomial in n variables.

EXAMPLES:

sage: m = SFAMonomial(QQ)
sage: m([2,1]).expand(3)
x0^2*x1 + x0*x1^2 + x0^2*x2 + x1^2*x2 + x0*x2^2 + x1*x2^2
sage: m([1,1,1]).expand(2)
0
sage: m([2,1]).expand(3,alphabet='z')
z0^2*z1 + z0*z1^2 + z0^2*z2 + z1^2*z2 + z0*z2^2 + z1*z2^2
sage: m([2,1]).expand(3,alphabet='x,y,z')
x^2*y + x*y^2 + x^2*z + y^2*z + x*z^2 + y*z^2
SymmetricFunctionAlgebra_monomial.dual_basis(scalar=None, scalar_name='', prefix=None)

The dual basis of the monomial basis with respect to the standard scalar product is the homogeneous basis.

EXAMPLES:

sage: m = SFAMonomial(QQ)
sage: h = SFAHomogeneous(QQ)
sage: m.dual_basis() == h
True
SymmetricFunctionAlgebra_monomial.from_polynomial(f, check=True)

This function converts a symmetric polynomial f in a polynomial ring in finitely many variables to a symmetric function in the monomial basis of the ring of symmetric functions over the same base ring.

EXAMPLES:

sage: P = PolynomialRing(QQ, 'x', 3)
sage: x = P.gens()
sage: f = x[0] + x[1] + x[2]
sage: m = SFAMonomial(QQ)
sage: m.from_polynomial(f)
m[1]
sage: f = x[0]**2+x[1]**2+x[2]**2
sage: m.from_polynomial(f)
m[2]
sage: f=x[0]^2+x[1]
sage: m.from_polynomial(f)
...
ValueError: x0^2 + x1 is not a symmetric polynomial
sage: f = (m[2,1]+m[1,1]).expand(3)
sage: m.from_polynomial(f)
m[1, 1] + m[2, 1]
sage: f = (2*m[2,1]+m[1,1]+3*m[3]).expand(3)
sage: m.from_polynomial(f)
m[1, 1] + 2*m[2, 1] + 3*m[3]

Previous topic

Schur symmetric functions

Next topic

Multiplicative symmetric functions

This Page