Darboux Integrability epsilon-delta proof

Hello all, I'm having trouble proving this theorem.

Suppose f is Darboux integrable, then for all there exists a such that mesh (P) < implies U_p(f) - L_p(f) < .

Proof:

Let , and suppose f is Darboux Integrable.

If f is a constant we are done, if not pick , where k is the nth sub-interval of the partition P. M_k is the supremum of the function in that respective sub-interval, m_k is the infimum.

It follows that,

.

However, my instructor said that, I cannot pick that delta because the suprema and infima of the sub-intervals depend on the partition. I left out some steps, because the problem with the proof is the choice of delta.

Any thoughts on this? Thank you