Approximating bounded functions $f \in B([0,1], \mathbb{R})$ by simple functions (not necessarily measurable) If we have any arbitrary bounded function $f: [0,1] \to \mathbb{R}$, is it possible to approximate this by a sequence of simple functions, i.e. functions of the form $\sum_{j=1}^{n} a_j \chi_{A_j}$ (where $\chi_{A}$ denotes the characteristic function on $A$)?
$f$ may not be measurable, all we are given is that it is in $B([0,1], \mathbb{R})$, which we are considering as a normed vector space with the sup-norm.
 A: Since $f$ is bounded, set $K=\overline{f([0,1])}$. Then $K$ is a compact set. Let $E=\{r_n\}$ be a countable, dense subset of $K$ and for $\varepsilon>0$ consider the open cover $\mathcal{U}_\varepsilon=\{U_{n,\varepsilon}\}_{n=1}^\infty$, where $U_{n,\varepsilon}=(r_n-\varepsilon,r_n+\varepsilon)$. Now for any $\varepsilon>0$ this cover reduces to a finite subcover, so there exists an integer $M_\varepsilon$ and a function $q:\{1,\dots, M_\varepsilon\}\to\mathbb{N}$ (just a fancy way of picking $M_\varepsilon$-many indexes) so that
$$K\subset\bigcup_{i=1}^{M_\varepsilon}U_{q(i),\varepsilon}$$
For $n\geq1$ set $M_n=M_{\frac{1}{n}}$ and $V_{i,n}=f^{-1}(U_{q(i),\frac{1}{n}})$ for all $i=1,\dots, M_n$. Define
$$f_n(x)=\sum_{i=1}^{M_n}r_{q(i)}\cdot\chi_{V_{i,n}}$$
for $x\in[0,1]$. These are simple functions. Now let $x\in[0,1]$. Then $f(x)\in K$ so for each $n\geq1$ we have that $f(x)$ belongs to some $U_{q(i),\frac{1}{n}}$, so $f_n(x)=r_{q_i}$ while $f(x)\in U_{q(i),\frac{1}{n}}$, so $|f_n(x)-f(x)|<\frac{1}{n}$.
This shows that $f_n\to f$ uniformly, where $f_n$ are simple functions. Of course the sets can be extremely crazy, but you put no such restriction so there is no problem with that.
