Showing changes from revision #19 to #20:
| Removed | Chan
This article is about the notion of equality as a proposition or predicate. For equality as a judgment, see judgmental equality. For equality as a type, see typal equality. For other notions of equality, see equality.
natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism = \linebreak propositions as types +programs as proofs +relation type theory/category theory
equality (definitional, propositional, computational, judgemental, extensional?, intensional?, decidable)
identity type, equivalence of types, definitional isomorphism
isomorphism, weak equivalence, homotopy equivalence, weak homotopy equivalence, equivalence in an (∞,1)-category
Examples.
\tableofcontents
The usual notion of equality in mathematics as a proposition or a predicate. This notion of equality can be formalized in predicate logic over type theory and in dependent type theory.
Propositional equality is most commonly used in set theories like ZFC and ETCS and dependently sorted set theories.
Propositional equality can be contrasted with judgmental equality, where equality is a judgment, and typal equality, where equality is a type.
In any two-layer type theory with a layer of types and a layer of propositions, or equivalently a first order logic over type theory or a first-order theory, every type has a binary relation according to which two elements and of are related if and only if they are equal; in this case we write . Since relations are propositions in the context of a term variable judgment in the type layer, this is called propositional equality. The formation and introduction rules for propositional equality is as follows
Then we have the elimination rules for propositional equality:
Something similar occurs in untyped first-order logic, where the domain of discourse has a binary relation according to which two elements and are related if and only if they are equal; in this case we write . Since relations are propositions in the context of a term variable judgment in the type layer, this is similarly called propositional equality. The formation and introduction rules for propositional equality is as follows
Then we have the elimination rules for propositional equality:
The introduction rule of propositional equality says that propositional equality is reflexive.
We can show that propositional equality is symmetric, that for all and such that , we have . By the introduction rule, we have that for all , we have that , and because all propositions imply themselves, we have that implies . Thus, by the elimination rules for propositional equality, for all and such that , we have .
We can also show that propositional equality is transitive, that for all , , and such that , implies that . By the introduction rule, we have that for all and , we have that , and because all propositions imply themselves, we have that implies , and because true propositions imply true propositions, we have that implies that implies . Thus, by the elimination rules for propositional equality, for all , , and such that , implies that .
Thus, propositional equality is an equivalence relation.
For all function and elements and such that , :
This is because for all functions , by the introduction rule for propositional equality, for all elements , , and the elimination rule for propositional equality states that if for all elements , , then for all elements and such that , .
The extensionality principle for function types (function extensionality) states that for all functions and , if and only if for all and such that ,
Given a set and elements and and a family of sets , and , if , then we can define transport functions whose inverse function is by symmetry of propositional equality.
The heterogeneous propositional equality is given by the logically equivalent relations
Transport and heterogeneous propositional equality are important in some set theories which do not have equality between sets themselves, and the only way to compare sets for equality is through isomorphisms. The same is true of logic over dependent type theory which do not have definitional equality between types, and one has to use definitional isomorphisms instead. In the presence of equality between sets, transport is simply the identity function on the equal set.
In logic over dependent type theory, propositional equality can be used in the computation rules and uniqueness rules of types:
Constructive mathematics is mathematics in which the law of excluded middle does not necessarily hold for propositions, subsingletons, or h-propositions. Classical mathematics is mathematics in which the law of excluded middle does hold for propositions, subsingletons, or h-propositions.
In classical mathematics, propositional equality of sets is a stable equivalence relation, and denial inequality of sets is a tight apartness relation. However, in constructive mathematics, propositional equality cannot be proven to be stable for all sets, and denial inequality cannot be proven to be a tight apartness relation for all sets. Instead, one could distinguish between 4 different notions of propositional equality and inequality:
tight apartness relations. However, not all sets have tight apartness relations.
propositional equality, which is an equivalence relation; set with tight apartness relations have stable equality.
denial inequality, which can only be proven to be a weakly tight irreflexive symmetric relation. However, all statements in classical mathematics involving only denial inequalities hold in constructive mathematics, by the double negation translation and the property that for any proposition , if and only if .
the double negation of propositional equality, which can only be proven to be a stable reflexive symmetric relation. However, all statements in classical mathematics involving only equality hold in constructive mathematics with the equality replaced by its double negation, by the double negation translation.
The sets in which propositional equality and inequality behaves as it does in classical mathematics are the classical sets, the sets with an apartness relation such that every pair of elements are either equal or apart from each other.
As a result, in constructive mathematics, sometimes one takes sets with tight apartness relations instead of general sets to be the foundational primitive concept. In classical mathematics, this is unnecessary, because every set has a tight apartness relation.
In dependent type theory, the term propositional equality is used to describe a notion of equality type different from that of judgmental equality.
More specifically, there are two interpretations of propositions and logic in dependent type theory:
The propositions as types interpretation, which says that all types are propositions. The term propositional equality is used as a synonym of typal equality in referring to identifications or identity types.
The propositions as some types interpretation, which says that only the subsingletons or h-propositions are propositions. The term propositional equality in this interpretation is not a synonym of typal equality in referring toidentifications oridentity types.
Instead, in propositions as some types , two elements and of a type are propositionally equal if and are uniquely identified; the identity type is a contractible type.
Expanding out the definition of a contractible type , a witness of propositional equality consists of anidentification and a contraction showing that the identification is thecenter of contraction of the identity type .
By this definition of equality, propositional equality is always a binary relation, because isContr is always a proposition in dependent type theory. In fact, if all identifications in an identity type are unique (i.e. there is a function ), then the identity type is an h-proposition, and if the identity type is an h-proposition, then all identifications in the identity type are unique; hence the name propositional equality for unique identifications and the relation for the type .
An h-set is then precisely a type where all identifications are unique, and the uniqueness of identity proofs can then be represented by a propositional analogue of equality reflection for extensional type theory:
making typal equality and propositional equality synonyms of each other again, because then all identity types are propositions and all identifications are unique.
Propositional equality defined in this manner is similar to the preset and setoid approaches to foundations of mathematics.
Propositional equality satisfies the principle of substitution by transport of the unique identification across predicates, and satisifes the identity of indiscernibles because propositional equality is always a proposition, and so we have:
The identity of indiscernibles doesn’t work for arbitrary identity types of a type because the type on the right hand side of the equivalence of types is always a proposition, and so if it were true, it would imply that is an h-set; hence the necessity to restrict to identity types with a unique identification.
However, propositional equality defined in this manner is not an equivalence relation because it is not a reflexive relation: for any loop space type which is not a contractible type, the proposition is an empty type. The only such types with a reflexive propositional equality are thus those that satisfy axiom K: the h-sets, thus making non-set types presets .
Furthermore, the type-theoretic functions are prefunctions with respect to propositional equality. While functions do preserve identifications, they do not preserve propositional equality in the sense of the uniqueness of identifications. Any identification is given by a function out of the interval type , and the inductively generated identification in the interval type is unique in , but not all identifications are unique in the absence of uniqueness of identity proofs. One can define an extensional function as one that does preserve the uniqueness of identifications, and prove that functions between h-sets preserve the uniqueness of identifications, and that h-sets are precisely the types between which all functions preserve uniqueness of identifications. To say that all functions are extensional along the lines of the preset approach to set theory is equivalent to the uniqueness of identity proofs that implies that all types are h-sets.
Most homotopy type theorists use the propositions as types interpretation of propositional equality as a synonym of typal equality, even by those who use the propositions as some types interpretation for everything else. Kevin Buzzard in Buzzard 2024 has used this fact and how that contradicts the interpretation of propositional equality elsewhere in mathematics as an argument for adopting a set-level type theory instead of homotopy type theory.
By Buzzard’s argument, homotopy type theorists should not be using the term “equality” to refer to arbitrary identifications or identity types, whether in its bare form or as “ propositional equality ” or “typal equality”, instead restricting the use of equality / propositional equality for only the unique identifications, and using a suitable alternative for “typal equality”, such as “identification” and “identified” and “identity type”. On the other hand, the fact that propositional equality defined as having a unique identification is not a reflexive relation for non-set types means that perhaps it is not suitable for the bare term “equality”, and perhaps the bare term “equality” and even the term “propositional equality” should refer to typal equality which is always reflexive.
Either way, in the absence of uniqueness of identity proofs, one has to give up either the notion of propositional equality as unique identification satisfying the identity of indiscernibles or the notion of propositional equality satisfying the first law of thought.
Relations and propositional equality could be internalized in any set theory: the internal propositional equality in set theory is the smallest internal reflexive relation on , and it is in fact an internal equivalence relation; it is the only internal equivalence relation on that is also a partial order (although that fact is somewhat circular). This relation is often called the identity relation on , either because ‘identity’ can mean ‘equality’ or because it is the identity for composition of relations.
In the category of reflexive relations on , the equality relation on is an initial reflexive relation; when the equality relation is a type family instead of a family of propositions, then the equality relation is the initial type generated by reflexivity or the first law of thought.
As a subset of , the equality relation is often called the diagonal and written or similarly. As an abstract set, this subset is isomorphic to itself, so one also sees the diagonal as a map, the diagonal function , which maps to ; note that . This is in Set; analogous diagonal morphisms exist in any cartesian monoidal category.
The usual notion of equality as a proposition is discussed in
Wikipedia, Equality (mathematics)
Kevin Buzzard, Grothendieck’s use of equality (arXiv:2405.10387)
Last revised on June 16, 2025 at 12:40:21. See the history of this page for a list of all contributions to it.