# Real Numbers are Uncountable

## Theorem

The set of real numbers $\R$ is uncountably infinite.

## Cantor's First Proof

We prove the equivalent result that every sequence $\left\langle{x_k}\right\rangle_{k \in \N}$ omits at least one $x \in \R$.

Let $\left\langle{x_k}\right\rangle_{k \in \N}$ be a sequence of distinct real numbers.

Let a sequence of closed real intervals $\left\langle{I_n}\right\rangle$ be defined as follows:

Let:

$a_k = \min \left\{ {x_k, x_{k+1} }\right\}$
$b_k = \max \left\{ {x_k, x_{k+1} }\right\}$

and:

$I_k = \left[{a_k \,.\,.\, b_k}\right]$

Since the terms of $\left\langle{x_k}\right\rangle_{k \in \N}$ are distinct, $a_k \ne b_k$.

Thus $I_k$ is not a singleton.

Let:

$I_{n-1} = [a_{n-1} \,.\,.\, b_{n-1}]$

It can be assumed that infinitely many of the $x_k$ lie inside $I_{n-1}$.

Otherwise the proof is complete.

Let $y$ and $z$ be the first two such terms of $\left\langle{x_k}\right\rangle_{k \in \N}$.

Let:

$a_n = \min \left\{ {y, z}\right\}$
$b_n = \min \left\{ {y, z}\right\}$
$I_n = \left[{a_n \,.\,.\, b_n}\right]$

Thus we have sequences:

$\left\langle{a_k}\right\rangle_{k \in \N}$
$\left\langle{b_k}\right\rangle_{k \in \N}$

with:

$a_1 < a_2 < \cdots < b_2 < b_1$

So $\left\langle{a_k}\right\rangle_{k \in \N}$ and $\left\langle{b_k}\right\rangle_{k \in \N}$ are monotone, and bounded above and bounded below respectively.

Therefore by the Monotone Convergence Theorem (Real Analysis) both are convergent.

Let:

$\displaystyle A = \lim_{k \to \infty} a_k$
$\displaystyle B = \lim_{k \to \infty} b_k$

Clearly we have $A \le B$.

So:

$\left[{A \,.\,.\, B}\right] \ne \varnothing$

Let $h \in [A \,.\,.\, B]$.

Then:

$h \ne a_k, b_k$ for all $k$.

We claim that $h \ne x_k$ for all $k$.

Suppose that $h = x_k$ for some $k$.

Then there are only finitely many points in the sequence before $h$ occurs.

Therefore only finitely many of the $a_k$ precede $h$.

Let $a_d$ be the last element of the sequence $\left\langle{a_k}\right\rangle_{k \in \N}$ preceding $h$.

We defined $a_{d + 1}$, $b_{d+1}$ to be interior points of $I_d$, and also $h \in I_{d+1}$ by the definition of $h$.

Therefore $a_{d+1}$ must precede $h$ in the sequence, for the sequence is monotone increasing.

$\blacksquare$

## Cantor's Second Proof

By definition, a perfect set is a set $X$ such that every point $x \in X$ is the limit of a sequence of points of $X$ distinct from $x$.

From Real Numbers form Perfect Set, $\R$ is perfect.

Therefore it is sufficient to show that a perfect subset of $X \subseteq \R^k$ is uncountable.

We prove the equivalent result that every sequence $\left\langle{x_k}\right\rangle_{k \in \N} \subseteq X$ omits at least one point in $X$.

Let $y_1 \in X$.

Let $B_1 := \mathcal B_r \left({y_1}\right)$ be some closed ball centred at $y_1$.

Consider a closed ball:

$B_{n-1} \supseteq B_n := \mathcal B_{\delta \left({n}\right)} \left({y_n}\right)$

such that:

$\delta \left({n}\right) \le \dfrac {\delta \left({n - 1}\right)} 2$
$y_n \in X$
$x_n \notin B_n$.

Note that $\delta \left({1}\right) = r$.

We can satisfy the condition $x_n \notin B_n$ because $X$ is perfect, so every ball centred at a point of $X$ contains infinitely many points of $X$.

Since $\delta \left({n}\right) \le \dfrac r {2^{n-1} }$, $y_n$ is Cauchy.

Therefore from Perfect Set is Closed, we may let $\displaystyle Y = \lim_{n \to \infty} y_n \in X$.

For $n \in \N$ we have:

$\left\{ {y_m: m > n}\right\} \subseteq B_n$

so $Y \in B_n$.

But by construction:

$\forall n \in \N: x_n \notin B_n$

Therefore:

$\forall n \in \N: Y \ne x_n$

and the proof is complete.

$\blacksquare$

## Cantor's Diagonal Argument

We show that the unit interval $\left[{0 \,.\,.\, 1}\right)$ is uncountable, from which uncountability of $\R$ follows immediately.

Aiming for a contradiction, suppose that $\left[{0 \,.\,.\, 1}\right)$ is countable.

Clearly $\left[{0 \,.\,.\, 1}\right)$ is not finite because $\displaystyle \frac 1 n \in \left[{0 \,.\,.\, 1}\right)$ are distinct for all $n \in \N$.

Therefore an injection $\left[{0 \,.\,.\, 1}\right) \hookrightarrow \N$ enumerates $\left[{0 \,.\,.\, 1}\right)$ with a subset of the natural numbers.

By relabeling, we can associate each $x \in \left[{0 \,.\,.\, 1}\right)$ to exactly one natural number to obtain a bijection.

(By hypothesis, such a mapping can be constructed).

Let $g$ be such a correspondence:

 $\displaystyle 1$ $\leftrightarrow$ $\displaystyle 0.d_{11}d_{12}d_{13}\ldots$ $\displaystyle 2$ $\leftrightarrow$ $\displaystyle 0.d_{21}d_{22}d_{23}\ldots$ $\displaystyle$ $\vdots$ $\displaystyle$ $\displaystyle n$ $\leftrightarrow$ $\displaystyle 0.d_{n1}d_{n2}d_{n3}\ldots$ $\displaystyle$ $\vdots$ $\displaystyle$

where juxtaposition of digits describes the decimal expansion of a number.

By Existence of Base-$N$ Representation, any decimal expansion of a real number exists and is unique, or else has exactly two representative strings.

In this case, if there are exactly two representations, one will have an infinite trail of $9$s, and one will terminate.

Restrict $g$ such that there exists no infinite strings of $9$s in the decimal expansions in the question, i.e. to the set:

$S := \left\{{f: \N \to \left\{{0, 1, 2, \ldots, 9}\right\} }\middle\vert\,{ \forall M \in \N: \exists m \ge M: f \left({m}\right)\ne 9}\right\}$

of sequences in $\left\{{0, 1, 2, \ldots, 9}\right\}$ not ending in infinitely many $9$s.

Define $g'$ as the restriction of $g$ to $S$:

$g' := g \restriction S$

That is, construct $g'$ such that there exist no infinite strings of $9$s in the decimal expansions in question.

From Injection to Image is Bijection, $g'$ is one-to-one, and consequently is onto.

For every $k \in \N$ define $f_k = d_{kk} + 1$ taken modulo $10$.

That is, $f: 0 \mapsto 1, 1 \mapsto 2, \dots, 8 \mapsto 9, 9 \mapsto 0$.

Let $y$ be defined by the decimal expansion:

$y = 0.f_1 f_2 f_3 \ldots$

Now:

$y$ differs from $g' \left({1}\right)$ in the first digit of the decimal expansion
$y$ differs from $g' \left({2}\right)$ the second digit of the decimal expansion

and generally the $n^\text{th}$ digit of the decimal expansion of $g' \left({n}\right)$ and $y$ is different.

So $y$ can be none of the numbers $g' \left({n}\right)$ for $n \in \N$.

But $g'$ is a surjection.

From this contradiction it is deduced that $\left[{0 \,.\,.\, 1}\right)$ is not countable.

$\blacksquare$

## Set-Theoretical Approach: Proof 1

By Surjection from Natural Numbers iff Countable, a set $A$ is countable if and only if there exists a surjection $f: \N \to A$.

Suppose there exists a surjection $f: \N \to \R$.

Then $\forall x \in \R: \exists n \in \N: f \left({n}\right) = x$ as $f$ is surjective.

Let $d_{n, 0}$ be the integer before the decimal point of $f \left({n}\right)$.

Similarly, for all $m > 0$, let $d_{n, m}$ be the $m$th digit in the decimal expansion of $f \left({n}\right)$.

Let $e_0$ be an integer different from $d_{0, 0}$.

Similarly, for all $m > 0$, let $e_m$ be an integer different from $d_{m, m}$.

Specifically, we can define $e_0$ to be $d_{0, 0} + 1$, and:

$e_m = \begin{cases} 1 & : d_{m, m} \ne 1 \\ 2 & : d_{m, m} = 1 \end{cases}$

Now consider the real number $\displaystyle x = e_0 + \sum_{n \mathop = 1}^\infty \frac {e_n} {10^n}$.

Its decimal expansion is:

$x = \left[{e_0 . e_1 e_2 e_3 \ldots}\right]_{10}$

Since $e_0 \ne d_{0, 0}$, $x \ne f \left({0}\right)$.

Similarly, for each $n \in \N$ such that $n \ge 1$, we have that $e_n \ne d_{n, n}$ and so $x \ne f \left({n}\right)$.

Thus $x$ is a real number which is not in the set $\left\{{f \left({n}\right): n \in \N}\right\}$.

Hence $f$ can not be surjective.

$\blacksquare$

## Set-Theoretical Approach: Proof 2

By Cantor's Theorem there is no surjection:

$\N \twoheadrightarrow \mathcal P \left({\N}\right)$

Additionally, we have Power Set of Natural Numbers is not Countable.

Therefore, if we can show that $\mathcal P \left({\N}\right)$ injects into $\R$ then there is no injection $\R \hookrightarrow \N$ and $\R$ is uncountable.

To prove the theorem we construct an injection $f: \mathcal P \left({\N}\right) \to \R$.

For a subset $S \subseteq \N$, let $\chi_S$ be the characteristic function of $S$, and let $d_i = \chi_S \left({i}\right)$ for all $i \in \N$.

By the definition of characteristic function, $\left\langle{d_i}\right\rangle_{i \in \N}$ is an infinite sequence of $1$s and $0$s.

There are two cases: $\left\langle{d_i}\right\rangle_{i \in \N}$ terminates in an infinite sequence of $1$s, or it does not.

Suppose $\left\langle{d_i}\right\rangle_{i \in \N}$ does not terminate in an infinite sequence of $1$s.

Then $f \left({S}\right)$ is the binary expansion of the following number in $\left[{0 \,.\,.\, 1}\right)$:

$0.d_1 d_2 d_3 d_4 \ldots$

Otherwise $\left\langle{d_i}\right\rangle_{i \in \N}$ does terminate in an infinite sequence of $1$s.

Then $f \left({S}\right)$ is the integer expressed in binary as:

$1 d_1 d_2 d_3 \ldots d_k$

where $d_k$ is the last member of the sequence not equal to $1$.

In either case, every subset of $\N$, that is, element of $\mathcal P \left({\N}\right)$, is mapped to an element of $\R$.

That $f$ is an injection follows from the uniqueness statement of Existence of Base-N Representation.

$\blacksquare$

## Proof 1 using Ternary Notation

It is sufficient to show that the real interval $I = \left\{{x \in \R: 0 < x \le 1}\right\}$ is uncountable.

Let $x \in I$.

From Existence of Base-N Representation, $x$ has a unique representation of the form:

$x = \dfrac {\epsilon_1} 3 + \dfrac {\epsilon_2} {3^2} + \dfrac {\epsilon_3} {3^3} + \cdots$

where $\epsilon_k = 0, 1$ or $2$ and an infinite number of $\epsilon_k$ are different from $0$.

Let $S \subseteq I$ be countably infinite.

Let $S = \left\{{x_1, x_2, \ldots}\right\}$.

Let $\epsilon_{k1}, \epsilon_{k2}, \epsilon_{k3}, \ldots$ be the ternary digits of $x_k$.

Let $\epsilon_k = 1 + 2 \epsilon_{kk} - \epsilon_{kk}^2$ so that:

$\epsilon_k = 1$ if $\epsilon_{kk} = 0$ or $\epsilon_{kk} = 2$
$\epsilon_k = 2$ if $\epsilon_{kk} = 1$

Then:

$(1): \quad \forall k: \epsilon_k \ne 0$
$(2): \quad \forall k: \epsilon_k \ne \epsilon_{kk}$

We have that $0 < x \le 1$ so $x \in I$.

But the real number $\displaystyle x = \sum \epsilon_k 3^{-k}$ is different from every $x_k \in I$.

Thus we have found an element of $I$ which is not an element of $S$.

Therefore $S$ is a proper subset of $I$.

It follows by definition that $I$ is uncountable.

$\blacksquare$

## Proof 2 using Ternary Notation

Define a mapping $f: \mathcal P \left({\N_{>0}}\right) \to \R$ thus:

$f \left({S}\right) = 0.d_1 d_2 \ldots$, interpreted as a ternary expansion where $\left\langle{d_n}\right\rangle$ is the characteristic function of $S$.

That is:

$\displaystyle f \left({S}\right) = \sum_{i \mathop \in S} 3^{-i}$

By the lemma, $f$ is an injection.

Aiming for a contradiction, suppose that $\R$ is countable.

Then there is an injection $g: \R \to \N$.

By Composite of Injections is Injection, $g \circ f: \mathcal P \left({\N}\right) \to \N$ is an injection.

Hence, by Proof by Contradiction, $\R$ is not countable.

$\blacksquare$

## Historical Note

The fact that the Real Numbers are Uncountable was first demonstrated by Georg Cantor in $1874$.

Cantor's first and second proofs given above are less well known than the diagonal argument, and were in fact downplayed by Cantor himself: the first proof was given as an aside in his paper proving the countability of the algebraic numbers.

Joseph W. Dauben conjectures that this was because Cantor feared opposition from Leopold Kronecker among other contemporaries who aggressively dismissed Cantor's ideas.

In particular Cantor's first proof is worth reading; several texts reject the first proof as being more complicated and less instructive, but this seems to have arisen because the Diagonal argument has proven to be a more versatile tool and thus the others forgotten and dismissed.

In this instance the first and second proofs of Cantor are of equal merit to the diagonal argument, and the three together present clearly the flavor of the theorem.