Proving $\left\lfloor \frac{x}{ab} \right\rfloor = \left\lfloor \frac{\left\lfloor \frac{x}{a} \right\rfloor}{b} \right\rfloor$ for $a,b>1$ I'm trying to prove rigorously the following:

$$\left\lfloor \frac{x}{ab} \right\rfloor = \left\lfloor \frac{\left\lfloor \frac{x}{a} \right\rfloor}{b} \right\rfloor$$   for integers $a,b \geq 1$ and real $x$.

So far I haven't gotten far. It's enough to prove this instead:

$$\left\lfloor \frac{z}{c} \right\rfloor = \left\lfloor \frac{\lfloor z \rfloor}{c} \right\rfloor$$   for integers $c \geq 1$ and real $z$

since we can just put $z=\lfloor x/a \rfloor$ and $c=b$.

This theorem is not true if $b$ is not an integer.  Take $x=b=1.5$ and take $a=1$.
If $b$ is an integer, this follows from the rule $$\left\lfloor \frac{y}{b}\right\rfloor = \left\lfloor \frac{\lfloor y \rfloor}b\right\rfloor$$
Setting $y=\frac x a$.
Showing this rule, then, suffices.
Let $y = \lfloor y \rfloor + \{y\}$, where $0\leq \{y\} < 1$.
Use division algorithm to write $\lfloor y \rfloor = qb + r$ with $0\leq r <b$.
The $\frac{\lfloor y \rfloor} b = q + \frac{r}{b}$, and $0\leq \frac{r}{b} <1$, so 
$$\left\lfloor \frac{\lfloor y \rfloor}b\right\rfloor = q$$
On the other hand, since $[y]< (q+1)b$, since $0\leq\{y\}<1$, then $y = [y]+\{y\}<(q+1)b$.
So $q \leq \frac y b < q+1$ and again $$\left\lfloor \frac{y}{b}\right\rfloor = q $$
