nLab extension 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

logicset theory (internal logic of)category theorytype theory
propositionsetobjecttype
predicatefamily of setsdisplay morphismdependent type
proofelementgeneralized elementterm/program
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
introduction rule for implicationcounit for hom-tensor adjunctionlambda
elimination rule for implicationunit for hom-tensor adjunctionapplication
cut elimination for implicationone of the zigzag identities for hom-tensor adjunctionbeta reduction
identity elimination for implicationthe other zigzag identity for hom-tensor adjunctioneta conversion
truesingletonterminal object/(-2)-truncated objecth-level 0-type/unit type
falseempty setinitial objectempty type
proposition, truth valuesubsingletonsubterminal object/(-1)-truncated objecth-proposition, mere proposition
logical conjunctioncartesian productproductproduct type
disjunctiondisjoint union (support of)coproduct ((-1)-truncation of)sum type (bracket type of)
implicationfunction set (into subsingleton)internal hom (into subterminal object)function type (into h-proposition)
negationfunction set into empty setinternal hom into initial objectfunction type into empty type
universal quantificationindexed cartesian product (of family of subsingletons)dependent product (of family of subterminal objects)dependent product type (of family of h-propositions)
existential quantificationindexed disjoint union (support of)dependent sum ((-1)-truncation of)dependent sum type (bracket type of)
logical equivalencebijection setobject of isomorphismsequivalence type
support setsupport object/(-1)-truncationpropositional truncation/bracket type
n-image of morphism into terminal object/n-truncationn-truncation modality
equalitydiagonal function/diagonal subset/diagonal relationpath space objectidentity type/path type
completely presented setsetdiscrete object/0-truncated objecth-level 2-type/set/h-set
setset with equivalence relationinternal 0-groupoidBishop set/setoid with its pseudo-equivalence relation an actual equivalence relation
equivalence class/quotient setquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
set of truth valuessubobject classifiertype of propositions
domain of discourseuniverseobject classifiertype universe
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

semantics

Contents

Idea

In dependent type theories with more than one layer of type, function extension types are types which behave like function types except the domain is the outer layer (or equivalent) of type rather than the normal layer of type.

Definition

 In dependent type theory with second layer for propositions

In dependent type theory with a second layer of propositions ϕprop\phi \; \mathrm{prop}, the inference rules for extension types are given as follows:

Formation rules for extension types:

ΓAtypeΓϕpropΓ,ϕu:AΓ{A|ϕu¯}\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash \phi \; \mathrm{prop} \quad \Gamma, \phi \vdash u:A}{\Gamma \vdash \{A \vert \overline{\phi \to u}\}}

Introduction rules for extension types:

ΓAtypeΓϕpropΓ,ϕu:AΓv:AΓ,ϕuv:A¯ΓinS(v):{A|ϕu¯}\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash \phi \; \mathrm{prop} \quad \Gamma, \phi \vdash u:A \quad \Gamma \vdash v:A \quad \overline{\Gamma, \phi \vdash u \equiv v:A}}{\Gamma \vdash \mathrm{inS}(v):\{A \vert \overline{\phi \to u}\}}

Elimination rules for extension types:

ΓAtypeΓϕpropΓ,ϕu:AΓv:{A|ϕu¯}ΓoutS(v):A\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash \phi \; \mathrm{prop} \quad \Gamma, \phi \vdash u:A \quad \Gamma \vdash v:\{A \vert \overline{\phi \to u}\}}{\Gamma \vdash \mathrm{outS}(v):A}
ΓAtypeΓϕpropΓ,ϕu:AΓv:{A|ϕu¯}Γ,ϕoutS(v)u:A¯\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash \phi \; \mathrm{prop} \quad \Gamma, \phi \vdash u:A \quad \Gamma \vdash v:\{A \vert \overline{\phi \to u}\}}{\overline{\Gamma, \phi \vdash \mathrm{outS}(v) \equiv u:A}}

Computation rules:

ΓAtypeΓϕpropΓ,ϕu:AΓv:AΓoutS(inS(v))v:A\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash \phi \; \mathrm{prop} \quad \Gamma, \phi \vdash u:A \quad \Gamma \vdash v:A}{\Gamma \vdash \mathrm{outS}(\mathrm{inS}(v)) \equiv v:A}

Uniqueness rules:

ΓAtypeΓϕpropΓ,ϕu:AΓv:{A|ϕu¯}ΓinS(outS(v))v:{A|ϕu¯}\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash \phi \; \mathrm{prop} \quad \Gamma, \phi \vdash u:A \quad \Gamma \vdash v:\{A \vert \overline{\phi \to u}\}}{\Gamma \vdash \mathrm{inS}(\mathrm{outS}(v)) \equiv v:\{A \vert \overline{\phi \to u}\}}

Remark

The introduction and elimination operators inS\mathrm{inS} and outS\mathrm{outS} implicitly carries around the underlying proposition ϕ\phi, and these matter in the equations.

For instance, in type theories with coercive subtyping?, one may expect to coerce stronger extension types into weaker ones using the composition of inS\mathrm{inS} and outS\mathrm{outS}, where we use Γ,ϕϕ\Gamma, \phi \vdash \phi' to say that the proposition ϕ\phi implies ϕ\phi' in the second layer:

Γ,ϕϕΓv:{A|ϕu}ΓinS(outS(v)):{A|ϕu}\frac {\Gamma, \phi \vdash \phi' \quad \Gamma \vdash v : \{A \vert \phi \to u \} } {\Gamma \vdash \mathrm{inS}(\mathrm{outS}(v)) : \{A \vert \phi' \to u \} }

But this coercion does not simplify directly to vv because the underlying proposition carried by the operators are not the same.

In type theory with shapes

In type theory with shapes, there are three different layers - there are the cube layer and the tope layer, which is logic over type theory where the cubes are the types and the topes are the propositions in the logic over type theory, and finally there is the type layer, which is a dependent type theory. Note that this type layer is distinct from the cube layer regarded as a type theory.

Shapes are formed in the usual set-builder notation in set theory: given a cube II and a predicate tope t:Iϕt:I \vdash \phi, one could construct the shape {t:I|ϕ}\{t:I \vert \phi\}. A cofibration in two-level type theory is an inclusion of shapes, which means shapes {t:I|ϕ}\{t:I \vert \phi\} and {t:I|ψ}\{t:I \vert \psi\} with a predicate t:I|ϕψt:I \vert \phi \vdash \psi.

Formation rules for dependent extension types

{t:I|ϕ}shape{t:I|ψ}shapet:I|ϕψΞ|ΦΓctxΞ|Φ|ΓAtypeΞ,t:I|Φ,ϕ|Γa:AΞ|Φ|Γ{t:I|ψ}A| a ϕtype\frac{\{t:I \vert \phi\} \; \mathrm{shape} \quad \{t:I \vert \psi\} \; \mathrm{shape} \quad t:I \vert \phi \vdash \psi \quad \Xi \vert \Phi \vdash \Gamma \; \mathrm{ctx} \quad \Xi \vert \Phi \vert \Gamma \vdash A \; \mathrm{type} \quad \Xi, t:I \vert \Phi, \phi \vert \Gamma \vdash a:A}{\Xi \vert \Phi \vert \Gamma \vdash \langle \{t:I \vert \psi\} \to A \vert_a^\phi \rangle \; \mathrm{type}}

References

For extension types in cubical type theory, see section 3.5 of:

Last revised on January 24, 2024 at 03:32:02. See the history of this page for a list of all contributions to it.