Let $I$ be a bounded interval, and let $f:I\to\textbf{R}$ and $g:I\to\textbf{R}$ be piecewise constant functions on $I$. Prove the following result:
(a) If $f(x) \geq g(x)$ for all $x\in I$, then $p.c.\displaystyle\int_{I}f \geq p.c.\int_{I}g$.
(b) Suppose that $\{J,K\}$ is a partition of $I$ into two intervals $J$ and $K$. Then the functions $f|_{J}:J\to\textbf{R}$ and $f|_{K}:K\to\textbf{R}$ are piecewise constant on $J$ and $K$ respectively, and we have
\begin{align*} p.c.\int_{I}f = p.c.\int_{I}f|_{J} + \int p.c.\int_{K}f|_{K} \end{align*}
MY ATTEMPT
(a) Since $f$ and $g$ are piecewise constant functions on $I$, there exits a partition $\textbf{P} = \{J_{1},J_{2},\ldots,J_{n}\}$ of $I$ such that $f$ and $g$ are piecewise constant with respect to it. Moreover, due to the given assumption, we have that $c_{m} = f|_{J_{m}}\geq g|_{J_{m}} = d_{m}$. Consequently, we have that \begin{align*} p.c.\int_{I}f = \sum_{m=1}^{n}c_{m}|J_{m}| \geq \sum_{m=1}^{n}d_{m}|J_{m}| = p.c.\int_{I}g \end{align*}
(b) Let $\textbf{P} = \{J_{1},J_{2},\ldots,J_{m}\}$ and $\textbf{P}' = \{K_{1},K_{2},\ldots,K_{n}\}$ be partitions of $J$ and $K$ respectively. Then $\textbf{P}\cup\textbf{P}'$ is a partition of $I$. Consequently, we have that \begin{align*} p.c.\int_{I}f = \sum_{i=1}^{m}f|_{J_{i}}|J_{i}| + \sum_{j=1}^{n}f|_{K_{j}}|K_{j}| = p.c.\int_{I}f|_{J} + p.c.\int_{I}f|_{K} \end{align*}
I am a little bit uncomfortable about the second proof. Could someone please double-check the wording of my proof? Am I missing something?