# Topological difference between the compact interval $I$ and the Cantor set

There is an homeomorphism between the Cantor set $$X = 2^\omega$$ (with the product topology) and the Cantor ternary set $$\mathcal{C}=[0,1] \smallsetminus \bigcup_{n=0}^\infty \bigcup_{k=0}^{3^n-1} \left(\frac{3k+1}{3^{n+1}},\frac{3k+2}{3^{n+1}}\right)$$, but this homeomorphism seems to hold as well between $$X$$ and the compact interval $$I = [0,1]$$, using the binary expansion, in spite of the ambiguity when the expansion ends in all 1's (e.g. $$0.01111\cdots = 0.10000\cdots$$), which merely duplicates the neighborhoods near these points, but the union of two open sets is always an open so that does not affect the continuity of the homeomorphism [edit: actually it turns out that it does prevent the continuity of the translation in the direction $$[0,1] \rightarrow \{0,1\}^\omega$$, see the answer].

I am missing any quirk stemming from this binary expansion ambiguity? Is there any reason at all why the Cantor set is presented first as a ternary set, instead as merely $$I$$, in topology textbooks?

Edit: Let's note the binary expansion function $$f: [0,1] \rightarrow \{0,1\}^\omega$$. Taking a neighborhood $$V$$ of $$y=(0,0,1,1,1,\cdots)$$ in $$\{0,1\}^\omega$$, defined as $$V=(j_n)_{n\in \mathbb{N}}/(j_0=j_1=0 \wedge j_2=1)$$, there seem to be no neighborhood $$U$$ of $$x=0.25 \in I, x \in U$$, such that its image $$f(U) \subset V$$.

So, they are not homeomorphic after all? Is it because I took the topology induced by the real line topology on $$I$$?

• The Cantor set is 'badly' disconnected but $I$ is connected. Jun 2 '20 at 5:13
• @KaviRamaMurthy Thank!! That's right. And what about the note I added? Is the homeomorphism still holding? Jun 2 '20 at 5:16
• Your binary expansion function is continuous but not bijective, hence not a homeomorphism. Jun 2 '20 at 5:18
• @DustanLevenstein That's it!! Thanks! However is it still possible to build an homeomorphism? Jun 2 '20 at 5:20
• No... You can't have a homeomorphism between a connected space and a disconnected space. Jun 2 '20 at 5:21

As explained in the comments, the Cantor set $$X$$ is disconnected and $$I$$ is connected, and there cannot exist any homeomorphism between connected and disconnected spaces. Such an homeomorphism would allow to build continuous paths in $$X$$ from continuous paths in $$I$$ (by composition) and thus $$X$$ would be connected ; contradiction.
The proposed binary expansion function $$f$$ is not surjective thus not bijective, and not even continuous (as shown at the end of the question), and so is not an homeomorphism. However the conversion function in the reverse direction, $$g: \{0,1\}^\omega \rightarrow [0,1]$$ is continuous, but not injective.