Context
Type theory
Foundations
foundations
The basis of it all
-
mathematical logic
-
deduction system, natural deduction, sequent calculus, lambda-calculus, judgment
-
type theory, simple type theory, dependent type theory
-
collection, object, type, term, set, element
-
equality, judgmental equality, typal equality
-
universe, size issues
-
higher-order logic
Set theory
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 and , then . 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 and , . 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 -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 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).
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
- , that is a context
Universe levels and Peano arithmetic
Then we have judgments for universe levels and predicate logic:
-
, that is a universe level,
-
, that is a proposition,
-
, that 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 and upwardly unbounded, where is true for all indices .
Typing judgments and Russell universes
Now, we introduce the typing judgment , which says that is a term of the type . 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:
In addition, we have rules for contexts which state that one could add typing judgments to the list of contexts:
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:
Let be any arbitrary judgment. Then we have the following rules:
The weakening rule:
The substitution rule:
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
-
Reflexivity of judgmental equality
-
Symmetry of judgmental equality
-
Transitivity of judgmental equality
-
Principle of substitution:
-
Variable conversion rule:
We also have a rules saying that equality is preserved across universe levels:
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 and type family , instead of lying in the universe level , the dependent product type instead lies in the next universe level .
- Formation rules for dependent product types:
- Introduction rules for dependent product types:
- Elimination rules for dependent product types:
- Computation rules for dependent product types:
- Uniqueness rules for dependent product types:
Dependent sum types
- Formation rules for dependent sum types:
- Introduction rules for dependent sum types:
- Elimination rules for dependent sum types:
- Computation rules for dependent sum types:
- Uniqueness rules for dependent sum types:
Resizing dependent products of dependent products
According to the formation rules of dependent product types, given a type , and type families , , the dependent product type
is in the universe level , because for each , the dependent product type is already in the universe level . However, by currying (i.e. the induction principle of dependent sum types), the above type is equivalent to the dependent product type
which is only in the universe level , since both the index type and each for is in . Thus, the equivalence of types induced by currying allows for the resizing of
down to the universe level . By induction over the natural numbers, this is true of any finite list of dependent products of type families in indexed by types in .
Sum types
- Formation rules for sum types:
- Introduction rules for sum types:
- Elimination rules for sum types:
- Computation rules for sum types:
Empty type
- Formation rules for the empty type:
- Elimination rules for the empty type:
Unit type
- Formation rules for the unit type:
- Introduction rules for the unit type:
- Elimination rules for the unit type:
- Computation rules for the unit type:
Natural numbers
-
Formation rules for the natural numbers:
-
Introduction rules for the natural numbers:
-
Elimination rules for the natural numbers:
-
Computation rules for the natural numbers:
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:
-
Introduction rule for identity types:
-
Elimination rule for identity types:
-
Computation rules for identity types:
Propositional truncations
- Formation rules for propositional truncations:
- Introduction rules for propositional truncations:
- Elimination rules for propositional truncations:
- Computation rules for propositional truncations:
Univalence
Given types and , a function is an equivalence of types if the fiber of at each element of has exactly one element. The property of the type having exactly one element is represented by the isContr modality which states that the type is contractible. The fiber of at an element is given by the type
We formally define the property of being a one-to-one correspondence or an equivalence of types as the type:
We define the type of equivalences from to as
There is a function
which is inductively defined on reflexivity to be the identity function on
Note that both and lie in the universe in strongly predicative dependent type theory.
The univalence axiom then states that is an equivalence for all external natural numbers and types and :
Replacement
The image of a function is given by the type
The type theoretic axiom of replacement states that for all universe levels , for every essentially -small type , every locally -small type , and every function , the image is essentially -small. From the axiom of replacement one can construct quotient sets in all , cf. section 2.22.9 of Bezam et al 2021.
Thus, the h-sets in each 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 , the canonical embedding of the boolean domain into the type of -small propositions, which takes to the empty type and to the unit type, is an equivalence of types.
Thus, with excluded middle, the h-sets in each form an arithmetic Boolean pretopos and the univeres themselves correspond to the regular cardinals in set theory.
References
-
Steve Vickers, Locales and toposes as spaces, Chapter 8 in Handbook of Spatial Logics (ed. Aiello, Pratt-Hartman, van Bentham), Springer, 2007, pp. 429-496.
-
Steve Vickers, Arithmetic universes and classifying toposes, Cahiers de topologie et géométrie différentielle catégorique 58 (4) (2017), pp. 213-248 (pdf)
-
Steve Vickers, Sketches for arithmetic universes, accepted 2018 for Journal of Logic and Analysis (pdf)
-
Steve Vickers, Generalized point-free spaces, pointwise [arXiv:2206.01113]
-
Ulrik Buchholtz, Johannes Schipp von Branitz, Primitive Recursive Dependent Type Theory (arXiv:2404.01011)
-
Homotopy Type Theory: Univalent Foundations of Mathematics, The Univalent Foundations Project, Institute for Advanced Study, 2013. (web, pdf)
-
Marc Bezem, Ulrik Buchholtz, Pierre Cagne, Bjørn Ian Dundas, Daniel R. Grayson, Section 2.19 in: Symmetry (2021) pdf
-
Egbert Rijke, Introduction to Homotopy Type Theory, Cambridge Studies in Advanced Mathematics, Cambridge University Press (arXiv:2212.11082)
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)