Metamath Proof Explorer


Theorem 2sqreunnlt

Description: There exists a unique decomposition of a prime of the form 4 k + 1 as a sum of squares of two different positive integers. (Contributed by AV, 4-Jun-2023) Specialization to different integers, proposed by GL. (Revised by AV, 25-Jun-2023)

Ref Expression
Hypothesis 2sqreult.1 φ a < b a 2 + b 2 = P
Assertion 2sqreunnlt P P mod 4 = 1 ∃! a b φ ∃! b a φ

Proof

Step Hyp Ref Expression
1 2sqreult.1 φ a < b a 2 + b 2 = P
2 2sqreunnltlem P P mod 4 = 1 ∃! a ∃! b a < b a 2 + b 2 = P
3 1 bicomi a < b a 2 + b 2 = P φ
4 3 reubii ∃! b a < b a 2 + b 2 = P ∃! b φ
5 4 reubii ∃! a ∃! b a < b a 2 + b 2 = P ∃! a ∃! b φ
6 1 2sqreunnlem2 a * b φ
7 2reu1 a * b φ ∃! a ∃! b φ ∃! a b φ ∃! b a φ
8 6 7 mp1i P P mod 4 = 1 ∃! a ∃! b φ ∃! a b φ ∃! b a φ
9 5 8 syl5bb P P mod 4 = 1 ∃! a ∃! b a < b a 2 + b 2 = P ∃! a b φ ∃! b a φ
10 2 9 mpbid P P mod 4 = 1 ∃! a b φ ∃! b a φ