Floor of x+m over n/Proof 1

Proof
Let:
 * $y = x - \floor x$
 * $M = m + \floor x$

We now have:
 * $(1): \quad 0 \le y < 1$

and
 * $\floor y = 0$

Write:
 * $(2): \quad M = k n + r$

with $k \in \Z$ and $0 \le r \le n - 1$.

By $(1)$ and $(2)$:
 * $(3): \quad 0 \le r + y < n - 1 + 1 = n$

We have:

Substituting $y$ and $M$, we obtain:

and the result follows.