Let . By uniform convergence, choose such that for every and every . Since is continuous at , choose such that whenever and . The triangle inequality gives , so is continuous at .
For , set These sets are measurable, increase in , and their union is by pointwise convergence. Since , the measure of an increasing union lets us choose such that . Let . Then by countable subadditivity, and the definition of the sets gives uniform convergence on .
- each is simple and -measurable,
- for every and every ,
- for every ,
- if is bounded, then converges uniformly to on .
For , divide the range into dyadic intervals of length up to height , and let be the left endpoint of the interval containing , truncated at height . For general , apply this construction to the positive and negative parts and subtract. Measurability of the level sets follows from the measurability of , each has finite range, and the dyadic mesh tends to , giving pointwise convergence. If is bounded, the truncation height eventually exceeds the bound, so the dyadic mesh gives uniform convergence.
First prove the claim for simple Borel functions by choosing a closed subset of each level set whose complement has arbitrarily small outer measure, using the regularity characterization of Lebesgue measurable sets. On the union of those closed pieces, the simple function is continuous. For a general Borel measurable , use approximation by simple functions and Egorov's theorem to find a closed set outside a set of outer measure less than on which the simple approximants converge uniformly. The uniform limit of continuous functions is continuous, so is continuous.
The complement of a closed subset of is a countable union of disjoint open intervals. On each bounded complementary interval , define by linear interpolation between the endpoint values and ; on unbounded complementary intervals, extend constantly from the finite endpoint. Set on . The endpoint definitions and the continuity of on make continuous on all of .
Extend from to a Borel measurable function on , for example by assigning value off . By Luzin's theorem, choose a closed set such that the exceptional set has outer measure less than and the extension is continuous on . Put , using the regularity characterization to replace it by a closed subset of without increasing the exceptional outer measure. Then apply continuous extension from closed subsets to obtain with .
By the definition of Lebesgue measurable set, each inverse image differs by a null set from a Borel set. Applying this to the inverse images of intervals with rational endpoints and using countable unions, construct a Borel measurable that agrees with outside the union of countably many null exceptional sets. By countable subadditivity, that union has outer measure , which is exactly the displayed conclusion.