Thesemantics oftype theory involves several closely related types of models, which are constructed and studied in order to justify axioms and new type theories, and to use type theory as aninternal language forcategories ,higher categories and other mathematical structures.
Categories with families [ edit ] LetFam {\displaystyle \operatorname {Fam} } denote thecategory of families of sets: an object is a family( A i ) i ∈ I {\displaystyle (A_{i})_{i\in I}} where eachA i {\displaystyle A_{i}} is a set, and a morphismf : ( A i ) i ∈ I → ( B j ) j ∈ J {\displaystyle f:(A_{i})_{i\in I}\to (B_{j})_{j\in J}} is a functionr : I → J {\displaystyle r:I\to J} together with, for eachi ∈ I {\displaystyle i\in I} , a functiont i : A i → B r ( i ) {\displaystyle t_{i}:A_{i}\to B_{r(i)}} . (This category isequivalent to thearrow category Set → {\displaystyle \operatorname {Set} ^{\to }} ofSet {\displaystyle \operatorname {Set} } through the functor that sends a functionf : A → I {\displaystyle f:A\to I} to the family( f − 1 ( i ) ) i ∈ I {\displaystyle (f^{-1}(i))_{i\in I}} , with the natural action on morphisms.)
Acategory with families (CwF) consists of the following data:[ 1] [ 2] [ 3]
Acategory , whose class of objects is denotedCon {\displaystyle \operatorname {Con} } and whose class of morphisms fromΓ {\displaystyle \Gamma } toΔ {\displaystyle \Delta } is denotedSub ( Γ , Δ ) {\displaystyle \operatorname {Sub} (\Gamma ,\Delta )} . The objects are calledcontexts and the morphisms are calledsubstitutions . Acontravariant functor from the category of contexts toFam {\displaystyle \operatorname {Fam} } . The image of a contextΓ {\displaystyle \Gamma } is denoted( Tm ( A ) ) A ∈ Ty ( Γ ) {\displaystyle (\operatorname {Tm} (A))_{A\in \operatorname {Ty} (\Gamma )}} . The elements ofTy ( Γ ) {\displaystyle \operatorname {Ty} (\Gamma )} are calledtypes in contextΓ {\displaystyle \Gamma } , and the elements ofTm ( A ) {\displaystyle \operatorname {Tm} (A)} are calledterms of typeA {\displaystyle A} (in contextΓ {\displaystyle \Gamma } ). The image of a substitutionσ : Δ → Γ {\displaystyle \sigma :\Delta \to \Gamma } is a morphism( Tm ( A ) ) A ∈ Ty ( Γ ) → ( Tm ( B ) ) B ∈ Ty ( Δ ) {\displaystyle (\operatorname {Tm} (A))_{A\in \operatorname {Ty} (\Gamma )}\to (\operatorname {Tm} (B))_{B\in \operatorname {Ty} (\Delta )}} inFam {\displaystyle \operatorname {Fam} } . Its componentTy ( Γ ) → Ty ( Δ ) {\displaystyle \operatorname {Ty} (\Gamma )\to \operatorname {Ty} (\Delta )} is denoted byA ↦ A [ σ ] {\displaystyle A\mapsto A[\sigma ]} , and for eachA ∈ Ty ( Γ ) {\displaystyle A\in \operatorname {Ty} (\Gamma )} , its componentTm ( A ) → Tm ( A [ σ ] ) {\displaystyle \operatorname {Tm} (A)\to \operatorname {Tm} (A[\sigma ])} is also denotedt ↦ t [ σ ] {\displaystyle t\mapsto t[\sigma ]} . Aterminal object in the category of contexts, called theempty context and denoted⋄ {\displaystyle \diamond } . (Some authors omit this requirement.[ 4] ) For each contextΓ {\displaystyle \Gamma } and for each typeA ∈ Ty ( Γ ) {\displaystyle A\in \operatorname {Ty} (\Gamma )} , arepresenting object for thepresheaf on theslice category Con / Γ {\displaystyle {\operatorname {Con} }/\Gamma } that sends a substitutionσ : Δ → Γ {\displaystyle \sigma :\Delta \to \Gamma } to the setTm ( A [ σ ] ) {\displaystyle \operatorname {Tm} (A[\sigma ])} (with action on a morphismδ {\displaystyle \delta } given by− [ δ ] : Tm ( A [ σ ] ) → Tm ( A [ σ ∘ δ ] ) {\displaystyle -[\delta ]:\operatorname {Tm} (A[\sigma ])\to \operatorname {Tm} (A[\sigma \circ \delta ])} ), along with a natural isomorphism witnessing that this object represents the presheaf. This representing object consists of a context denoted( Γ , A ) {\displaystyle (\Gamma ,A)} , called theextension ofΓ {\displaystyle \Gamma } byA {\displaystyle A} , along with a substitutionwk A : ( Γ , A ) → Γ {\displaystyle \operatorname {wk} _{A}:(\Gamma ,A)\to \Gamma } calledweakening . The natural isomorphism sends a substitutionσ : Δ → Γ {\displaystyle \sigma :\Delta \to \Gamma } and a termt ∈ Tm ( A [ σ ] ) {\displaystyle t\in \operatorname {Tm} (A[\sigma ])} to a substitution denoted( σ , t ) : Δ → ( Γ , A ) {\displaystyle (\sigma ,t):\Delta \to (\Gamma ,A)} , called theextension ofσ {\displaystyle \sigma } byt {\displaystyle t} . Fully unfolding the requirements results in the following presentation of CwFs as ageneralized algebraic theory .[ 5] (The notation( x : A ) → B ( x ) {\displaystyle (x:A)\to B(x)} stands for the dependent product∏ x : A B ( x ) {\displaystyle \prod _{x:A}B(x)} , and curly braces denote arguments which are left implicit for readability.)
C o n : S e t (contexts) S u b : C o n → C o n → S e t (substitutions) − ∘ − : { Γ Δ Σ : C o n } → S u b Δ Γ → S u b Σ Δ → S u b Σ Γ (composition of substitutions) i d : { Γ : C o n } → S u b Γ Γ (identity substitution) : ( Γ Δ Σ Θ : C o n ) ( γ : S u b Θ Σ ) ( δ : S u b Σ Δ ) ( σ : S u b Δ Γ ) → ( σ ∘ δ ) ∘ γ = σ ∘ ( δ ∘ γ ) (associativity of composition) : ( Γ Δ : C o n ) → ( σ : S u b Δ Γ ) → σ ∘ i d = σ (right identity law) : ( Γ Δ : C o n ) → ( σ : S u b Δ Γ ) → i d ∘ σ = σ (left identity law) T y : C o n → S e t (types) T m : ( Γ : C o n ) → T y Γ → S e t (terms) − [ − ] : { Γ Δ : C o n } → T y Γ → S u b Δ Γ → T y Δ (substitution in types) − [ − ] : { Γ Δ : C o n } { A : T y Γ } → T m A → ( σ : S u b Δ Γ ) → T m A [ σ ] (substitution in terms) : ( Γ Δ Σ : C o n ) ( δ : S u b Σ Δ ) ( σ : S u b Δ Γ ) ( A : T y Γ ) → A [ σ ∘ δ ] = A [ σ ] [ δ ] (functoriality of substitution in types) : ( Γ : C o n ) ( A : T y Γ ) → A [ i d ] = A (idem) : ( Γ Δ Σ : C o n ) ( δ : S u b Σ Δ ) ( σ : S u b Δ Γ ) ( A : T y Γ ) ( t : T m A ) → t [ σ ∘ δ ] = t [ σ ] [ δ ] (functoriality of substitution in terms) : ( Γ : C o n ) ( A : T y Γ ) ( t : T m A ) → t [ i d ] = t (idem) ⋄ : C o n (empty context) ε : ( Γ : C o n ) → S u b Γ ⋄ (substitution to the empty context) : ( Γ : C o n ) ( σ : S u b Γ ⋄ ) → σ = ε Γ (uniqueness of substitution to the empty context) ( − , − ) : ( Γ : C o n ) → T y Γ → C o n (context extension) w k : { Γ : C o n } { A : T y Γ } → S u b ( Γ , A ) Γ (weakening) ( − , − ) : { Γ Δ : C o n ) { A : T y Γ } → ( σ : S u b Δ Γ ) → T m A [ σ ] → S u b Δ ( Γ , A ) (substitution extension) : ( Γ Δ Σ C o n ) ( σ : S u b Δ Γ ) ( δ : S u b Σ Δ ) ( A : T y Γ ) ( t : T m A [ σ ] ) → ( σ , t ) ∘ δ = ( σ ∘ δ , t [ δ ] ) (naturality of substitution extension) h d : { Γ Δ : C o n ) { A : T y Γ } → ( σ : S u b Δ ( Γ , A ) ) → T m A [ w k ∘ σ ] (head term of a substitution) : ( Γ Δ Σ : C o n ) ( A : T y Γ ) ( σ : S u b Δ Γ ) ( δ : S u b Σ Δ ) → h d ( σ ∘ δ ) = ( h d σ ) [ δ ] (naturality of head) : ( Γ Δ : C o n ) ( A : T y Γ ) ( σ : S u b Δ ( Γ , A ) ) → σ = ( w k ∘ σ , h d σ ) (head is inverse to substitution extension) : ( Γ Δ : C o n ) ( A : T y Γ ) ( σ : S u b Δ Γ ) ( t : T m A [ σ ] ) → h d ( σ , t ) = t (idem) {\displaystyle {\begin{aligned}\\{\mathsf {Con}}&:{\mathsf {Set}}&&{\text{(contexts)}}\\{\mathsf {Sub}}&:{\mathsf {Con}}\to {\mathsf {Con}}\to {\mathsf {Set}}&&{\text{(substitutions)}}\\-\circ -&:\{\Gamma \,\Delta \,\Sigma :{\mathsf {Con}}\}\to {\mathsf {Sub}}\,\Delta \,\Gamma \to {\mathsf {Sub}}\,\Sigma \,\Delta \to {\mathsf {Sub}}\,\Sigma \,\Gamma &&{\text{(composition of substitutions)}}\\{\mathsf {id}}&:\{\Gamma :{\mathsf {Con}}\}\to {\mathsf {Sub}}\,\Gamma \,\Gamma &&{\text{(identity substitution)}}\\&:(\Gamma \,\Delta \,\Sigma \,\Theta :{\mathsf {Con}})(\gamma :{\mathsf {Sub}}\,\Theta \,\Sigma )\,(\delta :{\mathsf {Sub}}\,\Sigma \,\Delta )(\sigma :{\mathsf {Sub}}\,\Delta \,\Gamma )\\&\quad \to (\sigma \circ \delta )\circ \gamma =\sigma \circ (\delta \circ \gamma )&&{\text{(associativity of composition)}}\\&:(\Gamma \,\Delta :{\mathsf {Con}})\to (\sigma :{\mathsf {Sub}}\,\Delta \,\Gamma )\to \sigma \circ {\mathsf {id}}=\sigma &&{\text{(right identity law)}}\\&:(\Gamma \,\Delta :{\mathsf {Con}})\to (\sigma :{\mathsf {Sub}}\,\Delta \,\Gamma )\to {\mathsf {id}}\circ \sigma =\sigma &&{\text{(left identity law)}}\\{\mathsf {Ty}}&:{\mathsf {Con}}\to {\mathsf {Set}}&&{\text{(types)}}\\{\mathsf {Tm}}&:(\Gamma :{\mathsf {Con}})\to {\mathsf {Ty}}\,\Gamma \to {\mathsf {Set}}&&{\text{(terms)}}\\-[-]&:\{\Gamma \,\Delta :{\mathsf {Con}}\}\to {\mathsf {Ty}}\,\Gamma \to {\mathsf {Sub}}\,\Delta \,\Gamma \to {\mathsf {Ty}}\,\Delta &&{\text{(substitution in types)}}\\-[-]&:\{\Gamma \,\Delta :{\mathsf {Con}}\}\{A:{\mathsf {Ty}}\,\Gamma \}\to {\mathsf {Tm}}\,A\to (\sigma :{\mathsf {Sub}}\,\Delta \,\Gamma )\to {\mathsf {Tm}}\,A[\sigma ]&&{\text{(substitution in terms)}}\\&:(\Gamma \,\Delta \,\Sigma :{\mathsf {Con}})(\delta :{\mathsf {Sub}}\,\Sigma \,\Delta )(\sigma :{\mathsf {Sub}}\,\Delta \,\Gamma )(A:{\mathsf {Ty}}\,\Gamma )\\&\quad \to A[\sigma \circ \delta ]=A[\sigma ][\delta ]&&{\text{(functoriality of substitution in types)}}\\&:(\Gamma :{\mathsf {Con}})(A:{\mathsf {Ty}}\,\Gamma )\to A[{\mathsf {id}}]=A&&{\text{(idem)}}\\&:(\Gamma \,\Delta \,\Sigma :{\mathsf {Con}})(\delta :{\mathsf {Sub}}\,\Sigma \,\Delta )(\sigma :{\mathsf {Sub}}\,\Delta \,\Gamma )(A:{\mathsf {Ty}}\,\Gamma )(t:{\mathsf {Tm}}\,A)\\&\quad \to t[\sigma \circ \delta ]=t[\sigma ][\delta ]&&{\text{(functoriality of substitution in terms)}}\\&:(\Gamma :{\mathsf {Con}})(A:{\mathsf {Ty}}\,\Gamma )(t:{\mathsf {Tm}}\,A)\to t[{\mathsf {id}}]=t&&{\text{(idem)}}\\\diamond &:{\mathsf {Con}}&&{\text{(empty context)}}\\\varepsilon &:(\Gamma :{\mathsf {Con}})\to {\mathsf {Sub}}\,\Gamma \,\diamond &&{\text{(substitution to the empty context)}}\\&:(\Gamma :{\mathsf {Con}})(\sigma :{\mathsf {Sub}}\,\Gamma \,\diamond )\to \sigma =\varepsilon \,\Gamma &&{\text{(uniqueness of substitution to the empty context)}}\\(-,-)&:(\Gamma :{\mathsf {Con}})\to {\mathsf {Ty}}\,\Gamma \to {\mathsf {Con}}&&{\text{(context extension)}}\\{\mathsf {wk}}&:\{\Gamma :{\mathsf {Con}}\}\{A:{\mathsf {Ty}}\,\Gamma \}\to {\mathsf {Sub}}\,(\Gamma ,A)\,\Gamma &&{\text{(weakening)}}\\(-,-)&:\{\Gamma \,\Delta :{\mathsf {Con}})\{A:{\mathsf {Ty}}\,\Gamma \}\\&\quad \to (\sigma :{\mathsf {Sub}}\,\Delta \,\Gamma )\to {\mathsf {Tm}}\,A[\sigma ]\to {\mathsf {Sub}}\,\Delta \,(\Gamma ,A)&&{\text{(substitution extension)}}\\&:(\Gamma \,\Delta \,\Sigma \,{\mathsf {Con}})(\sigma :{\mathsf {Sub}}\,\Delta \,\Gamma )(\delta :{\mathsf {Sub}}\,\Sigma \,\Delta )(A:{\mathsf {Ty}}\,\Gamma )(t:{\mathsf {Tm}}\,A[\sigma ])\\&\quad \to (\sigma ,t)\circ \delta =(\sigma \circ \delta ,t[\delta ])&&{\text{(naturality of substitution extension)}}\\{\mathsf {hd}}&:\{\Gamma \,\Delta :{\mathsf {Con}})\{A:{\mathsf {Ty}}\,\Gamma \}\to (\sigma :{\mathsf {Sub}}\,\Delta \,(\Gamma ,A))\to {\mathsf {Tm}}\,A[{\mathsf {wk}}\circ \sigma ]&&{\text{(head term of a substitution)}}\\&:(\Gamma \,\Delta \,\Sigma :{\mathsf {Con}})(A:{\mathsf {Ty}}\,\Gamma )(\sigma :{\mathsf {Sub}}\,\Delta \,\Gamma )(\delta :{\mathsf {Sub}}\,\Sigma \,\Delta )\\&\quad \to {\mathsf {hd}}(\sigma \circ \delta )=({\mathsf {hd}}\,\sigma )[\delta ]&&{\text{(naturality of head)}}\\&:(\Gamma \,\Delta :{\mathsf {Con}})(A:{\mathsf {Ty}}\,\Gamma )(\sigma :{\mathsf {Sub}}\,\Delta \,(\Gamma ,A))\to \sigma =({\mathsf {wk}}\circ \sigma ,{\mathsf {hd}}\,\sigma )&&{\text{(head is inverse to substitution extension)}}\\&:(\Gamma \,\Delta :{\mathsf {Con}})(A:{\mathsf {Ty}}\,\Gamma )(\sigma :{\mathsf {Sub}}\,\Delta \,\Gamma )(t:{\mathsf {Tm}}\,A[\sigma ])\to {\mathsf {hd}}\,(\sigma ,t)=t&&{\text{(idem)}}\end{aligned}}}
This section
needs expansion . You can help by
adding to it .
(November 2025 )
Other notions of models include comprehension categories, categories with attributes and contextual categories.[ 4]
Interpretation of type formers [ edit ] This section is empty. You can help by
adding to it .
(November 2025 )
This section
needs expansion . You can help by
adding to it .
(November 2025 )
Models of type theory include the standard model (or set model),[ 1] [ 3] , the term model (or syntactic model, or initial model),[ 1] [ 3] , the setoid model,[citation needed ] the groupoid model,[ 6] thesimplicial set model,[ 7] and several models incubical sets starting with the BCH (Bezem–Coquand–Huber) model.[ 8]
^a b c Hofmann, Martin (1997). "Syntax and semantics of dependent types".Extensional constructs in intensional type theory . London: Springer. pp. 13– 54.doi :10.1007/978-1-4471-0963-1_2 .ISBN 978-1-4471-0963-1 . ^ Gratzer, Daniel; Angiuli, Carlo.Principles of dependent type theory (PDF) . Retrieved2025-11-21 . ^a b c Gratzer, Daniel."Denotational semantics of type theory" (PDF) . ^a b Categorical semantics of dependent type theory at then Lab^ Generalized algebraic theory at then Lab^ Hofmann, Martin;Streicher, Thomas (1994). "The groupoid model refutes uniqueness of identity proofs".Proceedings of the Ninth Annual IEEE Symposium on Logic in Computer Science (LICS 1994) .LICS 1994. IEEE Computer Society Press. pp. 208– 212. ^ Kapulkin, Chris; LeFanu Lumsdaine, Peter (2012)."The simplicial model of univalent foundations (after Voevodsky)" .Journal of the European Mathematical Society .arXiv :1211.2851 .doi :10.4171/JEMS/1050 . ^ Bezem, Marc;Coquand, Thierry ; Huber, Simon (2014)."A model of type theory in cubical sets" . In Matthes, Ralph; Schubert, Aleksy (eds.).19th International Conference on Types for Proofs and Programs (TYPES 2013) . TYPES 2013. Leibniz International Proceedings in Informatics (LIPIcs). Vol. 26. Schloss Daghstuhl — Leibniz Zentrum für Informatik. pp. 107– 128.ISBN 978-3-939897-72-9 .ISSN 1868-8969 .