Let $g: [0, 1] \to \mathbb R$ be a Lebesgue-measurable function (in the classical sense: the inverse images of Borel sets are Lebesgue-measurable). It is a classical fact in analysis that $f \circ g$ is Lebesgue-measurable as soon as $f$ is continuous, for instance, or Borel-measurable (the inverse images of Borel sets are Borel), but not necessarily if $f$ is only Lebesgue-measurable. My question is: what is the sharpest assumption that one can put on $f$ guaranteeing that $f \circ g$ is Lebesgue-measurable for every Lebesgue-measurable $g$?


More precisely, consider the class
$$
\begin{aligned}
\mathcal F = \{f: \mathbb R \to \mathbb R \mid {} & g: [0, 1] \to \mathbb R \text{ is Lebesgue-measurable} \implies \\
& f \circ g \text{ is Lebesgue-measurable}\}.
\end{aligned}
$$
$\mathcal F$ contains all Borel-measurable functions, but does it contain other functions? Or is it equal to the set of all Borel-measurable functions?


This question looks quite natural and I imagined there should be some classical result in real analysis providing its answer, but I could not find it in standard textbooks. I initially conjectured that $\mathcal F$ coincides with the set of all Borel-measurable functions. This would mean that, if $f$ is not a Borel-measurable function, then there exists a Lebesgue-measurable $g$ such that $f \circ g$ is not Lebesgue-measurable. The idea would be to pick such an $f$, pick a Borel set $A$ such that $B = f^{-1}(A)$ is not Borel, and try to construct a *Lebesgue-measurable* $g$ such that $g^{-1}(B)$ is *not* Lebesgue-measurable, but I cannot see how to construct such a $g$ while keeping its Lebesgue-measurability. Any ideas or any references to this question?


**Edit:** made the statements about Lebesgue- or Borel-measurability more precise.



Sharp assumption for preserving Lebesgue measurability by left composition
The answer is: $\cal F$ is the family of universally measurable functions.




---


For simplicity, let us consider functions on $[0,1]$ rather than on $\mathbb R$. Let $\cal B$ be the family of Borel sets, $\cal B^\star$ the family of universally measurable sets, and $\cal L$ the family of Lebesgue sets.




---


Clearly, it is sufficient that $f$ is universally measurable: every $\cal B/\cal L$-measurable function is in fact $\cal B^\star/\cal L$ measurable (for clearly $\cal L^\star = \cal L$); see, for example, the [PlanetMath entry](https://planetmath.org/UniversallyMeasurable).




---


The above condition turns out to be necessary, too. Indeed: suppose that $f$ is not universally measurable, that is, $A := f^{-1}(B) \notin \cal B^\star$ for some $B \in \cal B$. We will construct a continuous (!) function $g$ such that $g^{-1}(A)$ is not in $\cal L$. Of course, this implies that $f \notin \cal F$.


There is a Borel probability measure $\mu$ such that $A$ is not $\mu$-measurable. Let $\lambda$ be the Lebesgue measure on $[0, 1]$. Considering $\tfrac{1}{2} \mu + \tfrac{1}{2} \lambda$ rather than $\mu$, we may assume that the distribution function $h$ of $\mu$ is strictly increasing. Removing the atoms of $\mu$ and renormalising it, we can make $\mu$ atomless and $h$ is continuous.


We have $\mu(E) = \lambda(h(E))$ for every Borel set $E$. If $h(A)$ were Lebesgue measurable, we would have two Borel sets $F\_1$ and $F\_2$ such that $F\_1 \subseteq h(A) \subseteq F\_2$ and $\lambda(F\_2 \setminus F\_1) = 0$. But then $E\_1 = h^{-1}(F\_1)$ and $E\_2 = h^{-1}(F\_2)$ would be Borel sets such that $E\_1 \subseteq A \subseteq E\_2$ and $$\mu(E\_2 \setminus E\_1) = \lambda(h(E\_2 \setminus E\_1)) = \lambda(F\_2 \setminus F\_1) = 0 ,$$ and consequently $A$ would be $\mu$-measurable.


Now if $g$ is the inverse of $h$, then $g$ is continuous and strictly increasing, and $g^{-1}(A) = h(A)$ is not Lebesgue-measurable.


