How we prove in a function f that f(R)=R?
By proving that is '1-1'?
If $\displaystyle f:\mathbb{R}\to\mathbb{R}$, i.e., it is declared that the domain and the codomain of $\displaystyle f$ are $\displaystyle \mathbb{R}$, then the claim that $\displaystyle f(\mathbb{R})=\mathbb{R}$ means that $\displaystyle f$ is surjective. On the other hand, the fact that $\displaystyle f$ is 1-1 means that it is injective. These are different concepts; none of them implies the other. For example, for $\displaystyle f(x)=x^3-x$ we have $\displaystyle f(\mathbb{R})=\mathbb{R}$, but $\displaystyle f$ is not 1-1.