Every category theory and every type theory is one system with:
one root: identity decides (J \(=\) Yoneda);
one operation: filling along place maps, \(f^*\), with its adjoints \(\Sigma _f\dashv f^*\dashv \Pi _f\);
two seeds: \(e^2=e\) (idempotent) and \(\sigma ^2=1\) (involution);
seven axes, whose values give the known theories.
K1 (contexts and filling form a category). Contexts are lists of places, and a morphism of contexts fills the places of one with terms of the other. Filling composes by filling into a filling, associatively and with \(\mathrm {id}\) as unit (Y5). Every type theory has such a category of contexts, and every category is one in this sense [1655, 1656].
K2 (identity decides). Y8: \(\mathrm {Nat}(\mathrm {Hom}(A,-),F)\simeq F(A)\). For identity types this is J (Y1). Objects are determined by what maps into or out of them, and universal properties are representability.
K3 (type formers are adjoints to filling). For a map of contexts \(f\), filling \(f^*\) has adjoints on both sides:
| Place map \(f\) | \(\Sigma _f\) | \(\Pi _f\) |
| weakening \(\pi \) | \(\sum \), \(\exists \) | \(\prod \), \(\forall \) |
| diagonal \(\delta \) | \(\mathrm {Id}\), \(=\) | \(=\Rightarrow -\) |
| duplicating a type | \(+\), \(\vee \) | \(\times \), \(\wedge \) |
| diagonal \(C\to C^J\) | colimit | limit |
| any functor \(F\), by precomposition | left Kan extension | right Kan extension |
Equality is \(\Sigma _\delta \) [183, 1649], and limits and colimits are the adjoints of the diagonal into diagrams. Kan extensions contain all of these [1645]. \(A\to -\) is right adjoint to \(A\times -\) (currying).
K4 (generated and determined). A type given by generators is an initial algebra, with recursion and induction as its use rule (N7, N8). A type given by its uses is a final coalgebra, with corecursion and coinduction. They are left and right, as in K3.
K5 (the involution: duality). \(C\mapsto C^{op}\) reverses arrows and satisfies \((C^{op})^{op}=C\). Every notion has a dual by \(\sigma \):
| Notion | Dual |
| limit | colimit |
| \(\Pi \) | \(\Sigma \) |
| inductive | coinductive |
| monad | comonad |
| initial | terminal |
K6 (the idempotent: reflection). An idempotent monad \(T^2\simeq T\) is a reflection onto its fixed objects (L25). It covers:
truncations \(\|-\|_n\);
modalities;
sheafification;
subobjects: a subobject is a cut, \(\Delta _P\le \Delta \), classified by \(\Omega \).
Splitting idempotents is Cauchy completion.
X1 (structural maps). Which of \(\sigma \) (exchange), \(\delta \) (contraction) and \(\pi \) (weakening) act naturally on contexts:
| Allowed | Logic | Categories |
| \(\sigma ,\delta ,\pi \) | intuitionistic | cartesian (closed) |
| \(\sigma ,\pi \) | affine | semicartesian symmetric monoidal |
| \(\sigma ,\delta \) | relevant | symmetric monoidal with diagonals |
| \(\sigma \) | linear | symmetric monoidal (closed) |
| none | ordered (Lambek) | monoidal biclosed |
A symmetric monoidal category is cartesian exactly when every object carries natural \(\delta \) and \(\pi \) [1657]: the place maps are the structural rules [278, 1658].
X2 (level of identity).
| Level | Identity of elements | Categories |
| \(-1\) | any two proofs equal (propositions) | preorders, hyperdoctrines |
| \(0\) | identity is a proposition (sets) | 1-categories, toposes |
| \(1\) | identity is a set | groupoids, 2-categories |
| \(\infty \) | identities of identities, without end | \(\infty \)-groupoids, \((\infty ,1)\)-categories |
Iterated identity types make every type an \(\infty \)-groupoid [788, 1659, 1660]. Univalence makes identity of types equivalence: counts as in N0, lifted to every level [193]. For categories, isomorphic objects being identical is univalence (Rezk completeness) [1661].
X3 (involution).
Compact closure gives each \(A\) a dual with unit \(I\to A^*\otimes A\) and counit \(A\otimes A^*\to I\). Its snake equations are the triangle identities of Y9.
X4 (modalities). Idempotent monads and comonads (K6):
none;
\(\Box \) and \(\Diamond \) (modal logic S4);
lex modalities and truncations [1664];
cohesion \(\int \dashv \flat \dashv \sharp \) [1665].
X5 (generation).
| Generation | Example |
| inductive | \(\mathbb N\), lists, trees; initial algebras |
| coinductive | streams; final coalgebras |
| higher inductive | generators include identifications, e.g. \(S^1\) from a point and a loop |
X6 (base of enrichment). Homs valued in a monoidal \(V\), with composition the sum over a matched middle [1666]:
With biproducts, sum equals product: both adjoints of \(\delta \) coincide.
X7 (size). Universes are types of types: object classifiers. Impredicative quantification over a universe gives polymorphism (System F) [1669, 1670].
| Logic | Type theory | Category theory |
| proposition | type | object |
| proof | term | morphism |
| \(\top \) / \(\bot \) | \(1\) / \(0\) | terminal / initial |
| \(\wedge \) / \(\vee \) | \(\times \) / \(+\) | product / coproduct |
| \(\Rightarrow \) | \(\to \) | exponential |
| \(\forall \) / \(\exists \) | \(\Pi \) / \(\Sigma \) | right / left adjoint of \(f^*\) |
| \(=\) | \(\mathrm {Id}\) | \(\Sigma _\delta \); path object |
| induction | inductive type | initial algebra |
| coinduction | coinductive type | final coalgebra |
| \(\Box \), \(\Diamond \) | modal type | idempotent (co)monad |
| \(\otimes \), \(\multimap \) | linear type | symmetric monoidal closed |
| truth values | propositions | subobject classifier \(\Omega \) |
| Type theory | Category | Axes |
| simply typed \(\lambda \) | cartesian closed [1655] | X1 full, X2 \(0\) |
| extensional Martin-Löf | locally cartesian closed [1671, 1672] | \(+\Sigma ,\Pi \) |
| higher-order logic | elementary topos | \(+\Omega \) |
| classical higher-order logic | Boolean topos | X3 \(\neg \neg =1\) |
| homotopy type theory | \((\infty ,1)\)-topos [136, 748] | X2 \(\infty \), univalence, HITs |
| cubical type theory | cubical-set models [1673] | univalence by computation |
| System F | PL-categories [1670] | X7 impredicative |
| linear logic | \(*\)-autonomous [1663] | X1 \(\sigma \), X3 \(\perp \perp \) |
| Lambek calculus | monoidal biclosed [1658] | X1 none |
| modal (S4) | comonad | X4 |
| cohesive HoTT | cohesive \(\infty \)-topos [1665] | X4 cohesion |
| algebraic theories | Lawvere theories [1258] | rows of places |
| regular / coherent logic | regular / coherent categories | fragments of K3 |
| quantum processes | dagger compact [218] | X3 \(\dagger \), compact |
| Kind | Value |
| monoid / ring / algebra | one object, \(V=\) sets / abelian groups / vector spaces (B2, B4) |
| preorder; Heyting algebra | X2 \(=-1\); with \(\Rightarrow \) (A2) |
| groupoid | every arrow invertible |
| monoidal / symmetric | X1 \(\{\}\) / \(\{\sigma \}\) |
| cartesian | X1 \(\{\sigma ,\delta ,\pi \}\) |
| closed | right adjoint to \(A\otimes -\) |
| dagger / compact | X3 \(\dagger \) / duals with snake equations |
| additive / abelian | X6 abelian groups, biproducts |
| allegory | relations with \(\dagger \) and \(\le \) (B1) |
| topos | finite limits, exponentials, \(\Omega \) |
| \(n\)-category, \(\infty \)-category | X2 \(=n,\infty \) |
| fibration / indexed category | judgments over contexts (K1) |
Every universal construction is an adjoint to filling (K3).
Every structural rule is a place map (X1).
Every truncation and modality is an idempotent (K6).
Every duality is the involution (K5, X3).
Every type theory is a point on X1–X7, and its models are the categories with the same values.