32 All Algebras from One Construction

Every algebraic structure is a free algebra on its generators divided by relations. The free part is rows or trees of operations. A relation is a symmetric idempotent above the diagonal, and dividing by it is splitting that idempotent. Equivalently, an algebra is an algebra for the monad of the adjunction “free \(\dashv \) forget”, whose structure map is evaluation. Each law is one rung of the ladder.

32.1 The construction

AL1 (free algebras). For a signature of operations, terms are finite trees whose nodes are operations and whose leaves are generators: rows with branching. The term algebra \(F(X)\) is free:

\begin{equation} \mathrm {Hom}(F(X),A)\cong \mathrm {Hom}_{\mathrm {Set}}(X,A), \tag{579}\end{equation}
with unit “a generator as a one-leaf tree” and counit “evaluate a tree”.

AL2 (relations as idempotents). A congruence is a relation \(E\) with \(\Delta \le E\), \(E^\dagger =E\), \(EE=E\) (L27), compatible with the operations: a symmetric idempotent above the diagonal. Every set of equations generates a least congruence, as a meet (J5). Splitting \(E\) gives the quotient:

\begin{equation} A=\langle X\mid R\rangle =F(X)/E_R . \tag{580}\end{equation}

AL3 (monads). \(T=UF\), from the adjunction \(F\dashv U\), is a monad. An algebra is \((A,\ \alpha :TA\to A)\), with \(\alpha \) evaluating terms, compatible with unit and multiplication. Classes defined by equations are exactly those closed under homomorphic images, subalgebras and products (HSP).

32.2 The laws as rungs

AL4.

Law Equation Rung
associativity \((ab)c=a(bc)\) composition; J (Y2)
unit \(1a=a\) \(\mathrm {refl}\); one-point
inverse \(aa^{-1}=1\) dagger; \(\sigma \) on pairs (L36)
commutativity \(ab=ba\) exchange \(\sigma \)
distributivity \(a(b+c)=ab+ac\) endomaps preserve \(+\) (L37)
idempotence \(e^2=e\) cut
involution \(a^{**}=a\), \((ab)^*=b^*a^*\) dagger, reversal
positivity \(a^*a\ge 0\) cone
completeness joins of cuts \(\exists \) (J5)
Jacobi, Leibniz \([a,[b,c]]+\text {cyclic}=0\) derivation; dual numbers \(\varepsilon ^2=0\)

32.3 The catalogue

AL5.

Structure Operations Laws (AL4)
magma \(\cdot \) —
semigroup, monoid \(\cdot \), \(1\) associativity, unit
group \(\cdot \), \(1\), \({}^{-1}\) \(+\) inverse
abelian group \(+\), \(0\), \(-\) \(+\) commutativity
ring \(+\), \(\cdot \) distributivity: additive endomaps
field \(+\), \(\cdot \), \({}^{-1}\) on \(a\neq 0\) no proper ideal (S5)
module, vector space \(R\to \mathrm {End}_+(M)\) representation of a ring
associative algebra \(R\to Z(A)\) module and ring
lattice, Boolean, Heyting \(\wedge \), \(\vee \), \(\Rightarrow \) adjoints of \(\Delta \); currying (H1–H5)
\(*\)-algebra, C\(^*\)-algebra \(*\), \(\|\cdot \|\) involution; \(\|a^*a\|=\|a\|^2\)
von Neumann algebra weak closure cuts form a complete lattice
division algebras \(\mathbb R,\mathbb C,\mathbb H,\mathbb O\) doubling (Q1)
Lie algebra \([\cdot ,\cdot ]\) antisymmetric part (AL6)
Jordan algebra \(\circ \) symmetric part (AL6)
tensor quotients see AL7 relations on \(T(V)\)
Hopf algebra \(\cdot \), \(\Delta \), \(S\) the diagonal as an algebra map (AL8)

32.4 Lie and Jordan from the exchange

AL6. On \(A\otimes A\), the exchange \(\sigma \) has the cuts \(P_\pm =\tfrac 12(1\pm \sigma )\), with \(P_++P_-=1\). Composing the product \(m:A\otimes A\to A\) with them splits it:

\begin{equation} ab=\underbrace {\tfrac 12(ab+ba)}_{a\circ b=m P_+}+\underbrace {\tfrac 12(ab-ba)}_{\frac 12[a,b]=mP_-} . \tag{581}\end{equation}

Conversely, \(\mathfrak g\mapsto U(\mathfrak g)=T(\mathfrak g)/(xy-yx-[x,y])\) is left adjoint to “take the commutator”. A group’s Lie algebra is its tangent at \(1\), computed with \(\varepsilon ^2=0\). The bracket comes from the group commutator at second order, with \(\varepsilon _1\varepsilon _2\neq 0\).

32.5 Tensor algebra and its quotients

AL7. The free associative algebra on a vector space is the algebra of rows, \(T(V)=\bigoplus _nV^{\otimes n}\). Each quotient below is \(T(V)\) divided by one relation:

Relation Algebra
\(xy=yx\) symmetric algebra (polynomials)
\(xy=-yx\) exterior algebra
\(v^2=q(v)\) Clifford algebra
\(xp-px=i\hbar \) Weyl algebra
\(xy-yx=[x,y]\) universal enveloping algebra
\(x^2=x\) Boolean algebra

32.6 Hopf algebras: the diagonal as an algebra map

AL8. Reversing arrows (K5) turns an algebra into a coalgebra. A Hopf algebra carries both, compatibly, together with an antipode.

Structure On the group algebra \(k[G]\) Rung
coproduct \(\Delta (g)=g\otimes g\) duplication \(\delta \)
counit \(\epsilon (g)=1\) weakening \(\pi \)
antipode \(S(g)=g^{-1}\) inverse, dagger

On functions on \(G\), \(\Delta f(x,y)=f(xy)\) dualises the product. Deforming the coproduct gives the quantum groups \(U_q(\mathfrak g)\), whose \(R\)-matrices satisfy Yang–Baxter.

32.7 The chain

AL9.

Step Result From
AL1 free algebras of trees and rows generators; \(F\dashv U\)
AL2 presentations \(\langle X\mid R\rangle \) congruence \(=\) symmetric idempotent above \(\Delta \)
AL3 algebras for the monad \(T=UF\); HSP counit \(=\) evaluation
AL4 every law a rung of the ladder
AL5 the catalogue AL1–AL4
AL6 Lie and Jordan cuts \(\tfrac 12(1\pm \sigma )\) on the product
AL7 symmetric, exterior, Clifford, Weyl, \(U(\mathfrak g)\), Boolean quotients of \(T(V)\)
AL8 Hopf algebras, quantum groups \(\delta \), \(\pi \), inverse as algebra maps

32.8 Categories as Monoids, Sets as One Category

A monoid is a category with one object. A category is a monoid whose elements have a source and a target: a monoid in graphs over a fixed set of objects, whose unit is the diagonal. Set theory is the theory of one such category, \(\mathbf {Set}\), stated by universal properties built earlier:

K1 (one object: monoids). A monoid \(M\) is a category with one object \(\ast \), with \(\mathrm {Hom}(\ast ,\ast )=M\), composition the product and identity \(1\). Monoid homomorphisms are functors, and a group is a one-object groupoid (G3).

K2 (many objects: graphs over \(C_0\)). Fix a set \(C_0\). A graph over \(C_0\) is a span \(C_0\xleftarrow {\ s\ }C_1\xrightarrow {\ t\ }C_0\), as for relations (R5). Graphs over \(C_0\) form a monoidal category:

\begin{equation} (G\otimes H)_1=G_1\times _{C_0}H_1=\{(g,h):\ t(g)=s(h)\}, \qquad I=\bigl (C_0\xleftarrow {\ \mathrm {id}\ }C_0\xrightarrow {\ \mathrm {id}\ }C_0\bigr ). \tag{582}\end{equation}
The tensor product glues along a shared middle, as in composition (L19), and the unit is the diagonal \(\Delta \).

K3 (a category is a monoid of K2). A category with objects \(C_0\) is a monoid \((C_1,\mu ,\eta )\) in graphs over \(C_0\):

\begin{equation} \mu :C_1\times _{C_0}C_1\to C_1\ \ (\text {composition}), \qquad \eta :C_0\to C_1\ \ (\text {identities}), \tag{583}\end{equation}
with associativity and unit laws as the monoid laws. Equivalently, a category is a monad in the bicategory of spans. Taking \(C_0=1\) returns K1.

K4 (functors, transformations, adjunctions).

Notion As monoids Earlier rung
functor homomorphism of monoids over a map \(C_0\to D_0\) monoid homomorphism (L31)
natural transformation a family of arrows commuting with the image naturality (Y7)
adjunction \(\mathrm {Hom}(FP,Q)\simeq \mathrm {Hom}(P,GQ)\), unit and counit from \(\mathrm {id}\) Y9
monad a monoid in endofunctors under composition K3, one level up

The pattern repeats one level up: categories form a 2-category whose monoids, the monads, are again monoids.

K5 (\(\mathbf {Set}\) by universal properties). Set theory is the theory of one category, specified by universal properties (V1):

Set-theoretic notion Universal property in \(\mathbf {Set}\) Earlier rung
element \(x\in X\) map \(1\to X\), \(1=\sum _b(a=b)\) one-point (Y3)
empty set initial object \(\bot =\{a:\neg (a=a)\}\) N1
equality diagonal \(\Delta \subseteq X\times X\) S0
pair, product right adjoint of \(\delta \) Y10
disjoint union left adjoint of \(\delta \) Y10
subset \(A\subseteq X\) cut, a map \(X\to \Omega \) L22
truth values subobject classifier \(\Omega =\{0,1\}\) Boolean (A3)
comprehension \(\{x:\varphi (x)\}\) pullback of \(\top \) along \(\varphi :X\to \Omega \) filling \(f^*\)
power set exponential \(\Omega ^X\) currying (Y10)
membership \(\in \) evaluation \(X\times \Omega ^X\to \Omega \) counit of currying
union of a family join \(\bigvee \) V2
infinity natural numbers object \((\mathbb N,0,S)\) N6, N7
extensionality maps agreeing on all points are equal identity decides at \(1\) (Y8)
choice every surjection has a section splitting of idempotents

K6 (the axioms as one list). \(\mathbf {Set}\) is a category with:

1.
finite limits and colimits;
2.
exponentials;
3.
a subobject classifier;
4.
a natural numbers object;
5.
\(1\) as a generator (well-pointed), with \(0\neq 1\);
6.
every epimorphism split.

This is Lawvere’s elementary theory of sets. By Diaconescu, axiom 6 makes \(\Omega \) Boolean, so \(\neg \neg =1\) comes for free. The theory matches bounded Zermelo set theory with choice, and adding a replacement schema matches ZFC. The membership hierarchy of ZFC is recovered as well-founded extensional relations on pointed sets, that is, graphs (K2) whose only automorphism is the identity.

K7 (Cantor as the diagonal). No map \(X\to \Omega ^X\) is surjective. For \(f:X\to \Omega ^X\), the cut \(Q(x)=\neg f(x)(x)\) differs from every \(f(x)\) at \(x\). This is the involution \(\neg \) applied along the diagonal (L16), and the source of the sizes of power sets.

K8 (the chain).

\begin{equation} \begin {aligned} &\text {monoid}=\text {category with one object (K1)}\to \text {graphs over }C_0,\ \otimes =\times _{C_0},\ I=\Delta \ (\text {K2})\\ &\quad \to \text {category}=\text {monoid in graphs (K3)}\to \text {functor},\ \text {natural transformation},\ \text {adjunction},\ \text {monad (K4)}\\ &\quad \to \mathbf {Set}\ \text {by universal properties (K5, K6)}\to \text {Cantor}=\neg \ \text {on the diagonal (K7)} \end {aligned} \tag{584}\end{equation}

32.9 Composition and Associativity from the Floor

Nothing about composition is assumed here. The construction starts from \(a=a\) and builds, in order:

Categories and monoids come last. Each step uses only what came before it.

Z0 (identity). The only primitive judgement is \(a=a\): a mark is the same as itself. Its content as a rule is substitution: whatever holds of a mark holds of any mark identified with it. If \(y=z\) and \(\varphi (y)\), then \(\varphi (z)\).

Z1 (places and acts on places). A place is where a mark can stand. Saying \(a=a\) uses one place, read twice. Three acts on places use nothing but identity:

Act What it does In terms of identity
copy \(\delta \) put one mark in two places the two places carry the same mark
swap \(\sigma \) exchange the marks of two places \(\sigma \sigma \) restores each mark, by \(a=a\)
remove \(\pi \) drop a place the other places keep their marks

Z2 (numbers of places). One place is \(1\). Adding a place not identified with the ones present is the successor, so \(2=1+1\), \(3=2+1\), \(4=3+1\). No place at all is \(0\), the kind with no marks, \(\{a:\neg (a=a)\}\). The numbers of places are the natural numbers built from identity (N1–N7). Composition will need \(3\) and associativity will need \(4\).

Z3 (statements, “both”, “there is”). A statement on some places holds or fails for each way of putting marks on them.

These are definitions, using no composition, adjunction or algebra.

Z4 (two places cannot compose). Let \(R(x,y)\) and \(S(x,y)\) be statements on two places. Everything built from \(R\), \(S\), \(=\), \(\wedge \), \(\neg \) and \(\sigma \) without a further place still speaks about the same two marks. The statement “\(x\) reaches \(z\) through some mark” needs a mark that is neither \(x\) nor \(z\), so it cannot be built. The explicit counterexample is in R2.

Z5 (three places: composition). With a third place \(y\) between \(x\) and \(z\), the two statements share \(y\):

\begin{equation} R(x,y)\wedge S(y,z). \tag{585}\end{equation}
Sharing needs no extra step, since \(y\) is one place used by both statements. Forgetting the middle place gives the composite
\begin{equation} (R;S)(x,z)\iff \exists y.\ R(x,y)\wedge S(y,z). \tag{586}\end{equation}
Composition is forgetting the middle of three places.

Z6 (unit from \(a=a\)). The identity statement \(I(x,y)\iff x=y\) is a unit: \((R;I)(x,z)\iff R(x,z)\).

In the same way \(I;S=S\). The unit law is \(a=a\) in one direction and substitution in the other.

Z7 (four places: associativity). Take four places \(x,y,z,w\) and statements \(R(x,y)\), \(S(y,z)\), \(T(z,w)\). Both bracketings are equivalent to one statement that has no bracket:

\begin{equation} ((R;S);T)(x,w)\iff \exists (y,z).\ R(x,y)\wedge S(y,z)\wedge T(z,w)\iff (R;(S;T))(x,w). \tag{587}\end{equation}

Each bracketing asks for the middle marks one at a time. The unbracketed statement asks for them together. Associativity is the fact that asking in stages and asking at once find the same witnesses. It first becomes possible with four places, because two middles are needed.

Z8 (\(n+1\) places: coherence). For steps \(R_1,\dots ,R_n\) on places \(x_0,\dots ,x_n\), set

\begin{equation} (R_1;\cdots ;R_n)(x_0,x_n)\iff \exists (x_1,\dots ,x_{n-1}).\ R_1(x_0,x_1)\wedge \cdots \wedge R_n(x_{n-1},x_n). \tag{588}\end{equation}
Every bracketing is equivalent to this statement. A bracketing is two smaller bracketings joined at one place. By induction on the number of places (Z2), each smaller one is its own witness statement. Joining them, as in Z7, combines their witness tuples into one tuple. All bracketings agree for every length, so the coherence of brackets is the same fact as Z7.

Z9 (counting witnesses). Replace “there is a witness” by “how many witnesses”. For finite kinds of marks, put

\begin{equation} (R;S)(x,z)=\#\{y:\ R(x,y)\wedge S(y,z)\}. \tag{589}\end{equation}
Sizes add over disjoint kinds and multiply over pairs (N2, N4). With \(R,S,T\) written as \(0/1\) matrices, the count of witness pairs \((y,z)\) is taken in two ways, by \(z\) first or by \(y\) first:
\begin{equation} \sum _z\Bigl (\sum _yR_{xy}S_{yz}\Bigr )T_{zw} =\#\{(y,z):\ R\wedge S\wedge T\} =\sum _yR_{xy}\Bigl (\sum _zS_{yz}T_{zw}\Bigr ). \tag{590}\end{equation}
Associativity of matrix multiplication is Z7 with witnesses counted.

Z10 (weights). Give each step a weight instead of a \(0/1\) value. A witness tuple then weighs the product of its step weights, and forgetting the middle adds these weights:

\begin{equation} (R;S)_{xz}=\sum _yR_{xy}S_{yz}. \tag{591}\end{equation}
Weights run through \(\mathbb N\subset \mathbb Z\subset \mathbb Q\subset \mathbb R\subset \mathbb C\) as built earlier. The argument of Z9 is unchanged, because a weighted count of pairs is a sum over pairs, taken in two orders.

Weights on steps Composite Name
\(0/1\), “there is” \(\exists y.\ R\wedge S\) relations
\(0/1\), “how many” number of routes path counting
probabilities \(P_{t+s}=P_tP_s\) Chapman–Kolmogorov
amplitudes \(\sum _b\langle c|U|b\rangle \langle b|U'|a\rangle \) sum over intermediate states

For amplitudes, forgetting the middle place is the resolution of identity \(1=\sum _b|b\rangle \langle b|\).

Z11 (special fillings).

Z12 (categories and monoids). Composition (Z5), unit (Z6) and associativity (Z7, Z8) now exist as theorems.

Z13 (the chain).

\begin{equation} \begin {aligned} &a=a\ (\text {Z0})\to \text {places},\ \delta ,\sigma ,\pi \ (\text {Z1})\to 0,1,2,3,4,\dots \ (\text {Z2})\\ &\quad \to \wedge ,\ \exists =\text {forget a place},\ {=}\ (\text {Z3})\to \text {two places cannot compose (Z4)}\\ &\quad \to \text {three places: composite}=\text {forget the middle (Z5)}\to \text {unit}=a=a+\text {substitution (Z6)}\\ &\quad \to \text {four places: associativity}=\text {witnesses in stages}=\text {witnesses at once (Z7)}\\ &\quad \to n+1\text { places: coherence (Z8)}\to \text {counting (Z9)}\to \text {weights (Z10)}\\ &\quad \to \text {identifications and functions (Z11)}\to \text {categories, monoids (Z12)} \end {aligned} \tag{592}\end{equation}