Help with proving a statement based on Riemann sums?
Let's simplify and assume $f$ is Riemann integrable on $[0,1].$ Fix $d,s \in \mathbb N,0<s<d.$ Consider the uniform partition of $[0,1]$ into subintervals of length $1/n,$ thinking of $n$ here as being larger than $d.$ Choose $c_i \in [(i-1)/n,i/n].$
The key to this is to look at the indices $i$ in groups of $d.$ The first group is $\{1,\dots , d\}.$ Let $A_1\subset \{1,\dots , d\}$ have $d-s$ elements. Set $I_1= [0, d/n],$ and let $M_1= \sup_{I_1}f.$ We then have the upper estimate
$$\sum_{i\in A_1} f(c_i)\frac{1}{n} \le \sum_{i\in A_1} M_1\frac{1}{n} = (d-s)M_1\frac{1}{n} = \frac{d-s}{d} M_1\frac{d}{n}.$$
We can do the same thing on the next $d$-block of indices, $\{d+1,\dots , 2d\},$ and so on. There will be $\lfloor n/d \rfloor$ $d$-blocks of indices in all. If for $k=2,\dots ,\lfloor n/d \rfloor$ we define $A_k,I_k,M_k$ in the analogous way, we get
$$\sum_{k=1}^{\lfloor n/d \rfloor} \sum_{i\in A_k} f(c_i)\frac{1}{n} \le \frac{d-s}{d}\sum_{k=1}^{\lfloor n/d \rfloor} M_k\frac{d}{n}.$$
There is the annoying last interval $I' =[\lfloor n/d \rfloor d, 1]$ to discuss. We don't know how many $f(c_i)(1/n)$ get counted here, but let's call the number $N'.$ All we can say for sure is $0\le N'\le d-s.$ Let $M'= \sup_{I'} f.$ Then, summing over these $i,$ we get
$$\sum f(c_i)\frac{1}{n} \le M'N'\frac{1}{n}.$$
Let's write the last term as
$$\frac{d-s}{s}M'(1-\lfloor n/d \rfloor d) + [M'N'\frac{1}{n} - \frac{d-s}{s}M'(1-\lfloor n/d \rfloor d)].$$
Denote the expression in brackets by $B_n.$ Verify that $B_n \to 0.$
Putting this all together gives, for the full "partial Riemann sum" we are considering,
$$\sum f(c_i)\frac{1}{n} \le \frac{d-s}{d}\left (\sum_{k=1}^{\lfloor n/d \rfloor} M_k\frac{d}{n} + M'(1-\lfloor n/d \rfloor d)\right ) + B_n.$$
Inside the parentheses we have $U(P_n,f)$ for a partition $P_n$ different from the uniform partition we started with. Since the mesh-size of $P_n$ tends to $0,$ these upper sums converge to $\int_0^1 f,$ by standard Riemann integration theory. Recalling $B_n \to 0,$ we see that the expression on the right $\to \frac{d-s}{d} \cdot \int_0^1 f.$ Therefore
$$\limsup_{n\to \infty} \sum f(c_i)\frac{1}{n} \le \frac{d-s}{d}\int_0^1 f.$$
A similar argument, using $m_k = \inf_{I_k}$ etc, gives
$$\frac{d-s}{d}\int_0^1 f \le \liminf_{n\to \infty} \sum f(c_i)\frac{1}{n}.$$
This gives the result.