Cantor's diagonal argument


Cantor's diagonal argument is a mathematical proof that there are infinite sets which cannot be put into one-to-one correspondence with the infinite set of natural numbersinformally, that there are sets which in some sense contain more elements than there are positive integers. Such sets are now called uncountable sets, and the size of infinite sets is treated by the theory of cardinal numbers, which Cantor began.
Georg Cantor published this proof in 1891, but it was not his first proof of the uncountability of the real numbers, which appeared in 1874.
However, it demonstrates a general technique that has since been used in a wide range of proofs, including the first of Gödel's incompleteness theorems and Turing's answer to the Entscheidungsproblem. Diagonalization arguments are often also the source of contradictions like Russell's paradox and Richard's paradox.

Uncountable set

Cantor considered the set T of all infinite sequences of binary digits.
He begins with a constructive proof of the following lemma:
The proof starts with an enumeration of elements from T, for example
Next, a sequence s is constructed by choosing the 1st digit as complementary to the 1st digit of s1, the 2nd digit as complementary to the 2nd digit of s2, the 3rd digit as complementary to the 3rd digit of s3, and generally for every n, the n-th digit as complementary to the n-th digit of sn. For the example above, this yields
By construction, s is a member of T that differs from each sn, since their n-th digits differ.
Hence, s cannot occur in the enumeration.
Based on this lemma, Cantor then uses a proof by contradiction to show that:
The proof starts by assuming that T is countable.
Then all its elements can be written in an enumeration s1, s2,..., sn,....
Applying the previous lemma to this enumeration produces a sequence s that is a member of T, but is not in the enumeration. However, if T is enumerated, then every member of T, including this s, is in the enumeration. This contradiction implies that the original assumption is false. Therefore, T is uncountable.

Real numbers

The uncountability of the real numbers was already established by Cantor's first uncountability proof, but it also follows from the above result. To prove this, an injection will be constructed from the set T of infinite binary strings to the set R of real numbers. Since T is uncountable, the image of this function, which is a subset of R, is uncountable. Therefore, R is uncountable. Also, by using a method of construction devised by Cantor, a bijection will be constructed between T and R. Therefore, T and R have the same cardinality, which is called the "cardinality of the continuum" and is usually denoted by or.
An injection from T to R is given by mapping binary strings in T to decimal fractions, such as mapping t = 0111... to the decimal 0.0111.... This function, defined by, is an injection because it maps different strings to different numbers.
Constructing a bijection between T and R is slightly more complicated.
Instead of mapping 0111... to the decimal 0.0111..., it can be mapped to the base-b number: 0.0111...b. This leads to the family of functions:. The functions are injections, except for. This function will be modified to produce a bijection between T and R.
Construction of a bijection between T and R

This construction uses a method devised by Cantor that was published in 1878. He used it to construct a bijection between the closed interval and the irrationals in the open interval. He first removed a countably infinite subset from each of these sets so that there is a bijection between the remaining uncountable sets. Since there is a bijection between the countably infinite subsets that have been removed, combining the two bijections produces a bijection between the original sets.
Cantor's method can be used to modify the function to produce a bijection from T to. Because some numbers have two binary expansions, is not even injective. For example, 0.1000...2 = 1/2 and 0.0111...2 = 1/2, so both 1000... and 0111... map to the same number, 1/2.
To modify, observe that it is a bijection except for a countably infinite subset of and a countably infinite subset of T. It is not a bijection for the numbers in that have two binary expansions. These are called dyadic numbers and have the form where m is an odd integer and n is a natural number. Put these numbers in the sequence: r =. Also, is not a bijection to for the strings in T appearing after the binary point in the binary expansions of 0, 1, and the numbers in sequence r. Put these eventually-constant strings in the sequence: s =. Define the bijection g from T to : If t is the nth string in sequence s, let g be the nth number in sequence r; otherwise, g = 0.t2.
To construct a bijection from T to R, start with the tangent function tan, which is a bijection from to R. Next observe that the linear function h = is a bijection from to . The composite function tan = is a bijection from to R. Composing this function with g produces the function tan =, which is a bijection from T to R.

General sets

A generalized form of the diagonal argument was used by Cantor to prove Cantor's theorem: for every set S, the power set of S—that is, the set of all subsets of S —cannot be in bijection with S itself. This proof proceeds as follows:
Let f be any function from S to P. It suffices to prove that f cannot be surjective. This means that some member T of P, i.e. some subset of S, is not in the image of f. As a candidate consider the set
For every s in S, either s is in T or not. If s is in T, then by definition of T, s is not in f, so T is not equal to f. On the other hand, if s is not in T, then by definition of T, s is in f, so again T is not equal to f; see picture.
For a more complete account of this proof, see Cantor's theorem.

Consequences

Ordering of cardinals

With equality defined as the existence of a bijection between their underlying sets, Cantor also defines binary predicate of cardinalities and in terms of the existence of injections between and. It has the properties of a preorder and is here written "". One can embed the naturals into the binary sequences, thus proving various injection existence statements explicitly, so that in this sense, where denotes the function space. But following from the argument in the previous sections, there is no surjection and so also no bijection, i.e. the set is uncountable. For this one may write, where "" is understood to mean the existence of an injection together with the proven absence of a bijection. Also in this sense, as has been shown, and at the same time it is the case that, for all sets.
Assuming the law of excluded middle, characteristic functions surject onto powersets, and then. So the uncountable is also not enumerable and it can also be mapped onto. Classically, the Schröder–Bernstein theorem is valid and says that any two sets which are in the injective image of one another are in bijection as well. Here, every unbounded subset of is then in bijection with itself, and every subcountable set is then already countable, i.e. in the surjective image of. In this context the possibilities are then exhausted, making "" a non-strict partial order, or even a total order when assuming choice. The diagonal argument thus establishes that, although both sets under consideration are infinite, there are actually more infinite sequences of ones and zeros than there are natural numbers.
Cantor's result then also implies that the notion of the set of all sets is inconsistent: If were the set of all sets, then would at the same time be bigger than and a subset of.

In the absence of excluded middle

Also in constructive mathematics, there is no surjection from the full domain onto the space of functions or onto the collection of subsets, which is to say these two collections are uncountable. Again using "" for proven injection existence in conjunction with bijection absence, one has and. Further,, as previously noted. Likewise,, and of course, also in constructive set theory.
It is however harder or impossible to order ordinals and also cardinals, constructively. For example, the Schröder–Bernstein theorem requires the law of excluded middle. In fact, the standard ordering on the reals, extending the ordering of the rational numbers, is not necessarily decidable either. Neither are most properties of interesting classes of functions decidable, by Rice's theorem, i.e. the set of counting numbers for the subcountable sets may not be recursive and can thus fail to be countable. The elaborate collection of subsets of a set is constructively not exchangeable with the collection of its characteristic functions. In an otherwise constructive context, it is consistent to adopt non-classical axioms that contradict consequences of the law of excluded middle. Uncountable sets such as or may be asserted to be subcountable.
This is a notion of size that is redundant in the classical context, but otherwise need not imply countability. The existence of injections from the uncountable or into is here possible as well. So the cardinal relation fails to be antisymmetric. Consequently, also in the presence of function space sets that are even classically uncountable, intuitionists do not accept this relation to constitute a hierarchy of transfinite sizes.
When the axiom of powerset is not adopted, in a constructive framework even the subcountability of all sets is then consistent. That all said, in common set theories, the non-existence of a set of all sets also already follows from Predicative Separation.
In a set theory, theories of mathematics are modeled. Weaker logical axioms mean fewer constraints and so allow for a richer class of models. A set may be identified as a model of the field of real numbers when it fulfills some axioms of real numbers or a constructive rephrasing thereof. Various models have been studied, such as the Cauchy reals or the Dedekind reals, among others. The former relate to quotients of sequences while the later are well-behaved cuts taken from a powerset, if they exist. In the presence of excluded middle, those are all isomorphic and uncountable. Otherwise, variants of the Dedekind reals can be countable or inject into the naturals, but not jointly. When assuming countable choice, constructive Cauchy reals even without an explicit modulus of convergence are then Cauchy-complete and Dedekind reals simplify so as to become isomorphic to them. Indeed, here choice also aids diagonal constructions and when assuming it, Cauchy-complete models of the reals are uncountable.