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 = SymmetricFunctions(QQ).schur()
sage: e = SymmetricFunctions(QQ).elementary()
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).schur()
>>> e = SymmetricFunctions(QQ).elementary()

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

sage: s.category()
Category of graded bases of Symmetric Functions over Rational Field
sage: s.basis().keys()
Partitions
>>> from sage.all import *
>>> s.category()
Category of graded bases of Symmetric Functions over Rational Field
>>> s.basis().keys()
Partitions

Let us compute with some elements in different bases:

sage: f1 = s([2,1]); f1
s[2, 1]
sage: f2 = e(f1); f2 # basis conversion
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
>>> from sage.all import *
>>> f1 = s([Integer(2),Integer(1)]); f1
s[2, 1]
>>> f2 = e(f1); f2 # basis conversion
e[2, 1] - e[3]
>>> f1 == f2
True
>>> f1.expand(Integer(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
>>> f2.expand(Integer(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) # This is the constant 4, not the partition 4.
4*m[]
sage: m([4]) # This is the partition 4.
m[4]
sage: 3*m([3,1])-1/2*m([4])
3*m[3, 1] - 1/2*m[4]
>>> from sage.all import *
>>> m = SymmetricFunctions(QQ).monomial()
>>> m([Integer(3),Integer(1)])
m[3, 1]
>>> m(Integer(4)) # This is the constant 4, not the partition 4.
4*m[]
>>> m([Integer(4)]) # This is the partition 4.
m[4]
>>> Integer(3)*m([Integer(3),Integer(1)])-Integer(1)/Integer(2)*m([Integer(4)])
3*m[3, 1] - 1/2*m[4]
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]
>>> from sage.all import *
>>> p = SymmetricFunctions(QQ).power()
>>> f = p(Integer(3))
>>> f
3*p[]
>>> f.parent()
Symmetric Functions over Rational Field in the powersum basis
>>> f + p([Integer(3),Integer(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: g = h[1,1,1,1]
sage: poly = g.expand(3)
sage: Sym.from_polynomial(poly) == g
False
>>> from sage.all import *
>>> Sym = SymmetricFunctions(QQ)
>>> p = Sym.powersum()
>>> h = Sym.homogeneous()
>>> f = h[Integer(2),Integer(1)] + Integer(2)*p[Integer(3),Integer(1)]
>>> poly = f.expand(Integer(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
>>> Sym.from_polynomial(poly)
3*m[1, 1, 1] + 2*m[2, 1] + m[3] + 2*m[3, 1] + 2*m[4]
>>> Sym.from_polynomial(poly) == f
True
>>> g = h[Integer(1),Integer(1),Integer(1),Integer(1)]
>>> poly = g.expand(Integer(3))
>>> Sym.from_polynomial(poly) == g
False
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
>>> from sage.all import *
>>> Sym = SymmetricFunctions(QQ)
>>> s = Sym.s()
>>> h = Sym.h()
>>> p = Sym.p()
>>> e = Sym.e()
>>> m = Sym.m()
>>> a = s([Integer(3),Integer(1)])
>>> s(a)
s[3, 1]
>>> h(a)
h[3, 1] - h[4]
>>> p(a)
1/8*p[1, 1, 1, 1] + 1/4*p[2, 1, 1] - 1/8*p[2, 2] - 1/4*p[4]
>>> e(a)
e[2, 1, 1] - e[2, 2] - e[3, 1] + e[4]
>>> m(a)
3*m[1, 1, 1, 1] + 2*m[2, 1, 1] + m[2, 2] + m[3, 1]
>>> a.expand(Integer(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]
>>> from sage.all import *
>>> h(m([Integer(1)]))
h[1]
>>> h( m([Integer(2)]) +m([Integer(1),Integer(1)]) )
h[2]
>>> h( m([Integer(3)]) + m([Integer(2),Integer(1)]) + m([Integer(1),Integer(1),Integer(1)]) )
h[3]
>>> h( m([Integer(4)]) + m([Integer(3),Integer(1)]) + m([Integer(2),Integer(2)]) + m([Integer(2),Integer(1),Integer(1)]) + m([Integer(1),Integer(1),Integer(1),Integer(1)]) )
h[4]
>>> k = Integer(5)
>>> h( sum([ m(part) for part in Partitions(k)]) )
h[5]
>>> k = Integer(10)
>>> 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')
>>> from sage.all import *
>>> P3 = Partitions(Integer(3))
>>> P3.list()
[[3], [2, 1], [1, 1, 1]]
>>> m = SymmetricFunctions(QQ).monomial()
>>> f = sum([m(p) for p in P3])
>>> m.get_print_style()
'lex'
>>> f
m[1, 1, 1] + m[2, 1] + m[3]
>>> m.set_print_style('length')
>>> f
m[3] + m[2, 1] + m[1, 1, 1]
>>> m.set_print_style('maximal_part')
>>> f
m[1, 1, 1] + m[2, 1] + m[3]
>>> 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]
>>> from sage.all import *
>>> Sym = SymmetricFunctions(QQ)
>>> s = Sym.s()
>>> m = Sym.m()
>>> m([Integer(3)])*s([Integer(2),Integer(1)])
2*m[3, 1, 1, 1] + m[3, 2, 1] + 2*m[4, 1, 1] + m[4, 2] + m[5, 1]
>>> s(m([Integer(3)])*s([Integer(2),Integer(1)]))
s[2, 1, 1, 1, 1] - s[2, 2, 2] - s[3, 3] + s[5, 1]
>>> s(s([Integer(2),Integer(1)])*m([Integer(3)]))
s[2, 1, 1, 1, 1] - s[2, 2, 2] - s[3, 3] + s[5, 1]
>>> e = Sym.e()
>>> e([Integer(4)])*e([Integer(3)])*e([Integer(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: sorted(z.support())
[[1, 1, 1], [2, 1]]
sage: z.degree()
3
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> z = s([Integer(2),Integer(1)]) + s([Integer(1),Integer(1),Integer(1)])
>>> z.coefficient([Integer(2),Integer(1)])
1
>>> z.length()
2
>>> sorted(z.support())
[[1, 1, 1], [2, 1]]
>>> z.degree()
3

AUTHORS:

  • Mike Hansen (2007-06-15)

  • Nicolas M. Thiery (partial refactoring)

  • Mike Zabrocki, Anne Schilling (2012)

  • Darij Grinberg (2013) Sym over rings that are not characteristic 0

class sage.combinat.sf.sfa.FilteredSymmetricFunctionsBases(parent_with_realization)[source]#

Bases: Category_realization_of_parent

The category of filtered bases of the ring of symmetric functions.

super_categories()[source]#

The super categories of self.

EXAMPLES:

sage: from sage.combinat.sf.sfa import FilteredSymmetricFunctionsBases
sage: Sym = SymmetricFunctions(QQ)
sage: bases = FilteredSymmetricFunctionsBases(Sym)
sage: bases.super_categories()
[Category of bases of Symmetric Functions over Rational Field,
 Category of commutative filtered Hopf algebras with basis over Rational Field]
>>> from sage.all import *
>>> from sage.combinat.sf.sfa import FilteredSymmetricFunctionsBases
>>> Sym = SymmetricFunctions(QQ)
>>> bases = FilteredSymmetricFunctionsBases(Sym)
>>> bases.super_categories()
[Category of bases of Symmetric Functions over Rational Field,
 Category of commutative filtered Hopf algebras with basis over Rational Field]
class sage.combinat.sf.sfa.GradedSymmetricFunctionsBases(parent_with_realization)[source]#

Bases: Category_realization_of_parent

The category of graded bases of the ring of symmetric functions.

These are further required to have the property that the basis element indexed by the empty partition is \(1\).

class ElementMethods[source]#

Bases: object

degree_negation()[source]#

Return the image of self under the degree negation automorphism of the ring of symmetric functions.

The degree negation is the automorphism which scales every homogeneous element of degree \(k\) by \((-1)^k\) (for all \(k\)).

Calling degree_negation(self) is equivalent to calling self.parent().degree_negation(self).

EXAMPLES:

sage: Sym = SymmetricFunctions(ZZ)
sage: m = Sym.monomial()
sage: f = 2*m[2,1] + 4*m[1,1] - 5*m[1] - 3*m[[]]
sage: f.degree_negation()
-3*m[] + 5*m[1] + 4*m[1, 1] - 2*m[2, 1]
sage: x = m.zero().degree_negation(); x
0
sage: parent(x) is m
True
>>> from sage.all import *
>>> Sym = SymmetricFunctions(ZZ)
>>> m = Sym.monomial()
>>> f = Integer(2)*m[Integer(2),Integer(1)] + Integer(4)*m[Integer(1),Integer(1)] - Integer(5)*m[Integer(1)] - Integer(3)*m[[]]
>>> f.degree_negation()
-3*m[] + 5*m[1] + 4*m[1, 1] - 2*m[2, 1]
>>> x = m.zero().degree_negation(); x
0
>>> parent(x) is m
True
degree_zero_coefficient()[source]#

Return the degree zero coefficient of self.

EXAMPLES:

sage: Sym = SymmetricFunctions(QQ)
sage: m = Sym.monomial()
sage: f = 2*m[2,1] + 3*m[[]]
sage: f.degree_zero_coefficient()
3
>>> from sage.all import *
>>> Sym = SymmetricFunctions(QQ)
>>> m = Sym.monomial()
>>> f = Integer(2)*m[Integer(2),Integer(1)] + Integer(3)*m[[]]
>>> f.degree_zero_coefficient()
3
is_unit()[source]#

Return whether this element is a unit in the ring.

EXAMPLES:

sage: m = SymmetricFunctions(ZZ).monomial()
sage: (2*m[2,1] + m[[]]).is_unit()
False

sage: m = SymmetricFunctions(QQ).monomial()
sage: (3/2*m([])).is_unit()
True
>>> from sage.all import *
>>> m = SymmetricFunctions(ZZ).monomial()
>>> (Integer(2)*m[Integer(2),Integer(1)] + m[[]]).is_unit()
False

>>> m = SymmetricFunctions(QQ).monomial()
>>> (Integer(3)/Integer(2)*m([])).is_unit()
True
class ParentMethods[source]#

Bases: object

antipode_by_coercion(element)[source]#

The antipode of element.

INPUT:

  • 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: e = Sym.e()
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]
sage: (e([2]) + e([3])).antipode()
e[1, 1] - e[1, 1, 1] - e[2] + 2*e[2, 1] - e[3]
sage: f = Sym.f()
sage: f([3,2,1]).antipode()
-f[3, 2, 1] - 4*f[3, 3] - 2*f[4, 2] - 2*f[5, 1] - 6*f[6]
>>> from sage.all import *
>>> Sym = SymmetricFunctions(QQ)
>>> p = Sym.p()
>>> s = Sym.s()
>>> e = Sym.e()
>>> h = Sym.h()
>>> (h([]) + h([Integer(1)])).antipode() # indirect doctest
h[] - h[1]
>>> (s([]) + s([Integer(1)]) + s[Integer(2)]).antipode()
s[] - s[1] + s[1, 1]
>>> (p([Integer(2)]) + p([Integer(3)])).antipode()
-p[2] - p[3]
>>> (e([Integer(2)]) + e([Integer(3)])).antipode()
e[1, 1] - e[1, 1, 1] - e[2] + 2*e[2, 1] - e[3]
>>> f = Sym.f()
>>> f([Integer(3),Integer(2),Integer(1)]).antipode()
-f[3, 2, 1] - 4*f[3, 3] - 2*f[4, 2] - 2*f[5, 1] - 6*f[6]

The antipode is an involution:

sage: Sym = SymmetricFunctions(ZZ)
sage: s = Sym.s()
sage: all( s[u].antipode().antipode() == s[u] for u in Partitions(4) )
True
>>> from sage.all import *
>>> Sym = SymmetricFunctions(ZZ)
>>> s = Sym.s()
>>> all( s[u].antipode().antipode() == s[u] for u in Partitions(Integer(4)) )
True

The antipode is an algebra homomorphism:

sage: Sym = SymmetricFunctions(FiniteField(23))
sage: h = Sym.h()
sage: all( all( (s[u] * s[v]).antipode() == s[u].antipode() * s[v].antipode()
....:           for u in Partitions(3) )
....:      for v in Partitions(3) )
True
>>> from sage.all import *
>>> Sym = SymmetricFunctions(FiniteField(Integer(23)))
>>> h = Sym.h()
>>> all( all( (s[u] * s[v]).antipode() == s[u].antipode() * s[v].antipode()
...           for u in Partitions(Integer(3)) )
...      for v in Partitions(Integer(3)) )
True
counit(element)[source]#

Return the counit of element.

The counit is the constant term of element.

INPUT:

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

EXAMPLES:

sage: Sym = SymmetricFunctions(QQ)
sage: m = Sym.monomial()
sage: f = 2*m[2,1] + 3*m[[]]
sage: f.counit()
3
>>> from sage.all import *
>>> Sym = SymmetricFunctions(QQ)
>>> m = Sym.monomial()
>>> f = Integer(2)*m[Integer(2),Integer(1)] + Integer(3)*m[[]]
>>> f.counit()
3
degree_negation(element)[source]#

Return the image of element under the degree negation automorphism of the ring of symmetric functions.

The degree negation is the automorphism which scales every homogeneous element of degree \(k\) by \((-1)^k\) (for all \(k\)).

INPUT:

  • element – symmetric function written in self

EXAMPLES:

sage: Sym = SymmetricFunctions(ZZ)
sage: m = Sym.monomial()
sage: f = 2*m[2,1] + 4*m[1,1] - 5*m[1] - 3*m[[]]
sage: m.degree_negation(f)
-3*m[] + 5*m[1] + 4*m[1, 1] - 2*m[2, 1]
>>> from sage.all import *
>>> Sym = SymmetricFunctions(ZZ)
>>> m = Sym.monomial()
>>> f = Integer(2)*m[Integer(2),Integer(1)] + Integer(4)*m[Integer(1),Integer(1)] - Integer(5)*m[Integer(1)] - Integer(3)*m[[]]
>>> m.degree_negation(f)
-3*m[] + 5*m[1] + 4*m[1, 1] - 2*m[2, 1]
super_categories()[source]#

The super categories of self.

EXAMPLES:

sage: from sage.combinat.sf.sfa import GradedSymmetricFunctionsBases
sage: Sym = SymmetricFunctions(QQ)
sage: bases = GradedSymmetricFunctionsBases(Sym)
sage: bases.super_categories()
[Category of filtered bases of Symmetric Functions over Rational Field,
 Category of commutative graded Hopf algebras with basis over Rational Field]
>>> from sage.all import *
>>> from sage.combinat.sf.sfa import GradedSymmetricFunctionsBases
>>> Sym = SymmetricFunctions(QQ)
>>> bases = GradedSymmetricFunctionsBases(Sym)
>>> bases.super_categories()
[Category of filtered bases of Symmetric Functions over Rational Field,
 Category of commutative graded Hopf algebras with basis over Rational Field]
class sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic(Sym, basis_name=None, prefix=None, graded=True)[source]#

Bases: CombinatorialFreeModule

Abstract base class for symmetric function algebras.

Todo

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

Element[source]#

alias of SymmetricFunctionAlgebra_generic_Element

basis_name()[source]#

Return the name of the basis of self.

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

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'
sage: f = Sym.f()
sage: f.basis_name()
'forgotten'
>>> from sage.all import *
>>> Sym = SymmetricFunctions(QQ)
>>> s = Sym.s()
>>> s.basis_name()
'Schur'
>>> p = Sym.p()
>>> p.basis_name()
'powersum'
>>> h = Sym.h()
>>> h.basis_name()
'homogeneous'
>>> e = Sym.e()
>>> e.basis_name()
'elementary'
>>> m = Sym.m()
>>> m.basis_name()
'monomial'
>>> f = Sym.f()
>>> f.basis_name()
'forgotten'
change_ring(R)[source]#

Return the base change of self to \(R\).

EXAMPLES:

sage: s = SymmetricFunctions(ZZ).s()
sage: s.change_ring(QQ)
Symmetric Functions over Rational Field in the Schur basis
>>> from sage.all import *
>>> s = SymmetricFunctions(ZZ).s()
>>> s.change_ring(QQ)
Symmetric Functions over Rational Field in the Schur basis
construction()[source]#

Return a pair (F, R), where F is a SymmetricFunctionsFunctor and \(R\) is a ring, such that F(R) returns self.

EXAMPLES:

sage: s = SymmetricFunctions(ZZ).s()
sage: s.construction()
(SymmetricFunctionsFunctor[Schur], Integer Ring)
>>> from sage.all import *
>>> s = SymmetricFunctions(ZZ).s()
>>> s.construction()
(SymmetricFunctionsFunctor[Schur], Integer Ring)
coproduct_by_coercion(elt)[source]#

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

INPUT:

  • elt – an instance of this basis

OUTPUT:

  • The image of elt under the comultiplication (=coproduct) of the coalgebra of symmetric functions. 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[]
sage: f = SymmetricFunctions(ZZ).f()
sage: f[3].coproduct()
f[] # f[3] + f[3] # f[]
sage: f[3,2,1].coproduct()
f[] # f[3, 2, 1] + f[1] # f[3, 2] + f[2] # f[3, 1] + f[2, 1] # f[3] + f[3] # f[2, 1] + f[3, 1] # f[2] + f[3, 2] # f[1] + f[3, 2, 1] # f[]
>>> from sage.all import *
>>> m = SymmetricFunctions(QQ).m()
>>> m[Integer(3),Integer(1),Integer(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[]
>>> m.coproduct_by_coercion(m[Integer(2),Integer(1)])
m[] # m[2, 1] + m[1] # m[2] + m[2] # m[1] + m[2, 1] # m[]
>>> m.coproduct_by_coercion(m[Integer(2),Integer(1)]) == m([Integer(2),Integer(1)]).coproduct()
True
>>> McdH = SymmetricFunctions(QQ['q','t'].fraction_field()).macdonald().H()
>>> McdH[Integer(2),Integer(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[]
>>> HLQp = SymmetricFunctions(QQ['t'].fraction_field()).hall_littlewood().Qp()
>>> HLQp[Integer(2),Integer(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[]
>>> Sym = SymmetricFunctions(FractionField(QQ['t']))
>>> LLT = Sym.llt(Integer(3))
>>> LLT.cospin([Integer(3),Integer(2),Integer(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[]
>>> f = SymmetricFunctions(ZZ).f()
>>> f[Integer(3)].coproduct()
f[] # f[3] + f[3] # f[]
>>> f[Integer(3),Integer(2),Integer(1)].coproduct()
f[] # f[3, 2, 1] + f[1] # f[3, 2] + f[2] # f[3, 1] + f[2, 1] # f[3] + f[3] # f[2, 1] + f[3, 1] # f[2] + f[3, 2] # f[1] + f[3, 2, 1] # f[]
dual_basis(scalar=None, scalar_name='', basis_name=None, prefix=None)[source]#

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

INPUT:

  • scalar – A function zee from partitions to the base ring which specifies the scalar product by \(\langle p_{\lambda}, p_{\lambda} \rangle = \mathrm{zee}(\lambda)\). (Independently on the function chosen, the power sum basis will always be orthogonal; the function scalar only determines the norms of the basis elements.) 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
>>> from sage.all import *
>>> e = SymmetricFunctions(QQ).e()
>>> 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
>>> f([Integer(2),Integer(1)])**Integer(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]
>>> f([Integer(2),Integer(1)]).scalar(e([Integer(2),Integer(1)]))
1
>>> f([Integer(2),Integer(1)]).scalar(e([Integer(1),Integer(1),Integer(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 sage.all import *
>>> p = SymmetricFunctions(QQ).p()
>>> 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
>>> q([Integer(2),Integer(1)])**Integer(2)
4*q[2, 2, 1, 1]
>>> p([Integer(2),Integer(1)]).scalar(q([Integer(2),Integer(1)]))
1
>>> p([Integer(2),Integer(1)]).scalar(q([Integer(1),Integer(1),Integer(1)]))
0
from_polynomial(poly, check=True)[source]#

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

INPUT:

  • poly – a symmetric polynomial

  • check – (default: True) boolean, specifies whether the computation checks that the polynomial is indeed symmetric

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]
>>> from sage.all import *
>>> Sym = SymmetricFunctions(QQ)
>>> h = Sym.homogeneous()
>>> f = (h([]) + h([Integer(2),Integer(1)]) + h([Integer(3)])).expand(Integer(3))
>>> h.from_polynomial(f)
h[] + h[2, 1] + h[3]
>>> s = Sym.s()
>>> g = (s([]) + s([Integer(2),Integer(1)])).expand(Integer(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
>>> s.from_polynomial(g)
s[] + s[2, 1]
get_print_style()[source]#

Return the value of the current print style for self.

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')
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> s.get_print_style()
'lex'
>>> s.set_print_style('length')
>>> s.get_print_style()
'length'
>>> s.set_print_style('lex')
prefix()[source]#

Return the prefix on the elements of self.

EXAMPLES:

sage: schur = SymmetricFunctions(QQ).schur()
sage: schur([3,2,1])
s[3, 2, 1]
sage: schur.prefix()
's'
>>> from sage.all import *
>>> schur = SymmetricFunctions(QQ).schur()
>>> schur([Integer(3),Integer(2),Integer(1)])
s[3, 2, 1]
>>> schur.prefix()
's'
product_by_coercion(left, right)[source]#

Return the product of elements left and right by coercion to the Schur basis.

INPUT:

  • left, right – instances of this basis

OUTPUT:

  • the product of left and right expressed in the basis self

EXAMPLES:

sage: p = SymmetricFunctions(QQ).p()
sage: p.product_by_coercion(p[3,1,1], p[2,2])
p[3, 2, 2, 1, 1]
sage: m = SymmetricFunctions(QQ).m()
sage: m.product_by_coercion(m[2,1],m[1,1]) == m[2,1]*m[1,1]
True
>>> from sage.all import *
>>> p = SymmetricFunctions(QQ).p()
>>> p.product_by_coercion(p[Integer(3),Integer(1),Integer(1)], p[Integer(2),Integer(2)])
p[3, 2, 2, 1, 1]
>>> m = SymmetricFunctions(QQ).m()
>>> m.product_by_coercion(m[Integer(2),Integer(1)],m[Integer(1),Integer(1)]) == m[Integer(2),Integer(1)]*m[Integer(1),Integer(1)]
True
set_print_style(ps)[source]#

Set the value of the current print style to ps.

INPUT:

  • 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')
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> s.get_print_style()
'lex'
>>> s.set_print_style('length')
>>> s.get_print_style()
'length'
>>> s.set_print_style('lex')
symmetric_function_ring()[source]#

Return the family of symmetric functions associated to the basis self.

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
>>> from sage.all import *
>>> schur = SymmetricFunctions(QQ).schur()
>>> schur.symmetric_function_ring()
Symmetric Functions over Rational Field
>>> power = SymmetricFunctions(QQ['t']).power()
>>> power.symmetric_function_ring()
Symmetric Functions over Univariate Polynomial Ring in t over Rational Field
transition_matrix(basis, n)[source]#

Return the transition matrix between self and basis for the homogeneous component of degree n.

INPUT:

  • basis – a basis of the ring of symmetric functions

  • n – a nonnegative integer

OUTPUT:

  • a matrix of coefficients giving the expansion of the homogeneous degree-\(n\) elements of self in the degree-\(n\) 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]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> m = SymmetricFunctions(QQ).m()
>>> s.transition_matrix(m,Integer(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]
>>> s.transition_matrix(m,Integer(1))
[1]
>>> s.transition_matrix(m,Integer(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 = sorted(a.support())
sage: coeffs = [a[i] for i in mon]
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]
>>> from sage.all import *
>>> p = SymmetricFunctions(QQ).p()
>>> s.transition_matrix(p, Integer(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]
>>> StoP = s.transition_matrix(p,Integer(4))
>>> a = s([Integer(3),Integer(1)])+Integer(5)*s([Integer(1),Integer(1),Integer(1),Integer(1)])-s([Integer(4)])
>>> a
5*s[1, 1, 1, 1] + s[3, 1] - s[4]
>>> mon = sorted(a.support())
>>> coeffs = [a[i] for i in mon]
>>> coeffs
[5, 1, -1]
>>> mon
[[1, 1, 1, 1], [3, 1], [4]]
>>> cm = matrix([[-Integer(1),Integer(1),Integer(0),Integer(0),Integer(5)]])
>>> cm * StoP
[-7/4  4/3  3/8 -5/4 7/24]
>>> 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
>>> from sage.all import *
>>> h = SymmetricFunctions(QQ).h()
>>> e = SymmetricFunctions(QQ).e()
>>> s.transition_matrix(m,Integer(7)) == h.transition_matrix(s,Integer(7)).transpose()
True
sage: h.transition_matrix(m, 7) == h.transition_matrix(m, 7).transpose()
True
>>> from sage.all import *
>>> h.transition_matrix(m, Integer(7)) == h.transition_matrix(m, Integer(7)).transpose()
True
sage: h.transition_matrix(e, 7) == e.transition_matrix(h, 7)
True
>>> from sage.all import *
>>> h.transition_matrix(e, Integer(7)) == e.transition_matrix(h, Integer(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]
>>> from sage.all import *
>>> p.transition_matrix(s, Integer(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
>>> from sage.all import *
>>> e.transition_matrix(m,Integer(7)) == e.transition_matrix(m,Integer(7)).transpose()
True
class sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element[source]#

Bases: IndexedFreeModuleElement

Class of generic elements for the symmetric function algebra.

adams_operator(n)[source]#

Return the image of the symmetric function self under the \(n\)-th Adams operator.

The \(n\)-th Adams operator \(\mathbf{f}_n\) is defined to be the map from the ring of symmetric functions to itself that sends every symmetric function \(P(x_1, x_2, x_3, \ldots)\) to \(P(x_1^n, x_2^n, x_3^n, \ldots)\). This operator \(\mathbf{f}_n\) is a Hopf algebra endomorphism, and satisfies

\[\mathbf{f}_n m_{(\lambda_1, \lambda_2, \lambda_3, \ldots)} = m_{(n\lambda_1, n\lambda_2, n\lambda_3, \ldots)}\]

for every partition \((\lambda_1, \lambda_2, \lambda_3, \ldots)\) (where \(m\) means the monomial basis). Moreover, \(\mathbf{f}_n (p_r) = p_{nr}\) for every positive integer \(r\) (where \(p_k\) denotes the \(k\)-th powersum symmetric function).

The \(n\)-th Adams operator is also called the \(n\)-th Frobenius endomorphism. It is not related to the Frobenius map which connects the ring of symmetric functions with the representation theory of the symmetric group.

The \(n\)-th Adams operator is also the \(n\)-th Adams operator of the \(\Lambda\)-ring of symmetric functions over the integers.

The \(n\)-th Adams operator can also be described via plethysm: Every symmetric function \(P\) satisfies \(\mathbf{f}_n(P) = p_n \circ P = P \circ p_n\), where \(p_n\) is the \(n\)-th powersum symmetric function, and \(\circ\) denotes (outer) plethysm.

INPUT:

  • n – a positive integer

OUTPUT:

The result of applying the \(n\)-th Adams operator (on the ring of symmetric functions) to self.

EXAMPLES:

sage: Sym = SymmetricFunctions(ZZ)
sage: p = Sym.p()
sage: h = Sym.h()
sage: s = Sym.s()
sage: m = Sym.m()
sage: s[3].adams_operator(2)
-s[3, 3] + s[4, 2] - s[5, 1] + s[6]
sage: m[4,2,1].adams_operator(3)
m[12, 6, 3]
sage: p[4,2,1].adams_operator(3)
p[12, 6, 3]
sage: h[4].adams_operator(2)
h[4, 4] - 2*h[5, 3] + 2*h[6, 2] - 2*h[7, 1] + 2*h[8]
>>> from sage.all import *
>>> Sym = SymmetricFunctions(ZZ)
>>> p = Sym.p()
>>> h = Sym.h()
>>> s = Sym.s()
>>> m = Sym.m()
>>> s[Integer(3)].adams_operator(Integer(2))
-s[3, 3] + s[4, 2] - s[5, 1] + s[6]
>>> m[Integer(4),Integer(2),Integer(1)].adams_operator(Integer(3))
m[12, 6, 3]
>>> p[Integer(4),Integer(2),Integer(1)].adams_operator(Integer(3))
p[12, 6, 3]
>>> h[Integer(4)].adams_operator(Integer(2))
h[4, 4] - 2*h[5, 3] + 2*h[6, 2] - 2*h[7, 1] + 2*h[8]

The Adams endomorphisms are multiplicative:

sage: all( all( s(lam).adams_operator(3) * s(mu).adams_operator(3) # long time
....:           == (s(lam) * s(mu)).adams_operator(3)
....:           for mu in Partitions(3) )
....:      for lam in Partitions(3) )
True
sage: all( all( m(lam).adams_operator(2) * m(mu).adams_operator(2)
....:           == (m(lam) * m(mu)).adams_operator(2)
....:           for mu in Partitions(4) )
....:      for lam in Partitions(4) )
True
sage: all( all( p(lam).adams_operator(2) * p(mu).adams_operator(2)
....:           == (p(lam) * p(mu)).adams_operator(2)
....:           for mu in Partitions(3) )
....:      for lam in Partitions(4) )
True
>>> from sage.all import *
>>> all( all( s(lam).adams_operator(Integer(3)) * s(mu).adams_operator(Integer(3)) # long time
...           == (s(lam) * s(mu)).adams_operator(Integer(3))
...           for mu in Partitions(Integer(3)) )
...      for lam in Partitions(Integer(3)) )
True
>>> all( all( m(lam).adams_operator(Integer(2)) * m(mu).adams_operator(Integer(2))
...           == (m(lam) * m(mu)).adams_operator(Integer(2))
...           for mu in Partitions(Integer(4)) )
...      for lam in Partitions(Integer(4)) )
True
>>> all( all( p(lam).adams_operator(Integer(2)) * p(mu).adams_operator(Integer(2))
...           == (p(lam) * p(mu)).adams_operator(Integer(2))
...           for mu in Partitions(Integer(3)) )
...      for lam in Partitions(Integer(4)) )
True

Being Hopf algebra endomorphisms, the Adams operators commute with the antipode:

sage: all( p(lam).adams_operator(4).antipode()
....:      == p(lam).antipode().adams_operator(4)
....:      for lam in Partitions(3) )
True
>>> from sage.all import *
>>> all( p(lam).adams_operator(Integer(4)).antipode()
...      == p(lam).antipode().adams_operator(Integer(4))
...      for lam in Partitions(Integer(3)) )
True

Testing the \(\mathbf{f}_n(P) = p_n \circ P = P \circ p_n\) equality (over \(\QQ\), since plethysm is currently not defined over \(\ZZ\) in Sage):

sage: Sym = SymmetricFunctions(QQ)
sage: s = Sym.s()
sage: p = Sym.p()
sage: all( s(lam).adams_operator(3) == s(lam).plethysm(p[3])
....:      == s(p[3].plethysm(s(lam)))
....:      for lam in Partitions(4) )
True
>>> from sage.all import *
>>> Sym = SymmetricFunctions(QQ)
>>> s = Sym.s()
>>> p = Sym.p()
>>> all( s(lam).adams_operator(Integer(3)) == s(lam).plethysm(p[Integer(3)])
...      == s(p[Integer(3)].plethysm(s(lam)))
...      for lam in Partitions(Integer(4)) )
True

By Exercise 7.61 in Stanley’s EC2 [STA] (see the errata on his website), \(\mathbf{f}_n(h_m)\) is a linear combination of Schur polynomials (of straight shapes) using coefficients \(0\), \(1\) and \(-1\) only; moreover, all partitions whose Schur polynomials occur with coefficient \(\neq 0\) in this combination have empty \(n\)-cores. Let us check this on examples:

sage: all( all( all( (coeff == -1 or coeff == 1)
....:                and lam.core(n) == Partition([])
....:                for lam, coeff in s([m]).adams_operator(n) )
....:           for n in range(2, 4) )
....:      for m in range(4) )
True
>>> from sage.all import *
>>> all( all( all( (coeff == -Integer(1) or coeff == Integer(1))
...                and lam.core(n) == Partition([])
...                for lam, coeff in s([m]).adams_operator(n) )
...           for n in range(Integer(2), Integer(4)) )
...      for m in range(Integer(4)) )
True

See also

plethysm()

Todo

This method is fast on the monomial and the powersum bases, while all other bases get converted to the monomial basis. For most bases, this is probably the quickest way to do, but at least the Schur basis should have a better option. (Quoting from Stanley’s EC2 [STA]: “D. G. Duncan, J. London Math. Soc. 27 (1952), 235-236, or Y. M. Chen, A. M. Garsia, and J. B. Remmel, Contemp. Math. 34 (1984), 109-153”.)

arithmetic_product(x)[source]#

Return the arithmetic product of self and x in the basis of self.

The arithmetic product is a binary operation \(\boxdot\) on the ring of symmetric functions which is bilinear in its two arguments and satisfies

\[p_{\lambda} \boxdot p_{\mu} = \prod\limits_{i \geq 1, j \geq 1} p_{\mathrm{lcm}(\lambda_i, \mu_j)}^{\mathrm{gcd}(\lambda_i, \mu_j)}\]

for any two partitions \(\lambda = (\lambda_1, \lambda_2, \lambda_3, \dots )\) and \(\mu = (\mu_1, \mu_2, \mu_3, \dots )\) (where \(p_{\nu}\) denotes the power-sum symmetric function indexed by the partition \(\nu\), and \(p_i\) denotes the \(i\)-th power-sum symmetric function). This is enough to define the arithmetic product if the base ring is torsion-free as a \(\ZZ\)-module; for all other cases the arithmetic product is uniquely determined by requiring it to be functorial in the base ring. See http://mathoverflow.net/questions/138148/ for a discussion of this arithmetic product.

If \(f\) and \(g\) are two symmetric functions which are homogeneous of degrees \(a\) and \(b\), respectively, then \(f \boxdot g\) is homogeneous of degree \(ab\).

The arithmetic product is commutative and associative and has unity \(e_1 = p_1 = h_1\).

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

OUTPUT:

Arithmetic product of self with x; this is a symmetric function over the same base ring as self.

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
sage: s([2]).arithmetic_product(s([2]))
s[1, 1, 1, 1] + 2*s[2, 2] + s[4]
sage: s([2]).arithmetic_product(s([1,1]))
s[2, 1, 1] + s[3, 1]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> s([Integer(2)]).arithmetic_product(s([Integer(2)]))
s[1, 1, 1, 1] + 2*s[2, 2] + s[4]
>>> s([Integer(2)]).arithmetic_product(s([Integer(1),Integer(1)]))
s[2, 1, 1] + s[3, 1]

The symmetric function e[1] is the unity for the arithmetic product:

sage: e = SymmetricFunctions(ZZ).e()
sage: all( e([1]).arithmetic_product(e(q)) == e(q) for q in Partitions(4) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(ZZ).e()
>>> all( e([Integer(1)]).arithmetic_product(e(q)) == e(q) for q in Partitions(Integer(4)) )
True

The arithmetic product is commutative:

sage: e = SymmetricFunctions(FiniteField(19)).e()
sage: m = SymmetricFunctions(FiniteField(19)).m()
sage: all( all( e(p).arithmetic_product(m(q)) == m(q).arithmetic_product(e(p))  # long time (26s on sage.math, 2013)
....:           for q in Partitions(4) )
....:      for p in Partitions(4) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(FiniteField(Integer(19))).e()
>>> m = SymmetricFunctions(FiniteField(Integer(19))).m()
>>> all( all( e(p).arithmetic_product(m(q)) == m(q).arithmetic_product(e(p))  # long time (26s on sage.math, 2013)
...           for q in Partitions(Integer(4)) )
...      for p in Partitions(Integer(4)) )
True

Note

The currently existing implementation of this function is technically unsatisfactory. It distinguishes the case when the base ring is a \(\QQ\)-algebra (in which case the arithmetic product can be easily computed using the power sum basis) from the case where it isn’t. In the latter, it does a computation using universal coefficients, again distinguishing the case when it is able to compute the “corresponding” basis of the symmetric function algebra over \(\QQ\) (using the corresponding_basis_over hack) from the case when it isn’t (in which case it transforms everything into the Schur basis, which is slow).

bernstein_creation_operator(n)[source]#

Return the image of self under the \(n\)-th Bernstein creation operator.

Let \(n\) be an integer. The \(n\)-th Bernstein creation operator \(\mathbf{B}_n\) is defined as the endomorphism of the space \(Sym\) of symmetric functions which sends every \(f\) to

\[\sum_{i \geq 0} (-1)^i h_{n+i} e_i^\perp,\]

where usual notations are in place (\(h\) stands for the complete homogeneous symmetric functions, \(e\) for the elementary ones, and \(e_i^\perp\) means skewing (skew_by()) by \(e_i\)).

This has been studied in [BBSSZ2012], section 2.2, where the following rule is given for computing \(\mathbf{B}_n\) on a Schur function: If \((\alpha_1, \alpha_2, \ldots, \alpha_n)\) is an \(n\)-tuple of integers (positive or not), then

\[\mathbf{B}_n s_{(\alpha_1, \alpha_2, \ldots, \alpha_n)} = s_{(n, \alpha_1, \alpha_2, \ldots, \alpha_n)}.\]

Here, \(s_{(\alpha_1, \alpha_2, \ldots, \alpha_n)}\) is the “Schur function” associated to the \(n\)-tuple \((\alpha_1, \alpha_2, \ldots, \alpha_n)\), and defined by literally applying the Jacobi-Trudi identity, i.e., by

\[s_{(\alpha_1, \alpha_2, \ldots, \alpha_n)} = \det \left( (h_{\alpha_i - i + j})_{i, j = 1, 2, \ldots, n} \right).\]

This notion of a Schur function clearly extends the classical notion of Schur function corresponding to a partition, but is easily reduced to the latter (in fact, for any \(n\)-tuple \(\alpha\) of integers, one easily sees that \(s_\alpha\) is either \(0\) or minus-plus a Schur function corresponding to a partition; and it is easy to determine which of these is the case and find the partition by a combinatorial algorithm).

EXAMPLES:

Let us check that what this method computes agrees with the definition:

sage: Sym = SymmetricFunctions(ZZ)
sage: e = Sym.e()
sage: h = Sym.h()
sage: s = Sym.s()
sage: def bernstein_creation_by_def(n, f):
....:     # `n`-th Bernstein creation operator applied to `f`
....:     # computed according to its definition.
....:     res = f.parent().zero()
....:     if not f:
....:         return res
....:     max_degree = max(sum(m) for m, c in f)
....:     for i in range(max_degree + 1):
....:         if n + i >= 0:
....:             res += (-1) ** i * h[n + i] * f.skew_by(e[i])
....:     return res
sage: all( bernstein_creation_by_def(n, s[l]) == s[l].bernstein_creation_operator(n)
....:      for n in range(-2, 3) for l in Partitions(4) )
True
sage: all( bernstein_creation_by_def(n, s[l]) == s[l].bernstein_creation_operator(n)
....:      for n in range(-3, 4) for l in Partitions(3) )
True
sage: all( bernstein_creation_by_def(n, e[l]) == e[l].bernstein_creation_operator(n)
....:      for n in range(-3, 4) for k in range(3) for l in Partitions(k) )
True
>>> from sage.all import *
>>> Sym = SymmetricFunctions(ZZ)
>>> e = Sym.e()
>>> h = Sym.h()
>>> s = Sym.s()
>>> def bernstein_creation_by_def(n, f):
...     # `n`-th Bernstein creation operator applied to `f`
...     # computed according to its definition.
...     res = f.parent().zero()
...     if not f:
...         return res
...     max_degree = max(sum(m) for m, c in f)
...     for i in range(max_degree + Integer(1)):
...         if n + i >= Integer(0):
...             res += (-Integer(1)) ** i * h[n + i] * f.skew_by(e[i])
...     return res
>>> all( bernstein_creation_by_def(n, s[l]) == s[l].bernstein_creation_operator(n)
...      for n in range(-Integer(2), Integer(3)) for l in Partitions(Integer(4)) )
True
>>> all( bernstein_creation_by_def(n, s[l]) == s[l].bernstein_creation_operator(n)
...      for n in range(-Integer(3), Integer(4)) for l in Partitions(Integer(3)) )
True
>>> all( bernstein_creation_by_def(n, e[l]) == e[l].bernstein_creation_operator(n)
...      for n in range(-Integer(3), Integer(4)) for k in range(Integer(3)) for l in Partitions(k) )
True

Some examples:

sage: s[3,2].bernstein_creation_operator(3)
s[3, 3, 2]
sage: s[3,2].bernstein_creation_operator(1)
-s[2, 2, 2]
sage: h[3,2].bernstein_creation_operator(-2)
h[2, 1]
sage: h[3,2].bernstein_creation_operator(-1)
h[2, 1, 1] - h[2, 2] - h[3, 1]
sage: h[3,2].bernstein_creation_operator(0)
-h[3, 1, 1] + h[3, 2]
sage: h[3,2].bernstein_creation_operator(1)
-h[2, 2, 2] + h[3, 2, 1]
sage: h[3,2].bernstein_creation_operator(2)
-h[3, 3, 1] + h[4, 2, 1]
>>> from sage.all import *
>>> s[Integer(3),Integer(2)].bernstein_creation_operator(Integer(3))
s[3, 3, 2]
>>> s[Integer(3),Integer(2)].bernstein_creation_operator(Integer(1))
-s[2, 2, 2]
>>> h[Integer(3),Integer(2)].bernstein_creation_operator(-Integer(2))
h[2, 1]
>>> h[Integer(3),Integer(2)].bernstein_creation_operator(-Integer(1))
h[2, 1, 1] - h[2, 2] - h[3, 1]
>>> h[Integer(3),Integer(2)].bernstein_creation_operator(Integer(0))
-h[3, 1, 1] + h[3, 2]
>>> h[Integer(3),Integer(2)].bernstein_creation_operator(Integer(1))
-h[2, 2, 2] + h[3, 2, 1]
>>> h[Integer(3),Integer(2)].bernstein_creation_operator(Integer(2))
-h[3, 3, 1] + h[4, 2, 1]
character_to_frobenius_image(n)[source]#

Interpret self as a \(GL_n\) character and then take the Frobenius image of this character of the permutation matrices \(S_n\) which naturally sit inside of \(GL_n\).

To know the value of this character at a permutation of cycle structure \(\rho\) the symmetric function self is evaluated at the eigenvalues of a permutation of cycle structure \(\rho\). The Frobenius image is then defined as \(\sum_{\rho \vdash n} f[ \Xi_\rho ] p_\rho/z_\rho\).

INPUT:

  • n – a non-negative integer to interpret self as a character of \(GL_n\)

OUTPUT:

  • a symmetric function of degree n

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
sage: s([1,1]).character_to_frobenius_image(5)
s[3, 1, 1] + s[4, 1]
sage: s([2,1]).character_to_frobenius_image(5)
s[2, 2, 1] + 2*s[3, 1, 1] + 2*s[3, 2] + 3*s[4, 1] + s[5]
sage: s([2,2,2]).character_to_frobenius_image(3)
s[3]
sage: s([2,2,2]).character_to_frobenius_image(4)
s[2, 2] + 2*s[3, 1] + 2*s[4]
sage: s([2,2,2]).character_to_frobenius_image(5)
2*s[2, 2, 1] + s[3, 1, 1] + 4*s[3, 2] + 3*s[4, 1] + 2*s[5]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> s([Integer(1),Integer(1)]).character_to_frobenius_image(Integer(5))
s[3, 1, 1] + s[4, 1]
>>> s([Integer(2),Integer(1)]).character_to_frobenius_image(Integer(5))
s[2, 2, 1] + 2*s[3, 1, 1] + 2*s[3, 2] + 3*s[4, 1] + s[5]
>>> s([Integer(2),Integer(2),Integer(2)]).character_to_frobenius_image(Integer(3))
s[3]
>>> s([Integer(2),Integer(2),Integer(2)]).character_to_frobenius_image(Integer(4))
s[2, 2] + 2*s[3, 1] + 2*s[4]
>>> s([Integer(2),Integer(2),Integer(2)]).character_to_frobenius_image(Integer(5))
2*s[2, 2, 1] + s[3, 1, 1] + 4*s[3, 2] + 3*s[4, 1] + 2*s[5]
degree()[source]#

Return the degree of self (which is defined to be \(0\) for the zero element).

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
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> z = s([Integer(4)]) + s([Integer(2),Integer(1)]) + s([Integer(1),Integer(1),Integer(1)]) + s([Integer(1)]) + Integer(3)
>>> z.degree()
4
>>> s(Integer(1)).degree()
0
>>> s(Integer(0)).degree()
0
derivative_with_respect_to_p1(n=1)[source]#

Return 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_k\)’s (with \(k \geq 1\)).

This is the same as skewing self by the first power-sum symmetric function \(p_1\).

INPUT:

  • n – (default: 1) nonnegative integer which determines which power of the derivative is taken

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[]
>>> from sage.all import *
>>> p = SymmetricFunctions(QQ).p()
>>> a = p([Integer(1),Integer(1),Integer(1)])
>>> a.derivative_with_respect_to_p1()
3*p[1, 1]
>>> a.derivative_with_respect_to_p1(Integer(1))
3*p[1, 1]
>>> a.derivative_with_respect_to_p1(Integer(2))
6*p[1]
>>> a.derivative_with_respect_to_p1(Integer(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[]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> s([Integer(3)]).derivative_with_respect_to_p1()
s[2]
>>> s([Integer(2),Integer(1)]).derivative_with_respect_to_p1()
s[1, 1] + s[2]
>>> s([Integer(1),Integer(1),Integer(1)]).derivative_with_respect_to_p1()
s[1, 1]
>>> s(Integer(0)).derivative_with_respect_to_p1()
0
>>> s(Integer(1)).derivative_with_respect_to_p1()
0
>>> s([Integer(1)]).derivative_with_respect_to_p1()
s[]

Let us check that taking the derivative with respect to p[1] is equivalent to skewing by p[1]:

sage: p1 = s([1])
sage: all( s(lam).derivative_with_respect_to_p1()
....:      == s(lam).skew_by(p1) for lam in Partitions(4) )
True
>>> from sage.all import *
>>> p1 = s([Integer(1)])
>>> all( s(lam).derivative_with_respect_to_p1()
...      == s(lam).skew_by(p1) for lam in Partitions(Integer(4)) )
True
eval_at_permutation_roots(rho)[source]#

Evaluate at eigenvalues of a permutation matrix.

Evaluate a symmetric function at the eigenvalues of a permutation matrix whose cycle structure is rho. This computation is computed by coercing to the power sum basis where the value may be computed on the generators.

This function evaluates an element at the roots of unity

\[\Xi_{\rho_1},\Xi_{\rho_2},\ldots,\Xi_{\rho_\ell}\]

where

\[\Xi_{m} = 1,\zeta_m,\zeta_m^2,\ldots,\zeta_m^{m-1}\]

and \(\zeta_m\) is an \(m\) root of unity. These roots of unity represent the eigenvalues of permutation matrix with cycle structure \(\rho\).

INPUT:

  • rho – a partition or a list of non-negative integers

OUTPUT:

  • an element of the base ring

EXAMPLES:

sage: s = SymmetricFunctions(QQ).s()
sage: s([3,3]).eval_at_permutation_roots([6])
0
sage: s([3,3]).eval_at_permutation_roots([3])
1
sage: s([3,3]).eval_at_permutation_roots([1])
0
sage: s([3,3]).eval_at_permutation_roots([3,3])
4
sage: s([3,3]).eval_at_permutation_roots([1,1,1,1,1])
175
sage: (s[1]+s[2]+s[3]).eval_at_permutation_roots([3,2])
2
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> s([Integer(3),Integer(3)]).eval_at_permutation_roots([Integer(6)])
0
>>> s([Integer(3),Integer(3)]).eval_at_permutation_roots([Integer(3)])
1
>>> s([Integer(3),Integer(3)]).eval_at_permutation_roots([Integer(1)])
0
>>> s([Integer(3),Integer(3)]).eval_at_permutation_roots([Integer(3),Integer(3)])
4
>>> s([Integer(3),Integer(3)]).eval_at_permutation_roots([Integer(1),Integer(1),Integer(1),Integer(1),Integer(1)])
175
>>> (s[Integer(1)]+s[Integer(2)]+s[Integer(3)]).eval_at_permutation_roots([Integer(3),Integer(2)])
2
expand(n, alphabet='x')[source]#

Expand the symmetric function self as a symmetric polynomial in n variables.

INPUT:

  • n – a nonnegative integer

  • alphabet – (default: 'x') a variable for the expansion

OUTPUT:

A monomial expansion of self in the \(n\) variables labelled x0, x1, …, x{n-1} (or just x if \(n = 1\)), where x is alphabet.

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
sage: (2*J([2])).expand(0)
0
sage: (3*J([])).expand(0)
3
>>> from sage.all import *
>>> J = SymmetricFunctions(QQ).jack(t=Integer(2)).J()
>>> J([Integer(2),Integer(1)]).expand(Integer(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
>>> (Integer(2)*J([Integer(2)])).expand(Integer(0))
0
>>> (Integer(3)*J([])).expand(Integer(0))
3
exponential_specialization(t=None, q=1)[source]#

Return the exponential specialization of a symmetric function (when \(q = 1\)), or the \(q\)-exponential specialization (when \(q \neq 1\)).

The exponential specialization \(ex\) at \(t\) is a \(K\)-algebra homomorphism from the \(K\)-algebra of symmetric functions to another \(K\)-algebra \(R\). It is defined whenever the base ring \(K\) is a \(\QQ\)-algebra and \(t\) is an element of \(R\). The easiest way to define it is by specifying its values on the powersum symmetric functions to be \(p_1 = t\) and \(p_n = 0\) for \(n > 1\). Equivalently, on the homogeneous functions it is given by \(ex(h_n) = t^n / n!\); see Proposition 7.8.4 of [EnumComb2].

By analogy, the \(q\)-exponential specialization is a \(K\)-algebra homomorphism from the \(K\)-algebra of symmetric functions to another \(K\)-algebra \(R\) that depends on two elements \(t\) and \(q\) of \(R\) for which the elements \(1 - q^i\) for all positive integers \(i\) are invertible. It can be defined by specifying its values on the complete homogeneous symmetric functions to be

\[ex_q(h_n) = t^n / [n]_q!,\]

where \([n]_q!\) is the \(q\)-factorial. Equivalently, for \(q \neq 1\) and a homogeneous symmetric function \(f\) of degree \(n\), we have

\[ex_q(f) = (1-q)^n t^n ps_q(f),\]

where \(ps_q(f)\) is the stable principal specialization of \(f\) (see principal_specialization()). (See (7.29) in [EnumComb2].)

The limit of \(ex_q\) as \(q \to 1\) is \(ex\).

INPUT:

  • t (default: None) – the value to use for \(t\); the default is to create a ring of polynomials in t.

  • q (default: \(1\)) – the value to use for \(q\). If q is None, then a ring (or fraction field) of polynomials in q is created.

EXAMPLES:

sage: m = SymmetricFunctions(QQ).m()
sage: (m[2,1]+m[1,1]).exponential_specialization()
1/2*t^2
sage: (m[2,1]+m[1,1]).exponential_specialization(q=1)
1/2*t^2
sage: m[1,1].exponential_specialization(q=None)
(q/(q + 1))*t^2
sage: Qq = PolynomialRing(QQ, "q"); q = Qq.gen()
sage: m[1,1].exponential_specialization(q=q)
(q/(q + 1))*t^2
sage: Qt = PolynomialRing(QQ, "t"); t = Qt.gen()
sage: m[1,1].exponential_specialization(t=t)
1/2*t^2
sage: Qqt = PolynomialRing(QQ, ["q", "t"]); q, t = Qqt.gens()
sage: m[1,1].exponential_specialization(q=q, t=t)
q*t^2/(q + 1)

sage: x = m[3]+m[2,1]+m[1,1,1]
sage: d = x.homogeneous_degree()
sage: var("q t")                                                            # needs sage.symbolic
(q, t)
sage: factor((x.principal_specialization()*(1-q)^d*t^d))                    # needs sage.symbolic
t^3/((q^2 + q + 1)*(q + 1))
sage: factor(x.exponential_specialization(q=q, t=t))                        # needs sage.symbolic
t^3/((q^2 + q + 1)*(q + 1))
>>> from sage.all import *
>>> m = SymmetricFunctions(QQ).m()
>>> (m[Integer(2),Integer(1)]+m[Integer(1),Integer(1)]).exponential_specialization()
1/2*t^2
>>> (m[Integer(2),Integer(1)]+m[Integer(1),Integer(1)]).exponential_specialization(q=Integer(1))
1/2*t^2
>>> m[Integer(1),Integer(1)].exponential_specialization(q=None)
(q/(q + 1))*t^2
>>> Qq = PolynomialRing(QQ, "q"); q = Qq.gen()
>>> m[Integer(1),Integer(1)].exponential_specialization(q=q)
(q/(q + 1))*t^2
>>> Qt = PolynomialRing(QQ, "t"); t = Qt.gen()
>>> m[Integer(1),Integer(1)].exponential_specialization(t=t)
1/2*t^2
>>> Qqt = PolynomialRing(QQ, ["q", "t"]); q, t = Qqt.gens()
>>> m[Integer(1),Integer(1)].exponential_specialization(q=q, t=t)
q*t^2/(q + 1)

>>> x = m[Integer(3)]+m[Integer(2),Integer(1)]+m[Integer(1),Integer(1),Integer(1)]
>>> d = x.homogeneous_degree()
>>> var("q t")                                                            # needs sage.symbolic
(q, t)
>>> factor((x.principal_specialization()*(Integer(1)-q)**d*t**d))                    # needs sage.symbolic
t^3/((q^2 + q + 1)*(q + 1))
>>> factor(x.exponential_specialization(q=q, t=t))                        # needs sage.symbolic
t^3/((q^2 + q + 1)*(q + 1))
factor()[source]#

Return the factorization of this symmetric function.

EXAMPLES:

sage: e = SymmetricFunctions(QQ).e()
sage: factor((5*e[3] + e[2,1] + e[1])*(7*e[2] + e[5,1]))
(e[1] + e[2, 1] + 5*e[3]) * (7*e[2] + e[5, 1])

sage: R.<x, y> = QQ[]
sage: s = SymmetricFunctions(R.fraction_field()).s()
sage: factor((s[3] + x*s[2,1] + 1)*(3*y*s[2] + s[4,1] + x*y))
(-s[] + (-x)*s[2, 1] - s[3]) * ((-x*y)*s[] + (-3*y)*s[2] - s[4, 1])
>>> from sage.all import *
>>> e = SymmetricFunctions(QQ).e()
>>> factor((Integer(5)*e[Integer(3)] + e[Integer(2),Integer(1)] + e[Integer(1)])*(Integer(7)*e[Integer(2)] + e[Integer(5),Integer(1)]))
(e[1] + e[2, 1] + 5*e[3]) * (7*e[2] + e[5, 1])

>>> R = QQ['x, y']; (x, y,) = R._first_ngens(2)
>>> s = SymmetricFunctions(R.fraction_field()).s()
>>> factor((s[Integer(3)] + x*s[Integer(2),Integer(1)] + Integer(1))*(Integer(3)*y*s[Integer(2)] + s[Integer(4),Integer(1)] + x*y))
(-s[] + (-x)*s[2, 1] - s[3]) * ((-x*y)*s[] + (-3*y)*s[2] - s[4, 1])
frobenius(*args, **kwds)[source]#

Deprecated: Use adams_operator() instead. See Issue #36396 for details.

gcd(other)[source]#

Return the greatest common divisor with other.

INPUT:

  • other – the other symmetric function

EXAMPLES:

sage: e = SymmetricFunctions(ZZ).e()
sage: A = 5*e[3] + e[2,1] + e[1]
sage: B = 7*e[2] + e[5,1]
sage: C = 3*e[1,1] + e[2]
sage: gcd(A*B^2, B*C)
7*e[2] + e[5, 1]

sage: p = SymmetricFunctions(ZZ).p()
sage: gcd(e[2,1], p[1,1]-p[2])
e[2]
sage: gcd(p[2,1], p[3,2]-p[2,1])
p[2]
>>> from sage.all import *
>>> e = SymmetricFunctions(ZZ).e()
>>> A = Integer(5)*e[Integer(3)] + e[Integer(2),Integer(1)] + e[Integer(1)]
>>> B = Integer(7)*e[Integer(2)] + e[Integer(5),Integer(1)]
>>> C = Integer(3)*e[Integer(1),Integer(1)] + e[Integer(2)]
>>> gcd(A*B**Integer(2), B*C)
7*e[2] + e[5, 1]

>>> p = SymmetricFunctions(ZZ).p()
>>> gcd(e[Integer(2),Integer(1)], p[Integer(1),Integer(1)]-p[Integer(2)])
e[2]
>>> gcd(p[Integer(2),Integer(1)], p[Integer(3),Integer(2)]-p[Integer(2),Integer(1)])
p[2]
hl_creation_operator(nu, t=None)[source]#

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 or a list of integers

  • t – (default: None, in which case t is used) an element of the base ring

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]
sage: s([3,2]).hl_creation_operator([-2])
(-t^2+t)*s[1, 1, 1] + (-t^2+1)*s[2, 1]
sage: s([3,2]).hl_creation_operator(-2)
Traceback (most recent call last):
...
ValueError: nu must be a list of integers
sage: s = SymmetricFunctions(FractionField(ZZ['t'])).schur()
sage: s[2].hl_creation_operator([3])
s[3, 2] + t*s[4, 1] + t^2*s[5]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ['t']).s()
>>> s([Integer(2)]).hl_creation_operator([Integer(3),Integer(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]

>>> Sym = SymmetricFunctions(FractionField(QQ['t']))
>>> HLQp = Sym.hall_littlewood().Qp()
>>> s = Sym.s()
>>> HLQp(s([Integer(2)]).hl_creation_operator([Integer(2)]).hl_creation_operator([Integer(3)]))
HLQp[3, 2, 2]
>>> s([Integer(2),Integer(2)]).hl_creation_operator([Integer(2),Integer(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]
>>> s(Integer(1)).hl_creation_operator([Integer(2),Integer(1),Integer(1)])
s[2, 1, 1]
>>> s(Integer(0)).hl_creation_operator([Integer(2),Integer(1),Integer(1)])
0
>>> s([Integer(3),Integer(2)]).hl_creation_operator([Integer(2),Integer(1),Integer(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]
>>> s([Integer(3),Integer(2)]).hl_creation_operator([-Integer(2)])
(-t^2+t)*s[1, 1, 1] + (-t^2+1)*s[2, 1]
>>> s([Integer(3),Integer(2)]).hl_creation_operator(-Integer(2))
Traceback (most recent call last):
...
ValueError: nu must be a list of integers
>>> s = SymmetricFunctions(FractionField(ZZ['t'])).schur()
>>> s[Integer(2)].hl_creation_operator([Integer(3)])
s[3, 2] + t*s[4, 1] + t^2*s[5]
inner_plethysm(x)[source]#

Return the inner plethysm of self with x.

Whenever \(R\) is a \(\QQ\)-algebra, and \(f\) and \(g\) are two symmetric functions over \(R\) such that the constant term of \(f\) is zero, the inner plethysm of \(f\) with \(g\) is a symmetric function over \(R\), and the degree of this symmetric function is the same as the degree of \(g\). We will denote the inner plethysm of \(f\) with \(g\) by \(f \{ g \}\) (in contrast to the notation of outer plethysm which is generally denoted \(f [ g ]\)); in Sage syntax, it is f.inner_plethysm(g).

First we describe the axiomatic definition of the operation; see below for a representation-theoretic interpretation. In the following equations, we denote the outer product (i.e., the standard product on the ring of symmetric functions, product()) by \(\cdot\) and the Kronecker product (itensor()) by \(\ast\)).

\[ \begin{align}\begin{aligned}(f + g) \{ h \} = f \{ h \} + g \{ h \}\\(f \cdot g) \{ h \} = (f \{ h \}) \ast (g \{ h \})\\p_k \{ f + g \} = p_k \{ f \} + p_k \{ g \}\end{aligned}\end{align} \]

where \(p_k\) is the \(k\)-th power-sum symmetric function for every \(k > 0\).

Let \(\sigma\) be a permutation of cycle type \(\mu\) and let \(\mu^k\) be the cycle type of \(\sigma^k\). Then,

\[p_k \{ p_\mu/z_\mu \} = \sum_{\nu : \nu^k = \mu } p_{\nu}/z_{\nu}\]

Since \((p_\mu/z_\mu)_{\mu}\) is a basis for the symmetric functions, these four formulas define the symmetric function operation \(f \{ g \}\) for any symmetric functions \(f\) and \(g\) (where \(f\) has constant term \(0\)) by expanding \(f\) in the power sum basis and \(g\) in the dual basis \(p_\mu/z_\mu\).

See also

itensor(), partition_power(), plethysm()

This operation admits a representation-theoretic interpretation in the case where \(f\) is a Schur function \(s_\lambda\) and \(g\) is a homogeneous degree \(n\) symmetric function with nonnegative integral coefficients in the Schur basis. The symmetric function \(f \{ g \}\) is the Frobenius image of the \(S_n\)-representation constructed as follows.

The assumptions on \(g\) imply that \(g\) is the Frobenius image of a representation \(\rho\) of the symmetric group \(S_n\):

\[\rho : S_n \to GL_N.\]

If the degree \(N\) of this representation is greater than or equal to the number of parts of \(\lambda\), then \(f\), which denotes \(s_\lambda\), corresponds to the character of some irreducible \(GL_N\)-representation, say

\[\sigma : GL_N \to GL_M.\]

The composition \(\sigma \circ \rho : S_n \to GL_M\) is a representation of \(S_n\) whose Frobenius image is precisely \(f \{ g \}\).

If \(N\) is less than the number of parts of \(\lambda\), then \(f \{ g \}\) is \(0\) by definition.

When \(f\) is a symmetric function with constant term \(\neq 0\), the inner plethysm \(f \{ g \}\) isn’t well-defined in the ring of symmetric functions. Indeed, it is not clear how to define \(1 \{ g \}\). The most sensible way to get around this probably is defining it as the infinite sum \(h_0 + h_1 + h_2 + \cdots\) (where \(h_i\) means the \(i\)-th complete homogeneous symmetric function) in the completion of this ring with respect to its grading. This is how [SchaThi1994] defines \(1 \{ g \}\). The present method, however, sets it to be the sum of \(h_i\) over all \(i\) for which the \(i\)-th homogeneous component of \(g\) is nonzero. This is rather a hack than a reasonable definition. Use with caution!

Note

If a symmetric function \(g\) is written in the form \(g = g_0 + g_1 + g_2 + \cdots\) with each \(g_i\) homogeneous of degree \(i\), then \(f \{ g \} = f \{ g_0 \} + f \{ g_1 \} + f \{ g_2 \} + \cdots\) for every \(f\) with constant term \(0\). But in general, inner plethysm is not linear in the second variable.

REFERENCES:

[King]

King, R. Branching rules for \(GL_m \supset \Sigma_n\) and the evaluation of inner plethysms. J. Math. Phys. 15, 258 (1974) doi:10.1063/1.1666632

[SchaThi1994]

Thomas Scharf, Jean-Yves Thibon. A Hopf-algebra approach to inner plethysm. Advances in Mathematics 104 (1994), pp. 30-58. ftp://ftp.mathe2.uni-bayreuth.de/axel/papers/scharf:a_hopf_algebra_approach_to_inner_plethysm.ps.gz

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

OUTPUT:

  • an element of symmetric functions in the parent of self

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]
>>> from sage.all import *
>>> Sym = SymmetricFunctions(QQ)
>>> s = Sym.schur()
>>> p = Sym.power()
>>> h = Sym.complete()
>>> s([Integer(2),Integer(1)]).inner_plethysm(s([Integer(1),Integer(1),Integer(1)]))
0
>>> s([Integer(2)]).inner_plethysm(s([Integer(2),Integer(1)]))
s[2, 1] + s[3]
>>> s([Integer(1),Integer(1)]).inner_plethysm(s([Integer(2),Integer(1)]))
s[1, 1, 1]
>>> s[Integer(2),Integer(1)].inner_tensor(s[Integer(2),Integer(1)])
s[1, 1, 1] + 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]
>>> from sage.all import *
>>> f = s([Integer(2),Integer(1)]) + Integer(2)*s([Integer(3),Integer(1)])
>>> 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]
>>> s( h([Integer(1),Integer(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(la)) for la in Partitions(4)]
[s[4], s[4], s[4], s[4], s[4]]
sage: s([3]).inner_plethysm(s([]))
s[]
sage: s[1,1,1,1].inner_plethysm(s[2,1])
0
sage: s[1,1,1,1].inner_plethysm(2*s[2,1])
s[3]
>>> from sage.all import *
>>> s([]).inner_plethysm(s([Integer(1),Integer(1)]) + Integer(2)*s([Integer(2),Integer(1)])+s([Integer(3)]))
s[2] + s[3]
>>> [s([]).inner_plethysm(s(la)) for la in Partitions(Integer(4))]
[s[4], s[4], s[4], s[4], s[4]]
>>> s([Integer(3)]).inner_plethysm(s([]))
s[]
>>> s[Integer(1),Integer(1),Integer(1),Integer(1)].inner_plethysm(s[Integer(2),Integer(1)])
0
>>> s[Integer(1),Integer(1),Integer(1),Integer(1)].inner_plethysm(Integer(2)*s[Integer(2),Integer(1)])
s[3]
sage: p[3].inner_plethysm(p[3])
0
sage: p[3,3].inner_plethysm(p[3])
0
sage: p[3].inner_plethysm(p[1,1,1])
p[1, 1, 1] + 2*p[3]
sage: p[4].inner_plethysm(p[1,1,1,1]/24)
1/24*p[1, 1, 1, 1] + 1/4*p[2, 1, 1] + 1/8*p[2, 2] + 1/4*p[4]
sage: p[3,3].inner_plethysm(p[1,1,1])
6*p[1, 1, 1] + 12*p[3]
>>> from sage.all import *
>>> p[Integer(3)].inner_plethysm(p[Integer(3)])
0
>>> p[Integer(3),Integer(3)].inner_plethysm(p[Integer(3)])
0
>>> p[Integer(3)].inner_plethysm(p[Integer(1),Integer(1),Integer(1)])
p[1, 1, 1] + 2*p[3]
>>> p[Integer(4)].inner_plethysm(p[Integer(1),Integer(1),Integer(1),Integer(1)]/Integer(24))
1/24*p[1, 1, 1, 1] + 1/4*p[2, 1, 1] + 1/8*p[2, 2] + 1/4*p[4]
>>> p[Integer(3),Integer(3)].inner_plethysm(p[Integer(1),Integer(1),Integer(1)])
6*p[1, 1, 1] + 12*p[3]
inner_tensor(x)[source]#

Return the internal (tensor) product of self and x in the basis of self.

The internal tensor product can be defined as the linear extension of the definition on power sums \(p_{\lambda} \ast 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 )\) and where \(\ast\) denotes the internal tensor product. The internal tensor product is also known as the Kronecker product, or as the second multiplication on the ring of symmetric functions.

Note that the internal product of any two homogeneous symmetric functions of equal degrees is a homogeneous symmetric function of the same degree. On the other hand, the internal product of two homogeneous symmetric functions of distinct degrees is \(0\).

Note

The internal product is sometimes referred to as “inner product” in the literature, but unfortunately this name is shared by a different operation, namely the Hall inner product (see scalar()).

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

OUTPUT:

  • the internal product of self with x (an element of the ring of symmetric functions in the same basis as self)

The methods itensor(), internal_product(), 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]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> a = s([Integer(2),Integer(1)])
>>> b = s([Integer(3)])
>>> a.itensor(b)
s[2, 1]
>>> c = s([Integer(3),Integer(2),Integer(1)])
>>> 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]

There are few quantitative results pertaining to Kronecker products in general, which makes their computation so difficult. Let us test a few of them in different bases.

The Kronecker product of any homogeneous symmetric function \(f\) of degree \(n\) with the \(n\)-th complete homogeneous symmetric function h[n] (a.k.a. s[n]) is \(f\):

sage: h = SymmetricFunctions(ZZ).h()
sage: all( h([5]).itensor(h(p)) == h(p) for p in Partitions(5) )
True
>>> from sage.all import *
>>> h = SymmetricFunctions(ZZ).h()
>>> all( h([Integer(5)]).itensor(h(p)) == h(p) for p in Partitions(Integer(5)) )
True

The Kronecker product of a Schur function \(s_{\lambda}\) with the \(n\)-th elementary symmetric function e[n], where \(n = \left| \lambda \right|\), is \(s_{\lambda'}\) (where \(\lambda'\) is the conjugate partition of \(\lambda\)):

sage: F = CyclotomicField(12)
sage: s = SymmetricFunctions(F).s()
sage: e = SymmetricFunctions(F).e()
sage: all( e([5]).itensor(s(p)) == s(p.conjugate()) for p in Partitions(5) )
True
>>> from sage.all import *
>>> F = CyclotomicField(Integer(12))
>>> s = SymmetricFunctions(F).s()
>>> e = SymmetricFunctions(F).e()
>>> all( e([Integer(5)]).itensor(s(p)) == s(p.conjugate()) for p in Partitions(Integer(5)) )
True

The Kronecker product is commutative:

sage: e = SymmetricFunctions(FiniteField(19)).e()
sage: m = SymmetricFunctions(FiniteField(19)).m()
sage: all( all( e(p).itensor(m(q)) == m(q).itensor(e(p)) for q in Partitions(4) )
....:      for p in Partitions(4) )
True

sage: F = FractionField(QQ['q','t'])
sage: mq = SymmetricFunctions(F).macdonald().Q()
sage: mh = SymmetricFunctions(F).macdonald().H()
sage: all( all( mq(p).itensor(mh(r)) == mh(r).itensor(mq(p))   # long time
....:           for r in Partitions(4) )
....:      for p in Partitions(3) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(FiniteField(Integer(19))).e()
>>> m = SymmetricFunctions(FiniteField(Integer(19))).m()
>>> all( all( e(p).itensor(m(q)) == m(q).itensor(e(p)) for q in Partitions(Integer(4)) )
...      for p in Partitions(Integer(4)) )
True

>>> F = FractionField(QQ['q','t'])
>>> mq = SymmetricFunctions(F).macdonald().Q()
>>> mh = SymmetricFunctions(F).macdonald().H()
>>> all( all( mq(p).itensor(mh(r)) == mh(r).itensor(mq(p))   # long time
...           for r in Partitions(Integer(4)) )
...      for p in Partitions(Integer(3)) )
True

Let us check (on examples) Proposition 5.2 of Gelfand, Krob, Lascoux, Leclerc, Retakh, Thibon, “Noncommutative symmetric functions”, arXiv hep-th/9407124, for \(r = 2\):

sage: e = SymmetricFunctions(FiniteField(29)).e()
sage: s = SymmetricFunctions(FiniteField(29)).s()
sage: m = SymmetricFunctions(FiniteField(29)).m()
sage: def tensor_copr(u, v, w):  # computes \mu ((u \otimes v) * \Delta(w)) with
....:                            # * meaning Kronecker product and \mu meaning the
....:                            # usual multiplication.
....:     result = w.parent().zero()
....:     for partition_pair, coeff in w.coproduct():
....:         result += coeff * w.parent()(u).itensor(partition_pair[0]) * w.parent()(v).itensor(partition_pair[1])
....:     return result
sage: all( all( all( tensor_copr(e[u], s[v], m[w])   # long time
....:                == (e[u] * s[v]).itensor(m[w])
....:                for w in Partitions(5) )
....:           for v in Partitions(2) )
....:      for u in Partitions(3) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(FiniteField(Integer(29))).e()
>>> s = SymmetricFunctions(FiniteField(Integer(29))).s()
>>> m = SymmetricFunctions(FiniteField(Integer(29))).m()
>>> def tensor_copr(u, v, w):  # computes \mu ((u \otimes v) * \Delta(w)) with
...                            # * meaning Kronecker product and \mu meaning the
...                            # usual multiplication.
...     result = w.parent().zero()
...     for partition_pair, coeff in w.coproduct():
...         result += coeff * w.parent()(u).itensor(partition_pair[Integer(0)]) * w.parent()(v).itensor(partition_pair[Integer(1)])
...     return result
>>> all( all( all( tensor_copr(e[u], s[v], m[w])   # long time
...                == (e[u] * s[v]).itensor(m[w])
...                for w in Partitions(Integer(5)) )
...           for v in Partitions(Integer(2)) )
...      for u in Partitions(Integer(3)) )
True

Some examples from Briand, Orellana, Rosas, “The stability of the Kronecker products of Schur functions.” arXiv 0907.4652:

sage: s = SymmetricFunctions(ZZ).s()
sage: s[2,2].itensor(s[2,2])
s[1, 1, 1, 1] + s[2, 2] + s[4]
sage: s[3,2].itensor(s[3,2])
s[2, 1, 1, 1] + s[2, 2, 1] + s[3, 1, 1] + s[3, 2] + s[4, 1] + s[5]
sage: s[4,2].itensor(s[4,2])
s[2, 2, 2] + s[3, 1, 1, 1] + 2*s[3, 2, 1] + s[4, 1, 1] + 2*s[4, 2] + s[5, 1] + s[6]
>>> from sage.all import *
>>> s = SymmetricFunctions(ZZ).s()
>>> s[Integer(2),Integer(2)].itensor(s[Integer(2),Integer(2)])
s[1, 1, 1, 1] + s[2, 2] + s[4]
>>> s[Integer(3),Integer(2)].itensor(s[Integer(3),Integer(2)])
s[2, 1, 1, 1] + s[2, 2, 1] + s[3, 1, 1] + s[3, 2] + s[4, 1] + s[5]
>>> s[Integer(4),Integer(2)].itensor(s[Integer(4),Integer(2)])
s[2, 2, 2] + s[3, 1, 1, 1] + 2*s[3, 2, 1] + s[4, 1, 1] + 2*s[4, 2] + s[5, 1] + s[6]

An example from p. 220 of Thibon, “Hopf algebras of symmetric functions and tensor products of symmetric group representations”, International Journal of Algebra and Computation, 1991:

sage: s = SymmetricFunctions(QQbar).s()
sage: s[2,1].itensor(s[2,1])
s[1, 1, 1] + s[2, 1] + s[3]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQbar).s()
>>> s[Integer(2),Integer(1)].itensor(s[Integer(2),Integer(1)])
s[1, 1, 1] + s[2, 1] + s[3]

Note

The currently existing implementation of this function is technically unsatisfactory. It distinguishes the case when the base ring is a \(\QQ\)-algebra (in which case the Kronecker product can be easily computed using the power sum basis) from the case where it isn’t. In the latter, it does a computation using universal coefficients, again distinguishing the case when it is able to compute the “corresponding” basis of the symmetric function algebra over \(\QQ\) (using the corresponding_basis_over hack) from the case when it isn’t (in which case it transforms everything into the Schur basis, which is slow).

internal_coproduct()[source]#

Return the inner coproduct of self in the basis of self.

The inner coproduct (also known as the Kronecker coproduct, as the internal coproduct, or as the second comultiplication on the ring of symmetric functions) is a ring homomorphism \(\Delta^\times\) from the ring of symmetric functions to the tensor product (over the base ring) of this ring with itself. It is uniquely characterized by the formula

\[\Delta^{\times}(h_n) = \sum_{\lambda \vdash n} s_{\lambda} \otimes s_{\lambda} = \sum_{\lambda \vdash n} h_{\lambda} \otimes m_{\lambda} = \sum_{\lambda \vdash n} m_{\lambda} \otimes h_{\lambda},\]

where \(\lambda \vdash n\) means \(\lambda\) is a partition of \(n\), and \(n\) is any nonnegative integer. It also satisfies

\[\Delta^\times (p_n) = p_n \otimes p_n\]

for any positive integer \(n\). If the base ring is a \(\QQ\)-algebra, it also satisfies

\[\Delta^{\times}(h_n) = \sum_{\lambda \vdash n} z_{\lambda}^{-1} p_{\lambda} \otimes p_{\lambda},\]

where

\[z_{\lambda} = \prod_{i=1}^\infty i^{m_i(\lambda)} m_i(\lambda)!\]

with \(m_i(\lambda)\) meaning the number of appearances of \(i\) in \(\lambda\) (see zee()).

The method kronecker_coproduct() is a synonym of internal_coproduct().

EXAMPLES:

sage: s = SymmetricFunctions(ZZ).s()
sage: a = s([2,1])
sage: a.internal_coproduct()
s[1, 1, 1] # s[2, 1] + s[2, 1] # s[1, 1, 1] + s[2, 1] # s[2, 1] + s[2, 1] # s[3] + s[3] # s[2, 1]

sage: e = SymmetricFunctions(QQ).e()
sage: b = e([2])
sage: b.internal_coproduct()
e[1, 1] # e[2] + e[2] # e[1, 1] - 2*e[2] # e[2]
>>> from sage.all import *
>>> s = SymmetricFunctions(ZZ).s()
>>> a = s([Integer(2),Integer(1)])
>>> a.internal_coproduct()
s[1, 1, 1] # s[2, 1] + s[2, 1] # s[1, 1, 1] + s[2, 1] # s[2, 1] + s[2, 1] # s[3] + s[3] # s[2, 1]

>>> e = SymmetricFunctions(QQ).e()
>>> b = e([Integer(2)])
>>> b.internal_coproduct()
e[1, 1] # e[2] + e[2] # e[1, 1] - 2*e[2] # e[2]

The internal coproduct is adjoint to the internal product with respect to the Hall inner product: Any three symmetric functions \(f\), \(g\) and \(h\) satisfy \(\langle f * g, h \rangle = \sum_i \langle f, h^{\prime}_i \rangle \langle g, h^{\prime\prime}_i \rangle\), where we write \(\Delta^{\times}(h)\) as \(\sum_i h^{\prime}_i \otimes h^{\prime\prime}_i\). Let us check this in degree \(4\):

sage: e = SymmetricFunctions(FiniteField(29)).e()
sage: s = SymmetricFunctions(FiniteField(29)).s()
sage: m = SymmetricFunctions(FiniteField(29)).m()
sage: def tensor_incopr(f, g, h):  # computes \sum_i \left< f, h'_i \right> \left< g, h''_i \right>
....:     result = h.base_ring().zero()
....:     for partition_pair, coeff in h.internal_coproduct():
....:         result += coeff * h.parent()(f).scalar(partition_pair[0]) * h.parent()(g).scalar(partition_pair[1])
....:     return result
sage: all( all( all( tensor_incopr(e[u], s[v], m[w]) == (e[u].itensor(s[v])).scalar(m[w])  # long time (10s on sage.math, 2013)
....:                for w in Partitions(5) )
....:           for v in Partitions(2) )
....:      for u in Partitions(3) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(FiniteField(Integer(29))).e()
>>> s = SymmetricFunctions(FiniteField(Integer(29))).s()
>>> m = SymmetricFunctions(FiniteField(Integer(29))).m()
>>> def tensor_incopr(f, g, h):  # computes \sum_i \left< f, h'_i \right> \left< g, h''_i \right>
...     result = h.base_ring().zero()
...     for partition_pair, coeff in h.internal_coproduct():
...         result += coeff * h.parent()(f).scalar(partition_pair[Integer(0)]) * h.parent()(g).scalar(partition_pair[Integer(1)])
...     return result
>>> all( all( all( tensor_incopr(e[u], s[v], m[w]) == (e[u].itensor(s[v])).scalar(m[w])  # long time (10s on sage.math, 2013)
...                for w in Partitions(Integer(5)) )
...           for v in Partitions(Integer(2)) )
...      for u in Partitions(Integer(3)) )
True

Let us check the formulas for \(\Delta^{\times}(h_n)\) and \(\Delta^{\times}(p_n)\) given in the description of this method:

sage: e = SymmetricFunctions(QQ).e()
sage: p = SymmetricFunctions(QQ).p()
sage: h = SymmetricFunctions(QQ).h()
sage: s = SymmetricFunctions(QQ).s()
sage: all( s(h([n])).internal_coproduct() == sum([tensor([s(lam), s(lam)]) for lam in Partitions(n)])
....:      for n in range(6) )
True
sage: all( h([n]).internal_coproduct() == sum([tensor([h(lam), h(m(lam))]) for lam in Partitions(n)])
....:      for n in range(6) )
True
sage: all( factorial(n) * h([n]).internal_coproduct()
....:      == sum([lam.conjugacy_class_size() * tensor([h(p(lam)), h(p(lam))])
....:              for lam in Partitions(n)])
....:      for n in range(6) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(QQ).e()
>>> p = SymmetricFunctions(QQ).p()
>>> h = SymmetricFunctions(QQ).h()
>>> s = SymmetricFunctions(QQ).s()
>>> all( s(h([n])).internal_coproduct() == sum([tensor([s(lam), s(lam)]) for lam in Partitions(n)])
...      for n in range(Integer(6)) )
True
>>> all( h([n]).internal_coproduct() == sum([tensor([h(lam), h(m(lam))]) for lam in Partitions(n)])
...      for n in range(Integer(6)) )
True
>>> all( factorial(n) * h([n]).internal_coproduct()
...      == sum([lam.conjugacy_class_size() * tensor([h(p(lam)), h(p(lam))])
...              for lam in Partitions(n)])
...      for n in range(Integer(6)) )
True
internal_product(x)[source]#

Return the internal (tensor) product of self and x in the basis of self.

The internal tensor product can be defined as the linear extension of the definition on power sums \(p_{\lambda} \ast 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 )\) and where \(\ast\) denotes the internal tensor product. The internal tensor product is also known as the Kronecker product, or as the second multiplication on the ring of symmetric functions.

Note that the internal product of any two homogeneous symmetric functions of equal degrees is a homogeneous symmetric function of the same degree. On the other hand, the internal product of two homogeneous symmetric functions of distinct degrees is \(0\).

Note

The internal product is sometimes referred to as “inner product” in the literature, but unfortunately this name is shared by a different operation, namely the Hall inner product (see scalar()).

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

OUTPUT:

  • the internal product of self with x (an element of the ring of symmetric functions in the same basis as self)

The methods itensor(), internal_product(), 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]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> a = s([Integer(2),Integer(1)])
>>> b = s([Integer(3)])
>>> a.itensor(b)
s[2, 1]
>>> c = s([Integer(3),Integer(2),Integer(1)])
>>> 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]

There are few quantitative results pertaining to Kronecker products in general, which makes their computation so difficult. Let us test a few of them in different bases.

The Kronecker product of any homogeneous symmetric function \(f\) of degree \(n\) with the \(n\)-th complete homogeneous symmetric function h[n] (a.k.a. s[n]) is \(f\):

sage: h = SymmetricFunctions(ZZ).h()
sage: all( h([5]).itensor(h(p)) == h(p) for p in Partitions(5) )
True
>>> from sage.all import *
>>> h = SymmetricFunctions(ZZ).h()
>>> all( h([Integer(5)]).itensor(h(p)) == h(p) for p in Partitions(Integer(5)) )
True

The Kronecker product of a Schur function \(s_{\lambda}\) with the \(n\)-th elementary symmetric function e[n], where \(n = \left| \lambda \right|\), is \(s_{\lambda'}\) (where \(\lambda'\) is the conjugate partition of \(\lambda\)):

sage: F = CyclotomicField(12)
sage: s = SymmetricFunctions(F).s()
sage: e = SymmetricFunctions(F).e()
sage: all( e([5]).itensor(s(p)) == s(p.conjugate()) for p in Partitions(5) )
True
>>> from sage.all import *
>>> F = CyclotomicField(Integer(12))
>>> s = SymmetricFunctions(F).s()
>>> e = SymmetricFunctions(F).e()
>>> all( e([Integer(5)]).itensor(s(p)) == s(p.conjugate()) for p in Partitions(Integer(5)) )
True

The Kronecker product is commutative:

sage: e = SymmetricFunctions(FiniteField(19)).e()
sage: m = SymmetricFunctions(FiniteField(19)).m()
sage: all( all( e(p).itensor(m(q)) == m(q).itensor(e(p)) for q in Partitions(4) )
....:      for p in Partitions(4) )
True

sage: F = FractionField(QQ['q','t'])
sage: mq = SymmetricFunctions(F).macdonald().Q()
sage: mh = SymmetricFunctions(F).macdonald().H()
sage: all( all( mq(p).itensor(mh(r)) == mh(r).itensor(mq(p))   # long time
....:           for r in Partitions(4) )
....:      for p in Partitions(3) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(FiniteField(Integer(19))).e()
>>> m = SymmetricFunctions(FiniteField(Integer(19))).m()
>>> all( all( e(p).itensor(m(q)) == m(q).itensor(e(p)) for q in Partitions(Integer(4)) )
...      for p in Partitions(Integer(4)) )
True

>>> F = FractionField(QQ['q','t'])
>>> mq = SymmetricFunctions(F).macdonald().Q()
>>> mh = SymmetricFunctions(F).macdonald().H()
>>> all( all( mq(p).itensor(mh(r)) == mh(r).itensor(mq(p))   # long time
...           for r in Partitions(Integer(4)) )
...      for p in Partitions(Integer(3)) )
True

Let us check (on examples) Proposition 5.2 of Gelfand, Krob, Lascoux, Leclerc, Retakh, Thibon, “Noncommutative symmetric functions”, arXiv hep-th/9407124, for \(r = 2\):

sage: e = SymmetricFunctions(FiniteField(29)).e()
sage: s = SymmetricFunctions(FiniteField(29)).s()
sage: m = SymmetricFunctions(FiniteField(29)).m()
sage: def tensor_copr(u, v, w):  # computes \mu ((u \otimes v) * \Delta(w)) with
....:                            # * meaning Kronecker product and \mu meaning the
....:                            # usual multiplication.
....:     result = w.parent().zero()
....:     for partition_pair, coeff in w.coproduct():
....:         result += coeff * w.parent()(u).itensor(partition_pair[0]) * w.parent()(v).itensor(partition_pair[1])
....:     return result
sage: all( all( all( tensor_copr(e[u], s[v], m[w])   # long time
....:                == (e[u] * s[v]).itensor(m[w])
....:                for w in Partitions(5) )
....:           for v in Partitions(2) )
....:      for u in Partitions(3) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(FiniteField(Integer(29))).e()
>>> s = SymmetricFunctions(FiniteField(Integer(29))).s()
>>> m = SymmetricFunctions(FiniteField(Integer(29))).m()
>>> def tensor_copr(u, v, w):  # computes \mu ((u \otimes v) * \Delta(w)) with
...                            # * meaning Kronecker product and \mu meaning the
...                            # usual multiplication.
...     result = w.parent().zero()
...     for partition_pair, coeff in w.coproduct():
...         result += coeff * w.parent()(u).itensor(partition_pair[Integer(0)]) * w.parent()(v).itensor(partition_pair[Integer(1)])
...     return result
>>> all( all( all( tensor_copr(e[u], s[v], m[w])   # long time
...                == (e[u] * s[v]).itensor(m[w])
...                for w in Partitions(Integer(5)) )
...           for v in Partitions(Integer(2)) )
...      for u in Partitions(Integer(3)) )
True

Some examples from Briand, Orellana, Rosas, “The stability of the Kronecker products of Schur functions.” arXiv 0907.4652:

sage: s = SymmetricFunctions(ZZ).s()
sage: s[2,2].itensor(s[2,2])
s[1, 1, 1, 1] + s[2, 2] + s[4]
sage: s[3,2].itensor(s[3,2])
s[2, 1, 1, 1] + s[2, 2, 1] + s[3, 1, 1] + s[3, 2] + s[4, 1] + s[5]
sage: s[4,2].itensor(s[4,2])
s[2, 2, 2] + s[3, 1, 1, 1] + 2*s[3, 2, 1] + s[4, 1, 1] + 2*s[4, 2] + s[5, 1] + s[6]
>>> from sage.all import *
>>> s = SymmetricFunctions(ZZ).s()
>>> s[Integer(2),Integer(2)].itensor(s[Integer(2),Integer(2)])
s[1, 1, 1, 1] + s[2, 2] + s[4]
>>> s[Integer(3),Integer(2)].itensor(s[Integer(3),Integer(2)])
s[2, 1, 1, 1] + s[2, 2, 1] + s[3, 1, 1] + s[3, 2] + s[4, 1] + s[5]
>>> s[Integer(4),Integer(2)].itensor(s[Integer(4),Integer(2)])
s[2, 2, 2] + s[3, 1, 1, 1] + 2*s[3, 2, 1] + s[4, 1, 1] + 2*s[4, 2] + s[5, 1] + s[6]

An example from p. 220 of Thibon, “Hopf algebras of symmetric functions and tensor products of symmetric group representations”, International Journal of Algebra and Computation, 1991:

sage: s = SymmetricFunctions(QQbar).s()
sage: s[2,1].itensor(s[2,1])
s[1, 1, 1] + s[2, 1] + s[3]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQbar).s()
>>> s[Integer(2),Integer(1)].itensor(s[Integer(2),Integer(1)])
s[1, 1, 1] + s[2, 1] + s[3]

Note

The currently existing implementation of this function is technically unsatisfactory. It distinguishes the case when the base ring is a \(\QQ\)-algebra (in which case the Kronecker product can be easily computed using the power sum basis) from the case where it isn’t. In the latter, it does a computation using universal coefficients, again distinguishing the case when it is able to compute the “corresponding” basis of the symmetric function algebra over \(\QQ\) (using the corresponding_basis_over hack) from the case when it isn’t (in which case it transforms everything into the Schur basis, which is slow).

is_schur_positive()[source]#

Return 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 = 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
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> a = s([Integer(2),Integer(1)]) + s([Integer(3)])
>>> a.is_schur_positive()
True
>>> a = s([Integer(2),Integer(1)]) - s([Integer(3)])
>>> 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
>>> from sage.all import *
>>> QQx = QQ['x']
>>> s = SymmetricFunctions(QQx).s()
>>> x = QQx.gen()
>>> a = (Integer(1)+x)*s([Integer(2),Integer(1)])
>>> a.is_schur_positive()
True
>>> a = (Integer(1)-x)*s([Integer(2),Integer(1)])
>>> a.is_schur_positive()
False
>>> s(Integer(0)).is_schur_positive()
True
>>> s(Integer(1)+x).is_schur_positive()
True
itensor(x)[source]#

Return the internal (tensor) product of self and x in the basis of self.

The internal tensor product can be defined as the linear extension of the definition on power sums \(p_{\lambda} \ast 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 )\) and where \(\ast\) denotes the internal tensor product. The internal tensor product is also known as the Kronecker product, or as the second multiplication on the ring of symmetric functions.

Note that the internal product of any two homogeneous symmetric functions of equal degrees is a homogeneous symmetric function of the same degree. On the other hand, the internal product of two homogeneous symmetric functions of distinct degrees is \(0\).

Note

The internal product is sometimes referred to as “inner product” in the literature, but unfortunately this name is shared by a different operation, namely the Hall inner product (see scalar()).

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

OUTPUT:

  • the internal product of self with x (an element of the ring of symmetric functions in the same basis as self)

The methods itensor(), internal_product(), 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]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> a = s([Integer(2),Integer(1)])
>>> b = s([Integer(3)])
>>> a.itensor(b)
s[2, 1]
>>> c = s([Integer(3),Integer(2),Integer(1)])
>>> 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]

There are few quantitative results pertaining to Kronecker products in general, which makes their computation so difficult. Let us test a few of them in different bases.

The Kronecker product of any homogeneous symmetric function \(f\) of degree \(n\) with the \(n\)-th complete homogeneous symmetric function h[n] (a.k.a. s[n]) is \(f\):

sage: h = SymmetricFunctions(ZZ).h()
sage: all( h([5]).itensor(h(p)) == h(p) for p in Partitions(5) )
True
>>> from sage.all import *
>>> h = SymmetricFunctions(ZZ).h()
>>> all( h([Integer(5)]).itensor(h(p)) == h(p) for p in Partitions(Integer(5)) )
True

The Kronecker product of a Schur function \(s_{\lambda}\) with the \(n\)-th elementary symmetric function e[n], where \(n = \left| \lambda \right|\), is \(s_{\lambda'}\) (where \(\lambda'\) is the conjugate partition of \(\lambda\)):

sage: F = CyclotomicField(12)
sage: s = SymmetricFunctions(F).s()
sage: e = SymmetricFunctions(F).e()
sage: all( e([5]).itensor(s(p)) == s(p.conjugate()) for p in Partitions(5) )
True
>>> from sage.all import *
>>> F = CyclotomicField(Integer(12))
>>> s = SymmetricFunctions(F).s()
>>> e = SymmetricFunctions(F).e()
>>> all( e([Integer(5)]).itensor(s(p)) == s(p.conjugate()) for p in Partitions(Integer(5)) )
True

The Kronecker product is commutative:

sage: e = SymmetricFunctions(FiniteField(19)).e()
sage: m = SymmetricFunctions(FiniteField(19)).m()
sage: all( all( e(p).itensor(m(q)) == m(q).itensor(e(p)) for q in Partitions(4) )
....:      for p in Partitions(4) )
True

sage: F = FractionField(QQ['q','t'])
sage: mq = SymmetricFunctions(F).macdonald().Q()
sage: mh = SymmetricFunctions(F).macdonald().H()
sage: all( all( mq(p).itensor(mh(r)) == mh(r).itensor(mq(p))   # long time
....:           for r in Partitions(4) )
....:      for p in Partitions(3) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(FiniteField(Integer(19))).e()
>>> m = SymmetricFunctions(FiniteField(Integer(19))).m()
>>> all( all( e(p).itensor(m(q)) == m(q).itensor(e(p)) for q in Partitions(Integer(4)) )
...      for p in Partitions(Integer(4)) )
True

>>> F = FractionField(QQ['q','t'])
>>> mq = SymmetricFunctions(F).macdonald().Q()
>>> mh = SymmetricFunctions(F).macdonald().H()
>>> all( all( mq(p).itensor(mh(r)) == mh(r).itensor(mq(p))   # long time
...           for r in Partitions(Integer(4)) )
...      for p in Partitions(Integer(3)) )
True

Let us check (on examples) Proposition 5.2 of Gelfand, Krob, Lascoux, Leclerc, Retakh, Thibon, “Noncommutative symmetric functions”, arXiv hep-th/9407124, for \(r = 2\):

sage: e = SymmetricFunctions(FiniteField(29)).e()
sage: s = SymmetricFunctions(FiniteField(29)).s()
sage: m = SymmetricFunctions(FiniteField(29)).m()
sage: def tensor_copr(u, v, w):  # computes \mu ((u \otimes v) * \Delta(w)) with
....:                            # * meaning Kronecker product and \mu meaning the
....:                            # usual multiplication.
....:     result = w.parent().zero()
....:     for partition_pair, coeff in w.coproduct():
....:         result += coeff * w.parent()(u).itensor(partition_pair[0]) * w.parent()(v).itensor(partition_pair[1])
....:     return result
sage: all( all( all( tensor_copr(e[u], s[v], m[w])   # long time
....:                == (e[u] * s[v]).itensor(m[w])
....:                for w in Partitions(5) )
....:           for v in Partitions(2) )
....:      for u in Partitions(3) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(FiniteField(Integer(29))).e()
>>> s = SymmetricFunctions(FiniteField(Integer(29))).s()
>>> m = SymmetricFunctions(FiniteField(Integer(29))).m()
>>> def tensor_copr(u, v, w):  # computes \mu ((u \otimes v) * \Delta(w)) with
...                            # * meaning Kronecker product and \mu meaning the
...                            # usual multiplication.
...     result = w.parent().zero()
...     for partition_pair, coeff in w.coproduct():
...         result += coeff * w.parent()(u).itensor(partition_pair[Integer(0)]) * w.parent()(v).itensor(partition_pair[Integer(1)])
...     return result
>>> all( all( all( tensor_copr(e[u], s[v], m[w])   # long time
...                == (e[u] * s[v]).itensor(m[w])
...                for w in Partitions(Integer(5)) )
...           for v in Partitions(Integer(2)) )
...      for u in Partitions(Integer(3)) )
True

Some examples from Briand, Orellana, Rosas, “The stability of the Kronecker products of Schur functions.” arXiv 0907.4652:

sage: s = SymmetricFunctions(ZZ).s()
sage: s[2,2].itensor(s[2,2])
s[1, 1, 1, 1] + s[2, 2] + s[4]
sage: s[3,2].itensor(s[3,2])
s[2, 1, 1, 1] + s[2, 2, 1] + s[3, 1, 1] + s[3, 2] + s[4, 1] + s[5]
sage: s[4,2].itensor(s[4,2])
s[2, 2, 2] + s[3, 1, 1, 1] + 2*s[3, 2, 1] + s[4, 1, 1] + 2*s[4, 2] + s[5, 1] + s[6]
>>> from sage.all import *
>>> s = SymmetricFunctions(ZZ).s()
>>> s[Integer(2),Integer(2)].itensor(s[Integer(2),Integer(2)])
s[1, 1, 1, 1] + s[2, 2] + s[4]
>>> s[Integer(3),Integer(2)].itensor(s[Integer(3),Integer(2)])
s[2, 1, 1, 1] + s[2, 2, 1] + s[3, 1, 1] + s[3, 2] + s[4, 1] + s[5]
>>> s[Integer(4),Integer(2)].itensor(s[Integer(4),Integer(2)])
s[2, 2, 2] + s[3, 1, 1, 1] + 2*s[3, 2, 1] + s[4, 1, 1] + 2*s[4, 2] + s[5, 1] + s[6]

An example from p. 220 of Thibon, “Hopf algebras of symmetric functions and tensor products of symmetric group representations”, International Journal of Algebra and Computation, 1991:

sage: s = SymmetricFunctions(QQbar).s()
sage: s[2,1].itensor(s[2,1])
s[1, 1, 1] + s[2, 1] + s[3]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQbar).s()
>>> s[Integer(2),Integer(1)].itensor(s[Integer(2),Integer(1)])
s[1, 1, 1] + s[2, 1] + s[3]

Note

The currently existing implementation of this function is technically unsatisfactory. It distinguishes the case when the base ring is a \(\QQ\)-algebra (in which case the Kronecker product can be easily computed using the power sum basis) from the case where it isn’t. In the latter, it does a computation using universal coefficients, again distinguishing the case when it is able to compute the “corresponding” basis of the symmetric function algebra over \(\QQ\) (using the corresponding_basis_over hack) from the case when it isn’t (in which case it transforms everything into the Schur basis, which is slow).

kronecker_coproduct()[source]#

Return the inner coproduct of self in the basis of self.

The inner coproduct (also known as the Kronecker coproduct, as the internal coproduct, or as the second comultiplication on the ring of symmetric functions) is a ring homomorphism \(\Delta^\times\) from the ring of symmetric functions to the tensor product (over the base ring) of this ring with itself. It is uniquely characterized by the formula

\[\Delta^{\times}(h_n) = \sum_{\lambda \vdash n} s_{\lambda} \otimes s_{\lambda} = \sum_{\lambda \vdash n} h_{\lambda} \otimes m_{\lambda} = \sum_{\lambda \vdash n} m_{\lambda} \otimes h_{\lambda},\]

where \(\lambda \vdash n\) means \(\lambda\) is a partition of \(n\), and \(n\) is any nonnegative integer. It also satisfies

\[\Delta^\times (p_n) = p_n \otimes p_n\]

for any positive integer \(n\). If the base ring is a \(\QQ\)-algebra, it also satisfies

\[\Delta^{\times}(h_n) = \sum_{\lambda \vdash n} z_{\lambda}^{-1} p_{\lambda} \otimes p_{\lambda},\]

where

\[z_{\lambda} = \prod_{i=1}^\infty i^{m_i(\lambda)} m_i(\lambda)!\]

with \(m_i(\lambda)\) meaning the number of appearances of \(i\) in \(\lambda\) (see zee()).

The method kronecker_coproduct() is a synonym of internal_coproduct().

EXAMPLES:

sage: s = SymmetricFunctions(ZZ).s()
sage: a = s([2,1])
sage: a.internal_coproduct()
s[1, 1, 1] # s[2, 1] + s[2, 1] # s[1, 1, 1] + s[2, 1] # s[2, 1] + s[2, 1] # s[3] + s[3] # s[2, 1]

sage: e = SymmetricFunctions(QQ).e()
sage: b = e([2])
sage: b.internal_coproduct()
e[1, 1] # e[2] + e[2] # e[1, 1] - 2*e[2] # e[2]
>>> from sage.all import *
>>> s = SymmetricFunctions(ZZ).s()
>>> a = s([Integer(2),Integer(1)])
>>> a.internal_coproduct()
s[1, 1, 1] # s[2, 1] + s[2, 1] # s[1, 1, 1] + s[2, 1] # s[2, 1] + s[2, 1] # s[3] + s[3] # s[2, 1]

>>> e = SymmetricFunctions(QQ).e()
>>> b = e([Integer(2)])
>>> b.internal_coproduct()
e[1, 1] # e[2] + e[2] # e[1, 1] - 2*e[2] # e[2]

The internal coproduct is adjoint to the internal product with respect to the Hall inner product: Any three symmetric functions \(f\), \(g\) and \(h\) satisfy \(\langle f * g, h \rangle = \sum_i \langle f, h^{\prime}_i \rangle \langle g, h^{\prime\prime}_i \rangle\), where we write \(\Delta^{\times}(h)\) as \(\sum_i h^{\prime}_i \otimes h^{\prime\prime}_i\). Let us check this in degree \(4\):

sage: e = SymmetricFunctions(FiniteField(29)).e()
sage: s = SymmetricFunctions(FiniteField(29)).s()
sage: m = SymmetricFunctions(FiniteField(29)).m()
sage: def tensor_incopr(f, g, h):  # computes \sum_i \left< f, h'_i \right> \left< g, h''_i \right>
....:     result = h.base_ring().zero()
....:     for partition_pair, coeff in h.internal_coproduct():
....:         result += coeff * h.parent()(f).scalar(partition_pair[0]) * h.parent()(g).scalar(partition_pair[1])
....:     return result
sage: all( all( all( tensor_incopr(e[u], s[v], m[w]) == (e[u].itensor(s[v])).scalar(m[w])  # long time (10s on sage.math, 2013)
....:                for w in Partitions(5) )
....:           for v in Partitions(2) )
....:      for u in Partitions(3) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(FiniteField(Integer(29))).e()
>>> s = SymmetricFunctions(FiniteField(Integer(29))).s()
>>> m = SymmetricFunctions(FiniteField(Integer(29))).m()
>>> def tensor_incopr(f, g, h):  # computes \sum_i \left< f, h'_i \right> \left< g, h''_i \right>
...     result = h.base_ring().zero()
...     for partition_pair, coeff in h.internal_coproduct():
...         result += coeff * h.parent()(f).scalar(partition_pair[Integer(0)]) * h.parent()(g).scalar(partition_pair[Integer(1)])
...     return result
>>> all( all( all( tensor_incopr(e[u], s[v], m[w]) == (e[u].itensor(s[v])).scalar(m[w])  # long time (10s on sage.math, 2013)
...                for w in Partitions(Integer(5)) )
...           for v in Partitions(Integer(2)) )
...      for u in Partitions(Integer(3)) )
True

Let us check the formulas for \(\Delta^{\times}(h_n)\) and \(\Delta^{\times}(p_n)\) given in the description of this method:

sage: e = SymmetricFunctions(QQ).e()
sage: p = SymmetricFunctions(QQ).p()
sage: h = SymmetricFunctions(QQ).h()
sage: s = SymmetricFunctions(QQ).s()
sage: all( s(h([n])).internal_coproduct() == sum([tensor([s(lam), s(lam)]) for lam in Partitions(n)])
....:      for n in range(6) )
True
sage: all( h([n]).internal_coproduct() == sum([tensor([h(lam), h(m(lam))]) for lam in Partitions(n)])
....:      for n in range(6) )
True
sage: all( factorial(n) * h([n]).internal_coproduct()
....:      == sum([lam.conjugacy_class_size() * tensor([h(p(lam)), h(p(lam))])
....:              for lam in Partitions(n)])
....:      for n in range(6) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(QQ).e()
>>> p = SymmetricFunctions(QQ).p()
>>> h = SymmetricFunctions(QQ).h()
>>> s = SymmetricFunctions(QQ).s()
>>> all( s(h([n])).internal_coproduct() == sum([tensor([s(lam), s(lam)]) for lam in Partitions(n)])
...      for n in range(Integer(6)) )
True
>>> all( h([n]).internal_coproduct() == sum([tensor([h(lam), h(m(lam))]) for lam in Partitions(n)])
...      for n in range(Integer(6)) )
True
>>> all( factorial(n) * h([n]).internal_coproduct()
...      == sum([lam.conjugacy_class_size() * tensor([h(p(lam)), h(p(lam))])
...              for lam in Partitions(n)])
...      for n in range(Integer(6)) )
True
kronecker_product(x)[source]#

Return the internal (tensor) product of self and x in the basis of self.

The internal tensor product can be defined as the linear extension of the definition on power sums \(p_{\lambda} \ast 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 )\) and where \(\ast\) denotes the internal tensor product. The internal tensor product is also known as the Kronecker product, or as the second multiplication on the ring of symmetric functions.

Note that the internal product of any two homogeneous symmetric functions of equal degrees is a homogeneous symmetric function of the same degree. On the other hand, the internal product of two homogeneous symmetric functions of distinct degrees is \(0\).

Note

The internal product is sometimes referred to as “inner product” in the literature, but unfortunately this name is shared by a different operation, namely the Hall inner product (see scalar()).

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

OUTPUT:

  • the internal product of self with x (an element of the ring of symmetric functions in the same basis as self)

The methods itensor(), internal_product(), 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]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> a = s([Integer(2),Integer(1)])
>>> b = s([Integer(3)])
>>> a.itensor(b)
s[2, 1]
>>> c = s([Integer(3),Integer(2),Integer(1)])
>>> 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]

There are few quantitative results pertaining to Kronecker products in general, which makes their computation so difficult. Let us test a few of them in different bases.

The Kronecker product of any homogeneous symmetric function \(f\) of degree \(n\) with the \(n\)-th complete homogeneous symmetric function h[n] (a.k.a. s[n]) is \(f\):

sage: h = SymmetricFunctions(ZZ).h()
sage: all( h([5]).itensor(h(p)) == h(p) for p in Partitions(5) )
True
>>> from sage.all import *
>>> h = SymmetricFunctions(ZZ).h()
>>> all( h([Integer(5)]).itensor(h(p)) == h(p) for p in Partitions(Integer(5)) )
True

The Kronecker product of a Schur function \(s_{\lambda}\) with the \(n\)-th elementary symmetric function e[n], where \(n = \left| \lambda \right|\), is \(s_{\lambda'}\) (where \(\lambda'\) is the conjugate partition of \(\lambda\)):

sage: F = CyclotomicField(12)
sage: s = SymmetricFunctions(F).s()
sage: e = SymmetricFunctions(F).e()
sage: all( e([5]).itensor(s(p)) == s(p.conjugate()) for p in Partitions(5) )
True
>>> from sage.all import *
>>> F = CyclotomicField(Integer(12))
>>> s = SymmetricFunctions(F).s()
>>> e = SymmetricFunctions(F).e()
>>> all( e([Integer(5)]).itensor(s(p)) == s(p.conjugate()) for p in Partitions(Integer(5)) )
True

The Kronecker product is commutative:

sage: e = SymmetricFunctions(FiniteField(19)).e()
sage: m = SymmetricFunctions(FiniteField(19)).m()
sage: all( all( e(p).itensor(m(q)) == m(q).itensor(e(p)) for q in Partitions(4) )
....:      for p in Partitions(4) )
True

sage: F = FractionField(QQ['q','t'])
sage: mq = SymmetricFunctions(F).macdonald().Q()
sage: mh = SymmetricFunctions(F).macdonald().H()
sage: all( all( mq(p).itensor(mh(r)) == mh(r).itensor(mq(p))   # long time
....:           for r in Partitions(4) )
....:      for p in Partitions(3) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(FiniteField(Integer(19))).e()
>>> m = SymmetricFunctions(FiniteField(Integer(19))).m()
>>> all( all( e(p).itensor(m(q)) == m(q).itensor(e(p)) for q in Partitions(Integer(4)) )
...      for p in Partitions(Integer(4)) )
True

>>> F = FractionField(QQ['q','t'])
>>> mq = SymmetricFunctions(F).macdonald().Q()
>>> mh = SymmetricFunctions(F).macdonald().H()
>>> all( all( mq(p).itensor(mh(r)) == mh(r).itensor(mq(p))   # long time
...           for r in Partitions(Integer(4)) )
...      for p in Partitions(Integer(3)) )
True

Let us check (on examples) Proposition 5.2 of Gelfand, Krob, Lascoux, Leclerc, Retakh, Thibon, “Noncommutative symmetric functions”, arXiv hep-th/9407124, for \(r = 2\):

sage: e = SymmetricFunctions(FiniteField(29)).e()
sage: s = SymmetricFunctions(FiniteField(29)).s()
sage: m = SymmetricFunctions(FiniteField(29)).m()
sage: def tensor_copr(u, v, w):  # computes \mu ((u \otimes v) * \Delta(w)) with
....:                            # * meaning Kronecker product and \mu meaning the
....:                            # usual multiplication.
....:     result = w.parent().zero()
....:     for partition_pair, coeff in w.coproduct():
....:         result += coeff * w.parent()(u).itensor(partition_pair[0]) * w.parent()(v).itensor(partition_pair[1])
....:     return result
sage: all( all( all( tensor_copr(e[u], s[v], m[w])   # long time
....:                == (e[u] * s[v]).itensor(m[w])
....:                for w in Partitions(5) )
....:           for v in Partitions(2) )
....:      for u in Partitions(3) )
True
>>> from sage.all import *
>>> e = SymmetricFunctions(FiniteField(Integer(29))).e()
>>> s = SymmetricFunctions(FiniteField(Integer(29))).s()
>>> m = SymmetricFunctions(FiniteField(Integer(29))).m()
>>> def tensor_copr(u, v, w):  # computes \mu ((u \otimes v) * \Delta(w)) with
...                            # * meaning Kronecker product and \mu meaning the
...                            # usual multiplication.
...     result = w.parent().zero()
...     for partition_pair, coeff in w.coproduct():
...         result += coeff * w.parent()(u).itensor(partition_pair[Integer(0)]) * w.parent()(v).itensor(partition_pair[Integer(1)])
...     return result
>>> all( all( all( tensor_copr(e[u], s[v], m[w])   # long time
...                == (e[u] * s[v]).itensor(m[w])
...                for w in Partitions(Integer(5)) )
...           for v in Partitions(Integer(2)) )
...      for u in Partitions(Integer(3)) )
True

Some examples from Briand, Orellana, Rosas, “The stability of the Kronecker products of Schur functions.” arXiv 0907.4652:

sage: s = SymmetricFunctions(ZZ).s()
sage: s[2,2].itensor(s[2,2])
s[1, 1, 1, 1] + s[2, 2] + s[4]
sage: s[3,2].itensor(s[3,2])
s[2, 1, 1, 1] + s[2, 2, 1] + s[3, 1, 1] + s[3, 2] + s[4, 1] + s[5]
sage: s[4,2].itensor(s[4,2])
s[2, 2, 2] + s[3, 1, 1, 1] + 2*s[3, 2, 1] + s[4, 1, 1] + 2*s[4, 2] + s[5, 1] + s[6]
>>> from sage.all import *
>>> s = SymmetricFunctions(ZZ).s()
>>> s[Integer(2),Integer(2)].itensor(s[Integer(2),Integer(2)])
s[1, 1, 1, 1] + s[2, 2] + s[4]
>>> s[Integer(3),Integer(2)].itensor(s[Integer(3),Integer(2)])
s[2, 1, 1, 1] + s[2, 2, 1] + s[3, 1, 1] + s[3, 2] + s[4, 1] + s[5]
>>> s[Integer(4),Integer(2)].itensor(s[Integer(4),Integer(2)])
s[2, 2, 2] + s[3, 1, 1, 1] + 2*s[3, 2, 1] + s[4, 1, 1] + 2*s[4, 2] + s[5, 1] + s[6]

An example from p. 220 of Thibon, “Hopf algebras of symmetric functions and tensor products of symmetric group representations”, International Journal of Algebra and Computation, 1991:

sage: s = SymmetricFunctions(QQbar).s()
sage: s[2,1].itensor(s[2,1])
s[1, 1, 1] + s[2, 1] + s[3]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQbar).s()
>>> s[Integer(2),Integer(1)].itensor(s[Integer(2),Integer(1)])
s[1, 1, 1] + s[2, 1] + s[3]

Note

The currently existing implementation of this function is technically unsatisfactory. It distinguishes the case when the base ring is a \(\QQ\)-algebra (in which case the Kronecker product can be easily computed using the power sum basis) from the case where it isn’t. In the latter, it does a computation using universal coefficients, again distinguishing the case when it is able to compute the “corresponding” basis of the symmetric function algebra over \(\QQ\) (using the corresponding_basis_over hack) from the case when it isn’t (in which case it transforms everything into the Schur basis, which is slow).

left_padded_kronecker_product(x)[source]#

Return the left-padded Kronecker product of self and x in the basis of self.

The left-padded Kronecker product is a bilinear map mapping two symmetric functions to another, not necessarily preserving degree. It can be defined as follows: Let \(*\) denote the Kronecker product (itensor()) on the space of symmetric functions. For any partitions \(\alpha\), \(\beta\), \(\gamma\), let \(g^{\gamma}_{\alpha, \beta}\) denote the coefficient of the complete homogeneous symmetric function \(h_{\gamma}\) in the Kronecker product \(h_{\alpha} * h_{\beta}\). For every partition \(\lambda = (\lambda_1, \lambda_2, \lambda_3, \ldots)\) and every integer \(n > \left| \lambda \right| + \lambda_1\), let \(\lambda[n]\) denote the \(n\)-completion of \(\lambda\) (this is the partition \((n - \left| \lambda \right|, \lambda_1, \lambda_2, \lambda_3, \ldots)\); see t_completion()). Then, for any partitions \(\alpha\) and \(\beta\) and every integer \(n \geq \left|\alpha\right| + \left|\beta\right| + \alpha_1 + \beta_1\), we can write the Kronecker product \(h_{\alpha[n]} * h_{\beta[n]}\) in the form

\[h_{\alpha[n]} * h_{\beta[n]} = \sum_{\gamma} g^{\gamma[n]}_{\alpha[n], \beta[n]} h_{\gamma[n]}\]

with \(\gamma\) ranging over all partitions. The coefficients \(g^{\gamma[n]}_{\alpha[n], \beta[n]}\) are independent on \(n\). These coefficients \(g^{\gamma[n]}_{\alpha[n], \beta[n]}\) are denoted by \(\overline{g}^{\gamma}_{\alpha, \beta}\), and the symmetric function

\[\sum_{\gamma} \overline{g}^{\gamma}_{\alpha, \beta} h_{\gamma}\]

is said to be the left-padded Kronecker product of \(h_{\alpha}\) and \(h_{\beta}\). By bilinearity, this extends to a definition of a left-padded Kronecker product of any two symmetric functions.

This notion of left-padded Kronecker product can be lifted to the non-commutative symmetric functions (left_padded_kronecker_product()).

Warning

Do not mistake this product for the reduced Kronecker product (reduced_kronecker_product()), which uses the Schur functions instead of the complete homogeneous functions in its definition.

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

OUTPUT:

  • the left-padded Kronecker product of self with x (an element of the ring of symmetric functions in the same basis as self)

EXAMPLES:

sage: Sym = SymmetricFunctions(QQ)
sage: h = Sym.h()
sage: h[2,1].left_padded_kronecker_product(h[3])
h[1, 1, 1, 1] + h[2, 1] + h[2, 1, 1] + h[2, 1, 1, 1] + h[2, 2, 1] + h[3, 2, 1]
sage: h[2,1].left_padded_kronecker_product(h[1])
h[1, 1, 1] + h[2, 1] + h[2, 1, 1]
sage: h[1].left_padded_kronecker_product(h[2,1])
h[1, 1, 1] + h[2, 1] + h[2, 1, 1]
sage: h[1,1].left_padded_kronecker_product(h[2])
h[1, 1] + 2*h[1, 1, 1] + h[2, 1, 1]
sage: h[1].left_padded_kronecker_product(h[2,1,1])
h[1, 1, 1, 1] + 2*h[2, 1, 1] + h[2, 1, 1, 1]
sage: h[2].left_padded_kronecker_product(h[3])
h[2, 1] + h[2, 1, 1] + h[3, 2]
>>> from sage.all import *
>>> Sym = SymmetricFunctions(QQ)
>>> h = Sym.h()
>>> h[Integer(2),Integer(1)].left_padded_kronecker_product(h[Integer(3)])
h[1, 1, 1, 1] + h[2, 1] + h[2, 1, 1] + h[2, 1, 1, 1] + h[2, 2, 1] + h[3, 2, 1]
>>> h[Integer(2),Integer(1)].left_padded_kronecker_product(h[Integer(1)])
h[1, 1, 1] + h[2, 1] + h[2, 1, 1]
>>> h[Integer(1)].left_padded_kronecker_product(h[Integer(2),Integer(1)])
h[1, 1, 1] + h[2, 1] + h[2, 1, 1]
>>> h[Integer(1),Integer(1)].left_padded_kronecker_product(h[Integer(2)])
h[1, 1] + 2*h[1, 1, 1] + h[2, 1, 1]
>>> h[Integer(1)].left_padded_kronecker_product(h[Integer(2),Integer(1),Integer(1)])
h[1, 1, 1, 1] + 2*h[2, 1, 1] + h[2, 1, 1, 1]
>>> h[Integer(2)].left_padded_kronecker_product(h[Integer(3)])
h[2, 1] + h[2, 1, 1] + h[3, 2]

Taking the left-padded Kronecker product with \(1 = h_{\emptyset}\) is the identity map on the ring of symmetric functions:

sage: all( h[Partition([])].left_padded_kronecker_product(h[lam])
....:      == h[lam] for i in range(4)
....:      for lam in Partitions(i) )
True
>>> from sage.all import *
>>> all( h[Partition([])].left_padded_kronecker_product(h[lam])
...      == h[lam] for i in range(Integer(4))
...      for lam in Partitions(i) )
True

Here is a rule for the left-padded Kronecker product of \(h_1\) (this is the same as \(h_{(1)}\)) with any complete homogeneous function: Let \(\lambda\) be a partition. Then, the left-padded Kronecker product of \(h_1\) and \(h_{\lambda}\) is \(\sum_{\mu} a_{\mu} h_{\mu}\), where the sum runs over all partitions \(\mu\), and the coefficient \(a_{\mu}\) is defined as the number of ways to obtain \(\mu\) from \(\lambda\) by one of the following two operations:

  • Insert a \(1\) into \(\lambda\).

  • Subtract \(1\) from one of the entries of \(\lambda\) (and remove the entry if it thus becomes \(0\)), and insert a \(1\) into \(\lambda\).

We check this for partitions of size \(\leq 4\):

sage: def mults1(I):
....:     # Left-padded Kronecker multiplication by h[1].
....:     res = h[I[:] + [1]]
....:     for k in range(len(I)):
....:         I2 = I[:]
....:         if I2[k] == 1:
....:             I2 = I2[:k] + I2[k+1:]
....:         else:
....:             I2[k] -= 1
....:         res += h[sorted(I2 + [1], reverse=True)]
....:     return res
sage: all( mults1(I) == h[1].left_padded_kronecker_product(h[I])
....:                == h[I].left_padded_kronecker_product(h[1])
....:      for i in range(5) for I in Partitions(i) )
True
>>> from sage.all import *
>>> def mults1(I):
...     # Left-padded Kronecker multiplication by h[1].
...     res = h[I[:] + [Integer(1)]]
...     for k in range(len(I)):
...         I2 = I[:]
...         if I2[k] == Integer(1):
...             I2 = I2[:k] + I2[k+Integer(1):]
...         else:
...             I2[k] -= Integer(1)
...         res += h[sorted(I2 + [Integer(1)], reverse=True)]
...     return res
>>> all( mults1(I) == h[Integer(1)].left_padded_kronecker_product(h[I])
...                == h[I].left_padded_kronecker_product(h[Integer(1)])
...      for i in range(Integer(5)) for I in Partitions(i) )
True

The left-padded Kronecker product is commutative:

sage: all( h[lam].left_padded_kronecker_product(h[mu])
....:      == h[mu].left_padded_kronecker_product(h[lam])
....:      for lam in Partitions(3) for mu in Partitions(3) )
True
>>> from sage.all import *
>>> all( h[lam].left_padded_kronecker_product(h[mu])
...      == h[mu].left_padded_kronecker_product(h[lam])
...      for lam in Partitions(Integer(3)) for mu in Partitions(Integer(3)) )
True
nabla(q=None, t=None, power=1)[source]#

Return 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:

  • q, t – optional parameters (default: None, in which case q and t are used)

  • power – (default: 1) an integer indicating how many times to apply the operator \(\nabla\). 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]
>>> from sage.all import *
>>> Sym = SymmetricFunctions(FractionField(QQ['q','t']))
>>> p = Sym.power()
>>> p([Integer(1),Integer(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]
>>> p([Integer(2),Integer(1)]).nabla(q=Integer(1))
(-t-1)*p[1, 1, 1] + t*p[2, 1]
>>> p([Integer(2)]).nabla(q=Integer(1))*p([Integer(1)]).nabla(q=Integer(1))
(-t-1)*p[1, 1, 1] + t*p[2, 1]
>>> s = Sym.schur()
>>> s([Integer(2),Integer(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]
>>> s([Integer(1),Integer(1),Integer(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]
>>> s([Integer(1),Integer(1),Integer(1)]).nabla(t=Integer(1))
(q^3+q^2+2*q+1)*s[1, 1, 1] + (q^2+2*q+2)*s[2, 1] + s[3]
>>> s(Integer(0)).nabla()
0
>>> s(Integer(1)).nabla()
s[]
>>> s([Integer(2),Integer(1)]).nabla(power=-Integer(1))
((-q-t)/(q^2*t^2))*s[2, 1] + ((q^2+q*t+t^2)/(-q^3*t^3))*s[3]
>>> (s([Integer(2)])+s([Integer(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()[source]#

Return the image of self under the omega automorphism.

The omega automorphism is defined to be the unique algebra endomorphism \(\omega\) of the ring of symmetric functions that satisfies \(\omega(e_k) = h_k\) for all positive integers \(k\) (where \(e_k\) stands for the \(k\)-th elementary symmetric function, and \(h_k\) stands for the \(k\)-th complete homogeneous symmetric function). It furthermore is a Hopf algebra endomorphism and an involution, and it is also known as the omega involution. It sends the power-sum symmetric function \(p_k\) to \((-1)^{k-1} p_k\) for every positive integer \(k\).

The images of some bases under the omega automorphism are given by

\[\omega(e_{\lambda}) = h_{\lambda}, \qquad \omega(h_{\lambda}) = e_{\lambda}, \qquad \omega(p_{\lambda}) = (-1)^{|\lambda| - \ell(\lambda)} p_{\lambda}, \qquad \omega(s_{\lambda}) = s_{\lambda^{\prime}},\]

where \(\lambda\) is any partition, where \(\ell(\lambda)\) denotes the length (length()) of the partition \(\lambda\), where \(\lambda^{\prime}\) denotes the conjugate partition (conjugate()) of \(\lambda\), and where the usual notations for bases are used (\(e\) = elementary, \(h\) = complete homogeneous, \(p\) = powersum, \(s\) = Schur).

The default implementation converts to the Schur basis, then performs the automorphism and changes back.

omega_involution() is a synonym for the omega() method.

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[]
>>> from sage.all import *
>>> J = SymmetricFunctions(QQ).jack(t=Integer(1)).P()
>>> a = J([Integer(2),Integer(1)]) + J([Integer(1),Integer(1),Integer(1)])
>>> a.omega()
JackP[2, 1] + JackP[3]
>>> J(Integer(0)).omega()
0
>>> J(Integer(1)).omega()
JackP[]

The forgotten symmetric functions are the images of the monomial symmetric functions under omega:

sage: Sym = SymmetricFunctions(ZZ)
sage: m = Sym.m()
sage: f = Sym.f()
sage: all( f(lam) == m(lam).omega() for lam in Partitions(3) )
True
sage: all( m(lam) == f(lam).omega() for lam in Partitions(3) )
True
>>> from sage.all import *
>>> Sym = SymmetricFunctions(ZZ)
>>> m = Sym.m()
>>> f = Sym.f()
>>> all( f(lam) == m(lam).omega() for lam in Partitions(Integer(3)) )
True
>>> all( m(lam) == f(lam).omega() for lam in Partitions(Integer(3)) )
True
omega_involution()[source]#

Return the image of self under the omega automorphism.

The omega automorphism is defined to be the unique algebra endomorphism \(\omega\) of the ring of symmetric functions that satisfies \(\omega(e_k) = h_k\) for all positive integers \(k\) (where \(e_k\) stands for the \(k\)-th elementary symmetric function, and \(h_k\) stands for the \(k\)-th complete homogeneous symmetric function). It furthermore is a Hopf algebra endomorphism and an involution, and it is also known as the omega involution. It sends the power-sum symmetric function \(p_k\) to \((-1)^{k-1} p_k\) for every positive integer \(k\).

The images of some bases under the omega automorphism are given by

\[\omega(e_{\lambda}) = h_{\lambda}, \qquad \omega(h_{\lambda}) = e_{\lambda}, \qquad \omega(p_{\lambda}) = (-1)^{|\lambda| - \ell(\lambda)} p_{\lambda}, \qquad \omega(s_{\lambda}) = s_{\lambda^{\prime}},\]

where \(\lambda\) is any partition, where \(\ell(\lambda)\) denotes the length (length()) of the partition \(\lambda\), where \(\lambda^{\prime}\) denotes the conjugate partition (conjugate()) of \(\lambda\), and where the usual notations for bases are used (\(e\) = elementary, \(h\) = complete homogeneous, \(p\) = powersum, \(s\) = Schur).

The default implementation converts to the Schur basis, then performs the automorphism and changes back.

omega_involution() is a synonym for the omega() method.

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[]
>>> from sage.all import *
>>> J = SymmetricFunctions(QQ).jack(t=Integer(1)).P()
>>> a = J([Integer(2),Integer(1)]) + J([Integer(1),Integer(1),Integer(1)])
>>> a.omega()
JackP[2, 1] + JackP[3]
>>> J(Integer(0)).omega()
0
>>> J(Integer(1)).omega()
JackP[]

The forgotten symmetric functions are the images of the monomial symmetric functions under omega:

sage: Sym = SymmetricFunctions(ZZ)
sage: m = Sym.m()
sage: f = Sym.f()
sage: all( f(lam) == m(lam).omega() for lam in Partitions(3) )
True
sage: all( m(lam) == f(lam).omega() for lam in Partitions(3) )
True
>>> from sage.all import *
>>> Sym = SymmetricFunctions(ZZ)
>>> m = Sym.m()
>>> f = Sym.f()
>>> all( f(lam) == m(lam).omega() for lam in Partitions(Integer(3)) )
True
>>> all( m(lam) == f(lam).omega() for lam in Partitions(Integer(3)) )
True
omega_qt(q=None, t=None)[source]#

Return the image of self under the \(q,t\)-deformed omega automorphism which sends \(p_k\) to \((-1)^{k-1} \cdot \frac{1-q^k}{1-t^k} \cdot p_k\) for all positive integers \(k\).

In general, this is well-defined outside of the powersum basis only if the base ring is a \(\QQ\)-algebra.

If \(q = t\), then this is the omega automorphism (omega()).

INPUT:

  • 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]
>>> from sage.all import *
>>> QQqt = QQ['q,t'].fraction_field()
>>> q,t = QQqt.gens()
>>> p = SymmetricFunctions(QQqt).p()
>>> p[Integer(5)].omega_qt()
((-q^5+1)/(-t^5+1))*p[5]
>>> p[Integer(5)].omega_qt(q,t)
((-q^5+1)/(-t^5+1))*p[5]
>>> p([Integer(2)]).omega_qt(q,t)
((q^2-1)/(-t^2+1))*p[2]
>>> p([Integer(2),Integer(1)]).omega_qt(q,t)
((-q^3+q^2+q-1)/(t^3-t^2-t+1))*p[2, 1]
>>> p([Integer(3),Integer(2)]).omega_qt(Integer(5),q)
-(2976/(q^5-q^3-q^2+1))*p[3, 2]
>>> p(Integer(0)).omega_qt()
0
>>> p(Integer(1)).omega_qt()
p[]
>>> H = SymmetricFunctions(QQqt).macdonald().H()
>>> H([Integer(1),Integer(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]
>>> H([Integer(1),Integer(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]
>>> H([Integer(1),Integer(1)]).omega_qt(t,q)
((-t^3+t^2+t-1)/(-q^3+q^2+q-1))*McdH[2]
>>> Sym = SymmetricFunctions(FractionField(QQ['q','t']))
>>> S = Sym.macdonald().S()
>>> S([Integer(1),Integer(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]
>>> s = Sym.schur()
>>> s(S([Integer(1),Integer(1)]).omega_qt())
s[2]
plethysm(x, include=None, exclude=None)[source]#

Return the outer plethysm of self with x.

This is implemented only over base rings which are \(\QQ\)-algebras. (To compute outer plethysms over general binomial rings, change bases to the fraction field.)

The outer plethysm of \(f\) with \(g\) is commonly denoted by \(f \left[ g \right]\) or by \(f \circ g\). It is an algebra map in \(f\), but not (generally) in \(g\).

By default, the degree one elements are taken to be the generators for the self’s base ring. This setting can be modified by specifying the include and exclude keywords.

INPUT:

  • x – a symmetric function over the same base ring as self

  • 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

OUTPUT:

An element in the parent of x or the base ring \(R\) of self when x is in \(R\).

EXAMPLES:

sage: Sym = SymmetricFunctions(QQ)
sage: s = Sym.s()
sage: h = Sym.h()
sage: h3h2 = h[3](h[2]); h3h2
h[2, 2, 2] - 2*h[3, 2, 1] + h[3, 3] + h[4, 1, 1] - h[5, 1] + h[6]
sage: s(h3h2)
s[2, 2, 2] + s[4, 2] + s[6]
sage: p = Sym.p()
sage: p3s21 = p[3](s[2,1]); p3s21
s[2, 2, 2, 1, 1, 1] - s[2, 2, 2, 2, 1] - s[3, 2, 1, 1, 1, 1]
 + s[3, 2, 2, 2] + s[3, 3, 1, 1, 1] - s[3, 3, 2, 1] + 2*s[3, 3, 3]
 + s[4, 1, 1, 1, 1, 1] - s[4, 3, 2] + s[4, 4, 1] - s[5, 1, 1, 1, 1]
 + s[5, 2, 2] - s[5, 4] + s[6, 1, 1, 1] - s[6, 2, 1] + s[6, 3]
sage: p(p3s21)
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]
>>> from sage.all import *
>>> Sym = SymmetricFunctions(QQ)
>>> s = Sym.s()
>>> h = Sym.h()
>>> h3h2 = h[Integer(3)](h[Integer(2)]); h3h2
h[2, 2, 2] - 2*h[3, 2, 1] + h[3, 3] + h[4, 1, 1] - h[5, 1] + h[6]
>>> s(h3h2)
s[2, 2, 2] + s[4, 2] + s[6]
>>> p = Sym.p()
>>> p3s21 = p[Integer(3)](s[Integer(2),Integer(1)]); p3s21
s[2, 2, 2, 1, 1, 1] - s[2, 2, 2, 2, 1] - s[3, 2, 1, 1, 1, 1]
 + s[3, 2, 2, 2] + s[3, 3, 1, 1, 1] - s[3, 3, 2, 1] + 2*s[3, 3, 3]
 + s[4, 1, 1, 1, 1, 1] - s[4, 3, 2] + s[4, 4, 1] - s[5, 1, 1, 1, 1]
 + s[5, 2, 2] - s[5, 4] + s[6, 1, 1, 1] - s[6, 2, 1] + s[6, 3]
>>> p(p3s21)
1/3*p[3, 3, 3] - 1/3*p[9]
>>> e = Sym.e()
>>> e[Integer(3)](e[Integer(2)])
e[3, 3] + e[4, 1, 1] - 2*e[4, 2] - e[5, 1] + e[6]

Note that the output is in the basis of the input x:

sage: s[2,1](h[3])
h[4, 3, 2] - h[4, 4, 1] - h[5, 2, 2] + h[5, 3, 1] + h[5, 4]
 + h[6, 2, 1] - 2*h[6, 3] - h[7, 1, 1] + h[7, 2] + h[8, 1] - h[9]

sage: h[2,1](s[3])
s[4, 3, 2] + s[4, 4, 1] + s[5, 2, 2] + s[5, 3, 1] + s[5, 4]
 + s[6, 2, 1] + 2*s[6, 3] + 2*s[7, 2] + s[8, 1] + s[9]
>>> from sage.all import *
>>> s[Integer(2),Integer(1)](h[Integer(3)])
h[4, 3, 2] - h[4, 4, 1] - h[5, 2, 2] + h[5, 3, 1] + h[5, 4]
 + h[6, 2, 1] - 2*h[6, 3] - h[7, 1, 1] + h[7, 2] + h[8, 1] - h[9]

>>> h[Integer(2),Integer(1)](s[Integer(3)])
s[4, 3, 2] + s[4, 4, 1] + s[5, 2, 2] + s[5, 3, 1] + s[5, 4]
 + s[6, 2, 1] + 2*s[6, 3] + 2*s[7, 2] + s[8, 1] + s[9]

Examples over a polynomial ring:

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[]
sage: s(1).plethysm(s(0))
s[]
>>> from sage.all import *
>>> R = QQ['t']; (t,) = R._first_ngens(1)
>>> s = SymmetricFunctions(R).s()
>>> a = s([Integer(3)])
>>> f = t * s([Integer(2)])
>>> a(f)
t^3*s[2, 2, 2] + t^3*s[4, 2] + t^3*s[6]
>>> f(a)
t*s[4, 2] + t*s[6]
>>> s(Integer(0)).plethysm(s[Integer(1)])
0
>>> s(Integer(1)).plethysm(s[Integer(1)])
s[]
>>> s(Integer(1)).plethysm(s(Integer(0)))
s[]

When x is a constant, then it is returned as an element of the base ring:

sage: s[3](2).parent() is R
True
>>> from sage.all import *
>>> s[Integer(3)](Integer(2)).parent() is R
True

Sage also handles plethysm of tensor products of symmetric functions:

sage: s = SymmetricFunctions(QQ).s()
sage: X = tensor([s[1],s[[]]])
sage: Y = tensor([s[[]],s[1]])
sage: s[1,1,1](X+Y)
s[] # s[1, 1, 1] + s[1] # s[1, 1] + s[1, 1] # s[1] + s[1, 1, 1] # s[]
sage: s[1,1,1](X*Y)
s[1, 1, 1] # s[3] + s[2, 1] # s[2, 1] + s[3] # s[1, 1, 1]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> X = tensor([s[Integer(1)],s[[]]])
>>> Y = tensor([s[[]],s[Integer(1)]])
>>> s[Integer(1),Integer(1),Integer(1)](X+Y)
s[] # s[1, 1, 1] + s[1] # s[1, 1] + s[1, 1] # s[1] + s[1, 1, 1] # s[]
>>> s[Integer(1),Integer(1),Integer(1)](X*Y)
s[1, 1, 1] # s[3] + s[2, 1] # s[2, 1] + s[3] # s[1, 1, 1]

One can use this to work with symmetric functions in two sets of commuting variables. For example, we verify the Cauchy identities (in degree 5):

sage: m = SymmetricFunctions(QQ).m()
sage: P5 = Partitions(5)
sage: sum(s[mu](X)*s[mu](Y) for mu in P5) == sum(m[mu](X)*h[mu](Y) for mu in P5)
True
sage: sum(s[mu](X)*s[mu.conjugate()](Y) for mu in P5) == sum(m[mu](X)*e[mu](Y) for mu in P5)
True
>>> from sage.all import *
>>> m = SymmetricFunctions(QQ).m()
>>> P5 = Partitions(Integer(5))
>>> sum(s[mu](X)*s[mu](Y) for mu in P5) == sum(m[mu](X)*h[mu](Y) for mu in P5)
True
>>> sum(s[mu](X)*s[mu.conjugate()](Y) for mu in P5) == sum(m[mu](X)*e[mu](Y) for mu in P5)
True

Sage can also do the plethysm with an element in the completion:

sage: s = SymmetricFunctions(QQ).s()
sage: L = LazySymmetricFunctions(s)
sage: f = s[2,1]
sage: g = L(s[1]) / (1 - L(s[1])); g
s[1] + (s[1,1]+s[2]) + (s[1,1,1]+2*s[2,1]+s[3])
 + (s[1,1,1,1]+3*s[2,1,1]+2*s[2,2]+3*s[3,1]+s[4])
 + (s[1,1,1,1,1]+4*s[2,1,1,1]+5*s[2,2,1]+6*s[3,1,1]+5*s[3,2]+4*s[4,1]+s[5])
 + ... + O^8
sage: fog = f(g)
sage: fog[:8]
[s[2, 1],
 s[1, 1, 1, 1] + 3*s[2, 1, 1] + 2*s[2, 2] + 3*s[3, 1] + s[4],
 2*s[1, 1, 1, 1, 1] + 8*s[2, 1, 1, 1] + 10*s[2, 2, 1]
 + 12*s[3, 1, 1] + 10*s[3, 2] + 8*s[4, 1] + 2*s[5],
 3*s[1, 1, 1, 1, 1, 1] + 17*s[2, 1, 1, 1, 1] + 30*s[2, 2, 1, 1]
 + 16*s[2, 2, 2] + 33*s[3, 1, 1, 1] + 54*s[3, 2, 1] + 16*s[3, 3]
 + 33*s[4, 1, 1] + 30*s[4, 2] + 17*s[5, 1] + 3*s[6],
 5*s[1, 1, 1, 1, 1, 1, 1] + 30*s[2, 1, 1, 1, 1, 1] + 70*s[2, 2, 1, 1, 1]
 + 70*s[2, 2, 2, 1] + 75*s[3, 1, 1, 1, 1] + 175*s[3, 2, 1, 1]
 + 105*s[3, 2, 2] + 105*s[3, 3, 1] + 100*s[4, 1, 1, 1] + 175*s[4, 2, 1]
 + 70*s[4, 3] + 75*s[5, 1, 1] + 70*s[5, 2] + 30*s[6, 1] + 5*s[7]]
sage: parent(fog)
Lazy completion of Symmetric Functions over Rational Field in the Schur basis
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> L = LazySymmetricFunctions(s)
>>> f = s[Integer(2),Integer(1)]
>>> g = L(s[Integer(1)]) / (Integer(1) - L(s[Integer(1)])); g
s[1] + (s[1,1]+s[2]) + (s[1,1,1]+2*s[2,1]+s[3])
 + (s[1,1,1,1]+3*s[2,1,1]+2*s[2,2]+3*s[3,1]+s[4])
 + (s[1,1,1,1,1]+4*s[2,1,1,1]+5*s[2,2,1]+6*s[3,1,1]+5*s[3,2]+4*s[4,1]+s[5])
 + ... + O^8
>>> fog = f(g)
>>> fog[:Integer(8)]
[s[2, 1],
 s[1, 1, 1, 1] + 3*s[2, 1, 1] + 2*s[2, 2] + 3*s[3, 1] + s[4],
 2*s[1, 1, 1, 1, 1] + 8*s[2, 1, 1, 1] + 10*s[2, 2, 1]
 + 12*s[3, 1, 1] + 10*s[3, 2] + 8*s[4, 1] + 2*s[5],
 3*s[1, 1, 1, 1, 1, 1] + 17*s[2, 1, 1, 1, 1] + 30*s[2, 2, 1, 1]
 + 16*s[2, 2, 2] + 33*s[3, 1, 1, 1] + 54*s[3, 2, 1] + 16*s[3, 3]
 + 33*s[4, 1, 1] + 30*s[4, 2] + 17*s[5, 1] + 3*s[6],
 5*s[1, 1, 1, 1, 1, 1, 1] + 30*s[2, 1, 1, 1, 1, 1] + 70*s[2, 2, 1, 1, 1]
 + 70*s[2, 2, 2, 1] + 75*s[3, 1, 1, 1, 1] + 175*s[3, 2, 1, 1]
 + 105*s[3, 2, 2] + 105*s[3, 3, 1] + 100*s[4, 1, 1, 1] + 175*s[4, 2, 1]
 + 70*s[4, 3] + 75*s[5, 1, 1] + 70*s[5, 2] + 30*s[6, 1] + 5*s[7]]
>>> parent(fog)
Lazy completion of Symmetric Functions over Rational Field in the Schur basis

See also

adams_operator()

Todo

The implementation of plethysm in sage.data_structures.stream.Stream_plethysm seems to be faster. This should be investigated.

principal_specialization(n=+Infinity, q=None)[source]#

Return the principal specialization of a symmetric function.

The principal specialization of order \(n\) at \(q\) is the ring homomorphism \(ps_{n,q}\) from the ring of symmetric functions to another commutative ring \(R\) given by \(x_i \mapsto q^{i-1}\) for \(i \in \{1,\dots,n\}\) and \(x_i \mapsto 0\) for \(i > n\). Here, \(q\) is a given element of \(R\), and we assume that the variables of our symmetric functions are \(x_1, x_2, x_3, \ldots\). (To be more precise, \(ps_{n,q}\) is a \(K\)-algebra homomorphism, where \(K\) is the base ring.) See Section 7.8 of [EnumComb2].

The stable principal specialization at \(q\) is the ring homomorphism \(ps_q\) from the ring of symmetric functions to another commutative ring \(R\) given by \(x_i \mapsto q^{i-1}\) for all \(i\). This is well-defined only if the resulting infinite sums converge; thus, in particular, setting \(q = 1\) in the stable principal specialization is an invalid operation.

INPUT:

  • n (default: infinity) – a nonnegative integer or infinity, specifying whether to compute the principal specialization of order n or the stable principal specialization.

  • q (default: None) – the value to use for \(q\); the default is to create a ring of polynomials in q (or a field of rational functions in q) over the given coefficient ring.

EXAMPLES:

sage: m = SymmetricFunctions(QQ).m()
sage: x = m[1,1]
sage: x.principal_specialization(3)
q^3 + q^2 + q
>>> from sage.all import *
>>> m = SymmetricFunctions(QQ).m()
>>> x = m[Integer(1),Integer(1)]
>>> x.principal_specialization(Integer(3))
q^3 + q^2 + q

By default we return a rational function in q. Sometimes it is better to obtain an element of the symbolic ring:

sage: h = SymmetricFunctions(QQ).h()
sage: (h[3]+h[2]).principal_specialization(q=var("q"))                      # needs sage.symbolic
1/((q^2 - 1)*(q - 1)) - 1/((q^3 - 1)*(q^2 - 1)*(q - 1))
>>> from sage.all import *
>>> h = SymmetricFunctions(QQ).h()
>>> (h[Integer(3)]+h[Integer(2)]).principal_specialization(q=var("q"))                      # needs sage.symbolic
1/((q^2 - 1)*(q - 1)) - 1/((q^3 - 1)*(q^2 - 1)*(q - 1))

In case q is in the base ring, it must be passed explicitly:

sage: R = QQ['q,t']
sage: Ht = SymmetricFunctions(R).macdonald().Ht()
sage: Ht[2].principal_specialization()
Traceback (most recent call last):
...
ValueError: the variable q is in the base ring, pass it explicitly

sage: Ht[2].principal_specialization(q=R("q"))
(q^2 + 1)/(q^3 - q^2 - q + 1)
>>> from sage.all import *
>>> R = QQ['q,t']
>>> Ht = SymmetricFunctions(R).macdonald().Ht()
>>> Ht[Integer(2)].principal_specialization()
Traceback (most recent call last):
...
ValueError: the variable q is in the base ring, pass it explicitly

>>> Ht[Integer(2)].principal_specialization(q=R("q"))
(q^2 + 1)/(q^3 - q^2 - q + 1)

Note that the principal specialization can be obtained as a plethysm:

sage: R = QQ['q'].fraction_field()
sage: s = SymmetricFunctions(R).s()
sage: one = s.one()
sage: q = R("q")
sage: f = s[3,2,2]
sage: f.principal_specialization(q=q) == f(one/(1-q)).coefficient([])
True
sage: f.principal_specialization(n=4, q=q) == f(one*(1-q^4)/(1-q)).coefficient([])
True
>>> from sage.all import *
>>> R = QQ['q'].fraction_field()
>>> s = SymmetricFunctions(R).s()
>>> one = s.one()
>>> q = R("q")
>>> f = s[Integer(3),Integer(2),Integer(2)]
>>> f.principal_specialization(q=q) == f(one/(Integer(1)-q)).coefficient([])
True
>>> f.principal_specialization(n=Integer(4), q=q) == f(one*(Integer(1)-q**Integer(4))/(Integer(1)-q)).coefficient([])
True
reduced_kronecker_product(x)[source]#

Return the reduced Kronecker product of self and x in the basis of self.

The reduced Kronecker product is a bilinear map mapping two symmetric functions to another, not necessarily preserving degree. It can be defined as follows: Let \(*\) denote the Kronecker product (itensor()) on the space of symmetric functions. For any partitions \(\alpha\), \(\beta\), \(\gamma\), let \(g^{\gamma}_{\alpha, \beta}\) denote the coefficient of the Schur function \(s_{\gamma}\) in the Kronecker product \(s_{\alpha} * s_{\beta}\) (this is called a Kronecker coefficient). For every partition \(\lambda = (\lambda_1, \lambda_2, \lambda_3, \ldots)\) and every integer \(n > \left| \lambda \right| + \lambda_1\), let \(\lambda[n]\) denote the \(n\)-completion of \(\lambda\) (this is the partition \((n - \left| \lambda \right|, \lambda_1, \lambda_2, \lambda_3, \ldots)\); see t_completion()). Then, Theorem 1.2 of [BOR2009] shows that for any partitions \(\alpha\) and \(\beta\) and every integer \(n \geq \left|\alpha\right| + \left|\beta\right| + \alpha_1 + \beta_1\), we can write the Kronecker product \(s_{\alpha[n]} * s_{\beta[n]}\) in the form

\[s_{\alpha[n]} * s_{\beta[n]} = \sum_{\gamma} g^{\gamma[n]}_{\alpha[n], \beta[n]} s_{\gamma[n]}\]

with \(\gamma\) ranging over all partitions. The coefficients \(g^{\gamma[n]}_{\alpha[n], \beta[n]}\) are independent on \(n\). These coefficients \(g^{\gamma[n]}_{\alpha[n], \beta[n]}\) are denoted by \(\overline{g}^{\gamma}_{\alpha, \beta}\), and the symmetric function

\[\sum_{\gamma} \overline{g}^{\gamma}_{\alpha, \beta} s_{\gamma}\]

is said to be the reduced Kronecker product of \(s_{\alpha}\) and \(s_{\beta}\). By bilinearity, this extends to a definition of a reduced Kronecker product of any two symmetric functions.

The definition of the reduced Kronecker product goes back to Murnaghan, and has recently been studied in [BOR2009], [BdVO2012] and other places (our notation \(\overline{g}^{\gamma}_{\alpha, \beta}\) appears in these two sources).

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

OUTPUT:

  • the reduced Kronecker product of self with x (an element of the ring of symmetric functions in the same basis as self)

EXAMPLES:

The example from page 2 of [BOR2009]:

sage: Sym = SymmetricFunctions(QQ)
sage: s = Sym.schur()
sage: s[2].reduced_kronecker_product(s[2])
s[] + s[1] + s[1, 1] + s[1, 1, 1] + 2*s[2] + 2*s[2, 1] + s[2, 2] + s[3] + s[3, 1] + s[4]
>>> from sage.all import *
>>> Sym = SymmetricFunctions(QQ)
>>> s = Sym.schur()
>>> s[Integer(2)].reduced_kronecker_product(s[Integer(2)])
s[] + s[1] + s[1, 1] + s[1, 1, 1] + 2*s[2] + 2*s[2, 1] + s[2, 2] + s[3] + s[3, 1] + s[4]

Taking the reduced Kronecker product with \(1 = s_{\emptyset}\) is the identity map on the ring of symmetric functions:

sage: all( s[Partition([])].reduced_kronecker_product(s[lam])
....:      == s[lam] for i in range(4)
....:      for lam in Partitions(i) )
True
>>> from sage.all import *
>>> all( s[Partition([])].reduced_kronecker_product(s[lam])
...      == s[lam] for i in range(Integer(4))
...      for lam in Partitions(i) )
True

While reduced Kronecker products are hard to compute in general, there is a rule for taking reduced Kronecker products with \(s_1\). Namely, for every partition \(\lambda\), the reduced Kronecker product of \(s_{\lambda}\) with \(s_1\) is \(\sum_{\mu} a_{\mu} s_{\mu}\), where the sum runs over all partitions \(\mu\), and the coefficient \(a_{\mu}\) is defined as the number of ways to obtain \(\mu\) from \(\lambda\) by one of the following three operations:

  • Add an addable cell (addable_cells()) to \(\lambda\).

  • Remove a removable cell (removable_cells()) from \(\lambda\).

  • First remove a removable cell from \(\lambda\), then add an addable cell to the resulting Young diagram.

This is, in fact, Proposition 5.15 of [CO2010] in an elementary wording. We check this for partitions of size \(\leq 4\):

sage: def mults1(lam):
....:     # Reduced Kronecker multiplication by s[1], according
....:     # to [CO2010]_.
....:     res = s.zero()
....:     for mu in lam.up_list():
....:         res += s(mu)
....:     for mu in lam.down_list():
....:         res += s(mu)
....:         for nu in mu.up_list():
....:             res += s(nu)
....:     return res
sage: all( mults1(lam) == s[1].reduced_kronecker_product(s[lam])
....:      for i in range(5) for lam in Partitions(i) )
True
>>> from sage.all import *
>>> def mults1(lam):
...     # Reduced Kronecker multiplication by s[1], according
...     # to [CO2010]_.
...     res = s.zero()
...     for mu in lam.up_list():
...         res += s(mu)
...     for mu in lam.down_list():
...         res += s(mu)
...         for nu in mu.up_list():
...             res += s(nu)
...     return res
>>> all( mults1(lam) == s[Integer(1)].reduced_kronecker_product(s[lam])
...      for i in range(Integer(5)) for lam in Partitions(i) )
True

Here is the example on page 3 of Christian Gutschwager’s arXiv 0912.4411v3:

sage: s[1,1].reduced_kronecker_product(s[2])
s[1] + 2*s[1, 1] + s[1, 1, 1] + s[2] + 2*s[2, 1] + s[2, 1, 1] + s[3] + s[3, 1]
>>> from sage.all import *
>>> s[Integer(1),Integer(1)].reduced_kronecker_product(s[Integer(2)])
s[1] + 2*s[1, 1] + s[1, 1, 1] + s[2] + 2*s[2, 1] + s[2, 1, 1] + s[3] + s[3, 1]

Example 39 from F. D. Murnaghan, “The analysis of the Kronecker product of irreducible representations of the symmetric group”, American Journal of Mathematics, Vol. 60, No. 3, Jul. 1938:

sage: s[3].reduced_kronecker_product(s[2,1])
s[1] + 2*s[1, 1] + 2*s[1, 1, 1] + s[1, 1, 1, 1] + 2*s[2] + 5*s[2, 1] + 4*s[2, 1, 1]
+ s[2, 1, 1, 1] + 3*s[2, 2] + 2*s[2, 2, 1] + 2*s[3] + 5*s[3, 1] + 3*s[3, 1, 1]
+ 3*s[3, 2] + s[3, 2, 1] + 2*s[4] + 3*s[4, 1] + s[4, 1, 1] + s[4, 2] + s[5]
+ s[5, 1]
>>> from sage.all import *
>>> s[Integer(3)].reduced_kronecker_product(s[Integer(2),Integer(1)])
s[1] + 2*s[1, 1] + 2*s[1, 1, 1] + s[1, 1, 1, 1] + 2*s[2] + 5*s[2, 1] + 4*s[2, 1, 1]
+ s[2, 1, 1, 1] + 3*s[2, 2] + 2*s[2, 2, 1] + 2*s[3] + 5*s[3, 1] + 3*s[3, 1, 1]
+ 3*s[3, 2] + s[3, 2, 1] + 2*s[4] + 3*s[4, 1] + s[4, 1, 1] + s[4, 2] + s[5]
+ s[5, 1]

Todo

This implementation of the reduced Kronecker product is painfully slow.

restrict_degree(d, exact=True)[source]#

Return the degree d component of self.

INPUT:

  • 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:

  • 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
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> z = s([Integer(4)]) + s([Integer(2),Integer(1)]) + s([Integer(1),Integer(1),Integer(1)]) + s([Integer(1)])
>>> z.restrict_degree(Integer(2))
0
>>> z.restrict_degree(Integer(1))
s[1]
>>> z.restrict_degree(Integer(3))
s[1, 1, 1] + s[2, 1]
>>> z.restrict_degree(Integer(3), exact=False)
s[1] + s[1, 1, 1] + s[2, 1]
>>> z.restrict_degree(Integer(0))
0
restrict_partition_lengths(l, exact=True)[source]#

Return the terms of self labelled by partitions of length l.

INPUT:

  • l – nonnegative integer

  • exact – boolean, defaulting to True

OUTPUT:

  • if True, returns the terms labelled by partitions of length precisely l; otherwise returns all terms labelled by partitions of length less than or equal to l

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]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> z = s([Integer(4)]) + s([Integer(2),Integer(1)]) + s([Integer(1),Integer(1),Integer(1)]) + s([Integer(1)])
>>> z.restrict_partition_lengths(Integer(2))
s[2, 1]
>>> z.restrict_partition_lengths(Integer(0))
0
>>> z.restrict_partition_lengths(Integer(2), exact = False)
s[1] + s[2, 1] + s[4]
restrict_parts(n)[source]#

Return the terms of self labelled by partitions \(\lambda\) with \(\lambda_1 \leq n\).

INPUT:

  • n – positive integer, to 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]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> z = s([Integer(4)]) + s([Integer(2),Integer(1)]) + s([Integer(1),Integer(1),Integer(1)]) + s([Integer(1)])
>>> z.restrict_parts(Integer(2))
s[1] + s[1, 1, 1] + s[2, 1]
>>> z.restrict_parts(Integer(1))
s[1] + s[1, 1, 1]
scalar(x, zee=None)[source]#

Return the standard scalar product between self and x.

This is also known as the “Hall inner product” or the “Hall scalar product”.

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

  • 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 either Schur functions (if zee is not specified) or power-sum functions (if zee is specified) and performs the scalar product in 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
>>> from sage.all import *
>>> e = SymmetricFunctions(QQ).e()
>>> h = SymmetricFunctions(QQ).h()
>>> m = SymmetricFunctions(QQ).m()
>>> p4 = Partitions(Integer(4))
>>> 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]
>>> 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]
>>> 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]
>>> 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]

>>> p = SymmetricFunctions(QQ).p()
>>> m(p[Integer(3),Integer(2)]).scalar(p[Integer(3),Integer(2)], zee=lambda mu: Integer(2)**mu.length())
4
>>> m(p[Integer(3),Integer(2)]).scalar(p[Integer(2),Integer(2),Integer(1)], lambda mu: Integer(1))
0
>>> m[Integer(3),Integer(2)].scalar(h[Integer(3),Integer(2)], zee=lambda mu: Integer(2)**mu.length())
2/3
scalar_hl(x, t=None)[source]#

Return the \(t\)-deformed standard Hall-Littlewood scalar product of self and x.

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

  • t – parameter (default: None, in which case t is 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
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> a = s([Integer(2),Integer(1)])
>>> sp = a.scalar_t(a); sp
(-t^2 - 1)/(t^5 - 2*t^4 + t^3 - t^2 + 2*t - 1)
>>> sp.parent()
Fraction Field of Univariate Polynomial Ring in t over Rational Field
scalar_jack(x, t=None)[source]#

Return the Jack-scalar product between 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^{\ell(\mu)}\), where \(\ell(\mu)\) denotes the length of \(\mu\).

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

  • 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)])
[(1/3*t^2 + 1/2*t + 1/6)/t^3                           0                           0]
[                          0 (1/2*t + 1)/(t^3 + 1/2*t^2)                           0]
[                          0                           0       6/(t^3 + 3*t^2 + 2*t)]
>>> from sage.all import *
>>> p = SymmetricFunctions(QQ['t']).power()
>>> matrix([[p(mu).scalar_jack(p(nu)) for nu in Partitions(Integer(4))] for mu in Partitions(Integer(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]
>>> matrix([[p(mu).scalar_jack(p(nu),Integer(2)) for nu in Partitions(Integer(4))] for mu in Partitions(Integer(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]
>>> JQ = SymmetricFunctions(QQ['t'].fraction_field()).jack().Q()
>>> matrix([[JQ(mu).scalar_jack(JQ(nu)) for nu in Partitions(Integer(3))] for mu in Partitions(Integer(3))])
[(1/3*t^2 + 1/2*t + 1/6)/t^3                           0                           0]
[                          0 (1/2*t + 1)/(t^3 + 1/2*t^2)                           0]
[                          0                           0       6/(t^3 + 3*t^2 + 2*t)]
scalar_qt(x, q=None, t=None)[source]#

Return the \(q,t\)-deformed standard Hall-Littlewood scalar product of self and x.

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

  • 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')                                                    # needs sage.symbolic
sage: a.scalar_qt(a, q=x, t=y)                                              # needs sage.symbolic
1/3*(x^3 - 1)/(y^3 - 1) + 2/3*(x - 1)^3/(y - 1)^3
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)
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> a = s([Integer(2),Integer(1)])
>>> 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)
>>> sp.parent()
Fraction Field of Multivariate Polynomial Ring in q, t over Rational Field
>>> a.scalar_qt(a,q=Integer(0))
(-t^2 - 1)/(t^5 - 2*t^4 + t^3 - t^2 + 2*t - 1)
>>> a.scalar_qt(a,t=Integer(0))
-q^3 + 2*q^2 - 2*q + 1
>>> a.scalar_qt(a,Integer(5),Integer(7)) # q=5 and t=7
490/1539
>>> (x,y) = var('x,y')                                                    # needs sage.symbolic
>>> a.scalar_qt(a, q=x, t=y)                                              # needs sage.symbolic
1/3*(x^3 - 1)/(y^3 - 1) + 2/3*(x - 1)^3/(y - 1)^3
>>> Rn = QQ['q','t','y','z'].fraction_field()
>>> (q,t,y,z) = Rn.gens()
>>> Mac = SymmetricFunctions(Rn).macdonald(q=y,t=z)
>>> a = Mac._sym.schur()([Integer(2),Integer(1)])
>>> 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)
>>> 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)[source]#

Return the \(t\)-deformed standard Hall-Littlewood scalar product of self and x.

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

  • t – parameter (default: None, in which case t is 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
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> a = s([Integer(2),Integer(1)])
>>> sp = a.scalar_t(a); sp
(-t^2 - 1)/(t^5 - 2*t^4 + t^3 - t^2 + 2*t - 1)
>>> sp.parent()
Fraction Field of Univariate Polynomial Ring in t over Rational Field
skew_by(x)[source]#

Return the result of skewing self by x. (Skewing by x is the endomorphism (as additive group) of the ring of symmetric functions adjoint to multiplication by x with respect to the Hall inner product.)

INPUT:

  • x – element of the ring of symmetric functions over the same base ring as self

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]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> s([Integer(3),Integer(2)]).skew_by(s([Integer(2)]))
s[2, 1] + s[3]
>>> s([Integer(3),Integer(2)]).skew_by(s([Integer(1),Integer(1),Integer(1)]))
0
>>> s([Integer(3),Integer(2),Integer(1)]).skew_by(s([Integer(2),Integer(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
>>> from sage.all import *
>>> p = SymmetricFunctions(QQ).powersum()
>>> p([Integer(4),Integer(3),Integer(3),Integer(2),Integer(2),Integer(1)]).skew_by(p([Integer(2),Integer(1)]))
4*p[4, 3, 3, 2]
>>> zee = sage.combinat.sf.sfa.zee
>>> zee([Integer(4),Integer(3),Integer(3),Integer(2),Integer(2),Integer(1)])/zee([Integer(4),Integer(3),Integer(3),Integer(2)])
4
>>> s(Integer(0)).skew_by(s([Integer(1)]))
0
>>> s(Integer(1)).skew_by(s([Integer(1)]))
0
>>> s([]).skew_by(s([]))
s[]
>>> s([]).skew_by(s[Integer(1)])
0
theta(a)[source]#

Return the image of self under the theta endomorphism which sends \(p_k\) to \(a \cdot p_k\) for every positive integer \(k\).

In general, this is well-defined outside of the powersum basis only if the base ring is a \(\QQ\)-algebra.

INPUT:

  • 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[]
>>> from sage.all import *
>>> s = SymmetricFunctions(QQ).s()
>>> s([Integer(2),Integer(1)]).theta(Integer(2))
2*s[1, 1, 1] + 6*s[2, 1] + 2*s[3]
>>> p = SymmetricFunctions(QQ).p()
>>> p([Integer(2)]).theta(Integer(2))
2*p[2]
>>> p(Integer(0)).theta(Integer(2))
0
>>> p(Integer(1)).theta(Integer(2))
p[]
theta_qt(q=None, t=None)[source]#

Return the image of self under the \(q,t\)-deformed theta endomorphism which sends \(p_k\) to \(\frac{1-q^k}{1-t^k} \cdot p_k\) for all positive integers \(k\).

In general, this is well-defined outside of the powersum basis only if the base ring is a \(\QQ\)-algebra.

INPUT:

  • 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[]
>>> from sage.all import *
>>> QQqt = QQ['q,t'].fraction_field()
>>> q,t = QQqt.gens()
>>> p = SymmetricFunctions(QQqt).p()
>>> p([Integer(2)]).theta_qt(q,t)
((-q^2+1)/(-t^2+1))*p[2]
>>> p([Integer(2),Integer(1)]).theta_qt(q,t)
((q^3-q^2-q+1)/(t^3-t^2-t+1))*p[2, 1]
>>> p(Integer(0)).theta_qt(q=Integer(1),t=Integer(3))
0
>>> p([Integer(2),Integer(1)]).theta_qt(q=Integer(2),t=Integer(3))
3/16*p[2, 1]
>>> s = p.realization_of().schur()
>>> s([Integer(3)]).theta_qt(q=Integer(0))*(Integer(1)-t)*(Integer(1)-t**Integer(2))*(Integer(1)-t**Integer(3))
t^3*s[1, 1, 1] + (t^2+t)*s[2, 1] + s[3]
>>> p(Integer(1)).theta_qt()
p[]
verschiebung(n)[source]#

Return the image of the symmetric function self under the \(n\)-th Verschiebung operator.

The \(n\)-th Verschiebung operator \(\mathbf{V}_n\) is defined to be the unique algebra endomorphism \(V\) of the ring of symmetric functions that satisfies \(V(h_r) = h_{r/n}\) for every positive integer \(r\) divisible by \(n\), and satisfies \(V(h_r) = 0\) for every positive integer \(r\) not divisible by \(n\). This operator \(\mathbf{V}_n\) is a Hopf algebra endomorphism. For every nonnegative integer \(r\) with \(n \mid r\), it satisfies

\[\mathbf{V}_n(h_r) = h_{r/n}, \quad \mathbf{V}_n(p_r) = n p_{r/n}, \quad \mathbf{V}_n(e_r) = (-1)^{r - r/n} e_{r/n}\]

(where \(h\) is the complete homogeneous basis, \(p\) is the powersum basis, and \(e\) is the elementary basis). For every nonnegative integer \(r\) with \(n \nmid r\), it satisfes

\[\mathbf{V}_n(h_r) = \mathbf{V}_n(p_r) = \mathbf{V}_n(e_r) = 0.\]

The \(n\)-th Verschiebung operator is also called the \(n\)-th Verschiebung endomorphism. Its name derives from the Verschiebung (German for “shift”) endomorphism of the Witt vectors.

The \(n\)-th Verschiebung operator is adjoint to the \(n\)-th Adams operator (see adams_operator() for its definition) with respect to the Hall scalar product (scalar()).

The action of the \(n\)-th Verschiebung operator on the Schur basis can also be computed explicitly. The following (probably clumsier than necessary) description can be obtained by solving exercise 7.61 in Stanley’s [STA].

Let \(\lambda\) be a partition. Let \(n\) be a positive integer. If the \(n\)-core of \(\lambda\) is nonempty, then \(\mathbf{V}_n(s_\lambda) = 0\). Otherwise, the following method computes \(\mathbf{V}_n(s_\lambda)\): Write the partition \(\lambda\) in the form \((\lambda_1, \lambda_2, \ldots, \lambda_{ns})\) for some nonnegative integer \(s\). (If \(n\) does not divide the length of \(\lambda\), then this is achieved by adding trailing zeroes to \(\lambda\).) Set \(\beta_i = \lambda_i + ns - i\) for every \(s \in \{ 1, 2, \ldots, ns \}\). Then, \((\beta_1, \beta_2, \ldots, \beta_{ns})\) is a strictly decreasing sequence of nonnegative integers. Stably sort the list \((1, 2, \ldots, ns)\) in order of (weakly) increasing remainder of \(-1 - \beta_i\) modulo \(n\). Let \(\xi\) be the sign of the permutation that is used for this sorting. Let \(\psi\) be the sign of the permutation that is used to stably sort the list \((1, 2, \ldots, ns)\) in order of (weakly) increasing remainder of \(i - 1\) modulo \(n\). (Notice that \(\psi = (-1)^{n(n-1)s(s-1)/4}\).) Then, \(\mathbf{V}_n(s_\lambda) = \xi \psi \prod_{i = 0}^{n - 1} s_{\lambda^{(i)}}\), where \((\lambda^{(0)}, \lambda^{(1)}, \ldots, \lambda^{(n - 1)})\) is the \(n\)-quotient of \(\lambda\).

INPUT:

  • n – a positive integer

OUTPUT:

The result of applying the \(n\)-th Verschiebung operator (on the ring of symmetric functions) to self.

EXAMPLES:

sage: Sym = SymmetricFunctions(ZZ)
sage: p = Sym.p()
sage: h = Sym.h()
sage: s = Sym.s()
sage: m = Sym.m()
sage: s[3].verschiebung(2)
0
sage: s[3].verschiebung(3)
s[1]
sage: p[3].verschiebung(3)
3*p[1]
sage: m[3,2,1].verschiebung(3)
-18*m[1, 1] - 3*m[2]
sage: p[3,2,1].verschiebung(3)
0
sage: h[4].verschiebung(2)
h[2]
sage: p[2].verschiebung(2)
2*p[1]
sage: m[3,2,1].verschiebung(6)
12*m[1]
>>> from sage.all import *
>>> Sym = SymmetricFunctions(ZZ)
>>> p = Sym.p()
>>> h = Sym.h()
>>> s = Sym.s()
>>> m = Sym.m()
>>> s[Integer(3)].verschiebung(Integer(2))
0
>>> s[Integer(3)].verschiebung(Integer(3))
s[1]
>>> p[Integer(3)].verschiebung(Integer(3))
3*p[1]
>>> m[Integer(3),Integer(2),Integer(1)].verschiebung(Integer(3))
-18*m[1, 1] - 3*m[2]
>>> p[Integer(3),Integer(2),Integer(1)].verschiebung(Integer(3))
0
>>> h[Integer(4)].verschiebung(Integer(2))
h[2]
>>> p[Integer(2)].verschiebung(Integer(2))
2*p[1]
>>> m[Integer(3),Integer(2),Integer(1)].verschiebung(Integer(6))
12*m[1]

The Verschiebung endomorphisms are multiplicative:

sage: all( all( s(lam).verschiebung(2) * s(mu).verschiebung(2)
....:           == (s(lam) * s(mu)).verschiebung(2)
....:           for mu in Partitions(4) )
....:      for lam in Partitions(4) )
True
>>> from sage.all import *
>>> all( all( s(lam