Question about Riemann integral property proof I just read the following property and proof:

Let $I = [a_1, b_1] \times ... \times [a_n, b_n]\subset \mathbb{R}^n$ and $f,g : I \rightarrow \mathbb{R}$ integrable functions such that $f \leq g$. Then $\int_I f \leq \int_I g$.
Proof: It is a consequence of the property $U(f,P) \leq U(g,P)$.

I don' t really understand it.
Because $f,g$ are integrable, then its upper Riemann integrals coincide with its integrals, so $\int_I f \leq \int_I g \iff \inf \{U(f,P): \text 
 {$P$ partition of $I$} \} \leq \inf \{U(g,P): \text 
 {$P$ partition of $I$} \}$. 
But in the proof it is assumed that the partition $P$ that makes $U(f, P)$ the smallest is the same that the one that makes $U(g,P)$ the smallest. Why is this true? Or does it mean that $U(f,P') \leq U(g,P'')$ for any $P', P''$ partitions of $I$   ?                
 A: First of all, there is no reason for a partition that makes $U(f, P)$ the smallest to exist.
Second of all, the assumption you mention is unnecessary. For each $\varepsilon > 0$ there is a partition $P$ such that $U(g, P) \leqslant \int_I g + \varepsilon$ and then
$$\int_I f \leqslant U(f, P) \leqslant U(g, P) \leqslant \int_I g + \varepsilon$$
Since $\varepsilon > 0$ is arbitrary, we get $\int_I f \leqslant \int_I g$.
This fact is an example of a more general one: let $A$ and $B$ be non-empty, bounded from below sets of real numbers. If for each $b \in B$ there is an $a \in A$ such that $a \leqslant b$, then $\inf A \leqslant \inf B$. Now taking $A = \{ U(f, P) : P \text{ is a partition of } I \}$ and $B = \{ U(g, P) : P \text{ is a partition of } I \}$, we get the desired result.
A: It is the same to prove that if $$f\le 0$$ then $$J=\int f\le 0$$.
assume that $J>0$.
then with $\epsilon=\frac{J}{2}$, there exist a step $p>0$ such that for all subdivision $\sigma$ with $|\sigma|<p$,  the Riemann sums satisfy
$$-\frac{J}{2}<\sum (x_{i+1}-x_i)f(\xi_i)-J<\frac{J}{2}$$
but all Riemann sums are nonpositive.
