Assume that $f$ is Riemann integrable over $[a, b]$. Show that $|f|$ is Riemann integrable over $[a,b]$
(Note that the definition of Riemann integrability that I'm using is through Darboux sums)
Attempted proof: Let $\epsilon > o$ be given, then there exists a partition $P = \{x_i\}_{i = 0}^n$ of $[a, b]$ such that $U(f, P), -L(f, P) < \epsilon$.
Then we have $$U(|f|, P) = \sum_{i=1}^n \sup_{x \in [x_{i-1}, x_i]}|f(x)|(x_i - x_{i-1}) = \sum_{i=1}^n \left|\inf_{x \in [x_{i-1}, x_i]}f(x)\right|(x_i - x_{i-1})$$ which implies that $$U(|f|, P) = \sum_{i=1}^n |m_i|(x_i - x_{i-1})$$
and similarly we have $$L(|f|, P) = \sum_{i=1}^n \inf_{x \in [x_{i-1}, x_i]}|f(x)|(x_i - x_{i-1}) = \sum_{i=1}^n \left|\sup_{x \in [x_{i-1}, x_i]}f(x)\right|(x_i - x_{i-1})$$
which implies that $$L(|f|, P) = \sum_{i=1}^n |M_i|(x_i - x_{i-1})$$
Thus $U(|f|, P) - L(|f|, P) = \sum_{i=1}^n\left(|m_i| - |M_i|\right)(x_i - x_{i-1})$ and since for any $i \in \{0, ..., n\}$ we have $|m_i|< |M_i|$ it follows that $|m_i| - |M_i| < 0$ hence $U(|f|, P) - L(|f|, P) < 0 < \epsilon$ and by the criterion for integrability we have $|f|$ to be Riemann integrable over $[a, b]$. $\square$
Is the above proof correct? Have I made any mistakes or errors?