Real Numbers are Uncountably Infinite/Set-Theoretical Approach: Proof 2

Proof
By Cantor's Theorem there is no surjection:
 * $\N \twoheadrightarrow \mathcal P \left({\N}\right)$

Additionally, we have Power Set of Natural Numbers 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.