Contents
Context
Type theory
Deduction and Induction
Constructivism, Realizability, Computability
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
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
Advantages of having judgmental definitional equality include
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 in the theory represents -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 as the successor of the succcessor of zero in the natural numbers type, one could postulate an identification . On the other hand, the situation for types is a bit more complicated. For example, the isProp modality in dependent type theory indicating whether the type is a mere proposition is usually defined to be . But without judgmental equality, one cannot simply write
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
for types and .
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 , where we then have
- One can postulate a type of equivalences as a record type with propositional computation rules, where we then have
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 to be an element of ,
-
Context judgments, where we judge to be a context, .
In addition, we have a countably infinite number of inference rules for the countably infinite number of Russell universes in the theory, here represented by a natural numbers metavariable for conciseness:
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:
Contexts are lists of element judgments , , , et cetera, and are formalized by the inference rules for the empty context and extending the context by a element judgment
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:
Families of types and elements
A family of elements is an element in the context of the variable judgment , . They are usually written as to indicate its dependence upon . Given a particular element , the element is an element dependent upon .
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:
Introduction rules for identity types:
Elimination rule for identity types:
Computation rules for identity types:
Definitions
Definitions of a symbol for the element are made by using identity types between the symbol and element: . Definitions of a symbol for the type are made in the same way, as . 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:
Introduction rules for dependent function types:
Elimination rules for dependent function types:
Computation rules for dependent function types
Uniqueness rules for dependent function types:
Function types
Formation rules for function types:
Introduction rules for function types:
Elimination rules for function types:
Computation rules for function types
Uniqueness rules for function types:
Pair types
Formation rules for pair types:
Introduction rules for pair types:
Elimination rules for pair types:
Computation rules for pair types:
Uniqueness rules for pair types:
Dependent pair types
Formation rules for dependent pair types:
Introduction rules for dependent pair types:
Elimination rules for dependent pair types:
Computation rules for dependent pair types:
Uniqueness rules for dependent pair types:
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
Univalence
The univalence axiom states that the identity type between two types of a universe is equivalent to the equivalence type between said types:
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:
Introduction rules for the unit type:
Induction rule for the unit type:
Empty type
Formation rules for the empty type:
Induction rule for the empty type:
Booleans type
Formation rules for the booleans type:
Introduction rules for the booleans type:
Induction rule for the booleans type:
Natural numbers type
Formation rules for the natural numbers type:
Introduction rules for the natural numbers type:
Induction rule for the natural numbers type:
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 to be a type,
-
Element judgments, where we judge to be an element of ,
-
Context judgments, where we judge to be a context, .
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
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:
The variable rule for elements states that we may derive a element judgment if the element judgment is in the context already:
Families of types and elements
A family of types is a type in the context of the element judgment , , they are usually written as to indicate its dependence upon . Given a particular element , the type is a type dependent upon .
A family of elements is an element in the context of the variable judgment , . They are likewise usually written as to indicate its dependence upon . Given a particular element , the element is an element dependent upon .
A universal family of types is a type in the context of a type variable judgment , , they are usually written as to indicate its dependence upon . Given a particular type , the type is a type dependent upon .
A universal family of elements is an element in the context of the type variable judgment , . They are likewise usually written as to indicate its dependence upon . Given a particular type , the element is an element dependent upon .
Identity types
Formation rules for identity types:
Introduction rules for identity types:
Elimination rule for identity types:
Computation rules for identity types:
Identity types between types
Formation rule for identity types between types:
Introduction rule for identity types between types:
Elimination rule for identity types between types:
Computation rule for identity types between types
Definitions
Definitions of a symbol for the element are made by using identity types between the symbol and element: . Definitions of a symbol for the type are made in the same way using identity types between types, as . 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:
Introduction rules for dependent function types:
Elimination rules for dependent function types:
Computation rules for dependent function types
Uniqueness rules for dependent function types:
Function types
Formation rules for function types:
Introduction rules for function types:
Elimination rules for function types:
Computation rules for function types
Uniqueness rules for function types:
Pair types
Formation rules for pair types:
Introduction rules for pair types:
Elimination rules for pair types:
Computation rules for pair types:
Uniqueness rules for pair types:
Dependent pair types
Formation rules for dependent pair types:
Introduction rules for dependent pair types:
Elimination rules for dependent pair types:
Computation rules for dependent pair types:
Uniqueness rules for dependent pair types:
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
Univalence
The univalence axiom states that the identity type between two types is equivalent to the equivalence type between said types:
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:
Recursion rule for the empty type:
Induction rule for the empty type:
Unit type
Formation rules for the unit type:
Introduction rules for the unit type:
Recursion rule for the unit type:
Induction rule for the unit type:
Booleans type
Formation rules for the booleans type:
Introduction rules for the booleans type:
Recursion rule for the booleans type:
Induction rule for the booleans type:
Natural numbers type
Formation rules for the natural numbers type:
Introduction rules for the natural numbers type:
Recursion rule for the natural numbers type:
Induction rule for the natural numbers type:
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 -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:
-
Daniël Otten, Models for Propositional Type Theory (11 May 2023) [slides pdf]
-
Théo Winterhalter, A conservative and constructive translation from extensional type theory to weak type theory, 11 May 2023. (slides)
-
Sam Speight, Higher-Dimensional Realizability for Intensional Type Theory, 11 May 2023. (slides)
-
Matteo Spadetto, Weak type theories: a conservativity result for homotopy elementary types (12 May 2023) [slides pdf]
-
Benno van den Berg, Towards homotopy canonicity for propositional type theory, 12 May 2023. (slides)
-
Rafaël Bocquet, Towards coherence theorems for equational extensions of type theories, 12 May 2023. (slides)
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: