Proof of Theorem 2sqreultblem
Step | Hyp | Ref
| Expression |
1 | | 2sqreultlem 26500 |
. . 3
⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) →
∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) |
2 | 1 | ex 412 |
. 2
⊢ (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 → ∃!𝑎 ∈ ℕ0
∃!𝑏 ∈
ℕ0 (𝑎 <
𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))) |
3 | | 2reu2rex 3353 |
. . . . 5
⊢
(∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑎 ∈ ℕ0 ∃𝑏 ∈ ℕ0
(𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) |
4 | | elsni 4575 |
. . . . 5
⊢ (𝑃 ∈ {2} → 𝑃 = 2) |
5 | | eqeq2 2750 |
. . . . . . . . . . 11
⊢ (𝑃 = 2 → (((𝑎↑2) + (𝑏↑2)) = 𝑃 ↔ ((𝑎↑2) + (𝑏↑2)) = 2)) |
6 | 5 | anbi2d 628 |
. . . . . . . . . 10
⊢ (𝑃 = 2 → ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 2))) |
7 | 6 | adantl 481 |
. . . . . . . . 9
⊢ (((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) ∧ 𝑃 = 2) → ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 2))) |
8 | | 2sq2 26486 |
. . . . . . . . . . . 12
⊢ ((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) → (((𝑎↑2) + (𝑏↑2)) = 2 ↔ (𝑎 = 1 ∧ 𝑏 = 1))) |
9 | | breq12 5075 |
. . . . . . . . . . . . 13
⊢ ((𝑎 = 1 ∧ 𝑏 = 1) → (𝑎 < 𝑏 ↔ 1 < 1)) |
10 | | 1re 10906 |
. . . . . . . . . . . . . . 15
⊢ 1 ∈
ℝ |
11 | 10 | ltnri 11014 |
. . . . . . . . . . . . . 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 411 |
. . . . . . . . . 10
⊢ ((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) → ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 2) → (𝑃 mod 4) = 1)) |
16 | 15 | adantr 480 |
. . . . . . . . 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 412 |
. . . . . . 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 3220 |
. . . . 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 3893 |
. . . . 5
⊢ (𝑃 ∈ (ℙ ∖ {2})
↔ (𝑃 ∈ ℙ
∧ ¬ 𝑃 ∈
{2})) |
24 | | eldifsnneq 4721 |
. . . . . 6
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ ¬ 𝑃 =
2) |
25 | | nn0ssz 12271 |
. . . . . . . . . . 11
⊢
ℕ0 ⊆ ℤ |
26 | | id 22 |
. . . . . . . . . . . . . . . 16
⊢ (((𝑎↑2) + (𝑏↑2)) = 𝑃 → ((𝑎↑2) + (𝑏↑2)) = 𝑃) |
27 | 26 | eqcomd 2744 |
. . . . . . . . . . . . . . 15
⊢ (((𝑎↑2) + (𝑏↑2)) = 𝑃 → 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
28 | 27 | adantl 481 |
. . . . . . . . . . . . . 14
⊢ ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
29 | 28 | reximi 3174 |
. . . . . . . . . . . . 13
⊢
(∃𝑏 ∈
ℕ0 (𝑎 <
𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑏 ∈ ℕ0 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
30 | 29 | reximi 3174 |
. . . . . . . . . . . 12
⊢
(∃𝑎 ∈
ℕ0 ∃𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑎 ∈ ℕ0 ∃𝑏 ∈ ℕ0
𝑃 = ((𝑎↑2) + (𝑏↑2))) |
31 | | ssrexv 3984 |
. . . . . . . . . . . . . 14
⊢
(ℕ0 ⊆ ℤ → (∃𝑏 ∈ ℕ0 𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2)))) |
32 | 25, 31 | ax-mp 5 |
. . . . . . . . . . . . 13
⊢
(∃𝑏 ∈
ℕ0 𝑃 =
((𝑎↑2) + (𝑏↑2)) → ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
33 | 32 | reximi 3174 |
. . . . . . . . . . . 12
⊢
(∃𝑎 ∈
ℕ0 ∃𝑏 ∈ ℕ0 𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑎 ∈ ℕ0 ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
34 | 3, 30, 33 | 3syl 18 |
. . . . . . . . . . 11
⊢
(∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑎 ∈ ℕ0 ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
35 | | ssrexv 3984 |
. . . . . . . . . . 11
⊢
(ℕ0 ⊆ ℤ → (∃𝑎 ∈ ℕ0 ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2)))) |
36 | 25, 34, 35 | mpsyl 68 |
. . . . . . . . . 10
⊢
(∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
37 | 36 | adantl 481 |
. . . . . . . . 9
⊢ ((𝑃 ∈ (ℙ ∖ {2})
∧ ∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) → ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
38 | | eldifi 4057 |
. . . . . . . . . . 11
⊢ (𝑃 ∈ (ℙ ∖ {2})
→ 𝑃 ∈
ℙ) |
39 | 38 | adantr 480 |
. . . . . . . . . 10
⊢ ((𝑃 ∈ (ℙ ∖ {2})
∧ ∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) → 𝑃 ∈ ℙ) |
40 | | 2sqb 26485 |
. . . . . . . . . 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 860 |
. . . . . . 7
⊢ ((𝑃 ∈ (ℙ ∖ {2})
∧ ∃!𝑎 ∈
ℕ0 ∃!𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) → (¬ 𝑃 = 2 → (𝑃 mod 4) = 1)) |
44 | 43 | ex 412 |
. . . . . 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 413 |
. . 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)) = 𝑃))) |