Equivalence of Definitions of Cantor Set

Theorem
The two definitions of the Cantor set:


 * $(1): \quad \displaystyle \mathcal C = \bigcap_{n=1}^\infty \ \mathcal C_n$

where:
 * $\displaystyle \mathcal C_n := \left[{0 .. 1}\right] \setminus \bigcup_{i=1}^{\frac{3^n - 1} 2} \left({\dfrac{2i-1}{3^n} .. \dfrac{2i}{3^n}}\right)$


 * $(2): \quad \mathcal C$ consists of all the points in $\left[{0 .. 1}\right]$ which can be expressed in base $3$ without using the digit $1$

are logically equivalent.

Proof
Let $\mathcal C_n$ be defined as in $(1)$.

Let $x \in \left[{0 .. 1}\right]$.

We need to show that:
 * $x$ can be written in base $3$ without using the digit $1 \iff \forall n \in \Z, n \ge 1: x \in C_n$

First we note that from Sum of Infinite Geometric Progression:
 * $\displaystyle 1 = \sum_{n=0}^\infty \frac 2 3 \left({\frac 1 3}\right)^n$

... that is:
 * $1 = 0.2222 \ldots_3$

Thus any real number which, expressed in base $3$, ends in $\ldots 10000 \ldots$ can be expressed as one ending in $\ldots 02222 \ldots$ by dividing the above by an appropriate power of $3$.