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

Proof
For $p = 2$ the only possibility is:
 * $p = 1^2 + 1^2$

Assume $p \ge 3$.

Let $a \ge b$ and $c \ge d$ satisfy:
 * $p = a^2 + b^2 = c^2 + d^2$

As $2 \nmid p$, we have:
 * $(2): \quad a > b$ and $c > d$

Observe:

In particular:
 * $(4):\quad p \nmid a d + b c$

On the other hand:

Together with $(4)$, we have:
 * $p \divides a c + b d$

In particular:
 * $p \le a c + b d$

Thus:

Inserting this into $(5)$, we obtain:
 * $p^2 = \paren {a c + b d}^2$

That is:
 * $p = a c + b d$

Hence:

Thus $a = c$ and $b = d$.