Is composition of measurable functions measurable?

We know that if $ f: E \to \mathbb{R} $ is a Lebesgue-measurable function and $ g: \mathbb{R} \to \mathbb{R} $ is a continuous function, then $ g \circ f $ is Lebesgue-measurable. Can one replace the continuous function $ g $ by a Lebesgue-measurable function without affecting the validity of the previous result?


Here is the standard example:

Let $f\colon [0,1]\to [0,1]$ be the Cantor–Lebesgue function. This is a monotonic and continuous function, and the image $f(C)$ of the Cantor set $C$ is all of $[0,1]$. Define $g(x) = x + f(x)$. Then $g\colon [0,1] \to [0,2]$ is a strictly monotonic and continuous map, so its inverse $h = g^{-1}$ is continuous, too.

Observe that $g(C)$ measure one in $[0,2]$: this is because $f$ is constant on every interval in the complement of $C$, so $g$ maps such an interval to an interval of the same length. It follows that there is a non-Lebesgue measurable subset $A$ of $g(C)$ (Vitali's theorem: a subset of $\mathbb{R}$ is a Lebesgue null set if and only if all its subsets are Lebesgue measurable).

Put $B = g^{-1}(A) \subset C$. Then $B$ is a Lebesgue measurable set as a subset of the Lebesgue null set $C$, so the characteristic function $1_B$ of $B$ is Lebesgue measurable.

The function $k = 1_B \circ h$ is the composition of the Lebesgue measurable function $1_B$ and and the continuous function $h$, but $k$ is not Lebesgue measurable, since $k^{-1}(1) = (1_B \circ h)^{-1}(1) = h^{-1}(B) = g(B) = A$.


This Wikipedia article may be what you are looking for.

According to the article, a function $ f: \mathbb{R} \to \mathbb{R} $ is said to be Lebesgue-measurable if and only if for every Borel-measurable subset $ B $ of $ \mathbb{R} $, its pre-image $ {f^{\leftarrow}}[B] $ is a Lebesgue-measurable subset of $ \mathbb{R} $. Therefore, because we are dealing with two different $ \sigma $-algebras of $ \mathbb{R} $ here, the composition of two Lebesgue-measurable functions is not necessarily Lebesgue-measurable. This is precisely what GEdgar and AD. have mentioned.