Proof of Theorem 2sqreunnltlem
Step | Hyp | Ref
| Expression |
1 | | 2sqreunnlem1 26502 |
. 2
⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) →
∃!𝑎 ∈ ℕ
∃!𝑏 ∈ ℕ
(𝑎 ≤ 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) |
2 | | oveq1 7262 |
. . . . . . . . . . . . . . 15
⊢ (𝑏 = 𝑎 → (𝑏↑2) = (𝑎↑2)) |
3 | 2 | oveq2d 7271 |
. . . . . . . . . . . . . 14
⊢ (𝑏 = 𝑎 → ((𝑎↑2) + (𝑏↑2)) = ((𝑎↑2) + (𝑎↑2))) |
4 | 3 | adantr 480 |
. . . . . . . . . . . . 13
⊢ ((𝑏 = 𝑎 ∧ (((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) ∧ 𝑏 ∈ ℕ)) → ((𝑎↑2) + (𝑏↑2)) = ((𝑎↑2) + (𝑎↑2))) |
5 | | nncn 11911 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑎 ∈ ℕ → 𝑎 ∈
ℂ) |
6 | 5 | sqcld 13790 |
. . . . . . . . . . . . . . . 16
⊢ (𝑎 ∈ ℕ → (𝑎↑2) ∈
ℂ) |
7 | | 2times 12039 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑎↑2) ∈ ℂ →
(2 · (𝑎↑2)) =
((𝑎↑2) + (𝑎↑2))) |
8 | 7 | eqcomd 2744 |
. . . . . . . . . . . . . . . 16
⊢ ((𝑎↑2) ∈ ℂ →
((𝑎↑2) + (𝑎↑2)) = (2 · (𝑎↑2))) |
9 | 6, 8 | syl 17 |
. . . . . . . . . . . . . . 15
⊢ (𝑎 ∈ ℕ → ((𝑎↑2) + (𝑎↑2)) = (2 · (𝑎↑2))) |
10 | 9 | adantl 481 |
. . . . . . . . . . . . . 14
⊢ (((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) → ((𝑎↑2) + (𝑎↑2)) = (2 · (𝑎↑2))) |
11 | 10 | ad2antrl 724 |
. . . . . . . . . . . . 13
⊢ ((𝑏 = 𝑎 ∧ (((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) ∧ 𝑏 ∈ ℕ)) → ((𝑎↑2) + (𝑎↑2)) = (2 · (𝑎↑2))) |
12 | 4, 11 | eqtrd 2778 |
. . . . . . . . . . . 12
⊢ ((𝑏 = 𝑎 ∧ (((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) ∧ 𝑏 ∈ ℕ)) → ((𝑎↑2) + (𝑏↑2)) = (2 · (𝑎↑2))) |
13 | 12 | eqeq1d 2740 |
. . . . . . . . . . 11
⊢ ((𝑏 = 𝑎 ∧ (((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) ∧ 𝑏 ∈ ℕ)) → (((𝑎↑2) + (𝑏↑2)) = 𝑃 ↔ (2 · (𝑎↑2)) = 𝑃)) |
14 | | oveq1 7262 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑃 = (2 · (𝑎↑2)) → (𝑃 mod 4) = ((2 · (𝑎↑2)) mod
4)) |
15 | 14 | eqeq1d 2740 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝑃 = (2 · (𝑎↑2)) → ((𝑃 mod 4) = 1 ↔ ((2 ·
(𝑎↑2)) mod 4) =
1)) |
16 | | eleq1 2826 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝑃 = (2 · (𝑎↑2)) → (𝑃 ∈ ℙ ↔ (2
· (𝑎↑2)) ∈
ℙ)) |
17 | 15, 16 | anbi12d 630 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑃 = (2 · (𝑎↑2)) → (((𝑃 mod 4) = 1 ∧ 𝑃 ∈ ℙ) ↔ (((2
· (𝑎↑2)) mod 4)
= 1 ∧ (2 · (𝑎↑2)) ∈ ℙ))) |
18 | | nnz 12272 |
. . . . . . . . . . . . . . . . . . . . . . 23
⊢ (𝑎 ∈ ℕ → 𝑎 ∈
ℤ) |
19 | | 2nn0 12180 |
. . . . . . . . . . . . . . . . . . . . . . 23
⊢ 2 ∈
ℕ0 |
20 | | zexpcl 13725 |
. . . . . . . . . . . . . . . . . . . . . . 23
⊢ ((𝑎 ∈ ℤ ∧ 2 ∈
ℕ0) → (𝑎↑2) ∈ ℤ) |
21 | 18, 19, 20 | sylancl 585 |
. . . . . . . . . . . . . . . . . . . . . 22
⊢ (𝑎 ∈ ℕ → (𝑎↑2) ∈
ℤ) |
22 | | 2mulprm 16326 |
. . . . . . . . . . . . . . . . . . . . . 22
⊢ ((𝑎↑2) ∈ ℤ →
((2 · (𝑎↑2))
∈ ℙ ↔ (𝑎↑2) = 1)) |
23 | 21, 22 | syl 17 |
. . . . . . . . . . . . . . . . . . . . 21
⊢ (𝑎 ∈ ℕ → ((2
· (𝑎↑2)) ∈
ℙ ↔ (𝑎↑2) =
1)) |
24 | | oveq2 7263 |
. . . . . . . . . . . . . . . . . . . . . . . . . 26
⊢ ((𝑎↑2) = 1 → (2 ·
(𝑎↑2)) = (2 ·
1)) |
25 | | 2t1e2 12066 |
. . . . . . . . . . . . . . . . . . . . . . . . . 26
⊢ (2
· 1) = 2 |
26 | 24, 25 | eqtrdi 2795 |
. . . . . . . . . . . . . . . . . . . . . . . . 25
⊢ ((𝑎↑2) = 1 → (2 ·
(𝑎↑2)) =
2) |
27 | 26 | oveq1d 7270 |
. . . . . . . . . . . . . . . . . . . . . . . 24
⊢ ((𝑎↑2) = 1 → ((2 ·
(𝑎↑2)) mod 4) = (2 mod
4)) |
28 | | 2re 11977 |
. . . . . . . . . . . . . . . . . . . . . . . . 25
⊢ 2 ∈
ℝ |
29 | | 4nn 11986 |
. . . . . . . . . . . . . . . . . . . . . . . . . 26
⊢ 4 ∈
ℕ |
30 | | nnrp 12670 |
. . . . . . . . . . . . . . . . . . . . . . . . . 26
⊢ (4 ∈
ℕ → 4 ∈ ℝ+) |
31 | 29, 30 | ax-mp 5 |
. . . . . . . . . . . . . . . . . . . . . . . . 25
⊢ 4 ∈
ℝ+ |
32 | | 0le2 12005 |
. . . . . . . . . . . . . . . . . . . . . . . . 25
⊢ 0 ≤
2 |
33 | | 2lt4 12078 |
. . . . . . . . . . . . . . . . . . . . . . . . 25
⊢ 2 <
4 |
34 | | modid 13544 |
. . . . . . . . . . . . . . . . . . . . . . . . 25
⊢ (((2
∈ ℝ ∧ 4 ∈ ℝ+) ∧ (0 ≤ 2 ∧ 2 <
4)) → (2 mod 4) = 2) |
35 | 28, 31, 32, 33, 34 | mp4an 689 |
. . . . . . . . . . . . . . . . . . . . . . . 24
⊢ (2 mod 4)
= 2 |
36 | 27, 35 | eqtrdi 2795 |
. . . . . . . . . . . . . . . . . . . . . . 23
⊢ ((𝑎↑2) = 1 → ((2 ·
(𝑎↑2)) mod 4) =
2) |
37 | 36 | eqeq1d 2740 |
. . . . . . . . . . . . . . . . . . . . . 22
⊢ ((𝑎↑2) = 1 → (((2
· (𝑎↑2)) mod 4)
= 1 ↔ 2 = 1)) |
38 | | 1ne2 12111 |
. . . . . . . . . . . . . . . . . . . . . . 23
⊢ 1 ≠
2 |
39 | | eqcom 2745 |
. . . . . . . . . . . . . . . . . . . . . . . 24
⊢ (2 = 1
↔ 1 = 2) |
40 | | eqneqall 2953 |
. . . . . . . . . . . . . . . . . . . . . . . . 25
⊢ (1 = 2
→ (1 ≠ 2 → (𝑎
≤ 𝑏 → 𝑏 ≠ 𝑎))) |
41 | 40 | com12 32 |
. . . . . . . . . . . . . . . . . . . . . . . 24
⊢ (1 ≠ 2
→ (1 = 2 → (𝑎
≤ 𝑏 → 𝑏 ≠ 𝑎))) |
42 | 39, 41 | syl5bi 241 |
. . . . . . . . . . . . . . . . . . . . . . 23
⊢ (1 ≠ 2
→ (2 = 1 → (𝑎
≤ 𝑏 → 𝑏 ≠ 𝑎))) |
43 | 38, 42 | ax-mp 5 |
. . . . . . . . . . . . . . . . . . . . . 22
⊢ (2 = 1
→ (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎)) |
44 | 37, 43 | syl6bi 252 |
. . . . . . . . . . . . . . . . . . . . 21
⊢ ((𝑎↑2) = 1 → (((2
· (𝑎↑2)) mod 4)
= 1 → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎))) |
45 | 23, 44 | syl6bi 252 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑎 ∈ ℕ → ((2
· (𝑎↑2)) ∈
ℙ → (((2 · (𝑎↑2)) mod 4) = 1 → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎)))) |
46 | 45 | impcomd 411 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝑎 ∈ ℕ → ((((2
· (𝑎↑2)) mod 4)
= 1 ∧ (2 · (𝑎↑2)) ∈ ℙ) → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎))) |
47 | 46 | com12 32 |
. . . . . . . . . . . . . . . . . 18
⊢ ((((2
· (𝑎↑2)) mod 4)
= 1 ∧ (2 · (𝑎↑2)) ∈ ℙ) → (𝑎 ∈ ℕ → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎))) |
48 | 17, 47 | syl6bi 252 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑃 = (2 · (𝑎↑2)) → (((𝑃 mod 4) = 1 ∧ 𝑃 ∈ ℙ) → (𝑎 ∈ ℕ → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎)))) |
49 | 48 | expd 415 |
. . . . . . . . . . . . . . . 16
⊢ (𝑃 = (2 · (𝑎↑2)) → ((𝑃 mod 4) = 1 → (𝑃 ∈ ℙ → (𝑎 ∈ ℕ → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎))))) |
50 | 49 | com34 91 |
. . . . . . . . . . . . . . 15
⊢ (𝑃 = (2 · (𝑎↑2)) → ((𝑃 mod 4) = 1 → (𝑎 ∈ ℕ → (𝑃 ∈ ℙ → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎))))) |
51 | 50 | eqcoms 2746 |
. . . . . . . . . . . . . 14
⊢ ((2
· (𝑎↑2)) =
𝑃 → ((𝑃 mod 4) = 1 → (𝑎 ∈ ℕ → (𝑃 ∈ ℙ → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎))))) |
52 | 51 | com14 96 |
. . . . . . . . . . . . 13
⊢ (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 → (𝑎 ∈ ℕ → ((2
· (𝑎↑2)) =
𝑃 → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎))))) |
53 | 52 | imp31 417 |
. . . . . . . . . . . 12
⊢ (((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) → ((2
· (𝑎↑2)) =
𝑃 → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎))) |
54 | 53 | ad2antrl 724 |
. . . . . . . . . . 11
⊢ ((𝑏 = 𝑎 ∧ (((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) ∧ 𝑏 ∈ ℕ)) → ((2 · (𝑎↑2)) = 𝑃 → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎))) |
55 | 13, 54 | sylbid 239 |
. . . . . . . . . 10
⊢ ((𝑏 = 𝑎 ∧ (((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) ∧ 𝑏 ∈ ℕ)) → (((𝑎↑2) + (𝑏↑2)) = 𝑃 → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎))) |
56 | 55 | expimpd 453 |
. . . . . . . . 9
⊢ (𝑏 = 𝑎 → (((((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) ∧ 𝑏 ∈ ℕ) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎))) |
57 | | 2a1 28 |
. . . . . . . . 9
⊢ (𝑏 ≠ 𝑎 → (((((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) ∧ 𝑏 ∈ ℕ) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎))) |
58 | 56, 57 | pm2.61ine 3027 |
. . . . . . . 8
⊢
(((((𝑃 ∈
ℙ ∧ (𝑃 mod 4) =
1) ∧ 𝑎 ∈ ℕ)
∧ 𝑏 ∈ ℕ)
∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑎 ≤ 𝑏 → 𝑏 ≠ 𝑎)) |
59 | 58 | pm4.71d 561 |
. . . . . . 7
⊢
(((((𝑃 ∈
ℙ ∧ (𝑃 mod 4) =
1) ∧ 𝑎 ∈ ℕ)
∧ 𝑏 ∈ ℕ)
∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑎 ≤ 𝑏 ↔ (𝑎 ≤ 𝑏 ∧ 𝑏 ≠ 𝑎))) |
60 | | nnre 11910 |
. . . . . . . . . . 11
⊢ (𝑎 ∈ ℕ → 𝑎 ∈
ℝ) |
61 | 60 | adantl 481 |
. . . . . . . . . 10
⊢ (((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) → 𝑎 ∈
ℝ) |
62 | | nnre 11910 |
. . . . . . . . . 10
⊢ (𝑏 ∈ ℕ → 𝑏 ∈
ℝ) |
63 | | ltlen 11006 |
. . . . . . . . . 10
⊢ ((𝑎 ∈ ℝ ∧ 𝑏 ∈ ℝ) → (𝑎 < 𝑏 ↔ (𝑎 ≤ 𝑏 ∧ 𝑏 ≠ 𝑎))) |
64 | 61, 62, 63 | syl2an 595 |
. . . . . . . . 9
⊢ ((((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) ∧ 𝑏 ∈ ℕ) → (𝑎 < 𝑏 ↔ (𝑎 ≤ 𝑏 ∧ 𝑏 ≠ 𝑎))) |
65 | 64 | bibi2d 342 |
. . . . . . . 8
⊢ ((((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) ∧ 𝑏 ∈ ℕ) → ((𝑎 ≤ 𝑏 ↔ 𝑎 < 𝑏) ↔ (𝑎 ≤ 𝑏 ↔ (𝑎 ≤ 𝑏 ∧ 𝑏 ≠ 𝑎)))) |
66 | 65 | adantr 480 |
. . . . . . 7
⊢
(((((𝑃 ∈
ℙ ∧ (𝑃 mod 4) =
1) ∧ 𝑎 ∈ ℕ)
∧ 𝑏 ∈ ℕ)
∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ((𝑎 ≤ 𝑏 ↔ 𝑎 < 𝑏) ↔ (𝑎 ≤ 𝑏 ↔ (𝑎 ≤ 𝑏 ∧ 𝑏 ≠ 𝑎)))) |
67 | 59, 66 | mpbird 256 |
. . . . . 6
⊢
(((((𝑃 ∈
ℙ ∧ (𝑃 mod 4) =
1) ∧ 𝑎 ∈ ℕ)
∧ 𝑏 ∈ ℕ)
∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑎 ≤ 𝑏 ↔ 𝑎 < 𝑏)) |
68 | 67 | ex 412 |
. . . . 5
⊢ ((((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) ∧ 𝑏 ∈ ℕ) → (((𝑎↑2) + (𝑏↑2)) = 𝑃 → (𝑎 ≤ 𝑏 ↔ 𝑎 < 𝑏))) |
69 | 68 | pm5.32rd 577 |
. . . 4
⊢ ((((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) ∧ 𝑏 ∈ ℕ) → ((𝑎 ≤ 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))) |
70 | 69 | reubidva 3314 |
. . 3
⊢ (((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) ∧ 𝑎 ∈ ℕ) →
(∃!𝑏 ∈ ℕ
(𝑎 ≤ 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑏 ∈ ℕ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))) |
71 | 70 | reubidva 3314 |
. 2
⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) →
(∃!𝑎 ∈ ℕ
∃!𝑏 ∈ ℕ
(𝑎 ≤ 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))) |
72 | 1, 71 | mpbid 231 |
1
⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) →
∃!𝑎 ∈ ℕ
∃!𝑏 ∈ ℕ
(𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) |