Since the last post no one gave the solution, so i reopen one and use other approach searched in this forumn. https://math.stackexchange.com/a/91323/620871
Show that the polynomial function $$f(m,n)=(m+n−2)(m+n−1)/2+m $$ is one-to-one and onto. Both domain is $\Bbb Z^+\times \Bbb Z^+$, codomain are $\Bbb Z^+$.
I want to prove $f(m,n)=f(p,q) \longrightarrow (m=p \text{ and }n=q)$.
$$\frac12(m+n-2)(m+n-1)+m=\frac12(p+q-2)(p+q-1)+p\;.\tag{1}$$ The first step is to show that $m+n=p+q$, so suppose not. We may as well assume that $m+n<p+q$. For convenience let $a=m+n$ and $d=(p+q)-a$, so that it becomes $$\frac{(a-2)(a-1)}2+m=\frac{(a+d-2)(a+d-1)}2+p\;.$$
Then $$\begin{align*} m-p&=\frac{(a+d-2)(a+d-1)}2-\frac{(a-2)(a-1)}2\\ &=ad+\frac{d(d-3)}2\\ & \end{align*}$$
Since $a\ge 2$,$d\ge1$, we dicovered that $m-p>a$ when $a\ge 2$,$d>1$,$m-p>m+n,$which is absurd.
However,if $d=1$,$a\ge 2$,then $m-p>a$ is not hold. How to duel with the case that $d=1$,$a\ge 2$ or we can just ignore it?
Thanks.