Step | Hyp | Ref
| Expression |
1 | | 2sq 26578 |
. 2
⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2))) |
2 | | elnn0z 12332 |
. . . . . . . . 9
⊢ (𝑎 ∈ ℕ0
↔ (𝑎 ∈ ℤ
∧ 0 ≤ 𝑎)) |
3 | 2 | biimpri 227 |
. . . . . . . 8
⊢ ((𝑎 ∈ ℤ ∧ 0 ≤
𝑎) → 𝑎 ∈
ℕ0) |
4 | | elznn0 12334 |
. . . . . . . . . 10
⊢ (𝑎 ∈ ℤ ↔ (𝑎 ∈ ℝ ∧ (𝑎 ∈ ℕ0 ∨
-𝑎 ∈
ℕ0))) |
5 | | nn0ge0 12258 |
. . . . . . . . . . . . . 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 856 |
. . . . . . . . . . 11
⊢ (𝑎 ∈ ℝ → ((𝑎 ∈ ℕ0 ∨
-𝑎 ∈
ℕ0) → (¬ 0 ≤ 𝑎 → -𝑎 ∈
ℕ0))) |
11 | 10 | imp 407 |
. . . . . . . . . 10
⊢ ((𝑎 ∈ ℝ ∧ (𝑎 ∈ ℕ0 ∨
-𝑎 ∈
ℕ0)) → (¬ 0 ≤ 𝑎 → -𝑎 ∈
ℕ0)) |
12 | 4, 11 | sylbi 216 |
. . . . . . . . 9
⊢ (𝑎 ∈ ℤ → (¬ 0
≤ 𝑎 → -𝑎 ∈
ℕ0)) |
13 | 12 | imp 407 |
. . . . . . . 8
⊢ ((𝑎 ∈ ℤ ∧ ¬ 0
≤ 𝑎) → -𝑎 ∈
ℕ0) |
14 | 3, 13 | ifclda 4494 |
. . . . . . 7
⊢ (𝑎 ∈ ℤ → if(0 ≤
𝑎, 𝑎, -𝑎) ∈
ℕ0) |
15 | 14 | adantr 481 |
. . . . . 6
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) → if(0
≤ 𝑎, 𝑎, -𝑎) ∈
ℕ0) |
16 | 15 | adantr 481 |
. . . . 5
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ 𝑃 = ((𝑎↑2) + (𝑏↑2))) → if(0 ≤ 𝑎, 𝑎, -𝑎) ∈
ℕ0) |
17 | | elnn0z 12332 |
. . . . . . . . 9
⊢ (𝑏 ∈ ℕ0
↔ (𝑏 ∈ ℤ
∧ 0 ≤ 𝑏)) |
18 | 17 | biimpri 227 |
. . . . . . . 8
⊢ ((𝑏 ∈ ℤ ∧ 0 ≤
𝑏) → 𝑏 ∈
ℕ0) |
19 | | elznn0 12334 |
. . . . . . . . . 10
⊢ (𝑏 ∈ ℤ ↔ (𝑏 ∈ ℝ ∧ (𝑏 ∈ ℕ0 ∨
-𝑏 ∈
ℕ0))) |
20 | | nn0ge0 12258 |
. . . . . . . . . . . . . 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 856 |
. . . . . . . . . . 11
⊢ (𝑏 ∈ ℝ → ((𝑏 ∈ ℕ0 ∨
-𝑏 ∈
ℕ0) → (¬ 0 ≤ 𝑏 → -𝑏 ∈
ℕ0))) |
26 | 25 | imp 407 |
. . . . . . . . . 10
⊢ ((𝑏 ∈ ℝ ∧ (𝑏 ∈ ℕ0 ∨
-𝑏 ∈
ℕ0)) → (¬ 0 ≤ 𝑏 → -𝑏 ∈
ℕ0)) |
27 | 19, 26 | sylbi 216 |
. . . . . . . . 9
⊢ (𝑏 ∈ ℤ → (¬ 0
≤ 𝑏 → -𝑏 ∈
ℕ0)) |
28 | 27 | imp 407 |
. . . . . . . 8
⊢ ((𝑏 ∈ ℤ ∧ ¬ 0
≤ 𝑏) → -𝑏 ∈
ℕ0) |
29 | 18, 28 | ifclda 4494 |
. . . . . . 7
⊢ (𝑏 ∈ ℤ → if(0 ≤
𝑏, 𝑏, -𝑏) ∈
ℕ0) |
30 | 29 | adantl 482 |
. . . . . 6
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) → if(0
≤ 𝑏, 𝑏, -𝑏) ∈
ℕ0) |
31 | 30 | adantr 481 |
. . . . 5
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ 𝑃 = ((𝑎↑2) + (𝑏↑2))) → if(0 ≤ 𝑏, 𝑏, -𝑏) ∈
ℕ0) |
32 | | elznn0nn 12333 |
. . . . . . . . . 10
⊢ (𝑎 ∈ ℤ ↔ (𝑎 ∈ ℕ0 ∨
(𝑎 ∈ ℝ ∧
-𝑎 ∈
ℕ))) |
33 | 5 | iftrued 4467 |
. . . . . . . . . . . . 13
⊢ (𝑎 ∈ ℕ0
→ if(0 ≤ 𝑎, 𝑎, -𝑎) = 𝑎) |
34 | 33 | eqcomd 2744 |
. . . . . . . . . . . 12
⊢ (𝑎 ∈ ℕ0
→ 𝑎 = if(0 ≤ 𝑎, 𝑎, -𝑎)) |
35 | 34 | oveq1d 7290 |
. . . . . . . . . . 11
⊢ (𝑎 ∈ ℕ0
→ (𝑎↑2) = (if(0
≤ 𝑎, 𝑎, -𝑎)↑2)) |
36 | | elnnz 12329 |
. . . . . . . . . . . . . . . 16
⊢ (-𝑎 ∈ ℕ ↔ (-𝑎 ∈ ℤ ∧ 0 <
-𝑎)) |
37 | | lt0neg1 11481 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑎 ∈ ℝ → (𝑎 < 0 ↔ 0 < -𝑎)) |
38 | | id 22 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑎 ∈ ℝ → 𝑎 ∈
ℝ) |
39 | | 0red 10978 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑎 ∈ ℝ → 0 ∈
ℝ) |
40 | 38, 39 | ltnled 11122 |
. . . . . . . . . . . . . . . . . . 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 505 |
. . . . . . . . . . . . . . 15
⊢ (-𝑎 ∈ ℕ → (𝑎 ∈ ℝ → ¬ 0
≤ 𝑎)) |
45 | 44 | impcom 408 |
. . . . . . . . . . . . . 14
⊢ ((𝑎 ∈ ℝ ∧ -𝑎 ∈ ℕ) → ¬ 0
≤ 𝑎) |
46 | 45 | iffalsed 4470 |
. . . . . . . . . . . . 13
⊢ ((𝑎 ∈ ℝ ∧ -𝑎 ∈ ℕ) → if(0
≤ 𝑎, 𝑎, -𝑎) = -𝑎) |
47 | 46 | oveq1d 7290 |
. . . . . . . . . . . 12
⊢ ((𝑎 ∈ ℝ ∧ -𝑎 ∈ ℕ) → (if(0
≤ 𝑎, 𝑎, -𝑎)↑2) = (-𝑎↑2)) |
48 | | recn 10961 |
. . . . . . . . . . . . . 14
⊢ (𝑎 ∈ ℝ → 𝑎 ∈
ℂ) |
49 | | sqneg 13836 |
. . . . . . . . . . . . . 14
⊢ (𝑎 ∈ ℂ → (-𝑎↑2) = (𝑎↑2)) |
50 | 48, 49 | syl 17 |
. . . . . . . . . . . . 13
⊢ (𝑎 ∈ ℝ → (-𝑎↑2) = (𝑎↑2)) |
51 | 50 | adantr 481 |
. . . . . . . . . . . 12
⊢ ((𝑎 ∈ ℝ ∧ -𝑎 ∈ ℕ) → (-𝑎↑2) = (𝑎↑2)) |
52 | 47, 51 | eqtr2d 2779 |
. . . . . . . . . . 11
⊢ ((𝑎 ∈ ℝ ∧ -𝑎 ∈ ℕ) → (𝑎↑2) = (if(0 ≤ 𝑎, 𝑎, -𝑎)↑2)) |
53 | 35, 52 | jaoi 854 |
. . . . . . . . . 10
⊢ ((𝑎 ∈ ℕ0 ∨
(𝑎 ∈ ℝ ∧
-𝑎 ∈ ℕ)) →
(𝑎↑2) = (if(0 ≤
𝑎, 𝑎, -𝑎)↑2)) |
54 | 32, 53 | sylbi 216 |
. . . . . . . . 9
⊢ (𝑎 ∈ ℤ → (𝑎↑2) = (if(0 ≤ 𝑎, 𝑎, -𝑎)↑2)) |
55 | | elznn0nn 12333 |
. . . . . . . . . 10
⊢ (𝑏 ∈ ℤ ↔ (𝑏 ∈ ℕ0 ∨
(𝑏 ∈ ℝ ∧
-𝑏 ∈
ℕ))) |
56 | 20 | iftrued 4467 |
. . . . . . . . . . . . 13
⊢ (𝑏 ∈ ℕ0
→ if(0 ≤ 𝑏, 𝑏, -𝑏) = 𝑏) |
57 | 56 | eqcomd 2744 |
. . . . . . . . . . . 12
⊢ (𝑏 ∈ ℕ0
→ 𝑏 = if(0 ≤ 𝑏, 𝑏, -𝑏)) |
58 | 57 | oveq1d 7290 |
. . . . . . . . . . 11
⊢ (𝑏 ∈ ℕ0
→ (𝑏↑2) = (if(0
≤ 𝑏, 𝑏, -𝑏)↑2)) |
59 | | elnnz 12329 |
. . . . . . . . . . . . . . . 16
⊢ (-𝑏 ∈ ℕ ↔ (-𝑏 ∈ ℤ ∧ 0 <
-𝑏)) |
60 | | lt0neg1 11481 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑏 ∈ ℝ → (𝑏 < 0 ↔ 0 < -𝑏)) |
61 | | id 22 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑏 ∈ ℝ → 𝑏 ∈
ℝ) |
62 | | 0red 10978 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑏 ∈ ℝ → 0 ∈
ℝ) |
63 | 61, 62 | ltnled 11122 |
. . . . . . . . . . . . . . . . . . 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 505 |
. . . . . . . . . . . . . . 15
⊢ (-𝑏 ∈ ℕ → (𝑏 ∈ ℝ → ¬ 0
≤ 𝑏)) |
68 | 67 | impcom 408 |
. . . . . . . . . . . . . 14
⊢ ((𝑏 ∈ ℝ ∧ -𝑏 ∈ ℕ) → ¬ 0
≤ 𝑏) |
69 | 68 | iffalsed 4470 |
. . . . . . . . . . . . 13
⊢ ((𝑏 ∈ ℝ ∧ -𝑏 ∈ ℕ) → if(0
≤ 𝑏, 𝑏, -𝑏) = -𝑏) |
70 | 69 | oveq1d 7290 |
. . . . . . . . . . . 12
⊢ ((𝑏 ∈ ℝ ∧ -𝑏 ∈ ℕ) → (if(0
≤ 𝑏, 𝑏, -𝑏)↑2) = (-𝑏↑2)) |
71 | | recn 10961 |
. . . . . . . . . . . . . 14
⊢ (𝑏 ∈ ℝ → 𝑏 ∈
ℂ) |
72 | | sqneg 13836 |
. . . . . . . . . . . . . 14
⊢ (𝑏 ∈ ℂ → (-𝑏↑2) = (𝑏↑2)) |
73 | 71, 72 | syl 17 |
. . . . . . . . . . . . 13
⊢ (𝑏 ∈ ℝ → (-𝑏↑2) = (𝑏↑2)) |
74 | 73 | adantr 481 |
. . . . . . . . . . . 12
⊢ ((𝑏 ∈ ℝ ∧ -𝑏 ∈ ℕ) → (-𝑏↑2) = (𝑏↑2)) |
75 | 70, 74 | eqtr2d 2779 |
. . . . . . . . . . 11
⊢ ((𝑏 ∈ ℝ ∧ -𝑏 ∈ ℕ) → (𝑏↑2) = (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2)) |
76 | 58, 75 | jaoi 854 |
. . . . . . . . . 10
⊢ ((𝑏 ∈ ℕ0 ∨
(𝑏 ∈ ℝ ∧
-𝑏 ∈ ℕ)) →
(𝑏↑2) = (if(0 ≤
𝑏, 𝑏, -𝑏)↑2)) |
77 | 55, 76 | sylbi 216 |
. . . . . . . . 9
⊢ (𝑏 ∈ ℤ → (𝑏↑2) = (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2)) |
78 | 54, 77 | oveqan12d 7294 |
. . . . . . . 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 407 |
. . . . 5
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ 𝑃 = ((𝑎↑2) + (𝑏↑2))) → 𝑃 = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2))) |
82 | | oveq1 7282 |
. . . . . . . 8
⊢ (𝑥 = if(0 ≤ 𝑎, 𝑎, -𝑎) → (𝑥↑2) = (if(0 ≤ 𝑎, 𝑎, -𝑎)↑2)) |
83 | 82 | oveq1d 7290 |
. . . . . . 7
⊢ (𝑥 = if(0 ≤ 𝑎, 𝑎, -𝑎) → ((𝑥↑2) + (𝑦↑2)) = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (𝑦↑2))) |
84 | 83 | eqeq2d 2749 |
. . . . . 6
⊢ (𝑥 = if(0 ≤ 𝑎, 𝑎, -𝑎) → (𝑃 = ((𝑥↑2) + (𝑦↑2)) ↔ 𝑃 = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (𝑦↑2)))) |
85 | | oveq1 7282 |
. . . . . . . 8
⊢ (𝑦 = if(0 ≤ 𝑏, 𝑏, -𝑏) → (𝑦↑2) = (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2)) |
86 | 85 | oveq2d 7291 |
. . . . . . 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 3572 |
. . . . 5
⊢ ((if(0
≤ 𝑎, 𝑎, -𝑎) ∈ ℕ0 ∧ if(0 ≤
𝑏, 𝑏, -𝑏) ∈ ℕ0 ∧ 𝑃 = ((if(0 ≤ 𝑎, 𝑎, -𝑎)↑2) + (if(0 ≤ 𝑏, 𝑏, -𝑏)↑2))) → ∃𝑥 ∈ ℕ0 ∃𝑦 ∈ ℕ0
𝑃 = ((𝑥↑2) + (𝑦↑2))) |
89 | 16, 31, 81, 88 | syl3anc 1370 |
. . . 4
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ 𝑃 = ((𝑎↑2) + (𝑏↑2))) → ∃𝑥 ∈ ℕ0 ∃𝑦 ∈ ℕ0
𝑃 = ((𝑥↑2) + (𝑦↑2))) |
90 | 89 | ex 413 |
. . 3
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) → (𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ0 ∃𝑦 ∈ ℕ0
𝑃 = ((𝑥↑2) + (𝑦↑2)))) |
91 | 90 | rexlimivv 3221 |
. 2
⊢
(∃𝑎 ∈
ℤ ∃𝑏 ∈
ℤ 𝑃 = ((𝑎↑2) + (𝑏↑2)) → ∃𝑥 ∈ ℕ0 ∃𝑦 ∈ ℕ0
𝑃 = ((𝑥↑2) + (𝑦↑2))) |
92 | 1, 91 | syl 17 |
1
⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃𝑥 ∈ ℕ0
∃𝑦 ∈
ℕ0 𝑃 =
((𝑥↑2) + (𝑦↑2))) |