User:Tnttodda/sandbox



In set theory, Cantor's diagonal argument, also called the diagonalisation argument, the diagonal slash argument, the anti-diagonal argument, the diagonal method, and Cantor's diagonalization proof, 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, 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 (i.e. each digit is zero or one). He begins with a constructive proof of the following lemma:
 * If s1, s2, ..., sn, ... is any enumeration of elements from T, then an element s of T can be constructed that doesn't correspond to any sn in the enumeration.

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 (swapping 0s for 1s and vice versa), 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 nth digit as complementary to the nth digit of sn. For the example above, this yields
 * 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, || ...)
 * }
 * s5 = || (1, || 1, || 0, || 1, || 0, || 1, || 1, || ...)
 * s6 = || (0, || 0, || 1, || 1, || 0, || 1, || 1, || ...)
 * s7 = || (1, || 0, || 0, || 0, || 1, || 0, || 0, || ...)
 * }
 * s7 = || (1, || 0, || 0, || 0, || 1, || 0, || 0, || ...)
 * }
 * }
 * }
 * }

By construction, s is a member of T that differs from each sn, since their nth digits differ (highlighted in the example). Hence, s cannot occur in the enumeration.
 * 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, || ...)
 * s || = || ( 1, || 0 , || 1 , || 1 , || 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, || ...)
 * s || = || ( 1, || 0 , || 1 , || 1 , || 1 , || 0 , || 1 , || ...)
 * }
 * s || = || ( 1, || 0 , || 1 , || 1 , || 1 , || 0 , || 1 , || ...)
 * }
 * s || = || ( 1, || 0 , || 1 , || 1 , || 1 , || 0 , || 1 , || ...)
 * }
 * s || = || ( 1, || 0 , || 1 , || 1 , || 1 , || 0 , || 1 , || ...)
 * }
 * }

Based on this lemma, Cantor then uses a proof by contradiction to show that:
 * The set T is uncountable.

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.