Summation over k of Floor of x plus k over y

Theorem
Let $x, y \in \R$ such that $y > 0$.

Then:


 * $\displaystyle \sum_{0 \mathop \le k \mathop < y} \left \lfloor{x + \dfrac k y}\right \rfloor = \left \lfloor{x y + \left \lfloor{x + 1}\right \rfloor \left({\left \lceil{y}\right \rceil - y}\right)}\right \rfloor$

Proof
When $x$ increases by $1$, both sides increase by $\left \lceil{y}\right \rceil$.

So we can assume $0 \le x < 1$.

When $x = 0$, both sides are equal to $0$.

When $x$ increases past $1 - \dfrac k y$ for $0 \le k < y$, both sides increase by $1$.

Hence the result.