[proofplan]
We first prove that in a primitive Pythagorean triple with $y$ even, both $x$ and $z$ are odd. This makes the two integers $(z+x)/2$ and $(z-x)/2$ positive, coprime, and with product $(y/2)^2$. A coprime square-factor lemma then forces these two integers to be squares, giving the parameters $m$ and $n$ and the formulas. Finally, we prove uniqueness from the identities for $(z+x)/2$ and $(z-x)/2$, and verify directly that every admissible pair $(m,n)$ gives a primitive Pythagorean triple.
[/proofplan]
[step:Show that $x$ and $z$ are odd]
Since $y$ is even, $y^2$ is divisible by $4$. From $x^2+y^2=z^2$, we have
\begin{align*}
x^2 \equiv z^2 \pmod 4.
\end{align*}
If $x$ were even, then $z$ would also be even, and then $2$ would divide $x,y,z$, contradicting $\gcd(x,y,z)=1$. Hence $x$ is odd. Since $x^2 \equiv z^2 \pmod 4$ and an odd square is congruent to $1$ modulo $4$, it follows that $z$ is odd.
[guided]
The parity hypothesis is used first. Because $y$ is even, there is an integer $k \in \mathbb N$ with $y=2k$, so
\begin{align*}
y^2 = 4k^2.
\end{align*}
Thus $y^2$ is divisible by $4$. Reducing the Pythagorean equation modulo $4$ gives
\begin{align*}
x^2+y^2=z^2
\quad\Longrightarrow\quad
x^2 \equiv z^2 \pmod 4.
\end{align*}
Now an integer square is congruent to either $0$ or $1$ modulo $4$: it is congruent to $0$ if the integer is even and to $1$ if the integer is odd. If $x$ were even, then $x^2 \equiv 0 \pmod 4$, so $z^2 \equiv 0 \pmod 4$, forcing $z$ to be even. But then $2$ would divide all of $x,y,z$, contradicting the primitive hypothesis $\gcd(x,y,z)=1$. Therefore $x$ is odd.
Since $x$ is odd, $x^2 \equiv 1 \pmod 4$. The congruence $x^2 \equiv z^2 \pmod 4$ gives $z^2 \equiv 1 \pmod 4$, so $z$ is odd.
[/guided]
[/step]
[step:Construct two positive coprime factors whose product is a square]
Define integers $A,B \in \mathbb N$ by
\begin{align*}
A := \frac{z+x}{2}, \qquad B := \frac{z-x}{2}.
\end{align*}
These are integers because $x$ and $z$ are odd. Since $z^2=x^2+y^2>x^2$, we have $z>x$, so $A>B>0$. Moreover,
\begin{align*}
AB
=
\frac{(z+x)(z-x)}{4}
=
\frac{z^2-x^2}{4}
=
\frac{y^2}{4}
=
\left(\frac{y}{2}\right)^2.
\end{align*}
We claim that $\gcd(A,B)=1$. Let $d \in \mathbb N$ divide both $A$ and $B$. Then $d$ divides
\begin{align*}
A+B=z
\end{align*}
and
\begin{align*}
A-B=x.
\end{align*}
Thus $d$ divides both $x$ and $z$. Since $d$ also divides $A+B$ and $A-B$, any odd prime divisor of $d$ would divide both $x$ and $z$, hence also $y^2=z^2-x^2$, and therefore would divide $y$, contradicting $\gcd(x,y,z)=1$. The only possible common divisor of $A$ and $B$ is therefore a power of $2$. But $A+B=z$ is odd, so $A$ and $B$ cannot both be even. Hence $\gcd(A,B)=1$.
[guided]
The classical parametrisation comes from factoring the difference of squares:
\begin{align*}
z^2-x^2=y^2.
\end{align*}
Because $x$ and $z$ are odd, the half-sum and half-difference are integers. Define
\begin{align*}
A := \frac{z+x}{2}, \qquad B := \frac{z-x}{2}.
\end{align*}
The inequality $z>x$ follows from $z^2=x^2+y^2$ and $y>0$, so $A$ and $B$ are positive integers with $A>B$. Their product is
\begin{align*}
AB
=
\frac{(z+x)(z-x)}{4}
=
\frac{z^2-x^2}{4}
=
\frac{y^2}{4}
=
\left(\frac{y}{2}\right)^2.
\end{align*}
Thus $A$ and $B$ are two positive integer factors of a square.
We next prove that these two factors are coprime. Let $d \in \mathbb N$ be a common divisor of $A$ and $B$. Then $d$ divides their sum and difference:
\begin{align*}
A+B=z, \qquad A-B=x.
\end{align*}
So every prime divisor of $d$ divides both $x$ and $z$. If an odd prime $p$ divides both $x$ and $z$, then $p$ divides $z^2-x^2=y^2$, so $p$ divides $y$. This contradicts $\gcd(x,y,z)=1$. Hence no odd prime divides $d$.
It remains to exclude $2$. If $2$ divided both $A$ and $B$, then $2$ would divide $A+B=z$, contradicting that $z$ is odd. Therefore no prime divides both $A$ and $B$, and hence
\begin{align*}
\gcd(A,B)=1.
\end{align*}
[/guided]
[/step]
[step:Use the coprime square factor lemma to obtain $m$ and $n$]
[claim:Coprime factors of a square are squares]
Let $A,B \in \mathbb N$ satisfy $\gcd(A,B)=1$ and suppose $AB$ is a square. Then there exist $r,s \in \mathbb N$ such that $A=r^2$ and $B=s^2$.
[/claim]
[proof]
Write the prime factorizations
\begin{align*}
A=\prod_{i=1}^{k} p_i^{\alpha_i},
\qquad
B=\prod_{j=1}^{\ell} q_j^{\beta_j},
\end{align*}
where the $p_i$ and $q_j$ are primes and all exponents $\alpha_i,\beta_j$ are positive integers. Since $\gcd(A,B)=1$, no prime $p_i$ equals any prime $q_j$. Therefore the prime factorization of $AB$ is obtained by combining these two disjoint lists. Since $AB$ is a square, every prime exponent in the factorization of $AB$ is even. Hence every $\alpha_i$ and every $\beta_j$ is even. Define
\begin{align*}
r := \prod_{i=1}^{k} p_i^{\alpha_i/2},
\qquad
s := \prod_{j=1}^{\ell} q_j^{\beta_j/2}.
\end{align*}
Then $A=r^2$ and $B=s^2$.
[/proof]
Apply the claim to the coprime positive integers $A$ and $B$. Since
\begin{align*}
AB=\left(\frac{y}{2}\right)^2,
\end{align*}
there exist $m,n \in \mathbb N$ such that
\begin{align*}
A=m^2, \qquad B=n^2.
\end{align*}
Because $A>B$, we have $m>n$. Substituting the definitions of $A$ and $B$ gives
\begin{align*}
\frac{z+x}{2}=m^2,
\qquad
\frac{z-x}{2}=n^2.
\end{align*}
Adding and subtracting these equations yields
\begin{align*}
z=m^2+n^2,
\qquad
x=m^2-n^2.
\end{align*}
Finally,
\begin{align*}
\left(\frac{y}{2}\right)^2=AB=m^2n^2.
\end{align*}
Since $y,m,n$ are positive, this gives
\begin{align*}
y=2mn.
\end{align*}
[/step]
[step:Prove that the parameters are coprime and of opposite parity]
Since $A=m^2$ and $B=n^2$ are coprime, $\gcd(m,n)=1$. If $m$ and $n$ were both odd, then
\begin{align*}
m^2-n^2 \equiv 1-1 \equiv 0 \pmod 2,
\qquad
m^2+n^2 \equiv 1+1 \equiv 0 \pmod 2,
\end{align*}
so $x$ and $z$ would both be even, contradicting that $x$ and $z$ are odd. If $m$ and $n$ were both even, then $\gcd(m,n)\ge 2$, contradicting $\gcd(m,n)=1$. Hence $m$ and $n$ have opposite parity.
[/step]
[step:Prove uniqueness of the parameters]
Suppose $m,n,m',n' \in \mathbb N$ satisfy $m>n$, $m'>n'$, and
\begin{align*}
x=m^2-n^2=m'^2-n'^2,
\qquad
z=m^2+n^2=m'^2+n'^2.
\end{align*}
Adding the two identities gives
\begin{align*}
2m^2=x+z=2m'^2,
\end{align*}
so $m^2=m'^2$. Since $m,m' \in \mathbb N$, we get $m=m'$. Subtracting the identities gives
\begin{align*}
2n^2=z-x=2n'^2,
\end{align*}
so $n^2=n'^2$, and since $n,n' \in \mathbb N$, we get $n=n'$. Therefore the parameters are unique.
[/step]
[step:Verify that Euclid's formulas give a primitive Pythagorean triple]
Conversely, let $m,n \in \mathbb N$ satisfy $m>n$, $\gcd(m,n)=1$, and suppose $m,n$ have opposite parity. Define $x,y,z \in \mathbb N$ by
\begin{align*}
x := m^2-n^2,
\qquad
y := 2mn,
\qquad
z := m^2+n^2.
\end{align*}
Since $m>n$, $x>0$, and all three numbers are positive integers. Also $y$ is even. Direct expansion gives
\begin{align*}
x^2+y^2
&=
(m^2-n^2)^2+(2mn)^2 \\
&=
m^4-2m^2n^2+n^4+4m^2n^2 \\
&=
m^4+2m^2n^2+n^4 \\
&=
(m^2+n^2)^2 \\
&=
z^2.
\end{align*}
It remains to prove primitivity. Let $d:=\gcd(x,y,z)$. Since $m$ and $n$ have opposite parity, $m^2-n^2$ and $m^2+n^2$ are odd, while $2mn$ is even. Thus $2\nmid d$.
Now let $p$ be an odd prime divisor of $d$. Then $p$ divides $y=2mn$, and since $p$ is odd, $p$ divides $mn$. Hence $p$ divides $m$ or $p$ divides $n$. If $p$ divides $m$, then from $p\mid z=m^2+n^2$ we get $p\mid n^2$, so $p\mid n$, contradicting $\gcd(m,n)=1$. If $p$ divides $n$, then from $p\mid z=m^2+n^2$ we get $p\mid m^2$, so $p\mid m$, again contradicting $\gcd(m,n)=1$. Therefore no odd prime divides $d$. Since neither $2$ nor any odd prime divides $d$, we have $d=1$.
Thus $(x,y,z)$ is a primitive Pythagorean triple with $y$ even. This completes both directions of the theorem.
[/step]