# floor function: $\lfloor ax\rfloor-a\lfloor x\rfloor ≤ k$

$$\forall a \in \mathbb{N}, \exists k \in \mathbb{N}$$ such that $$\forall x \in \mathbb{R}, \;\lfloor ax\rfloor-a\lfloor x\rfloor \le k$$

I don't have much experience proving the floor or ceiling so, I am having real trouble understanding the proof of this. Please, help.

Suppose n is integer , $0\leq p <1$ $$\forall x:x=n+p\\\lfloor x\rfloor =n ,\\p=x-\lfloor x\rfloor$$so
$$f(x)=\lfloor ax\rfloor-a\lfloor x\rfloor=\\ \lfloor ax\rfloor-ax +ax-a\lfloor x\rfloor=g(x)+h(x) \\ h(x)=\lfloor ax\rfloor-ax=-(ax-\lfloor ax\rfloor)\\ g(x)=ax-a\lfloor x\rfloor=a(x-\lfloor x\rfloor)\\$$ now we have $$0 \leq ax-\lfloor ax\rfloor <1 \to -1<h(x)\leq 0 \\\\ \to h(x)<1$$ $$0 \leq x-\lfloor x\rfloor <1 \to 0 \leq (ax-a\lfloor x\rfloor) <a\\\to 0\leq g(x)<a \\\to g(x)<a$$ so $$f(x)=h(x)+g(x) \\|f(x)|\leq|h(x)|+|g(x)|\leq1+a \leq k$$
Write $$x=n+{r\over a}+\tau\qquad{\rm with}\qquad n\in{\mathbb Z}, \quad 0\leq r Then $$\lfloor x\rfloor=n$$ and $$\lfloor ax\rfloor=an+r$$. It follows that $$\lfloor ax\rfloor-a\lfloor x\rfloor=r\leq a-1\ .$$