Context
Type theory
Constructivism, Realizability, Computability
-Category 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
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.
Presentation
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.
Judgments and contexts
The dependent type theory model of propositional logic consists of three judgments: proposition judgments , where we judge to be a proposition, proof judgments, where we judge to be a proof of , , and context judgments, where we judge to be a context, . Contexts are lists of proof judgments , , , et cetera, and are formalized by the rules for the empty context and extending the context by a proof judgment
Structural rules
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 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.
Dependent propositions and dependent proofs
A dependent proposition is a proposition in the context of the variable judgment , , they are sometimes written as . A dependent proof is a proof in the context of the variable judgment , . dependent proofs are likewise sometimes written as .
Equality of proofs
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:
Propositional truncation
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.
False
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:
True
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:
Disjunctions
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:
Conjunctions
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:
Implications
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:
Negations
A negation is just an implication of false. However, we introduce separate rules for negations specifically for the use of the notation rather than the longer .
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.
Decidable and stable propositions
A proposition is said to be decidable or satisfy excluded middle if there is a proof . is said to be stable or satisfy the double negation law if there is a proof . 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:
Categorical semantics
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.
Typed predicate logic as a dependent type theory
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 and , as well as similar rules for judgments and contexts
Structural rules
We also have the variable, weakening and substitution structural rules for types which are in the same format as the structural rules for propositions.
Predicates
A predicate is defined in the usual manner, as a proposition in the context of a term of a type
and the predicate is usually written as to indicate its dependence upon the variable .
A predicate proof is a proof of a proposition in the context of a term of a type
and the proof is similarly written as to indicate its dependence upon the variable .
Universal quantification
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:
Existential quantification
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:
Equality of types
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 to indicate it is an equivalence relation. It is defined by the following rules:
Internalization in a type theory
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.
See also
Bibliography
-
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)