Semantics of type theory

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

The semantics of type 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 an internal language for categories, higher categories and other mathematical structures.

Types of models

[edit | edit source]

Categories with families

[edit | edit source]

Let Fam denote the category of families of sets: an object is a family (Ai)iI where each Ai is a set, and a morphism f:(Ai)iI(Bj)jJ is a function r:IJ together with, for each iI, a function ti:AiBr(i). (This category is equivalent to the arrow category Set of Set through the functor that sends a function f:AI to the family (f1(i))iI, with the natural action on morphisms.)

A category with families (CwF) consists of the following data:[1][2][3]

  • A category, whose class of objects is denoted Con and whose class of morphisms from Γ to Δ is denoted Sub(Γ,Δ). The objects are called contexts and the morphisms are called substitutions.
  • A contravariant functor from the category of contexts to Fam. The image of a context Γ is denoted (Tm(A))ATy(Γ). The elements of Ty(Γ) are called types in context Γ, and the elements of Tm(A) are called terms of type A (in context Γ). The image of a substitution σ:ΔΓ is a morphism (Tm(A))ATy(Γ)(Tm(B))BTy(Δ) in Fam. Its component Ty(Γ)Ty(Δ) is denoted by AA[σ], and for each ATy(Γ), its component Tm(A)Tm(A[σ]) is also denoted tt[σ].
  • A terminal object in the category of contexts, called the empty context and denoted . (Some authors omit this requirement.[4])
  • For each context Γ and for each type ATy(Γ), a representing object for the presheaf on the slice category Con/Γ that sends a substitution σ:ΔΓ to the set Tm(A[σ]) (with action on a morphism δ given by [δ]:Tm(A[σ])Tm(A[σδ])), along with a natural isomorphism witnessing that this object represents the presheaf. This representing object consists of a context denoted (Γ,A), called the extension of Γ by A, along with a substitution wkA:(Γ,A)Γ called weakening. The natural isomorphism sends a substitution σ:ΔΓ and a term tTm(A[σ]) to a substitution denoted (σ,t):Δ(Γ,A), called the extension of σ by t.

Fully unfolding the requirements results in the following presentation of CwFs as a generalized algebraic theory.[5] (The notation (x:A)B(x) stands for the dependent product x:AB(x), and curly braces denote arguments which are left implicit for readability.)

𝖢𝗈𝗇:𝖲𝖾𝗍(contexts)𝖲𝗎𝖻:𝖢𝗈𝗇𝖢𝗈𝗇𝖲𝖾𝗍(substitutions):{ΓΔΣ:𝖢𝗈𝗇}𝖲𝗎𝖻ΔΓ𝖲𝗎𝖻ΣΔ𝖲𝗎𝖻ΣΓ(composition of substitutions)𝗂𝖽:{Γ:𝖢𝗈𝗇}𝖲𝗎𝖻ΓΓ(identity substitution):(ΓΔΣΘ:𝖢𝗈𝗇)(γ:𝖲𝗎𝖻ΘΣ)(δ:𝖲𝗎𝖻ΣΔ)(σ:𝖲𝗎𝖻ΔΓ)(σδ)γ=σ(δγ)(associativity of composition):(ΓΔ:𝖢𝗈𝗇)(σ:𝖲𝗎𝖻ΔΓ)σ𝗂𝖽=σ(right identity law):(ΓΔ:𝖢𝗈𝗇)(σ:𝖲𝗎𝖻ΔΓ)𝗂𝖽σ=σ(left identity law)𝖳𝗒:𝖢𝗈𝗇𝖲𝖾𝗍(types)𝖳𝗆:(Γ:𝖢𝗈𝗇)𝖳𝗒Γ𝖲𝖾𝗍(terms)[]:{ΓΔ:𝖢𝗈𝗇}𝖳𝗒Γ𝖲𝗎𝖻ΔΓ𝖳𝗒Δ(substitution in types)[]:{ΓΔ:𝖢𝗈𝗇}{A:𝖳𝗒Γ}𝖳𝗆A(σ:𝖲𝗎𝖻ΔΓ)𝖳𝗆A[σ](substitution in terms):(ΓΔΣ:𝖢𝗈𝗇)(δ:𝖲𝗎𝖻ΣΔ)(σ:𝖲𝗎𝖻ΔΓ)(A:𝖳𝗒Γ)A[σδ]=A[σ][δ](functoriality of substitution in types):(Γ:𝖢𝗈𝗇)(A:𝖳𝗒Γ)A[𝗂𝖽]=A(idem):(ΓΔΣ:𝖢𝗈𝗇)(δ:𝖲𝗎𝖻ΣΔ)(σ:𝖲𝗎𝖻ΔΓ)(A:𝖳𝗒Γ)(t:𝖳𝗆A)t[σδ]=t[σ][δ](functoriality of substitution in terms):(Γ:𝖢𝗈𝗇)(A:𝖳𝗒Γ)(t:𝖳𝗆A)t[𝗂𝖽]=t(idem):𝖢𝗈𝗇(empty context)ε:(Γ:𝖢𝗈𝗇)𝖲𝗎𝖻Γ(substitution to the empty context):(Γ:𝖢𝗈𝗇)(σ:𝖲𝗎𝖻Γ)σ=εΓ(uniqueness of substitution to the empty context)(,):(Γ:𝖢𝗈𝗇)𝖳𝗒Γ𝖢𝗈𝗇(context extension)𝗐𝗄:{Γ:𝖢𝗈𝗇}{A:𝖳𝗒Γ}𝖲𝗎𝖻(Γ,A)Γ(weakening)(,):{ΓΔ:𝖢𝗈𝗇){A:𝖳𝗒Γ}(σ:𝖲𝗎𝖻ΔΓ)𝖳𝗆A[σ]𝖲𝗎𝖻Δ(Γ,A)(substitution extension):(ΓΔΣ𝖢𝗈𝗇)(σ:𝖲𝗎𝖻ΔΓ)(δ:𝖲𝗎𝖻ΣΔ)(A:𝖳𝗒Γ)(t:𝖳𝗆A[σ])(σ,t)δ=(σδ,t[δ])(naturality of substitution extension)𝗁𝖽:{ΓΔ:𝖢𝗈𝗇){A:𝖳𝗒Γ}(σ:𝖲𝗎𝖻Δ(Γ,A))𝖳𝗆A[𝗐𝗄σ](head term of a substitution):(ΓΔΣ:𝖢𝗈𝗇)(A:𝖳𝗒Γ)(σ:𝖲𝗎𝖻ΔΓ)(δ:𝖲𝗎𝖻ΣΔ)𝗁𝖽(σδ)=(𝗁𝖽σ)[δ](naturality of head):(ΓΔ:𝖢𝗈𝗇)(A:𝖳𝗒Γ)(σ:𝖲𝗎𝖻Δ(Γ,A))σ=(𝗐𝗄σ,𝗁𝖽σ)(head is inverse to substitution extension):(ΓΔ:𝖢𝗈𝗇)(A:𝖳𝗒Γ)(σ:𝖲𝗎𝖻ΔΓ)(t:𝖳𝗆A[σ])𝗁𝖽(σ,t)=t(idem)

Other

[edit | edit source]

Other notions of models include comprehension categories, categories with attributes and contextual categories.[4]

Interpretation of type formers

[edit | edit source]

Main models

[edit | edit source]

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] the simplicial set model,[7] and several models in cubical sets starting with the BCH (Bezem–Coquand–Huber) model.[8]

References

[edit | edit source]
  1. ^ a b c Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  3. ^ a b c Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  4. ^ a b Categorical semantics of dependent type theory at the nLab
  5. ^ Generalized algebraic theory at the nLab
  6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  7. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  8. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).