Associativity follows from six results already in the chain, each in one step:
| Route | Associativity is |
| path induction | \(\mathsf J\) reducing the last path to \(\mathsf {refl}\) |
| substitution | successive substitution, embedded by Cayley and Yoneda |
| the swap | exchanging the order of a double sum |
| universality | two universal objects for the same diagram |
| adjunction | naturality of the counit, as the monad law |
| idempotents | meets of commuting cuts |
A1 (path induction). For paths \(p:a=b\), \(q:b=c\), \(r:c=d\), prove \((p\cdot q)\cdot r=p\cdot (q\cdot r)\) by induction on \(r\). When \(r\equiv \mathsf {refl}_c\), both sides reduce to \(p\cdot q\), since concatenation with \(\mathsf {refl}\) is the identity. By \(\mathsf J\), the equation holds for all \(r\). Associativity follows from \(\mathsf {refl}\) and its elimination rule alone.
A2 (substitution). For functions,
A3 (the swap of a double sum). For matrices,
A4 (universality). In an order, \((a\wedge b)\wedge c\) and \(a\wedge (b\wedge c)\) are both the greatest lower bound of \(\{a,b,c\}\): each is below \(a,b,c\), and anything below all three is below each. Two greatest lower bounds are below each other, so they are equal by antisymmetry. In a category, \((A\times B)\times C\) and \(A\times (B\times C)\) both represent
A5 (adjunction). For \(F\dashv G\) with \(T=GF\) and \(\mu =G\varepsilon F:TT\to T\),
A6 (idempotents). For commuting cuts, the product is the meet:
Coherence. Once one associativity holds, all bracketings of \(n\) factors agree: any two are related by rebracketings, and each rebracketing is the identity in the cases above. For associativity up to isomorphism, Mac Lane’s pentagon guarantees the same.
The routes compared.
| Route | Where it holds | Primitive used |
| A1 | identity types, paths | \(\mathsf {refl}\), \(\mathsf J\) |
| A2 | functions, Cayley and Yoneda images | substitution |
| A3 | matrices, relations, categories | reordering a sum |
| A4 | meets, products | uniqueness of universal objects |
| A5 | monads, free monoids | naturality of the counit |
| A6 | commuting cuts | idempotents, meet |
Starting from the identity, one cascade constructs the product and the sum, and derives the three laws:
commutativity from the swap, an involution;
distributivity from an adjunction;
associativity from the Yoneda lemma.
Each tool is derived before it is used. The laws then pass to meets in orders, to the natural numbers by counting, and to matrices.
C0 (identity). For each object \(A\) there is \(\mathrm {id}_A\) with \(\mathrm {id}\circ f=f=f\circ \mathrm {id}\).
C1 (diagonal). Pairing the identity with itself gives \(\Delta _A=\langle \mathrm {id}_A,\mathrm {id}_A\rangle \), the functor \(A\mapsto (A,A)\).
C2 (product). The product of \(A\) and \(B\) is an object \(A\times B\) with projections \(\pi _1,\pi _2\) such that for all \(f:X\to A\), \(g:X\to B\) there is exactly one \(\langle f,g\rangle :X\to A\times B\) with \(\pi _1\langle f,g\rangle =f\) and \(\pi _2\langle f,g\rangle =g\):
C3 (sum). Dually, \(A+B\) with injections satisfies
C4 (Yoneda lemma). For a presheaf \(F\),
C5 (representing objects are unique). Taking \(F=\mathrm {Hom}(-,B)\) in C4,
C6 (the swap is an involution). Let \(\sigma =\langle \pi _2,\pi _1\rangle :A\times B\to B\times A\). The composite \(\sigma \circ \sigma \) has components \(\pi _1\) and \(\pi _2\), so by uniqueness in C2,
C7 (commutativity). By C6, \(\sigma \) is an isomorphism with inverse \(\sigma \):
C8 (adjunction). An adjunction \(L\dashv R\) is a natural bijection \(\mathrm {Hom}(LA,B)\cong \mathrm {Hom}(A,RB)\). Its unit and counit are the transposes of identities, and transposing twice returns, which gives the triangle identities.
C9 (currying). In sets, a function of two arguments is a function into functions:
C10 (left adjoints preserve sums). For \(L\dashv R\) and any \(X\),
C11 (distributivity). Applying C10 to \(L=A\times -\), a left adjoint by C9,
C12 (associativity). For every \(X\),
C13 (meets in orders). In an order, regarded as a category with at most one arrow between two objects, the product is the meet \(a\wedge b\) and the sum is the join \(a\vee b\). Isomorphic objects of an order are equal, so C7, C11 and C12 become
C14 (numbers). For finite sets, \(|A\times B|=|A|\,|B|\) and \(|A+B|=|A|+|B|\), and isomorphic sets have equal size. Taking sizes in C7, C11 and C12,
The cascade.
| Step | Result | From |
| C0–C1 | identity, diagonal | — |
| C2–C3 | product, sum | right and left adjoints of \(\Delta \) |
| C4–C5 | Yoneda; uniqueness of representing objects | the identity decides |
| C6–C7 | swap involution; commutativity | uniqueness of pairing |
| C8–C9 | adjunction; currying | transposing the identity |
| C10–C11 | left adjoints preserve sums; distributivity | C5, C9 |
| C12 | associativity | C2 twice, C5 |
| C13 | lattice laws | orders as categories |
| C14 | laws of \(\mathbb N\) | sizes of finite sets |
| C15 | associativity of matrices | distributivity, reordering |
The three operations of arithmetic are sizes of three universal constructions built from the diagonal:
| Operation | Construction | Adjunction |
| \(m+n\) | sum \(A+B\) | left adjoint of \(\Delta \) |
| \(mn\) | product \(A\times B\) | right adjoint of \(\Delta \) |
| \(n^m\) | function set \(B^A\) | right adjoint of \(-\times A\) (currying) |
The inverse operations, monus, quotient and integer logarithm, are right adjoints in the order of \(\mathbb N\). The ring \(\mathbb Z\) arises from pairs, with negation the swap, and its axioms are inherited from \(\mathbb N\).
N0 (identity, diagonal, sum, product). From \(\mathrm {id}\) and \(\Delta =\langle \mathrm {id},\mathrm {id}\rangle \), the sum \(A+B\) and product \(A\times B\) are the left and right adjoints of \(\Delta \), with units \(0\) (initial: the empty set) and \(1\) (terminal: a single point).
N1 (currying). For sets, the map
N2 (natural numbers). Starting from \(0\) and adjoining one point at a time,
N3 (the operations).
N4 (successor and recursion). \(\underline {n+1}=\underline n+1\) by N2, and associativity of \(+\) gives
N5 (units and absorption).
| Law | Isomorphism |
| \(0+n=n\) | \(\varnothing +A\cong A\) |
| \(1\cdot n=n\) | \(1\times A\cong A\) |
| \(0\cdot n=0\) | \(\varnothing \times A\cong \varnothing \) |
| \(n^0=1\) | \(A^{\varnothing }\cong 1\), the empty function |
| \(n^1=n\) | \(A^1\cong A\) |
| \(1^n=1\) | \(1^A\cong 1\) |
| \(0^n=0\) for \(n\ge 1\) | \(\varnothing ^A=\varnothing \) for \(A\neq \varnothing \) |
N6 (commutative semiring). By the swap, distributivity and Yoneda (Subsection 45.1),
N7 (exponent laws).
| Law | Isomorphism | Source |
| \(c^{a+b}=c^ac^b\) | \(\mathrm {Hom}(A+B,C)\cong \mathrm {Hom}(A,C)\times \mathrm {Hom}(B,C)\) | sum |
| \((bc)^a=b^ac^a\) | \(\mathrm {Hom}(A,B\times C)\cong \mathrm {Hom}(A,B)\times \mathrm {Hom}(A,C)\) | product |
| \((c^b)^a=c^{ab}\) | \(\mathrm {Hom}(A,C^B)\cong \mathrm {Hom}(A\times B,C)\) | currying |
N8 (order). \(m\le n\) when \(\underline m\) injects into \(\underline n\), equivalently \(n=m+k\) for some \(k\). Pairing two rows mark by mark gives trichotomy.
N9 (inverse operations as right adjoints).
| Inverse | Galois connection | Left adjoint |
| monus \(m\mathbin {\dot -}n\) | \(n+k\le m\iff k\le m\mathbin {\dot -}n\) | \(+n\) |
| quotient \(\lfloor m/d\rfloor \), \(d\ge 1\) | \(dk\le m\iff k\le \lfloor m/d\rfloor \) | \(\times d\) |
| integer logarithm \(\lfloor \log _bm\rfloor \), \(b\ge 2\), \(m\ge 1\) | \(b^k\le m\iff k\le \lfloor \log _bm\rfloor \) | \(b^{(-)}\) |
| integer root \(\lfloor \sqrt [e]{m}\rfloor \) | \(k^e\le m\iff k\le \lfloor \sqrt [e]{m}\rfloor \) | \((-)^e\) |
Division with remainder is the unit of the second: \(m=d\lfloor m/d\rfloor +r\) with \(0\le r<d\).
N10 (integers: the ring). Pairs \((a,b)\) of natural numbers, read \(a-b\), with \((a,b)\sim (c,d)\iff a+d=c+b\), form \(\mathbb Z\). The operations are forced by distributivity on \((a-b)(c-d)\):
N11 (the ring axioms).
| Axiom | Source |
| additive group: \(0=[(a,a)]\), \(-(a,b)=(b,a)\) | the diagonal; the swap |
| associativity, commutativity of \(+\) and \(\times \) | inherited from N6, coordinatewise |
| distributivity | inherited from N6 |
| unit \(1=[(1,0)]\) | N5 |
| \((-1)(-1)=1\) | \((0,1)(0,1)=(1,0)\): the swap twice, \(\sigma ^2=\mathrm {id}\) |
| \((-x)y=-(xy)\) | \((b,a)(c,d)=\sigma \bigl ((a,b)(c,d)\bigr )\) |
\(\mathbb Z\)is the group completion of \((\mathbb N,+)\): the universal way to make addition invertible.
N12 (beyond). Pairs \((p,q)\) with \(q\neq 0\), read \(p/q\), with the swap as reciprocal, give the field \(\mathbb Q\); completion gives \(\mathbb R\); doubling gives \(\mathbb C\).
The cascade.
| Step | Result | From |
| N0 | sum, product, \(0\), \(1\) | adjoints of \(\Delta \) |
| N1 | currying, evaluation | functions of pairs |
| N2 | finite sets, \(\mathbb N\) | adjoining one point; Infinity |
| N3–N4 | \(+\), \(\times \), exponentiation; recursion | sizes; associativity |
| N5–N7 | unit laws, semiring, exponent laws | isomorphisms of constructions |
| N8–N9 | order; monus, quotient, logarithm, root | injections; right adjoints |
| N10–N11 | \(\mathbb Z\), ring axioms | pairs; swap |
| N12 | \(\mathbb Q\), \(\mathbb R\), \(\mathbb C\) | pairs, completion, doubling |