Hello all,

I'm practicing proofs and I'm stuck. Here it is:

Prove that there are infinitely many solutions in positive integers x, y, and z to the equation x^2 + y^2 = z^2. Evidently I'm supposed to start by setting x, y, and z like this:

x = m^2 - n^2

y = 2mn

z = m^2 + n^2

So then we have:

(m^2 - n^2)^2 + (2mn)^2 = (m^2 + n^2)^2

m^4 + n ^4 - 2(mn)^2 + 4(mn)^2 = m ^4 + n^4 +2(mn)^2

m ^4 + n^4 +2(mn)^2 = m ^4 + n^4 +2(mn)^2 . . . Both sides of the equation are equal

2(mn)^2 = 2(mn)^2 . . . Subtract m^4 and n^4 from both sides.

2 = 2 . . . Divide both sides by (mn)^2

Since 2 always equals 2 there are infinite solutions to the equation m ^4 + n^4 +2(mn)^2 = m ^4 + n^4 +2(mn)^2. Because x^2 + y^2 = z^2 equals m ^4 + n^4 +2(mn)^2 = m ^4 + n^4 +2(mn)^2, x^2 + y^2 = z^2 also has infinite solutions.

Is this a valid proof or am I missing something?