Skip to content

Combinatorial Hopf Algebras ​

Everything else in this section is an algebra: a product, and nothing else. A Hopf algebra also has a coproduct, which takes one element to a sum of tensor pairs and pulls objects apart where the product puts them together. The two are not independent — they must satisfy

Δ(x⋅y)=Δ(x)⋅Δ(y)Δ(x \cdot y) = Δ(x) \cdot Δ(y)

in the tensor square. That compatibility is the whole point of the structure, and it is also the best test available, because the product and the coproduct are written separately and the identity relates them.

Two such algebras live here, both indexed by compositions (ordered lists of positive parts), and dual to each other:

basisproductcoproduct
NSym — non-commutative symmetric functionsHαH_αconcatenationΔ(Hn)=∑i+j=nHi⊗HjΔ(H_n) = \sum_{i+j=n} H_i ⊗ H_j, extended multiplicatively
QSym — quasi-symmetric functionsMαM_αquasi-shuffledeconcatenation

The graded piece of degree nn has one basis element per composition of nn, so both have dimension 2n−12^{n-1} — a count enumeratio already keeps.

NSym: concatenate ​

The product could not be simpler. NSym\mathrm{NSym} is the free associative algebra on H1,H2,…H_1, H_2, \ldots, so multiplying is sticking compositions together — and it is non-commutative, which is what the name records.

Concatenation

Concatenation, and the two orders differ.

InNSymH([2])⊗NSymH([1,3])\mathrm{NSymH}(\bigl\lbrack2\bigr\rbrack)⊗\mathrm{NSymH}(\bigl\lbrack1, 3\bigr\rbrack)OutNSymH([2,1,3])\mathrm{NSymH}(\bigl\lbrack2, 1, 3\bigr\rbrack)InNSymH([1])⊗NSymH([2])\mathrm{NSymH}(\bigl\lbrack1\bigr\rbrack)⊗\mathrm{NSymH}(\bigl\lbrack2\bigr\rbrack)OutNSymH([1,2])\mathrm{NSymH}(\bigl\lbrack1, 2\bigr\rbrack)InNSymH([2])⊗NSymH([1])\mathrm{NSymH}(\bigl\lbrack2\bigr\rbrack)⊗\mathrm{NSymH}(\bigl\lbrack1\bigr\rbrack)OutNSymH([2,1])\mathrm{NSymH}(\bigl\lbrack2, 1\bigr\rbrack)
source · editable

QSym: quasi-shuffle ​

Interleave the two compositions — and at each step you may instead add the two leading parts together. That third option is what makes it a quasi-shuffle, and it is why M1⋅M1=2M1,1+M2M_1 \cdot M_1 = 2M_{1,1} + M_2 rather than just 2M1,12M_{1,1}.

The overlap term

The M₂ term is the overlap. QSym, unlike NSym, is commutative.

InQSymM([1])⊗QSymM([1])\mathrm{QSymM}(\bigl\lbrack1\bigr\rbrack)⊗\mathrm{QSymM}(\bigl\lbrack1\bigr\rbrack)Out2QSymM([1,1])+QSymM([2])2\mathrm{QSymM}(\bigl\lbrack1, 1\bigr\rbrack)+\mathrm{QSymM}(\bigl\lbrack2\bigr\rbrack)InQSymM([1])⊗QSymM([2])\mathrm{QSymM}(\bigl\lbrack1\bigr\rbrack)⊗\mathrm{QSymM}(\bigl\lbrack2\bigr\rbrack)OutQSymM([3])+QSymM([1,2])+QSymM([2,1])\mathrm{QSymM}(\bigl\lbrack3\bigr\rbrack)+\mathrm{QSymM}(\bigl\lbrack1, 2\bigr\rbrack)+\mathrm{QSymM}(\bigl\lbrack2, 1\bigr\rbrack)InQSymM([2])⊗QSymM([1])\mathrm{QSymM}(\bigl\lbrack2\bigr\rbrack)⊗\mathrm{QSymM}(\bigl\lbrack1\bigr\rbrack)OutQSymM([3])+QSymM([1,2])+QSymM([2,1])\mathrm{QSymM}(\bigl\lbrack3\bigr\rbrack)+\mathrm{QSymM}(\bigl\lbrack1, 2\bigr\rbrack)+\mathrm{QSymM}(\bigl\lbrack2, 1\bigr\rbrack)
source · editable

The coproduct ​

Coproduct returns a sum of HopfTensor(left, right) pairs. For QSym it is deconcatenation — cut the composition at each of its gaps. For NSym it is the multiplicative extension of splitting a single part.

Pulling apart

Δ(M₁,₂) cuts at each gap. Δ(H₂) splits the part 2 as 0+2, 1+1, 2+0.

InCoproduct(QSymM([1,2]))\mathrm{Coproduct}(\mathrm{QSymM}(\bigl\lbrack1, 2\bigr\rbrack))OutHopfTensor(QSymM([]),QSymM([1,2]))+HopfTensor(QSymM([1,2]),QSymM([]))+HopfTensor(QSymM([1]),QSymM([2]))\mathrm{HopfTensor}(\mathrm{QSymM}(\bigl\lbrack\bigr\rbrack), \mathrm{QSymM}(\bigl\lbrack1, 2\bigr\rbrack))+\mathrm{HopfTensor}(\mathrm{QSymM}(\bigl\lbrack1, 2\bigr\rbrack), \mathrm{QSymM}(\bigl\lbrack\bigr\rbrack))+\mathrm{HopfTensor}(\mathrm{QSymM}(\bigl\lbrack1\bigr\rbrack), \mathrm{QSymM}(\bigl\lbrack2\bigr\rbrack))InCoproduct(NSymH([2]))\mathrm{Coproduct}(\mathrm{NSymH}(\bigl\lbrack2\bigr\rbrack))OutHopfTensor(NSymH([]),NSymH([2]))+HopfTensor(NSymH([2]),NSymH([]))+HopfTensor(NSymH([1]),NSymH([1]))\mathrm{HopfTensor}(\mathrm{NSymH}(\bigl\lbrack\bigr\rbrack), \mathrm{NSymH}(\bigl\lbrack2\bigr\rbrack))+\mathrm{HopfTensor}(\mathrm{NSymH}(\bigl\lbrack2\bigr\rbrack), \mathrm{NSymH}(\bigl\lbrack\bigr\rbrack))+\mathrm{HopfTensor}(\mathrm{NSymH}(\bigl\lbrack1\bigr\rbrack), \mathrm{NSymH}(\bigl\lbrack1\bigr\rbrack))
source · editable

Both coproducts are coassociative, and both satisfy the compatibility above — checked across every pair of basis elements up to degree 3, in both algebras. Those two facts are what make these bialgebras rather than an algebra and an unrelated map.

The antipode ​

A Hopf algebra has one more piece: an antipode SS with m(S⊗id)Δ=ηεm(S ⊗ \mathrm{id})Δ = η\varepsilon. On a graded connected algebra that axiom determines SS by a recursion — split off the two trivial terms of ΔΔ and

S(x)=−x−∑S(x′) x′′S(x) = -x - \sum S(x')\,x''

over the rest, where the left factor has strictly smaller degree. The package computes SS that way and then verifies the axiom by running it, rather than trusting the derivation.

S, and S² on the commutative side

On a commutative Hopf algebra the antipode is an involution, so S² = id on QSym.

InAntipode(QSymM([1]))\mathrm{Antipode}(\mathrm{QSymM}(\bigl\lbrack1\bigr\rbrack))Out−QSymM([1])-\mathrm{QSymM}(\bigl\lbrack1\bigr\rbrack)InAntipode(QSymM([1,2]))\mathrm{Antipode}(\mathrm{QSymM}(\bigl\lbrack1, 2\bigr\rbrack))OutQSymM([3])+QSymM([2,1])\mathrm{QSymM}(\bigl\lbrack3\bigr\rbrack)+\mathrm{QSymM}(\bigl\lbrack2, 1\bigr\rbrack)InAntipode(Antipode(QSymM([1,2])))\mathrm{Antipode}(\mathrm{Antipode}(\mathrm{QSymM}(\bigl\lbrack1, 2\bigr\rbrack)))OutQSymM([1,2])\mathrm{QSymM}(\bigl\lbrack1, 2\bigr\rbrack)
source · editable

Grading and dimension ​

Graded pieces

2^(n−1) compositions of n. The product is homogeneous: degrees add.

InAlgebraDimension(NSymAlgebra(4))\mathrm{AlgebraDimension}(\mathrm{NSymAlgebra}(4))Out88InAlgebraDimension(QSymAlgebra(5))\mathrm{AlgebraDimension}(\mathrm{QSymAlgebra}(5))Out1616InHopfDegree(QSymM([1])⊗QSymM([2]))\mathrm{HopfDegree}(\mathrm{QSymM}(\bigl\lbrack1\bigr\rbrack)⊗\mathrm{QSymM}(\bigl\lbrack2\bigr\rbrack))Out33
source · editable

Two more bases, and one lattice underneath ​

A composition of nn is the same data as a subset of {1,…,n−1}\{1, \ldots, n-1\}: take its partial sums. Refining a composition adds elements to that set and coarsening removes them, so the compositions of nn form a Boolean lattice — and the bases the subject is actually written in come from summing over that lattice and inverting.

definitioninverse
NSymHα=∑β coarsens αRβH_α = \sum_{β \text{ coarsens } α} R_βRα=∑β coarsens α(−1)ℓ(α)−ℓ(β)HβR_α = \sum_{β \text{ coarsens } α} (-1)^{ℓ(α)-ℓ(β)} H_β
QSymFα=∑β refines αMβF_α = \sum_{β \text{ refines } α} M_βMα=∑β refines α(−1)ℓ(β)−ℓ(α)FβM_α = \sum_{β \text{ refines } α} (-1)^{ℓ(β)-ℓ(α)} F_β

Those signed sums are Möbius inversion over the Boolean lattice, whose Möbius function is (−1)∣difference∣(-1)^{|\text{difference}|} — the same inversion the incidence algebras compute in general, here in closed form because the lattice is known.

The two directions are opposite — coarsen for NSym, refine for QSym — and that is not a slip. NSym and QSym are dual, with HH dual to MM and RR dual to FF. So duality is the best test available here:

⟨Rα,Fβ⟩=δαβ,\langle R_α, F_β \rangle = δ_{α β},

and since the two transition matrices are written down separately, nothing forces them to be inverse transposes of one another except the mathematics.

Change of basis

R_(2) is just H_(2); the finer composition is the one that picks up signs.

InInCompleteBasis(NSymR([1,1]))\mathrm{InCompleteBasis}(\mathrm{NSymR}(\bigl\lbrack1, 1\bigr\rbrack))OutNSymH([1,1])−NSymH([2])\mathrm{NSymH}(\bigl\lbrack1, 1\bigr\rbrack)-\mathrm{NSymH}(\bigl\lbrack2\bigr\rbrack)InInCompleteBasis(NSymR([2]))\mathrm{InCompleteBasis}(\mathrm{NSymR}(\bigl\lbrack2\bigr\rbrack))OutNSymH([2])\mathrm{NSymH}(\bigl\lbrack2\bigr\rbrack)InInMonomialBasis(QSymF([2]))\mathrm{InMonomialBasis}(\mathrm{QSymF}(\bigl\lbrack2\bigr\rbrack))OutQSymM([2])+QSymM([1,1])\mathrm{QSymM}(\bigl\lbrack2\bigr\rbrack)+\mathrm{QSymM}(\bigl\lbrack1, 1\bigr\rbrack)InInRibbonBasis(NSymH([2,1]))\mathrm{InRibbonBasis}(\mathrm{NSymH}(\bigl\lbrack2, 1\bigr\rbrack))OutNSymR([3])+NSymR([2,1])\mathrm{NSymR}(\bigl\lbrack3\bigr\rbrack)+\mathrm{NSymR}(\bigl\lbrack2, 1\bigr\rbrack)
source · editable

What the new bases buy ​

Both are first-class here — the product, coproduct, antipode and containment all work on RR and FF directly, and answers come back in the basis the question was asked in. What changes is how simple the answers are.

The ribbon product has a two-term closed form:

Rα⋅Rβ=Rα⋅β+Rα▹β,R_α \cdot R_β = R_{α \cdot β} + R_{α \triangleright β},

where α⋅βα \cdot β is concatenation and α▹βα \triangleright β is near-concatenation — join the two, adding αα's last part to ββ's first. That second operation has no meaning in the HH basis at all.

The ribbon antipode is a single signed basis element:

S(Rα)=(−1)∣α∣Rα∗,S(R_α) = (-1)^{|α|} R_{α^{*}},

for α∗α^{*} the conjugate composition — the transpose of the ribbon's skew shape. In the HH basis the same antipode is an alternating sum over every coarsening, so this is about as clear a demonstration of what a good basis is for as the subject offers.

Two terms, and one term

Concatenation and near-concatenation; then an antipode with a single term.

InNSymR([2])⊗NSymR([1])\mathrm{NSymR}(\bigl\lbrack2\bigr\rbrack)⊗\mathrm{NSymR}(\bigl\lbrack1\bigr\rbrack)OutNSymR([3])+NSymR([2,1])\mathrm{NSymR}(\bigl\lbrack3\bigr\rbrack)+\mathrm{NSymR}(\bigl\lbrack2, 1\bigr\rbrack)InQSymF([1])⊗QSymF([1])\mathrm{QSymF}(\bigl\lbrack1\bigr\rbrack)⊗\mathrm{QSymF}(\bigl\lbrack1\bigr\rbrack)OutQSymF([2])+QSymF([1,1])\mathrm{QSymF}(\bigl\lbrack2\bigr\rbrack)+\mathrm{QSymF}(\bigl\lbrack1, 1\bigr\rbrack)InAntipode(NSymR([3]))\mathrm{Antipode}(\mathrm{NSymR}(\bigl\lbrack3\bigr\rbrack))Out−NSymR([1,1,1])-\mathrm{NSymR}(\bigl\lbrack1, 1, 1\bigr\rbrack)InConjugateComposition([2,1])\mathrm{ConjugateComposition}(\bigl\lbrack2, 1\bigr\rbrack)Out[2,1]\bigl\lbrack2, 1\bigr\rbrack
source · editable

Which involution α↦α∗α ↦ α^{*} is depends on a convention that is easy to get backwards — at n=3n = 3 both (2,1)(2,1) and (1,2)(1,2) are self-conjugate under the right one and swap under the wrong one. It is settled here by the antipode rather than by taste: only one of the two candidate maps makes S(Rα)S(R_α) a single term at all.

Things worth knowing ​

Tensor pairs get their own head. HopfTensor(a, b), not CircleTimes — that is already the shared ordered product across the algebra libraries, and overloading it for a genuine tensor pair would be a conflation.

The two algebras share an index set but are not the same algebra. Mixing HαH_α and MαM_α in one product is refused rather than silently coerced, and containment distinguishes them.

A sum of mixed degrees has no degree, so HopfDegree leaves that call standing.

Not built yet. Sym itself sitting inside QSym as the symmetric functions, and the Hopf-algebra maps between these and the other algebras in this section.