Consider
$$Pair(x,y) = \frac{(x+y)(x+y+1)}{2} + x$$
I discovers it essentially zigzags along the grid with $\mathbf N$ vs $\mathbf N$ (natural numbers). So intuitively, given any P(x,y) we follow the grid path to get a bijection. But I wanted a rigurous way to do this. How does one find what the explicit bijection is? Do we need some elementary number theory fact that escapes me?
Like is there an explicit mapping between a number $Pair(x,y)$ to its pair? Like an equation rather than an algorithm that starts from the bottom and until it finds the number it needs...
(note that this is all in the natural numbers which makes it trickier for me...in fact even if I had square roots available I would have no idea how to do this).
Note that Pair only maps pair to 1 unique number so its obviously a injective function from x,y to natural numbers. Which is important, now only the other direction is needed.
context: comes up in development of Godel numbering: https://faculty.math.illinois.edu/~vddries/main.pdf
page 85.