nLab strongly predicative dependent type theory

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

Foundations

foundations

The basis of it all

 Set theory

set theory

Foundational axioms

foundational axioms

Removing axioms

Contents

Idea

Dependent type theory is traditionally said to be a predicative foundations of mathematics. However, this is only the case if excluded middle is not assumed in the theory, because once excluded middle holds, then power sets are simply function types into the boolean domain resulting in an impredicative foundations of mathematics. Function types into the boolean domain are in most versions of dependent type theory.

The real problem here is with function types and dependent product type. These types are usually placed in the same type universe as the types from which they are formed from; i.e. if A:U iA:U_i and B:U iB:U_i, then AB:U iA \to B:U_i. For dependent type theory to remain predicative even in the presence of excluded middle, the function types and dependent product type have to lie in the next universe up; i.e. if A:U iA:U_i and B:U iB:U_i, AB:U i+1A \to B:U_{i+1}. Thus, the concept of a strongly predicative dependent type theory, which can implement strongly predicative mathematics.

In strongly predicative dependent type theory, the resulting universes of UU-small sets only form a arithmetic pretopos instead of a ΠW-pretopos. However, there have been some precedent in the existing literature of working in an arithmetic pretopos instead of a ΠW-pretopos. For example, Steve Vickers‘s program of geometric mathematics occurs informally inside of a Grothendieck topos and does not assume function types for topological reasons, and he has proposed a kind of geometric type theory as the internal logic of said Grothendieck topos (Vickers 2007, Vickers 2017, Vickers 2018, Vickers 2022). In addition, Ulrik Buchholtz and Johannes Schipp von Branitz have proposed a version of dependent type theory where the base universe U 0U_0 does not contain any function types or dependent product types, so that they can study primitive recursive arithmetic in the context of homotopy type theory (Buchholtz & von Branitz 2024).

Formal presentation

We present strongly predicative dependent type theory as a dependent type theory with a hierarchy of universes and no type judgment, in the manner of Book HoTT found in Univalent Foundations Project 2013. We also add the type theoretic axiom of replacement from Bezem et al 2021 and Rijke 2022, so that we have quotient sets in all universes.

The type theory has judgments for contexts

  • Γctx\Gamma \; \mathrm{ctx}, that Γ\Gamma is a context

 Universe levels and Peano arithmetic

Then we have judgments for universe levels and predicate logic:

  • ileveli \; \mathrm{level}, that ii is a universe level,

  • ϕprop\phi \; \mathrm{prop}, that ϕ\phi is a proposition,

  • ϕtrue\phi \; \mathrm{true}, that ϕ\phi is a true proposition,

and the formal signature and inference rules of first-order Heyting arithmetic or Peano arithmetic.

These rules ensure that there are an infinite number of indices, which are strictly ordered with strict total order <\lt and upwardly unbounded, where i<s(i)i \lt s(i) is true for all indices ii.

Typing judgments and Russell universes

Now, we introduce the typing judgment a:Aa:A, which says that aa is a term of the type AA. Instead of type judgments, we introduce a special kind of type called a Russell universe, whose terms are the types themselves. Russell universes are formalized with the following rules:

ΓilevelΓU i:U s(i)ΓilevelΓA:U iΓA:U s(i)\frac{\Gamma \vdash i \; \mathrm{level}}{\Gamma \vdash U_i:U_{s(i)}} \qquad \frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i}{\Gamma \vdash A:U_{s(i)}}

In addition, we have rules for contexts which state that one could add typing judgments to the list of contexts:

ΓilevelΓA:U i(Γ,a:A)ctx\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i}{(\Gamma, a:A) \; \mathrm{ctx}}

Structural rules

There are three structural rules in dependent type theory, the variable rule, the weakening rule, and the substitution rule.

The variable rule states that we may derive a typing judgment if the typing 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}

Let 𝒥\mathcal{J} be any arbitrary judgment. Then we have the following rules:

The weakening rule:

ΓilevelΓA:U iΓ,Δ𝒥Γ,a:A,Δ𝒥\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma, \Delta \vdash \mathcal{J}}{\Gamma, a:A, \Delta \vdash \mathcal{J}}

The substitution rule:

Γa:AΓ,b:A,Δ𝒥Γ,Δ[a/b]𝒥[a/b]\frac{\Gamma \vdash a:A \quad \Gamma, b:A, \Delta \vdash \mathcal{J}}{\Gamma, \Delta[a/b] \vdash \mathcal{J}[a/b]}

The weakening and substitution rules are admissible rules: they do not need to be explicitly included in the type theory as they could be proven by induction on the structure of all possible derivations.

Structural rules for judgmental equality

Judgmental equality has its own structural rules: introduction rules for judgmentally equal terms, reflexivity, symmetry, transitivity, the principle of substitution, and the variable conversion rule.

  • Introduction rules for judgmentally equal terms

    ΓilevelΓA:U iΓab:AΓa:A\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma \vdash a \equiv b:A}{\Gamma \vdash a:A}
    ΓilevelΓA:U iΓab:AΓb:A\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma \vdash a \equiv b:A}{\Gamma \vdash b:A}
  • Reflexivity of judgmental equality

    ΓilevelΓA:U iΓa:AΓaa:A\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma \vdash a:A}{\Gamma \vdash a \equiv a:A}
  • Symmetry of judgmental equality

    ΓilevelΓA:U iΓab:AΓba:A\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma \vdash a \equiv b:A}{\Gamma \vdash b \equiv a:A}
  • Transitivity of judgmental equality

    ΓilevelΓA:U iΓab:AΓbc:AΓac:A\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma \vdash a \equiv b:A \quad \Gamma \vdash b \equiv c:A}{\Gamma \vdash a \equiv c:A}
  • Principle of substitution:

    ΓilevelΓA:U iΓab:AΓ,x:A,Δc:BΓ,Δ[b/x]c[a/x]c[b/x]:B[b/x]\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma \vdash a \equiv b : A \quad \Gamma, x:A, \Delta \vdash c:B}{\Gamma, \Delta[b/x] \vdash c[a/x] \equiv c[b/x]: B[b/x]}
  • Variable conversion rule:

    ΓilevelΓAB:U iΓ,x:A,Δ𝒥Γ,x:B,Δ𝒥\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A \equiv B:U_i \quad \Gamma, x:A, \Delta \vdash \mathcal{J}}{\Gamma, x:B, \Delta \vdash \mathcal{J}}

We also have a rules saying that equality is preserved across universe levels:

ΓilevelΓjlevelΓi=jtrueΓU iU j:U s(i)\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash j \; \mathrm{level} \quad \Gamma \vdash i = j \; \mathrm{true}}{\Gamma \vdash U_i \equiv U_j:U_{s(i)}}

Dependent product types

The key difference in strongly predicative dependent type theory from the usual weakly predicative dependent type theory comes in the formation rule of dependent product types. Given types A:U iA:U_i and type family x:AB(x):U ix:A \vdash B(x):U_i, instead of lying in the universe level ii, the dependent product type instead lies in the next universe level U s(i)U_{s(i)}.

  • Formation rules for dependent product types:
ΓilevelΓA:U iΓ,x:AB:U iΓ x:AB(x):U s(i)\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma, x:A \vdash B:U_i}{\Gamma \vdash \prod_{x:A} B(x):U_{s(i)}}
  • Introduction rules for dependent product types:
Γ,x:Ab:BΓλ(x:A).b(x): x:AB(x)\frac{\Gamma, x:A \vdash b:B}{\Gamma \vdash \lambda(x:A).b(x):\prod_{x:A} B(x)}
  • Elimination rules for dependent product types:
Γf: x:AB(x)Γa:AΓf[a/x]:B[a/x]\frac{\Gamma \vdash f:\prod_{x:A} B(x) \quad \Gamma \vdash a:A}{\Gamma \vdash f[a/x]:B[a/x]}
  • Computation rules for dependent product types:
Γ,x:Ab:BΓa:AΓλ(x:A).b(x)[a/x]b[a/x]:B[a/x]\frac{\Gamma, x:A \vdash b:B \quad \Gamma \vdash a:A}{\Gamma \vdash \lambda(x:A).b(x)[a/x] \equiv b[a/x]:B[a/x]}
  • Uniqueness rules for dependent product types:
Γf: x:AB(x)Γfλ(x).f(x): x:AB(x)\frac{\Gamma \vdash f:\prod_{x:A} B(x)}{\Gamma \vdash f \equiv \lambda(x).f(x):\prod_{x:A} B(x)}

Dependent sum types

  • Formation rules for dependent sum types:
ΓilevelΓA:U iΓ,x:AB:U iΓ x:AB(x):U i\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma, x:A \vdash B:U_i}{\Gamma \vdash \sum_{x:A} B(x):U_i}
  • Introduction rules for dependent sum types:
Γ,x:Ab:BΓa:AΓb:B[a/x]Γ(a,b): x:AB(x)\frac{\Gamma, x:A \vdash b:B \quad \Gamma \vdash a:A \quad \Gamma \vdash b:B[a/x]}{\Gamma \vdash (a, b):\sum_{x:A} B(x)}
  • Elimination rules for dependent sum types:
Γz: x:AB(x)Γπ 1(z):AΓz: x:AB(x)Γπ 2(z):B[π 1(z)/x]\frac{\Gamma \vdash z:\sum_{x:A} B(x)}{\Gamma \vdash \pi_1(z):A} \qquad \frac{\Gamma \vdash z:\sum_{x:A} B(x)}{\Gamma \vdash \pi_2(z):B[\pi_1(z)/x]}
  • Computation rules for dependent sum types:
Γ,x:Ab:BΓa:AΓπ 1(a,b)a:AΓ,x:Ab:BΓa:AΓπ 2(a,b)b:B[π 1(a,b)/x]\frac{\Gamma, x:A \vdash b:B \quad \Gamma \vdash a:A}{\Gamma \vdash \pi_1(a, b) \equiv a:A} \qquad \frac{\Gamma, x:A \vdash b:B \quad \Gamma \vdash a:A}{\Gamma \vdash \pi_2(a, b) \equiv b:B[\pi_1(a, b)/x]}
  • Uniqueness rules for dependent sum types:
Γz: x:AB(x)Γz(π 1(z),π 2(z)): x:AB(x)\frac{\Gamma \vdash z:\sum_{x:A} B(x)}{\Gamma \vdash z \equiv (\pi_1(z), \pi_2(z)):\sum_{x:A} B(x)}

Resizing dependent products of dependent products

According to the formation rules of dependent product types, given a type A:U iA:U_i, and type families x:AB(x):U ix:A \vdash B(x):U_i, x:A,y:B(x)C(x,y):U ix:A, y:B(x) \vdash C(x, y):U_i, the dependent product type

x:A y:B(x)C(x,y)\prod_{x:A} \prod_{y:B(x)} C(x, y)

is in the universe level U i+2U_{i + 2}, because for each x:Ax:A, the dependent product type y:B(x)C(x,y)\prod_{y:B(x)} C(x, y) is already in the universe level U i+1U_{i + 1}. However, by currying (i.e. the induction principle of dependent sum types), the above type is equivalent to the dependent product type

z: x:AB(x)C(π 1(z),π 2(z))\prod_{z:\sum_{x:A} B(x)} C(\pi_1(z), \pi_2(z))

which is only in the universe level U i+1U_{i + 1}, since both the index type x:AB(x)\sum_{x:A} B(x) and each C(π 1(z),π 2(z))C(\pi_1(z), \pi_2(z)) for z: x:AB(x)z:\sum_{x:A} B(x) is in U iU_{i}. Thus, the equivalence of types induced by currying allows for the resizing of

x:A y:B(x)C(x,y)\prod_{x:A} \prod_{y:B(x)} C(x, y)

down to the universe level U i+1U_{i + 1}. By induction over the natural numbers, this is true of any finite list of dependent products of type families in U iU_i indexed by types in U iU_i.

Sum types

  • Formation rules for sum types:
ΓilevelΓA:U iΓB:U iΓA+B:U i\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma \vdash B:U_i}{\Gamma \vdash A + B:U_i}
  • Introduction rules for sum types:
Γa:AΓinl(a):A+BΓb:BΓinr(b):A+B\frac{\Gamma \vdash a:A}{\Gamma \vdash \mathrm{inl}(a):A + B} \qquad \frac{\Gamma \vdash b:B}{\Gamma \vdash \mathrm{inr}(b):A + B}
  • Elimination rules for sum types:
ΓilevelΓ,z:A+BC:U iΓ,x:Ac:C[inl(x)/z]Γ,y:Bd:C[inr(y)/z]Γe:A+BΓind A+B(z.C,x.c,y.d,e):C[e/z]\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma, z:A + B \vdash C:U_i \quad \Gamma, x:A \vdash c:C[\mathrm{inl}(x)/z] \quad \Gamma, y:B \vdash d:C[\mathrm{inr}(y)/z] \quad \Gamma \vdash e:A + B}{\Gamma \vdash \mathrm{ind}_{A + B}(z.C, x.c, y.d, e):C[e/z]}
  • Computation rules for sum types:
ΓilevelΓ,z:A+BC:U iΓ,x:Ac:C[inl(x)/z]Γ,y:Bd:C[inr(y)/z]Γa:AΓind A+B(z.C,x.c,y.d,inl(a))c[a/x]:C[inl(a)/z]\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma, z:A + B \vdash C:U_i \quad \Gamma, x:A \vdash c:C[\mathrm{inl}(x)/z] \quad \Gamma, y:B \vdash d:C[\mathrm{inr}(y)/z] \quad \Gamma \vdash a:A}{\Gamma \vdash \mathrm{ind}_{A + B}(z.C, x.c, y.d, \mathrm{inl}(a)) \equiv c[a/x]:C[\mathrm{inl}(a)/z]}
ΓilevelΓ,z:A+BC:U iΓ,x:Ac:C[inl(x)/z]Γ,y:Bd:C[inr(y)/z]Γb:AΓind A+B(z.C,x.c,y.d,inr(b))d[b/x]:C[inr(b)/z]\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma, z:A + B \vdash C:U_i \quad \Gamma, x:A \vdash c:C[\mathrm{inl}(x)/z] \quad \Gamma, y:B \vdash d:C[\mathrm{inr}(y)/z] \quad \Gamma \vdash b:A}{\Gamma \vdash \mathrm{ind}_{A + B}(z.C, x.c, y.d, \mathrm{inr}(b)) \equiv d[b/x]:C[\mathrm{inr}(b)/z]}

Empty type

  • Formation rules for the empty type:
ΓilevelΓ𝟘:U i\frac{\Gamma \vdash i \; \mathrm{level}}{\Gamma \vdash \mathbb{0}:U_i}
  • Elimination rules for the empty type:
ΓilevelΓ,x:𝟘C:U iΓp:𝟘Γind 𝟘(x.C,p):C[p/x]\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma, x:\mathbb{0} \vdash C:U_i \quad \Gamma \vdash p:\mathbb{0}}{\Gamma \vdash \mathrm{ind}_\mathbb{0}(x.C, p):C[p/x]}

Unit type

  • Formation rules for the unit type:
ΓilevelΓ𝟙:U i\frac{\Gamma \vdash i \; \mathrm{level}}{\Gamma \vdash \mathbb{1}:U_i}
  • Introduction rules for the unit type:
ΓctxΓ*:𝟙\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash *:\mathbb{1}}
  • Elimination rules for the unit type:
ΓilevelΓ,x:𝟙C:U iΓ,y:𝟙c[y/x]:C[y/x]Γp:𝟙Γind 𝟙(x.C,y.c,p):C[p/x]\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma, x:\mathbb{1} \vdash C:U_i \quad \Gamma, y:\mathbb{1} \vdash c[y/x]:C[y/x] \quad \Gamma \vdash p:\mathbb{1}}{\Gamma \vdash \mathrm{ind}_\mathbb{1}(x.C, y.c, p):C[p/x]}
  • Computation rules for the unit type:
ΓilevelΓ,x:𝟙C:U iΓ,y:𝟙c[y/x]:C[y/x]Γind 𝟙(x.C,y.c,*)c[*/x]:C[*/x]\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma, x:\mathbb{1} \vdash C:U_i \quad \Gamma, y:\mathbb{1} \vdash c[y/x]:C[y/x]}{\Gamma \vdash \mathrm{ind}_\mathbb{1}(x.C, y.c, *) \equiv c[*/x]:C[*/x]}

Natural numbers

  • Formation rules for the natural numbers:

    ΓilevelΓ:U i\frac{\Gamma \vdash i \; \mathrm{level}}{\Gamma \vdash \mathbb{N}:U_i}
  • Introduction rules for the natural numbers:

    ΓctxΓ0:Γn:Γs(n):\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash 0:\mathbb{N}} \qquad \frac{\Gamma \vdash n:\mathbb{N}}{\Gamma \vdash s(n):\mathbb{N}}
  • Elimination rules for the natural numbers:

    ΓilevelΓ,x:C:U iΓc 0:C[0/x]Γ,x:,y:Cc s:C[s(x)/x]Γn:Γind (x.C,c 0,x.y.c s,n):C[n/x]\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma, x:\mathbb{N} \vdash C:U_i \quad \Gamma \vdash c_0:C[0/x] \quad \Gamma, x:\mathbb{N}, y:C \vdash c_s:C[s(x)/x] \quad \Gamma \vdash n:\mathbb{N}}{\Gamma \vdash \mathrm{ind}_\mathbb{N}(x.C, c_0, x.y.c_s, n):C[n/x]}
  • Computation rules for the natural numbers:

    ΓilevelΓ,x:C:U iΓc 0:C[0/x]Γ,x:,y:Cc s:C[s(x)/x]Γind (x.C,c 0,x.y.c s,0)c 0:C[0/x]\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma, x:\mathbb{N} \vdash C:U_i \quad \Gamma \vdash c_0:C[0/x] \quad \Gamma, x:\mathbb{N}, y:C \vdash c_s:C[s(x)/x]}{\Gamma \vdash \mathrm{ind}_\mathbb{N}(x.C, c_0, x.y.c_s, 0) \equiv c_0:C[0/x]}
ΓilevelΓ,x:C:U iΓc 0:C[0/x]Γ,x:,y:Cc s:C[s(x)/x]Γind (x.C,c 0,x.y.c s,s(n)c s(n,ind (x.C,c 0,x.y.c s,n)):C[s(n)/x]\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma, x:\mathbb{N} \vdash C:U_i \quad \Gamma \vdash c_0:C[0/x] \quad \Gamma, x:\mathbb{N}, y:C \vdash c_s:C[s(x)/x]}{\Gamma \vdash \mathrm{ind}_\mathbb{N}(x.C, c_0, x.y.c_s, s(n) \equiv c_s(n, \mathrm{ind}_\mathbb{N}(x.C, c_0, x.y.c_s, n)):C[s(n)/x]}

Identity types

There is another version of equality in dependent type theory, called typal equality. Typal equality is represented by the identity type.

  • Formation rule for identity types:

    ΓilevelΓA:U iΓa:AΓb:AΓa= Ab:U i\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma \vdash a:A \quad \Gamma \vdash b:A}{\Gamma \vdash a =_A b:U_i}
  • Introduction rule for identity types:

    ΓilevelΓA:U iΓa:AΓrefl A(a):a= Aa\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma \vdash a:A}{\Gamma \vdash \mathrm{refl}_A(a) : a =_A a}
  • Elimination rule for identity types:

    ΓilevelΓ,x:A,y:A,p:a= AbC:U iΓ,z:At:C[z/a,z/b,refl A(z)/p]Γa:AΓb:AΓq:a= AbΓJ(x,y,p.C,z.t,a,b,q):C[a,b,q/x,y,p]\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma, x:A, y:A, p:a =_A b \vdash C:U_i \quad \Gamma, z:A \vdash t:C[z/a, z/b, \mathrm{refl}_A(z)/p] \quad \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash q:a =_A b}{\Gamma \vdash J(x,y,p.C, z.t, a, b, q):C[a, b, q/x, y, p]}
  • Computation rules for identity types:

    ΓilevelΓ,x:A,y:A,p:a= AbC:U iΓ,z:At:C[z/a,z/b,refl A(z)/p]Γa:AΓJ(x.y.p.C,z.t,a,a,refl(a))t:C[a,a,refl A(a)/x,y,p]\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma, x:A, y:A, p:a =_A b \vdash C:U_i \quad \Gamma, z:A \vdash t:C[z/a, z/b, \mathrm{refl}_A(z)/p] \quad \Gamma \vdash a:A}{\Gamma \vdash J(x.y.p.C, z.t, a, a, \mathrm{refl}(a)) \equiv t:C[a, a, \mathrm{refl}_A(a)/x, y, p]}

Propositional truncations

  • Formation rules for propositional truncations:
ΓA:U iΓ[A]:U i\frac{\Gamma \vdash A:U_i}{\Gamma \vdash [A]:U_i}
  • Introduction rules for propositional truncations:
ΓA:U iΓ,x:A[x]:[A]\frac{\Gamma \vdash A:U_i}{\Gamma, x:A \vdash [x]:[A]}
ΓA:U iΓ,x:A,y:Atrunc A(x,y):[x]= [A][y]\frac{\Gamma \vdash A:U_i}{\Gamma, x:A, y:A \vdash \mathrm{trunc}_A(x, y):[x] =_{[A]} [y]}
  • Elimination rules for propositional truncations:
ΓA:U iΓ,x:AB(x):U iΓ,x:A,y:B(x),z:B(x)p(x,y,z):y= B(x)zΓ,x:Af(x):B([x])Γ,x:[A]ind [A](B,p,f,x):B(x)\frac{\Gamma \vdash A:U_i \quad \Gamma, x:A \vdash B(x):U_i \quad \Gamma, x:A, y:B(x), z:B(x) \vdash p(x, y, z):y =_{B(x)} z \quad \Gamma, x:A \vdash f(x):B([x])}{\Gamma, x:[A] \vdash \mathrm{ind}_{[A]}(B, p, f, x):B(x)}
  • Computation rules for propositional truncations:
ΓA:U iΓ,x:AB(x):U iΓ,x:A,y:B(x),z:B(x)p(x,y,z):y= B(x)zΓ,x:Af(x):B([x])Γa:AΓind [A](B,p,f,[a])f(a):B([a])\frac{\Gamma \vdash A:U_i \quad \Gamma, x:A \vdash B(x):U_i \quad \Gamma, x:A, y:B(x), z:B(x) \vdash p(x, y, z):y =_{B(x)} z \quad \Gamma, x:A \vdash f(x):B([x]) \quad \Gamma \vdash a:A}{\Gamma \vdash \mathrm{ind}_{[A]}(B, p, f, [a]) \equiv f(a):B([a])}

Univalence

Given types A:U iA:U_i and B:U iB:U_i, a function f:ABf:A \to B is an equivalence of types if the fiber of ff at each element of BB has exactly one element. The property of the type AA having exactly one element is represented by the isContr modality which states that the type AA is contractible. The fiber of ff at an element b:Bb:B is given by the type

b:Bf(a)= Bb\sum_{b:B} f(a) =_B b

We formally define the property of RR being a one-to-one correspondence or an equivalence of types as the type:

isEquiv A,B(f) b:BisContr( a:Af(a)= Bb)\mathrm{isEquiv}_{A, B}(f) \coloneqq \prod_{b:B} \mathrm{isContr}\left(\sum_{a:A} f(a) =_B b\right)

We define the type of equivalences from AA to BB as

AB f:ABisEquiv A,B(f)A \simeq B \coloneqq \sum_{f:A \to B} \mathrm{isEquiv}_{A, B}(f)

There is a function

idtoequiv A,B:(A= U iB)(AB)\mathrm{idtoequiv}_{A, B}:(A =_{U_i} B) \to (A \simeq B)

which is inductively defined on reflexivity to be the identity function on AA

idtoequiv A,A(refl U i(A))id A\mathrm{idtoequiv}_{A, A}(\mathrm{refl}_{U_i}(A)) \equiv id_A

Note that both A= U iBA =_{U_i} B and ABA \simeq B lie in the universe U i+1U_{i + 1} in strongly predicative dependent type theory.

The univalence axiom then states that idtoequiv A,B\mathrm{idtoequiv}_{A, B} is an equivalence for all external natural numbers i𝒩i \in \mathcal{N} and types A:U iA:U_i and B:U iB:U_i:

ΓilevelΓA:U iΓB:U iΓua U i(A,B):isEquiv A= U iB,AB(idtoequiv A,B)\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma \vdash B:U_i}{\Gamma \vdash \mathrm{ua}_{U_i}(A, B):\mathrm{isEquiv}_{A =_{U_i} B, A \simeq B}(\mathrm{idtoequiv}_{A, B})}

Replacement

The image of a function x:Af(x):Bx:A \vdash f(x):B is given by the type

im(f) y:B[ x:Af(x)= By]\mathrm{im}(f) \coloneqq \sum_{y:B} \left[\sum_{x:A} f(x) =_B y\right]

The type theoretic axiom of replacement states that for all universe levels ii, for every essentially U i U_i -small type AA, every locally U i U_i -small type BB, and every function x:Af(x):Bx:A \vdash f(x):B, the image im(f)\mathrm{im}(f) is essentially U iU_i-small. From the axiom of replacement one can construct quotient sets in all U iU_i, cf. section 2.22.9 of Bezam et al 2021.

Thus, the h-sets in each U iU_i form an arithmetic pretopos.

Excluded middle

The law of excluded middle can be formulated in strongly predicative dependent type theory as the following: that for each universe level ii, the canonical embedding of the boolean domain 𝟚\mathbb{2} into the type of U i U_i -small propositions, which takes 0:𝟚0:\mathbb{2} to the empty type and 1:𝟚1:\mathbb{2} to the unit type, is an equivalence of types.

Thus, with excluded middle, the h-sets in each U iU_i form an arithmetic Boolean pretopos and the univeres U iU_i themselves correspond to the regular cardinals in set theory.

 References

Some discussion about a dependent type theory whose dependent function types reside in the next universe level appeared in:

  • One universe as a foundation & friends, Category Theory Zulip (web)

Created on December 20, 2024 at 16:58:27. See the history of this page for a list of all contributions to it.