Assume that $f(x)\ge0$ if $x$ is a point in $\bf{I}$ with a rational component. Prove that $\int_{\bf{I}}f\ge0$. Let I be a generalized rectangle in $\Bbb R^n$ and suppose the function $f:\bf{I}\to\Bbb R$ is Riemann integrable. Assume that $f(x)\ge0$ if $x$ is a point in $\bf{I}$ with a rational component. Prove that $\int_{\bf{I}}f\ge0$. 

My trails: 
Since $f$ is integrable, for each positive number $\epsilon$, there is a partition $\bf{P}$ of $\ \bf{I}$ such that $$U(f,P)-L(f,P)<\epsilon$$
We know that by a lemma, there exist $m, M$ $\ \forall \in \bf{I}$ such that $$m\ vol\ I \le L(f,P)\le U(f,P)\le M vol I $$
Since $f\ge 0$, then  $\ \ m, M\ge 0$
So, $U(f,P)-L(f,P)\ge 0$ so, $\int f\ge 0$ 

I guess, there are many mistakes and drawbacks. Please can somebody completedi these by writing above answer part step by step and clearly ? By the way, this is self-studying, not homework, Thanks :) 
 A: Can you apply the property that integration is a monotone operation? If $f\ge g$, then $\int_I f \ge \int_I g$, which gives the answer for your question with $g=0$.
Edit
I think it's better to prove that the integral of a positive function is positive, because the monotonicity of integration is based on this fact, hence my previous proposition was, in fact, circular.
Here's what we can do:
Riemann integration is equiavalent to Darboux integration (see wiki), on a side note, I found where the $U-L$ notation comes from, so we can write (in 1-D for the sake of simplicity) for a partition $P$
$$M_i=\sup _{[x_i,x_{i+1})}f(x),$$
$$U(f,P)=\sum_i M_i(x_{i+1}-x_i),$$
$$U_f =\inf_P U(f,P).$$
Note that $M_i\ge 0$, because for any partition $P$ each interval in this partition is bound to contain a point with rational coordinates.
In the same spirit we define $m_i$, $L(f,P)$, and $L_f$.
Clearly, the quantities $U(f,P)$ are positive, thus $U_f\ge 0$. The integrability of $f$ is defined by the equality $U_f=L_f=\int_I f$, hence we can conclude.
A: It is given that $f(x) \ge 0$ only for $x \in I$ such that $x$ has a rational component, so we can't just assume that $f$ is a nonnegative function, because there exists $x\in I$ such that $x \in \mathbb{R}^n \setminus \mathbb{Q}^n$. Rather, we need to show it. Since it is also given that $f$ is Riemann integrable, we have, by definition, that for all partitions $P$
$$
\sup_P L = \int_I f = \inf_P U
$$
Since $f(x) \geq 0$ for $x \in I$ with a rational component and the rationals are dense in $\mathbb{R}$, for any interval $\left[p_{i-1},p_i\right]$ of any partition $P=\{p_1,\dots,p_n\}$ such that $\Delta p_i = p_i - p_{i-1} > 0$, we have
$$
\sup_{x\in\left[p_{i-1},p_i\right]} f(x) \geq 0
$$
Thus, $\inf_{P} U \geq 0$, which then implies that $\int_I f \geq 0$ since $\int_I f = \inf_{P} U$.
