nLab propositional type theory

Contents

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

Deduction and Induction

Constructivism, Realizability, Computability

Foundations

foundations

The basis of it all

 Set theory

set theory

Foundational axioms

foundational axioms

Removing axioms

Contents

Idea

A dependent type theory where the computation rules and uniqueness rules for types use identity types instead of judgmental equality. As a result, the results in the dependent type theory are more general than in models which use judgmental equality for computational and uniqueness rules, since judgmental equality implies typal equality, while the converse isn’t necessarily the case.

The dependent type theory has many different names in the existing literature

Propositional type theory has decidable type checking, and the type checking can be done in quadratic time.

Definitions in propositional type theory

Propositional type theories come into two general versions, depending on how they treat definitions in dependent type theory:

These two approaches differ in whether aliases of terms and types reduce to the original term or type, or are identified or equivalent to the original term or type. They each have their own advantages:

Advantages of not having judgmental definitional equality include

  • a simpler set of inference rules

  • more models

  • type theories without any definitional equalities are cofibrant in categories of theories.

Advantages of having judgmental definitional equality include

  • shorter internal proofs and constructions

  • avoids “higher transport hell” for aliases of terms and types

With judgmental definitional equality

For propositional type theory with judgmental definitional equality, definitions of aliases of types and terms are still made using judgmental equality. The structural rules and congruence rules have to be postulated explicitly in the theory like in the usual dependent type theories. In addition to the congruence rules for judgmental equality for the formation rules, introduction rules, and elimination rules of each type former, there are additional congruence rules for the computation and uniqueness rules, since the conversion rules are represented by the structure of an identification rather than judgmental equality, and thus this structure has to be preserved across judgmental equality.

Without judgmental definitional equality

For propositional type theory without judgmental definitional equality, definitions of types and terms are made using identifications or equivalences of types. Any judgmental equality \equiv in the theory represents α \alpha -equivalence or syntactic equality, where the usual structural rules and congruence rules are admissible rules.

Furthermore, in the context of propositional type theory where there is no definitional equality in the type theory in the traditional sense, there is the question of how to define aliases of terms and types in the type theory.

For the case of terms, that is easily resolved by using identity types. For example, to define 22 as the successor of the succcessor of zero in the natural numbers type, one could postulate an identification def2:2= Ns(s(0))\mathrm{def}2:2 =_{\mathrm{N}} s(s(0)). On the other hand, the situation for types is a bit more complicated. For example, the isProp modality isProp(A)\mathrm{isProp}(A) in dependent type theory indicating whether the type AA is a mere proposition is usually defined to be x:A y:AId A(x,y)\prod_{x:A} \prod_{y:A} \mathrm{Id}_A(x, y). But without judgmental equality, one cannot simply write

isProp(A) x:A y:AId A(x,y)\mathrm{isProp}(A) \equiv \prod_{x:A} \prod_{y:A} \mathrm{Id}_A(x, y)

When presenting dependent type theory using Russell universes, the answer is as simple as that for terms: one simply uses typal equality instead, because every type is an element of a Russell universe, and so one could write

defisProp A:isContr(A)= Type i x:A y:AId A(x,y)\mathrm{defisProp}_A:\mathrm{isContr}(A) =_{\mathrm{Type}_i} \prod_{x:A} \prod_{y:A} \mathrm{Id}_A(x, y)

for types isProp(A):Type i\mathrm{isProp}(A):\mathrm{Type}_i and x:A y:AId A(x,y):Type i\prod_{x:A} \prod_{y:A} \mathrm{Id}_A(x, y):\mathrm{Type}_i.

On the other hand, when using a separate type judgment, types are not elements of other types, and thus one cannot compare them for typal equality. Instead, one has two alternatives

  • One can use polymorphic dependent type theory with type variables and postulate an identity type between types A=BA = B, where we then have
    defisProp A:isProp(A)= x:A y:AId A(x,y)\mathrm{defisProp}_A:\mathrm{isProp}(A) = \prod_{x:A} \prod_{y:A} \mathrm{Id}_A(x, y)
  • One can postulate a type of equivalences ABA \simeq B as a record type with propositional computation rules, where we then have
    defisProp A:isProp(A) x:A y:AId A(x,y)\mathrm{defisProp}_A:\mathrm{isProp}(A) \simeq \prod_{x:A} \prod_{y:A} \mathrm{Id}_A(x, y)

Formalizations and syntax

In section 9 of Winterhalter 2020, Theo Winterhalter indicates that there are many ways to formalize dependent type theory. One important aspect is whether to use Russell universes or a separate type judgment to denote types. van der Berg & den Besten 2021 and Spadetto 2023 for example both use Russell universes in their formal presentation of dependent type theory.

In this section, we present two separate formalizations, the first using a universe hierarchy of Russell universes in the style of UFP 13, and the second using a separate type judgment in the style of Rijke 2022, along with type variables to define identity types between types for explicit conversion.

Without a separate type judgment

In this section, we describe a formalization of propositional type theory using an infinite hierarchy of Russell universes with cumulativity, in the style of UPF 2013.

Judgments, contexts, and universes

This presentation of propositional type theory consists of the following judgments:

  • Element judgments, where we judge aa to be an element of AA, a:Aa:A

  • Context judgments, where we judge Γ\Gamma to be a context, Γctx\Gamma \; \mathrm{ctx}.

In addition, we have a countably infinite number of inference rules for the countably infinite number of Russell universes Type 0,Type 1,Type 2,\mathrm{Type}_0, \mathrm{Type}_1, \mathrm{Type}_2, \ldots in the theory, here represented by a natural numbers metavariable for conciseness:

ΓctxΓType i:Type i+1\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{Type}_i:\mathrm{Type}_{i + 1}}

as well as inference rules for either cumulativity, that any type in a universe is also in the next universe of the hierarchy, or lifting, that any type in a universe can be lifted to the next universe of the hierarchy:

ΓA:Type iΓA:Type i+1cumulΓA:Type iΓLift(A):Type i+1lifting\frac{\Gamma \vdash A:\mathrm{Type}_i}{\Gamma \vdash A:\mathrm{Type}_{i + 1}}\mathrm{cumul} \qquad \frac{\Gamma \vdash A:\mathrm{Type}_i}{\Gamma \vdash \mathrm{Lift}(A):\mathrm{Type}_{i + 1}}\mathrm{lifting}

Contexts are lists of element judgments a:Aa:A, b:Bb:B, c:Cc:C, et cetera, and are formalized by the inference rules for the empty context and extending the context by a element judgment

()ctxΓctxΓA:Type i(Γ,a:A)ctx\frac{}{() \; \mathrm{ctx}} \qquad \frac{\Gamma \; \mathrm{ctx} \quad \Gamma \vdash A:\mathrm{Type}_i}{(\Gamma, a:A) \; \mathrm{ctx}}

Variable rule

There is one additional structural rule in propositional type theory, the variable rule.

The variable rule states that we may derive a element judgment if the element judgment is in the context already:

Γ,a:A,ΔctxΓ,a:A,Δa:A\frac{\Gamma, a:A, \Delta \; \mathrm{ctx}}{\Gamma, a:A, \Delta \vdash a:A}

Families of types and elements

A family of elements is an element b:Bb:B in the context of the variable judgment x:Ax:A, x:Ab:Bx:A \vdash b:B. They are usually written as b(x)b(x) to indicate its dependence upon xx. Given a particular element a:Aa:A, the element b(a)b(a) is an element dependent upon a:Aa:A.

Since types are elements of universe, a family of types is simply a family of elements of universes.

Identity types

Formation rules for identity types:

ΓA:Type iΓ,a:A,b:Aa= Ab:Type i\frac{\Gamma \vdash A:\mathrm{Type}_i}{\Gamma, a:A, b:A \vdash a =_A b:\mathrm{Type}_i}

Introduction rules for identity types:

ΓA:Type iΓ,a:Arefl A(a):a= Aa\frac{\Gamma \vdash A:\mathrm{Type}_i}{\Gamma, a:A \vdash \mathrm{refl}_A(a) : a =_A a}

Elimination rule for identity types:

Γ,x:A,y:A,p:x= Ay,Δ(x,y,p)C(x,y,p):Type iΓ,x:A,t:C(x,x,refl A(x),y:A,p:x= Ay,Δ(x,t,y,p)ind = A(x,t,y,p):C(x,y,p)\frac{\Gamma, x:A, y:A, p:x =_A y, \Delta(x, y, p) \vdash C(x, y, p):\mathrm{Type}_i}{\Gamma, x:A, t:C(x, x, \mathrm{refl}_A(x), y:A, p:x =_A y, \Delta(x, t, y, p) \vdash \mathrm{ind}_{=_A}(x, t, y, p):C(x, y, p)}

Computation rules for identity types:

Γ,x:A,y:A,p:x= Ay,Δ(x,y,p)C(x,y,p):Type iΓ,x:A,t:C(x,x,refl A(x),Δ(x,t,x,refl A(x))β = A(x,t):ind = A(x,t,x,refl A(x))= C(x,x,refl A(x))t\frac{\Gamma, x:A, y:A, p:x =_A y, \Delta(x, y, p) \vdash C(x, y, p):\mathrm{Type}_i}{\Gamma, x:A, t:C(x, x, \mathrm{refl}_A(x), \Delta(x, t, x, \mathrm{refl}_A(x)) \vdash \beta_{=_A}(x, t):\mathrm{ind}_{=_A}(x, t, x, \mathrm{refl}_A(x)) =_{C(x, x, \mathrm{refl}_A(x))} t}

Definitions

Definitions of a symbol bb for the element a:Aa:A are made by using identity types between the symbol and element: def a,b:a= Ab\mathrm{def}_{a, b}:a =_A b. Definitions of a symbol BB for the type A:Type iA:\mathrm{Type}_i are made in the same way, as def A,B:A= Type iB\mathrm{def}_{A, B}:A =_{\mathrm{Type}_i} B. Thus, the identity type behaves very similarly to explicit conversion as discussed in section 9.2 of Winterhalter 2020.

Dependent function types

Formation rules for dependent function types:

ΓA:Type iΓ,x:AB(x):Type iΓ x:AB(x):Type i\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma, x:A \vdash B(x):\mathrm{Type}_i}{\Gamma \vdash \prod_{x:A} B(x):\mathrm{Type}_i}

Introduction rules for dependent function types:

ΓA:Type iΓ,x:AB(x):Type iΓ,x:Ab(x):B(x)Γλ(x:A).b(x): x:AB(x)\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma, x:A \vdash B(x):\mathrm{Type}_i \quad \Gamma, x:A \vdash b(x):B(x)}{\Gamma \vdash \lambda(x:A).b(x):\prod_{x:A} B(x)}

Elimination rules for dependent function types:

ΓA:Type iΓ,x:AB(x):Type iΓ,f: x:AB(x),a:Aind x:AB(x)(f,a):B(a)\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma, x:A \vdash B(x):\mathrm{Type}_i}{\Gamma, f:\prod_{x:A} B(x), a:A \vdash \mathrm{ind}_{\prod_{x:A} B(x)}(f, a):B(a)}

Computation rules for dependent function types

ΓA:Type iΓ,x:AB(x):Type iΓ,x:Ab(x):B(x)Γ,a:Aβ x:AB(x)(a):ind x:AB(x)(λ(x:A).b(x),a)= B(a)b(a)\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma, x:A \vdash B(x):\mathrm{Type}_i \quad \Gamma, x:A \vdash b(x):B(x)}{\Gamma, a:A \vdash \beta_{\prod_{x:A} B(x)}(a):\mathrm{ind}_{\prod_{x:A} B(x)}(\lambda(x:A).b(x), a) =_{B(a)} b(a)}

Uniqueness rules for dependent function types:

ΓAtypeΓ,x:AB(x):Type iΓ,f: x:AB(x)η x:AB(x)(f):f= x:AB(x)λ(x:A).ind x:AB(x)(f,x)\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x):\mathrm{Type}_i}{\Gamma, f:\prod_{x:A} B(x) \vdash \eta_{\prod_{x:A} B(x)}(f):f =_{\prod_{x:A} B(x)} \lambda(x:A).\mathrm{ind}_{\prod_{x:A} B(x)}(f, x)}

Function types

Formation rules for function types:

ΓA:Type iΓB:Type iΓAB:Type i\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma \vdash A \to B:\mathrm{Type}_i}

Introduction rules for function types:

ΓA:Type iΓB:Type iΓ,x:Ab(x):BΓλ(x:A).b(x):AB\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i \quad \Gamma, x:A \vdash b(x):B}{\Gamma \vdash \lambda(x:A).b(x):A \to B}

Elimination rules for function types:

ΓA:Type iΓB:Type iΓ,f:AB,a:Aind AB(f,a):B\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma, f:A \to B, a:A \vdash \mathrm{ind}_{A \to B}(f, a):B}

Computation rules for function types

ΓA:Type iΓB:Type iΓ,x:Ab(x):BΓ,a:Aβ AB(a):ind AB(λ(x:A).b(x),a)= Bb(a)\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i \quad \Gamma, x:A \vdash b(x):B}{\Gamma, a:A \vdash \beta_{A \to B}(a):\mathrm{ind}_{A \to B}(\lambda(x:A).b(x), a) =_{B} b(a)}

Uniqueness rules for function types:

ΓA:Type iΓB:Type iΓ,f:ABη AB(f):f= ABλ(x:A).ind AB(f,x)\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma, f:A \to B \vdash \eta_{A \to B}(f):f =_{A \to B} \lambda(x:A).\mathrm{ind}_{A \to B}(f, x)}

Pair types

Formation rules for pair types:

ΓA:Type iΓB:Type iΓA×B:Type i\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma \vdash A \times B:\mathrm{Type}_i}

Introduction rules for pair types:

ΓA:Type iΓB:Type iΓ,x:A,y:Bin(x,y):A×B\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma, x:A, y:B \vdash \mathrm{in}(x, y):A \times B}

Elimination rules for pair types:

ΓA:Type iΓB:Type iΓ,z:A×Bind A×B A(z):AΓA:Type iΓB:Type iΓ,z:A×Bind A×B B(z):B\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma, z:A \times B \vdash \mathrm{ind}_{A \times B}^A(z):A} \qquad \frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma, z:A \times B \vdash \mathrm{ind}_{A \times B}^B(z):B}

Computation rules for pair types:

ΓA:Type iΓB:Type iΓ,x:A,y:Bβ A×B A(x,y):ind A×B A(in(x,y))= Ax\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma, x:A, y:B \vdash \beta_{A \times B}^A(x, y):\mathrm{ind}_{A \times B}^A(\mathrm{in}(x, y)) =_A x}
ΓA:Type iΓB:Type iΓ,x:A,y:Bβ A×B B(x,y):ind A×B B(in(x,y))= By\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma, x:A, y:B \vdash \beta_{A \times B}^B(x, y):\mathrm{ind}_{A \times B}^B(\mathrm{in}(x, y)) =_B y}

Uniqueness rules for pair types:

ΓA:Type iΓB:Type iΓ,z:A×Bη A×B(z):z= A×Bin(ind A×B A(z),ind A×B B(z))\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma, z:A \times B \vdash \eta_{A \times B}(z):z =_{A \times B} \mathrm{in}(\mathrm{ind}_{A \times B}^A(z), \mathrm{ind}_{A \times B}^B(z))}

Dependent pair types

Formation rules for dependent pair types:

ΓA:Type iΓ,x:AB(x):Type iΓ x:AB(x):Type i\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma, x:A \vdash B(x):\mathrm{Type}_i}{\Gamma \vdash \sum_{x:A} B(x):\mathrm{Type}_i}

Introduction rules for dependent pair types:

ΓA:Type iΓ,x:AB(x):Type iΓ,x:A,y:B(x)in(x,y): x:AB(x)\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma, x:A \vdash B(x):\mathrm{Type}_i}{\Gamma, x:A, y:B(x) \vdash \mathrm{in}(x, y):\sum_{x:A} B(x)}

Elimination rules for dependent pair types:

ΓA:Type iΓ,x:AB(x):Type iΓind x:AB(x) A:( x:AB(x))AΓAtypeΓ,x:AB(x)typeΓind x:AB(x) B: z: x:AB(x)B(ind x:AB(x) A(z))\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma, x:A \vdash B(x):\mathrm{Type}_i}{\Gamma \vdash \mathrm{ind}_{\sum_{x:A} B(x)}^A:\left(\sum_{x:A} B(x)\right) \to A} \qquad \frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma \vdash \mathrm{ind}_{\sum_{x:A} B(x)}^B:\prod_{z:\sum_{x:A} B(x)} B(\mathrm{ind}_{\sum_{x:A} B(x)}^A(z))}

Computation rules for dependent pair types:

ΓA:Type iΓ,x:AB(x):Type iΓ,x:A,y:B(x)β x:AB(x) A(x,y):ind x:AB(x) A(in(x,y))= Ax\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma, x:A \vdash B(x):\mathrm{Type}_i}{\Gamma, x:A, y:B(x) \vdash \beta_{\sum_{x:A} B(x)}^A(x, y):\mathrm{ind}_{\sum_{x:A} B(x)}^A(\mathrm{in}(x, y)) =_A x}
ΓA:Type iΓ,x:AB(x):Type iΓ,x:A,y:B(x)β Σ(x:A).B(x) B(x,y):ind x:AB(x) B(in(x,y))= B(ind x:AB(x) A(in(x,y)))y\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma, x:A \vdash B(x):\mathrm{Type}_i}{\Gamma, x:A, y:B(x) \vdash \beta_{\Sigma(x:A).B(x)}^B(x, y):\mathrm{ind}_{\sum_{x:A} B(x)}^B(\mathrm{in}(x, y)) =_{B(\mathrm{ind}_{\sum_{x:A} B(x)}^A(\mathrm{in}(x, y)))} y}

Uniqueness rules for dependent pair types:

ΓA:Type iΓ,x:AB(x):Type iΓ,z: x:AB(x)η x:AB(x)(z):z= x:AB(x)in(ind x:AB(x)) A(z),ind x:AB(x) B(z))\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma, x:A \vdash B(x):\mathrm{Type}_i}{\Gamma, z:\sum_{x:A} B(x) \vdash \eta_{\sum_{x:A} B(x)}(z):z =_{\sum_{x:A} B(x)} \mathrm{in}(\mathrm{ind}_{\sum_{x:A} B(x))}^A(z), \mathrm{ind}_{\sum_{x:A} B(x)}^B(z))}

isContr, uniqueness quantifiers, isEquiv, and equivalence types

Now that we have identity types, dependent sum types, and dependent product types, we can use that to define

ΓA:Type iΓisContr(A):Type iΓA:Type iΓdefisContr(A):isContr(A)= Type i y:A z:Ay= Az\frac{\Gamma \vdash A:\mathrm{Type}_i}{\Gamma \vdash \mathrm{isContr}(A):\mathrm{Type}_i} \qquad \frac{\Gamma \vdash A:\mathrm{Type}_i}{\Gamma \vdash \mathrm{defisContr}(A):\mathrm{isContr}(A) =_{\mathrm{Type}_i} \sum_{y:A} \prod_{z:A} y =_{A} z}
ΓA:Type iΓ,x:AB(x):Type iΓ!x:A.B(x):Type iΓA:Type iΓ,x:AB(x):Type iΓdef! x:A.B(x):!x:A.B(x)= Type iisContr( x:AB(x))\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma, x:A \vdash B(x):\mathrm{Type}_i}{\Gamma \vdash \exists!x:A.B(x):\mathrm{Type}_i} \qquad \frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma, x:A \vdash B(x):\mathrm{Type}_i}{\Gamma \vdash \mathrm{def}\exists!_{x:A.B(x)}:\exists!x:A.B(x) =_{\mathrm{Type}_i} \mathrm{isContr}\left(\sum_{x:A} B(x)\right)}
ΓA:Type iΓB:Type iΓ,f:ABisEquiv(f):Type iΓA:Type iΓB:Type iΓ,f:ABdefisEquiv A,B(f):isEquiv(f)= Type i y:B!x:A.f(x)= By\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma, f:A \to B \vdash \mathrm{isEquiv}(f):\mathrm{Type}_i} \qquad \frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma, f:A \to B \vdash \mathrm{defisEquiv}_{A, B}(f):\mathrm{isEquiv}(f) =_{\mathrm{Type}_i} \prod_{y:B} \exists!x:A.f(x) =_{B} y}
ΓA:Type iΓB:Type iΓAB:Type iΓA:Type iΓB:Type iΓdef AB:(AB)= Type i f:ABisEquiv(f)\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma \vdash A \simeq B:\mathrm{Type}_i} \qquad \frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma \vdash \mathrm{def}_{A \simeq B}:(A \simeq B) =_{\mathrm{Type}_i} \sum_{f:A \to B} \mathrm{isEquiv}(f)}

Univalence

The univalence axiom states that the identity type between two types of a universe is equivalent to the equivalence type between said types:

ΓA:Type iΓB:Type iΓua i(A,B):(A= Type iB)(AB)\frac{\Gamma \vdash A:\mathrm{Type}_i \quad \Gamma \vdash B:\mathrm{Type}_i}{\Gamma \vdash \mathrm{ua}_i(A, B):(A =_{\mathrm{Type}_i} B) \simeq (A \simeq B)}

Positive types

Now that we have the uniqueness quantifier we can combine the elimination rule, the computation rule, and the uniqueness rule for any positive type into one rule, the induction rule.

Unit type

Formation rules for the unit type:

ΓctxΓ𝟙:Type i\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathbb{1}:\mathrm{Type}_i}

Introduction rules for the unit type:

ΓctxΓpt:𝟙\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{pt}:\mathbb{1}}

Induction rule for the unit type:

Γ,x:𝟙C(x):Type iΓc pt:C(pt)Γup 𝟙 C(c pt):!c: x:𝟙C(x).(c(pt)= C(pt)c pt)\frac{\Gamma, x:\mathbb{1} \vdash C(x):\mathrm{Type}_i \quad \Gamma \vdash c_\mathrm{pt}:C(\mathrm{pt})}{\Gamma \vdash \mathrm{up}_\mathbb{1}^C(c_\mathrm{pt}):\exists!c:\prod_{x:\mathbb{1}} C(x).(c(\mathrm{pt}) =_{C(\mathrm{pt})} c_\mathrm{pt})}
Empty type

Formation rules for the empty type:

ΓctxΓ𝟘:Type i\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathbb{0}:\mathrm{Type}_i}

Induction rule for the empty type:

Γ,x:𝟘C(x):Type iΓup 𝟘 C:isContr( x:𝟘C(x))\frac{\Gamma, x:\mathbb{0} \vdash C(x):\mathrm{Type}_i}{\Gamma \vdash \mathrm{up}_\mathbb{0}^C:\mathrm{isContr}\left(\prod_{x:\mathbb{0}} C(x)\right)}
Booleans type

Formation rules for the booleans type:

ΓctxΓ𝟚:Type i\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathbb{2}:\mathrm{Type}_i}

Introduction rules for the booleans type:

ΓctxΓ0:𝟚ΓctxΓ1:𝟚\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash 0:\mathbb{2}} \qquad \frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash 1:\mathbb{2}}

Induction rule for the booleans type:

Γ,x:𝟚C(x):Type iΓc 0:C(0)Γc 1:C(1)Γup 𝟚 C(c 0,c 1):!c: x:𝟚C(x).(c(0)= C(0)c 0)×(c(1)= C(1)c 1)\frac{\Gamma, x:\mathbb{2} \vdash C(x):\mathrm{Type}_i \quad \Gamma \vdash c_0:C(0) \quad \Gamma \vdash c_1:C(1)}{\Gamma \vdash \mathrm{up}_\mathbb{2}^C(c_0, c_1):\exists!c:\prod_{x:\mathbb{2}} C(x).(c(0) =_{C(0)} c_0) \times (c(1) =_{C(1)} c_1)}
Natural numbers type

Formation rules for the natural numbers type:

ΓctxΓ:Type i\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathbb{N}:\mathrm{Type}_i}

Introduction rules for the natural numbers type:

ΓctxΓ0:ΓctxΓs:\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash 0:\mathbb{N}} \qquad \frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash s:\mathbb{N} \to \mathbb{N}}

Induction rule for the natural numbers type:

Γ,x:C(x):Type iΓc 0:C(0)Γc s: x:C(x)C(s(x))Γup C(c 0,c s):!c: x:C(x).(c(0)= C(0)c 0)× x:c(s(x))= C(s(x))c s(c(x))\frac{\Gamma, x:\mathbb{N} \vdash C(x):\mathrm{Type}_i \quad \Gamma \vdash c_0:C(0) \quad \Gamma \vdash c_s:\prod_{x:\mathbb{N}} C(x) \to C(s(x))}{\Gamma \vdash \mathrm{up}_\mathbb{N}^C(c_0, c_s):\exists!c:\prod_{x:\mathbb{N}} C(x).(c(0) =_{C(0)} c_0) \times \prod_{x:\mathbb{N}} c(s(x)) =_{C(s(x))} c_s(c(x))}

With a separate type judgment and type variables

In this section, we describe a formalization of propositional type theory using a type judgment, in the style of Rijke 2022, as well as type variables.

Judgments and contexts

This presentation of propositional type theory consists of the following judgments:

  • Type judgments, where we judge AA to be a type, AtypeA \; \mathrm{type}

  • Element judgments, where we judge aa to be an element of AA, a:Aa:A

  • Context judgments, where we judge Γ\Gamma to be a context, Γctx\Gamma \; \mathrm{ctx}.

Contexts are lists of type judgments and element judgments, et cetera, and are formalized by the rules for the empty context and extending the context by a type judgment and by an element judgment

()ctxΓctx(Γ,Atype)ctxΓctxΓAtype(Γ,a:A)ctx\frac{}{() \; \mathrm{ctx}} \qquad \frac{\Gamma \; \mathrm{ctx}}{(\Gamma, A \; \mathrm{type}) \; \mathrm{ctx}} \qquad \frac{\Gamma \; \mathrm{ctx} \quad \Gamma \vdash A \; \mathrm{type}}{(\Gamma, a:A) \; \mathrm{ctx}}

Variable rules

There are two additional structural rules in propositional type theory, the variable rule for types and elements.

The variable rule for types states that we may derive a type judgment if the type judgment is in the context already:

Γ,Atype,ΔctxΓ,Atype,ΔAtype\frac{\Gamma, A \; \mathrm{type}, \Delta \; \mathrm{ctx}}{\Gamma, A \; \mathrm{type}, \Delta \vdash A \; \mathrm{type}}

The variable rule for elements states that we may derive a element judgment if the element judgment is in the context already:

Γ,a:A,ΔctxΓ,a:A,Δa:A\frac{\Gamma, a:A, \Delta \; \mathrm{ctx}}{\Gamma, a:A, \Delta \vdash a:A}

Families of types and elements

A family of types is a type BB in the context of the element judgment x:Ax:A, x:ABtypex:A \vdash B \; \mathrm{type}, they are usually written as B(x)B(x) to indicate its dependence upon xx. Given a particular element a:Aa:A, the type B(a)B(a) is a type dependent upon a:Aa:A.

A family of elements is an element b:Bb:B in the context of the variable judgment x:Ax:A, x:Ab:Bx:A \vdash b:B. They are likewise usually written as b(x)b(x) to indicate its dependence upon xx. Given a particular element a:Aa:A, the element b(a)b(a) is an element dependent upon a:Aa:A.

A universal family of types is a type BB in the context of a type variable judgment XtypeX \; \mathrm{type}, XtypeBtypeX \; \mathrm{type} \vdash B \; \mathrm{type}, they are usually written as B(X)B(X) to indicate its dependence upon XX. Given a particular type AtypeA \; \mathrm{type}, the type B(A)B(A) is a type dependent upon AA.

A universal family of elements is an element b:Bb:B in the context of the type variable judgment XtypeX \; \mathrm{type}, Xtypeb:BX \; \mathrm{type} \vdash b:B. They are likewise usually written as b(X)b(X) to indicate its dependence upon xx. Given a particular type AtypeA \; \mathrm{type}, the element b(A)b(A) is an element dependent upon AtypeA \; \mathrm{type}.

Identity types

Formation rules for identity types:

ΓAtypeΓ,a:A,b:Aa= Abtype\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma, a:A, b:A \vdash a =_A b \; \mathrm{type}}

Introduction rules for identity types:

ΓAtypeΓ,x:Arefl A(x):x= Ax\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma, x:A \vdash \mathrm{refl}_A(x) : x =_A x}

Elimination rule for identity types:

Γ,x:A,y:A,p:x= AyC(x,y,p)typeΓ,x:A,t:C(x,x,refl A(x),y:A,p:x= Ay,Δ(x,t,y,p)ind = A(x,t,y,p):C(x,y,p)\frac{\Gamma, x:A, y:A, p:x =_A y \vdash C(x, y, p) \; \mathrm{type}}{\Gamma, x:A, t:C(x, x, \mathrm{refl}_A(x), y:A, p:x =_A y, \Delta(x, t, y, p) \vdash \mathrm{ind}_{=_A}(x, t, y, p):C(x, y, p)}

Computation rules for identity types:

Γ,x:A,y:A,p:x= Ay,Δ(x,y,p)C(x,y,p)typeΓ,x:A,t:C(x,x,refl A(x)β = A(x,t):ind = A(x,t,x,refl A(x))= C(x,x,refl A(x))t\frac{\Gamma, x:A, y:A, p:x =_A y, \Delta(x, y, p) \vdash C(x, y, p) \; \mathrm{type}}{\Gamma, x:A, t:C(x, x, \mathrm{refl}_A(x) \vdash \beta_{=_A}(x, t):\mathrm{ind}_{=_A}(x, t, x, \mathrm{refl}_A(x)) =_{C(x, x, \mathrm{refl}_A(x))} t}

Identity types between types

Formation rule for identity types between types:

ΓctxΓ,Atype,BtypeA=Btype\frac{\Gamma \; \mathrm{ctx}}{\Gamma, A \; \mathrm{type}, B \; \mathrm{type} \vdash A = B \; \mathrm{type}}

Introduction rule for identity types between types:

ΓctxΓ,Atyperefl(A):A=A\frac{\Gamma \; \mathrm{ctx}}{\Gamma, A \; \mathrm{type} \vdash \mathrm{refl}(A):A = A}

Elimination rule for identity types between types:

Γ,Atype,Btype,p:A=B,Δ(A,B,p)C(A,B,p)typeΓ,Atype,Δ(A,A,refl(A))t(A):C(A,A,refl(A))Γ,Atype,Btype,p:A=B,Δ(A,B,p)ind = C,t(A,B,p):C(A,B,p)\frac{\Gamma, A \; \mathrm{type}, B \; \mathrm{type}, p:A = B, \Delta(A, B, p) \vdash C(A, B, p) \; \mathrm{type} \quad \Gamma, A \; \mathrm{type}, \Delta(A, A, \mathrm{refl}(A)) \vdash t(A):C(A, A, \mathrm{refl}(A))}{\Gamma, A \; \mathrm{type}, B \; \mathrm{type}, p:A = B, \Delta(A, B, p) \vdash \mathrm{ind}_=^{C, t}(A, B, p):C(A, B, p)}

Computation rule for identity types between types

Γ,Atype,Btype,p:A=B,Δ(A,B,p)C(A,B,p)typeΓ,Atype,Δ(A,A,refl(A))t(A):C(A,A,refl(A))Γ,A;type,Δ(A,A,refl(A))β = C,t(A):ind = C(t,A,A,refl(A))= C(A,A,refl(A))t(A)\frac{\Gamma, A \; \mathrm{type}, B \; \mathrm{type}, p:A = B, \Delta(A, B, p) \vdash C(A, B, p) \; \mathrm{type} \quad \Gamma, A \; \mathrm{type}, \Delta(A, A, \mathrm{refl}(A)) \vdash t(A):C(A, A, \mathrm{refl}(A))}{\Gamma, A ; \mathrm{type}, \Delta(A, A, \mathrm{refl}(A)) \vdash \beta_{=}^{C, t}(A):\mathrm{ind}_=^{C}(t, A, A, \mathrm{refl}(A)) =_{C(A, A, \mathrm{refl}(A))} t(A)}

Definitions

Definitions of a symbol bb for the element a:Aa:A are made by using identity types between the symbol and element: def a,b:a= Ab\mathrm{def}_{a, b}:a =_A b. Definitions of a symbol BB for the type AA are made in the same way using identity types between types, as def A,B:A=B\mathrm{def}_{A, B}:A = B. Thus, the identity type behaves very similarly to explicit conversion as discussed in section 9.2 of Winterhalter 2020, even though we do not have universes here.

Dependent function types

Formation rules for dependent function types:

ΓAtypeΓ,x:AB(x)typeΓ x:AB(x)type\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma \vdash \prod_{x:A} B(x) \; \mathrm{type}}

Introduction rules for dependent function types:

ΓAtypeΓ,x:AB(x)typeΓ,x:Ab(x):B(x)Γλ(x:A).b(x): x:AB(x)\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma, x:A \vdash b(x):B(x)}{\Gamma \vdash \lambda(x:A).b(x):\prod_{x:A} B(x)}

Elimination rules for dependent function types:

ΓAtypeΓ,x:AB(x)typeΓ,f: x:AB(x),a:Aind x:AB(x)(f,a):B(a)\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma, f:\prod_{x:A} B(x), a:A \vdash \mathrm{ind}_{\prod_{x:A} B(x)}(f, a):B(a)}

Computation rules for dependent function types

ΓAtypeΓ,x:AB(x)typeΓ,x:Ab(x):B(x)Γβ x:AB(x) x:A.b(x): a:Aind x:AB(x)(λ(x:A).b(x),a)= B(a)b(a)\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \quad \Gamma, x:A \vdash b(x):B(x)}{\Gamma \vdash \beta_{\prod_{x:A} B(x)}^{x:A.b(x)}:\prod_{a:A} \mathrm{ind}_{\prod_{x:A} B(x)}(\lambda(x:A).b(x), a) =_{B(a)} b(a)}

Uniqueness rules for dependent function types:

ΓAtypeΓ,x:AB(x)typeΓ,f: x:AB(x)η x:AB(x)(f):f= x:AB(x)λ(x:A).ind x:AB(x)(f,x)\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma, f:\prod_{x:A} B(x) \vdash \eta_{\prod_{x:A} B(x)}(f):f =_{\prod_{x:A} B(x)} \lambda(x:A).\mathrm{ind}_{\prod_{x:A} B(x)}(f, x)}

Function types

Formation rules for function types:

ΓAtypeΓBtypeΓABtype\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma \vdash A \to B \; \mathrm{type}}

Introduction rules for function types:

ΓAtypeΓBtypeΓ,x:Ab(x):BΓλ(x:A).b(x):AB\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \quad \Gamma, x:A \vdash b(x):B}{\Gamma \vdash \lambda(x:A).b(x):A \to B}

Elimination rules for function types:

ΓAtypeΓBtypeΓ,f:AB,a:Aind AB(f,a):B\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma, f:A \to B, a:A \vdash \mathrm{ind}_{A \to B}(f, a):B}

Computation rules for function types

ΓAtypeΓBtypeΓ,x:Ab(x):BΓβ AB x:A.b(x): a:Aind AB(λ(x:A).b(x),a)= Bb(a)\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \quad \Gamma, x:A \vdash b(x):B}{\Gamma \vdash \beta_{A \to B}^{x:A.b(x)}:\prod_{a:A} \mathrm{ind}_{A \to B}(\lambda(x:A).b(x), a) =_{B} b(a)}

Uniqueness rules for function types:

ΓAtypeΓBtypeΓη AB: f:ABf= ABλ(x:A).ind AB(f,x)\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma \vdash \eta_{A \to B}:\prod_{f:A \to B} f =_{A \to B} \lambda(x:A).\mathrm{ind}_{A \to B}(f, x)}

Pair types

Formation rules for pair types:

ΓAtypeΓBtypeΓA×Btype\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma \vdash A \times B \; \mathrm{type}}

Introduction rules for pair types:

ΓAtypeΓBtypeΓ,x:A,y:Bin(x,y):A×B\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma, x:A, y:B \vdash \mathrm{in}(x, y):A \times B}

Elimination rules for pair types:

ΓAtypeΓBtypeΓ,z:A×Bind A×B A(z):AΓAtypeΓBtypeΓ,z:A×Bind A×B B(z):B\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma, z:A \times B \vdash \mathrm{ind}_{A \times B}^A(z):A} \qquad \frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma, z:A \times B \vdash \mathrm{ind}_{A \times B}^B(z):B}

Computation rules for pair types:

ΓAtypeΓBtypeΓ,x:A,y:Bβ A×B A(x,y):ind A×B A(in(x,y))= Ax\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma, x:A, y:B \vdash \beta_{A \times B}^A(x, y):\mathrm{ind}_{A \times B}^A(\mathrm{in}(x, y)) =_A x}
ΓAtypeΓBtypeΓ,x:A,y:Bβ A×B B(x,y):ind A×B B(in(x,y))= By\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma, x:A, y:B \vdash \beta_{A \times B}^B(x, y):\mathrm{ind}_{A \times B}^B(\mathrm{in}(x, y)) =_B y}

Uniqueness rules for pair types:

ΓAtypeΓBtypeΓ,z:A×Bη A×B(z):z= A×Bin(ind A×B A(z),ind A×B B(z))\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma, z:A \times B \vdash \eta_{A \times B}(z):z =_{A \times B} \mathrm{in}(\mathrm{ind}_{A \times B}^A(z), \mathrm{ind}_{A \times B}^B(z))}

Dependent pair types

Formation rules for dependent pair types:

ΓAtypeΓ,x:AB(x)typeΓ x:AB(x)type\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma \vdash \sum_{x:A} B(x) \; \mathrm{type}}

Introduction rules for dependent pair types:

ΓAtypeΓ,x:AB(x)typeΓ,x:A,y:B(x)in(x,y): x:AB(x)\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma, x:A, y:B(x) \vdash \mathrm{in}(x, y):\sum_{x:A} B(x)}

Elimination rules for dependent pair types:

ΓAtypeΓ,x:AB(x)typeΓind x:AB(x) A:( x:AB(x))AΓAtypeΓ,x:AB(x)typeΓind x:AB(x) B: z: x:AB(x)B(ind x:AB(x) A(z))\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma \vdash \mathrm{ind}_{\sum_{x:A} B(x)}^A:\left(\sum_{x:A} B(x)\right) \to A} \qquad \frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma \vdash \mathrm{ind}_{\sum_{x:A} B(x)}^B:\prod_{z:\sum_{x:A} B(x)} B(\mathrm{ind}_{\sum_{x:A} B(x)}^A(z))}

Computation rules for dependent pair types:

ΓAtypeΓ,x:AB(x)typeΓ,x:A,y:B(x)β x:AB(x) A(x,y):ind x:AB(x) A(in(x,y))= Ax\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma, x:A, y:B(x) \vdash \beta_{\sum_{x:A} B(x)}^A(x, y):\mathrm{ind}_{\sum_{x:A} B(x)}^A(\mathrm{in}(x, y)) =_A x}
ΓAtypeΓ,x:AB(x)typeΓ,x:A,y:B(x)β Σ(x:A).B(x) B(x,y):ind x:AB(x) B(in(x,y))= B(ind x:AB(x) A(in(x,y)))y\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma, x:A, y:B(x) \vdash \beta_{\Sigma(x:A).B(x)}^B(x, y):\mathrm{ind}_{\sum_{x:A} B(x)}^B(\mathrm{in}(x, y)) =_{B(\mathrm{ind}_{\sum_{x:A} B(x)}^A(\mathrm{in}(x, y)))} y}

Uniqueness rules for dependent pair types:

ΓAtypeΓ,x:AB(x)typeΓ,z: x:AB(x)η x:AB(x)(z):z= x:AB(x)in(ind x:AB(x)) A(z),ind x:AB(x) B(z))\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma, z:\sum_{x:A} B(x) \vdash \eta_{\sum_{x:A} B(x)}(z):z =_{\sum_{x:A} B(x)} \mathrm{in}(\mathrm{ind}_{\sum_{x:A} B(x))}^A(z), \mathrm{ind}_{\sum_{x:A} B(x)}^B(z))}

isContr, uniqueness quantifiers, isEquiv, and equivalence types

Now that we have identity types, identity types between types, dependent sum types, and dependent product types, we can use that to define

ΓAtypeΓisContr(A)typeΓAtypeΓdefisContr(A):isContr(A)= y:A z:Ay= Az\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{isContr}(A) \; \mathrm{type}} \qquad \frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{defisContr}(A):\mathrm{isContr}(A) = \sum_{y:A} \prod_{z:A} y =_{A} z}
ΓAtypeΓ,x:AB(x)typeΓ!x:A.B(x)typeΓAtypeΓ,x:AB(x)typeΓdef! x:A.B(x):!x:A.B(x)=isContr( x:AB(x))\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma \vdash \exists!x:A.B(x) \; \mathrm{type}} \qquad \frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type}}{\Gamma \vdash \mathrm{def}\exists!_{x:A.B(x)}:\exists!x:A.B(x) = \mathrm{isContr}\left(\sum_{x:A} B(x)\right)}
ΓAtypeΓBtypeΓ,f:ABisEquiv(f)typeΓAtypeΓBtypeΓ,f:ABdefisEquiv A,B(f):isEquiv(f)= y:B!x:A.f(x)= By\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma, f:A \to B \vdash \mathrm{isEquiv}(f) \; \mathrm{type}} \qquad \frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma, f:A \to B \vdash \mathrm{defisEquiv}_{A, B}(f):\mathrm{isEquiv}(f) = \prod_{y:B} \exists!x:A.f(x) =_{B} y}
ΓAtypeΓBtypeΓABtypeΓAtypeΓBtypeΓdef AB:(AB)= f:ABisEquiv(f)\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma \vdash A \simeq B \; \mathrm{type}} \qquad \frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma \vdash \mathrm{def}_{A \simeq B}:(A \simeq B) = \sum_{f:A \to B} \mathrm{isEquiv}(f)}

Univalence

The univalence axiom states that the identity type between two types is equivalent to the equivalence type between said types:

ΓAtypeΓBtypeΓua(A,B):(A=B)(AB)\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma \vdash \mathrm{ua}(A, B):(A = B) \simeq (A \simeq B)}

Positive types

Now that we have the uniqueness quantifier we can combine the elimination rule, the computation rule, and the uniqueness rule for any positive type into one rule, the induction rule.

Empty type

Formation rules for the empty type:

ΓctxΓ𝟘type\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathbb{0} \; \mathrm{type}}

Recursion rule for the empty type:

ΓCtypeΓup 𝟘 C:isContr(𝟘C)\frac{\Gamma \vdash C \; \mathrm{type}}{\Gamma \vdash \mathrm{up}_\mathbb{0}^C:\mathrm{isContr}\left(\mathbb{0} \to C\right)}

Induction rule for the empty type:

Γ,x:𝟘C(x)typeΓdup 𝟘 C:isContr( x:𝟘C(x))\frac{\Gamma, x:\mathbb{0} \vdash C(x) \; \mathrm{type}}{\Gamma \vdash \mathrm{dup}_\mathbb{0}^C:\mathrm{isContr}\left(\prod_{x:\mathbb{0}} C(x)\right)}
Unit type

Formation rules for the unit type:

ΓctxΓ𝟙type\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathbb{1} \; \mathrm{type}}

Introduction rules for the unit type:

ΓctxΓpt:𝟙\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{pt}:\mathbb{1}}

Recursion rule for the unit type:

ΓCtypeΓc pt:CΓup 𝟙 C(c pt):!c:𝟙C.(c(pt)= Cc pt)\frac{\Gamma \vdash C \; \mathrm{type} \quad \Gamma \vdash c_\mathrm{pt}:C}{\Gamma \vdash \mathrm{up}_\mathbb{1}^C(c_\mathrm{pt}):\exists!c:\mathbb{1} \to C.(c(\mathrm{pt}) =_{C} c_\mathrm{pt})}

Induction rule for the unit type:

Γ,x:𝟙C(x)typeΓc pt:C(pt)Γdup 𝟙 C(c pt):!c: x:𝟙C(x).(c(pt)= C(pt)c pt)\frac{\Gamma, x:\mathbb{1} \vdash C(x) \; \mathrm{type} \quad \Gamma \vdash c_\mathrm{pt}:C(\mathrm{pt})}{\Gamma \vdash \mathrm{dup}_\mathbb{1}^C(c_\mathrm{pt}):\exists!c:\prod_{x:\mathbb{1}} C(x).(c(\mathrm{pt}) =_{C(\mathrm{pt})} c_\mathrm{pt})}
Booleans type

Formation rules for the booleans type:

ΓctxΓ𝟚type\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathbb{2} \; \mathrm{type}}

Introduction rules for the booleans type:

ΓctxΓ0:𝟚ΓctxΓ1:𝟚\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash 0:\mathbb{2}} \qquad \frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash 1:\mathbb{2}}

Recursion rule for the booleans type:

ΓCtypeΓc 0:CΓc 1:CΓup 𝟚 C(c 0,c 1):!c:𝟚C.(c(0)= Cc 0)×(c(1)= Cc 1)\frac{\Gamma \vdash C \; \mathrm{type} \quad \Gamma \vdash c_0:C \quad \Gamma \vdash c_1:C}{\Gamma \vdash \mathrm{up}_\mathbb{2}^C(c_0, c_1):\exists!c:\mathbb{2} \to C.(c(0) =_{C} c_0) \times (c(1) =_{C} c_1)}

Induction rule for the booleans type:

Γ,x:𝟚C(x)typeΓc 0:C(0)Γc 1:C(1)Γdup 𝟚 C(c 0,c 1):!c: x:𝟚C(x).(c(0)= C(0)c 0)×(c(1)= C(1)c 1)\frac{\Gamma, x:\mathbb{2} \vdash C(x) \; \mathrm{type} \quad \Gamma \vdash c_0:C(0) \quad \Gamma \vdash c_1:C(1)}{\Gamma \vdash \mathrm{dup}_\mathbb{2}^C(c_0, c_1):\exists!c:\prod_{x:\mathbb{2}} C(x).(c(0) =_{C(0)} c_0) \times (c(1) =_{C(1)} c_1)}
Natural numbers type

Formation rules for the natural numbers type:

ΓctxΓtype\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathbb{N} \; \mathrm{type}}

Introduction rules for the natural numbers type:

ΓctxΓ0:ΓctxΓs:\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash 0:\mathbb{N}} \qquad \frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash s:\mathbb{N} \to \mathbb{N}}

Recursion rule for the natural numbers type:

ΓCtypeΓc 0:CΓc s:CCΓup C(c 0,c s):!c:C.(c(0)= Cc 0)× x:c(s(x))= Cc s(c(x))\frac{\Gamma \vdash C \; \mathrm{type} \quad \Gamma \vdash c_0:C \quad \Gamma \vdash c_s:C \to C}{\Gamma \vdash \mathrm{up}_\mathbb{N}^C(c_0, c_s):\exists!c:\mathbb{N} \to C.(c(0) =_{C} c_0) \times \prod_{x:\mathbb{N}} c(s(x)) =_{C} c_s(c(x))}

Induction rule for the natural numbers type:

Γ,x:C(x)typeΓc 0:C(0)Γc s: x:C(x)C(s(x))Γdup C(c 0,c s):!c: x:C(x).(c(0)= C(0)c 0)× x:c(s(x))= C(s(x))c s(c(x))\frac{\Gamma, x:\mathbb{N} \vdash C(x) \; \mathrm{type} \quad \Gamma \vdash c_0:C(0) \quad \Gamma \vdash c_s:\prod_{x:\mathbb{N}} C(x) \to C(s(x))}{\Gamma \vdash \mathrm{dup}_\mathbb{N}^C(c_0, c_s):\exists!c:\prod_{x:\mathbb{N}} C(x).(c(0) =_{C(0)} c_0) \times \prod_{x:\mathbb{N}} c(s(x)) =_{C(s(x))} c_s(c(x))}

 Categorical semantics

The fragment of propositional type theory consisting of only identity types and dependent product types can be interpreted in any path category with weak homotopy Π\Pi-types.

Open problems

There are plenty of questions which are currently unresolved in propositional type theory. Van der Berg and Besten listed the following problems:

Other problems include

See also open problems in homotopy type theory

 References

On quadratic type checking in propositional type theory:

Talks at Strength of Weak Type Theory, hosted by DutchCATS:

Project to convert extensional type theory to weak type theory:

Additional general dependent type theory references used for the formalizations of propositional type theory in this article:

Last revised on May 17, 2025 at 12:18:35. See the history of this page for a list of all contributions to it.