The Riemann Integral of a bounded function $f$ on a compact set $A$ is defined if $$U(f) = \inf\{U(f,P) \mid P \in \mathcal{P}\} = \sup \{ L(f, P) \mid P \in \mathcal{P} \} = L(f)$$ where $\mathcal{P}$ is the set of all partitions of $A$ and $L(f, P), U(f, P)$ are the lower and upper sums of $f$ with respect to $P$.
Question: Is it true that there always exists some $P \in \mathcal{P}$ such that $U(f) = U(f, P)$?
I think this would be true if the set of upper sums were compact (and thus would contain its infimum). It's clear that this set is bounded, but I'm not sure that it is necessarily closed.