Measurable Functions as Limits (a.e) of Step Functions I saw the following theorem and its proof. 
Theorem 1: Given a measurable function $f$ on $E\subseteq \mathbb{R}$, there exists a sequence of simple functions $\{f_k\}$ which converges point-wise to $f$ everywhere.
I want to see the proof of the following theorem, following Stein-Shakarchi.
Theorem 2: Given a measurable function $f$ on $E\subseteq \mathbb{R}$, there exists a sequence of step functions $\{f_k\}$ which converges point-wise to $f$ almost everywhere.
The proof given by Stein-Shakarchi starts with- it is sufficient to show that any simple function is limit almost everywhere of a sequence of step functions. 
I don't understand the italic statement. Can you help me? Also, is there simple proof of Theorem 2, which do not refers to Theorem 1?
 A: Here is a simple proof that is tediously long. As with many proofs dealing
with measure, it proceeds by showing an equivalent result for indicator
functions, then simple functions and then measurable function.
I think the essence of the result is 1), the rest is generalisation.
I am assuming that you are using the Lebesgue measure $m$.
Since we can extend $f$ by letting $f(x)=0$ for $x \notin E$, there is no loss of generality in taking $E= \mathbb{R}$.
1) If $A$ has finite measure and $\epsilon>0$, we can find a finite collection of disjoint open intervals $I_1,...,I_n$ such that $m (A \triangle \cup_{k \le n} I_k) \le \epsilon$.
Suppose $A$ is measurable set of finite measure. Then for any $\epsilon>0$ there is a (possibly countable) collection of open intervals $\{I_k\}$ such that $A \subset \cup_k I_k$ and  $mA \le \sum_k m I_k \le mA+ {\epsilon \over 2}$. Since $m (\cup_k I_k) = m A + m (\cup_k I_k \setminus A)$, we have
$m ( \cup_{k \le n} I_k \setminus A) \le  m ( \cup_{k} I_k \setminus A) \le { \epsilon \over 2}$, for any $n$.
We also have $mA = m (A \cap \cup_{k \le n} I_k ) + m ( A \setminus \cup_{k \le n} I_k)$, hence by continuity of measure, we can find some $n$ such that
$m ( A \setminus \cup_{k \le n} I_k) \le { \epsilon \over 2}$. Hence for some $N$ we have $m (A \triangle \cup_{k \le n} I_k) \le \epsilon$.
To obtain  disjoint intervals, suppose two of the open intervals $I_1,...,I_n$ overlap, say  $I_{k_1}$ and $I_{k_2}$. Then $I_{k_1} \cup I_{k_2}$ is also an open interval that contains both intervals and
$m (I_{k_1} \cup I_{k_2}) \le m I_{k_1} + m I_{k_2}$. So, we remove 
$I_{k_1}$, $I_{k_2}$ from the collection and replace them by the combined
interval $I_{k_1} \cup I_{k_2}$. We continue until there are no overlapping intervals. Let $\{ I_k' \}_{k=1}^{n'}$ be the resulting collection of disjoint intervals. Since $\cup_{k=1}^n I_k = \cup_{k=1}^{n'} I_k'$, all of the above estimates are still valid and we have 
$m (A \triangle \cup_{k \le n'} I_k') \le \epsilon$.
2) If $B = I_1 \cup \cdots \cup I_n$ where the $I_k$ are disjoint intervals, then $1_{B} = \sum_{k=1}^n 1_{I_k}$ is a step function.
3) Let $A$ have finite measure and $\epsilon>0$, then there exists a step function $s$  and a set $\Delta$ such that $1_A(x) = s(x)$ for $x \notin \Delta$ and $m \Delta \le \epsilon$. Furthermore, if $A \subset J$, where $J$ is an bounded interval, we can take $\Delta \subset J$ as well (in particular, we have
$s(x) = 0$ for $x \notin J$).
From 1), we have disjoint open intervals $I_1,...,I_n$ such that
$m (A \triangle \cup_{k \le n} I_k) \le \epsilon$. Let $s=\sum_{k=1}^n 1_{I_k}$ and $\Delta = A \triangle \cup_{k \le n} I_k$.
Then we see that $m \Delta \le \epsilon$ and
if $x \notin \Delta$, we have $s(x) = 1_A(x)$.
If $A \subset J$, a bounded interval, let $s'=s \cdot 1_J$, and note that $s'$
is a step function. Notice that if $x \notin J$, then $s'(x) = 0 = 1_A(x)$ and so we have $s'(x) = 1_A(x)$ for $x \notin \Delta' = \Delta \cap J$, with $m \Delta' \le m \Delta \le \epsilon$.
4) If $A$ is measurable and $\epsilon>0$, then there exists a step function $s$  and a set $\Delta$ such that $1_A(x) = s(x)$ for $x \notin \Delta$ and $m \Delta \le \epsilon$.
(Note that the finite sum of step functions is a step function.)
Let $B_n = A \cap [n,n+1)$ and $\epsilon>0$. Let $s_n$ and $\Delta_n \subset [n,n+1)$ be the step function and set such that $1_{B_n}(x) = s_n(x)$ for all $x \notin \Delta_n$ with $m \Delta_n \le {1 \over 2^{|n|+2}} \epsilon$. (Note that we can take $J=[n,n+1)$, so that $\Delta_n \subset [n,n+1)$. Consequently, $s_n(x) = 0$ when $x \notin [n,n+1)$.)
Let $s = \sum_n s_n$ and $\Delta = \cup_n \Delta_n$. Then if $x \notin \Delta$, we have $s(x) = \sum_n s_n(x) = \sum_n 1_{B_n}(x) = 1_{B_{\lfloor x \rfloor}} (x) = 1_A(x)$ and $m \Delta \le { 3 \over 4} \epsilon$.
5) If $\sigma$ is a real valued simple function and $\epsilon>0$, there exists a step function $s$ and a set $\Delta$ such that $m \Delta \le \epsilon$ and
$\sigma(x) = s(x) $ for $x \notin \Delta$.
Suppose $\sigma = \sum_{k=1}^n \alpha_k 1_{A_k}$, where the $A_k$ are measurable. Using 4), choose $s_k, \Delta_k$ such that $1_{A_k}(x) = s_k(x)$ for $x \notin \Delta_k$, and $m \Delta_k \le {1 \over n} \epsilon$. If we let
$s = \sum_k \alpha_k s_k$ (note that $s$ is a step function)
 and $\Delta = \cup_k \Delta_k$, we have $m \Delta \le \epsilon$ and if
$x \notin \Delta$, then $\sigma(x) = s(x)$.
And finally:
6) If $f$ is measurable, there are step functions $s_n$ such that $s_n(x) \to f(x)$ for ae. $x$.
There are real valued simple functions $\sigma_n$ such that $\sigma_n(x) \to f(x) $ for all $x$. Using 5), choose step functions $s_n$ and sets $\Delta_n$
such that $s_n(x) = \sigma_n(x)$ for $x \notin \Delta_n$, and 
$m \Delta_n \le {1 \over n} {1 \over 2^{n+1}}$.
Note that if $s_n(x)$ does not converge to $f(x)$, then we must have $s_n(x) \neq \sigma_n(x)$ for infinitely many $n$. This means $x \in \Delta_n$ infinitely often. Equivalently, we have
$x \in Q=\cap_n \cup_{k \ge n} \Delta_k$.
Since $m Q \le m (\cup_{k \ge n} \Delta_k)
\le \sum_{k \ge n} {1 \over k 2^{k+1}} \le  {1 \over n}$ for all $n$, we see that $m Q = 0$.
Consequently, for any $x \notin Q$, there is some $N$ such that
$s_n(x) = \sigma_n(x)$ for all $n \ge N$, and so
$s_n(x) \to f(x)$.
A: Some notes for myself:
Let $H=(0,1]^d$ and use the $\|\cdot\|_\infty$ norm. Let ${\cal H_n} = \{ {1 \over 2^n} (H+\{x\}) | x \in \mathbb{Z}^d)$.
Note that ${\cal H_n}$ forms a partition of $\mathbb{R}^d$.
For $x \in \mathbb{R}^d$, let $p_n(x) = {1 \over 2^n} \lfloor 2^n x \rfloor $ (with the floor taken for each component separately) and note that $\|x-p_n(x)\| < {1 \over 2^n}$, that is, $x \in B(p_n(x),{1 \over 2^n})$.
Also, note that $B(p_n(x),{1 \over 2^n}) \subset B(x,{2 \over 2^n})$.
Suppose $V$ is open and bounded. Define $V_n = \cup \{ A \in {\cal H_n} | A \subset V \}$. Note that $V_n \subset V$ and, more relevant, $V_n$ is expressible as a step function as it can be written as the sum of indicators of a finite number of elements of
${\cal H_n}$.
Furthermore, note that $\cup_n V_n = V$ and hence $m(V \setminus V_n) \to 0$.
Suppose $E$ is measurable with finite measure. Let $E_M = E \cap B(0,M)$ and note that
$m(E \setminus E_M) \to 0$. The $E_M$ are measurable, bounded and have finite measure.
By the definition of the Lebesgue measure, for any set $B$ of finite measure, there
is a sequence of open sets $W_k$ containing $B$ such that $m(W_k \setminus B) \to 0$.
Finally, suppose $E$ has finite measure (and hence measurable) and $\epsilon>0$. Then
for some $M$ we have a measurable bounded $E_M$ such that $m(E\setminus E_M) < {1 \over 3} \epsilon$. Now pick an open $W_k$ containing $E_M$ such that $m(W_k\setminus E_M) < {1 \over 3} \epsilon$. Finally, pick a $V_n$ contained in $W_k$ such that 
$m(W_k\setminus V_n) < {1 \over 3} \epsilon$.
Note that $1_{E}-1_{V_n} = 1_E-1_{E_M}+1_{E_M}-1_{W_k}+1_{W_k}-1_{V_n}$, and
$m(A \triangle B) = \int |1_A-1_B | dm$, so we have
$\int | 1_{E}-1_{V_n} | dm \le  \int |1_E-1_{E_M} |dm + \int |1_{E_M}-1_{W_k} |dm + \int |1_{W_k}-1_{V_n} |dm <  {1 \over 3} \epsilon + {1 \over 3} \epsilon + {1 \over 3} \epsilon = \epsilon$.
