nLab dependent type



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-proposition, mere proposition
proofgeneralized elementprogram
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
cut elimination for implicationcounit for hom-tensor adjunctionbeta reduction
introduction rule for implicationunit for hom-tensor adjunctioneta conversion
logical 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/path type
equivalence classquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
completely presented setdiscrete object/0-truncated objecth-level 2-type/set/h-set
setinternal 0-groupoidBishop set/setoid
universeobject classifiertype of types
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

homotopy levels




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)type x:A \; \vdash \;B(x) \;\mathrm{type}

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

P( X) x:XP(x)XP(\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 “objobj” of objects and a type homhom of morphisms, which is dependent on two terms of type objobj, so that for any x,y:objx,y:obj there is a type hom(x,y)hom(x,y) of arrows from xx to yy. This dependency is usually written as x,y:objhom(x,y):Typex,y:obj \vdash hom(x,y):Type. In some theories, it makes sense to say that the type of “homhom” itself is obj,objTypeobj, obj\to Type (usually understood as obj(objType)obj \to (obj \to Type) or (obj×obj)Type(\obj \times \obj) \to Type), i.e. a function from pairs of elements of AA to the universe TypeType of 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.