3.4 Classical vs. intuitionistic logic
With the notion of mere proposition in hand, we can now give the proper formulation of the law of excluded middle in homotopy type theory:
(3.4.1) |
Similarly, the law of double negation is
(3.4.2) |
The two are also easily seen to be equivalent to each other—see http://planetmath.org/node/87834Exercise 3.18—so from now on we will generally speak only of .
This formulation of avoids the “paradoxes” of Theorem 3.2.2 (http://planetmath.org/32propositionsastypes#Thmprethm1),Corollary 3.2.7 (http://planetmath.org/32propositionsastypes#Thmprecor1), since is not a mere proposition. In order to distinguish it from the more general propositions-as-types formulation, we rename the latter:
For emphasis, the proper version (3.4.1) may be denoted ; see also http://planetmath.org/node/87790Exercise 7.7. Although is not a consequence of the basic type theory described in http://planetmath.org/node/87533Chapter 1, it may be consistently assumed as an axiom (unlike its -counterpart). For instance, we will assume it in §10.4 (http://planetmath.org/104classicalwellorderings).
However, it can be surprising how far we can get without using . Quite often, a simple reformulation of a definition or theorem enables us to avoid invoking excluded middle. While this takes a little getting used to sometimes, it is often worth the hassle, resulting in more elegant and more general proofs. We discussed some of the benefits of this in the introduction.
For instance, in classical mathematics, double negations are frequently used unnecessarily. A very simple example is the common assumption that a set is “nonempty”, which literally means it is not the case that contains no elements. Almost always what is really meant is the positive assertion that does contain at least one element, and by removing the double negation we make the statement less dependent on . Recall that we say that a type is inhabited when we assert itself as a proposition (i.e. we construct an element of , usually unnamed). Thus, often when translating a classical proof into constructive logic, we replace the word “nonempty” by “inhabited” (although sometimes we must replace it instead by “merely inhabited”; see §3.7 (http://planetmath.org/37propositionaltruncation)).
Similarly, it is not uncommon in classical mathematics to find unnecessary proofs by contradiction. Of course, the classical form of proof by contradiction proceeds by way of the law of double negation: we assume and derive a contradiction, thereby deducing , and thus by double negation we obtain . However, often the derivation of a contradiction from can be rephrased slightly so as to yield a direct proof of , avoiding the need for .
It is also important to note that if the goal is to prove a negation, then “proof by contradiction” does not involve . In fact, since is by definition the type , by definition to prove is to prove a contradiction () under the assumption of . Similarly, the law of double negation does hold for negated propositions: . With practice, one learns to distinguish more carefully between negated and non-negated propositions and to notice when is being used and when it is not.
Thus, contrary to how it may appear on the surface, doing mathematics “constructively” does not usually involve giving up important theorems, but rather finding the best way to state the definitions so as to make the important theorems constructively provable. That is, we may freely use the when first investigating a subject, but once that subject is better understood, we can hope to refine its definitions and proofs so as to avoid that axiom. This sort of observation is even more pronounced in homotopy type theory, where the powerful tools of univalence and higher inductive types allow us to constructively attack many problems that traditionally would require classical reasoning. We will see several examples of this in http://planetmath.org/node/87879Part II.
It is also worth mentioning that even in constructive mathematics, the law of excluded middle can hold for some propositions. The name traditionally given to such propositions is decidable.
Definition 3.4.3.
-
1.
A type is called decidable if .
-
2.
Similarly, a type family is decidable if
-
3.
In particular, has decidable equality if
Thus, is exactly the statement that all mere propositions are decidable, and hence so are all families of mere propositions. In particular, implies that all sets (in the sense of §3.1 (http://planetmath.org/31setsandntypes)) have decidable equality. Having decidable equality in this sense is very strong; see Theorem 7.2.5 (http://planetmath.org/72uniquenessofidentityproofsandhedbergstheorem#Thmprethm3).
Title | 3.4 Classical vs. intuitionistic logic |
\metatable |