Prove that $f(m,n)=\frac{(m+n−2)(m+n−1)}{2}+m$ from $\mathbb{N}^2\to\mathbb{N}$ is one-to-one.

164 Views Asked by At

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(a,b)=f(c,d) \longrightarrow (a=c \text{ and }b=d)$. In the end,I got

$$a^{2} + b^{2}+2ab-a-3b=c^{2} + d^{2}+2cd-c-3d.$$

What should I do then? Lets $a>c$ but I have no clues.

Thanks