I am reading Spivak's Calculus and in problem 9 in Chapter 22, we are asked to evaluate the limit $\lim_{n\to\infty} \frac{1}{n}\sum_{k=1}^n e^{k/n}$. Spivak simply puts this equal to $\int_0^1 e^x\mathrm{d}x=e-1$, since the sum is the upper sum of the integral. But nowhere has he stated a sufficient condition for when the upper sum $U(f,P)$ (or lower sum $L(f,P)$) converges to the definite integral.
His definition of the definite integral $\int_a^b f$ is when $$\mathrm{inf} \{ U(f,P): P \ \text{a partition of} \ [a,b] \}=\mathrm{sup} \{ L(f,P): P \ \text{a partition of} \ [a,b] \}.$$ From this it follows that $L(f,P)\leq \int_a^b f \leq U(f,P)$ for all partitions $P$ of $[a,b]$.
My question then. For a partition $P_n$ of $n$ points, is there an implication (or even an equivalence) $$\text{if} \ldots \text{then} \lim_{n\to\infty} U(f,P_n)=\lim_{n\to\infty} L(f,P_n)=\int_a^b f.$$
To address the specific question at the end:
If $f$ is Riemann integrable with integral value $I_0$, then by definition we have
$$I_0 = \underline{\int}_a^b f := \sup_PL(f,P) = \overline{\int_a}^bf := \inf_P U(f,P)$$ By definition of the infimum and supremum, for any $n \in \mathbb{N}$ there exist partitions $P_n'$ and $P_n''$ such that
$$I_0 - \frac{1}{n} < L(f,P_n') \leqslant I_0 \leqslant U(f, P_n'') < I_0 + \frac{1}{n}$$
Taking the common refinement $P_n = P_n' \cup P_n''$, we have
$$L(f,P_n') \leqslant L(f,P_n) \leqslant I_0 \leqslant U(f,P_n) \leqslant U(f,P_n'')$$
Hence,
$$I_0 - \frac{1}{n} \leqslant L(f,P_n) \leqslant I_0 \leqslant U(f,P_n) \leqslant I_0 + \frac{1}{n},$$
and, therefore, there exists a sequence of partitions $(P_n)$ for which $$\lim_{n \to \infty} U(f,P_n) = \lim_{n \to \infty} L(f,P_n) = I_0$$