<s>[INST] A valid floor function trick? Given $x\in\mathbb R_+$ and $m,n\in\mathbb Z_+$, is it true that
$$\bigg\lfloor\frac{\lfloor \frac{x}{m}\rfloor}{n}\bigg\rfloor=\bigg\lfloor \frac{x}{mn}\bigg\rfloor?$$

Thanks for at least three different and convincing proofs! I'll use this result  trying to code the prime counting formula from Wikipedia $(2)$:
Given $m$, select $y$ so that 
$\sqrt[3]{m}\le y\le\sqrt{m}$ and let $n=\pi(y)$. Then
$(1)\;$ $\pi(m)=\phi(m,n)+n-1-P_2(m,n)$, where
$(2)\;$ $\displaystyle \phi(m,n)=\phi(m,n-1)-\phi\Big(\frac{m}{p_n},n-1\Big)$, 
$\;\phi(m,0)=\lfloor{m}\rfloor$ and
$(3)\;$ $\displaystyle P_2(m,n)=\sum_{y<p\le\sqrt{m}}
\Big(\pi\Big(\frac{m}{p}\Big)-\pi(p)+1\Big)$, $\;p$ is a prime.
 [/INST] Let $\left\lfloor\dfrac{x}{mn}\right\rfloor = k \in \mathbb{Z}$. Then $k \le \dfrac{x}{mn} < k+1$. So, $kn \le \dfrac{x}{m} < (k+1)n$. 
Since $\dfrac{x}{m} \ge kn$ and $kn$ is an integer, we have $\left\lfloor\dfrac{x}{m}\right\rfloor \ge kn$. Also, $\left\lfloor\dfrac{x}{m}\right\rfloor \le \dfrac{x}{m} < (k+1)n$. 
Hence, $kn \le \left\lfloor\dfrac{x}{m}\right\rfloor  < (k+1)n$, and thus, $k \le \dfrac{\left\lfloor\tfrac{x}{m}\right\rfloor}{n}  < k+1$. 
Therefore, $\left\lfloor \dfrac{\left\lfloor\tfrac{x}{m}\right\rfloor}{n} \right\rfloor = k = \left\lfloor\dfrac{x}{mn}\right\rfloor$, as desired.
</s>