Question about a proof that The Cantor set is uncountable. I am reading a proof from a paper I found online, and it goes like this: We want to show that there exists a surjection $f$ from  the cantor set $\mathfrak{C}$ to the interval $[0,1]$ then we can show that $|\mathfrak{C}|\geqslant [0,1]$, but since $\mathfrak{C}\subseteq [0,1]$ it follows that $|[0,1]|=|\mathfrak{C}|$. Since the unit interval is uncountable, the Cantor set must be uncountable as well. 
I am stuck on one word here:
After showing that for each $p\in \mathfrak{C}$  none of its digits can equal 1, we then define a function $f : C \to [0, 1]$ by taking the number not
consisting entirely of the digits $\{0, 2\}$ (why not entirely?) and replacing each occurrence of $\{2\}$ by $\{1\}$ in its representation. To show that $f$ is surjective, consider any element in  $a\in[0, 1]$.
Represent $a$ in its binary form, and then replace each occurrence of  $\{1\}$ digit by
a $\{2\}$. This new number, which we label $b$, satisies  $f(b) = a$. As a result, $f$ is
surjective. And then it follows that  follows that $|[0,1]|=|\mathfrak{C}|$.
I can't seem to see the necessity of the word entirely I can't see why the numbers  $1=0.2222...$ and $0=0.000...$ would hurt anything, and $0,1\in\mathfrak{C}$, so if $f$ doesn't consider those numbers then it is an inconsistent mapping from $\mathfrak{C}$ to $[0,1]$. (by inconsistent I mean that $\text{Dom}f\neq \mathfrak{C}$). 
 A: I think what “taking the number not consisting entirely of the digits $\{0,2\}$  and replacing each occurrence of $\{2\}$ by $\{1\}$ in its representation” means it the following. Take any number $b\in\mathfrak C$. Then, the ternary representation of $b$ consists entirely of the digits $\{0,2\}$ (i.e., it does not contain any digit $1$). Let $a$ be the number constructed from $b$ in such a way that each digit $2$ in $b$ is replaced by $1$ in $a$ (and you leave the zeros alone). Define $f(b)=a$.
Then, take any $a\in[0,1]$. The aim to show that $a=f(b)$ for some $b\in\mathfrak C$. Consider the binary representation of $a$. Replace all digits $1$ in the binary representation in $a$ by $2$ and view this new number as a ternary representation. Call this new number $b$. Since $b$ consists entirely of the digits $\{0,2\}$, $b\in\mathfrak C$, and $f(b)=a$ by the construction of $f$. Hence, $f$ is surjective.

Upon a closer look, I might have misunderstood the source of the confusion (metaconfusion :-)). You may just need to replace “not consisting” by “consisting.” That is, you just consider those numbers whose ternary representations consist entirely of $\{0,2\}$ The set of such numbers is $\mathfrak C$, issues with uniqueness of representations aside.
