Example of a continuous function that is not Lebesgue measurable

Let $\mathcal{L}$ denote the $\sigma$-algebra of Lebesgue measurable sets on $\mathbb{R}$. Then, if memory serves, there is an example (and of course, if there is one, there are many) of a continuous function $f:\mathbb{R}\rightarrow \mathbb{R}$ that is not measurable in the sense that $f:(\mathbb{R},\mathcal{L})\rightarrow (\mathbb{R},\mathcal{L})$ is measurable, but unfortunately, I was not able to recall the example. Could somebody please enlighten me?

Note that this is not in contradiction with the usual "Every continuous function is measurable.", because in this statement it is implicit that the co-domain is equipped with the Borel sets, not the Lebesgue measurable sets.

• I don't understand your question, a continuous function is always measurable since preimage of open sets are open (open sets are borel sets then open sets are measurable). – Gaston Burrull Aug 29 '13 at 22:05
• @GastónBurrull The $\sigma$-algebra on the codomain is the $\sigma$-algebra of Lebesgue-measurable sets. Is it impossible that a Lebesgue null-set has non-measurable preimage under a continuous map? – Daniel Fischer Aug 29 '13 at 22:27
• @GastónBurrull That the preimages of open sets are open shows that a continuous function $f\colon\mathbb{R}\to\mathbb{R}$ is a measurable function $f\colon (\mathbb{R},\mathcal{B})\to (\mathbb{R},\mathcal{B})$, where $\mathcal{B}$ is the Borel $\sigma$-algebra. It is then also a fortiori measurable $(\mathbb{R},\mathcal{L})\to (\mathbb{R},\mathcal{B})$, but if that implies it's also $(\mathbb{R},\mathcal{L})\to (\mathbb{R},\mathcal{L})$ measurable, that's a non-trivial result. – Daniel Fischer Aug 29 '13 at 22:45
• @GastónBurrull Ah. A function $f \colon (X,\mathcal{X}) \to (Y,\mathcal{Y})$ between two measure spaces is called measurable if $(\forall S \in \mathcal{Y})(f^{-1}(S) \in \mathcal{X})$. – Daniel Fischer Aug 30 '13 at 0:07
• @DanielFischer Thanks for clarification – Gaston Burrull Aug 30 '13 at 0:10

The standard example is given by the function $g(x)=f(x)+x$, where $f$ is the devil's staircase function of Cantor. It turns out that the function $g$ is a homeomorphism from $[0,1]$ onto $[0,2]$ and has the property that $\mu(g(C))=1$ (where $C$ is the Cantor set). Pick a non measurable $A\subset g(C)$. First note that $B=g^{-1}(A)$ is measurable since $B\subset C$. It follows that $g^{-1}$ is continuous, $B$ is Lebesgue measurable but $(g^{-1})^{-1}(B)$ is non measurable.
• why couldn't you use the Cantor function directly? It is also a homeomorphism, and $f^{-1}(B)$ is non-measurable. – Rodrigo Jan 1 '16 at 16:37
• @Rodrigo: the example ends up showing that $g^{-1}$ is the counterexample. The Cantor function is not a homeomorphism, since it is not injective, so the argument does not apply. – Martin Argerami Jun 3 '18 at 12:25