Proof of Theorem 2sqreultblem
Step | Hyp | Ref
| Expression |
1 | | 2sqreultlem 26595 |
. . 3
⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) →
∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) |
2 | 1 | ex 413 |
. 2
⊢ (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 → ∃!𝑎 ∈ ℕ0
∃!𝑏 ∈
ℕ0 (𝑎 <
𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))) |
3 | | 2reu2rex 3363 |
. . . . 5
⊢
(∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑎 ∈ ℕ0 ∃𝑏 ∈ ℕ0
(𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) |
4 | | elsni 4578 |
. . . . 5
⊢ (𝑃 ∈ {2} → 𝑃 = 2) |
5 | | eqeq2 2750 |
. . . . . . . . . . 11
⊢ (𝑃 = 2 → (((𝑎↑2) + (𝑏↑2)) = 𝑃 ↔ ((𝑎↑2) + (𝑏↑2)) = 2)) |
6 | 5 | anbi2d 629 |
. . . . . . . . . 10
⊢ (𝑃 = 2 → ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 2))) |
7 | 6 | adantl 482 |
. . . . . . . . 9
⊢ (((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) ∧ 𝑃 = 2) → ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 2))) |
8 | | 2sq2 26581 |
. . . . . . . . . . . 12
⊢ ((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) → (((𝑎↑2) + (𝑏↑2)) = 2 ↔ (𝑎 = 1 ∧ 𝑏 = 1))) |
9 | | breq12 5079 |
. . . . . . . . . . . . 13
⊢ ((𝑎 = 1 ∧ 𝑏 = 1) → (𝑎 < 𝑏 ↔ 1 < 1)) |
10 | | 1re 10975 |
. . . . . . . . . . . . . . 15
⊢ 1 ∈
ℝ |
11 | 10 | ltnri 11084 |
. . . . . . . . . . . . . 14
⊢ ¬ 1
< 1 |
12 | 11 | pm2.21i 119 |
. . . . . . . . . . . . 13
⊢ (1 < 1
→ (𝑃 mod 4) =
1) |
13 | 9, 12 | syl6bi 252 |
. . . . . . . . . . . 12
⊢ ((𝑎 = 1 ∧ 𝑏 = 1) → (𝑎 < 𝑏 → (𝑃 mod 4) = 1)) |
14 | 8, 13 | syl6bi 252 |
. . . . . . . . . . 11
⊢ ((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) → (((𝑎↑2) + (𝑏↑2)) = 2 → (𝑎 < 𝑏 → (𝑃 mod 4) = 1))) |
15 | 14 | impcomd 412 |
. . . . . . . . . 10
⊢ ((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) → ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 2) → (𝑃 mod 4) = 1)) |
16 | 15 | adantr 481 |
. . . . . . . . 9
⊢ (((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) ∧ 𝑃 = 2) → ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 2) → (𝑃 mod 4) = 1)) |
17 | 7, 16 | sylbid 239 |
. . . . . . . 8
⊢ (((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) ∧ 𝑃 = 2) → ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑃 mod 4) = 1)) |
18 | 17 | ex 413 |
. . . . . . 7
⊢ ((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) → (𝑃 = 2 → ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑃 mod 4) = 1))) |
19 | 18 | com23 86 |
. . . . . 6
⊢ ((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) → ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑃 = 2 → (𝑃 mod 4) = 1))) |
20 | 19 | rexlimivv 3221 |
. . . . 5
⊢
(∃𝑎 ∈
ℕ0 ∃𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑃 = 2 → (𝑃 mod 4) = 1)) |
21 | 3, 4, 20 | syl2imc 41 |
. . . 4
⊢ (𝑃 ∈ {2} →
(∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑃 mod 4) = 1)) |
22 | 21 | a1d 25 |
. . 3
⊢ (𝑃 ∈ {2} → (𝑃 ∈ ℙ →
(∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑃 mod 4) = 1))) |
23 | | eldif 3897 |
. . . . 5
⊢ (𝑃 ∈ (ℙ ∖ {2})
↔ (𝑃 ∈ ℙ
∧ ¬ 𝑃 ∈
{2})) |
24 | | eldifsnneq 4724 |
. . . . . 6
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ ¬ 𝑃 =
2) |
25 | | nn0ssz 12341 |
. . . . . . . . . . 11
⊢
ℕ0 ⊆ ℤ |
26 | | id 22 |
. . . . . . . . . . . . . . . 16
⊢ (((𝑎↑2) + (𝑏↑2)) = 𝑃 → ((𝑎↑2) + (𝑏↑2)) = 𝑃) |
27 | 26 | eqcomd 2744 |
. . . . . . . . . . . . . . 15
⊢ (((𝑎↑2) + (𝑏↑2)) = 𝑃 → 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
28 | 27 | adantl 482 |
. . . . . . . . . . . . . 14
⊢ ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
29 | 28 | reximi 3178 |
. . . . . . . . . . . . 13
⊢
(∃𝑏 ∈
ℕ0 (𝑎 <
𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑏 ∈ ℕ0 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
30 | 29 | reximi 3178 |
. . . . . . . . . . . 12
⊢
(∃𝑎 ∈
ℕ0 ∃𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑎 ∈ ℕ0 ∃𝑏 ∈ ℕ0
𝑃 = ((𝑎↑2) + (𝑏↑2))) |
31 | | ssrexv 3988 |
. . . . . . . . . . . . . 14
⊢
(ℕ0 ⊆ ℤ → (∃𝑏 ∈ ℕ0 𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2)))) |
32 | 25, 31 | ax-mp 5 |
. . . . . . . . . . . . 13
⊢
(∃𝑏 ∈
ℕ0 𝑃 =
((𝑎↑2) + (𝑏↑2)) → ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
33 | 32 | reximi 3178 |
. . . . . . . . . . . 12
⊢
(∃𝑎 ∈
ℕ0 ∃𝑏 ∈ ℕ0 𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑎 ∈ ℕ0 ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
34 | 3, 30, 33 | 3syl 18 |
. . . . . . . . . . 11
⊢
(∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑎 ∈ ℕ0 ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
35 | | ssrexv 3988 |
. . . . . . . . . . 11
⊢
(ℕ0 ⊆ ℤ → (∃𝑎 ∈ ℕ0 ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2)))) |
36 | 25, 34, 35 | mpsyl 68 |
. . . . . . . . . 10
⊢
(∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
37 | 36 | adantl 482 |
. . . . . . . . 9
⊢ ((𝑃 ∈ (ℙ ∖ {2})
∧ ∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) → ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
38 | | eldifi 4061 |
. . . . . . . . . . 11
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℙ) |
39 | 38 | adantr 481 |
. . . . . . . . . 10
⊢ ((𝑃 ∈ (ℙ ∖ {2})
∧ ∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) → 𝑃 ∈ ℙ) |
40 | | 2sqb 26580 |
. . . . . . . . . 10
⊢ (𝑃 ∈ ℙ →
(∃𝑎 ∈ ℤ
∃𝑏 ∈ ℤ
𝑃 = ((𝑎↑2) + (𝑏↑2)) ↔ (𝑃 = 2 ∨ (𝑃 mod 4) = 1))) |
41 | 39, 40 | syl 17 |
. . . . . . . . 9
⊢ ((𝑃 ∈ (ℙ ∖ {2})
∧ ∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) → (∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2)) ↔ (𝑃 = 2 ∨ (𝑃 mod 4) = 1))) |
42 | 37, 41 | mpbid 231 |
. . . . . . . 8
⊢ ((𝑃 ∈ (ℙ ∖ {2})
∧ ∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) → (𝑃 = 2 ∨ (𝑃 mod 4) = 1)) |
43 | 42 | ord 861 |
. . . . . . 7
⊢ ((𝑃 ∈ (ℙ ∖ {2})
∧ ∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) → (¬ 𝑃 = 2 → (𝑃 mod 4) = 1)) |
44 | 43 | ex 413 |
. . . . . 6
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (¬ 𝑃 = 2 → (𝑃 mod 4) = 1))) |
45 | 24, 44 | mpid 44 |
. . . . 5
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ (∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑃 mod 4) = 1)) |
46 | 23, 45 | sylbir 234 |
. . . 4
⊢ ((𝑃 ∈ ℙ ∧ ¬
𝑃 ∈ {2}) →
(∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑃 mod 4) = 1)) |
47 | 46 | expcom 414 |
. . 3
⊢ (¬
𝑃 ∈ {2} → (𝑃 ∈ ℙ →
(∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑃 mod 4) = 1))) |
48 | 22, 47 | pm2.61i 182 |
. 2
⊢ (𝑃 ∈ ℙ →
(∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑃 mod 4) = 1)) |
49 | 2, 48 | impbid 211 |
1
⊢ (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 ↔ ∃!𝑎 ∈ ℕ0
∃!𝑏 ∈
ℕ0 (𝑎 <
𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))) |