Step | Hyp | Ref
| Expression |
1 | | 2sqnn0 26586 |
. 2
⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃𝑎 ∈ ℕ0
∃𝑏 ∈
ℕ0 𝑃 =
((𝑎↑2) + (𝑏↑2))) |
2 | | elnn0 12235 |
. . . . . . 7
⊢ (𝑎 ∈ ℕ0
↔ (𝑎 ∈ ℕ
∨ 𝑎 =
0)) |
3 | | elnn0 12235 |
. . . . . . . . 9
⊢ (𝑏 ∈ ℕ0
↔ (𝑏 ∈ ℕ
∨ 𝑏 =
0)) |
4 | | oveq1 7282 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑥 = 𝑎 → (𝑥↑2) = (𝑎↑2)) |
5 | 4 | oveq1d 7290 |
. . . . . . . . . . . . . . . 16
⊢ (𝑥 = 𝑎 → ((𝑥↑2) + (𝑦↑2)) = ((𝑎↑2) + (𝑦↑2))) |
6 | 5 | eqeq2d 2749 |
. . . . . . . . . . . . . . 15
⊢ (𝑥 = 𝑎 → (𝑃 = ((𝑥↑2) + (𝑦↑2)) ↔ 𝑃 = ((𝑎↑2) + (𝑦↑2)))) |
7 | | oveq1 7282 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑦 = 𝑏 → (𝑦↑2) = (𝑏↑2)) |
8 | 7 | oveq2d 7291 |
. . . . . . . . . . . . . . . 16
⊢ (𝑦 = 𝑏 → ((𝑎↑2) + (𝑦↑2)) = ((𝑎↑2) + (𝑏↑2))) |
9 | 8 | eqeq2d 2749 |
. . . . . . . . . . . . . . 15
⊢ (𝑦 = 𝑏 → (𝑃 = ((𝑎↑2) + (𝑦↑2)) ↔ 𝑃 = ((𝑎↑2) + (𝑏↑2)))) |
10 | 6, 9 | rspc2ev 3572 |
. . . . . . . . . . . . . 14
⊢ ((𝑎 ∈ ℕ ∧ 𝑏 ∈ ℕ ∧ 𝑃 = ((𝑎↑2) + (𝑏↑2))) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))) |
11 | 10 | 3expia 1120 |
. . . . . . . . . . . . 13
⊢ ((𝑎 ∈ ℕ ∧ 𝑏 ∈ ℕ) → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) |
12 | 11 | a1d 25 |
. . . . . . . . . . . 12
⊢ ((𝑎 ∈ ℕ ∧ 𝑏 ∈ ℕ) → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
13 | 12 | expcom 414 |
. . . . . . . . . . 11
⊢ (𝑏 ∈ ℕ → (𝑎 ∈ ℕ → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))))) |
14 | | sq0i 13910 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑎 = 0 → (𝑎↑2) = 0) |
15 | 14 | adantr 481 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑎 = 0 ∧ 𝑏 ∈ ℕ) → (𝑎↑2) = 0) |
16 | 15 | oveq1d 7290 |
. . . . . . . . . . . . . . . 16
⊢ ((𝑎 = 0 ∧ 𝑏 ∈ ℕ) → ((𝑎↑2) + (𝑏↑2)) = (0 + (𝑏↑2))) |
17 | | nncn 11981 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝑏 ∈ ℕ → 𝑏 ∈
ℂ) |
18 | 17 | sqcld 13862 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑏 ∈ ℕ → (𝑏↑2) ∈
ℂ) |
19 | 18 | addid2d 11176 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑏 ∈ ℕ → (0 +
(𝑏↑2)) = (𝑏↑2)) |
20 | 19 | adantl 482 |
. . . . . . . . . . . . . . . 16
⊢ ((𝑎 = 0 ∧ 𝑏 ∈ ℕ) → (0 + (𝑏↑2)) = (𝑏↑2)) |
21 | 16, 20 | eqtrd 2778 |
. . . . . . . . . . . . . . 15
⊢ ((𝑎 = 0 ∧ 𝑏 ∈ ℕ) → ((𝑎↑2) + (𝑏↑2)) = (𝑏↑2)) |
22 | 21 | eqeq2d 2749 |
. . . . . . . . . . . . . 14
⊢ ((𝑎 = 0 ∧ 𝑏 ∈ ℕ) → (𝑃 = ((𝑎↑2) + (𝑏↑2)) ↔ 𝑃 = (𝑏↑2))) |
23 | | eleq1 2826 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑃 = (𝑏↑2) → (𝑃 ∈ ℙ ↔ (𝑏↑2) ∈ ℙ)) |
24 | 23 | adantl 482 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑏 ∈ ℕ ∧ 𝑃 = (𝑏↑2)) → (𝑃 ∈ ℙ ↔ (𝑏↑2) ∈ ℙ)) |
25 | | nnz 12342 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑏 ∈ ℕ → 𝑏 ∈
ℤ) |
26 | | sqnprm 16407 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑏 ∈ ℤ → ¬
(𝑏↑2) ∈
ℙ) |
27 | 25, 26 | syl 17 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝑏 ∈ ℕ → ¬
(𝑏↑2) ∈
ℙ) |
28 | 27 | pm2.21d 121 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑏 ∈ ℕ → ((𝑏↑2) ∈ ℙ →
∃𝑥 ∈ ℕ
∃𝑦 ∈ ℕ
𝑃 = ((𝑥↑2) + (𝑦↑2)))) |
29 | 28 | adantr 481 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑏 ∈ ℕ ∧ 𝑃 = (𝑏↑2)) → ((𝑏↑2) ∈ ℙ → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) |
30 | 24, 29 | sylbid 239 |
. . . . . . . . . . . . . . . 16
⊢ ((𝑏 ∈ ℕ ∧ 𝑃 = (𝑏↑2)) → (𝑃 ∈ ℙ → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) |
31 | 30 | ex 413 |
. . . . . . . . . . . . . . 15
⊢ (𝑏 ∈ ℕ → (𝑃 = (𝑏↑2) → (𝑃 ∈ ℙ → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
32 | 31 | adantl 482 |
. . . . . . . . . . . . . 14
⊢ ((𝑎 = 0 ∧ 𝑏 ∈ ℕ) → (𝑃 = (𝑏↑2) → (𝑃 ∈ ℙ → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
33 | 22, 32 | sylbid 239 |
. . . . . . . . . . . . 13
⊢ ((𝑎 = 0 ∧ 𝑏 ∈ ℕ) → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → (𝑃 ∈ ℙ → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
34 | 33 | com23 86 |
. . . . . . . . . . . 12
⊢ ((𝑎 = 0 ∧ 𝑏 ∈ ℕ) → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
35 | 34 | expcom 414 |
. . . . . . . . . . 11
⊢ (𝑏 ∈ ℕ → (𝑎 = 0 → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))))) |
36 | 13, 35 | jaod 856 |
. . . . . . . . . 10
⊢ (𝑏 ∈ ℕ → ((𝑎 ∈ ℕ ∨ 𝑎 = 0) → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))))) |
37 | | sq0i 13910 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑏 = 0 → (𝑏↑2) = 0) |
38 | 37 | adantr 481 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑏 = 0 ∧ 𝑎 ∈ ℕ) → (𝑏↑2) = 0) |
39 | 38 | oveq2d 7291 |
. . . . . . . . . . . . . . . 16
⊢ ((𝑏 = 0 ∧ 𝑎 ∈ ℕ) → ((𝑎↑2) + (𝑏↑2)) = ((𝑎↑2) + 0)) |
40 | | nncn 11981 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝑎 ∈ ℕ → 𝑎 ∈
ℂ) |
41 | 40 | sqcld 13862 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑎 ∈ ℕ → (𝑎↑2) ∈
ℂ) |
42 | 41 | addid1d 11175 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑎 ∈ ℕ → ((𝑎↑2) + 0) = (𝑎↑2)) |
43 | 42 | adantl 482 |
. . . . . . . . . . . . . . . 16
⊢ ((𝑏 = 0 ∧ 𝑎 ∈ ℕ) → ((𝑎↑2) + 0) = (𝑎↑2)) |
44 | 39, 43 | eqtrd 2778 |
. . . . . . . . . . . . . . 15
⊢ ((𝑏 = 0 ∧ 𝑎 ∈ ℕ) → ((𝑎↑2) + (𝑏↑2)) = (𝑎↑2)) |
45 | 44 | eqeq2d 2749 |
. . . . . . . . . . . . . 14
⊢ ((𝑏 = 0 ∧ 𝑎 ∈ ℕ) → (𝑃 = ((𝑎↑2) + (𝑏↑2)) ↔ 𝑃 = (𝑎↑2))) |
46 | | eleq1 2826 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑃 = (𝑎↑2) → (𝑃 ∈ ℙ ↔ (𝑎↑2) ∈ ℙ)) |
47 | 46 | adantl 482 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑎 ∈ ℕ ∧ 𝑃 = (𝑎↑2)) → (𝑃 ∈ ℙ ↔ (𝑎↑2) ∈ ℙ)) |
48 | | nnz 12342 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑎 ∈ ℕ → 𝑎 ∈
ℤ) |
49 | | sqnprm 16407 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑎 ∈ ℤ → ¬
(𝑎↑2) ∈
ℙ) |
50 | 48, 49 | syl 17 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝑎 ∈ ℕ → ¬
(𝑎↑2) ∈
ℙ) |
51 | 50 | pm2.21d 121 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑎 ∈ ℕ → ((𝑎↑2) ∈ ℙ →
∃𝑥 ∈ ℕ
∃𝑦 ∈ ℕ
𝑃 = ((𝑥↑2) + (𝑦↑2)))) |
52 | 51 | adantr 481 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑎 ∈ ℕ ∧ 𝑃 = (𝑎↑2)) → ((𝑎↑2) ∈ ℙ → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) |
53 | 47, 52 | sylbid 239 |
. . . . . . . . . . . . . . . 16
⊢ ((𝑎 ∈ ℕ ∧ 𝑃 = (𝑎↑2)) → (𝑃 ∈ ℙ → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) |
54 | 53 | ex 413 |
. . . . . . . . . . . . . . 15
⊢ (𝑎 ∈ ℕ → (𝑃 = (𝑎↑2) → (𝑃 ∈ ℙ → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
55 | 54 | adantl 482 |
. . . . . . . . . . . . . 14
⊢ ((𝑏 = 0 ∧ 𝑎 ∈ ℕ) → (𝑃 = (𝑎↑2) → (𝑃 ∈ ℙ → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
56 | 45, 55 | sylbid 239 |
. . . . . . . . . . . . 13
⊢ ((𝑏 = 0 ∧ 𝑎 ∈ ℕ) → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → (𝑃 ∈ ℙ → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
57 | 56 | com23 86 |
. . . . . . . . . . . 12
⊢ ((𝑏 = 0 ∧ 𝑎 ∈ ℕ) → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
58 | 57 | ex 413 |
. . . . . . . . . . 11
⊢ (𝑏 = 0 → (𝑎 ∈ ℕ → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))))) |
59 | 14, 37 | oveqan12rd 7295 |
. . . . . . . . . . . . . . . 16
⊢ ((𝑏 = 0 ∧ 𝑎 = 0) → ((𝑎↑2) + (𝑏↑2)) = (0 + 0)) |
60 | | 00id 11150 |
. . . . . . . . . . . . . . . 16
⊢ (0 + 0) =
0 |
61 | 59, 60 | eqtrdi 2794 |
. . . . . . . . . . . . . . 15
⊢ ((𝑏 = 0 ∧ 𝑎 = 0) → ((𝑎↑2) + (𝑏↑2)) = 0) |
62 | 61 | eqeq2d 2749 |
. . . . . . . . . . . . . 14
⊢ ((𝑏 = 0 ∧ 𝑎 = 0) → (𝑃 = ((𝑎↑2) + (𝑏↑2)) ↔ 𝑃 = 0)) |
63 | | eleq1 2826 |
. . . . . . . . . . . . . . 15
⊢ (𝑃 = 0 → (𝑃 ∈ ℙ ↔ 0 ∈
ℙ)) |
64 | | 0nprm 16383 |
. . . . . . . . . . . . . . . 16
⊢ ¬ 0
∈ ℙ |
65 | 64 | pm2.21i 119 |
. . . . . . . . . . . . . . 15
⊢ (0 ∈
ℙ → ∃𝑥
∈ ℕ ∃𝑦
∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))) |
66 | 63, 65 | syl6bi 252 |
. . . . . . . . . . . . . 14
⊢ (𝑃 = 0 → (𝑃 ∈ ℙ → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) |
67 | 62, 66 | syl6bi 252 |
. . . . . . . . . . . . 13
⊢ ((𝑏 = 0 ∧ 𝑎 = 0) → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → (𝑃 ∈ ℙ → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
68 | 67 | com23 86 |
. . . . . . . . . . . 12
⊢ ((𝑏 = 0 ∧ 𝑎 = 0) → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
69 | 68 | ex 413 |
. . . . . . . . . . 11
⊢ (𝑏 = 0 → (𝑎 = 0 → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))))) |
70 | 58, 69 | jaod 856 |
. . . . . . . . . 10
⊢ (𝑏 = 0 → ((𝑎 ∈ ℕ ∨ 𝑎 = 0) → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))))) |
71 | 36, 70 | jaoi 854 |
. . . . . . . . 9
⊢ ((𝑏 ∈ ℕ ∨ 𝑏 = 0) → ((𝑎 ∈ ℕ ∨ 𝑎 = 0) → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))))) |
72 | 3, 71 | sylbi 216 |
. . . . . . . 8
⊢ (𝑏 ∈ ℕ0
→ ((𝑎 ∈ ℕ
∨ 𝑎 = 0) → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))))) |
73 | 72 | com12 32 |
. . . . . . 7
⊢ ((𝑎 ∈ ℕ ∨ 𝑎 = 0) → (𝑏 ∈ ℕ0 → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))))) |
74 | 2, 73 | sylbi 216 |
. . . . . 6
⊢ (𝑎 ∈ ℕ0
→ (𝑏 ∈
ℕ0 → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))))) |
75 | 74 | imp 407 |
. . . . 5
⊢ ((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) → (𝑃 ∈ ℙ → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
76 | 75 | com12 32 |
. . . 4
⊢ (𝑃 ∈ ℙ → ((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
77 | 76 | adantr 481 |
. . 3
⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ((𝑎 ∈ ℕ0
∧ 𝑏 ∈
ℕ0) → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))))) |
78 | 77 | rexlimdvv 3222 |
. 2
⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) →
(∃𝑎 ∈
ℕ0 ∃𝑏 ∈ ℕ0 𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2)))) |
79 | 1, 78 | mpd 15 |
1
⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃𝑥 ∈ ℕ ∃𝑦 ∈ ℕ 𝑃 = ((𝑥↑2) + (𝑦↑2))) |