Prove that this function is injective I need to prove that this function is injective: 
$$f: \mathbb{N} \times \mathbb{N} \to \mathbb{N}$$
$$f: (x, y) \to (2y-1)(2^{x-1})$$
Sadly, I'm stumbling over the algebra. Here is what I have so far:
Suppose $f(x, y) = f(a, b)$.
We want to show that $x = a$ and $y = b$.
$$(2y-1)(2^{x-1}) = (2b-1)(2^{a-1})$$
$$(2y-1)\dfrac{(2^{x})}{-2} = (2b-1)\dfrac{(2^a)}{-2}$$
At this point I got stuck, and I don't know how to get it to a place where I can solve and conclude that $x = a$ and $y = b$.

$$(2y-1)2^{x-1}= (2b-1)2^{a-1}$$
If $x\ne a$ then either $x>a$ or $x<a$.  Just call whichever one is bigger $a$, so that $x<a$.
Divide both sides by $2$, and repeat $x-1$ times.  For example, say $(2y-1)2^{x-1}=1344$. Dividing by $2$ gives $672$; dividing by $2$ again gives $336$; dividing by $2$ again gives $168$; dividing by $2$ again gives $84$; dividing by $2$ again gives $42$; dividing by $2$ again gives $21$, an odd number, so $2y-1=21$ and $y=11$.
You should also get $21$ on the right side after all those divisions by $2$.  But you get $(2b-1)2^{a-x}$.  Since $a>x$, that's an even number, so it can't be $21$.
Hence $a$ must be equal to $x$, so $2y-1=2b-1$, and finally $y=b$.
