<s>[INST] Writting a proof for $\lfloor 4x \rfloor = \lfloor x+1/4 \rfloor + \lfloor x+1/2 \rfloor + \lfloor x+3/4 \rfloor + \lfloor x \rfloor$ I am working on an assignment and have to write a proof for the following:
$$\lfloor 4x \rfloor =  \lfloor x \rfloor + \lfloor x+\frac{1}4 \rfloor + \lfloor x+\frac{1}2 \rfloor + \lfloor x+\frac{3}4 \rfloor$$
I have to do by proof by case I know the cases to be as follows
$$0 \le x-\lfloor x \rfloor \lt \frac 1 4$$
$$\frac 1 4 \le x-\lfloor x \rfloor \lt \frac 1 2$$
$$\frac 1 2 \le x-\lfloor x \rfloor \lt \frac 3 4$$
$$\frac 3 4 \le x-\lfloor x \rfloor \lt 1$$
The problem is I don't understand how I can express this.
Case 0
In this case I know that it would be $4n$ here
Case 1
In this case I know that it would be $4n+1$
Case 2
Here it would be $4n+2$
Case 3
Now the last case would end up being  $4n+3$
Can someone help me express this?
 [/INST] One way to tackle these sorts of proof is to give a name to the leftover bit: $\epsilon = x-\lfloor x \rfloor$. [I'm sure there is a slicker way to prove this, but here's a straight forward attempt...]
Then, for example, in case 1:
$$0 \le x-\lfloor x \rfloor = \epsilon \lt \frac 1 4$$
Clear the fraction...
$$0 \le 4x-4\lfloor x \rfloor = 4\epsilon \lt 1$$
Then
$$\lfloor 4x \rfloor =  \lfloor 4\lfloor x \rfloor +4\epsilon \rfloor = 4\lfloor x \rfloor$$
since $4\lfloor x \rfloor$ is an integer and $0 \leq 4\epsilon \lt 1$.
$$\lfloor x \rfloor + \lfloor x+\frac{1}4 \rfloor + \lfloor x+\frac{1}2 \rfloor + \lfloor x+\frac{3}4 \rfloor = 4\lfloor x \rfloor$$
since $\lfloor x \rfloor \leq x < x + \frac 1 4 < x + \frac 1 2 < x + \frac 3 4 = \lfloor x \rfloor + \epsilon + \frac 3 4$ where $0 \leq \epsilon + \frac 3 4 < \frac 1 4 + \frac 3 4 =1$ so all get rounded down to $\lfloor x \rfloor$.
I hope this helps get you started on the other cases! :)
</s>