natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism = propositions as types +programs as proofs +relation type theory/category theory
One may interpret mathematical logic as being a formal language for talking about the collection of monomorphisms into a given object of a given category: the poset of subobjects of that object.
More generally, one may interpret type theory and notably dependent type theory as being a formal language for talking about slice categories, consisting of all morphisms into a given object.
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.
For the general idea, for the moment see at type theory the section An introduction for category theorists and see at relation between type theory and category theory.
We discuss how to interpret judgements of dependent type theory in a given category with finite limits. For more see categorical model of dependent types.
Write for its codomain fibration, and write
for the corresponding classifying functor, the self-indexing
that sends an object of to the slice category over it, and sends a morphism to the pullback/base change functor
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 .
The empty context in type theory is interpreted as the terminal object of
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
in .
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.
A judgement of the form (a term of type ) is to be interpreted as a section of this morphism, equivalently as a morphism in
from the terminal object to , which in is a commuting triangle
For a term the context is the collection of free variables in .
(…)
Assume that interpretations for judgements
and
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
The interpretation of the substitution statement is then the pullback
hence the morphism in that universally completes the above diagram as
See categorical semantics of homotopy type theory.
A standard textbook reference for categorical semantics of logic is section D1.2 of
The categorical semantics of dependent type theory in locally cartesian closed categories is essentially due to
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
A comprehensive definition of semantics of homotopy type theory in type-theoretic model categories is in section 2 of
Last revised on September 4, 2020 at 06:57:42. See the history of this page for a list of all contributions to it.