How to prove that the function $f(x) = 2 \left \lfloor x \right \rfloor - x$ is one to one for rational $x$?
I believe that I will have to somehow use the fact that the $\left \lfloor x \right \rfloor - x$ is a very small number.
How to prove that the function $f(x) = 2 \left \lfloor x \right \rfloor - x$ is one to one for rational $x$?
I believe that I will have to somehow use the fact that the $\left \lfloor x \right \rfloor - x$ is a very small number.
On
Let $x<y$:
On
We can check the definition of a one-to-one function holds in this case. We assume that for some $x,y \in \mathbb{Q}$ we have $f(x)=f(y)$. And our task is to prove that $x=y$.
Since $f(x)=f(y)$, we have $$2 \lfloor x \rfloor - x = 2 \lfloor y \rfloor - y$$ or equivalenly $$2 \lfloor x \rfloor - 2 \lfloor y \rfloor = x - y. \tag{*}$$
Since the left hand side above is an integer, we must have that $x$ and $y$ differ by an integer. Hence, we may let $y=x+t$ for some $t \in \mathbb{Z}$.
We substitute this into $(^*)$ to obtain $$2 \lfloor x \rfloor - 2 \lfloor x+t \rfloor = x - (x+t)$$ or equivalently $$2t=t$$ (using the property of the floor function $\lfloor a+b \rfloor= \lfloor a \rfloor+b$ if $b \in \mathbb{Z}$).
This implies $t=0$ and hence $x=y$.
Hint:
On $[n,n+1), n\in\mathbb{N}$, the function is strictly decreasing and $n-1<f(x)\le n$