Consider the Cantor Set $C=\{0,1\}^{\omega}$, that is, the space of all sequences $(b_1,b_2,...)$ with each $b_i\in\{0,1\}$. Define $g:C\rightarrow[0,1]$ by $$g(b_1,b_2,...)=\sum\limits_{i=1}^{\infty}\dfrac{b_i}{2^i}$$ In other words, $g(b_1,b_2,...)$ is the real number whose digits in base 2 are $0.b_1b_2...$
Prove that $g$ is continuous.
Here is my attempt:
Let sequences $(a_n)_{n\in\mathbb{N}}$ and $(b_n)_{n\in\mathbb{N}}$ be elements of the Cantor Set $C.$ For fixed $n\in\mathbb{N}$ let $A_n=(a_1,a_2,...,a_n)$ and $B_n=(b_1,b_2,...,b_n)$ be the first $n$ terms in each of those sequences. If $A_n\neq B_n$, then $\exists m=min\{k\in\{1,2,...,n\}:a_k\neq b_k\}$ and the following holds: $$\begin{array}{c} \left|\sum\limits_{k=1}^n\dfrac{a_k}{2^k}-\sum\limits_{k=1}^n\dfrac{b_k}{2^k}\right|=\left|\sum\limits_{k=1}^n\dfrac{a_k}{2^k}-\dfrac{b_k}{2^k}\right|\geq\dfrac{|a_m-b_m|}{2^m}-\left|\sum\limits_{k=m+1}^n\dfrac{a_k}{2^k}-\dfrac{b_k}{2^k}\right|\geq\\ \geq\dfrac{|a_m-b_m|}{2^m}-\sum\limits_{k=m+1}^n\dfrac{|a_k-b_k|}{2^k} \\ \text{where $|a_m-b_m|$=1 and}\\ \sum\limits_{k=m+1}^n\dfrac{|a_k-b_k|}{2^k}\leq \sum\limits_{k=m+1}^n\dfrac{1}{2^k}=\dfrac{1}{2^m}\\ \text{Now,}\\ \left|\sum\limits_{k=n+1}^{\infty}\dfrac{a_k}{2^k}-\sum\limits_{k=n+1}^{\infty}\dfrac{b_k}{2^k}\right|=\left|\sum\limits_{k=n+1}^{\infty}\dfrac{a_k-b_k}{2^k}\right|\leq\\ \leq\sum\limits_{k=n+1}^{\infty}\dfrac{|a_k-b_k|}{2^k}\leq\sum\limits_{k=n+1}^{\infty}\dfrac{1}{2^k}=\dfrac{1}{2^n}\\ \text{Therefore, if $A_n\neq B_n$, then}\\ \left|f(a)-f(b)\right|=\left|\sum\limits_{k=1}^{\infty}\dfrac{a_k-b_k}{2^k}\right|=\left|\sum\limits_{k=1}^{n}\dfrac{a_k-b_k}{2^k}+\sum\limits_{k=n+1}^{\infty}\dfrac{a_k-b_k}{2^k}\right|\geq\\ \geq\left|\sum\limits_{k=1}^{n}\dfrac{a_k-b_k}{2^k}\right|-\left|\sum\limits_{k=n+1}^{\infty}\dfrac{a_k-b_k}{2^k}\right|\geq\dfrac{1}{2^n}-\dfrac{1}{2^n}=0 \end{array}$$
I think I must have done something wrong because I wanted $|f(a)-f(b)|$ to be greater than or equal to something in terms of $m$ or $n$ so that I can say choose $n$ (or $m$) such that (something like) $\dfrac{1}{2^n}<\varepsilon$, but I just got 0 instead. How can I improve my proof so that I can achieve this?