|logic||category theory||type theory|
|true||terminal object/(-2)-truncated object||h-level 0-type/unit type|
|false||initial object||empty type|
|proposition||(-1)-truncated object||h-proposition, mere proposition|
|cut rule||composition of classifying morphisms / pullback of display maps||substitution|
|cut elimination for implication||counit for hom-tensor adjunction||beta reduction|
|introduction rule for implication||unit for hom-tensor adjunction||eta conversion|
|logical conjunction||product||product type|
|disjunction||coproduct ((-1)-truncation of)||sum type (bracket type of)|
|implication||internal hom||function type|
|negation||internal hom into initial object||function type into empty type|
|universal quantification||dependent product||dependent product type|
|existential quantification||dependent sum ((-1)-truncation of)||dependent sum type (bracket type of)|
|equivalence||path space object||identity type|
|equivalence class||quotient||quotient type|
|induction||colimit||inductive type, W-type, M-type|
|higher induction||higher colimit||higher inductive type|
|completely presented set||discrete object/0-truncated object||h-level 2-type/preset/h-set|
|set||internal 0-groupoid||Bishop set/setoid|
|universe||object classifier||type of types|
|modality||closure operator, (idemponent) monad||modal type theory, monad (in computer science)|
|linear logic||(symmetric, closed) monoidal category||linear type theory/quantum computation|
|proof net||string diagram||quantum circuit|
|(absence of) contraction rule||(absence of) diagonal||no-cloning theorem|
|synthetic mathematics||domain specific embedded programming language|
Conversely, starting with a given theory of logic or a given type theory, we say that it has a categorical semantics if there is a category such that the given theory is that of its slice categories, if it is the internal logic of that category.
Write for its codomain fibration, and write
We give now rules for choices “” that associate with every string “” of symbols in type theory objects and morphisms in . A collection of such choices following these rules is an interpretation / a choice of categorical semantics of the type theory in the category .
If is a context which has already been given an interpretation , then a judgement of the form
is interpreted as an object in the slice over
hence as a choice of morphism
If a judgement of the form has already found an interpretation, as above, then an extended context of the form is interpreted as the domain object of the above choice of morphism.
Assume for a context and a judgement we have already chosen an interpretation as above.
For a term the context is the collection of free variables in .
Assume that interpretations for judgements
have been given as above. Then the substitution judgement
is to be interpreted as follows. The interpretation of the first two terms corresponds to a diagram in of the form
hence the morphism in that universally completes the above diagram as
A standard textbook reference for categorical semantics of logic is section D1.2 of
For more references on this see at relation between category theory and type theory.
Lecture notes on this include for instance.
Martin Hofmann, Syntax and semantics of dependent types, Semantics and Logics of Computation (P. Dybjer and A. M. Pitts, eds.), Publications of the Newton Institute, Cambridge University Press, Cambridge, (1997) pp. 79-130. (web, )
Roy Crole, Categories for types
See also section B.3 of