Let $f:\mathbb{N}\to\mathbb{N}$ and $N_k=\{1,2,3,...,k\}$ for all $k\in\mathbb{N}$.
I have to prove two statements. If $f_{\big|N_k}$ is injective function for all $k\in\mathbb{N}$, then $f$ is injective function(one to one) and second if $f[N_k]=N_k$ for all $k\in\mathbb{N}$, then $f$ is identity function.
Note that $f_{\big|N_k}$ is restricted domain of function and $f[N_k]=N_k$ is image of function.
I prove the first statement, let $x_1,x_2\in\mathbb{N}$ and assume that $f(x_1)=f(x_2)$. If $x_1,x_2\in{N_k}$, then we are done but if not ? Next, the second statement I have to show that $f(x)=x$ for all $x\in\mathbb{N}$ but how to show that ?
Tanks for someone to help me.
If $x_1,x_2\in\Bbb N$, take some natural number $k$ such that $x_1,x_2\leqslant k$. Then $x_1,x_2\in N_k$ and so, since $f|_{N_k}$ is injective, if $f(x_1)=f(x_2)$, then $x_1=x_2$.
Concerning the other question, suppose the $f$ is not the identity function. Then there is a smallest natural $k$ such that $f(k)\ne k$. The number $k$ cannot be $1$, since $f(N_1)=N_1$, which means that $f(\{1\})=\{1\}$, or $f(1)=1$. So, $k>1$. But $f(N_{k-1})=N_{k-1}$ and $f(k)\ne k$ implies that $f(N_k)\ne N_k$.