Symmetric Functions

We define the algebra of symmetric functions in the Schur and elementary bases:

sage: s = SymmetricFunctionAlgebra(QQ, basis='schur')
sage: e = SymmetricFunctionAlgebra(QQ, basis='elementary')

Each is actually is a graded hopf algebra whose basis is indexed by integer partitions:

sage: s.category()
Join of Category of graded hopf algebras with basis over Rational Field and Category of commutative rings
sage: s.basis().keys()
Partitions

Let us compute with some elements:

sage: f1 = s([2,1]); f1
s[2, 1]
sage: f2 = e(f1); f2
e[2, 1] - e[3]
sage: f1 == f2
True
sage: f1.expand(3, alphabet=['x','y','z'])
x^2*y + x*y^2 + x^2*z + 2*x*y*z + y^2*z + x*z^2 + y*z^2
sage: f2.expand(3, alphabet=['x','y','z'])
x^2*y + x*y^2 + x^2*z + 2*x*y*z + y^2*z + x*z^2 + y*z^2
sage: m = SFAMonomial(QQ)
sage: m([3,1])
m[3, 1]
sage: m(4)
4*m[]
sage: m([4])
m[4]
sage: 3*m([3,1])-1/2*m([4])
3*m[3, 1] - 1/2*m[4]

Code needs to be added to coerce symmetric polynomials into symmetric functions:

sage: p = SFAPower(QQ)
sage: m = p(3)
sage: m
3*p[]
sage: m.parent()
Symmetric Function Algebra over Rational Field, Power symmetric functions as basis
sage: m + p([3,2])
3*p[] + p[3, 2]
sage: s = SFASchur(QQ)
sage: h = SFAHomogeneous(QQ)
sage: P = SFAPower(QQ)
sage: e = SFAElementary(QQ)
sage: m = SFAMonomial(QQ)
sage: a = s([3,1])
sage: s(a)
s[3, 1]
sage: h(a)
h[3, 1] - h[4]
sage: p(a)
1/8*p[1, 1, 1, 1] + 1/4*p[2, 1, 1] - 1/8*p[2, 2] - 1/4*p[4]
sage: e(a)
e[2, 1, 1] - e[2, 2] - e[3, 1] + e[4]
sage: m(a)
3*m[1, 1, 1, 1] + 2*m[2, 1, 1] + m[2, 2] + m[3, 1]
sage: a.expand(4)
x0^3*x1 + x0^2*x1^2 + x0*x1^3 + x0^3*x2 + 2*x0^2*x1*x2 + 2*x0*x1^2*x2 + x1^3*x2 + x0^2*x2^2 + 2*x0*x1*x2^2 + x1^2*x2^2 + x0*x2^3 + x1*x2^3 + x0^3*x3 + 2*x0^2*x1*x3 + 2*x0*x1^2*x3 + x1^3*x3 + 2*x0^2*x2*x3 + 3*x0*x1*x2*x3 + 2*x1^2*x2*x3 + 2*x0*x2^2*x3 + 2*x1*x2^2*x3 + x2^3*x3 + x0^2*x3^2 + 2*x0*x1*x3^2 + x1^2*x3^2 + 2*x0*x2*x3^2 + 2*x1*x2*x3^2 + x2^2*x3^2 + x0*x3^3 + x1*x3^3 + x2*x3^3
sage: h(m([1]))
h[1]
sage: h( m([2]) +m([1,1]) )
h[2]
sage: h( m([3]) + m([2,1]) + m([1,1,1]) )
h[3]
sage: h( m([4]) + m([3,1]) + m([2,2]) + m([2,1,1]) + m([1,1,1,1]) )
h[4]
sage: k = 5
sage: h( sum([ m(part) for part in Partitions(k)]) )
h[5]
sage: k = 10
sage: h( sum([ m(part) for part in Partitions(k)]) )
h[10]
sage: P3 = Partitions(3)
sage: P3.list()
[[3], [2, 1], [1, 1, 1]]
sage: m = SFAMonomial(QQ)
sage: f = sum([m(p) for p in P3])
sage: m.get_print_style()
'lex'
sage: f
m[1, 1, 1] + m[2, 1] + m[3]
sage: m.set_print_style('length')
sage: f
m[3] + m[2, 1] + m[1, 1, 1]
sage: m.set_print_style('maximal_part')
sage: f
m[1, 1, 1] + m[2, 1] + m[3]
sage: m.set_print_style('lex')
sage: s = SFASchur(QQ)
sage: m = SFAMonomial(QQ)
sage: m([3])*s([2,1])
2*m[3, 1, 1, 1] + m[3, 2, 1] + 2*m[4, 1, 1] + m[4, 2] + m[5, 1]
sage: s(m([3])*s([2,1]))
s[2, 1, 1, 1, 1] - s[2, 2, 2] - s[3, 3] + s[5, 1]
sage: s(s([2,1])*m([3]))
s[2, 1, 1, 1, 1] - s[2, 2, 2] - s[3, 3] + s[5, 1]
sage: e = SFAElementary(QQ)
sage: e([4])*e([3])*e([1])
e[4, 3, 1]
sage: s = SFASchur(QQ)
sage: z = s([2,1]) + s([1,1,1])
sage: z.coefficient([2,1])
1
sage: z.length()
2
sage: z.support()
[[1, 1, 1], [2, 1]]
sage: z.degree()
3

RECENT BACKWARD INCOMPATIBLE CHANGES:

The symmetric functions code has been (partially) refactored to take advantate of the coercion systems. This introduced a couple glitches:

  • On some bases changes, coefficients in Jack polynomials are not normalized

  • Except in a few cases, conversions and coercions are only defined between symmetric functions over the same coefficient ring. E.g. the following does not work anymore:

    sage: s = SFASchur(QQ) sage: s2 = SFASchur(QQ[‘t’]) sage: s([1]) + s([2]) # todo: not implemented

    This feature will probably come back at some point through improvements to the Sage coercion system.

There is some large scale refactoring to come. See SymmetricFunctions for a preview.

Backward compatibility should be essentially retained.

AUTHORS:

  • Mike Hansen (2007-06-15)
  • Nicolas M. Thiery (partial refactoring)
sage.combinat.sf.sfa.SFAElementary(R)

Returns the symmetric function algebra over R with the elementary symmetric functions as the basis.

EXAMPLES:

sage: SFAElementary(QQ)
Symmetric Function Algebra over Rational Field, Elementary symmetric functions as basis
sage.combinat.sf.sfa.SFAHomogeneous(R)

Returns the symmetric function algebra over R with the Homogeneous symmetric functions as the basis.

EXAMPLES:

sage: SFAHomogeneous(QQ)
Symmetric Function Algebra over Rational Field, Homogeneous symmetric functions as basis
sage.combinat.sf.sfa.SFAMonomial(R)

Returns the symmetric function algebra over R with the monomial symmetric functions as the basis.

EXAMPLES:

sage: SFAMonomial(QQ)
Symmetric Function Algebra over Rational Field, Monomial symmetric functions as basis
sage.combinat.sf.sfa.SFAPower(R)

Returns the symmetric function algebra over R with the power-sum symmetric functions as the basis.

EXAMPLES:

sage: SFAPower(QQ)
Symmetric Function Algebra over Rational Field, Power symmetric functions as basis
sage.combinat.sf.sfa.SFASchur(R)

Returns the symmetric function algebra over R with the Schur symmetric functions as the basis.

EXAMPLES:

sage: SFASchur(QQ)
Symmetric Function Algebra over Rational Field, Schur symmetric functions as basis
sage.combinat.sf.sfa.SymmetricFunctionAlgebra(R, basis='schur')

Return the free algebra over the ring R on n generators with given names.

INPUT:

  • R - ring with identity basis

OUTPUT: A SymmetricFunctionAlgebra

EXAMPLES:

sage: SymmetricFunctionAlgebra(QQ)
Symmetric Function Algebra over Rational Field, Schur symmetric functions as basis
sage: SymmetricFunctionAlgebra(QQ, basis='m')
Symmetric Function Algebra over Rational Field, Monomial symmetric functions as basis
sage: SymmetricFunctionAlgebra(QQ, basis='power')
Symmetric Function Algebra over Rational Field, Power symmetric functions as basis
class sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic(R, basis_name=None, prefix=None)

Bases: sage.combinat.free_module.CombinatorialFreeModule

TESTS:

sage: s = SFASchur(QQ)
sage: m = SFAMonomial(ZZ)
sage: s(m([2,1]))
-2*s[1, 1, 1] + s[2, 1]
Element
alias of SymmetricFunctionAlgebra_generic_Element
an_element()

Returns a typical element of this algebra

EXAMPLES:

sage: SymmetricFunctions(QQ).s().an_element()
1/2*s[] + 3*s[1, 1, 1] + 2*s[2, 1, 1]
basis_name()

Returns the name of the basis of self.

EXAMPLES:

sage: s = SFASchur(QQ)
sage: s.basis_name()
'schur'
sage: p = SFAPower(QQ)
sage: p.basis_name()
'power'
sage: h = SFAHomogeneous(QQ)
sage: h.basis_name()
'homogeneous'
sage: e = SFAElementary(QQ)
sage: e.basis_name()
'elementary'
sage: m = SFAMonomial(QQ)
sage: m.basis_name()
'monomial'
dual_basis(scalar=None, scalar_name='', prefix=None)

Returns the dual basis of self with respect to the scalar product scalar. If scalar is None, then the standard (Hall) scalar product is used.

EXAMPLES: The duals of the elementary symmetric functions with respect to the Hall scalar product are the forgotten symmetric functions.

sage: e = SFAElementary(QQ)
sage: f = e.dual_basis(prefix='f'); f
Dual basis to Symmetric Function Algebra over Rational Field, Elementary symmetric functions as basis with respect to the Hall scalar product
sage: f([2,1])^2
4*f[2, 2, 1, 1] + 6*f[2, 2, 2] + 2*f[3, 2, 1] + 2*f[3, 3] + 2*f[4, 1, 1] + f[4, 2]
sage: f([2,1]).scalar(e([2,1]))
1
sage: f([2,1]).scalar(e([1,1,1]))
0

Since the power-sum symmetric functions are orthogonal, their duals with respect to the Hall scalar product are scalar multiples of themselves.

sage: p = SFAPower(QQ)
sage: q = p.dual_basis(prefix='q'); q
Dual basis to Symmetric Function Algebra over Rational Field, Power symmetric functions as basis with respect to the Hall scalar product
sage: q([2,1])^2
4*q[2, 2, 1, 1]
sage: p([2,1]).scalar(q([2,1]))
1
sage: p([2,1]).scalar(q([1,1,1]))
0
get_print_style()

Returns the value of the current print style for self.

EXAMPLES:

sage: s = SFASchur(QQ)
sage: s.get_print_style()
'lex'
sage: s.set_print_style('length')
sage: s.get_print_style()
'length'
sage: s.set_print_style('lex')
one_basis(*args, **kwds)

Returns the empty partition, as per AlgebrasWithBasis.ParentMethods.one_basis

EXAMPLES:

sage: SymmetricFunctions(QQ).s().one_basis()
[]

TESTS:

sage: SymmetricFunctions(QQ).s().one_basis() == Partition([])
True
prefix()

Returns the prefix on the elements of self.

EXAMPLES:

sage: schur = SFASchur(QQ)
sage: schur([3,2,1])
s[3, 2, 1]
sage: schur.prefix()
's'
set_print_style(ps)

Set the value of the current print style to ps.

EXAMPLES:

sage: s = SFASchur(QQ)
sage: s.get_print_style()
'lex'
sage: s.set_print_style('length')
sage: s.get_print_style()
'length'
sage: s.set_print_style('lex')
transition_matrix(basis, n)

Returns the transitions matrix between self and basis for the homogenous component of degree n.

EXAMPLES:

sage: s = SFASchur(QQ)
sage: m = SFAMonomial(QQ)
sage: s.transition_matrix(m,5)
[1 1 1 1 1 1 1]
[0 1 1 2 2 3 4]
[0 0 1 1 2 3 5]
[0 0 0 1 1 3 6]
[0 0 0 0 1 2 5]
[0 0 0 0 0 1 4]
[0 0 0 0 0 0 1]
sage: p = SFAPower(QQ)
sage: s.transition_matrix(p, 4)
[ 1/4  1/3  1/8  1/4 1/24]
[-1/4    0 -1/8  1/4  1/8]
[   0 -1/3  1/4    0 1/12]
[ 1/4    0 -1/8 -1/4  1/8]
[-1/4  1/3  1/8 -1/4 1/24]
sage: StoP = s.transition_matrix(p,4)
sage: a = s([3,1])+5*s([1,1,1,1])-s([4])
sage: a
5*s[1, 1, 1, 1] + s[3, 1] - s[4]
sage: mon = a.support()
sage: coeffs = a.coefficients()
sage: coeffs
[5, 1, -1]
sage: mon
[[1, 1, 1, 1], [3, 1], [4]]
sage: cm = matrix([[-1,1,0,0,5]])
sage: cm * StoP
[-7/4  4/3  3/8 -5/4 7/24]
sage: p(a)
7/24*p[1, 1, 1, 1] - 5/4*p[2, 1, 1] + 3/8*p[2, 2] + 4/3*p[3, 1] - 7/4*p[4]
sage: h = SFAHomogeneous(QQ)
sage: e = SFAElementary(QQ)
sage: s.transition_matrix(m,7) == h.transition_matrix(s,7).transpose()
True
sage: h.transition_matrix(m, 7) == h.transition_matrix(m, 7).transpose()
True
sage: h.transition_matrix(e, 7) == e.transition_matrix(h, 7)
True
sage: p.transition_matrix(s, 5)
[ 1 -1  0  1  0 -1  1]
[ 1  0 -1  0  1  0 -1]
[ 1 -1  1  0 -1  1 -1]
[ 1  1 -1  0 -1  1  1]
[ 1  0  1 -2  1  0  1]
[ 1  2  1  0 -1 -2 -1]
[ 1  4  5  6  5  4  1]
sage: e.transition_matrix(m,7) == e.transition_matrix(m,7).transpose()
True
class sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element(M, x)

Bases: sage.combinat.free_module.CombinatorialFreeModuleElement

degree()

EXAMPLES:

sage: s = SFASchur(QQ)
sage: z = s([4]) + s([2,1]) + s([1,1,1]) + s([1]) + 3
sage: z.degree()
4
derivative_with_respect_to_p1(n=1)

Returns the symmetric function obtained by taking the derivative of self with respect to the power-sum symmetric function p([1]) when the expansion of self in the power-sum basis is considered as a polynomial in p([1])’s.

EXAMPLES:

sage: p = SFAPower(QQ)
sage: a = p([1,1,1])
sage: a.derivative_with_respect_to_p1()
3*p[1, 1]
sage: a.derivative_with_respect_to_p1(1)
3*p[1, 1]
sage: a.derivative_with_respect_to_p1(2)
6*p[1]
sage: a.derivative_with_respect_to_p1(3)
6*p[]
sage: s = SFASchur(QQ)
sage: s([3]).derivative_with_respect_to_p1()
s[2]
sage: s([2,1]).derivative_with_respect_to_p1()
s[1, 1] + s[2]
sage: s([1,1,1]).derivative_with_respect_to_p1()
s[1, 1]
expand(n, alphabet='x')

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

EXAMPLES:

sage: J =JackPolynomialsJ(QQ, t=2)
sage: J([2,1]).expand(3)
4*x0^2*x1 + 4*x0*x1^2 + 4*x0^2*x2 + 6*x0*x1*x2 + 4*x1^2*x2 + 4*x0*x2^2 + 4*x1*x2^2
hl_creation_operator(nu)

This is the vertex operator that generalizes Jing’s operator.

It is a linear operator that raises the degree by sum(nu). This creation operator is a t-analogue of multiplication by s(nu)

See: Hall-Littlewood Vertex Operators and Kostka Polynomials, Shimizono-Zabrocki, Proposition 5.

INPUT:

  • nu - a partition

EXAMPLES:

sage: s = SFASchur(QQ['t'])
sage: s([2]).hl_creation_operator([3,2])
s[3, 2, 2] + t*s[3, 3, 1] + t*s[4, 2, 1] + t^2*s[4, 3] + t^2*s[5, 2]

sage: HLQp = HallLittlewoodQp(QQ)
sage: s = SFASchur(HLQp.base_ring()) # This makes sure that s and HLQp are over the same base ring
sage: HLQp(s([2]).hl_creation_operator([2]).hl_creation_operator([3]))
Qp[3, 2, 2]
sage: s([2,2]).hl_creation_operator([2,1])
t*s[2, 2, 2, 1] + t^2*s[3, 2, 1, 1] + t^2*s[3, 2, 2] + t^3*s[3, 3, 1] + t^3*s[4, 2, 1] + t^4*s[4, 3]
sage: s(1).hl_creation_operator([2,1,1])
s[2, 1, 1]
sage: s(0).hl_creation_operator([2,1,1])
0
sage: s([3,2]).hl_creation_operator([2,1,1])
(t^2-t)*s[2, 2, 2, 2, 1] + t^3*s[3, 2, 2, 1, 1] + (t^3-t^2)*s[3, 2, 2, 2] + t^3*s[3, 3, 1, 1, 1] + t^4*s[3, 3, 2, 1] + t^3*s[4, 2, 1, 1, 1] + t^4*s[4, 2, 2, 1] + 2*t^4*s[4, 3, 1, 1] + t^5*s[4, 3, 2] + t^5*s[4, 4, 1] + t^4*s[5, 2, 1, 1] + t^5*s[5, 3, 1]
inner_plethysm(x)

Returns the inner plethysm of self with x.

The result of f.inner_plethysm(g) is linear in f and linear in ‘homogeneous pieces’ of g. So, to describe this function, we assume without loss that f is some Schur function s(la) and g is a homogeneous symmetric function of degree n. The function g can be thought of as the character of an irreducible representation, rho, of the symmetric group S_n. Let N be the dimension of this representation. If the number of parts of la is greater then N, then f.inner_plethysm(g) = 0 by definition. Otherwise, we can interpret f as the character of an irreducible GL_N representation, call it \sigma. Now \sigma \circ \rho is an S_n representation and, by definition, the character of this representation is f.inner_plethysm(g).

REFERENCES:

  • King, R. ‘Branching rules for GL_m \supset \Sigma_n and the evaluation of inner plethysms.’ J. Math. Phys. 15, 258 (1974)

EXAMPLES:

sage: s = SFASchur(QQ)
sage: p = SFAPower(QQ)
sage: h = SFAHomogeneous(QQ)
sage: s([2,1]).inner_plethysm(s([1,1,1]))
0
sage: h([2]).inner_plethysm(s([2,1]))
h[2, 1]
sage: s(_)
s[2, 1] + s[3]
sage: f = s([2,1]) + 2*s([3,1])
sage: f.itensor(f)
s[1, 1, 1] + s[2, 1] + 4*s[2, 1, 1] + 4*s[2, 2] + s[3] + 4*s[3, 1] + 4*s[4]
sage: s( h([1,1]).inner_plethysm(f) )
s[1, 1, 1] + s[2, 1] + 4*s[2, 1, 1] + 4*s[2, 2] + s[3] + 4*s[3, 1] + 4*s[4]
sage: s([]).inner_plethysm(s([1,1]) + 2*s([2,1])+s([3]))
s[2] + s[3]
sage: [s([]).inner_plethysm(s(p)) for p in Partitions(4)]
[s[4], s[4], s[4], s[4], s[4]]
inner_tensor(x)

Returns the inner tensor product of self and x in the basis of self.

EXAMPLES:

sage: s = SFASchur(QQ)
sage: a = s([2,1])
sage: b = s([3])
sage: a.itensor(b)
s[2, 1]
sage: c = s([3,2,1])
sage: c.itensor(c)
s[1, 1, 1, 1, 1, 1] + 2*s[2, 1, 1, 1, 1] + 3*s[2, 2, 1, 1] + 2*s[2, 2, 2] + 4*s[3, 1, 1, 1] + 5*s[3, 2, 1] + 2*s[3, 3] + 4*s[4, 1, 1] + 3*s[4, 2] + 2*s[5, 1] + s[6]

TESTS:

sage: s = SFASchur(QQ)
sage: a = s([8,8])
sage: a.itensor(a) #long
s[4, 4, 4, 4] + s[5, 5, 3, 3] + s[5, 5, 5, 1] + s[6, 4, 4, 2] + s[6, 6, 2, 2] + s[6, 6, 4] + s[7, 3, 3, 3] + s[7, 5, 3, 1] + s[7, 7, 1, 1] + s[8, 4, 2, 2] + s[8, 4, 4] + s[8, 6, 2] + s[8, 8] + s[9, 3, 3, 1] + s[9, 5, 1, 1] + s[10, 2, 2, 2] + s[10, 4, 2] + s[10, 6] + s[11, 3, 1, 1] + s[12, 2, 2] + s[12, 4] + s[13, 1, 1, 1] + s[14, 2] + s[16]
internal_product(x)

Returns the inner tensor product of self and x in the basis of self.

EXAMPLES:

sage: s = SFASchur(QQ)
sage: a = s([2,1])
sage: b = s([3])
sage: a.itensor(b)
s[2, 1]
sage: c = s([3,2,1])
sage: c.itensor(c)
s[1, 1, 1, 1, 1, 1] + 2*s[2, 1, 1, 1, 1] + 3*s[2, 2, 1, 1] + 2*s[2, 2, 2] + 4*s[3, 1, 1, 1] + 5*s[3, 2, 1] + 2*s[3, 3] + 4*s[4, 1, 1] + 3*s[4, 2] + 2*s[5, 1] + s[6]

TESTS:

sage: s = SFASchur(QQ)
sage: a = s([8,8])
sage: a.itensor(a) #long
s[4, 4, 4, 4] + s[5, 5, 3, 3] + s[5, 5, 5, 1] + s[6, 4, 4, 2] + s[6, 6, 2, 2] + s[6, 6, 4] + s[7, 3, 3, 3] + s[7, 5, 3, 1] + s[7, 7, 1, 1] + s[8, 4, 2, 2] + s[8, 4, 4] + s[8, 6, 2] + s[8, 8] + s[9, 3, 3, 1] + s[9, 5, 1, 1] + s[10, 2, 2, 2] + s[10, 4, 2] + s[10, 6] + s[11, 3, 1, 1] + s[12, 2, 2] + s[12, 4] + s[13, 1, 1, 1] + s[14, 2] + s[16]
is_schur_positive()

Returns True if and only if self is Schur positive. If s is the space of Schur functions over self’s base ring, then this is the same as self._is_positive(s).

EXAMPLES:

sage: s = SFASchur(QQ)
sage: a = s([2,1]) + s([3])
sage: a.is_schur_positive()
True
sage: a = s([2,1]) - s([3])
sage: a.is_schur_positive()
False
sage: QQx = QQ['x']
sage: s = SFASchur(QQx)
sage: x = QQx.gen()
sage: a = (1+x)*s([2,1])
sage: a.is_schur_positive()
True
sage: a = (1-x)*s([2,1])
sage: a.is_schur_positive()
False
itensor(x)

Returns the inner tensor product of self and x in the basis of self.

EXAMPLES:

sage: s = SFASchur(QQ)
sage: a = s([2,1])
sage: b = s([3])
sage: a.itensor(b)
s[2, 1]
sage: c = s([3,2,1])
sage: c.itensor(c)
s[1, 1, 1, 1, 1, 1] + 2*s[2, 1, 1, 1, 1] + 3*s[2, 2, 1, 1] + 2*s[2, 2, 2] + 4*s[3, 1, 1, 1] + 5*s[3, 2, 1] + 2*s[3, 3] + 4*s[4, 1, 1] + 3*s[4, 2] + 2*s[5, 1] + s[6]

TESTS:

sage: s = SFASchur(QQ)
sage: a = s([8,8])
sage: a.itensor(a) #long
s[4, 4, 4, 4] + s[5, 5, 3, 3] + s[5, 5, 5, 1] + s[6, 4, 4, 2] + s[6, 6, 2, 2] + s[6, 6, 4] + s[7, 3, 3, 3] + s[7, 5, 3, 1] + s[7, 7, 1, 1] + s[8, 4, 2, 2] + s[8, 4, 4] + s[8, 6, 2] + s[8, 8] + s[9, 3, 3, 1] + s[9, 5, 1, 1] + s[10, 2, 2, 2] + s[10, 4, 2] + s[10, 6] + s[11, 3, 1, 1] + s[12, 2, 2] + s[12, 4] + s[13, 1, 1, 1] + s[14, 2] + s[16]
kronecker_product(x)

Returns the inner tensor product of self and x in the basis of self.

EXAMPLES:

sage: s = SFASchur(QQ)
sage: a = s([2,1])
sage: b = s([3])
sage: a.itensor(b)
s[2, 1]
sage: c = s([3,2,1])
sage: c.itensor(c)
s[1, 1, 1, 1, 1, 1] + 2*s[2, 1, 1, 1, 1] + 3*s[2, 2, 1, 1] + 2*s[2, 2, 2] + 4*s[3, 1, 1, 1] + 5*s[3, 2, 1] + 2*s[3, 3] + 4*s[4, 1, 1] + 3*s[4, 2] + 2*s[5, 1] + s[6]

TESTS:

sage: s = SFASchur(QQ)
sage: a = s([8,8])
sage: a.itensor(a) #long
s[4, 4, 4, 4] + s[5, 5, 3, 3] + s[5, 5, 5, 1] + s[6, 4, 4, 2] + s[6, 6, 2, 2] + s[6, 6, 4] + s[7, 3, 3, 3] + s[7, 5, 3, 1] + s[7, 7, 1, 1] + s[8, 4, 2, 2] + s[8, 4, 4] + s[8, 6, 2] + s[8, 8] + s[9, 3, 3, 1] + s[9, 5, 1, 1] + s[10, 2, 2, 2] + s[10, 4, 2] + s[10, 6] + s[11, 3, 1, 1] + s[12, 2, 2] + s[12, 4] + s[13, 1, 1, 1] + s[14, 2] + s[16]
omega()

Returns the image of self under the Frobenius / omega automorphism. The default implementation converts to the Schurs performs the automorphism and changes back.

EXAMPLES:

sage: J = JackPolynomialsP(QQ,1)
sage: a = J([2,1]) + J([1,1,1])
sage: a.omega()
JackP[2, 1] + JackP[3]
plethysm(x, include=None, exclude=None)

Returns the outer plethysm of self with x.

By default, the degree one elements are the generators for the self’s base ring.

INPUT:

  • x - a symmetric function
  • include - a list of variables to be treated as degree one elements instead of the default degree one elements
  • exclude - a list of variables to be excluded from the default degree one elements

EXAMPLES:

sage: s = SFASchur(QQ)
sage: h = SFAHomogeneous(QQ)
sage: s ( h([3])( h([2]) ) )
s[2, 2, 2] + s[4, 2] + s[6]
sage: p = SFAPower(QQ)
sage: p([3])( s([2,1]) )
1/3*p[3, 3, 3] - 1/3*p[9]
sage: e = SFAElementary(QQ)
sage: e([3])( e([2]) )
e[3, 3] + e[4, 1, 1] - 2*e[4, 2] - e[5, 1] + e[6]
sage: R.<t> = QQ[]
sage: s = SFASchur(R);
sage: a = s([3])
sage: f = t*s([2])
sage: a(f)
t^3*s[2, 2, 2] + t^3*s[4, 2] + t^3*s[6]
sage: f(a)
t*s[4, 2] + t*s[6]
restrict_degree(d, exact=True)

EXAMPLES:

sage: s = SFASchur(QQ)
sage: z = s([4]) + s([2,1]) + s([1,1,1]) + s([1])
sage: z.restrict_degree(2)
0
sage: z.restrict_degree(1)
s[1]
sage: z.restrict_degree(3)
s[1, 1, 1] + s[2, 1]
sage: z.restrict_degree(3, exact=False)
s[1] + s[1, 1, 1] + s[2, 1]
restrict_partition_lengths(l, exact=True)

EXAMPLES:

sage: s = SFASchur(QQ)
sage: z = s([4]) + s([2,1]) + s([1,1,1]) + s([1])
sage: z.restrict_partition_lengths(2)
s[2, 1]
sage: z.restrict_partition_lengths(2, exact=False)
s[1] + s[2, 1] + s[4]
restrict_parts(n)

EXAMPLES:

sage: s = SFASchur(QQ)
sage: z = s([4]) + s([2,1]) + s([1,1,1]) + s([1])
sage: z.restrict_parts(2)
s[1] + s[1, 1, 1] + s[2, 1]
sage: z.restrict_parts(1)
s[1] + s[1, 1, 1]
scalar(x)

Returns standard scalar product between self and s.

This is the default implementation that converts both self and x into Schur functions and performs the scalar product that basis.

EXAMPLES:

sage: e = SFAElementary(QQ)
sage: h = SFAHomogeneous(QQ)
sage: m = SFAMonomial(QQ)
sage: p4 = Partitions(4)
sage: matrix([ [e(a).scalar(h(b)) for a in p4] for b in p4])
[ 0  0  0  0  1]
[ 0  0  0  1  4]
[ 0  0  1  2  6]
[ 0  1  2  5 12]
[ 1  4  6 12 24]
sage: matrix([ [h(a).scalar(e(b)) for a in p4] for b in p4])
[ 0  0  0  0  1]
[ 0  0  0  1  4]
[ 0  0  1  2  6]
[ 0  1  2  5 12]
[ 1  4  6 12 24]
sage: matrix([ [m(a).scalar(e(b)) for a in p4] for b in p4])
[-1  2  1 -3  1]
[ 0  1  0 -2  1]
[ 0  0  1 -2  1]
[ 0  0  0 -1  1]
[ 0  0  0  0  1]
sage: matrix([ [m(a).scalar(h(b)) for a in p4] for b in p4])
[1 0 0 0 0]
[0 1 0 0 0]
[0 0 1 0 0]
[0 0 0 1 0]
[0 0 0 0 1]
scalar_hl(x, t=None)

Returns the standard Hall-Littlewood scalar product of self and x.

EXAMPLES:

sage: s = SFASchur(QQ)
sage: a = s([2,1])
sage: sp = a.scalar_t(a); sp
(-t^2 - 1)/(t^5 - 2*t^4 + t^3 - t^2 + 2*t - 1)
sage: sp.parent()
Fraction Field of Univariate Polynomial Ring in t over Rational Field
scalar_t(x, t=None)

Returns the standard Hall-Littlewood scalar product of self and x.

EXAMPLES:

sage: s = SFASchur(QQ)
sage: a = s([2,1])
sage: sp = a.scalar_t(a); sp
(-t^2 - 1)/(t^5 - 2*t^4 + t^3 - t^2 + 2*t - 1)
sage: sp.parent()
Fraction Field of Univariate Polynomial Ring in t over Rational Field
skew_by(x)

Returns the element whose result is the dual to multiplication by x applied to self.

EXAMPLES:

sage: s = SFASchur(QQ)
sage: s([3,2]).skew_by(s([2]))
s[2, 1] + s[3]
sage: s([3,2]).skew_by(s([1,1,1]))
0
sage: s([3,2,1]).skew_by(s([2,1]))
s[1, 1, 1] + 2*s[2, 1] + s[3]
sage: p = SFAPower(QQ)
sage: p([4,3,3,2,2,1]).skew_by(p([2,1]))
4*p[4, 3, 3, 2]
sage: zee = sage.combinat.sf.sfa.zee
sage: zee([4,3,3,2,2,1])/zee([4,3,3,2])
4
theta(a)

Returns the image of self under the theta automorphism which sends p[k] to a*p[k].

EXAMPLES:

sage: s = SFASchur(QQ)
sage: s([2,1]).theta(2)
2*s[1, 1, 1] + 6*s[2, 1] + 2*s[3]
sage: p = SFAPower(QQ)
sage: p([2]).theta(2)
2*p[2]
theta_qt(q, t)

Returns the image of self under the theta automorphism which sends p[k] to (1-q^k)/(1-t^k)*p[k].

EXAMPLES:

sage: QQqt = QQ['q,t'].fraction_field()
sage: q,t = QQqt.gens()
sage: p = SFAPower(QQqt)
sage: p([2]).theta_qt(q,t)
((-q^2+1)/(-t^2+1))*p[2]
sage: p([2,1]).theta_qt(q,t)
((q^3-q^2-q+1)/(t^3-t^2-t+1))*p[2, 1]
sage.combinat.sf.sfa.is_SymmetricFunction(x)

Returns True if x is a symmetric function.

EXAMPLES:

sage: from sage.combinat.sf.sfa import is_SymmetricFunction
sage: s = SFASchur(QQ)
sage: is_SymmetricFunction(2)
False
sage: is_SymmetricFunction(s(2))
True
sage: is_SymmetricFunction(s([2,1]))
True
sage.combinat.sf.sfa.is_SymmetricFunctionAlgebra(x)

Return True if x is a symmetric function algebra; otherwise, return False.

EXAMPLES:

sage: sage.combinat.sf.sfa.is_SymmetricFunctionAlgebra(5)
False
sage: sage.combinat.sf.sfa.is_SymmetricFunctionAlgebra(ZZ)
False
sage: sage.combinat.sf.sfa.is_SymmetricFunctionAlgebra(SymmetricFunctionAlgebra(ZZ,'schur'))
True
sage.combinat.sf.sfa.zee(part)

Returns the size of the centralizer of permutations of cycle type part. Note that this is the inner product between p(part) and itself where p is the power-sum symmetric functions.

INPUT:

  • part - an integer partition (for example, [2,1,1])

EXAMPLES:

sage: from sage.combinat.sf.sfa import zee
sage: zee([2,1,1])
4

Previous topic

Symmetric Functions

Next topic

Classical symmetric functions.

This Page