Proof of Theorem 4sqlem2
Step | Hyp | Ref
| Expression |
1 | | 4sq.1 |
. . 3
⊢ 𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))} |
2 | 1 | eleq2i 2830 |
. 2
⊢ (𝐴 ∈ 𝑆 ↔ 𝐴 ∈ {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}) |
3 | | id 22 |
. . . . . . 7
⊢ (𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))) |
4 | | ovex 7308 |
. . . . . . 7
⊢ (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ∈ V |
5 | 3, 4 | eqeltrdi 2847 |
. . . . . 6
⊢ (𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → 𝐴 ∈ V) |
6 | 5 | a1i 11 |
. . . . 5
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) → (𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → 𝐴 ∈ V)) |
7 | 6 | rexlimdvva 3223 |
. . . 4
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) →
(∃𝑐 ∈ ℤ
∃𝑑 ∈ ℤ
𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → 𝐴 ∈ V)) |
8 | 7 | rexlimivv 3221 |
. . 3
⊢
(∃𝑎 ∈
ℤ ∃𝑏 ∈
ℤ ∃𝑐 ∈
ℤ ∃𝑑 ∈
ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → 𝐴 ∈ V) |
9 | | oveq1 7282 |
. . . . . . . . 9
⊢ (𝑥 = 𝑎 → (𝑥↑2) = (𝑎↑2)) |
10 | 9 | oveq1d 7290 |
. . . . . . . 8
⊢ (𝑥 = 𝑎 → ((𝑥↑2) + (𝑦↑2)) = ((𝑎↑2) + (𝑦↑2))) |
11 | 10 | oveq1d 7290 |
. . . . . . 7
⊢ (𝑥 = 𝑎 → (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) = (((𝑎↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))) |
12 | 11 | eqeq2d 2749 |
. . . . . 6
⊢ (𝑥 = 𝑎 → (𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ 𝑛 = (((𝑎↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))))) |
13 | 12 | 2rexbidv 3229 |
. . . . 5
⊢ (𝑥 = 𝑎 → (∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))))) |
14 | | oveq1 7282 |
. . . . . . . . 9
⊢ (𝑦 = 𝑏 → (𝑦↑2) = (𝑏↑2)) |
15 | 14 | oveq2d 7291 |
. . . . . . . 8
⊢ (𝑦 = 𝑏 → ((𝑎↑2) + (𝑦↑2)) = ((𝑎↑2) + (𝑏↑2))) |
16 | 15 | oveq1d 7290 |
. . . . . . 7
⊢ (𝑦 = 𝑏 → (((𝑎↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2)))) |
17 | 16 | eqeq2d 2749 |
. . . . . 6
⊢ (𝑦 = 𝑏 → (𝑛 = (((𝑎↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))))) |
18 | 17 | 2rexbidv 3229 |
. . . . 5
⊢ (𝑦 = 𝑏 → (∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))))) |
19 | 13, 18 | cbvrex2vw 3397 |
. . . 4
⊢
(∃𝑥 ∈
ℤ ∃𝑦 ∈
ℤ ∃𝑧 ∈
ℤ ∃𝑤 ∈
ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2)))) |
20 | | oveq1 7282 |
. . . . . . . . . 10
⊢ (𝑧 = 𝑐 → (𝑧↑2) = (𝑐↑2)) |
21 | 20 | oveq1d 7290 |
. . . . . . . . 9
⊢ (𝑧 = 𝑐 → ((𝑧↑2) + (𝑤↑2)) = ((𝑐↑2) + (𝑤↑2))) |
22 | 21 | oveq2d 7291 |
. . . . . . . 8
⊢ (𝑧 = 𝑐 → (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑤↑2)))) |
23 | 22 | eqeq2d 2749 |
. . . . . . 7
⊢ (𝑧 = 𝑐 → (𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑤↑2))))) |
24 | | oveq1 7282 |
. . . . . . . . . 10
⊢ (𝑤 = 𝑑 → (𝑤↑2) = (𝑑↑2)) |
25 | 24 | oveq2d 7291 |
. . . . . . . . 9
⊢ (𝑤 = 𝑑 → ((𝑐↑2) + (𝑤↑2)) = ((𝑐↑2) + (𝑑↑2))) |
26 | 25 | oveq2d 7291 |
. . . . . . . 8
⊢ (𝑤 = 𝑑 → (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑤↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))) |
27 | 26 | eqeq2d 2749 |
. . . . . . 7
⊢ (𝑤 = 𝑑 → (𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑤↑2))) ↔ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))) |
28 | 23, 27 | cbvrex2vw 3397 |
. . . . . 6
⊢
(∃𝑧 ∈
ℤ ∃𝑤 ∈
ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))) |
29 | | eqeq1 2742 |
. . . . . . 7
⊢ (𝑛 = 𝐴 → (𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))) |
30 | 29 | 2rexbidv 3229 |
. . . . . 6
⊢ (𝑛 = 𝐴 → (∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))) |
31 | 28, 30 | bitrid 282 |
. . . . 5
⊢ (𝑛 = 𝐴 → (∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))) |
32 | 31 | 2rexbidv 3229 |
. . . 4
⊢ (𝑛 = 𝐴 → (∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))) |
33 | 19, 32 | bitrid 282 |
. . 3
⊢ (𝑛 = 𝐴 → (∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))) |
34 | 8, 33 | elab3 3617 |
. 2
⊢ (𝐴 ∈ {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))} ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))) |
35 | 2, 34 | bitri 274 |
1
⊢ (𝐴 ∈ 𝑆 ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))) |