Assume that we know :
$\forall x \in \mathbb [0,1] $ there exists a sequence of integers like $t_{x_1},t_{x_2},t_{x_3}$ such that $\forall k\space\space t_{x_k}\in\{0,1,2\}$ and :
$x=\frac{t_{x_1}}{3}+\frac{t_{x_2}}{3^2}+\frac{t_{x_3}}{3^3}+\dots$
In other words, Assume that we know $x$ has ternary expansion.
Now define a function like $f:[0,1] \rightarrow \mathbb R$ in this way :
If $1$ does not exist in the ternary expansion, $f(x)=\sum_{k=1}^{\infty}\frac{\frac{t_{x_k}}{2}}{2^k}$
Otherwise define $j_x=min\{k:t_{x_k}=1\}$ and $f(x)=\sum_{k=1}^{j_x-1}\frac{\frac{t_{x_k}}{2}}{2^k} + \frac{1}{2^{j_x}}$
Questions:
Prove that $f(x)$ is well defined and $\forall x \in [0,1] \space 0 \le f(x) \le 1$( Show that if $x$ has two ternary expansion, it doesn't make any difference on the value of $f(x)$. Notice that $f(x)$ is the binary expansion of a real number. )
Prove that $f(x)$ is ascending on $[0,1]$.
Find all of the intervals on which $f(x)$ is constant.
Note : The definition of $f(x)$ is freaking me out ! I don't know where to start!
Thanks in advance.