I want to prove that $\mathbb N\times \mathbb N$ is countable set using cantor first diagonal method:
where every-time we count the elemnts on the digonal with the direction of the arrow ($(1,1)\mapsto1,(2,1)\mapsto 2,(1,2)\mapsto3,(3,1)\mapsto4$ etc). I know that if I had same problem with $\mathbb N \cup{0}\times \mathbb N \cup{0}$ I could define cantor's function by $f(x,y)=\frac {(x+y+1)(x+y)}{2}+y$ which I'm not sure its' bijective. How can I define a function according to my scheme?
EDIT: The question is NOT about proving $\mathbb N\times \mathbb N$ is countable but on writing appropriate bijective function for the described diagonal method.