Symmetric Functions

For a comprehensive tutorial on how to use symmetric functions in sage

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()
Category of bases of Symmetric Functions over Rational Field
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 = SymmetricFunctions(QQ).monomial()
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]

We can also do computations with various bases:

sage: p = SymmetricFunctions(QQ).power()
sage: f = p(3)
sage: f
3*p[]
sage: f.parent()
Symmetric Functions over Rational Field in the powersum basis
sage: f + p([3,2])
3*p[] + p[3, 2]

One can convert symmetric functions to symmetric polynomials and vice versa:

sage: Sym = SymmetricFunctions(QQ)
sage: p = Sym.powersum()
sage: h = Sym.homogeneous()
sage: f = h[2,1] + 2*p[3,1]
sage: poly = f.expand(3); poly
2*x0^4 + 2*x0^3*x1 + 2*x0*x1^3 + 2*x1^4 + 2*x0^3*x2 + 2*x1^3*x2 + 2*x0*x2^3 + 2*x1*x2^3 + 2*x2^4 
+ x0^3 + 2*x0^2*x1 + 2*x0*x1^2 + x1^3 + 2*x0^2*x2 + 3*x0*x1*x2 + 2*x1^2*x2 + 2*x0*x2^2 + 2*x1*x2^2 + x2^3
sage: Sym.from_polynomial(poly)
3*m[1, 1, 1] + 2*m[2, 1] + m[3] + 2*m[3, 1] + 2*m[4]
sage: Sym.from_polynomial(poly) == f
True
sage: Sym = SymmetricFunctions(QQ)
sage: s = Sym.s()
sage: h = Sym.h()
sage: p = Sym.p()
sage: e = Sym.e()
sage: m = Sym.m()
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

Here are further examples:

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 = SymmetricFunctions(QQ).monomial()
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: Sym = SymmetricFunctions(QQ)
sage: s = Sym.s()
sage: m = Sym.m()
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 = Sym.e()
sage: e([4])*e([3])*e([1])
e[4, 3, 1]
sage: s = SymmetricFunctions(QQ).s()
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 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  = SymmetricFunctions(QQ)
    sage: s2 = SymmetricFunctions(QQ['t'])
    sage: s([1]) + s2([2]) # todo: not implemented
    

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

Backward compatibility should be essentially retained.

AUTHORS:

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

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

This function is deprecated. Use instead: SymmetricFunctions(R).elementary()

EXAMPLES:

sage: SymmetricFunctions(QQ).elementary()
Symmetric Functions over Rational Field in the elementary basis

TESTS:

sage: p = SFAElementary(QQ)
doctest:1: DeprecationWarning: Deprecation warning: In the future use SymmetricFunctions(R).elementary()
See http://trac.sagemath.org/5457 for details.
sage.combinat.sf.sfa.SFAHomogeneous(R)

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

This function is deprecated. Use instead: SymmetricFunctions(R).homogeneous()

EXAMPLES:

sage: SymmetricFunctions(QQ).homogeneous()
Symmetric Functions over Rational Field in the homogeneous basis

TESTS:

sage: p = SFAHomogeneous(QQ)
doctest:1: DeprecationWarning: Deprecation warning: In the future use SymmetricFunctions(R).homogeneous()
See http://trac.sagemath.org/5457 for details.
sage.combinat.sf.sfa.SFAMonomial(R)

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

This function is deprecated. Use instead: SymmetricFunctions(R).homogeneous()

EXAMPLES:

sage: SymmetricFunctions(QQ).monomial()
Symmetric Functions over Rational Field in the monomial basis

TESTS:

sage: p = SFAMonomial(QQ)
doctest:1: DeprecationWarning: Deprecation warning: In the future use SymmetricFunctions(R).monomial()
See http://trac.sagemath.org/5457 for details.
sage.combinat.sf.sfa.SFAPower(R)

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

This function is deprecated. Use instead: SymmetricFunctions(R).power()

EXAMPLES:

sage: SymmetricFunctions(QQ).power()
Symmetric Functions over Rational Field in the powersum basis

TESTS:

sage: p = SFAPower(QQ)
doctest:1: DeprecationWarning: Deprecation warning: In the future use SymmetricFunctions(R).power()
See http://trac.sagemath.org/5457 for details.
sage.combinat.sf.sfa.SFASchur(R)

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

This function is deprecated. Use instead: SymmetricFunctions(R).schur()

EXAMPLES:

sage: SymmetricFunctions(QQ).schur()
Symmetric Functions over Rational Field in the Schur basis

TESTS:

sage: p = SFASchur(QQ)
doctest:1: DeprecationWarning: Deprecation warning: In the future use SymmetricFunctions(R).schur()
See http://trac.sagemath.org/5457 for details.
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
  • basis – a string for the name of the basis, must be one of ‘schur’, ‘elementary’, ‘homogeneous’, ‘power’, ‘monomial’ or their abbreviations ‘s’, ‘e’, ‘h’, ‘p’, ‘m’

OUTPUT: A SymmetricFunctionAlgebra

EXAMPLES:

sage: SymmetricFunctionAlgebra(QQ)
Symmetric Functions over Rational Field in the Schur basis
sage: SymmetricFunctionAlgebra(QQ, basis='m')
Symmetric Functions over Rational Field in the monomial basis
sage: SymmetricFunctionAlgebra(QQ, basis='power')
Symmetric Functions over Rational Field in the powersum basis
class sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic(Sym, basis_name=None, prefix=None)

Bases: sage.combinat.free_module.CombinatorialFreeModule

Todo

most of the methods in this class are generic (manipulations of morphisms, ...) and should be generalized (or removed)

TESTS:

sage: s = SymmetricFunctions(QQ).s()
sage: m = SymmetricFunctions(ZZ).m()
sage: s(m([2,1]))
-2*s[1, 1, 1] + s[2, 1]
Element

alias of SymmetricFunctionAlgebra_generic_Element

basis_name()

Returns the name of the basis of self.

This is used for output and, for the classical basis of symmetric functions to connect this base with Symmetrica.

INPUT:

  • self – a basis of the ring of symmetric functions

EXAMPLES:

sage: Sym = SymmetricFunctions(QQ)
sage: s = Sym.s()
sage: s.basis_name()
'Schur'
sage: p = Sym.p()
sage: p.basis_name()
'powersum'
sage: h = Sym.h()
sage: h.basis_name()
'homogeneous'
sage: e = Sym.e()
sage: e.basis_name()
'elementary'
sage: m = Sym.m()
sage: m.basis_name()
'monomial'
coproduct_by_coercion(elt)

Returns the coproduct of the element elt by coercion to the Schur basis.

INPUT:

  • self – a symmetric function basis
  • elt – an instance of this basis

OUTPUT:

  • The coproduct acting on elt, the result is an element of the tensor squared of the basis self

EXAMPLES:

sage: m = SymmetricFunctions(QQ).m()
sage: m[3,1,1].coproduct()
m[] # m[3, 1, 1] + m[1] # m[3, 1] + m[1, 1] # m[3] + m[3] # m[1, 1] + m[3, 1] # m[1] + m[3, 1, 1] # m[]
sage: m.coproduct_by_coercion(m[2,1])
m[] # m[2, 1] + m[1] # m[2] + m[2] # m[1] + m[2, 1] # m[]
sage: m.coproduct_by_coercion(m[2,1]) == m([2,1]).coproduct()
True
sage: McdH = SymmetricFunctions(QQ['q','t'].fraction_field()).macdonald().H()
sage: McdH[2,1].coproduct()
McdH[] # McdH[2, 1] + ((q^2*t-1)/(q*t-1))*McdH[1] # McdH[1, 1] + ((q*t^2-1)/(q*t-1))*McdH[1] # McdH[2] + ((q^2*t-1)/(q*t-1))*McdH[1, 1] # McdH[1] + ((q*t^2-1)/(q*t-1))*McdH[2] # McdH[1] + McdH[2, 1] # McdH[]
sage: HLQp = SymmetricFunctions(QQ['t'].fraction_field()).hall_littlewood().Qp()
sage: HLQp[2,1].coproduct()                                                       
HLQp[] # HLQp[2, 1] + HLQp[1] # HLQp[1, 1] + HLQp[1] # HLQp[2] + HLQp[1, 1] # HLQp[1] + HLQp[2] # HLQp[1] + HLQp[2, 1] # HLQp[]
sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
sage: LLT = Sym.llt(3)
sage: LLT.cospin([3,2,1]).coproduct()
(t+1)*m[] # m[1, 1] + m[] # m[2] + (t+1)*m[1] # m[1] + (t+1)*m[1, 1] # m[] + m[2] # m[]
dual_basis(scalar=None, scalar_name='', basis_name=None, prefix=None)

Returns the dual basis of self with respect to the scalar product scalar.

INPUT:

  • self – a basis of the ring of symmetric functions
  • scalar – a function zee from partitions to the base ring which specifies the scalar product by \langle p_\lambda, p_\lambda \rangle = zee(\lambda). If scalar is None, then the standard (Hall) scalar product is used.
  • scalar_name – name of the scalar function
  • prefix – prefix used to display the basis

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

sage: e = SymmetricFunctions(QQ).e()
sage: f = e.dual_basis(prefix='f'); f
Dual basis to Symmetric Functions over Rational Field in the elementary 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 = SymmetricFunctions(QQ).p()
sage: q = p.dual_basis(prefix='q'); q
Dual basis to Symmetric Functions over Rational Field in the powersum 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
from_polynomial(poly, check=True)

Convert polynomial to a symmetric function in the monomial basis and then to the basis self

INPUT:

  • self – a basis of the ring of symmetric functions
  • poly – a symmetric polynomial
  • check – boolean, specifies whether the computation checks that the polynomial is indeed symmetric (default: True)

EXAMPLES:

sage: Sym = SymmetricFunctions(QQ)
sage: h = Sym.homogeneous()
sage: f = (h([]) + h([2,1]) + h([3])).expand(3)
sage: h.from_polynomial(f)
h[] + h[2, 1] + h[3]
sage: s = Sym.s()
sage: g = (s([]) + s([2,1])).expand(3); g  
x0^2*x1 + x0*x1^2 + x0^2*x2 + 2*x0*x1*x2 + x1^2*x2 + x0*x2^2 + x1*x2^2 + 1
sage: s.from_polynomial(g)          
s[] + s[2, 1]
get_print_style()

Returns the value of the current print style for self.

INPUT:

  • self – a basis of the ring of symmetric functions

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
sage: s.get_print_style()
'lex'
sage: s.set_print_style('length')
sage: s.get_print_style()
'length'
sage: s.set_print_style('lex')
prefix()

Returns the prefix on the elements of self.

INPUT:

  • self – a basis of the ring of symmetric functions

EXAMPLES:

sage: schur = SymmetricFunctions(QQ).schur()
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.

INPUT:

  • self – a basis of the ring of symmetric functions
  • ps – a string specifying the printing style

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
sage: s.get_print_style()
'lex'
sage: s.set_print_style('length')
sage: s.get_print_style()
'length'
sage: s.set_print_style('lex')
symmetric_function_ring()

Returns the family of symmetric functions associated to the basis self

INPUT:

  • self – a basis of the ring of symmetric functions

OUTPUT:

  • returns an instance of the ring of symmetric functions

EXAMPLES:

sage: schur = SymmetricFunctions(QQ).schur()
sage: schur.symmetric_function_ring()
Symmetric Functions over Rational Field
sage: power = SymmetricFunctions(QQ['t']).power()
sage: power.symmetric_function_ring()
Symmetric Functions over Univariate Polynomial Ring in t over Rational Field
transition_matrix(basis, n)

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

INPUT:

  • self – a basis of the ring of symmetric functions
  • basis – a basis of the ring of symmetric functions
  • n – a nonnegative integer

OUTPUT:

  • a matrix of coefficients giving the expansion of elements of self in the expansion of elements of basis

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
sage: m = SymmetricFunctions(QQ).m()
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: s.transition_matrix(m,1)
[1]
sage: s.transition_matrix(m,0)
[1]
sage: p = SymmetricFunctions(QQ).p()
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 = SymmetricFunctions(QQ).h()
sage: e = SymmetricFunctions(QQ).e()
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

Class of generic elements for the symmetric function algebra.

TESTS:

sage: m = SymmetricFunctions(QQ).m()
sage: f = sum([m(p) for p in Partitions(3)])
sage: m.set_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')
degree()

Returns the degree of self

INPUT:

  • self – an element of the ring of symmetric functions

EXAMPLES

sage: s = SymmetricFunctions(QQ).s()
sage: z = s([4]) + s([2,1]) + s([1,1,1]) + s([1]) + 3
sage: z.degree()
4
sage: s(1).degree()
0
sage: s(0).degree()
0
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.

INPUT:

  • self – an element of the ring of symmetric functions
  • n – positive integer which determines which power of the derivative is taken (default: n=1)

EXAMPLES:

sage: p = SymmetricFunctions(QQ).p()
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 = SymmetricFunctions(QQ).s()
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]
sage: s(0).derivative_with_respect_to_p1()
0
sage: s(1).derivative_with_respect_to_p1()
0
sage: s([1]).derivative_with_respect_to_p1()
s[]
expand(n, alphabet='x')

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

INPUT:

  • self – an element of the ring of symmetric functions
  • n – a positive integer
  • alphabet – a variable for the expansion (default: x)

OUTPUT: a monomial expansion of an instance of self in n variables

EXAMPLES

sage: J = SymmetricFunctions(QQ).jack(t=2).J()
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, t=None)

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

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

See also

Proposition 5 in [SZ2001].

INPUT:

  • nu – a partition
  • t – a parameter (default: None, in this case t is used)

REFERENCES:

[SZ2001]M. Shimozono, M. Zabrocki, Hall-Littlewood vertex operators and generalized Kostka polynomials. Adv. Math. 158 (2001), no. 1, 66-85.

EXAMPLES:

sage: s = SymmetricFunctions(QQ['t']).s()
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: Sym = SymmetricFunctions(FractionField(QQ['t']))
sage: HLQp = Sym.hall_littlewood().Qp()
sage: s = Sym.s()
sage: HLQp(s([2]).hl_creation_operator([2]).hl_creation_operator([3]))
HLQp[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]

TESTS:

sage: s(0).hl_creation_operator([1])
0
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_\lambda 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 \lambda is greater than 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]King, R. Branching rules for GL_m \supset \Sigma_n and the evaluation of inner plethysms. J. Math. Phys. 15, 258 (1974)

INPUT:

  • self, x – elements of the ring of symmetric functions

EXAMPLES:

sage: Sym = SymmetricFunctions(QQ)
sage: s = Sym.schur()
sage: p = Sym.power()
sage: h = Sym.complete()
sage: s([2,1]).inner_plethysm(s([1,1,1]))
0
sage: s([2]).inner_plethysm(s([2,1]))
s[2, 1] + s[3]
sage: s([1,1]).inner_plethysm(s([2,1]))
s[1, 1, 1]
sage: s[2,1].inner_tensor(s[2,1])
s[1, 1, 1] + s[2, 1] + s[3]
sage: s(0).inner_plethysm(s(0))
0
sage: s(1).inner_plethysm(s(0))
0
sage: s(0).inner_plethysm(s(1))
0
sage: s(1).inner_plethysm(s(1))
s[]
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.

The inner tensor product (also known as the Kronecker product) can be defined as the linear extension of the definition on power sums p_\lambda \otimes p_\mu = \delta_{\lambda,\mu} z_\lambda p_\lambda, where z_\lambda = (1^{r_1} r_1!) (2^{r_2} r_2!) \cdots for \lambda = (1^{r_1} 2^{r_2} \cdots ).

INPUT:

  • self, x – elements of the ring of symmetric functions of the same degree

OUTPUT:

  • symmetric function of the same degree as self and x

The methods itensor(), kronecker_product(), inner_tensor() are all synonyms.

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
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 = SymmetricFunctions(QQ).s()
sage: a = s([8,8])
sage: a.itensor(a)
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]
sage: s[8].itensor(s[7])
0
sage: s(0).itensor(s(0))
0
sage: s(1).itensor(s(0))
0
sage: s(0).itensor(s(1))
0
sage: s(1).itensor(s(1))
s[]
internal_product(x)

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

The inner tensor product (also known as the Kronecker product) can be defined as the linear extension of the definition on power sums p_\lambda \otimes p_\mu = \delta_{\lambda,\mu} z_\lambda p_\lambda, where z_\lambda = (1^{r_1} r_1!) (2^{r_2} r_2!) \cdots for \lambda = (1^{r_1} 2^{r_2} \cdots ).

INPUT:

  • self, x – elements of the ring of symmetric functions of the same degree

OUTPUT:

  • symmetric function of the same degree as self and x

The methods itensor(), kronecker_product(), inner_tensor() are all synonyms.

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
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 = SymmetricFunctions(QQ).s()
sage: a = s([8,8])
sage: a.itensor(a)
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]
sage: s[8].itensor(s[7])
0
sage: s(0).itensor(s(0))
0
sage: s(1).itensor(s(0))
0
sage: s(0).itensor(s(1))
0
sage: s(1).itensor(s(1))
s[]
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).

INPUT:

  • self – an element of the ring of symmetric functions

EXAMPLES

sage: s = SymmetricFunctions(QQ).s()
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 = SymmetricFunctions(QQx).s()
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
sage: s(0).is_schur_positive()
True
sage: s(1+x).is_schur_positive()
True
itensor(x)

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

The inner tensor product (also known as the Kronecker product) can be defined as the linear extension of the definition on power sums p_\lambda \otimes p_\mu = \delta_{\lambda,\mu} z_\lambda p_\lambda, where z_\lambda = (1^{r_1} r_1!) (2^{r_2} r_2!) \cdots for \lambda = (1^{r_1} 2^{r_2} \cdots ).

INPUT:

  • self, x – elements of the ring of symmetric functions of the same degree

OUTPUT:

  • symmetric function of the same degree as self and x

The methods itensor(), kronecker_product(), inner_tensor() are all synonyms.

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
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 = SymmetricFunctions(QQ).s()
sage: a = s([8,8])
sage: a.itensor(a)
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]
sage: s[8].itensor(s[7])
0
sage: s(0).itensor(s(0))
0
sage: s(1).itensor(s(0))
0
sage: s(0).itensor(s(1))
0
sage: s(1).itensor(s(1))
s[]
kronecker_product(x)

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

The inner tensor product (also known as the Kronecker product) can be defined as the linear extension of the definition on power sums p_\lambda \otimes p_\mu = \delta_{\lambda,\mu} z_\lambda p_\lambda, where z_\lambda = (1^{r_1} r_1!) (2^{r_2} r_2!) \cdots for \lambda = (1^{r_1} 2^{r_2} \cdots ).

INPUT:

  • self, x – elements of the ring of symmetric functions of the same degree

OUTPUT:

  • symmetric function of the same degree as self and x

The methods itensor(), kronecker_product(), inner_tensor() are all synonyms.

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
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 = SymmetricFunctions(QQ).s()
sage: a = s([8,8])
sage: a.itensor(a)
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]
sage: s[8].itensor(s[7])
0
sage: s(0).itensor(s(0))
0
sage: s(1).itensor(s(0))
0
sage: s(0).itensor(s(1))
0
sage: s(1).itensor(s(1))
s[]
nabla(q=None, t=None, power=1)

Returns the value of the nabla operator applied to self.

The eigenvectors of the nabla operator are the Macdonald polynomials in the Ht basis.

If the parameter power is an integer then it calculates nabla to that integer. The default value of power is 1.

INPUT:

  • self – an element of the ring of symmetric functions
  • q, t – optional parameters (default: None in which case q and t are used)
  • power – an integer indicating how many times to apply the operator \nabla (default : 1). Negative values of power indicate powers of \nabla^{-1}.

EXAMPLES:

sage: Sym = SymmetricFunctions(FractionField(QQ['q','t']))
sage: p = Sym.power()
sage: p([1,1]).nabla()
(-1/2*q*t+1/2*q+1/2*t+1/2)*p[1, 1] + (1/2*q*t-1/2*q-1/2*t+1/2)*p[2]
sage: p([2,1]).nabla(q=1)
(-t-1)*p[1, 1, 1] + t*p[2, 1]
sage: p([2]).nabla(q=1)*p([1]).nabla(q=1)
(-t-1)*p[1, 1, 1] + t*p[2, 1]
sage: s = Sym.schur()
sage: s([2,1]).nabla()
(-q^3*t-q^2*t^2-q*t^3)*s[1, 1, 1] + (-q^2*t-q*t^2)*s[2, 1]
sage: s([1,1,1]).nabla()
(q^3+q^2*t+q*t^2+t^3+q*t)*s[1, 1, 1] + (q^2+q*t+t^2+q+t)*s[2, 1] + s[3]
sage: s([1,1,1]).nabla(t=1)
(q^3+q^2+2*q+1)*s[1, 1, 1] + (q^2+2*q+2)*s[2, 1] + s[3]
sage: s(0).nabla()
0
sage: s(1).nabla()
s[]
sage: s([2,1]).nabla(power=-1)                            
((-q-t)/(q^2*t^2))*s[2, 1] + ((-q^2-q*t-t^2)/(q^3*t^3))*s[3]
sage: (s([2])+s([3])).nabla()        
(-q*t)*s[1, 1] + (q^3*t^2+q^2*t^3)*s[1, 1, 1] + q^2*t^2*s[2, 1]
omega()

Returns the image of self under the Frobenius / omega automorphism.

The default implementation converts to the Schurs performs the automorphism and changes back.

INPUT:

  • self – an element of the ring of symmetric functions

EXAMPLES:

sage: J = SymmetricFunctions(QQ).jack(t=1).P()
sage: a = J([2,1]) + J([1,1,1])
sage: a.omega()
JackP[2, 1] + JackP[3]
sage: J(0).omega()
0
sage: J(1).omega()
JackP[]
omega_qt(q=None, t=None)

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

INPUT:

  • self – an element of the ring of symmetric functions
  • q, t – parameters (default: None, in which case ‘q’ and ‘t’ are used)

EXAMPLES:

sage: QQqt = QQ['q,t'].fraction_field()
sage: q,t = QQqt.gens()
sage: p = SymmetricFunctions(QQqt).p()
sage: p[5].omega_qt()
((-q^5+1)/(-t^5+1))*p[5]
sage: p[5].omega_qt(q,t)
((-q^5+1)/(-t^5+1))*p[5]
sage: p([2]).omega_qt(q,t)
((q^2-1)/(-t^2+1))*p[2]
sage: p([2,1]).omega_qt(q,t)
((-q^3+q^2+q-1)/(t^3-t^2-t+1))*p[2, 1]
sage: p([3,2]).omega_qt(5,q)
((-2976)/(q^5-q^3-q^2+1))*p[3, 2]
sage: p(0).omega_qt()
0
sage: p(1).omega_qt()
p[]
sage: H = SymmetricFunctions(QQqt).macdonald().H()
sage: H([1,1]).omega_qt()
((2*q^2-2*q*t-2*q+2*t)/(t^3-t^2-t+1))*McdH[1, 1] + ((q-1)/(t-1))*McdH[2]
sage: H([1,1]).omega_qt(q,t)
((2*q^2-2*q*t-2*q+2*t)/(t^3-t^2-t+1))*McdH[1, 1] + ((q-1)/(t-1))*McdH[2]
sage: H([1,1]).omega_qt(t,q)
((t^3-t^2-t+1)/(q^3-q^2-q+1))*McdH[2]
sage: Sym = SymmetricFunctions(FractionField(QQ['q','t']))
sage: S = Sym.macdonald().S()
sage: S([1,1]).omega_qt()
((q^2-q*t-q+t)/(t^3-t^2-t+1))*McdS[1, 1] + ((-q^2*t+q*t+q-1)/(-t^3+t^2+t-1))*McdS[2]
sage: s = Sym.schur()
sage: s(S([1,1]).omega_qt())
s[2]
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:

  • self – an element of the ring of symmetric functions
  • 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: Sym = SymmetricFunctions(QQ)
sage: s = Sym.s()
sage: h = Sym.h()
sage: s ( h([3])( h([2]) ) )
s[2, 2, 2] + s[4, 2] + s[6]
sage: p = Sym.p()
sage: p([3])( s([2,1]) )
1/3*p[3, 3, 3] - 1/3*p[9]
sage: e = Sym.e()
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 = SymmetricFunctions(R).s()
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]
sage: s(0).plethysm(s[1])
0
sage: s(1).plethysm(s[1])
s[]
restrict_degree(d, exact=True)

Returns the degree d terms of self.

INPUT:

  • self – an element of the ring of symmetric functions
  • d – positive integer, degree of the terms to be returned
  • exact – boolean, if True, returns the terms of degree exactly d, otherwise returns all terms of degree less than or equal to d

OUTPUT:

  • returns the homogeneous component of self of degree d

EXAMPLES

sage: s = SymmetricFunctions(QQ).s()
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]
sage: z.restrict_degree(0)
0
restrict_partition_lengths(l, exact=True)

Returns the terms of self labelled by partitions of length l

INPUT:

  • self – an element of the ring of symmetric functions
  • l – positive integer, length of the partitions of the terms to be returned
  • exact – boolean, if True, returns the terms of degree exactly d, otherwise returns all terms of degree less than or equal to d

EXAMPLES

sage: s = SymmetricFunctions(QQ).s()
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(0)
0
sage: z.restrict_partition_lengths(2, exact = False)
s[1] + s[2, 1] + s[4]
restrict_parts(n)

Returns the terms of self labelled by partitions \lambda with \lambda_1 \le n.

INPUT:

  • self – an element of the ring of symmetric functions
  • n – positive integer, restrict the parts of the partitions of the terms to be returned

EXAMPLES

sage: s = SymmetricFunctions(QQ).s()
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, zee=None)

Returns standard scalar product between self and x.

INPUT:

  • self, x – elements of the ring of symmetric functions
  • zee – an optional function on partitions giving the value for the scalar product between p_\mu and p_\mu (default is to use the standard zee function)

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

EXAMPLES:

sage: e = SymmetricFunctions(QQ).e()
sage: h = SymmetricFunctions(QQ).h()
sage: m = SymmetricFunctions(QQ).m()
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]

sage: p = SymmetricFunctions(QQ).p()
sage: m(p[3,2]).scalar(p[3,2], zee=lambda mu: 2**mu.length())
4
sage: m(p[3,2]).scalar(p[2,2,1], lambda mu: 1)
0
sage: m[3,2].scalar(h[3,2], zee=lambda mu: 2**mu.length())
2/3

TESTS:

sage: m(1).scalar(h(1))
1
sage: m(0).scalar(h(1))
0
sage: m(1).scalar(h(0))
0
sage: m(0).scalar(h(0))
0
scalar_hl(x, t=None)

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

INPUT:

  • self, x – elements of the ring of symmetric functions
  • t – parameter (default: None in which case q and t are used)

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
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_jack(x, t=None)

Returns the Jack-scalar product beween self and x

This scalar product is defined so that the power sum elements p_\mu are orthogonal and \langle p_\mu, p_\mu \rangle = z_\mu t^{length(\mu)}

INPUT:

  • self, x – elements of the ring of symmetric functions
  • t – an optional parameter (default: None in which case t is used)

EXAMPLES

sage: p = SymmetricFunctions(QQ['t']).power()
sage: matrix([[p(mu).scalar_jack(p(nu)) for nu in Partitions(4)] for mu in Partitions(4)])
[   4*t      0      0      0      0]
[     0  3*t^2      0      0      0]
[     0      0  8*t^2      0      0]
[     0      0      0  4*t^3      0]
[     0      0      0      0 24*t^4]
sage: matrix([[p(mu).scalar_jack(p(nu),2) for nu in Partitions(4)] for mu in Partitions(4)])
[  8   0   0   0   0]
[  0  12   0   0   0]
[  0   0  32   0   0]
[  0   0   0  32   0]
[  0   0   0   0 384]
sage: JQ = SymmetricFunctions(QQ['t'].fraction_field()).jack().Q()
sage: matrix([[JQ(mu).scalar_jack(JQ(nu)) for nu in Partitions(3)] for mu in Partitions(3)])
[(2*t^2 + 3*t + 1)/(6*t^3)                         0                         0]
[                        0     (t + 2)/(2*t^3 + t^2)                         0]
[                        0                         0     6/(t^3 + 3*t^2 + 2*t)]
scalar_qt(x, q=None, t=None)

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

INPUT:

  • self, x – elements of the ring of symmetric functions
  • q, t – parameters (default: None in which case q and t are used)

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
sage: a = s([2,1])
sage: sp = a.scalar_qt(a); factor(sp)
(t - 1)^-3 * (q - 1) * (t^2 + t + 1)^-1 * (q^2*t^2 - q*t^2 + q^2 - 2*q*t + t^2 - q + 1)
sage: sp.parent()
Fraction Field of Multivariate Polynomial Ring in q, t over Rational Field
sage: a.scalar_qt(a,q=0)
(-t^2 - 1)/(t^5 - 2*t^4 + t^3 - t^2 + 2*t - 1)
sage: a.scalar_qt(a,t=0)
-q^3 + 2*q^2 - 2*q + 1
sage: a.scalar_qt(a,5,7) # q=5 and t=7
490/1539
sage: (x,y) = var('x,y')
sage: a.scalar_qt(a,q=x,t=y)
2/3*(x - 1)^3/(y - 1)^3 + 1/3*(x^3 - 1)/(y^3 - 1)
sage: Rn = QQ['q','t','y','z'].fraction_field()
sage: (q,t,y,z) = Rn.gens()
sage: Mac = SymmetricFunctions(Rn).macdonald(q=y,t=z)
sage: a = Mac._sym.schur()([2,1])
sage: factor(Mac.P()(a).scalar_qt(Mac.Q()(a),q,t))
(t - 1)^-3 * (q - 1) * (t^2 + t + 1)^-1 * (q^2*t^2 - q*t^2 + q^2 - 2*q*t + t^2 - q + 1)
sage: factor(Mac.P()(a).scalar_qt(Mac.Q()(a)))
(z - 1)^-3 * (y - 1) * (z^2 + z + 1)^-1 * (y^2*z^2 - y*z^2 + y^2 - 2*y*z + z^2 - y + 1)
scalar_t(x, t=None)

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

INPUT:

  • self, x – elements of the ring of symmetric functions
  • t – parameter (default: None in which case q and t are used)

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
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

INPUT:

  • self, x – elements of the ring of symmetric functions

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
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 = SymmetricFunctions(QQ).powersum()
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
sage: s(0).skew_by(s([1]))
0
sage: s(1).skew_by(s([1]))
0
sage: s([]).skew_by(s([]))
s[]
sage: s([]).skew_by(s[1])
0

TESTS:

sage: f=s[3,2]
sage: f.skew_by([1])
Traceback (most recent call last):
...
ValueError: x needs to be a symmetric function
theta(a)

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

INPUT:

  • self – an element of the ring of symmetric functions
  • a – an element of the base ring

EXAMPLES:

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

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

INPUT:

  • self – an element of the ring of symmetric functions
  • q, t – parameters (default: None, in which case ‘q’ and ‘t’ are used)

EXAMPLES:

sage: QQqt = QQ['q,t'].fraction_field()
sage: q,t = QQqt.gens()
sage: p = SymmetricFunctions(QQqt).p()
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: p(0).theta_qt(q=1,t=3)
0
sage: p([2,1]).theta_qt(q=2,t=3)
3/16*p[2, 1]
sage: s = p.realization_of().schur()
sage: s([3]).theta_qt(q=0)*(1-t)*(1-t^2)*(1-t^3)
t^3*s[1, 1, 1] + (t^2+t)*s[2, 1] + s[3]
sage: p(1).theta_qt()
p[]
class sage.combinat.sf.sfa.SymmetricFunctionsBases(base)

Bases: sage.categories.realizations.Category_realization_of_parent

The category of bases of symmetric functions.

class ElementMethods
degree_zero_coefficient()

Returns the degree zero coefficient of self.

INPUT:

  • self – an element of the symmetric functions

EXAMPLES:

sage: Sym = SymmetricFunctions(QQ)
sage: m = Sym.monomial()
sage: f = 2*m[2,1] + 3*m[[]]
sage: f.degree_zero_coefficient()
3
class SymmetricFunctionsBases.ParentMethods
antipode_by_coercion(element)

The antipode of element via coercion to and from the powersum basis.

INPUT:

  • self – a basis of the ring of symmetric functions
  • element – element in a basis of the ring of symmetric functions

EXAMPLES:

sage: Sym = SymmetricFunctions(QQ)
sage: p = Sym.p()
sage: s = Sym.s()
sage: h = Sym.h()
sage: (h([]) + h([1])).antipode() # indirect doctest
h[] - h[1]
sage: (s([]) + s([1]) + s[2]).antipode()
s[] - s[1] + s[1, 1]
sage: (p([2]) + p([3])).antipode()
-p[2] - p[3]
counit(element)

Returns the counit of element.

INPUT:

  • self – a basis of the ring of symmetric functions
  • element – element in a basis of the ring of symmetric functions

The counit is the constant terms of element.

EXAMPLES:

sage: Sym = SymmetricFunctions(QQ)
sage: m = Sym.monomial()
sage: f = 2*m[2,1] + 3*m[[]]
sage: f.counit()
3
degree_on_basis(b)

Return the degree of the basis element indexed by b.

INPUT:

  • self – a basis of the symmetric functions
  • b – a partition

EXAMPLES:

sage: Sym = SymmetricFunctions(QQ['q,t'].fraction_field())
sage: m = Sym.monomial()
sage: m.degree_on_basis(Partition([3,2]))
5
sage: P = Sym.macdonald().P()
sage: P.degree_on_basis(Partition([]))
0
is_commutative()

Returns whether this symmetric function algebra is commutative.

INPUT:

  • self – a basis of the symmetric functions

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
sage: s.is_commutative()
True
is_field(proof=True)

Returns whether self is a field.

INPUT:

  • self – a basis of the symmetric functions
  • proof – an optional argument (default value : True)

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
sage: s.is_field()
False
one_basis()

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

INPUT:

  • self – a basis of the ring of symmetric functions

EXAMPLES:

sage: Sym = SymmetricFunctions(QQ['t'].fraction_field())
sage: s = Sym.s()
sage: s.one_basis()
[]
sage: Q = Sym.hall_littlewood().Q()
sage: Q.one_basis()
[]

Todo

generalize to Modules.Graded.Connected.ParentMethods

SymmetricFunctionsBases.super_categories()

The super categories of self.

INPUT:

  • self – a category of bases for the symmetric functions

EXAMPLES:

sage: from sage.combinat.sf.sfa import SymmetricFunctionsBases
sage: Sym = SymmetricFunctions(QQ)
sage: bases = SymmetricFunctionsBases(Sym)
sage: bases.super_categories()
[Category of graded hopf algebras with basis over Rational Field, Category of realizations of Symmetric Functions over Rational Field, Category of commutative rings]
sage.combinat.sf.sfa.is_SymmetricFunction(x)

Checks whether x is a symmetric function.

EXAMPLES:

sage: from sage.combinat.sf.sfa import is_SymmetricFunction
sage: s = SymmetricFunctions(QQ).s()
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)

Checks whether x is a symmetric function algebra.

EXAMPLES:

sage: from sage.combinat.sf.sfa import is_SymmetricFunctionAlgebra
sage: is_SymmetricFunctionAlgebra(5)
False
sage: is_SymmetricFunctionAlgebra(ZZ)
False
sage: is_SymmetricFunctionAlgebra(SymmetricFunctionAlgebra(ZZ,'schur'))
True
sage: is_SymmetricFunctionAlgebra(SymmetricFunctions(QQ).e())
True
sage: is_SymmetricFunctionAlgebra(SymmetricFunctions(QQ).macdonald(q=1,t=1).P())
True
sage: is_SymmetricFunctionAlgebra(SymmetricFunctions(FractionField(QQ['q','t'])).macdonald().P())
True
sage.combinat.sf.sfa.zee(part)

Returns the size of the centralizer of permutations of cycle type part.

Note that the size of the centralizer 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])

OUTPUT:

  • the integer \prod_{i} i^{m_i(part)} m_i(part)! where m_i(part) is the number of parts in the partition part equal to i

EXAMPLES:

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

Previous topic

Symmetric Functions

Next topic

Symmetric functions, with their multiple realizations

This Page