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.
basic constructions:
strong axioms
further
In constructive mathematics, a set has decidable equality if any two elements of are either equal or not equal. Equivalently, has decidable equality if its equality relation is a decidable subset of . Sometimes one says that such a set is discrete, although of course this term has many meanings. Of course, in classical mathematics, every set has decidable equality. But the concept generalises in topos theory to the notion of decidable object.
Every finite set has decidable equality.
Every subfinite set has decidable equality, since finite sets have decidable equality and the canonical injection of a subfinite set into a finite set preserves and reflects both equality and the negation of equality by definition of injection.
The natural numbers have decidable equality.
Every countable set (a set that admits a bijection with a lower decidable subset of ) has decidable equality.
Every subcountable set has decidable equality, since the natural numbers have decidable equality and the canonical injection of a subcountable set into the natural numbers preserves and reflects both equality and the negation of equality by definition of injection.
More generally, every subset of a set with decidable equality itself has decidable equality.
There are other examples if we assume some principles which are not neutrally constructive:
Cantor space has decidable equality if and only if the weak limited principle of omniscience holds
The Dedekind real numbers has decidable equality if and only if analytic WLPO holds
These last two examples are examples of sets with decidable equality in constructive mathematics, but where the negation of equality is still not an apartness relation, and so sets with decidable equality still do not behave as they do in classical mathematics.
Assuming that Cantor space has decidable equality, negation of equality only becomes an apartness relation if and only if the limited principle of omniscience holds. Similarly, assuming that the Dedekind real numbers has decidable equality, negation of equality only becomes an apartness relation if and only if the analytic LPO holds.
See decidable tight apartness for the stronger condition where the sets do actually behave as they do in classical mathematics.
Some non-examples include:
Not all countably indexed sets necessarily have decidable equality, where countably indexed means that the set admits a surjection from a decidable subset of the natural numbers. BauerHanson24 constructed a topos in which the Dedekind real numbers do not have decidable equality but which are still countably indexed; note that the authors used “countable” to mean countably indexed.
Cantor space does not have decidable equality if Brouwer's continuity principle for Cantor space holds
The Dedekind real numbers does not have decidable equality if Brouwer's continuity principle for the Dedekind real numbers holds
In type-theoretic foundations, there are two different notions of decidable equality, depending on whether “or” is interpreted using sum types or disjunctions , i.e. the bracket type of sum types. The former notion of decidable equality is called untruncated decidable equality, while the latter notion is called truncated decidable equality. Since every type maps to its bracket, untruncated decidable equality implies truncated decidable equality.
On the other hand, if truncated decidable equality holds and is an h-set, i.e. it satisfies uniqueness of identity proofs, then and represent disjoint subobjects of . Thus is already a subobject of , so it is equivalent to its bracket, and untruncated decidable equality also holds.
The converse of this is also true: if untruncated decidable equality holds, then not only does truncated decidable equality also hold, but in fact is an h-set. This was first proven by Michael Hedberg; a proof can be found at Hedberg's theorem and in the references below. This fact is useful in homotopy type theory to show that many familiar types, such as the natural numbers, are h-sets.
For non-h-sets, the difference between untruncated decidable equality and truncated decidable equality can be dramatic. For instance, if we model homotopy type theory in a Boolean -topos (such as constructed classically), then every type satisfies truncated decidable equality (which is what it means for the logic to be boolean), but only the h-sets satisfy untruncated decidable equality (in accordance with Hedberg's theorem).
There is also a few definitions of decidable equality in dependent type theory, which rely on the boolean domain with its extensionality principle and the fact that that the decidable equality is always valued in the boolean domain.
The first definition states that decidable equality on a type is a binary function which comes with a family of equivalences
The second also relies on the fact that the boolean domain forms a univalent Tarski universe . Here, decidable equality on a type is a binary function which comes with a family of equivalences
Either way, this is typically how the natural numbers type is proven to have decidable equality, by defining a binary function into the boolean domain called observational equality and using the extensionality principle of the natural numbers.
Every set with decidable equality is locally finite.
Michael Hedberg, A coherence theorem for Martin-Löf’s type theory, J. Functional Programming, 1998
Nicolai Kraus, A direct proof of Hedberg’s theorem, blog post
Andrej Bauer, James Hanson, The Countable Reals (arXiv:2404.01256)
Last revised on August 29, 2024 at 20:11:22. See the history of this page for a list of all contributions to it.