Question on Baby Rudin 11.33 theorem Question edited.
Source: Theorem 11.33 rudin

11.33 Theorem. If $f$ is Riemann integrable on $[a,b],$ then $f$ is Lebesgue integrable on $[a,b]$ with respect to the Lebesgue measure $m$ and
$$ \int_a^b f \ dx = \mathscr{R} \int_a^b f \ dx $$
Where $\mathscr{R} \int$ denotes the Riemann integral, while $\int$ denotes the Lebesgue integral.


Proof Suppose $f$ is bounded. Then there exists a sequence $\{P_k\}$ of partitions of $[a,b]$ such that $P_{k+1}$ is a refinement of $P_k$ for each $k$ and
$$ \lim_{k\to\infty} L(P_k,f) = \mathscr{R}\underline{\int_a^b} f \ dx, \quad \lim_{k\to\infty} U(P_k,f) = \mathscr{R}\overline{\int_a^b} f \ dx.
$$
Where $L(P_k), U(P_k)$ are the upper and lower sums respectively. If $P_k=\{a=x_0<x_1<\dots<x_n=b\},$ these are defined as,
$$ L(P_k,f) = \sum_{i=1}^n (x_i-x_{i-1})m_i, \quad U(P_k,f) = \sum_{i=1}^n (x_i-x_{i-1})M_i,$$
where $M_i = \sup_{x\in[x_{i-1},x_i]} f(x)$ and $m_i = \inf_{x\in[x_{i-1},x_i]} f(x).$


We then define functions $U,L$ as $U_k(a)=L_k(a)=f(a)$ and for each $x \in(x_{i-1},x_i],$ $1\leq i \leq n,$ $U_k(x)=M_i$ and $L_k(x)=m_i.$ Then for all $x\in [a,b],$
$$ L(P_k,f) = \int_a^b L_k \ dx, \quad U(P_k,f) = \int_a^b U_k \ dx, $$
and $$L_1(x) \leq L_2(x) \leq \dots \leq f(x) \leq \dots \leq U_2(x) \leq U_1(x). $$
There the sequence of functions $L_k, U_k$ converge point-wise on $[a,b],$ so let $L, U$ be the limit functions respectively. Then $L$ and $U$ are bounded measurable functions on $[a,b]$ and for any $x \in [a,b],$
$$ L(x) \leq f(x) \leq U(x), $$

I don't understand why $L$ and $U$ are measurable functions ?
Any help would be appreciated.
 A: Here's a fleshed out answer just to close out the question. Suppose $f$ is bounded, so we can find a sequence of partitions $(P_k)$ of $[a,b]$ such that $P_{k+1}$ is a refinement of $P_k$ for each $k$. We define the lower sum of a partition $P_k := \{x_0 = a < x_1 < \cdots < x_n = b\}$ by
$$ L(P_k, f) := \sum_{i=1}^n (x_i - x_{i-1})m_i,$$
where $m_i = \inf\{f(x) \ | \ x \in [x_{i-1}, x_i]\}$. Notice that if we define
$$ L_k := \sum_{i=1}^n m_i \chi_{(x_{i-1}, x_i]},$$
then we have
$$ L(P_k, f) = \int_a^b L_k(x) dx.$$
We can do the same thing with the upper sums as well, replacing inf with sup. Notice by construction we have $L_1(x) \leq L_2(x) \leq \cdots \leq f(x)$ for each $x \in [a,b]$. Thus for fixed $x$ we have a monotonic bounded sequence. So pointwise we can define
$$L(x) := \lim_{k \rightarrow \infty} L_k(x).$$
Now we know that a pointwise limit of measurable functions is measurable (https://proofwiki.org/wiki/Pointwise_Limit_of_Measurable_Functions_is_Measurable) so $L(x)$ is a measurable function. The same argument tells us that $U$ is measurable.
