# Cantor's diagonal argument

Cantor's diagonal argument
An illustration of Cantor's diagonal argument for the existence of uncountable sets. The sequence at the bottom cannot occur anywhere in the list of sequences above.

Cantor's diagonal argument, also called the diagonalisation argument, the diagonal slash argument or the diagonal method, was published in 1891 by Georg Cantor as a mathematical proof that there are infinite sets which cannot be put into one-to-one correspondence with the infinite set of natural numbers. Such sets are now known as uncountable sets, and the size of infinite sets is now treated by the theory of cardinal numbers which Cantor began.

The diagonal argument was not Cantor's first proof of the uncountability of the real numbers; it was actually published much later than his first proof, which appeared in 1874. However, it demonstrates a powerful and general technique that has since been used in a wide range of proofs, also known as diagonal arguments by analogy with the argument used in this proof. The most famous examples are perhaps Russell's paradox, the first of Gödel's incompleteness theorems, and Turing's answer to the Entscheidungsproblem.

## An uncountable set

Cantor's original proof considers an infinite sequence S of the form (s1, s2, s3, ...) where each element si is an infinite sequence of 1's or 0's. This sequence is countable, as to every natural number n we associate one and only one element of the sequence. We might write such a sequence as a numbered list:

s1 = (0, 0, 0, 0, 0, 0, 0, ...)
s2 = (1, 1, 1, 1, 1, 1, 1, ...)
s3 = (0, 1, 0, 1, 0, 1, 0, ...)
s4 = (1, 0, 1, 0, 1, 0, 1, ...)
s5 = (1, 1, 0, 1, 0, 1, 1, ...)
s6 = (0, 0, 1, 1, 0, 1, 1, ...)
s7 = (1, 0, 0, 0, 1, 0, 0, ...)
...

For each m and n let sn,m be the mth element of the nth sequence on the list. So, for instance, s2,1 is the first element of the second sequence.

It is possible to build a sequence s0 in such a way that its first element is different from the first element of the first sequence in the list, its second element is different from the second element of the second sequence in the list, and, in general, its nth element is different from the nth element of the nth sequence in the list. That is to say, if sn,n is 1, then s0,n is 0, otherwise s0,n is 1. For instance:

s1 = (0, 0, 0, 0, 0, 0, 0, ...)
s2 = (1, 1, 1, 1, 1, 1, 1, ...)
s3 = (0, 1, 0, 1, 0, 1, 0, ...)
s4 = (1, 0, 1, 0, 1, 0, 1, ...)
s5 = (1, 1, 0, 1, 0, 1, 1, ...)
s6 = (0, 0, 1, 1, 0, 1, 1, ...)
s7 = (1, 0, 0, 0, 1, 0, 0, ...)
...
s0 = (1, 0, 1, 1, 1, 0, 1, ...)

The elements s1,1, s2,2, s3,3, and so on, are here highlighted, showing the origin of the name "diagonal argument". Each element in s0 is, by definition, different from the highlighted element in the corresponding column of the table above it. In short, s0,nsn,n.

Therefore this new sequence s0 is distinct from all the sequences in the list. This follows from the fact that if it were identical to, say, the 10th sequence in the list, then we would have s0,10 = s10,10. In general, we would have s0,n = sn,n, which, due to the construction of s0, is impossible. In short, by its definition s0 is not contained in the countable sequence S.

Let T be a set consisting of all infinite sequences of 0s and 1s. By its definition, this set must contain not only the sequences included in S, but also s0, which is just another sequence of 0s and 1s. However, s0 does not appear anywhere in S. Hence, T cannot coincide with S.

Because this argument applies to any countable set S of sequences of 0s and 1s, it follows that T cannot be equal to any such set. Thus T is uncountable: it cannot be placed in one-to-one correspondence with the set of natural numbers $\mathbb N$.

### Interpretation

The interpretation of Cantor's result will depend upon one's view of mathematics. To constructivists, the argument shows no more than that there is no bijection between the natural numbers and T. It does not rule out the possibility that the latter are subcountable. In the context of classical mathematics, this is impossible, and the diagonal argument establishes that, although both sets are infinite, there are actually more infinite sequences of ones and zeros than there are natural numbers.

### 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 see this, we will build a one-to-one correspondence between the set T of infinite binary strings and a subset of R (the set of real numbers). Since T is uncountable, this subset of R must be uncountable. Hence R is uncountable.

To build this one-to-one correspondence (or bijection), observe that the string 0111… appears after the binary point in the binary expansion 0.0111…. This suggests defining the function f(t) = 0.t, where t is a string in T. Unfortunately, f(1000…) = 0.1000… = 1/2, and f(0111…) = 0.0111… = 1/4 + 1/8 + 1/16 + … = 1/2. So this function is not a bijection since two strings correspond to one number—a number having two binary expansions.

However, modifying this function produces a bijection from T to the interval (0, 1)—that is, the real numbers > 0 and < 1. The idea is to remove the "problem" elements from T and (0, 1), and handle them separately. From (0, 1), remove the numbers having two binary expansions. Put these numbers in a sequence: a = (1/2, 1/4, 3/4, 1/8, 3/8, 5/8, 7/8, …). From T, remove the strings appearing after the binary point in the binary expansions of 0, 1, and the numbers in sequence a. Put these eventually-constant strings in a sequence: b = (000…, 111…, 1000…, 0111…, 01000…, 00111…, …). A bijection g(t) from T to (0, 1) is defined by: If t is the nth string in sequence b, let g(t) be the nth number in sequence a; otherwise, let g(t) = 0.t.

To build a bijection from T to R: start with the tangent function tan(x), which provides a bijection from (−π/2, π/2) to R. Next observe that the linear function h(x) = πx - π/2 provides a bijection from (0, 1) to (−π/2, π/2). The composite function tan(h(x)) = tan(πx - π/2) provides a bijection from (0, 1) to R. Compose this function with g(t) to obtain tan(h(g(t))) = tan(πg(t) - π/2), which is a bijection from T to R. This means that T and R have the same cardinality—this cardinality is called the "cardinality of the continuum."

## 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, i.e., the set of all subsets of S (here written as P(S)), is larger than S itself. This proof proceeds as follows:

Let f be any function from S to P(S). It suffices to prove f cannot be surjective. That means that some member of P(S), i.e., some subset of S, is not in the image of f. Consider the set:

$T=\{\,s\in S: s\not\in f(s)\,\}.$

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(s), so T is not equal to f(s). On the other hand, if s is not in T, then by definition of T, s is in f(s), so again T is not equal to f(s). For a more complete account of this proof, see Cantor's theorem.

### Consequences

This result implies that the notion of the set of all sets is an inconsistent notion. If S were the set of all sets then P(S) would at the same time be bigger than S and a subset of S.

Russell's Paradox has shown us that naive set theory, based on an unrestricted comprehension scheme, is contradictory. Note that there is a similarity between the construction of T and the set in Russell's paradox. Therefore, depending on how we modify the axiom scheme of comprehension in order to avoid Russell's paradox, arguments such as the non-existence of a set of all sets may or may not remain valid.

The diagonal argument shows that the set of real numbers is "bigger" than the set of natural numbers (and therefore, the integers and rationals as well). Therefore, we can ask if there is a set whose cardinality is "between" that of the integers and that of the reals. This question leads to the famous continuum hypothesis. Similarly, the question of whether there exists a set whose cardinality is between |S| and |P(S)| for some infinite S leads to the generalized continuum hypothesis.

Analogues of the diagonal argument are widely used in mathematics to prove the existence or nonexistence of certain objects. For example, the conventional proof of the unsolvability of the halting problem is essentially a diagonal argument. Also, diagonalization was originally used to show the existence of arbitrarily hard complexity classes and played a key role in early attempts to prove P does not equal NP. In 2008, diagonalization was used to "slam the door" on Laplace's demon.[1]

### Version for Quine's New Foundations

The above proof fails for W. V. Quine's "New Foundations" set theory (NF). In NF, the naive axiom scheme of comprehension is modified to avoid the paradoxes by introducing a kind of "local" type theory. In this axiom scheme,

$\{s \in S: s\not\in f(s)\,\}$

is not a set — i.e., does not satisfy the axiom scheme. On the other hand, we might try to create a modified diagonal argument by noticing that

$\{s \in S: s\not\in f(\{s\})\,\}$

is a set in NF. In which case, if P1(S) is the set of one-element subsets of S and f is a proposed bijection from P1(S) to P(S), one is able to use reductio to prove that |P1(S)| < |P(S)|.

The proof follows by the fact that if f were indeed a map onto P(S)), then we could find r in S, such that f({r}) coincides with the modified diagonal set, above. We would conclude that if r is not in f({r}), then r is in f({r}) and vice-versa.

It is not possible to put P1(S) in a one-to-one relation with S, as the two have different types, and so any function so defined would violate the typing rules for the comprehension scheme.

## References

1. ^ P. Binder, "Theories of almost everything", Nature, 455 (2008), 884–885.

Wikimedia Foundation. 2010.

### Look at other dictionaries:

• Diagonal argument — A variety of diagonal arguments are used in mathematics. Cantor s diagonal argument was the earliest. Cantor s diagonal argument Cantor s theorem Halting problem Diagonal lemma This disambiguation page lists mathematics articles associated with… …   Wikipedia

• Diagonal method — may refer to: Diagonal Method, a rule of thumb in photography, painting and drawing Cantor s diagonal argument, a mathematical proof from 1891 that real numbers are not countable This disambiguation page lists articles associated with the same… …   Wikipedia

• Cantor set — In mathematics, the Cantor set, introduced by German mathematician Georg Cantor in 1883 [Georg Cantor (1883) Über unendliche, lineare Punktmannigfaltigkeiten V [On infinite, linear point manifolds (sets)] , Mathematische Annalen , vol. 21, pages… …   Wikipedia

• Cantor's first uncountability proof — Georg Cantor s first uncountability proof demonstrates that the set of all real numbers is uncountable. Cantor formulated the proof in December 1873 and published it in 1874 in Crelle s Journal [cite… …   Wikipedia

• Diagonal lemma — In mathematical logic, the diagonal lemma or fixed point theorem establishes the existence of self referential sentences in certain formal theories of the natural numbers specifically those theories that are strong enough to represent all… …   Wikipedia

• Argument (disambiguation) — In general parlance, an argument is a discussion involving conflicting points of view. General types of argument * Argument, a demonstration of a proof, or using logical reasoning for persuasion * Argument form, the logical structure of an… …   Wikipedia

• Cantor's theorem — Note: in order to fully understand this article you may want to refer to the set theory portion of the table of mathematical symbols. In elementary set theory, Cantor s theorem states that, for any set A , the set of all subsets of A (the power… …   Wikipedia

• Cantor's theorem — Fundamental theorem of set theory, proved by Cantor in 1891. It is usually split into two parts. Cantor s theorem says that the set of real numbers is non denumerable. Cantor s power set theorem shows that the power set of any set is always… …   Philosophy dictionary

• Cantor, Georg — (1845–1918) German mathematician and founder of set theory . Born in St Petersburg, Cantor studied at Berlin under Weierstrass, and taught at the university of Halle from 1872. His celebrated diagonal argument proving the different cardinality of …   Philosophy dictionary

• Argument De La Diagonale De Cantor — L argument de la diagonale, ou argument diagonal fut découvert par le mathématicien allemand Georg Cantor (1845 1918) et publié en 1891. Il permit à ce dernier de donner une deuxième démonstration de la non dénombrabilité de l ensemble des… …   Wikipédia en Français