fun question about binary representations suppose $x \in [0,1]$ can be represented as:
$x = 0,a_1(x)a_2(x) \cdots$
with $a_n \in \{0,1\}$
By this we mean that $x = \sum_{n=1}^{\infty} \frac{a_n(x)}{2^n}$. Note that some x have two representations, then one must choose the one where $a_n(x) = 1$ for large enough n.
Let $f(x): [0,1] \rightarrow [0,1]$ be represented as:
$f(x) = 0,a_2(x)a_3(x) \cdots = \sum_{n=1}^{\infty} \frac{a_{n+1}(x)}{2^n}$
Prove that $a_n(x): [0,1] \rightarrow [0,1]$ is measurable for all $n$ and $f(x)$ is measurable (here we mean Borel/Borel measurable of course)
hint: for the second part consider $f_k(x) = \sum_{n=1}^{k} \frac{a_{n+1}(x)}{2^n}$
I tried proving this, but the main problem is that i don't see how $a_n(0)^{-1}$ and $a_n(1)^{-1}$ look like, if we take intervals which are disjunct of $0$ and $1$ this function is of course empty, but what happens if we have an interval with $1$ or $0$ or both?
I think my confusion is mainly that the $x$ is constructed with $a_n$.
I hope you guys can help me with this!
With kind regard,
Kees 
 A: Try to prove that $$
f(x) = \begin{cases}
2x, & x\in[0,1/2],\\
2x-1,& x\in(1/2,1].
\end{cases}
$$
Then the measurability of $f$ is quite straightforward.  
Concerning that of $a_n(x)$, try to understand what the sets $\{x: a_n(x) = 0\}$ and $\{x: a_n(x) = 1\}$ are. These are sets of numbers having $n$th digit equal to $0$ (or $1$) in their binary decomposition. So, say, for $n=1$ these are $[0,1/2]$ and $(1/2,1]$; for $n=2$, $[0,1/4]\cup (1/2,3/4]$ and $(1/4,1/2]\cup (3/4,1]$. So try to show that for bigger $n$ these sets are also unions of some intervals.
A: Let $E$  be the set of $x\in [0,1]$ whose binary expansion ends in all $1$'s.  Then $E$ is countable. Hence it will suffice to show each $a_n(x)$ is Borel measurable on $[0,1]\setminus E.$ Let $F:\mathbb {R}\to \mathbb {R}$ denote the floor function. Then $F$ is Borel measurable on $\mathbb {R}.$ Recall also that if $f,g:\mathbb {R}\to \mathbb {R}$ are Borel measurable, then so is $f\circ g.$
That out of the way, we can define an explicit formula for $a_n(x):$ If $x \in [0,1]\setminus E,$ then for $n=1,2,\dots$
$$a_n(x) = F(2(2^{n-1}x - F(2^{n-1}x))).$$
That's easy to verify. By the remarks above, each $a_n$ is Borel measurable on $[0,1].$ As for the map $x\to .a_2(x) a_3(x)\cdots,$ this is just the map $x \to 2x-a_1(x)$ on $[0,1]\setminus E,$ so it's Borel measurable too.
