A basic result in real analysis is that any measurable function is an a.e. limit...
A basic result in real analysis is that any measurable function is an a.e. limit of a step function sequence (yet a pointwise limit of a simple function sequence), but the statement does not hold when the “a.e.” is replaced with everywhere. How to find a counterexample to the “everywhere” statement?
I’ve tried to use the fact that a step function is different from a simple one in that it is continuous on the complement of a zero-measure set, then maybe apply the Egorov’s thm. Considering this we are motivated to choose an everywhere discontinuous characteristic function of some “bad” measurable set. But then I got stuck, since once a.e. is involved, it seems hard to dispense with it (so as to arrive at an counter argument).
Answer & Explanation
It is possible to prove that there exists a Borel-measurable function which is not the everywhere-limit of any step function.
If is a sequence of real-valued functions on a set , then its point of convergence is given by
(Note that is precisely the set of all at which is a Cauchy sequence in .)
Now, if is any sequence of step functions, then is a finite union of intervals. So, it is a -set and hence belongs to the class in the Borel hierarchy on .
From this, we know that is an -set, and so, it lies in the class . Since we know that there exists a Borel set which is not in the class , the indicator function is Borel-measurable but cannot be an everywhere-limit of any sequence of step functions.
Although I have little expertise in the descriptive set theory, it seems that no "natural" examples of Borel sets outside of is known in the literature.
I believe I have an answer. Note that step functions are all Borel-measurable, and a limit of Borel-measurable is also Borel-measurable. So take the characteristic function of a Lebesgue-measurable but non-Borel-measurable set and we have an example.