From "An Introduction to Lebesgue Integration and Fourier Series" by Howard J. Wilcox and David L. Myers:
1.1 Definition: A partition $P$ of a closed interval $[a, b]$ is a finite sequence $(x_{0}, x_{1}, \ldots, x_{n})$ such that $a = x_{0} < x_{1} < \ldots < x_{n} = b$. The norm of $P$, denoted $\left|\left|P\right|\right|$, is defined by $\left|\left|P\right|\right| = \max_{1 \leq i \leq n} (x_{i} - x_{i-1})$.
1.2 Definition: Let $P = (x_{0}, \ldots, x_{n})$ be a partition of $[a, b]$, and let $f$ be defined on $[a, b]$. For each $i = 1, \ldots, n$, let $x_{i}*$ be an arbitrary point in the interval $[x_{i-1}, x_{i}]$. Then any sum of the form $R(f, P) = \sum_{i=1}^{n} f(x_{i}*)(x_{i} - x_{i-1})$ is called a Riemann sum of $f$ relative to $P$.
1.3 Definition: A function $f$ is Riemann integrable on $[a, b]$ if there is a real number $R$ such that for any $\epsilon > 0$, there exists a $\delta > 0$ such that for any partition $P$ of $[a, b]$ satisfying $\left|\left|P\right|\right| < \delta$, and for any Riemann sum $R(f, P)$ of $f$ relative to $P$, we have $\left|R(f,P) - R\right| < \epsilon$.
1.4 Definition: A function $g$, defined on $[a, b]$, is a step function if there is a partition $P = (x_{0}, x_{1}, \ldots, x_{n})$ such that $g$ is constant on each open subinterval $(x_{i-1}, x_{i})$, for $i = 1, \ldots, n$.
1.5 Proposition: Any step function $g$ on $[a, b]$ is Riemann integrable. Furthermore, if $g(x) = c_{i}$ for $x \in (x_{i-1}, x_{i})$, where $(x_{0}, \ldots, x_{n})$ is a partition of $[a, b]$, then $\int_{a}^{b} g(x) dx = \sum_{i=1}^{n} c_{i}(x_{i} - x_{i-1})$.
1.6 Theorem: A function $f$, defined on $[a, b]$, is Riemann integrable on $[a, b]$ if and only if for every $\epsilon > 0$, there are step functions $f_{1}$ and $f_{2}$ such that $f_{1}(x) \leq f(x) \leq f_{2}(x)$ for all $x \in [a, b]$, and $\int_{a}^{b} f_{2}(x) dx - \int_{a}^{b} f_{1}(x) dx < \epsilon$.
Exercise 5.11: Prove Theorem 1.6. (Hint: let $f$ be Riemann integrable on $[a, b]$. Let $\epsilon$, $\delta$, $P$ be as in Definition 1.3. Now if $f_{1}(x) = \text{glb } \{f(x)\mid x \in (x_{i-1}, x_{i})\}$ for $x \in (x_{i-1}, x_{i})$, then $f_{1}$ (defined appropriately at $x_{0}, \ldots, x_{n})$ is a step function lying below $f$. Show that there is a point $x_{i}* \in [x_{i-1}, x_{i}]$ such that $f(x_{i}*) - f_{1}(x) < \epsilon$. Find $f_{2}$ above $f$ in a similar manner, and $x_{i}** \in [x_{i-1}, x_{i}]$ with $f_{2}(x) - f(x_{i}**) < \epsilon$.
For the converse, let $R = \text{lub } \{\int_{a}^{b} f_{1}(x) dx \mid f_{1} \text{a step function and} f_{1} \leq f\}$. Show that $R = \text{glb } \{\int_{a}^{b} f_{2}(x) dx \mid f_{2} \text{a step function and} f \leq f_{2}\}$. Then given $\epsilon > 0$, obtain step functions $f_{1} \leq f \leq f_{2}$ with $R - \int_{a}^{b} f_{1}(x) dx < \epsilon$ and $\int_{a}^{b} f_{2}(x) dx - R < \epsilon$. (Use the fact that $f_{1}$ and $f_{2}$ are integrable to obtain $\delta$.)
Lemma 1. If $S \subset \mathbb{R}$ is non-empty and has a $\text{glb}$, then for every $\epsilon > 0$ there exists an $x \in S$ such that $x - \text{glb } S < \epsilon$.
Proof. Let $\epsilon > 0$. Then $\text{glb } S + \epsilon > \text{glb } S$. Then by the definition of the glb, $\text{glb } S + \epsilon$ is not a lb on $S$. Hence there exists an $x \in S$ such that $x < \text{glb } S + \epsilon$. Then $x - \text{glb } S < \epsilon$.
Lemma 2. If $S \subset \mathbb{R}$ is non-empty and has a $\text{lub}$, then for every $\epsilon > 0$ there exists an $x \in S$ such that $\text{lub } S - x < \epsilon$.
Proof. Let $\epsilon > 0$. Then $\text{lub } S - \epsilon < \text{lub } S$. Then by the definition of the lub, $\text{lub } S - \epsilon$ is not an ub on $S$. Hence there exists an $x \in S$ such that $x > \text{lub } S - \epsilon$. Then $\text{lub } S - x < \epsilon$.
Lemma 3. If $f$ and $g$ are step functions on $[a, b]$, and $f(x) \geq g(x)$ for all $x \in [a, b]$, then $\int_{a}^{b} f(x) dx \geq \int_{a}^{b} g(x) dx$.
Proof. Let $f$ and $g$ be step functions on $[a, b]$ such that $f(x) \geq g(x)$ for all $x \in [a, b]$.
Let $P_{1} = (x_{0}, x_{1}, \ldots, x_{n})$ be a partition such that $f$ is constant on each open subinterval $(x_{i-1}, x_{i})$, for $i = 1, \ldots, n$.
Let $P_{2} = (x_{0}, x_{1}, \ldots, x_{n})$ be a partition such that $g$ is constant on each open subinterval $(x_{i-1}, x_{i})$, for $i = 1, \ldots, n$.
Let $P = P_{1} \cup P_{2}$. Then $P = (x_{0}, x_{1}, \ldots, x_{n})$ is a partition such that $f$ and $g$ are constant on each open subinterval $(x_{i-1}, x_{i})$, for $i = 1, \ldots, n$. Suppose $f(x) = c_{i}$ for $x \in (x_{i-1}, x_{i})$. Suppose $g(x) = d_{i}$ for $x \in (x_{i-1}, x_{i})$. Then $\int_{a}^{b} f(x) dx = \sum_{i=1}^{n} c_{i}(x_{i} - x_{i-1}) \geq \sum_{i=1}^{n} d_{i}(x_{i} - x_{i-1}) = \int_{a}^{b} g(x) dx$.
Lemma 4. If $X \subset \mathbb{R}$ and $Y \subset \mathbb{R}$ are both non-empty, and for every $x \in X$ and for every $y \in Y$ it holds that $x \geq y$, then $\text{glb } X \geq \text{lub } Y$.
Proof. Let $y \in Y$. Then for every $x \in X$ it holds that $x \geq y$. Then $y$ is a lb of $X$. Then $y \leq \text{glb } X$. Since $y$ is arbitrary, then for every $y \in Y$ it holds that $y \leq \text{glb } X$. Then $\text{glb } X$ is an ub of $Y$. Then $\text{glb } X \geq \text{lub } Y$.
Lemma 5. If $X \subset \mathbb{R}$ and $Y \subset \mathbb{R}$ are such that $\text{glb } X \geq \text{lub } Y$, and for every $\epsilon > 0$ there exists a $x \in X$ and a $y \in Y$ such that $x - y < \epsilon$, then $\text{glb } X = \text{lub } Y$.
Proof. Let $\epsilon > 0$. Choose $x \in X$ and $y \in Y$ such that $x - y < \epsilon$. Since $x \in X$, then $x \geq \text{glb } X$. Since $y \in Y$, then $y \leq \text{lub } Y$. Then $0 \leq \text{glb } X - \text{lub } Y \leq x - y < \epsilon$. Since this holds for all $\epsilon > 0$ then $\text{glb } X - \text{lub } Y = 0$. Hence $\text{glb } X = \text{lub } Y$.
1.6 Theorem: A function $f$, defined on $[a, b]$, is Riemann integrable on $[a, b]$ if and only if for every $\epsilon > 0$, there are step functions $f_{1}$ and $f_{2}$ such that $f_{1}(x) \leq f(x) \leq f_{2}(x)$ for all $x \in [a, b]$, and $\int_{a}^{b} f_{2}(x) dx - \int_{a}^{b} f_{1}(x) dx < \epsilon$.
Proof.
$\Rightarrow$ If $f$ is a function defined on $[a, b]$, and for every $\epsilon > 0$ there are step functions $f_{1}$ and $f_{2}$ such that $f_{1}(x) \leq f(x) \leq f_{2}(x)$ for all $x \in [a, b]$, and $\int_{a}^{b} f_{2}(x) dx - \int_{a}^{b} f_{1}(x) dx < \epsilon$, then $f$ is Riemann integrable on $[a, b]$.
Let $f$ be a function defined on $[a, b]$.
Let $S = \{\int_{a}^{b} f_{1}(x) dx \mid f_{1} \text{ a step function and } f_{1} \leq f\}$.
Let $T = \{\int_{a}^{b} f_{2}(x) dx \mid f_{2} \text{ a step function and } f \leq f_{2}\}$.
Then $\text{lub } S = \text{glb } T$ by the hypothesis, Lemma 3, Lemma 4, and Lemma 5.
Let $R = \text{lub } S = \text{glb } T$.
Let $\epsilon > 0$.
Let $f_{1}$ and $f_{2}$ be step functions such that $f_{1} \leq f \leq f_{2}$ and $R - \int_{a}^{b} f_{1}(x) dx < \epsilon / 2$ and $\int_{a}^{b} f_{2}(x) dx - R < \epsilon / 2$. These exist by Lemma 1 and Lemma 2.
Let $\delta_{1} > 0$ be such that for any partition $P$ of $[a, b]$ satisfying $\left|\left|P\right|\right| < \delta_{1}$, and for any Riemann sum $R(f_{1},P)$ of $f_{1}$ relative to $P$, we have $\left|R(f_{1},P) - \int_{a}^{b} f_{1}(x) dx\right| < \epsilon / 2$.
Let $\delta_{2} > 0$ be such that for any partition $P$ of $[a, b]$ satisfying $\left|\left|P\right|\right| < \delta_{2}$, and for any Riemann sum $R(f_{2},P)$ of $f_{2}$ relative to $P$, we have $\left|R(f_{2},P) - \int_{a}^{b} f_{2}(x) dx\right| < \epsilon / 2$.
Let $\delta = \text{min}(\delta_{1}, \delta_{2})$.
Let $P = (x_{0}, \ldots, x_{n})$ be a partition of $[a, b]$ such that $\left|\left|P\right|\right| < \delta$.
For each $i = 1, \ldots, n$, let $x_{i}*$ be an arbitrary point in the interval $[x_{i-1}, x_{i}]$.
Then
\begin{align*} \sum_{i=1}^{n} f_{2}(x_{i}*)(x_{i} - x_{i-1}) - R &= \sum_{i=1}^{n} f_{2}(x_{i}*)(x_{i} - x_{i-1}) - R + \int_{a}^{b} f_{2}(x) dx - \int_{a}^{b} f_{2}(x) dx \\ &= [\sum_{i=1}^{n} f_{2}(x_{i}*)(x_{i} - x_{i-1}) - \int_{a}^{b} f_{2}(x) dx] + [\int_{a}^{b} f_{2}(x) dx - R] \\ &< \epsilon / 2 + \epsilon / 2 \\ &= \epsilon \\ \end{align*}
\begin{align*} R - \sum_{i=1}^{n} f_{1}(x_{i}*)(x_{i} - x_{i-1}) &= R - \sum_{i=1}^{n} f_{1}(x_{i}*)(x_{i} - x_{i-1}) + \int_{a}^{b} f_{1}(x) dx - \int_{a}^{b} f_{1}(x) dx \\ &= [\int_{a}^{b} f_{1}(x) dx - \sum_{i=1}^{n} f_{1}(x_{i}*)(x_{i} - x_{i-1})] + [R - \int_{a}^{b} f_{1}(x) dx] \\ &< \epsilon / 2 + \epsilon / 2 \\ &= \epsilon \\ \end{align*}
Since
$\sum_{i=1}^{n} f_{1}(x_{i}*)(x_{i} - x_{i-1}) \leq \sum_{i=1}^{n} f(x_{i}*)(x_{i} - x_{i-1})$
$\sum_{i=1}^{n} f(x_{i}*)(x_{i} - x_{i-1}) \leq \sum_{i=1}^{n} f_{2}(x_{i}*)(x_{i} - x_{i-1})$
Then
$R - \sum_{i=1}^{n} f(x_{i}*)(x_{i} - x_{i-1}) \leq R - \sum_{i=1}^{n} f_{1}(x_{i}*)(x_{i} - x_{i-1}) < \epsilon$
$\sum_{i=1}^{n} f(x_{i}*)(x_{i} - x_{i-1}) - R \leq \sum_{i=1}^{n} f_{2}(x_{i}*)(x_{i} - x_{i-1}) - R < \epsilon$
Hence $\left|\sum_{i=1}^{n} f(x_{i}*)(x_{i} - x_{i-1}) - R\right| < \epsilon$.
$\Leftarrow$ If $f$ is a function defined on $[a, b]$, and $f$ is Riemann integrable on $[a, b]$, then for every $\epsilon > 0$ there are step functions $f_{1}$ and $f_{2}$ such that $f_{1}(x) \leq f(x) \leq f_{2}(x)$ for all $x \in [a, b]$, and $\int_{a}^{b} f_{2}(x) dx - \int_{a}^{b} f_{1}(x) dx < \epsilon$.
Let $f$ be a function defined on $[a, b]$. Let $f$ be Riemann integrable on $[a, b]$. Let $R = \int_{a}^{b} f(x) dx$.
Let $\epsilon > 0$.
Let $\delta > 0$ be such that for any partition $P$ of $[a, b]$ satisfying $\left|\left|P\right|\right| < \delta$, and for any Riemann sum $R(f, P)$ of $f$ relative to $P$, we have $\left|R(f, P) - R\right| < \epsilon / 4$.
Let $P = (x_{0}, \ldots, x_{n})$ be a partition of $[a, b]$ such that $\left|\left|P\right|\right| < \delta$.
Let $c_{i} = \text{glb } \{f(x) \mid x \in (x_{i-1}, x_{i})\}$. Let $f_{1}(x) = c_{i}$ for $x \in (x_{i-1}, x_{i})$. By Lemma 1 there is a point $x_{i}* \in [x_{i-1}, x_{i}]$ such that $f(x_{i}*) - f_{1}(x) = f(x_{i}*) - c_{i} < \epsilon / 4(b - a)$.
Let $d_{i} = \text{lub } \{f(x) \mid x \in (x_{i-1}, x_{i})\}$. Let $f_{2}(x) = d_{i}$ for $x \in (x_{i-1}, x_{i})$. By Lemma 2 there is a point $x_{i}** \in [x_{i-1}, x_{i}]$ such that $f_{2}(x) - f(x_{i}**) = d_{i} - f(x_{i}**) < \epsilon / 4(b - a)$.
Then
$\int_{a}^{b} f_{1}(x) dx = \sum_{i=1}^{n} c_{i} (x_{i} - x_{i-1})$
$\int_{a}^{b} f_{2}(x) dx = \sum_{i=1}^{n} d_{i} (x_{i} - x_{i-1})$
$\left|\sum_{i=1}^{n} f(x_{i}*) (x_{i} - x_{i-1}) - \int_{a}^{b} f(x) dx\right| < \epsilon / 4$
$\left|\sum_{i=1}^{n} f(x_{i}**) (x_{i} - x_{i-1}) - \int_{a}^{b} f(x) dx\right| < \epsilon / 4$.
Hence \begin{align*} \int_{a}^{b} f_{2}(x) dx - \int_{a}^{b} f_{1}(x) dx &= \int_{a}^{b} f_{2}(x) dx \\ &\qquad - \sum_{i=1}^{n} f(x_{i}**) (x_{i} - x_{i-1}) + \sum_{i=1}^{n} f(x_{i}**) (x_{i} - x_{i-1}) \\ &\qquad - \int_{a}^{b} f(x) dx + \int_{a}^{b} f(x) dx \\ &\qquad - \sum_{i=1}^{n} f(x_{i}*) (x_{i} - x_{i-1}) + \sum_{i=1}^{n} f(x_{i}*) (x_{i} - x_{i-1}) \\ &\qquad - \int_{a}^{b} f_{1}(x) dx \\ &= \sum_{i=1}^{n} d_{i} (x_{i} - x_{i-1}) \\ &\qquad - \sum_{i=1}^{n} f(x_{i}**) (x_{i} - x_{i-1}) + \sum_{i=1}^{n} f(x_{i}**) (x_{i} - x_{i-1}) \\ &\qquad - \int_{a}^{b} f(x) dx + \int_{a}^{b} f(x) dx \\ &\qquad - \sum_{i=1}^{n} f(x_{i}*) (x_{i} - x_{i-1}) + \sum_{i=1}^{n} f(x_{i}*) (x_{i} - x_{i-1}) \\ &\qquad - \sum_{i=1}^{n} c_{i} (x_{i} - x_{i-1}) \\ &= \sum_{i=1}^{n} d_{i} (x_{i} - x_{i-1}) - \sum_{i=1}^{n} f(x_{i}**) (x_{i} - x_{i-1}) \\ &\qquad + \sum_{i=1}^{n} f(x_{i}**) (x_{i} - x_{i-1}) - \int_{a}^{b} f(x) dx \\ &\qquad + \int_{a}^{b} f(x) dx - \sum_{i=1}^{n} f(x_{i}*) (x_{i} - x_{i-1}) \\ &\qquad + \sum_{i=1}^{n} f(x_{i}*) (x_{i} - x_{i-1}) - \sum_{i=1}^{n} c_{i} (x_{i} - x_{i-1}) \\ &= \sum_{i=1}^{n} (d_{i} - f(x_{i}**)) (x_{i} - x_{i-1}) \\ &\qquad + \sum_{i=1}^{n} f(x_{i}**) (x_{i} - x_{i-1}) - \int_{a}^{b} f(x) dx \\ &\qquad + \int_{a}^{b} f(x) dx - \sum_{i=1}^{n} f(x_{i}*) (x_{i} - x_{i-1}) \\ &\qquad + \sum_{i=1}^{n} (f(x_{i}*) - c_{i}) (x_{i} - x_{i-1}) \\ &< \sum_{i=1}^{n} [\epsilon / 4(b - a)] (x_{i} - x_{i-1}) \\ &\qquad + \sum_{i=1}^{n} f(x_{i}**) (x_{i} - x_{i-1}) - \int_{a}^{b} f(x) dx \\ &\qquad + \int_{a}^{b} f(x) dx - \sum_{i=1}^{n} f(x_{i}*) (x_{i} - x_{i-1}) \\ &\qquad + \sum_{i=1}^{n} [\epsilon / 4(b - a)] (x_{i} - x_{i-1}) \\ &= [\epsilon / 4(b - a)] (b - a) \\ &\qquad + \sum_{i=1}^{n} f(x_{i}**) (x_{i} - x_{i-1}) - \int_{a}^{b} f(x) dx \\ &\qquad + \int_{a}^{b} f(x) dx - \sum_{i=1}^{n} f(x_{i}*) (x_{i} - x_{i-1}) \\ &\qquad + [\epsilon / 4(b - a)] (b - a) \\ &< (\epsilon / 4(b - a))(b - a) + \epsilon / 4 + \epsilon / 4 + (\epsilon / 4(b - a)) (b - a) \\ &= \epsilon. \end{align*}
Is this correct? Can it be improved?