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
In type theory, a dependent type or type in context is a family or bundle of types which vary over the elements (terms) of some other type. It can be regarded as a formalization of the notion of “indexed family,” providing a structural account of families (in contrast to the material approach which requires sets to be able to contain other sets as elements).
Type theory with the notion of dependent types is called dependent type theory.
In the categorical semantics of type theory, a dependent type
is represented by a particular morphism , the intended meaning being that each type is the fiber of over . The morphism in a category that may represent dependent types in this way are sometimes called display morphisms (especially when not every morphism is a display morphism).
Dependent types can be thought of as fibrations (Serre fibrations) in classical homotopy theory. The base space is , the total space is and the fiber . This gives the fibration:
One may understand -dependent types equivalently as functions with codomain , i.e. as “type-bundles” (in the general, not in locally trivial sense of fiber bundles, though) or “type-fibrations” (in a rather accurate sense):
The domain — i.e. the “total space” of these bundles — is identified with the dependent sum of the “fibers” , and conversely these fibers are indeed recovered from any such bundle as the fiber types.
Under the categorical semantics of dependent type theory (cf. categorical model of dependent types and relation between type theory and category theory) it is exactly these associated “type bundles” which are identified with actual fibrations (“display maps”) in the given semantic category.
We now say this in more detail, first
and then as
Given a family of types, , one can construct a family of elements via the elimination rules for negative dependent sum types:
Conversely, given a family of elements one can construct a family of types as the family of fiber types of , via the formation rules for identity types and dependent sum types:
This corresponds to the relation between type theory and category theory: there are two ways to interpret a morphism in a category
If the type theory has function types, then the above notions are also interderivable with an element of a function type , which correspond to the internal hom of a category .
One can additionally derive the following equivalences of types:
Assuming the univalence-axiom, the analogous statement holds reflected within a type universe : Given , the type of -dependent types is equivalent to the type of functions with codomain , via forming fiber types and dependent sum-types, respectively [UFP13, Thm. 4.8.3]
Under the categorical semantics of homotopy type theory in -toposes, this characterizes the type universe as (interpreted by) the (small) object classifier in an -topos.
When the theory of a category is phrased in dependent type theory then there is one type “” of objects and a type of morphisms, which is dependent on two terms of type , so that for any there is a type of arrows from to . This dependency is usually written as . In some theories, it makes sense to say that the type of “” itself is (usually understood as or ), i.e. a function from pairs of elements of to the universe of types.
See the references at dependent type theory.
Exposition:
In Coq:
The relation between dependent types and bundles (functions of given codomain)
Last revised on January 22, 2024 at 05:47:12. See the history of this page for a list of all contributions to it.