**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

$x:A \; \vdash \;B(x) \;\mathrm{type}$

is represented by a particular morphism $p\colon B\to A$, the intended meaning being that each type $B(x)$ is the fiber of $p$ over $x\in A$. 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 in classical homotopy theory. The base space is $X$, the total space is $\sum_{(x:X)}P(x)$ and the fiber $P(\star_X)$. This gives the fibration:

$P(\star_X)\to \sum_{x:X}P(x) \to X$

When the theory of a category is phrased in dependent type theory then there is one type “$obj$” of objects and a type $hom$ of morphisms, which is dependent on two terms of type $obj$, so that for any $x,y:obj$ there is a type $hom(x,y)$ of arrows from $x$ to $y$. This dependency is usually written as $x,y:obj \vdash hom(x,y):Type$. In some theories, it makes sense to say that the type of “$hom$” itself is $obj, obj\to Type$ (usually understood as $obj \to (obj \to Type)$ or $(\obj \times \obj) \to Type$), i.e. a function from pairs of elements of $A$ to the universe $Type$ of types.

- Blog post: In praise of dependent types

In Coq:

- Yves Bertot,
*Introduction to dependent types in Coq*(pdf)

Last revised on June 9, 2022 at 00:31:04. See the history of this page for a list of all contributions to it.