Continuous extension from Cantor set to unit interval I have the following assignment:
Let $C \subset [0, 1]$ be the Cantor set, $x ∈ C$ satisfying
$$x = \sum_{n = 1} ^ \infty \frac{a_n}{3^n} \; ,$$
and $\varphi: C \to [0,1]$ a function defined as
$$\varphi(x) = \sum_{n=1} ^ \infty \frac{a_n}{2^{n+1}} .$$
I want to prove:
a) The function $\varphi: C \to [0,1]$ is continuous, surjective and monotone.
b) There exists a continuous extension $\hat{\varphi}:[0,1] \to [0,1]$ of $\varphi$, such that $\hat{\varphi}$ is constant in any open set $U$ of $[0,1] \setminus C$.
c) The function $\hat{\varphi}$ is almost everywhere differentiable.
My thoughts
a) The function $\hat{\varphi}$ seems to be an identification of the Cantor set with the binary representation of elements in the unit interval. From this, I don't know how to prove continuity. Which topology of $C$ should I consider? How to prove continuity?
b) $[0,1]$ is a complete metric space. I was thinking that if $\hat{\varphi}$ is uniformly continuous, this could show the existence of a continuous extension over $[0,1]$. However, this fails since the Cantor set is not dense in $[0,1]$.
c) Should I work with the weak derivative of $\hat{\varphi}$?
Thanks for any help
 A: Hints: 
$1).\ $ First show that $\varphi$ is well-defined, because $x$ may have two representations. 
$2). \ $ For continuity, write $\epsilon>0$ in its binary expansion $(a_k)$ and choose $\delta>0$ to be the number with tertiary expansion $(2a_k)$. Then, if $N$ is the first non-zero digit of $\delta$ (and $\epsilon$) and $|x-y|<\delta,$ then the first $N-1$ digits of $x$ and $y$ agree, and so, so do the first $N-1$ digits of $\varphi(x)$ and $\varphi(y).$
$3).\ $ For surjectivity, let $y\in [0, 1]$. Write $y$ in its binary expansion, $(b_k)$ and define $a_k = 2b_k$  Then $(a_k)$ is a number in its tertiary expansion contained in $[0,1].$ 
$4).\ \varphi$ is monotone: If $x < y$, then their ternary expansions $(x_n)$ and $(y_n)$ must differ at some point $N$ and at that point $x_N < y_N.$ 
$5).\ \varphi$  is constant on $[0,1]\setminus C:$ consider $x,y\in \left(\frac{3k-2}{3^n},\frac{3k-1}{3^n}\right)$. Using the ternary expansions $(x_n)$ and $(y_n)$ for $x$ and $y$, assume wlog that $n$ is the smallest integer such that $x_n=y_n=1.$ Then, $x_k = y_k $ for all $k < n$.
$6).\ $  Almost everywhere differentiability follows by monotonicity.
