Bases: sage.combinat.sf.classical.SymmetricFunctionAlgebra_classical
Bases: sage.combinat.sf.classical.SymmetricFunctionAlgebra_classical.Element
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
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
Conversion from polynomial
This function converts a symmetric polynomial 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: m = SymmetricFunctions(QQ).m()
sage: P = PolynomialRing(QQ, 'x', 3)
sage: x = P.gens()
sage: f = x[0] + x[1] + x[2]
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)
Traceback (most recent call last):
...
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]
Conversion from polynomial in exponential notation
This returns a symmetric function by mapping each monomial of
with exponents exp into
where
is
the partition with exponential notation exp.
EXAMPLES:
sage: m = SymmetricFunctions(QQ).m()
sage: P = PolynomialRing(QQ,'x',5)
sage: x = P.gens()
The exponential notation of the partition is:
sage: Partition([5,5,5,3,1,1]).to_exp() [2, 0, 1, 0, 3]
Therefore, the monomial:
sage: f = x[0]^2 * x[2] * x[4]^3
is mapped to:
sage: m.from_polynomial_exp(f)
m[5, 5, 5, 3, 1, 1]
Furthermore, this function is linear:
sage: f = 3 * x[3] + 2 * x[0]^2 * x[2] * x[4]^3
sage: m.from_polynomial_exp(f)
3*m[4] + 2*m[5, 5, 5, 3, 1, 1]
See also: Partition(), Partition.to_exp()