<s>[INST] How to prove this property involving the floor function? How does one prove that $$\lfloor x \rfloor = \lfloor x/2 \rfloor + \lfloor (x+1)/2 \rfloor $$
where $\lfloor x \rfloor$ represents the greatest integer less than or equal to $x$?
I tried to do this by using inequalities but end up with $\lfloor x \rfloor + 1/2$ on the lhs. Can someone help?
 [/INST] I here assume that $x$ is a positive real. We then have that $x = n + r$, where $n \in \mathbb{N}$ and $r$ is a real number with $r \in [0;1)$. We have that $\lfloor x \rfloor = n$.
Either $n$ or $n+1$ is even. If $n$ is even, then $\lfloor x/2 \rfloor =  \frac{n}{2}$ and $\lfloor (x+1)/2 \rfloor = \lfloor (n+1)/2 \rfloor = \lfloor \frac{n}{2} + \frac{1}{2} \rfloor = \frac{n}{2}$. Therefore $\lfloor x/2 \rfloor + \lfloor (x+1)/2 \rfloor = \frac{n}{2} + \frac{n}{2} = n$.
The case where $n$ is odd is similar.
</s>