Monomial symmetric functions¶
-
class
sage.combinat.sf.monomial.SymmetricFunctionAlgebra_monomial(Sym)¶ Bases:
sage.combinat.sf.classical.SymmetricFunctionAlgebra_classicalA class for methods related to monomial symmetric functions
INPUT:
self– a monomial symmetric function basisSym– an instance of the ring of the symmetric functions
-
class
Element¶ Bases:
sage.combinat.sf.classical.SymmetricFunctionAlgebra_classical.Element-
expand(n, alphabet='x')¶ Expand the symmetric function
selfas a symmetric polynomial innvariables.INPUT:
n– a nonnegative integeralphabet– (default:'x') a variable for the expansion
OUTPUT:
A monomial expansion of
selfin the \(n\) variables labelled byalphabet.EXAMPLES:
sage: m = SymmetricFunctions(QQ).m() 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 sage: m([1]).expand(0) 0 sage: (3*m([])).expand(0) 3
-
-
antipode_by_coercion(element)¶ The antipode of
elementvia coercion to and from the power-sum basis or the Schur basis (depending on whether the power sums really form a basis over the given ground ring).INPUT:
element– element in a basis of the ring of symmetric functions
EXAMPLES:
sage: Sym = SymmetricFunctions(QQ) sage: m = Sym.monomial() sage: m[3,2].antipode() m[3, 2] + 2*m[5] sage: m.antipode_by_coercion(m[3,2]) m[3, 2] + 2*m[5] sage: Sym = SymmetricFunctions(ZZ) sage: m = Sym.monomial() sage: m[3,2].antipode() m[3, 2] + 2*m[5] sage: m.antipode_by_coercion(m[3,2]) m[3, 2] + 2*m[5]
Todo
Is there a not too difficult way to get the power-sum computations to work over any ring, not just one with coercion from \(\QQ\)?
-
from_polynomial(f, check=True)¶ Returns the symmetric function in the monomial basis corresponding to the polynomial
f.INPUT:
self– a monomial symmetric function basisf– a polynomial in finitely many variables over the same base ring asself. It is assumed that this polynomial is symmetric.check– boolean (default:True), checks whether the polynomial is indeed symmetric
OUTPUT:
- 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: 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]
-
from_polynomial_exp(p)¶ Conversion from polynomial in exponential notation
INPUT:
self– a monomial symmetric function basisp– a multivariate polynomial over the same base ring asself
OUTPUT:
- This returns a symmetric function by mapping each monomial of
\(p\) with exponents
expinto \(m_\lambda\) where \(\lambda\) is the partition with exponential notationexp.
EXAMPLES:
sage: m = SymmetricFunctions(QQ).m() sage: P = PolynomialRing(QQ,'x',5) sage: x = P.gens()
The exponential notation of the partition \((5,5,5,3,1,1)\) 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