A measurable function that does not admit pointwise approximation by step functions? 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. My question is how to find a counterexample to the “everywhere” statement.
My attempt:
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).
Please help, thx!
 A: 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.
A: It is possible to prove that there exists a Borel-measurable function which is not the everywhere-limit of any step function.

If $(f_n)$ is a sequence of real-valued functions on a set $X$, then its point of convergence is given by
$$E=\bigcap_{\varepsilon\in\mathbb{Q}_{>0}}\bigcup_{N\geq1}\bigcap_{m,n\geq N}\{x\in X:|f_m(x)-f_n(x)|<\varepsilon\}.$$
(Note that $E$ is precisely the set of all $x$ at which $(f_n(x))_{n\geq1}$ is a Cauchy sequence in $\mathbb{R}$.)
Now, if $(f_n)$ is any sequence of step functions, then $\{x\in X:|f_m(x)-f_n(x)|<\varepsilon\}$ is a finite union of intervals. So, it is a $G_{\delta}$-set and hence belongs to the class $\mathbf{\Pi}_{2}^{0}$ in the Borel hierarchy on $\mathbb{R}$.
From this, we know that $E$ is an $G_{\delta\sigma\delta}$-set, and so, it lies in the class $\mathbf{\Pi}_{4}^{0}$. Since we know that there exists a Borel set $B$ which is not in the class $\mathbf{\Pi}_{4}^{0}$, the indicator function $\mathbf{1}_{B}$ 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 $\mathbf{\Pi}_4^{0}$ is known in the literature. (See the comment in Section 23 of Kechris.) So, such set has to be artificially engineered. One such argument can be found in this post.
