# Bialgebras with basis#

class sage.categories.bialgebras_with_basis.BialgebrasWithBasis(base_category)[source]#

The category of bialgebras with a distinguished basis.

EXAMPLES:

sage: C = BialgebrasWithBasis(QQ); C
Category of bialgebras with basis over Rational Field

sage: sorted(C.super_categories(), key=str)
[Category of algebras with basis over Rational Field,
Category of bialgebras over Rational Field,
Category of coalgebras with basis over Rational Field]

>>> from sage.all import *
>>> C = BialgebrasWithBasis(QQ); C
Category of bialgebras with basis over Rational Field

>>> sorted(C.super_categories(), key=str)
[Category of algebras with basis over Rational Field,
Category of bialgebras over Rational Field,
Category of coalgebras with basis over Rational Field]

class ElementMethods[source]#

Bases: object

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

convolution_power_of_id(n)[source]#

Compute the $$n$$-th convolution power of the identity morphism $$\mathrm{Id}$$ on self.

INPUT:

• n – a nonnegative integer

OUTPUT:

• the image of self under the convolution power $$\mathrm{Id}^{*n}$$

Note

In the literature, this is also called a Hopf power or Sweedler power, cf. [AL2015].

sage.categories.bialgebras.ElementMethods.convolution_product()

Todo

Remove dependency on modules_with_basis methods.

EXAMPLES:

sage: # needs sage.combinat sage.modules
sage: h = SymmetricFunctions(QQ).h()
sage: h[5].convolution_power_of_id(2)
2*h[3, 2] + 2*h[4, 1] + 2*h[5]
sage: h[5].plethysm(2*h[1])
2*h[3, 2] + 2*h[4, 1] + 2*h[5]
sage: h([]).convolution_power_of_id(0)
h[]
sage: h([]).convolution_power_of_id(1)
h[]
sage: h[3,2].convolution_power_of_id(0)
0
sage: h[3,2].convolution_power_of_id(1)
h[3, 2]

>>> from sage.all import *
>>> # needs sage.combinat sage.modules
>>> h = SymmetricFunctions(QQ).h()
>>> h[Integer(5)].convolution_power_of_id(Integer(2))
2*h[3, 2] + 2*h[4, 1] + 2*h[5]
>>> h[Integer(5)].plethysm(Integer(2)*h[Integer(1)])
2*h[3, 2] + 2*h[4, 1] + 2*h[5]
>>> h([]).convolution_power_of_id(Integer(0))
h[]
>>> h([]).convolution_power_of_id(Integer(1))
h[]
>>> h[Integer(3),Integer(2)].convolution_power_of_id(Integer(0))
0
>>> h[Integer(3),Integer(2)].convolution_power_of_id(Integer(1))
h[3, 2]

sage: S = NonCommutativeSymmetricFunctions(QQ).S()                      # needs sage.combinat sage.modules
sage: S[4].convolution_power_of_id(5)                                   # needs sage.combinat sage.modules
5*S[1, 1, 1, 1] + 10*S[1, 1, 2] + 10*S[1, 2, 1]
+ 10*S[1, 3] + 10*S[2, 1, 1] + 10*S[2, 2] + 10*S[3, 1] + 5*S[4]

>>> from sage.all import *
>>> S = NonCommutativeSymmetricFunctions(QQ).S()                      # needs sage.combinat sage.modules
>>> S[Integer(4)].convolution_power_of_id(Integer(5))                                   # needs sage.combinat sage.modules
5*S[1, 1, 1, 1] + 10*S[1, 1, 2] + 10*S[1, 2, 1]
+ 10*S[1, 3] + 10*S[2, 1, 1] + 10*S[2, 2] + 10*S[3, 1] + 5*S[4]

sage: m = SymmetricFunctionsNonCommutingVariables(QQ).m()               # needs sage.combinat sage.graphs sage.modules
sage: m[[1,3],[2]].convolution_power_of_id(-2)                          # needs sage.combinat sage.graphs sage.modules
3*m{{1}, {2, 3}} + 3*m{{1, 2}, {3}} + 6*m{{1, 2, 3}} - 2*m{{1, 3}, {2}}

>>> from sage.all import *
>>> m = SymmetricFunctionsNonCommutingVariables(QQ).m()               # needs sage.combinat sage.graphs sage.modules
>>> m[[Integer(1),Integer(3)],[Integer(2)]].convolution_power_of_id(-Integer(2))                          # needs sage.combinat sage.graphs sage.modules
3*m{{1}, {2, 3}} + 3*m{{1, 2}, {3}} + 6*m{{1, 2, 3}} - 2*m{{1, 3}, {2}}

convolution_product(*maps)[source]#

Return the image of self under the convolution product (map) of the maps.

Let $$A$$ and $$B$$ be bialgebras over a commutative ring $$R$$. Given maps $$f_i : A \to B$$ for $$1 \leq i < n$$, define the convolution product

$(f_1 * f_2 * \cdots * f_n) := \mu^{(n-1)} \circ (f_1 \otimes f_2 \otimes \cdots \otimes f_n) \circ \Delta^{(n-1)},$

where $$\Delta^{(k)} := \bigl(\Delta \otimes \mathrm{Id}^{\otimes(k-1)}\bigr) \circ \Delta^{(k-1)}$$, with $$\Delta^{(1)} = \Delta$$ (the ordinary coproduct in $$A$$) and $$\Delta^{(0)} = \mathrm{Id}$$; and with $$\mu^{(k)} := \mu \circ \bigl(\mu^{(k-1)} \otimes \mathrm{Id})$$ and $$\mu^{(1)} = \mu$$ (the ordinary product in $$B$$). See [Swe1969].

(In the literature, one finds, e.g., $$\Delta^{(2)}$$ for what we denote above as $$\Delta^{(1)}$$. See [KMN2012].)

INPUT:

• maps – any number $$n \geq 0$$ of linear maps $$f_1, f_2, \ldots, f_n$$ on self.parent(); or a single list or tuple of such maps

OUTPUT:

• the convolution product of maps applied to self

AUTHORS:

• Amy Pang - 12 June 2015 - Sage Days 65

Todo

Remove dependency on modules_with_basis methods.

EXAMPLES:

We compute convolution products of the identity and antipode maps on Schur functions:

sage: # needs sage.combinat sage.modules
sage: Id = lambda x: x
sage: Antipode = lambda x: x.antipode()
sage: s = SymmetricFunctions(QQ).schur()
sage: s[3].convolution_product(Id, Id)                                  # needs lrcalc_python
2*s[2, 1] + 4*s[3]
sage: s[3,2].convolution_product(Id) == s[3,2]
True

>>> from sage.all import *
>>> # needs sage.combinat sage.modules
>>> Id = lambda x: x
>>> Antipode = lambda x: x.antipode()
>>> s = SymmetricFunctions(QQ).schur()
>>> s[Integer(3)].convolution_product(Id, Id)                                  # needs lrcalc_python
2*s[2, 1] + 4*s[3]
>>> s[Integer(3),Integer(2)].convolution_product(Id) == s[Integer(3),Integer(2)]
True


The method accepts multiple arguments, or a single argument consisting of a list of maps:

sage: s[3,2].convolution_product(Id, Id)                                # needs lrcalc_python sage.combinat sage.modules
2*s[2, 1, 1, 1] + 6*s[2, 2, 1] + 6*s[3, 1, 1] + 12*s[3, 2] + 6*s[4, 1] + 2*s[5]
sage: s[3,2].convolution_product([Id, Id])                              # needs lrcalc_python sage.combinat sage.modules
2*s[2, 1, 1, 1] + 6*s[2, 2, 1] + 6*s[3, 1, 1] + 12*s[3, 2] + 6*s[4, 1] + 2*s[5]

>>> from sage.all import *
>>> s[Integer(3),Integer(2)].convolution_product(Id, Id)                                # needs lrcalc_python sage.combinat sage.modules
2*s[2, 1, 1, 1] + 6*s[2, 2, 1] + 6*s[3, 1, 1] + 12*s[3, 2] + 6*s[4, 1] + 2*s[5]
>>> s[Integer(3),Integer(2)].convolution_product([Id, Id])                              # needs lrcalc_python sage.combinat sage.modules
2*s[2, 1, 1, 1] + 6*s[2, 2, 1] + 6*s[3, 1, 1] + 12*s[3, 2] + 6*s[4, 1] + 2*s[5]


We test the defining property of the antipode morphism; namely, that the antipode is the inverse of the identity map in the convolution algebra whose identity element is the composition of the counit and unit:

sage: (s[3,2].convolution_product()                                     # needs lrcalc_python sage.combinat sage.modules
....:   == s[3,2].convolution_product(Antipode, Id)
....:   == s[3,2].convolution_product(Id, Antipode))
True

>>> from sage.all import *
>>> (s[Integer(3),Integer(2)].convolution_product()                                     # needs lrcalc_python sage.combinat sage.modules
...   == s[Integer(3),Integer(2)].convolution_product(Antipode, Id)
...   == s[Integer(3),Integer(2)].convolution_product(Id, Antipode))
True

sage: Psi = NonCommutativeSymmetricFunctions(QQ).Psi()                  # needs sage.combinat sage.modules
sage: Psi[2,1].convolution_product(Id, Id, Id)                          # needs sage.combinat sage.modules
3*Psi[1, 2] + 6*Psi[2, 1]
sage: (Psi[5,1] - Psi[1,5]).convolution_product(Id, Id, Id)             # needs sage.combinat sage.modules
-3*Psi[1, 5] + 3*Psi[5, 1]

>>> from sage.all import *
>>> Psi = NonCommutativeSymmetricFunctions(QQ).Psi()                  # needs sage.combinat sage.modules
>>> Psi[Integer(2),Integer(1)].convolution_product(Id, Id, Id)                          # needs sage.combinat sage.modules
3*Psi[1, 2] + 6*Psi[2, 1]
>>> (Psi[Integer(5),Integer(1)] - Psi[Integer(1),Integer(5)]).convolution_product(Id, Id, Id)             # needs sage.combinat sage.modules
-3*Psi[1, 5] + 3*Psi[5, 1]

sage: # needs sage.combinat sage.groups sage.modules
sage: G = SymmetricGroup(3)
sage: QG = GroupAlgebra(G, QQ)
sage: x = QG.sum_of_terms([(p, p.length())
....:                      for p in Permutations(3)]); x
[1, 3, 2] + [2, 1, 3] + 2*[2, 3, 1] + 2*[3, 1, 2] + 3*[3, 2, 1]
sage: x.convolution_product(Id, Id)
5*[1, 2, 3] + 2*[2, 3, 1] + 2*[3, 1, 2]
sage: x.convolution_product(Id, Id, Id)
4*[1, 2, 3] + [1, 3, 2] + [2, 1, 3] + 3*[3, 2, 1]
sage: x.convolution_product([Id] * 6)
9*[1, 2, 3]

>>> from sage.all import *
>>> # needs sage.combinat sage.groups sage.modules
>>> G = SymmetricGroup(Integer(3))
>>> QG = GroupAlgebra(G, QQ)
>>> x = QG.sum_of_terms([(p, p.length())
...                      for p in Permutations(Integer(3))]); x
[1, 3, 2] + [2, 1, 3] + 2*[2, 3, 1] + 2*[3, 1, 2] + 3*[3, 2, 1]
>>> x.convolution_product(Id, Id)
5*[1, 2, 3] + 2*[2, 3, 1] + 2*[3, 1, 2]
>>> x.convolution_product(Id, Id, Id)
4*[1, 2, 3] + [1, 3, 2] + [2, 1, 3] + 3*[3, 2, 1]
>>> x.convolution_product([Id] * Integer(6))
9*[1, 2, 3]

class ParentMethods[source]#

Bases: object

convolution_product(*maps)[source]#

Return the convolution product (a map) of the given maps.

Let $$A$$ and $$B$$ be bialgebras over a commutative ring $$R$$. Given maps $$f_i : A \to B$$ for $$1 \leq i < n$$, define the convolution product

$(f_1 * f_2 * \cdots * f_n) := \mu^{(n-1)} \circ (f_1 \otimes f_2 \otimes \cdots \otimes f_n) \circ \Delta^{(n-1)},$

where $$\Delta^{(k)} := \bigl(\Delta \otimes \mathrm{Id}^{\otimes(k-1)}\bigr) \circ \Delta^{(k-1)}$$, with $$\Delta^{(1)} = \Delta$$ (the ordinary coproduct in $$A$$) and $$\Delta^{(0)} = \mathrm{Id}$$; and with $$\mu^{(k)} := \mu \circ \bigl(\mu^{(k-1)} \otimes \mathrm{Id})$$ and $$\mu^{(1)} = \mu$$ (the ordinary product in $$B$$). See [Swe1969].

(In the literature, one finds, e.g., $$\Delta^{(2)}$$ for what we denote above as $$\Delta^{(1)}$$. See [KMN2012].)

INPUT:

• maps – any number $$n \geq 0$$ of linear maps $$f_1, f_2, \ldots, f_n$$ on self; or a single list or tuple of such maps

OUTPUT:

• the new map $$f_1 * f_2 * \cdots * f_2$$ representing their convolution product

sage.categories.bialgebras.ElementMethods.convolution_product()

AUTHORS:

• Aaron Lauve - 12 June 2015 - Sage Days 65

Todo

Remove dependency on modules_with_basis methods.

EXAMPLES:

We construct some maps: the identity, the antipode and projection onto the homogeneous component of degree 2:

sage: Id = lambda x: x
sage: Antipode = lambda x: x.antipode()
sage: Proj2 = lambda x: x.parent().sum_of_terms([(m, c) for (m, c) in x if m.size() == 2])

>>> from sage.all import *
>>> Id = lambda x: x
>>> Antipode = lambda x: x.antipode()
>>> Proj2 = lambda x: x.parent().sum_of_terms([(m, c) for (m, c) in x if m.size() == Integer(2)])


Compute the convolution product of the identity with itself and with the projection Proj2 on the Hopf algebra of non-commutative symmetric functions:

sage: # needs sage.combinat sage.modules
sage: R = NonCommutativeSymmetricFunctions(QQ).ribbon()
sage: T = R.convolution_product([Id, Id])
sage: [T(R(comp)) for comp in Compositions(3)]
[4*R[1, 1, 1] + R[1, 2] + R[2, 1],
2*R[1, 1, 1] + 4*R[1, 2] + 2*R[2, 1] + 2*R[3],
2*R[1, 1, 1] + 2*R[1, 2] + 4*R[2, 1] + 2*R[3],
R[1, 2] + R[2, 1] + 4*R[3]]
sage: T = R.convolution_product(Proj2, Id)
sage: [T(R([i])) for i in range(1, 5)]
[0, R[2], R[2, 1] + R[3], R[2, 2] + R[4]]

>>> from sage.all import *
>>> # needs sage.combinat sage.modules
>>> R = NonCommutativeSymmetricFunctions(QQ).ribbon()
>>> T = R.convolution_product([Id, Id])
>>> [T(R(comp)) for comp in Compositions(Integer(3))]
[4*R[1, 1, 1] + R[1, 2] + R[2, 1],
2*R[1, 1, 1] + 4*R[1, 2] + 2*R[2, 1] + 2*R[3],
2*R[1, 1, 1] + 2*R[1, 2] + 4*R[2, 1] + 2*R[3],
R[1, 2] + R[2, 1] + 4*R[3]]
>>> T = R.convolution_product(Proj2, Id)
>>> [T(R([i])) for i in range(Integer(1), Integer(5))]
[0, R[2], R[2, 1] + R[3], R[2, 2] + R[4]]


Compute the convolution product of no maps on the Hopf algebra of symmetric functions in non-commuting variables. This is the composition of the counit with the unit:

sage: # needs sage.combinat sage.graphs sage.modules
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).m()
sage: T = m.convolution_product()
sage: [T(m(lam))
....:  for lam in SetPartitions(0).list() + SetPartitions(2).list()]
[m{}, 0, 0]

>>> from sage.all import *
>>> # needs sage.combinat sage.graphs sage.modules
>>> m = SymmetricFunctionsNonCommutingVariables(QQ).m()
>>> T = m.convolution_product()
>>> [T(m(lam))
...  for lam in SetPartitions(Integer(0)).list() + SetPartitions(Integer(2)).list()]
[m{}, 0, 0]


Compute the convolution product of the projection Proj2 with the identity on the Hopf algebra of symmetric functions in non-commuting variables:

sage: T = m.convolution_product(Proj2, Id)                              # needs sage.combinat sage.graphs sage.modules
sage: [T(m(lam)) for lam in SetPartitions(3)]                           # needs sage.combinat sage.graphs sage.modules
[0,
m{{1, 2}, {3}} + m{{1, 2, 3}},
m{{1, 2}, {3}} + m{{1, 2, 3}},
m{{1, 2}, {3}} + m{{1, 2, 3}},
3*m{{1}, {2}, {3}} + 3*m{{1}, {2, 3}} + 3*m{{1, 3}, {2}}]

>>> from sage.all import *
>>> T = m.convolution_product(Proj2, Id)                              # needs sage.combinat sage.graphs sage.modules
>>> [T(m(lam)) for lam in SetPartitions(Integer(3))]                           # needs sage.combinat sage.graphs sage.modules
[0,
m{{1, 2}, {3}} + m{{1, 2, 3}},
m{{1, 2}, {3}} + m{{1, 2, 3}},
m{{1, 2}, {3}} + m{{1, 2, 3}},
3*m{{1}, {2}, {3}} + 3*m{{1}, {2, 3}} + 3*m{{1, 3}, {2}}]


Compute the convolution product of the antipode with itself and the identity map on group algebra of the symmetric group:

sage: # needs sage.combinat sage.groups sage.modules
sage: G = SymmetricGroup(3)
sage: QG = GroupAlgebra(G, QQ)
sage: x = QG.sum_of_terms(
....:         [(p, p.number_of_peaks() + p.number_of_inversions())
....:          for p in Permutations(3)]
....:     ); x
2*[1, 3, 2] + [2, 1, 3] + 3*[2, 3, 1] + 2*[3, 1, 2] + 3*[3, 2, 1]
sage: T = QG.convolution_product(Antipode, Antipode, Id)
sage: T(x)
2*[1, 3, 2] + [2, 1, 3] + 2*[2, 3, 1] + 3*[3, 1, 2] + 3*[3, 2, 1]

>>> from sage.all import *
>>> # needs sage.combinat sage.groups sage.modules
>>> G = SymmetricGroup(Integer(3))
>>> QG = GroupAlgebra(G, QQ)
>>> x = QG.sum_of_terms(
...         [(p, p.number_of_peaks() + p.number_of_inversions())
...          for p in Permutations(Integer(3))]
...     ); x
2*[1, 3, 2] + [2, 1, 3] + 3*[2, 3, 1] + 2*[3, 1, 2] + 3*[3, 2, 1]
>>> T = QG.convolution_product(Antipode, Antipode, Id)
>>> T(x)
2*[1, 3, 2] + [2, 1, 3] + 2*[2, 3, 1] + 3*[3, 1, 2] + 3*[3, 2, 1]