Sum of Floor and Floor of Negative

Theorem
Let $$x \in \mathbb{R}$$.

Then $$\left \lfloor {x} \right \rfloor + \left \lfloor {-x} \right \rfloor = \begin{cases} 0 & : x \in \mathbb{Z} \\ -1 & : x \notin \mathbb{Z} \end{cases}$$

Proof

 * Let $$x \in \mathbb{Z}$$.

Then $$x = \left \lfloor {x} \right \rfloor$$ from Integer Equals Floor And Ceiling.

Now $$x \in \mathbb{Z} \Longrightarrow -x \in \mathbb{Z}$$, so $$\left \lfloor {-x} \right \rfloor = -x$$.

Thus $$\left \lfloor {x} \right \rfloor + \left \lfloor {-x} \right \rfloor = x + \left({-x}\right) = x - x = 0$$.


 * Now suppose $$x \notin \mathbb{Z}$$.

From Real Number is Floor plus Difference, $$x = n + t$$, where $$n = \left \lfloor {x} \right \rfloor$$ and $$t \in \left[{0 \,. \, . \, 1}\right)$$.

Thus, $$-x = - \left({n + t}\right) = -n - t = -n - 1 + \left({1 - t}\right)$$.

As $$t \in \left[{0 \,. \, . \, 1}\right)$$, we have $$1 - t \in \left[{0 \, . \, . \, 1}\right)$$.

Thus $$\left \lfloor {x} \right \rfloor = -n - 1$$.

So $$\left \lfloor {x} \right \rfloor + \left \lfloor {-x} \right \rfloor = n + \left({-n - 1}\right) = n - n - 1 = -1$$.