an almost everywhere limit of simple functions is a uniform limit of countably valued functions. $(\Omega,\Sigma,\mu)$ is a probability measure space, and $X$ is a Banach space.
$f_n:\Omega\rightarrow X$ are simple functions for each $n\in\mathbb{N}$, and$f:\Omega\rightarrow X$ satisfies $f_n\rightarrow f$ almost everywhere (so we have $f$ is $\mu$-measurable in some sense.)
Can I choose a sequence of countably valued functions $(g_n)$ such that $\Vert g_n-f\Vert \rightarrow 0$ uniformly almost everywhere? i.e., for each $k>0$, $\exists N>0$ such that  $\Vert g_n-f\Vert<\frac{1}{k} \forall n>N$ a.e.
 A: Let $A_{n,i}=[i/n,(i+1)/n )$, this is a covering of $\Bbb R$ via countable intervals of length $1/n$. Define
$$g_n(x)=\sum_{i\in\mathbb Z} \frac in\ \chi_{f^{-1}(A_{n,i})}(x) $$
ie $g_n(x)=\frac1n\lfloor nf(x)\rfloor$. $g$ is countable valued and
$$|f(x)-g_n(x)|≤\frac1n$$
so $g_n$ converges uniformly to $f$.
The measure does not enter, so unless you want some other kinds of restrictions on $g_n$ you do not care about the properties of $f$ wrt $\mu$.

However in the case that $X$ is a Banach space it is needed. Let $S=\bigcup_n \mathrm{im}(f_n)$. Since the $f_n$ are simple functions $\mathrm{im}(f_n)$ is finite for all $n$ and $S$ is countable.
Since $f_n\to f$ pointwise almost everywhere there exists a measure zero set $N\subset \Omega$ so that for all $x\in \Omega-N$ and $n\in\Bbb N$ you have a $y\in S$ so that $\|y-f(x)\|≤\frac1n$.
With this information define $g_n(x)$ to be such a $y$ for $x\notin S$ and $0$ for $x\in S$. $g_n$ is countably valued (taking values in $S\cup \{0\}$) and $\sup_{x\in\Omega-N}\|g_n(x)-f(x)\|≤\frac1n$.
So you have uniform convergence "almost everywhere", where the almost everywhere is to be understood in the sense of the last equation.
