natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory
constructive mathematics, realizability, computability
propositions as types, proofs as programs, computational trinitarianism
basic constructions:
strong axioms
further
In type theory, there is a principle known as propositions as types, which says that propositions and types are essentially the same: a proposition is identified with the type of all its proofs, and a type is identified with the proposition that it has a term.
However, this principle fails in many models of dependent type theory, including the most widely used frameworks of type theories, such as Martin-Löf type theory and cubical type theory, and the homotopy type theories based upon the two frameworks. Instead, they follow the weaker propositions as some types principle: while every proposition is interpreted as a type, not every type is interpreted as a proposition: only the (-1)-truncated types are interpreted as propositions (see h-proposition for more details).
In this article, we create a dependent type theory where the full propositions as types principle holds: every type is an h-proposition. In particular, proofs have equality propositions, represented by the identity types, and every proposition is propositionally truncated, represented in this article by two rules equivalent to two definitions of isProp in dependent type theory. In addition, we add rules for the empty type corresponding to false, the unit type corresponding to true, sum types corresponding to disjunction, product types corresponding to conjunction, function types corresponding to implication, as well as negations to the dependent type theory, yielding a model of intuitionistic propositional logic. Finally, adding excluded middle or the double negation law yields a model of classical propositional logic.
The dependent type theory we shall be presenting here is similar to objective type theory of Benno van den Berg and Martijn den Besten, in that it doesn’t have definitional equality. The lack of definitional equality means that the theory is both simpler, and behaves more like traditional propositional logic, which usually also doesn’t have definitional equality.
The dependent type theory model of propositional logic consists of three judgments: proposition judgments $A \; \mathrm{prop}$, where we judge $A$ to be a proposition, proof judgments, where we judge $a$ to be a proof of $A$, $a:A$, and context judgments, where we judge $\Gamma$ to be a context, $\Gamma \; \mathrm{ctx}$. Contexts are lists of proof judgments $a:A$, $b:B$, $c:C$, et cetera, and are formalized by the rules for the empty context and extending the context by a proof judgment
The structural rules of this theory include the variable rule?, the weakening rule, and the substitution rule.
The variable rule states that we may derive a proof judgment if the proof judgment is in the context already:
Let $\mathcal{J}$ 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.
A dependent proposition is a proposition $B$ in the context of the variable judgment $x:A$, $x:A \vdash B \; \mathrm{prop}$, they are sometimes written as $B(x)$. A dependent proof is a proof $b:B$ in the context of the variable judgment $x:A$, $x:A \vdash b:B$. dependent proofs are likewise sometimes written as $b(x)$.
Equality of proofs of a proposition is represented by a proposition. This in other dependent type theories is called a identity type or a path type. Equality of proofs comes with a formation rule, an introduction rule, an elimination rule, and a computation rule:
Formation rule for equality of proofs:
Introduction rule for equality of proofs:
Elimination rule for equality of proofs:
Computation rules for equality of proofs:
One also adds the propositional truncation rule for propositions:
One could equivalently adds the point contraction rule for propositions with a proof:
which states that the given proof is a center of contraction.
Both rules ensure that every proposition behaves like an h-proposition in dependent type theory.
The proposition false is the empty type in dependent type theory; thus the rules for false are the same as the rules for the empty type in other dependent type theories.
Formation rules for false:
Elimination rules for false:
Uniqueness rules for false:
The proposition true is the unit type in dependent type theory; thus the rules for true are the same as the rules for the unit type in other dependent type theories.
Formation rules for true:
Introduction rules for true:
Elimination rules for true:
Computation rules for true:
Uniqueness rules for true:
The disjunction of two propositions is represented by the sum type in dependent type theory. However, in other dependent type theories, while it isn’t possible to prove that the sum type of two h-propositions is indeed a h-proposition, the requirement that all types be propositionally truncated in propositional logic means that the disjunction of two propositions is a propositional truncation. In particular, the sum type of the unit type with itself is the booleans type, but the equivalent of the booleans type in propositional logic, the disjunction of true with itself, is a proposition because of propositional truncation, and can be proven to be equivalent to true.
Formation rules for disjunctions:
Introduction rules for disjunctions:
Elimination rules for disjunctions:
Computation rules for disjunctions:
Uniqueness rules for disjunctions:
The conjunction of two propositions is the product type in dependent type theory; thus the rules for conjunctions are the same as the rules for the product type in other dependent type theories.
Formation rules for conjunctions:
Introduction rules for conjunctions:
Elimination rules for conjunctions:
Computation rules for conjunctions:
Uniqueness rules for conjunctions:
The implication of two propositions is the function type in dependent type theory; thus the rules for implications are the same as the rules for the product type in other dependent type theories.
Formation rules for implications:
Introduction rules for implications:
Elimination rules for implications:
Computation rules for implications:
Uniqueness rules for implications:
A negation is just an implication of false. However, we introduce separate rules for negations specifically for the use of the notation $\neg A$ rather than the longer $A \implies \bot$.
Formation rules for negations:
Introduction rules for negations:
Elimination rules for negations:
Computation rules for negations:
Uniqueness rules for negations:
The above rules makes the dependent type theory into a model of intuitionistic propositional logic.
A proposition $A$ is said to be decidable or satisfy excluded middle if there is a proof $p:A \vee \neg A$. $A$ is said to be stable or satisfy the double negation law if there is a proof $p:\neg \neg A \implies A$. Every decidable propositions is stable, and every stable proposition is decidable, which means that the two notions are equivalent to each other.
If every proposition is decidable or stable, then the dependent type theory is a model of classical propositional logic. One could add one of the following rules to make the propositional logic classical:
The categorical semantics of intuitionistic propositional logic is a (0,1)-category which is closed under finite products, finite coproducts, and internal homs, or equivalently, a Heyting algebra. If the propositional logic is classical, then the categorical semantics is a Boolean algebra.
In the same way that propositional logic could be expressed as a dependent type theory, typed predicate logic could also be expressed as a type theory with two layers, a layer of ‘types’ which is the usual type theory, and a layer of propositional logic over the type layer.
Thus, in addition to the theory above, we also have the judgments $A \; \mathrm{type}$ and $a \in A$, as well as similar rules for judgments and contexts
We also have the variable, weakening and substitution structural rules for types which are in the same format as the structural rules for propositions.
A predicate is defined in the usual manner, as a proposition in the context of a term of a type
and the predicate $P$ is usually written as $P(x)$ to indicate its dependence upon the variable $x \in A$.
A predicate proof is a proof of a proposition in the context of a term of a type
and the proof $p:P$ is similarly written as $p(x):P(x)$ to indicate its dependence upon the variable $x \in A$.
In this model of predicate logic, universal quantification is represented by a variant of the dependent product type where the dependent type hypothesis in the usual dependent product type in dependent type theory is replaced by a predicate hypothesis.
Formation rules for the universal quantifier:
Introduction rules for the universal quantifier:
Elimination rules for the universal quantifier:
Computation rules for the universal quantifier:
Uniqueness rules for the universal quantifier:
Similarly, existential quantification is represented by a variant of the dependent sum type where the dependent type hypothesis in the usual dependent sum type in dependent type theory is replaced by a predicate hypothesis. In the same way that sum types are always propositionally truncated in propositional logic as a dependent type theory, existential quantification is similarly always propositionally truncated, due to the rules of propositional logic.
Formation rules for the existential quantifier:
Introduction rules for the existential quantifier:
Elimination rules for the existential quantifier:
Computation rules for the existential quantifier:
Uniqueness rules for the existential quantifier:
In modern presentations of this subject, typed predicate logic usually comes with a notion of equality on the types. Equality of types is a proposition, and is represented here by $\equiv$ to indicate it is an equivalence relation. It is defined by the following rules:
In all forms of dependent type theory with identity types, dependent product types, dependent sum types, empty types, unit types, sum types, and propositional truncations, propositional logic and predicate logic could be internalized in the type theory itself through the definition of a univalent type of propositions in the type theory.
Per Martin-Löf, Intuitionistic Type Theory, Notes by Giovanni Sambin of a series of lectures given in Padua, June 1980. Bibliopolis, Napoli, 1984.
Univalent Foundations Project, Homotopy Type Theory – Univalent Foundations of Mathematics (web, pdf, PM wiki version)
Benno van den Berg, Martijn den Besten, Quadratic type checking for objective type theory (arXiv:2102.00905)
Last revised on December 19, 2022 at 20:06:02. See the history of this page for a list of all contributions to it.