nLab
dependent type

Context

Type theory

natural deduction metalanguage, practical foundations

  1. type formation rule
  2. term introduction rule
  3. term elimination rule
  4. computation rule

type theory (dependent, intensional, observational type theory, homotopy type theory)

syntax object language

computational trinitarianism = propositions as types +programs as proofs +relation type theory/category theory

logiccategory theorytype theory
trueterminal object/(-2)-truncated objecth-level 0-type/unit type
falseinitial objectempty type
proposition(-1)-truncated objecth-level 1-type/h-prop
proofgeneralized elementprogram
conjunctionproductproduct type
disjunctioncoproduct ((-1)-truncation of)sum type (bracket type of)
implicationinternal homfunction type
negationinternal hom into initial objectfunction type into empty type
universal quantificationdependent productdependent product type
existential quantificationdependent sum ((-1)-truncation of)dependent sum type (bracket type of)
equivalencepath space objectidentity type
equivalence classquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
completely presented setdiscrete object/0-truncated objecth-level 2-type/preset/h-set
setinternal 0-groupoidBishop set/setoid
universeobject classifiertype of types
modalityclosure operator monadmodal type theory, monad (in computer science)

homotopy levels

semantics

Contents

Idea

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:AB(x):Typex:A \; \vdash \;B(x):Type

is represented by a particular morphism p:BA, the intended meaning being that each type B(x) is the fiber of p over xA. The morphism in a category may represent dependent types in this way are sometimes called display morphisms (especially when not every morphism is a display morphism).

Examples

When the theory of a category is phrased in dependent type theory, 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:objhom(x,y):Type. In some theories, it makes sense to say that the type of ”hom” itself is obj,objType (usually understood as obj(objType) or (obj×obj)Type), i.e. a function from pairs of elements of A to the universe? Type of types.

References

In Coq:

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

Revised on September 28, 2012 16:51:41 by Urs Schreiber (82.169.65.155)