A proof in Spivak on integration. The theorem states

If $f$ is bounded on $[a,b]$, then $f$ is integrable on $[a,b]$ $\iff$ for all $\epsilon > 0$ there is a partition $P$ of $[a,b]$ such that
$$U(f,P) - L(f,P) < \epsilon$$

The proof is on page 220. I believe I  have the 2nd ed of the book.
One of the steps really confused me in which he writes

"$\inf \{ U(f,P')\} - \sup\{ L(f,P')\} < \epsilon$, since this is true for all $\epsilon > 0$, it follows that $\inf \{ U(f,P')\} = \sup\{ L(f,P')\}$

I do not understand how this follows, how did this become an equality?
 A: This is a cute strategy in analysis: to prove that $x = y$, you instead prove that $|x - y| < \epsilon$ for all $\epsilon > 0$.  Because if $x \neq y$, then taking $\epsilon = |x - y|$ would falsify the inequality.  In your case, $x = \inf U(f,P')$ and $y = \sup L(f,P')$.
In your question, the absolute values are omitted because $x > y$ already; this is because we always have $U(f,P') \geq L(f,P')$ for the same partition, which is the intuition behind the use of "upper" and "lower" in the names of these quantities.
A: This is called a Darboux integral and to show that $\inf \{ U(f,P')\} \geq \sup\{ L(f,P')\}$  you first have to show that for a refinement $P'$ of a partition $P$ you always have $$U(f,P) \geq U(f,P') \geq L(f,P') \geq L(f,P).$$ Then to show that all the upper integrals are bigger than all the lower integrals you can use the fact that for any two partitions $P_1$ and $P_2$ there is always a partition $P'$ that is a refinement of both of them, $P' = P_1 \cup P_2$ for example. 
Now assume we have $0 \leq \inf \{ U(f,P')\} - \sup\{ L(f,P')\} < \epsilon$ for every $\epsilon > 0$ as assumed in the question. That doesn't leave room for the difference to be anything other than zero since $\epsilon$ can be chosen arbitrarily small.
