# Dense subset of Cantor set homeomorphic to the Baire space

Does anyone know a proof that the Cantor set, $\{0,1\}^{\mathbb{N}}$, has a dense subset homeomorphic to the Baire space, $\mathbb{N}^{\mathbb{N}}$? Thank you.

-

Define a mapping $f: \mathbb{N}^\mathbb{N} \to \{ 0,1 \}^\mathbb{N}$ by $$f : \langle x_n \rangle_{n \in \mathbb{N}} \mapsto 0^{x_0} 1 0^{x_1} 1 \cdots$$ where by $0^k$ we mean the length $k$ sequence consisting of only zeroes. It is fairly straightforward to show that this is a homeomorphic embedding of $\mathbb{N}^\mathbb{N}$ into $\{ 0,1 \}^\mathbb{N}$. It is also not too difficult to show that the range of $f$ is $$\{ \langle y_n \rangle_{n \in \mathbb{N}} \in \{ 0,1 \}^\mathbb{N} : y_n = 1\text{ for infinitely many } n \},$$ which is dense in $\{ 0,1 \}^\mathbb{N}$. (Use the fact that basic open sets in $\{ 0,1 \}^\mathbb{N}$ are determined by finite binary sequences, and then extend that finite binary sequence in any way to have infinitely many $1$s.)
If you happen to have it handy, there’s a pile-driver that takes care of the problem in short order: a characterization of the irrationals due originally to Aleksandrov, if I’m not mistaken. The space of irrationals is (up to homeomorphism) the unique zero-dimensional, separable, Čech-complete metrizable space that is nowhere locally compact. A Tikhonov space is Čech-complete iff it’s a $G_\delta$ in some (and in fact in any) compactification. Let $$X=\left\{x\in\{0,1\}^{\Bbb N}:x\text{ is not eventually constant}\right\}\;.$$ ($X$ corresponds to the points of the middle-thirds Cantor set that are not endpoints of removed intervals.)
• $X$ and $\{0,1\}^{\Bbb N}\setminus X$ are both dense in $\{0,1\}^{\Bbb N}$, which is therefore a compactification of $X$.
• $\{0,1\}^{\Bbb N}\setminus X$ is countable, so $X$ a $G_\delta$ in its compactification $\{0,1\}^{\Bbb N}$ and is therefore Čech-complete.
• $\{0,1\}^{\Bbb N}$ is a zero-dimensional, separable metrizable space, so $X$ is as well.
• That $X$ is nowhere locally compact follows easily from the fact that its complement is dense in $\{0,1\}^{\Bbb N}$.