Understing proof for the case when riemann and lebesgue-integral are the same. There are two things in this proof by Rudin, in Principles of mathematical I don't understand, I have marked them in red, and will explain in more detail below, can you please help?



*

*Does he really need to define $U_k(a), L_k(a)$? I can't see how that is used in the proof, and it seems that the proof would work if he didn't define them?


2.In order to say that f is measurable, do we have to use that the Lebesgue measure is complete?
 A: You need to be able to take some kind of limit of the Lebesgue integral. What better way to do that than to construct a monotone sequence of functions so that you can apply the Monotone convergence theorem? Of course there are many subtle issues with the proof, but that's the idea.


*

*First, you have to know that a function is Riemann integrable iff for every $\epsilon > 0$ there exists a partition $\mathcal{P}$ for which the upper and lower Riemann sums for $f$ differ by at most $\epsilon$. This is a non-trivial property of Riemann integrability that reduces checking the usual Riemann sum definition involving the differences of Riemann sums for all partitions whose norms are sufficiently small to finding a single partition for which the upper and lower sums differ by at most $\epsilon$.

*Second, you need to know that whenever you refine a partition, the new upper sum is less than or equal to the previous upper sum, and the new lower sum is greater than or equal to the previous lower sum.
From (1) you can find a sequence of partitions $\{ P_{k} \}$ such that the difference between the upper and lower sums over $P_{k}$ is strictly less than $1/k$. Then you can form a new sequence of partitions $\{ Q_{k} \}$ where $Q_{k}$ is a common refinement of $\{ P_{1},P_{2},\cdots,P_{k} \}$ and, by (2), you'll still have that the difference between the upper and lower sums over $Q_{k}$ is bounded by $1/k$. If the partition $Q_{k}$ has subdivision points
$$
                a = t_{0} < t_{1} < \cdots < t_{m} = b,
$$
then you define a lower function $l_{k}$ and an upper function $u_{k}$ by
$$
     l_{k}(x) = \sum_{k=1}^{m}\left(\inf_{x \in [t_{j-1},t_{j})}f(x)\right)\chi_{[t_{j-1},t_{j})}(x) \\
     u_{k}(x) = \sum_{k-1}^{m}\left(\sup_{x \in [t_{j-1},t_{j})}f(x)\right)\chi_{[t_{j-1},t_{j})}(x).
$$
By the definition of upper and lower sums, the Lebesgue integral of $l_{k}$ equals the lower Riemann sum over $P_{k}$, and the Lebesgue integral of $u_{k}$ equals the upper Riemann sum over $P_{k}$. Furthermore,
$$
             l_{1} \le l_{2} \le l_{3} \le \cdots, \\
             u_{1} \ge u_{2} \ge u_{3} \ge \cdots
$$
Moreover, $l_{j} \le u_{k}$ holds for any $j$, $k$. The upper and lower Riemann sums both converge to the Riemann integral because $f$ is Riemann integrable.
Can you take it from there?
