# How to prove that the limit of an upper sum equals the integral of a function with these limited definitions?

I can use the following definitions:

-A partition P of [a,b] is a set of finite points of [a,b] that includes a and b themselves.

-The set of all partitions of [a,b] is depicted as $P_{[a,b]}$

-$M_i=sup\{f(x) : x\in [t_i -t_{i-1}]\}$

-$m_i=inf\{f(x) : x\in [t_i -t_{i-1}]\}$

-An upper sum of a bounded function in regards to a partition $P=\{a=t_0,t_1,...,t_n=b\}\in$ is $$\sum_{i=1}^n M_i(t_i-t_{i-1}) = \overline S(f,P)$$

-The upper integral of a bounded function $f$ = $inf\{ \overline S(f,P):P\in P_{[a,b]} \}$

-Let $P,Q \in P_{[a,b]}, if P \subset Q$ then Q is a refinement of P

-Analogous definitions for the lower integral

-A bounded function f is integrable if the upper and lower integrals are the same, and this value is called the integral of f

Now, my problem is: If I have an integrable function f, how can I prove that

$$\lim_{x\to\infty} \underline S(f,P_n)=\int_a^bf=\lim_{x\to\infty} \overline S(f,P_n)$$with $P =\{t_0,t_1,...,t_n\}$ a partition with n subintervales of the same length.

I'm not sure how to approach this problem. My guess is that I have to prove that the limit of the upper sum as the amout of points in P grows is the infimum of the set of upper sums. I know how to prove that a finitely bigger partition creates a smaller upper sum, and I can imagine how an infinitely big one would create the smallest upper sum, but I can't seem to find a path to prove it formally.

Another option I thought about was using some kind of version of the squeeze theorem, but again, I can't find a formal path.

Any help or hints would be greatly appreciated.