4. Let $\mathbb{N}$ be the set of positive integers, i.e., $\mathbb{N}=\{1,2, \ldots\}$. Find all functions $f: \mathbb{N} \rightarrow$ $\mathbb{N}$ such that
$$
f(f(m)+f(n))=m+n \text { for all } m, n \in \mathbb{N} \text {. }
$$
4. We show that $f$ is the identity function. First we observe that $f$ is an injective function:
$$
\begin{aligned}
f(m)=f(n) & \Rightarrow f(m)+f(n)=f(n)+f(n) \\
& \Rightarrow f(f(m)+f(n))=f(f(n)+f(n)) \\
& \Rightarrow m+n=n+n \\
& \Rightarrow m=n
\end{aligned}
$$

Let $k>1$ be arbitrary. From the original equation, we have the equations
$$
f(f(k+1)+f(k-1))=(k+1)+(k-1)=2 k, \quad \text { and } \quad f(f(k)+f(k))=k+k=2 k .
$$

Since $f$ is injective, we have
$$
f(k+1)+f(k-1)=f(k)+f(k) \text { or } \quad f(k+1)-f(k)=f(k)-f(k-1) .
$$

This characterizes $f$ as an arithmetic progression, so we may write $f(n)=b+$ $(n-1) t$ where $b=f(1)$ and $t$ is the common difference. The original equation becomes $b+[(b+(m-1) t)+(b+(n-1) t)-1] t=m+n$, which simplifies to $(3 b-2 t-1)+(m+n) t=m+n$. Comparing coefficients, we conclude that $t=1$ and $b=1$. Thus $f(n)=n$, as claimed. Clearly, this function satisfies the original functional equation.