Step | Hyp | Ref
| Expression |
1 | | 2sq 26483 |
. 2
⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
2 | | elnn0z 12262 |
. . . . . . . . 9
⊢ (𝑎 ∈ ℕ0
↔ (𝑎 ∈ ℤ
∧ 0 ≤ 𝑎)) |
3 | 2 | biimpri 227 |
. . . . . . . 8
⊢ ((𝑎 ∈ ℤ ∧ 0 ≤
𝑎) → 𝑎 ∈
ℕ0) |
4 | | elznn0 12264 |
. . . . . . . . . 10
⊢ (𝑎 ∈ ℤ ↔ (𝑎 ∈ ℝ ∧ (𝑎 ∈ ℕ0 ∨
-𝑎 ∈
ℕ0))) |
5 | | nn0ge0 12188 |
. . . . . . . . . . . . . 14
⊢ (𝑎 ∈ ℕ0
→ 0 ≤ 𝑎) |
6 | 5 | pm2.24d 151 |
. . . . . . . . . . . . 13
⊢ (𝑎 ∈ ℕ0
→ (¬ 0 ≤ 𝑎
→ -𝑎 ∈
ℕ0)) |
7 | 6 | a1i 11 |
. . . . . . . . . . . 12
⊢ (𝑎 ∈ ℝ → (𝑎 ∈ ℕ0
→ (¬ 0 ≤ 𝑎
→ -𝑎 ∈
ℕ0))) |
8 | | ax-1 6 |
. . . . . . . . . . . . 13
⊢ (-𝑎 ∈ ℕ0
→ (¬ 0 ≤ 𝑎
→ -𝑎 ∈
ℕ0)) |
9 | 8 | a1i 11 |
. . . . . . . . . . . 12
⊢ (𝑎 ∈ ℝ → (-𝑎 ∈ ℕ0
→ (¬ 0 ≤ 𝑎
→ -𝑎 ∈
ℕ0))) |
10 | 7, 9 | jaod 855 |
. . . . . . . . . . 11
⊢ (𝑎 ∈ ℝ → ((𝑎 ∈ ℕ0 ∨
-𝑎 ∈
ℕ0) → (¬ 0 ≤ 𝑎 → -𝑎 ∈
ℕ0))) |
11 | 10 | imp 406 |
. . . . . . . . . 10
⊢ ((𝑎 ∈ ℝ ∧ (𝑎 ∈ ℕ0 ∨
-𝑎 ∈
ℕ0)) → (¬ 0 ≤ 𝑎 → -𝑎 ∈
ℕ0)) |
12 | 4, 11 | sylbi 216 |
. . . . . . . . 9
⊢ (𝑎 ∈ ℤ → (¬ 0
≤ 𝑎 → -𝑎 ∈
ℕ0)) |
13 | 12 | imp 406 |
. . . . . . . 8
⊢ ((𝑎 ∈ ℤ ∧ ¬ 0
≤ 𝑎) → -𝑎 ∈
ℕ0) |
14 | 3, 13 | ifclda 4491 |
. . . . . . 7
⊢ (𝑎 ∈ ℤ → if(0 ≤
𝑎, 𝑎, -𝑎) ∈
ℕ0) |
15 | 14 | adantr 480 |
. . . . . 6
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) → if(0
≤ 𝑎, 𝑎, -𝑎) ∈
ℕ0) |
16 | 15 | adantr 480 |
. . . . 5
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ 𝑃 = ((𝑎↑2) + (𝑏↑2))) → if(0 ≤ 𝑎, 𝑎, -𝑎) ∈
ℕ0) |
17 | | elnn0z 12262 |
. . . . . . . . 9
⊢ (𝑏 ∈ ℕ0
↔ (𝑏 ∈ ℤ
∧ 0 ≤ 𝑏)) |
18 | 17 | biimpri 227 |
. . . . . . . 8
⊢ ((𝑏 ∈ ℤ ∧ 0 ≤
𝑏) → 𝑏 ∈
ℕ0) |
19 | | elznn0 12264 |
. . . . . . . . . 10
⊢ (𝑏 ∈ ℤ ↔ (𝑏 ∈ ℝ ∧ (𝑏 ∈ ℕ0 ∨
-𝑏 ∈
ℕ0))) |
20 | | nn0ge0 12188 |
. . . . . . . . . . . . . 14
⊢ (𝑏 ∈ ℕ0
→ 0 ≤ 𝑏) |
21 | 20 | pm2.24d 151 |
. . . . . . . . . . . . 13
⊢ (𝑏 ∈ ℕ0
→ (¬ 0 ≤ 𝑏
→ -𝑏 ∈
ℕ0)) |
22 | 21 | a1i 11 |
. . . . . . . . . . . 12
⊢ (𝑏 ∈ ℝ → (𝑏 ∈ ℕ0
→ (¬ 0 ≤ 𝑏
→ -𝑏 ∈
ℕ0))) |
23 | | ax-1 6 |
. . . . . . . . . . . . 13
⊢ (-𝑏 ∈ ℕ0
→ (¬ 0 ≤ 𝑏
→ -𝑏 ∈
ℕ0)) |
24 | 23 | a1i 11 |
. . . . . . . . . . . 12
⊢ (𝑏 ∈ ℝ → (-𝑏 ∈ ℕ0
→ (¬ 0 ≤ 𝑏
→ -𝑏 ∈
ℕ0))) |
25 | 22, 24 | jaod 855 |
. . . . . . . . . . 11
⊢ (𝑏 ∈ ℝ → ((𝑏 ∈ ℕ0 ∨
-𝑏 ∈
ℕ0) → (¬ 0 ≤ 𝑏 → -𝑏 ∈
ℕ0))) |
26 | 25 | imp 406 |
. . . . . . . . . 10
⊢ ((𝑏 ∈ ℝ ∧ (𝑏 ∈ ℕ0 ∨
-𝑏 ∈
ℕ0)) → (¬ 0 ≤ 𝑏 → -𝑏 ∈
ℕ0)) |
27 | 19, 26 | sylbi 216 |
. . . . . . . . 9
⊢ (𝑏 ∈ ℤ → (¬ 0
≤ 𝑏 → -𝑏 ∈
ℕ0)) |
28 | 27 | imp 406 |
. . . . . . . 8
⊢ ((𝑏 ∈ ℤ ∧ ¬ 0
≤ 𝑏) → -𝑏 ∈
ℕ0) |
29 | 18, 28 | ifclda 4491 |
. . . . . . 7
⊢ (𝑏 ∈ ℤ → if(0 ≤
𝑏, 𝑏, -𝑏) ∈
ℕ0) |
30 | 29 | adantl 481 |
. . . . . 6
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) → if(0
≤ 𝑏, 𝑏, -𝑏) ∈
ℕ0) |
31 | 30 | adantr 480 |
. . . . 5
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ 𝑃 = ((𝑎↑2) + (𝑏↑2))) → if(0 ≤ 𝑏, 𝑏, -𝑏) ∈
ℕ0) |
32 | | elznn0nn 12263 |
. . . . . . . . . 10
⊢ (𝑎 ∈ ℤ ↔ (𝑎 ∈ ℕ0 ∨
(𝑎 ∈ ℝ ∧
-𝑎 ∈
ℕ))) |
33 | 5 | iftrued 4464 |
. . . . . . . . . . . . 13
⊢ (𝑎 ∈ ℕ0
→ if(0 ≤ 𝑎, 𝑎, -𝑎) = 𝑎) |
34 | 33 | eqcomd 2744 |
. . . . . . . . . . . 12
⊢ (𝑎 ∈ ℕ0
→ 𝑎 = if(0 ≤ 𝑎, 𝑎, -𝑎)) |
35 | 34 | oveq1d 7270 |
. . . . . . . . . . 11
⊢ (𝑎 ∈ ℕ0
→ (𝑎↑2) = (if(0
≤ 𝑎, 𝑎, -𝑎)↑2)) |
36 | | elnnz 12259 |
. . . . . . . . . . . . . . . 16
⊢ (-𝑎 ∈ ℕ ↔ (-𝑎 ∈ ℤ ∧ 0 <
-𝑎)) |
37 | | lt0neg1 11411 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑎 ∈ ℝ → (𝑎 < 0 ↔ 0 < -𝑎)) |
38 | | id 22 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑎 ∈ ℝ → 𝑎 ∈
ℝ) |
39 | | 0red 10909 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑎 ∈ ℝ → 0 ∈
ℝ) |
40 | 38, 39 | ltnled 11052 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝑎 ∈ ℝ → (𝑎 < 0 ↔ ¬ 0 ≤
𝑎)) |
41 | 40 | biimpd 228 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑎 ∈ ℝ → (𝑎 < 0 → ¬ 0 ≤
𝑎)) |
42 | 37, 41 | sylbird 259 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑎 ∈ ℝ → (0 <
-𝑎 → ¬ 0 ≤
𝑎)) |
43 | 42 | com12 32 |
. . . . . . . . . . . . . . . 16
⊢ (0 <
-𝑎 → (𝑎 ∈ ℝ → ¬ 0
≤ 𝑎)) |
44 | 36, 43 | simplbiim 504 |
. . . . . . . . . . . . . . 15
⊢ (-𝑎 ∈ ℕ → (𝑎 ∈ ℝ → ¬ 0
≤ 𝑎)) |
45 | 44 | impcom 407 |
. . . . . . . . . . . . . 14
⊢ ((𝑎 ∈ ℝ ∧ -𝑎 ∈ ℕ) → ¬ 0
≤ 𝑎) |
46 | 45 | iffalsed 4467 |
. . . . . . . . . . . . 13
⊢ ((𝑎 ∈ ℝ ∧ -𝑎 ∈ ℕ) → if(0
≤ 𝑎, 𝑎, -𝑎) = -𝑎) |
47 | 46 | oveq1d 7270 |
. . . . . . . . . . . 12
⊢ ((𝑎 ∈ ℝ ∧ -𝑎 ∈ ℕ) → (if(0
≤ 𝑎, 𝑎, -𝑎)↑2) = (-𝑎↑2)) |
48 | | recn 10892 |
. . . . . . . . . . . . . 14
⊢ (𝑎 ∈ ℝ → 𝑎 ∈
ℂ) |
49 | | sqneg 13764 |
. . . . . . . . . . . . . 14
⊢ (𝑎 ∈ ℂ → (-𝑎↑2) = (𝑎↑2)) |
50 | 48, 49 | syl 17 |
. . . . . . . . . . . . 13
⊢ (𝑎 ∈ ℝ → (-𝑎↑2) = (𝑎↑2)) |
51 | 50 | adantr 480 |
. . . . . . . . . . . 12
⊢ ((𝑎 ∈ ℝ ∧ -𝑎 ∈ ℕ) → (-𝑎↑2) = (𝑎↑2)) |
52 | 47, 51 | eqtr2d 2779 |
. . . . . . . . . . 11
⊢ ((𝑎 ∈ ℝ ∧ -𝑎 ∈ ℕ) → (𝑎↑2) = (if(0 ≤ 𝑎, 𝑎, -𝑎)↑2)) |
53 | 35, 52 | jaoi 853 |
. . . . . . . . . 10
⊢ ((𝑎 ∈ ℕ0 ∨
(𝑎 ∈ ℝ ∧
-𝑎 ∈ ℕ)) →
(𝑎↑2) = (if(0 ≤
𝑎, 𝑎, -𝑎)↑2)) |
54 | 32, 53 | sylbi 216 |
. . . . . . . . 9
⊢ (𝑎 ∈ ℤ → (𝑎↑2) = (if(0 ≤ 𝑎, 𝑎, -𝑎)↑2)) |
55 | | elznn0nn 12263 |
. . . . . . . . . 10
⊢ (𝑏 ∈ ℤ ↔ (𝑏 ∈ ℕ0 ∨
(𝑏 ∈ ℝ ∧
-𝑏 ∈
ℕ))) |
56 | 20 | iftrued 4464 |
. . . . . . . . . . . . 13
⊢ (𝑏 ∈ ℕ0
→ if(0 ≤ 𝑏, 𝑏, -𝑏) = 𝑏) |
57 | 56 | eqcomd 2744 |
. . . . . . . . . . . 12
⊢ (𝑏 ∈ ℕ0
→ 𝑏 = if(0 ≤ 𝑏, 𝑏, -𝑏)) |
58 | 57 | oveq1d 7270 |
. . . . . . . . . . 11
⊢ (𝑏 ∈ ℕ0
→ (𝑏↑2) = (if(0
≤ 𝑏, 𝑏, -𝑏)↑2)) |
59 | | elnnz 12259 |
. . . . . . . . . . . . . . . 16
⊢ (-𝑏 ∈ ℕ ↔ (-𝑏 ∈ ℤ ∧ 0 <
-𝑏)) |
60 | | lt0neg1 11411 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑏 ∈ ℝ → (𝑏 < 0 ↔ 0 < -𝑏)) |
61 | | id 22 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑏 ∈ ℝ → 𝑏 ∈
ℝ) |
62 | | 0red 10909 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑏 ∈ ℝ → 0 ∈
ℝ) |
63 | 61, 62 | ltnled 11052 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝑏 ∈ ℝ → (𝑏 < 0 ↔ ¬ 0 ≤
𝑏)) |
64 | 63 | biimpd 228 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑏 ∈ ℝ → (𝑏 < 0 → ¬ 0 ≤
𝑏)) |
65 | 60, 64 | sylbird 259 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑏 ∈ ℝ → (0 <
-𝑏 → ¬ 0 ≤
𝑏)) |
66 | 65 | com12 32 |
. . . . . . . . . . . . . . . 16
⊢ (0 <
-𝑏 → (𝑏 ∈ ℝ → ¬ 0
≤ 𝑏)) |
67 | 59, 66 | simplbiim 504 |
. . . . . . . . . . . . . . 15
⊢ (-𝑏 ∈ ℕ → (𝑏 ∈ ℝ → ¬ 0
≤ 𝑏)) |
68 | 67 | impcom 407 |
. . . . . . . . . . . . . 14
⊢ ((𝑏 ∈ ℝ ∧ -𝑏 ∈ ℕ) → ¬ 0
≤ 𝑏) |
69 | 68 | iffalsed 4467 |
. . . . . . . . . . . . 13
⊢ ((𝑏 ∈ ℝ ∧ -𝑏 ∈ ℕ) → if(0
≤ 𝑏, 𝑏, -𝑏) = -𝑏) |
70 | 69 | oveq1d 7270 |
. . . . . . . . . . . 12
⊢ ((𝑏 ∈ ℝ ∧ -𝑏 ∈ ℕ) → (if(0
≤ 𝑏, 𝑏, -𝑏)↑2) = (-𝑏↑2)) |
71 | | recn 10892 |
. . . . . . . . . . . . . 14
⊢ (𝑏 ∈ ℝ → 𝑏 ∈
ℂ) |
72 | | sqneg 13764 |
. . . . . . . . . . . . . 14
⊢ (𝑏 ∈ ℂ → (-𝑏↑2) = (𝑏↑2)) |
73 | 71, 72 | syl 17 |
. . . . . . . . . . . . 13
⊢ (𝑏 ∈ ℝ → (-𝑏↑2) = (𝑏↑2)) |
74 | 73 | adantr 480 |
. . . . . . . . . . . 12
⊢ ((𝑏 ∈ ℝ ∧ -𝑏 ∈ ℕ) → (-𝑏↑2) = (𝑏↑2)) |
75 | 70, 74 | eqtr2d 2779 |
. . . . . . . . . . 11
⊢ ((𝑏 ∈ ℝ ∧ -𝑏 ∈ ℕ) → (𝑏↑2) = (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2)) |
76 | 58, 75 | jaoi 853 |
. . . . . . . . . 10
⊢ ((𝑏 ∈ ℕ0 ∨
(𝑏 ∈ ℝ ∧
-𝑏 ∈ ℕ)) →
(𝑏↑2) = (if(0 ≤
𝑏, 𝑏, -𝑏)↑2)) |
77 | 55, 76 | sylbi 216 |
. . . . . . . . 9
⊢ (𝑏 ∈ ℤ → (𝑏↑2) = (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2)) |
78 | 54, 77 | oveqan12d 7274 |
. . . . . . . 8
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) → ((𝑎↑2) + (𝑏↑2)) = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2))) |
79 | 78 | eqeq2d 2749 |
. . . . . . 7
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) → (𝑃 = ((𝑎↑2) + (𝑏↑2)) ↔ 𝑃 = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2)))) |
80 | 79 | biimpd 228 |
. . . . . 6
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → 𝑃 = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2)))) |
81 | 80 | imp 406 |
. . . . 5
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ 𝑃 = ((𝑎↑2) + (𝑏↑2))) → 𝑃 = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2))) |
82 | | oveq1 7262 |
. . . . . . . 8
⊢ (𝑥 = if(0 ≤ 𝑎, 𝑎, -𝑎) → (𝑥↑2) = (if(0 ≤ 𝑎, 𝑎, -𝑎)↑2)) |
83 | 82 | oveq1d 7270 |
. . . . . . 7
⊢ (𝑥 = if(0 ≤ 𝑎, 𝑎, -𝑎) → ((𝑥↑2) + (𝑦↑2)) = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (𝑦↑2))) |
84 | 83 | eqeq2d 2749 |
. . . . . 6
⊢ (𝑥 = if(0 ≤ 𝑎, 𝑎, -𝑎) → (𝑃 = ((𝑥↑2) + (𝑦↑2)) ↔ 𝑃 = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (𝑦↑2)))) |
85 | | oveq1 7262 |
. . . . . . . 8
⊢ (𝑦 = if(0 ≤ 𝑏, 𝑏, -𝑏) → (𝑦↑2) = (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2)) |
86 | 85 | oveq2d 7271 |
. . . . . . 7
⊢ (𝑦 = if(0 ≤ 𝑏, 𝑏, -𝑏) → ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (𝑦↑2)) = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2))) |
87 | 86 | eqeq2d 2749 |
. . . . . 6
⊢ (𝑦 = if(0 ≤ 𝑏, 𝑏, -𝑏) → (𝑃 = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (𝑦↑2)) ↔ 𝑃 = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2)))) |
88 | 84, 87 | rspc2ev 3564 |
. . . . 5
⊢ ((if(0
≤ 𝑎, 𝑎, -𝑎) ∈ ℕ0 ∧ if(0 ≤
𝑏, 𝑏, -𝑏) ∈ ℕ0 ∧ 𝑃 = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2))) → ∃𝑥 ∈ ℕ0 ∃𝑦 ∈ ℕ0
𝑃 = ((𝑥↑2) + (𝑦↑2))) |
89 | 16, 31, 81, 88 | syl3anc 1369 |
. . . 4
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ 𝑃 = ((𝑎↑2) + (𝑏↑2))) → ∃𝑥 ∈ ℕ0 ∃𝑦 ∈ ℕ0
𝑃 = ((𝑥↑2) + (𝑦↑2))) |
90 | 89 | ex 412 |
. . 3
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ0 ∃𝑦 ∈ ℕ0
𝑃 = ((𝑥↑2) + (𝑦↑2)))) |
91 | 90 | rexlimivv 3220 |
. 2
⊢
(∃𝑎 ∈
ℤ ∃𝑏 ∈
ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ0 ∃𝑦 ∈ ℕ0
𝑃 = ((𝑥↑2) + (𝑦↑2))) |
92 | 1, 91 | syl 17 |
1
⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃𝑥 ∈ ℕ0
∃𝑦 ∈
ℕ0 𝑃 =
((𝑥↑2) + (𝑦↑2))) |