Find all functions $f : \Bbb N\to \Bbb N$ such that $$f(f(m)+f(n))=m+n$$
In the solution first the function is proved to be injective.
Next it says $f(f(m)+f(2))=f(f(m+1)+f(1))\Rightarrow f(m)+f(2)=f(m+1)+f(1) \Rightarrow f(2)-f(1)=f(m+1)-f(m)=k$ (say).
Till here I am having no problem.
But in the very next step it says from the above derived expression we can conclude that the function is linear.
This is where I am having problem. Can anyone explain how can we conclude the above statement? Could we have made a similar conclusion if the domain and co-domain were real numbers instead of natural numbers ?
You can easily prove by induction on $m$ that $f(m)=f(1)+k(m-1)$. Yes, this conclusion requires that your domain be $\Bbb N$.