How to prove that $\phi_n\uparrow f$, where $f\in R[a,b]$ and $\phi_n$ is like below? $f$ is a given function that belongs to $R[a,b]$. For each $n\in\mathbb{N}$, let $P_n$ be the partition of $[a,b]$  
$$P_n=\{ a = x_0 < x_1 < \cdots < x_{2^n} = b\}$$  
such that  
$$x_k - x_{k-1} = \frac{b-a}{2^n}.$$
For this partition, we associate the step function $\phi_n$ defined by  
$$\phi_n = \sum_{k=1}^n m_k\mathcal{X}_{I_k},$$  
where $m_k=\inf\{f(x); x\in I_k\}$ and $I_k = (x_{k-1},x_k)$. How can I prove that $\phi_n\uparrow f$ almost everywhere on $[a,b]$?
It's a "exercise" from Chae's Lebesgue Integration book. We can't use the convergence theorems yet. We have to prove that $R[a,b]\subset L^+$.
EDIT: This question is inside the proof of Proposition 3.6 in the page 60.
 A: First let's give some notation: Given a function $a$ and a property $P(x)$ about real numbers $x\in[a,b]$, we denote $[P(a)]=\left\{x\in[a,b]:P(a(x))\right\}$.
Example: Given functions $\alpha$ and $\beta$, $[\alpha<\beta+1]=\left\{x\in[a,b]:\alpha(x)<\beta(x)+1\right\}$.
For a subset $A$ of $\mathbb{R}$, we denote $m(A)$ its (Lebesgue) measure.

For every $x$, the sequence $\left\{\phi_n(x)\right\}$ is increasing and smaller than $f(x)$. If $\phi_n(x)$ does not converge to $f(x)$, then there exists $k\in\mathbb{N}$ such that $\phi_n(x)<f(x)-\frac{1}{k}$ for all $n$.
For each $k$, let $A_k=\left\{x\in [a,b]:\phi_n(x)<f(x)-\frac{1}{k}\text{ for all }n\right\}$. Then the set of $x\in [a,b]$ for which $\phi_n(x)$ does not converge to $f(x)$ is $\bigcup_{k=1}^\infty A_k$. Using the notation above, we have $A_k=\bigcap_n[\phi_n<f-\frac{1}{k}]$ and $[\phi_n\not\to f]=\bigcup_k A_k$.
The integrals of the $\phi_n$ are Riemann sums with respect to finer and finer partitions, so since $f$ is Riemann integrable, they converge to $\int_{[a,b]} f(x)dx$.
Let $k\in\mathbb{N}$ be fixed. We will show that $m(A_k)=0$. Let $\epsilon>0$. Choose $n$ sufficiently large so that $|\int_{[a,b]}\phi_n(x)dx-\int_{[a,b]} f(x)dx|<\epsilon$. Then
\begin{align*}
\int_{[a,b]}f(x)dx&<\int_{[a,b]}\phi_n(x)dx+\epsilon\\
&=\int_{[\phi_n\geq f-\frac{1}{k}]}\phi_n(x)dx+\int_{[\phi_n<f-\frac{1}{k}]}\phi_n(x)dx+\epsilon\\
&\leq\int_{[\phi_n\geq f-\frac{1}{k}]}f(x)dx+\int_{[\phi_n<f-\frac{1}{k}]}\phi_n(x)dx+\epsilon,\qquad\text{because }\phi_n\leq f\\
&\leq\int_{[\phi_n\geq f-\frac{1}{k}]}f(x)dx+\int_{[\phi_n<f-\frac{1}{k}]}(f(x)-\frac{1}{k})dx+\epsilon\tag{$*$}\\
&=\int_{[\phi_n\geq f-\frac{1}{k}]}f(x)dx+\int_{[\phi_n<f-\frac{1}{k}]}f(x)dx-\frac{1}{k}m([\phi_n<f-\frac{1}{k}])+\epsilon\\
&=\int_{[a,b]}f(x)dx-\frac{1}{k}m([\phi_n<f-\frac{1}{k}])+\epsilon,
\end{align*}
where the inequality ($*$) follows becase $\phi_n(x)<f(x)-\frac{1}{k}$ in $[\phi_n<f-\frac{1}{k}]$, which is the set on which the integration occurs.
Thus, since $A_k\subseteq [\phi_n<f-\frac{1}{k}]$,
$$m(A_k)\leq m([\phi_n<f-\frac{1}{k}])<k\epsilon.$$
Letting $\epsilon\to 0$, we conclude that $m(A_k)=0$.
Therefore, the measure of the set of points $x\in[a,b]$ for which $\phi_n(x)$ does not converge to $f(x)$ is
$$m([\phi_n\not\to f])=m(\bigcup_k A_k)\leq\sum m(A_k)=0.$$
This means that $\phi_n\to f$ a.e.
