In logic, the principle of excluded middle states that every truth value is either true or false. (This is sometimes called the ‘axiom’ or ‘law’ of excluded middle, either to emphasise that it is or is not optional; ‘principle’ is a relatively neutral term.) One of the many meanings of classical logic is to emphasise that this principle holds in the logic; in contrast, it fails in intuitionistic logic.
The principle of excluded middle (hereafter, PEM), as a statement about truth values themselves, is accepted by nearly all mathematicians; those who doubt or deny it are a distinct minority, the constructivists. However, when one internalises mathematics in categories other than the category of sets, there is no doubt, though, that excluded middle often fails internally. See the examples listed at internal logic. (Those categories in which excluded middle holds are called Boolean; in general, the adjective ‘Boolean’ is often used to indicate the applicability of PEM.)
Although the term ‘excluded middle’ (sometimes even excluded third) suggests that the principle does not apply in many-valued logics, that is not the point; many-valued logics are many-valued externally but may still be two-valued internally. In the language of categorial logic, whether a category has exactly two subterminal objects is in general independent of whether it is Boolean; instead, the category is Boolean iff the statement that it has exactly two subterminal objects holds in its internal logic (which is in general independent of whether that statement is true).
In fact, intuitionistic logic proves that there is no truth value that is neither true nor false; in this sense, the possibility of a ‘middle’ or ‘third’ truth value is still ‘excluded’. But since the relevant de Morgan law fails in intuitionistic logic, we may not conclude that every truth value is either true or false, which is the actual PEM.
Excluded middle can be seen as a very weak form of the axiom of choice (a slightly more controversial principle, doubted or denied by a slightly larger minority, and true internally in even fewer categories). In fact, the following are equivalent.
(Here, a set is finite or finitely-indexed (respectively) if, for some natural number , there is a bijection or surjection (respectively) .)
The proof is as follows. If is a truth value, then divide by the equivalence relation where iff holds. Then we have a surjection , whose domain is (and in particular, finite), and whose codomain is finitely-indexed. But this surjection splits iff is true or false, so if either is choice or -indexed sets are projective, then PEM holds.
On the other hand, if PEM holds, then we can show by induction that if and are choice, so is (add details). Thus, all finite sets are choice. Now if is a surjection, exhibiting as finitely indexed, it has a section . Since a finite set is always projective, and any retract of a projective object is projective, this shows that is projective.
In particular, the axiom of choice implies PEM. This argument, due originally to Diaconescu, can be internalized in any topos. However, other weak versions of choice such as countable choice (any surjection to a countable set (which for this purpose is any set isomorphic to the set of natural numbers) has a section), dependent choice, or even COSHEP do not imply PEM. In fact, it is often claimed that axiom of choice is true in constructive mathematics (by the BHK or Brouwer-Heyting-Kolmogorov interpretation of predicate logic), leading to much argument about exactly what that means.