C5 (the identity is the element of \(1\)). \(1\) is the right adjoint of \(\Delta _0\): for every \(X\) there is exactly one map \(X\to 1\). An element of \(A\) is a map \(1\to A\). The kind \(1\) has the element \(\mathrm {id}_1\), and no other, since every map \(1\to 1\) is the unique one. So
C6 (the elements of a sum are its tags). By the triangle \(\eta \) of \(\sqcup \dashv \Delta \), \(\mathrm {id}_{A\sqcup B}=[\mathrm {in}_1,\mathrm {in}_2]\). Let \(T\subseteq A\sqcup B\) be the part of elements of the form \(\mathrm {in}_1a\) or \(\mathrm {in}_2b\). Both tags land in \(T\), so the left adjunction gives a map \(u:A\sqcup B\to T\), and the inclusion \(\iota :T\to A\sqcup B\) has \(\iota \circ u\circ \mathrm {in}_k=\mathrm {in}_k\). By uniqueness, \(\iota \circ u=[\mathrm {in}_1,\mathrm {in}_2]=\mathrm {id}\), so every element lies in \(T\). Tags of different sides differ and each tag is injective (E2, from \(\ell \neq r\)). In particular
C7 (equality is pulled back along the diagonal). The pairs \((x,y)\) of \(A\) with \(x=y\) are the pullback of the copy \(\delta _A\): \(\mathrm {refl}_a\) lies over \(\delta (a)=(a,a)\). A statement about every \((b,e)\) with \(e:a=b\) is fixed at \((a,\mathrm {refl}_a)\) (\(J\); I2). Equalities form a groupoid (R3).
C8 (decided equality). On \(0\) equality is decided vacuously, on \(1\) trivially. If it is decided on \(A\) and \(B\), it is decided on \(A\sqcup B\): by C6 two elements are tags, and comparing them is a case split into \(\mathbf 2\) (E2).
C9 (names). Kinds are marks: there is a kind of names with \(\mathrm {El}(\ulcorner A\urcorner )=A\), and two names are the same when their kinds are in bijection (E2).
C10 (zero and successor).
C11 (for every, and induction). Weakening is reading along a projection \(\pi :P\times X\to P\), which is a counit of \(\Delta \dashv \times \). Its right adjoint is for every:
C12 (the Peano laws are theorems).
| law | proof | |
| PA1 | \(z\in \mathbb N\) | \(\mathbb N\) is closed (C11) |
| PA2 | \(n\in \mathbb N\Rightarrow s(n)\in \mathbb N\) | \(\mathbb N\) is closed (C11) |
| PA3 | \(s(n)\neq z\) | below |
| PA4 | \(s(m)=s(n)\Rightarrow m=n\) | below |
| PA5 | a closed part of \(\mathbb N\) is all of \(\mathbb N\) | counit of \(\forall \) (C11) |
PA3. If \(s(n)=z\), the kinds \(\mathrm {El}(n)\sqcup 1\) and \(0\) are in bijection (C9), and the element \(\mathrm {in}_2(\mathrm {id}_1)\) would be sent to an element of \(0\). There is none (C6).
PA4. By PA5, every \(\mathrm {El}(n)\) has decided equality (C8: \(0\), and \(X\sqcup 1\) from \(X\)). Let \(f:\mathrm {El}(m)\sqcup 1\to \mathrm {El}(n)\sqcup 1\) be a bijection and \(t=f(\mathrm {in}_2\mathrm {id}_1)\). The swap \(\tau \) of \(t\) and \(\mathrm {in}_2\mathrm {id}_1\) is defined by a case split on decided equality, and \(\tau \circ f\) fixes the new element. By C6 it sends tags \(\mathrm {in}_1\) to tags \(\mathrm {in}_1\), so it restricts to a bijection \(\mathrm {El}(m)\to \mathrm {El}(n)\), and \(m=n\) (C9).
Every number is \(z\) or a successor. The part \(\{z\}\cup s(\mathbb N)\) is closed, so it is \(\mathbb N\) by PA5.
C13 (algebras are pairs). An algebra is a kind \(X\) with a map \(1\sqcup X\to X\). By the left adjunction of \(\Delta \),
C14 (\(\mathbb N\) is the initial algebra). For every algebra \((X,a,g)\) there is exactly one \(h\) with
C15 (addition and multiplication). By C14 there are unique maps with
C16 (regrouping, from the triple diagonal). Naturally in \(A\),
C17 (rows). A row of length \(n\) in \(A\) is a map \(p:\mathrm {El}(n)\to A\). The empty row is the unique map out of \(\mathrm {El}(z)=0\). Since \(\mathrm {El}(s(n))=\mathrm {El}(n)\sqcup 1\), a row of length \(s(n)\) is a row of length \(n\) and one element (C13): rows are built one element at a time, by the same adjunction that builds the numbers.
C18 (joining is the sum adjunction). For rows \(p:\mathrm {El}(m)\to A\) and \(q:\mathrm {El}(n)\to A\),
C19 (associativity and units of joining). \((p\cdot q)\cdot t\) and \(p\cdot (q\cdot t)\) restrict to \(p,q,t\) on the three summands; under the regrouping \(\alpha \) of C16 they have the same restrictions, so by the uniqueness in C18
C20 (rows of marks). For a graph with marks \(M\) and ends \(s,t:M\to \mathrm {Pl}\) (I4), a row of marks is a row \(p:\mathrm {El}(n)\to M\) with \(t(p(i))=s(p(i+1))\): an equality, so a pullback along the diagonal of \(\mathrm {Pl}\) (C7). Rows of marks are joined by C18 when the seam meets, again a pullback along \(\Delta \), with C19 for the laws. By C14 there is exactly one reading \(\llbracket \cdot \rrbracket \) with \(\llbracket ()\rrbracket =\mathrm {id}\) and \(\llbracket (m,p)\rrbracket =\llbracket p\rrbracket \circ \llbracket m\rrbracket \), and by uniqueness with C4, \(\llbracket p\cdot q\rrbracket =\llbracket q\rrbracket \circ \llbracket p\rrbracket \): joining rows is reading after reading.
C21 (every category). Rows of marks read the same are the same (E3). Places, rows up to this sameness, joining and empty rows form a category, whose laws hold because they hold for readings (C4). On all maps it is the category of kinds; every category is such a quotient; the groupoid of C7 is the case where every mark can be read back.
notion | what it is | reading of the source |
\(0\), \(1\), \(\sqcup \), \(\times \) | adjoints of \(\Delta _0\), \(\Delta \) | two places of \(a=a\) (C1) |
maps | right adjoint of \(-\times B\) | placing and reading (C2) |
composition, its laws | read, read, place | triangles \(\beta \), \(\eta \) (C3, C4) |
element | map from \(1\); \(1=\{\mathrm {id}_1\}\) | the identity as an element (C5) |
elements of a sum | its tags; \(0\) has none | triangle \(\eta \) of \(\sqcup \dashv \Delta \) (C6) |
equality, \(J\) | pullback of the copy | \(\mathrm {refl}\) over \(\delta (a)\) (C7) |
zero, successor | \(\ulcorner 0\urcorner \); adjoin \(\mathrm {id}_1\) | C10 |
for every, induction | right adjoint of reading along \(\pi \); its counit | counit of \(\Delta \dashv \times \) (C11) |
PA1–PA5 | theorems | C6, C8, C11 (C12) |
algebra | pair \((a,g)\) | \(\sqcup \dashv \Delta \) (C13) |
initial algebra, recursion | unique map out of \(\mathbb N\) | PA3–PA5 (C14) |
\(+\), \(\cdot \), order | unique solutions; \(\sqcup \), \(\times \) on sizes | C14, C16 (C15) |
regrouping | triple diagonal | R0 (C16) |
rows, joining | maps out of \(\mathrm {El}(n)\); inverse of \(\sqcup \dashv \Delta \) | C17, C18 |
laws of joining | uniqueness | C16, C18 (C19) |
rows of marks, categories | seams pulled back along \(\Delta \); sameness | C20, C21 |
|