Metamath Proof Explorer < Previous   Next > Nearby theorems Mirrors  >  Home  >  MPE Home  >  Th. List  >  2sqreunnlem1 Structured version   Visualization version   GIF version

Theorem 2sqreunnlem1 26145
 Description: Lemma 1 for 2sqreunn 26153. (Contributed by AV, 11-Jun-2023.)
Assertion
Ref Expression
2sqreunnlem1 ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃!𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
Distinct variable group:   𝑃,𝑎,𝑏

Proof of Theorem 2sqreunnlem1
Dummy variables 𝑐 𝑥 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 2sqnn 26135 . . 3 ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))
2 simpll 766 . . . . . . . . 9 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2))) → 𝑥 ∈ ℕ)
32adantl 485 . . . . . . . 8 ((𝑥𝑦 ∧ ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) → 𝑥 ∈ ℕ)
4 breq1 5039 . . . . . . . . . . 11 (𝑎 = 𝑥 → (𝑎𝑏𝑥𝑏))
5 oveq1 7163 . . . . . . . . . . . . 13 (𝑎 = 𝑥 → (𝑎↑2) = (𝑥↑2))
65oveq1d 7171 . . . . . . . . . . . 12 (𝑎 = 𝑥 → ((𝑎↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑏↑2)))
76eqeq1d 2760 . . . . . . . . . . 11 (𝑎 = 𝑥 → (((𝑎↑2) + (𝑏↑2)) = 𝑃 ↔ ((𝑥↑2) + (𝑏↑2)) = 𝑃))
84, 7anbi12d 633 . . . . . . . . . 10 (𝑎 = 𝑥 → ((𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = 𝑃)))
98reubidv 3307 . . . . . . . . 9 (𝑎 = 𝑥 → (∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = 𝑃)))
109adantl 485 . . . . . . . 8 (((𝑥𝑦 ∧ ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) ∧ 𝑎 = 𝑥) → (∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = 𝑃)))
11 simpr 488 . . . . . . . . . . . . . . 15 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → 𝑦 ∈ ℕ)
1211adantr 484 . . . . . . . . . . . . . 14 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) → 𝑦 ∈ ℕ)
13 breq2 5040 . . . . . . . . . . . . . . . . 17 (𝑏 = 𝑦 → (𝑥𝑏𝑥𝑦))
14 oveq1 7163 . . . . . . . . . . . . . . . . . . 19 (𝑏 = 𝑦 → (𝑏↑2) = (𝑦↑2))
1514oveq2d 7172 . . . . . . . . . . . . . . . . . 18 (𝑏 = 𝑦 → ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)))
1615eqeq1d 2760 . . . . . . . . . . . . . . . . 17 (𝑏 = 𝑦 → (((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)) ↔ ((𝑥↑2) + (𝑦↑2)) = ((𝑥↑2) + (𝑦↑2))))
1713, 16anbi12d 633 . . . . . . . . . . . . . . . 16 (𝑏 = 𝑦 → ((𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ↔ (𝑥𝑦 ∧ ((𝑥↑2) + (𝑦↑2)) = ((𝑥↑2) + (𝑦↑2)))))
18 equequ1 2032 . . . . . . . . . . . . . . . . . 18 (𝑏 = 𝑦 → (𝑏 = 𝑐𝑦 = 𝑐))
1918imbi2d 344 . . . . . . . . . . . . . . . . 17 (𝑏 = 𝑦 → (((𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑏 = 𝑐) ↔ ((𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑦 = 𝑐)))
2019ralbidv 3126 . . . . . . . . . . . . . . . 16 (𝑏 = 𝑦 → (∀𝑐 ∈ ℕ ((𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑏 = 𝑐) ↔ ∀𝑐 ∈ ℕ ((𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑦 = 𝑐)))
2117, 20anbi12d 633 . . . . . . . . . . . . . . 15 (𝑏 = 𝑦 → (((𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑏 = 𝑐)) ↔ ((𝑥𝑦 ∧ ((𝑥↑2) + (𝑦↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑦 = 𝑐))))
2221adantl 485 . . . . . . . . . . . . . 14 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑏 = 𝑦) → (((𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑏 = 𝑐)) ↔ ((𝑥𝑦 ∧ ((𝑥↑2) + (𝑦↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑦 = 𝑐))))
23 simpr 488 . . . . . . . . . . . . . . 15 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) → 𝑥𝑦)
24 eqidd 2759 . . . . . . . . . . . . . . 15 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) → ((𝑥↑2) + (𝑦↑2)) = ((𝑥↑2) + (𝑦↑2)))
25 nnre 11694 . . . . . . . . . . . . . . . . . . . . 21 (𝑐 ∈ ℕ → 𝑐 ∈ ℝ)
2625resqcld 13674 . . . . . . . . . . . . . . . . . . . 20 (𝑐 ∈ ℕ → (𝑐↑2) ∈ ℝ)
2726adantl 485 . . . . . . . . . . . . . . . . . . 19 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) → (𝑐↑2) ∈ ℝ)
28 nnre 11694 . . . . . . . . . . . . . . . . . . . . . 22 (𝑦 ∈ ℕ → 𝑦 ∈ ℝ)
2928resqcld 13674 . . . . . . . . . . . . . . . . . . . . 21 (𝑦 ∈ ℕ → (𝑦↑2) ∈ ℝ)
3029adantl 485 . . . . . . . . . . . . . . . . . . . 20 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → (𝑦↑2) ∈ ℝ)
3130ad2antrr 725 . . . . . . . . . . . . . . . . . . 19 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) → (𝑦↑2) ∈ ℝ)
32 nnre 11694 . . . . . . . . . . . . . . . . . . . . . 22 (𝑥 ∈ ℕ → 𝑥 ∈ ℝ)
3332resqcld 13674 . . . . . . . . . . . . . . . . . . . . 21 (𝑥 ∈ ℕ → (𝑥↑2) ∈ ℝ)
3433adantr 484 . . . . . . . . . . . . . . . . . . . 20 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → (𝑥↑2) ∈ ℝ)
3534ad2antrr 725 . . . . . . . . . . . . . . . . . . 19 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) → (𝑥↑2) ∈ ℝ)
36 readdcan 10865 . . . . . . . . . . . . . . . . . . 19 (((𝑐↑2) ∈ ℝ ∧ (𝑦↑2) ∈ ℝ ∧ (𝑥↑2) ∈ ℝ) → (((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2)) ↔ (𝑐↑2) = (𝑦↑2)))
3727, 31, 35, 36syl3anc 1368 . . . . . . . . . . . . . . . . . 18 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) → (((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2)) ↔ (𝑐↑2) = (𝑦↑2)))
3828ad4antlr 732 . . . . . . . . . . . . . . . . . . . 20 (((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑦↑2)) → 𝑦 ∈ ℝ)
3925ad2antlr 726 . . . . . . . . . . . . . . . . . . . 20 (((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑦↑2)) → 𝑐 ∈ ℝ)
40 nnnn0 11954 . . . . . . . . . . . . . . . . . . . . . 22 (𝑦 ∈ ℕ → 𝑦 ∈ ℕ0)
4140nn0ge0d 12010 . . . . . . . . . . . . . . . . . . . . 21 (𝑦 ∈ ℕ → 0 ≤ 𝑦)
4241ad4antlr 732 . . . . . . . . . . . . . . . . . . . 20 (((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑦↑2)) → 0 ≤ 𝑦)
43 nnnn0 11954 . . . . . . . . . . . . . . . . . . . . . 22 (𝑐 ∈ ℕ → 𝑐 ∈ ℕ0)
4443nn0ge0d 12010 . . . . . . . . . . . . . . . . . . . . 21 (𝑐 ∈ ℕ → 0 ≤ 𝑐)
4544ad2antlr 726 . . . . . . . . . . . . . . . . . . . 20 (((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑦↑2)) → 0 ≤ 𝑐)
46 simpr 488 . . . . . . . . . . . . . . . . . . . . 21 (((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑦↑2)) → (𝑐↑2) = (𝑦↑2))
4746eqcomd 2764 . . . . . . . . . . . . . . . . . . . 20 (((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑦↑2)) → (𝑦↑2) = (𝑐↑2))
4838, 39, 42, 45, 47sq11d 13684 . . . . . . . . . . . . . . . . . . 19 (((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑦↑2)) → 𝑦 = 𝑐)
4948ex 416 . . . . . . . . . . . . . . . . . 18 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) → ((𝑐↑2) = (𝑦↑2) → 𝑦 = 𝑐))
5037, 49sylbid 243 . . . . . . . . . . . . . . . . 17 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) → (((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2)) → 𝑦 = 𝑐))
5150adantld 494 . . . . . . . . . . . . . . . 16 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) ∧ 𝑐 ∈ ℕ) → ((𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑦 = 𝑐))
5251ralrimiva 3113 . . . . . . . . . . . . . . 15 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) → ∀𝑐 ∈ ℕ ((𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑦 = 𝑐))
5323, 24, 52jca31 518 . . . . . . . . . . . . . 14 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) → ((𝑥𝑦 ∧ ((𝑥↑2) + (𝑦↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑦 = 𝑐)))
5412, 22, 53rspcedvd 3546 . . . . . . . . . . . . 13 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) → ∃𝑏 ∈ ℕ ((𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑏 = 𝑐)))
55 breq2 5040 . . . . . . . . . . . . . . 15 (𝑏 = 𝑐 → (𝑥𝑏𝑥𝑐))
56 oveq1 7163 . . . . . . . . . . . . . . . . 17 (𝑏 = 𝑐 → (𝑏↑2) = (𝑐↑2))
5756oveq2d 7172 . . . . . . . . . . . . . . . 16 (𝑏 = 𝑐 → ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑐↑2)))
5857eqeq1d 2760 . . . . . . . . . . . . . . 15 (𝑏 = 𝑐 → (((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)) ↔ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))))
5955, 58anbi12d 633 . . . . . . . . . . . . . 14 (𝑏 = 𝑐 → ((𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ↔ (𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2)))))
6059reu8 3649 . . . . . . . . . . . . 13 (∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ↔ ∃𝑏 ∈ ℕ ((𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑥𝑐 ∧ ((𝑥↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑏 = 𝑐)))
6154, 60sylibr 237 . . . . . . . . . . . 12 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑥𝑦) → ∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))))
6261ex 416 . . . . . . . . . . 11 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → (𝑥𝑦 → ∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)))))
6362adantr 484 . . . . . . . . . 10 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2))) → (𝑥𝑦 → ∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)))))
6463impcom 411 . . . . . . . . 9 ((𝑥𝑦 ∧ ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) → ∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))))
65 eqeq2 2770 . . . . . . . . . . . . 13 (𝑃 = ((𝑥↑2) + (𝑦↑2)) → (((𝑥↑2) + (𝑏↑2)) = 𝑃 ↔ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))))
6665anbi2d 631 . . . . . . . . . . . 12 (𝑃 = ((𝑥↑2) + (𝑦↑2)) → ((𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)))))
6766reubidv 3307 . . . . . . . . . . 11 (𝑃 = ((𝑥↑2) + (𝑦↑2)) → (∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)))))
6867adantl 485 . . . . . . . . . 10 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2))) → (∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)))))
6968adantl 485 . . . . . . . . 9 ((𝑥𝑦 ∧ ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) → (∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)))))
7064, 69mpbird 260 . . . . . . . 8 ((𝑥𝑦 ∧ ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) → ∃!𝑏 ∈ ℕ (𝑥𝑏 ∧ ((𝑥↑2) + (𝑏↑2)) = 𝑃))
713, 10, 70rspcedvd 3546 . . . . . . 7 ((𝑥𝑦 ∧ ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) → ∃𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
7211adantr 484 . . . . . . . . 9 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2))) → 𝑦 ∈ ℕ)
7372adantl 485 . . . . . . . 8 ((¬ 𝑥𝑦 ∧ ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) → 𝑦 ∈ ℕ)
74 breq1 5039 . . . . . . . . . . 11 (𝑎 = 𝑦 → (𝑎𝑏𝑦𝑏))
75 oveq1 7163 . . . . . . . . . . . . 13 (𝑎 = 𝑦 → (𝑎↑2) = (𝑦↑2))
7675oveq1d 7171 . . . . . . . . . . . 12 (𝑎 = 𝑦 → ((𝑎↑2) + (𝑏↑2)) = ((𝑦↑2) + (𝑏↑2)))
7776eqeq1d 2760 . . . . . . . . . . 11 (𝑎 = 𝑦 → (((𝑎↑2) + (𝑏↑2)) = 𝑃 ↔ ((𝑦↑2) + (𝑏↑2)) = 𝑃))
7874, 77anbi12d 633 . . . . . . . . . 10 (𝑎 = 𝑦 → ((𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = 𝑃)))
7978reubidv 3307 . . . . . . . . 9 (𝑎 = 𝑦 → (∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = 𝑃)))
8079adantl 485 . . . . . . . 8 (((¬ 𝑥𝑦 ∧ ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) ∧ 𝑎 = 𝑦) → (∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = 𝑃)))
81 simpll 766 . . . . . . . . . . . . . 14 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ ¬ 𝑥𝑦) → 𝑥 ∈ ℕ)
82 breq2 5040 . . . . . . . . . . . . . . . . 17 (𝑏 = 𝑥 → (𝑦𝑏𝑦𝑥))
83 oveq1 7163 . . . . . . . . . . . . . . . . . . 19 (𝑏 = 𝑥 → (𝑏↑2) = (𝑥↑2))
8483oveq2d 7172 . . . . . . . . . . . . . . . . . 18 (𝑏 = 𝑥 → ((𝑦↑2) + (𝑏↑2)) = ((𝑦↑2) + (𝑥↑2)))
8584eqeq1d 2760 . . . . . . . . . . . . . . . . 17 (𝑏 = 𝑥 → (((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)) ↔ ((𝑦↑2) + (𝑥↑2)) = ((𝑥↑2) + (𝑦↑2))))
8682, 85anbi12d 633 . . . . . . . . . . . . . . . 16 (𝑏 = 𝑥 → ((𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ↔ (𝑦𝑥 ∧ ((𝑦↑2) + (𝑥↑2)) = ((𝑥↑2) + (𝑦↑2)))))
87 equequ1 2032 . . . . . . . . . . . . . . . . . 18 (𝑏 = 𝑥 → (𝑏 = 𝑐𝑥 = 𝑐))
8887imbi2d 344 . . . . . . . . . . . . . . . . 17 (𝑏 = 𝑥 → (((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑏 = 𝑐) ↔ ((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑥 = 𝑐)))
8988ralbidv 3126 . . . . . . . . . . . . . . . 16 (𝑏 = 𝑥 → (∀𝑐 ∈ ℕ ((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑏 = 𝑐) ↔ ∀𝑐 ∈ ℕ ((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑥 = 𝑐)))
9086, 89anbi12d 633 . . . . . . . . . . . . . . 15 (𝑏 = 𝑥 → (((𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑏 = 𝑐)) ↔ ((𝑦𝑥 ∧ ((𝑦↑2) + (𝑥↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑥 = 𝑐))))
9190adantl 485 . . . . . . . . . . . . . 14 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ ¬ 𝑥𝑦) ∧ 𝑏 = 𝑥) → (((𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑏 = 𝑐)) ↔ ((𝑦𝑥 ∧ ((𝑦↑2) + (𝑥↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑥 = 𝑐))))
92 ltnle 10771 . . . . . . . . . . . . . . . . . 18 ((𝑦 ∈ ℝ ∧ 𝑥 ∈ ℝ) → (𝑦 < 𝑥 ↔ ¬ 𝑥𝑦))
9328, 32, 92syl2anr 599 . . . . . . . . . . . . . . . . 17 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → (𝑦 < 𝑥 ↔ ¬ 𝑥𝑦))
9428ad2antlr 726 . . . . . . . . . . . . . . . . . . 19 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑦 < 𝑥) → 𝑦 ∈ ℝ)
9532ad2antrr 725 . . . . . . . . . . . . . . . . . . 19 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑦 < 𝑥) → 𝑥 ∈ ℝ)
96 simpr 488 . . . . . . . . . . . . . . . . . . 19 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑦 < 𝑥) → 𝑦 < 𝑥)
9794, 95, 96ltled 10839 . . . . . . . . . . . . . . . . . 18 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑦 < 𝑥) → 𝑦𝑥)
9897ex 416 . . . . . . . . . . . . . . . . 17 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → (𝑦 < 𝑥𝑦𝑥))
9993, 98sylbird 263 . . . . . . . . . . . . . . . 16 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → (¬ 𝑥𝑦𝑦𝑥))
10099imp 410 . . . . . . . . . . . . . . 15 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ ¬ 𝑥𝑦) → 𝑦𝑥)
10129recnd 10720 . . . . . . . . . . . . . . . . . 18 (𝑦 ∈ ℕ → (𝑦↑2) ∈ ℂ)
102101adantl 485 . . . . . . . . . . . . . . . . 17 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → (𝑦↑2) ∈ ℂ)
10333recnd 10720 . . . . . . . . . . . . . . . . . 18 (𝑥 ∈ ℕ → (𝑥↑2) ∈ ℂ)
104103adantr 484 . . . . . . . . . . . . . . . . 17 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → (𝑥↑2) ∈ ℂ)
105102, 104addcomd 10893 . . . . . . . . . . . . . . . 16 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → ((𝑦↑2) + (𝑥↑2)) = ((𝑥↑2) + (𝑦↑2)))
106105adantr 484 . . . . . . . . . . . . . . 15 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ ¬ 𝑥𝑦) → ((𝑦↑2) + (𝑥↑2)) = ((𝑥↑2) + (𝑦↑2)))
10734recnd 10720 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → (𝑥↑2) ∈ ℂ)
108107adantr 484 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) → (𝑥↑2) ∈ ℂ)
10930recnd 10720 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → (𝑦↑2) ∈ ℂ)
110109adantr 484 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) → (𝑦↑2) ∈ ℂ)
111108, 110addcomd 10893 . . . . . . . . . . . . . . . . . . . . 21 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) → ((𝑥↑2) + (𝑦↑2)) = ((𝑦↑2) + (𝑥↑2)))
112111eqeq2d 2769 . . . . . . . . . . . . . . . . . . . 20 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) → (((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2)) ↔ ((𝑦↑2) + (𝑐↑2)) = ((𝑦↑2) + (𝑥↑2))))
11326adantl 485 . . . . . . . . . . . . . . . . . . . . 21 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) → (𝑐↑2) ∈ ℝ)
11433ad2antrr 725 . . . . . . . . . . . . . . . . . . . . 21 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) → (𝑥↑2) ∈ ℝ)
11529ad2antlr 726 . . . . . . . . . . . . . . . . . . . . 21 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) → (𝑦↑2) ∈ ℝ)
116 readdcan 10865 . . . . . . . . . . . . . . . . . . . . 21 (((𝑐↑2) ∈ ℝ ∧ (𝑥↑2) ∈ ℝ ∧ (𝑦↑2) ∈ ℝ) → (((𝑦↑2) + (𝑐↑2)) = ((𝑦↑2) + (𝑥↑2)) ↔ (𝑐↑2) = (𝑥↑2)))
117113, 114, 115, 116syl3anc 1368 . . . . . . . . . . . . . . . . . . . 20 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) → (((𝑦↑2) + (𝑐↑2)) = ((𝑦↑2) + (𝑥↑2)) ↔ (𝑐↑2) = (𝑥↑2)))
118112, 117bitrd 282 . . . . . . . . . . . . . . . . . . 19 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) → (((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2)) ↔ (𝑐↑2) = (𝑥↑2)))
11925ad2antlr 726 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑥↑2)) → 𝑐 ∈ ℝ)
12032adantr 484 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → 𝑥 ∈ ℝ)
121120ad2antrr 725 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑥↑2)) → 𝑥 ∈ ℝ)
12244ad2antlr 726 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑥↑2)) → 0 ≤ 𝑐)
123 nnnn0 11954 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝑥 ∈ ℕ → 𝑥 ∈ ℕ0)
124123nn0ge0d 12010 . . . . . . . . . . . . . . . . . . . . . . . 24 (𝑥 ∈ ℕ → 0 ≤ 𝑥)
125124adantr 484 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → 0 ≤ 𝑥)
126125ad2antrr 725 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑥↑2)) → 0 ≤ 𝑥)
127 simpr 488 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑥↑2)) → (𝑐↑2) = (𝑥↑2))
128119, 121, 122, 126, 127sq11d 13684 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑥↑2)) → 𝑐 = 𝑥)
129128eqcomd 2764 . . . . . . . . . . . . . . . . . . . 20 ((((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) ∧ (𝑐↑2) = (𝑥↑2)) → 𝑥 = 𝑐)
130129ex 416 . . . . . . . . . . . . . . . . . . 19 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) → ((𝑐↑2) = (𝑥↑2) → 𝑥 = 𝑐))
131118, 130sylbid 243 . . . . . . . . . . . . . . . . . 18 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) → (((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2)) → 𝑥 = 𝑐))
132131adantld 494 . . . . . . . . . . . . . . . . 17 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑐 ∈ ℕ) → ((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑥 = 𝑐))
133132ralrimiva 3113 . . . . . . . . . . . . . . . 16 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → ∀𝑐 ∈ ℕ ((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑥 = 𝑐))
134133adantr 484 . . . . . . . . . . . . . . 15 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ ¬ 𝑥𝑦) → ∀𝑐 ∈ ℕ ((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑥 = 𝑐))
135100, 106, 134jca31 518 . . . . . . . . . . . . . 14 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ ¬ 𝑥𝑦) → ((𝑦𝑥 ∧ ((𝑦↑2) + (𝑥↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑥 = 𝑐)))
13681, 91, 135rspcedvd 3546 . . . . . . . . . . . . 13 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ ¬ 𝑥𝑦) → ∃𝑏 ∈ ℕ ((𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑏 = 𝑐)))
137 breq2 5040 . . . . . . . . . . . . . . 15 (𝑏 = 𝑐 → (𝑦𝑏𝑦𝑐))
13856oveq2d 7172 . . . . . . . . . . . . . . . 16 (𝑏 = 𝑐 → ((𝑦↑2) + (𝑏↑2)) = ((𝑦↑2) + (𝑐↑2)))
139138eqeq1d 2760 . . . . . . . . . . . . . . 15 (𝑏 = 𝑐 → (((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)) ↔ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))))
140137, 139anbi12d 633 . . . . . . . . . . . . . 14 (𝑏 = 𝑐 → ((𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ↔ (𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2)))))
141140reu8 3649 . . . . . . . . . . . . 13 (∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ↔ ∃𝑏 ∈ ℕ ((𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) ∧ ∀𝑐 ∈ ℕ ((𝑦𝑐 ∧ ((𝑦↑2) + (𝑐↑2)) = ((𝑥↑2) + (𝑦↑2))) → 𝑏 = 𝑐)))
142136, 141sylibr 237 . . . . . . . . . . . 12 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ ¬ 𝑥𝑦) → ∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))))
143142ex 416 . . . . . . . . . . 11 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → (¬ 𝑥𝑦 → ∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)))))
144143adantr 484 . . . . . . . . . 10 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2))) → (¬ 𝑥𝑦 → ∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)))))
145144impcom 411 . . . . . . . . 9 ((¬ 𝑥𝑦 ∧ ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) → ∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))))
146 eqeq2 2770 . . . . . . . . . . . . 13 (𝑃 = ((𝑥↑2) + (𝑦↑2)) → (((𝑦↑2) + (𝑏↑2)) = 𝑃 ↔ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))))
147146anbi2d 631 . . . . . . . . . . . 12 (𝑃 = ((𝑥↑2) + (𝑦↑2)) → ((𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)))))
148147reubidv 3307 . . . . . . . . . . 11 (𝑃 = ((𝑥↑2) + (𝑦↑2)) → (∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)))))
149148adantl 485 . . . . . . . . . 10 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2))) → (∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)))))
150149adantl 485 . . . . . . . . 9 ((¬ 𝑥𝑦 ∧ ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) → (∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2)))))
151145, 150mpbird 260 . . . . . . . 8 ((¬ 𝑥𝑦 ∧ ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) → ∃!𝑏 ∈ ℕ (𝑦𝑏 ∧ ((𝑦↑2) + (𝑏↑2)) = 𝑃))
15273, 80, 151rspcedvd 3546 . . . . . . 7 ((¬ 𝑥𝑦 ∧ ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) → ∃𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
15371, 152pm2.61ian 811 . . . . . 6 (((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) ∧ 𝑃 = ((𝑥↑2) + (𝑦↑2))) → ∃𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
154153ex 416 . . . . 5 ((𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ) → (𝑃 = ((𝑥↑2) + (𝑦↑2)) → ∃𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
155154adantl 485 . . . 4 (((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ (𝑥 ∈ ℕ ∧ 𝑦 ∈ ℕ)) → (𝑃 = ((𝑥↑2) + (𝑦↑2)) → ∃𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
156155rexlimdvva 3218 . . 3 ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → (∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)) → ∃𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
1571, 156mpd 15 . 2 ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
158 reurex 3341 . . . . 5 (∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
159158a1i 11 . . . 4 (((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) → (∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
160159ralrimiva 3113 . . 3 ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∀𝑎 ∈ ℕ (∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
161 2sqmo 26133 . . . . 5 (𝑃 ∈ ℙ → ∃*𝑎 ∈ ℕ0𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
162 nnssnn0 11950 . . . . . 6 ℕ ⊆ ℕ0
163 nfcv 2919 . . . . . . 7 𝑎
164 nfcv 2919 . . . . . . 7 𝑎0
165163, 164ssrmof 3959 . . . . . 6 (ℕ ⊆ ℕ0 → (∃*𝑎 ∈ ℕ0𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃*𝑎 ∈ ℕ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
166162, 165ax-mp 5 . . . . 5 (∃*𝑎 ∈ ℕ0𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃*𝑎 ∈ ℕ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
167 ssrexv 3961 . . . . . . 7 (ℕ ⊆ ℕ0 → (∃𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
168162, 167ax-mp 5 . . . . . 6 (∃𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
169168rmoimi 3658 . . . . 5 (∃*𝑎 ∈ ℕ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃*𝑎 ∈ ℕ ∃𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
170161, 166, 1693syl 18 . . . 4 (𝑃 ∈ ℙ → ∃*𝑎 ∈ ℕ ∃𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
171170adantr 484 . . 3 ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃*𝑎 ∈ ℕ ∃𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
172 rmoim 3656 . . 3 (∀𝑎 ∈ ℕ (∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) → (∃*𝑎 ∈ ℕ ∃𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃*𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
173160, 171, 172sylc 65 . 2 ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃*𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
174 reu5 3340 . 2 (∃!𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (∃𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃*𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
175157, 173, 174sylanbrc 586 1 ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃!𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
 Colors of variables: wff setvar class Syntax hints:  ¬ wn 3   → wi 4   ↔ wb 209   ∧ wa 399   = wceq 1538   ∈ wcel 2111  ∀wral 3070  ∃wrex 3071  ∃!wreu 3072  ∃*wrmo 3073   ⊆ wss 3860   class class class wbr 5036  (class class class)co 7156  ℂcc 10586  ℝcr 10587  0cc0 10588  1c1 10589   + caddc 10591   < clt 10726   ≤ cle 10727  ℕcn 11687  2c2 11742  4c4 11744  ℕ0cn0 11947   mod cmo 13299  ↑cexp 13492  ℙcprime 16080 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2729  ax-rep 5160  ax-sep 5173  ax-nul 5180  ax-pow 5238  ax-pr 5302  ax-un 7465  ax-cnex 10644  ax-resscn 10645  ax-1cn 10646  ax-icn 10647  ax-addcl 10648  ax-addrcl 10649  ax-mulcl 10650  ax-mulrcl 10651  ax-mulcom 10652  ax-addass 10653  ax-mulass 10654  ax-distr 10655  ax-i2m1 10656  ax-1ne0 10657  ax-1rid 10658  ax-rnegex 10659  ax-rrecex 10660  ax-cnre 10661  ax-pre-lttri 10662  ax-pre-lttrn 10663  ax-pre-ltadd 10664  ax-pre-mulgt0 10665  ax-pre-sup 10666  ax-addf 10667  ax-mulf 10668 This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-fal 1551  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2557  df-eu 2588  df-clab 2736  df-cleq 2750  df-clel 2830  df-nfc 2901  df-ne 2952  df-nel 3056  df-ral 3075  df-rex 3076  df-reu 3077  df-rmo 3078  df-rab 3079  df-v 3411  df-sbc 3699  df-csb 3808  df-dif 3863  df-un 3865  df-in 3867  df-ss 3877  df-pss 3879  df-nul 4228  df-if 4424  df-pw 4499  df-sn 4526  df-pr 4528  df-tp 4530  df-op 4532  df-uni 4802  df-int 4842  df-iun 4888  df-iin 4889  df-br 5037  df-opab 5099  df-mpt 5117  df-tr 5143  df-id 5434  df-eprel 5439  df-po 5447  df-so 5448  df-fr 5487  df-se 5488  df-we 5489  df-xp 5534  df-rel 5535  df-cnv 5536  df-co 5537  df-dm 5538  df-rn 5539  df-res 5540  df-ima 5541  df-pred 6131  df-ord 6177  df-on 6178  df-lim 6179  df-suc 6180  df-iota 6299  df-fun 6342  df-fn 6343  df-f 6344  df-f1 6345  df-fo 6346  df-f1o 6347  df-fv 6348  df-isom 6349  df-riota 7114  df-ov 7159  df-oprab 7160  df-mpo 7161  df-of 7411  df-ofr 7412  df-om 7586  df-1st 7699  df-2nd 7700  df-supp 7842  df-tpos 7908  df-wrecs 7963  df-recs 8024  df-rdg 8062  df-1o 8118  df-2o 8119  df-oadd 8122  df-er 8305  df-ec 8307  df-qs 8311  df-map 8424  df-pm 8425  df-ixp 8493  df-en 8541  df-dom 8542  df-sdom 8543  df-fin 8544  df-fsupp 8880  df-sup 8952  df-inf 8953  df-oi 9020  df-dju 9376  df-card 9414  df-pnf 10728  df-mnf 10729  df-xr 10730  df-ltxr 10731  df-le 10732  df-sub 10923  df-neg 10924  df-div 11349  df-nn 11688  df-2 11750  df-3 11751  df-4 11752  df-5 11753  df-6 11754  df-7 11755  df-8 11756  df-9 11757  df-n0 11948  df-xnn0 12020  df-z 12034  df-dec 12151  df-uz 12296  df-q 12402  df-rp 12444  df-fz 12953  df-fzo 13096  df-fl 13224  df-mod 13300  df-seq 13432  df-exp 13493  df-hash 13754  df-cj 14519  df-re 14520  df-im 14521  df-sqrt 14655  df-abs 14656  df-dvds 15669  df-gcd 15907  df-prm 16081  df-phi 16171  df-pc 16242  df-gz 16334  df-struct 16556  df-ndx 16557  df-slot 16558  df-base 16560  df-sets 16561  df-ress 16562  df-plusg 16649  df-mulr 16650  df-starv 16651  df-sca 16652  df-vsca 16653  df-ip 16654  df-tset 16655  df-ple 16656  df-ds 16658  df-unif 16659  df-hom 16660  df-cco 16661  df-0g 16786  df-gsum 16787  df-prds 16792  df-pws 16794  df-imas 16852  df-qus 16853  df-mre 16928  df-mrc 16929  df-acs 16931  df-mgm 17931  df-sgrp 17980  df-mnd 17991  df-mhm 18035  df-submnd 18036  df-grp 18185  df-minusg 18186  df-sbg 18187  df-mulg 18305  df-subg 18356  df-nsg 18357  df-eqg 18358  df-ghm 18436  df-cntz 18527  df-cmn 18988  df-abl 18989  df-mgp 19321  df-ur 19333  df-srg 19337  df-ring 19380  df-cring 19381  df-oppr 19457  df-dvdsr 19475  df-unit 19476  df-invr 19506  df-dvr 19517  df-rnghom 19551  df-drng 19585  df-field 19586  df-subrg 19614  df-lmod 19717  df-lss 19785  df-lsp 19825  df-sra 20025  df-rgmod 20026  df-lidl 20027  df-rsp 20028  df-2idl 20086  df-nzr 20112  df-rlreg 20137  df-domn 20138  df-idom 20139  df-cnfld 20180  df-zring 20252  df-zrh 20286  df-zn 20289  df-assa 20631  df-asp 20632  df-ascl 20633  df-psr 20684  df-mvr 20685  df-mpl 20686  df-opsr 20688  df-evls 20848  df-evl 20849  df-psr1 20917  df-vr1 20918  df-ply1 20919  df-coe1 20920  df-evl1 21048  df-mdeg 24765  df-deg1 24766  df-mon1 24843  df-uc1p 24844  df-q1p 24845  df-r1p 24846  df-lgs 25991 This theorem is referenced by:  2sqreunnltlem  26146  2sqreunn  26153
 Copyright terms: Public domain W3C validator