Sum over j of Function of Floor of mj over n

Theorem
Let $f$ be a real function.

Then:
 * $\displaystyle \sum_{0 \mathop \le j \mathop < n} \map f {\floor {\dfrac {m j} n} } = \sum_{0 \mathop \le r \mathop < m} \ceiling {\dfrac {r n} m} \paren {\map f {r - 1} - \map f r} + n \map f {m - 1}$

Proof
Hence: