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.
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:
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:
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).
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\) |
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) |
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:
Associativity of \(m\) gives the Jacobi identity for \([\cdot ,\cdot ]\), a Lie algebra.
It also gives the Jordan identity \((a\circ b)\circ (a\circ a)=a\circ (b\circ (a\circ a))\), a Jordan algebra.
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\).
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 |
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.
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 |
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:
elements are maps from the one-point kind;
subsets are cuts;
the power set is an exponential;
extensionality is identity deciding at points;
choice is the splitting of idempotents.
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:
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\):
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:
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).
Nothing about composition is assumed here. The construction starts from \(a=a\) and builds, in order:
places;
the acts of copying, swapping and removing places;
the numbers of places \(1,2,3,4,\dots \);
statements on places, with “both” and “there is”;
composition, which first appears on three places;
associativity, which first appears on four places;
coherence on \(n+1\) places;
counting and weights.
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.
Both: \(\varphi \wedge \psi \) holds when \(\varphi \) holds and \(\psi \) holds, on the same marks.
There is: \(\exists y.\,\varphi \) on the remaining places holds when some mark at place \(y\) makes \(\varphi \) hold. This is forgetting the place \(y\), which is \(\pi \) applied to statements.
Same: \(x=y\) is the statement that two places carry one mark, which is \(\delta \) seen as a statement.
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\):
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)\).
If \(R(x,z)\), take \(y=z\). Then \(R(x,y)\) holds, and \(y=z\) holds by \(a=a\).
If some \(y\) has \(R(x,y)\) and \(y=z\), substitution (Z0) turns \(R(x,y)\) into \(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:
\(((R;S);T)(x,w)\) means: some \(z\) has \((R;S)(x,z)\) and \(T(z,w)\), and \((R;S)(x,z)\) means some \(y\) has \(R(x,y)\) and \(S(y,z)\). So the pair \((y,z)\) makes all three hold. Conversely, such a pair gives \(z\) and then \(y\) as witnesses.
\((R;(S;T))(x,w)\) means: some \(y\) has \(R(x,y)\) and \((S;T)(y,w)\), and \((S;T)(y,w)\) means some \(z\) has \(S(y,z)\) and \(T(z,w)\). So the same pair \((y,z)\) makes all three hold, and conversely.
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
Z9 (counting witnesses). Replace “there is a witness” by “how many witnesses”. For finite kinds of marks, put
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:
| 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).
Identifications. If each step is an identification \(p:x=y\), the composite is the identification \(x=z\). By \(J\), it is fixed by the case where both steps are \(a=a\) (CP5).
Functions. If each step is a function, so that \(R(x,y)\iff y=f(x)\), the middle has exactly one witness. Forgetting it is substitution, \((R;S)(x,z)\iff z=g(f(x))\).
Z12 (categories and monoids). Composition (Z5), unit (Z6) and associativity (Z7, Z8) now exist as theorems.
A category is a kind of objects, arrows between them, and this composition.
A monoid is the case of a single object.
The free category on a graph has, as arrows, the chains of Z8.
The composition map of any category evaluates a chain to one arrow, \(\mu =\varepsilon \) (CP6).
Z13 (the chain).