Step | Hyp | Ref
| Expression |
1 | | 4sq.1 |
. . . 4
⊢ 𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))} |
2 | 1 | 4sqlem2 12315 |
. . 3
⊢ (𝐴 ∈ 𝑆 ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))) |
3 | | gzreim 12305 |
. . . . . . . 8
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) → (𝑎 + (i · 𝑏)) ∈
ℤ[i]) |
4 | 3 | adantr 274 |
. . . . . . 7
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) → (𝑎 + (i · 𝑏)) ∈
ℤ[i]) |
5 | | gzreim 12305 |
. . . . . . . 8
⊢ ((𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ) → (𝑐 + (i · 𝑑)) ∈
ℤ[i]) |
6 | 5 | adantl 275 |
. . . . . . 7
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) → (𝑐 + (i · 𝑑)) ∈
ℤ[i]) |
7 | | gzcn 12298 |
. . . . . . . . . . . 12
⊢ ((𝑎 + (i · 𝑏)) ∈ ℤ[i] →
(𝑎 + (i · 𝑏)) ∈
ℂ) |
8 | 3, 7 | syl 14 |
. . . . . . . . . . 11
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) → (𝑎 + (i · 𝑏)) ∈
ℂ) |
9 | 8 | absvalsq2d 11121 |
. . . . . . . . . 10
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) →
((abs‘(𝑎 + (i
· 𝑏)))↑2) =
(((ℜ‘(𝑎 + (i
· 𝑏)))↑2) +
((ℑ‘(𝑎 + (i
· 𝑏)))↑2))) |
10 | | zre 9191 |
. . . . . . . . . . . . 13
⊢ (𝑎 ∈ ℤ → 𝑎 ∈
ℝ) |
11 | | zre 9191 |
. . . . . . . . . . . . 13
⊢ (𝑏 ∈ ℤ → 𝑏 ∈
ℝ) |
12 | | crre 10795 |
. . . . . . . . . . . . 13
⊢ ((𝑎 ∈ ℝ ∧ 𝑏 ∈ ℝ) →
(ℜ‘(𝑎 + (i
· 𝑏))) = 𝑎) |
13 | 10, 11, 12 | syl2an 287 |
. . . . . . . . . . . 12
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) →
(ℜ‘(𝑎 + (i
· 𝑏))) = 𝑎) |
14 | 13 | oveq1d 5856 |
. . . . . . . . . . 11
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) →
((ℜ‘(𝑎 + (i
· 𝑏)))↑2) =
(𝑎↑2)) |
15 | | crim 10796 |
. . . . . . . . . . . . 13
⊢ ((𝑎 ∈ ℝ ∧ 𝑏 ∈ ℝ) →
(ℑ‘(𝑎 + (i
· 𝑏))) = 𝑏) |
16 | 10, 11, 15 | syl2an 287 |
. . . . . . . . . . . 12
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) →
(ℑ‘(𝑎 + (i
· 𝑏))) = 𝑏) |
17 | 16 | oveq1d 5856 |
. . . . . . . . . . 11
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) →
((ℑ‘(𝑎 + (i
· 𝑏)))↑2) =
(𝑏↑2)) |
18 | 14, 17 | oveq12d 5859 |
. . . . . . . . . 10
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) →
(((ℜ‘(𝑎 + (i
· 𝑏)))↑2) +
((ℑ‘(𝑎 + (i
· 𝑏)))↑2)) =
((𝑎↑2) + (𝑏↑2))) |
19 | 9, 18 | eqtrd 2198 |
. . . . . . . . 9
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) →
((abs‘(𝑎 + (i
· 𝑏)))↑2) =
((𝑎↑2) + (𝑏↑2))) |
20 | | gzcn 12298 |
. . . . . . . . . . . 12
⊢ ((𝑐 + (i · 𝑑)) ∈ ℤ[i] →
(𝑐 + (i · 𝑑)) ∈
ℂ) |
21 | 5, 20 | syl 14 |
. . . . . . . . . . 11
⊢ ((𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ) → (𝑐 + (i · 𝑑)) ∈
ℂ) |
22 | 21 | absvalsq2d 11121 |
. . . . . . . . . 10
⊢ ((𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ) →
((abs‘(𝑐 + (i
· 𝑑)))↑2) =
(((ℜ‘(𝑐 + (i
· 𝑑)))↑2) +
((ℑ‘(𝑐 + (i
· 𝑑)))↑2))) |
23 | | zre 9191 |
. . . . . . . . . . . . 13
⊢ (𝑐 ∈ ℤ → 𝑐 ∈
ℝ) |
24 | | zre 9191 |
. . . . . . . . . . . . 13
⊢ (𝑑 ∈ ℤ → 𝑑 ∈
ℝ) |
25 | | crre 10795 |
. . . . . . . . . . . . 13
⊢ ((𝑐 ∈ ℝ ∧ 𝑑 ∈ ℝ) →
(ℜ‘(𝑐 + (i
· 𝑑))) = 𝑐) |
26 | 23, 24, 25 | syl2an 287 |
. . . . . . . . . . . 12
⊢ ((𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ) →
(ℜ‘(𝑐 + (i
· 𝑑))) = 𝑐) |
27 | 26 | oveq1d 5856 |
. . . . . . . . . . 11
⊢ ((𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ) →
((ℜ‘(𝑐 + (i
· 𝑑)))↑2) =
(𝑐↑2)) |
28 | | crim 10796 |
. . . . . . . . . . . . 13
⊢ ((𝑐 ∈ ℝ ∧ 𝑑 ∈ ℝ) →
(ℑ‘(𝑐 + (i
· 𝑑))) = 𝑑) |
29 | 23, 24, 28 | syl2an 287 |
. . . . . . . . . . . 12
⊢ ((𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ) →
(ℑ‘(𝑐 + (i
· 𝑑))) = 𝑑) |
30 | 29 | oveq1d 5856 |
. . . . . . . . . . 11
⊢ ((𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ) →
((ℑ‘(𝑐 + (i
· 𝑑)))↑2) =
(𝑑↑2)) |
31 | 27, 30 | oveq12d 5859 |
. . . . . . . . . 10
⊢ ((𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ) →
(((ℜ‘(𝑐 + (i
· 𝑑)))↑2) +
((ℑ‘(𝑐 + (i
· 𝑑)))↑2)) =
((𝑐↑2) + (𝑑↑2))) |
32 | 22, 31 | eqtrd 2198 |
. . . . . . . . 9
⊢ ((𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ) →
((abs‘(𝑐 + (i
· 𝑑)))↑2) =
((𝑐↑2) + (𝑑↑2))) |
33 | 19, 32 | oveqan12d 5860 |
. . . . . . . 8
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) →
(((abs‘(𝑎 + (i
· 𝑏)))↑2) +
((abs‘(𝑐 + (i
· 𝑑)))↑2)) =
(((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))) |
34 | 33 | eqcomd 2171 |
. . . . . . 7
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) →
(((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((abs‘(𝑎 + (i · 𝑏)))↑2) + ((abs‘(𝑐 + (i · 𝑑)))↑2))) |
35 | | fveq2 5485 |
. . . . . . . . . . 11
⊢ (𝑢 = (𝑎 + (i · 𝑏)) → (abs‘𝑢) = (abs‘(𝑎 + (i · 𝑏)))) |
36 | 35 | oveq1d 5856 |
. . . . . . . . . 10
⊢ (𝑢 = (𝑎 + (i · 𝑏)) → ((abs‘𝑢)↑2) = ((abs‘(𝑎 + (i · 𝑏)))↑2)) |
37 | 36 | oveq1d 5856 |
. . . . . . . . 9
⊢ (𝑢 = (𝑎 + (i · 𝑏)) → (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2)) = (((abs‘(𝑎 + (i · 𝑏)))↑2) + ((abs‘𝑣)↑2))) |
38 | 37 | eqeq2d 2177 |
. . . . . . . 8
⊢ (𝑢 = (𝑎 + (i · 𝑏)) → ((((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2)) ↔ (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((abs‘(𝑎 + (i · 𝑏)))↑2) + ((abs‘𝑣)↑2)))) |
39 | | fveq2 5485 |
. . . . . . . . . . 11
⊢ (𝑣 = (𝑐 + (i · 𝑑)) → (abs‘𝑣) = (abs‘(𝑐 + (i · 𝑑)))) |
40 | 39 | oveq1d 5856 |
. . . . . . . . . 10
⊢ (𝑣 = (𝑐 + (i · 𝑑)) → ((abs‘𝑣)↑2) = ((abs‘(𝑐 + (i · 𝑑)))↑2)) |
41 | 40 | oveq2d 5857 |
. . . . . . . . 9
⊢ (𝑣 = (𝑐 + (i · 𝑑)) → (((abs‘(𝑎 + (i · 𝑏)))↑2) + ((abs‘𝑣)↑2)) = (((abs‘(𝑎 + (i · 𝑏)))↑2) + ((abs‘(𝑐 + (i · 𝑑)))↑2))) |
42 | 41 | eqeq2d 2177 |
. . . . . . . 8
⊢ (𝑣 = (𝑐 + (i · 𝑑)) → ((((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((abs‘(𝑎 + (i · 𝑏)))↑2) + ((abs‘𝑣)↑2)) ↔ (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((abs‘(𝑎 + (i · 𝑏)))↑2) + ((abs‘(𝑐 + (i · 𝑑)))↑2)))) |
43 | 38, 42 | rspc2ev 2844 |
. . . . . . 7
⊢ (((𝑎 + (i · 𝑏)) ∈ ℤ[i] ∧
(𝑐 + (i · 𝑑)) ∈ ℤ[i] ∧
(((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((abs‘(𝑎 + (i · 𝑏)))↑2) + ((abs‘(𝑐 + (i · 𝑑)))↑2))) → ∃𝑢 ∈ ℤ[i] ∃𝑣 ∈ ℤ[i] (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2))) |
44 | 4, 6, 34, 43 | syl3anc 1228 |
. . . . . 6
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) →
∃𝑢 ∈ ℤ[i]
∃𝑣 ∈ ℤ[i]
(((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2))) |
45 | | eqeq1 2172 |
. . . . . . 7
⊢ (𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → (𝐴 = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2)) ↔ (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2)))) |
46 | 45 | 2rexbidv 2490 |
. . . . . 6
⊢ (𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → (∃𝑢 ∈ ℤ[i] ∃𝑣 ∈ ℤ[i] 𝐴 = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2)) ↔ ∃𝑢 ∈ ℤ[i] ∃𝑣 ∈ ℤ[i] (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2)))) |
47 | 44, 46 | syl5ibrcom 156 |
. . . . 5
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) → (𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → ∃𝑢 ∈ ℤ[i] ∃𝑣 ∈ ℤ[i] 𝐴 = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2)))) |
48 | 47 | rexlimdvva 2590 |
. . . 4
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) →
(∃𝑐 ∈ ℤ
∃𝑑 ∈ ℤ
𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → ∃𝑢 ∈ ℤ[i] ∃𝑣 ∈ ℤ[i] 𝐴 = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2)))) |
49 | 48 | rexlimivv 2588 |
. . 3
⊢
(∃𝑎 ∈
ℤ ∃𝑏 ∈
ℤ ∃𝑐 ∈
ℤ ∃𝑑 ∈
ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → ∃𝑢 ∈ ℤ[i] ∃𝑣 ∈ ℤ[i] 𝐴 = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2))) |
50 | 2, 49 | sylbi 120 |
. 2
⊢ (𝐴 ∈ 𝑆 → ∃𝑢 ∈ ℤ[i] ∃𝑣 ∈ ℤ[i] 𝐴 = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2))) |
51 | 1 | 4sqlem4a 12317 |
. . . 4
⊢ ((𝑢 ∈ ℤ[i] ∧ 𝑣 ∈ ℤ[i]) →
(((abs‘𝑢)↑2) +
((abs‘𝑣)↑2))
∈ 𝑆) |
52 | | eleq1a 2237 |
. . . 4
⊢
((((abs‘𝑢)↑2) + ((abs‘𝑣)↑2)) ∈ 𝑆 → (𝐴 = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2)) → 𝐴 ∈ 𝑆)) |
53 | 51, 52 | syl 14 |
. . 3
⊢ ((𝑢 ∈ ℤ[i] ∧ 𝑣 ∈ ℤ[i]) →
(𝐴 = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2)) → 𝐴 ∈ 𝑆)) |
54 | 53 | rexlimivv 2588 |
. 2
⊢
(∃𝑢 ∈
ℤ[i] ∃𝑣 ∈
ℤ[i] 𝐴 =
(((abs‘𝑢)↑2) +
((abs‘𝑣)↑2))
→ 𝐴 ∈ 𝑆) |
55 | 50, 54 | impbii 125 |
1
⊢ (𝐴 ∈ 𝑆 ↔ ∃𝑢 ∈ ℤ[i] ∃𝑣 ∈ ℤ[i] 𝐴 = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2))) |