Concatenation
Concatenation, and the two orders differ.
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)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:
| basis | product | coproduct | |
|---|---|---|---|
| NSym — non-commutative symmetric functions | Hα | concatenation | Δ(Hn)=∑i+j=nHi⊗Hj, extended multiplicatively |
| QSym — quasi-symmetric functions | Mα | quasi-shuffle | deconcatenation |
The graded piece of degree n has one basis element per composition of n, so both have dimension 2n−1 — a count enumeratio already keeps.
The product could not be simpler. NSym is the free associative algebra on H1,H2,…, so multiplying is sticking compositions together — and it is non-commutative, which is what the name records.
Concatenation, and the two orders differ.
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+M2 rather than just 2M1,1.
The M₂ term is the overlap. QSym, unlike NSym, is commutative.
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.
Δ(M₁,₂) cuts at each gap. Δ(H₂) splits the part 2 as 0+2, 1+1, 2+0.
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.
A Hopf algebra has one more piece: an antipode S with m(S⊗id)Δ=ηε. On a graded connected algebra that axiom determines S by a recursion — split off the two trivial terms of Δ and
S(x)=−x−∑S(x′)x′′over the rest, where the left factor has strictly smaller degree. The package computes S that way and then verifies the axiom by running it, rather than trusting the derivation.
On a commutative Hopf algebra the antipode is an involution, so S² = id on QSym.
2^(n−1) compositions of n. The product is homogeneous: degrees add.
A composition of n is the same data as a subset of {1,…,n−1}: take its partial sums. Refining a composition adds elements to that set and coarsening removes them, so the compositions of n form a Boolean lattice — and the bases the subject is actually written in come from summing over that lattice and inverting.
| definition | inverse | |
|---|---|---|
| NSym | Hα=∑β coarsens αRβ | Rα=∑β coarsens α(−1)ℓ(α)−ℓ(β)Hβ |
| QSym | Fα=∑β refines αMβ | Mα=∑β refines α(−1)ℓ(β)−ℓ(α)Fβ |
Those signed sums are Möbius inversion over the Boolean lattice, whose Möbius function is (−1)∣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 H dual to M and R dual to F. So duality is the best test available here:
⟨Rα,Fβ⟩=δαβ,and since the two transition matrices are written down separately, nothing forces them to be inverse transposes of one another except the mathematics.
R_(2) is just H_(2); the finer composition is the one that picks up signs.
Both are first-class here — the product, coproduct, antipode and containment all work on R and F 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α▹β,where α⋅β is concatenation and α▹β is near-concatenation — join the two, adding α's last part to β's first. That second operation has no meaning in the H basis at all.
The ribbon antipode is a single signed basis element:
S(Rα)=(−1)∣α∣Rα∗,for α∗ the conjugate composition — the transpose of the ribbon's skew shape. In the H 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.
Concatenation and near-concatenation; then an antipode with a single term.
Which involution α↦α∗ is depends on a convention that is easy to get backwards — at n=3 both (2,1) and (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α) a single term at all.
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α and 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.