Fermat's Two Squares Theorem/Uniqueness Lemma/Proof 3

Proof
Let $a, b, c, d \in \Z_{>0}$ satisfy:
 * $p = a^2 + b^2 = c^2 + d^2$

Then we have:

Thus by Euclid's Lemma for Prime Divisors, either:
 * $p \divides a c + b d$

or:
 * $p \divides a d + b c$

, we may assume:
 * $p \divides a c + b d$

On the other hand:

Hence let:
 * $t := \dfrac a c = \dfrac b d$

Then:
 * $p = a^2 + b^2 = t^2 \paren {c^2 + d^2} = t^2 p$

As $t > 0$, we have:
 * $t = 1$

That is:
 * $\tuple {a, b} = \tuple {c, d}$