I recently had an exam where I had to prove the uncountability of the Cantor set $\mathcal{C}$. I produced a proof which I thought surely would be the classic proof, but to my surprise I can't seem to find this argument anywhere online after a couple of searches. The proof demonstrates an injection $f: \{0, 1\}^\mathbb{N} \to \mathcal{C}$ (where $\{0, 1\}^\mathbb{N}$ is the set of infinite bitstrings).
Notations: Denote by $C_n$ to be the "approximation" of the Cantor set after the $n$th iteration. For example, $C_0 = [0,1]$, $C_1 = [0, 1/3] \cup [2/3, 1]$, $C_2 = [0, 1/9] \cup [2/9, 1/3] \cup [2/3, 7/9] \cup [8/9, 1]$, and so on.
Let $b$ be any finite bitstring. Denote the last bit of $b$ as $b^{-1}$, and denote the bitstring obtained by omitting the last bit of $b$ as $b_{-1}$. For example, $(011011)^{-1} = 1$ and $(011011)_{-1} = 01101$. Also define the function $$ C(b) = \begin{cases} [0, 1] & \text{if } b = \epsilon \text{, the empty bitstring} \\ \text{(closed) left third of } C(b_{-1}) & \text{if } b^{-1} = 0 \\ \text{(closed) right third of } C(b_{-1}) & \text{if } b^{-1} = 1 \end{cases} $$ For example, $C_{01}$ denotes the right third of the left third of $C(\epsilon) = [0,1]$, namely $C_{01} = [2/9, 1/3]$. It can be seen that for any input of length $n$, $C$ returns a unique disjoint interval that constitutes $C_n$ (where $C_n$, as in the lecture, is the resulting set of intervals after the $n$th iteration of the Cantor procedure).
Finally, we define some notation for infinite bitstrings. Let $i$ be an infinite bitstring. Denote its first $n$ bits as $i_n$. For example, $(10110 \cdots)_2 = 10$.
The Injection: Define $f$ as the following, which takes in an infinite bitstring $i$: $$f(i) = \bigcap_{n \in \mathbb{N}} C(i_n)$$ Intuitively, this function can be thought of consuming an infinite bitstring, and starting at $[0,1]$, it "hops" to the left third of the current interval if the current bit examined is zero, and "hops" to the right third of the current interval if the current bit examined is one.
What Must be Shown: It seems to me that two things must be shown:
$f$ always returns a real number in the Cantor set.
$f$ is injective.
To show the first, note that $f(i)$ an intersection of (descending) non-empty nested intervals, and thus by the nested interval theorem, there is a non-trivial intersection. As each $C(i_n)$ is a subset of $C_n$, it follows that $f(i)$ contains only members of the Cantor set. Finally, each of the nested intervals is one-third the length of the previous, so there is only one real number contained in $f(i)$, for any infinite bitstring $i$.
To show the second, suppose we have two infinite bitstrings $i$ and $j$ with $i \neq j$. Let $n$ be the first bit in which they differ (by assumption, $n$ must be finite, or else $i = j$). WLOG, assume that the $n$th bit of $i$ is 0, and the $n$th bit of $j$ is 1. By definition of $C$, $C(i_n)$ is the left third of $C(i_{n - 1})$, while $C(j_n)$ is the right third of $C(j_{n - 1})$. By assumption, $i_{n - 1} = j_{n - 1}$, so it follows that $C(i_n)$ and $C(j_n)$ are the left and right third, respectively, of the same interval $C(i_{n - 1})$. In particular, they must be disjoint. However, by definition of $f$, $f(i)$ must be an element of $C(i_n)$, while $f(j)$ must be an element of $C(j_n)$. Since $C(i_n) \cap C(j_n) = \emptyset$, it follows that $f(i) \neq f(j)$. Hence, $f$ is injective.
Questions:
Is this construction correct?
This construction is similar, but definitely not the same, as the classic proof of $\mathcal{C}$'s uncountability. If this proof is correct, is there a reason it's not commonly phrased this way (and instead phrased using ternary numbers and such)?