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:
 * $(1): \quad a > b$ and $c > d$

Observe:

On the other hand:

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

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

Thus:

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

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

Hence:

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