Proof of Theorem 4sqlem2
Step | Hyp | Ref
| Expression |
1 | | 4sq.1 |
. . 3
⊢ 𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))} |
2 | 1 | eleq2i 2237 |
. 2
⊢ (𝐴 ∈ 𝑆 ↔ 𝐴 ∈ {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}) |
3 | | zsqcl2 10553 |
. . . . . . . . . 10
⊢ (𝑎 ∈ ℤ → (𝑎↑2) ∈
ℕ0) |
4 | 3 | ad2antrr 485 |
. . . . . . . . 9
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) → (𝑎↑2) ∈
ℕ0) |
5 | | zsqcl2 10553 |
. . . . . . . . . 10
⊢ (𝑏 ∈ ℤ → (𝑏↑2) ∈
ℕ0) |
6 | 5 | ad2antlr 486 |
. . . . . . . . 9
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) → (𝑏↑2) ∈
ℕ0) |
7 | 4, 6 | nn0addcld 9192 |
. . . . . . . 8
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) → ((𝑎↑2) + (𝑏↑2)) ∈
ℕ0) |
8 | | zsqcl2 10553 |
. . . . . . . . . 10
⊢ (𝑐 ∈ ℤ → (𝑐↑2) ∈
ℕ0) |
9 | 8 | ad2antrl 487 |
. . . . . . . . 9
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) → (𝑐↑2) ∈
ℕ0) |
10 | | zsqcl2 10553 |
. . . . . . . . . 10
⊢ (𝑑 ∈ ℤ → (𝑑↑2) ∈
ℕ0) |
11 | 10 | ad2antll 488 |
. . . . . . . . 9
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) → (𝑑↑2) ∈
ℕ0) |
12 | 9, 11 | nn0addcld 9192 |
. . . . . . . 8
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) → ((𝑐↑2) + (𝑑↑2)) ∈
ℕ0) |
13 | 7, 12 | nn0addcld 9192 |
. . . . . . 7
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) →
(((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ∈
ℕ0) |
14 | | eleq1 2233 |
. . . . . . 7
⊢ (𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → (𝐴 ∈ ℕ0 ↔ (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ∈
ℕ0)) |
15 | 13, 14 | syl5ibrcom 156 |
. . . . . 6
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) → (𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → 𝐴 ∈
ℕ0)) |
16 | | elex 2741 |
. . . . . 6
⊢ (𝐴 ∈ ℕ0
→ 𝐴 ∈
V) |
17 | 15, 16 | syl6 33 |
. . . . 5
⊢ (((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) ∧ (𝑐 ∈ ℤ ∧ 𝑑 ∈ ℤ)) → (𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → 𝐴 ∈ V)) |
18 | 17 | rexlimdvva 2595 |
. . . 4
⊢ ((𝑎 ∈ ℤ ∧ 𝑏 ∈ ℤ) →
(∃𝑐 ∈ ℤ
∃𝑑 ∈ ℤ
𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → 𝐴 ∈ V)) |
19 | 18 | rexlimivv 2593 |
. . 3
⊢
(∃𝑎 ∈
ℤ ∃𝑏 ∈
ℤ ∃𝑐 ∈
ℤ ∃𝑑 ∈
ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) → 𝐴 ∈ V) |
20 | | oveq1 5860 |
. . . . . . . . 9
⊢ (𝑥 = 𝑎 → (𝑥↑2) = (𝑎↑2)) |
21 | 20 | oveq1d 5868 |
. . . . . . . 8
⊢ (𝑥 = 𝑎 → ((𝑥↑2) + (𝑦↑2)) = ((𝑎↑2) + (𝑦↑2))) |
22 | 21 | oveq1d 5868 |
. . . . . . 7
⊢ (𝑥 = 𝑎 → (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) = (((𝑎↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))) |
23 | 22 | eqeq2d 2182 |
. . . . . 6
⊢ (𝑥 = 𝑎 → (𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ 𝑛 = (((𝑎↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))))) |
24 | 23 | 2rexbidv 2495 |
. . . . 5
⊢ (𝑥 = 𝑎 → (∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))))) |
25 | | oveq1 5860 |
. . . . . . . . 9
⊢ (𝑦 = 𝑏 → (𝑦↑2) = (𝑏↑2)) |
26 | 25 | oveq2d 5869 |
. . . . . . . 8
⊢ (𝑦 = 𝑏 → ((𝑎↑2) + (𝑦↑2)) = ((𝑎↑2) + (𝑏↑2))) |
27 | 26 | oveq1d 5868 |
. . . . . . 7
⊢ (𝑦 = 𝑏 → (((𝑎↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2)))) |
28 | 27 | eqeq2d 2182 |
. . . . . 6
⊢ (𝑦 = 𝑏 → (𝑛 = (((𝑎↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))))) |
29 | 28 | 2rexbidv 2495 |
. . . . 5
⊢ (𝑦 = 𝑏 → (∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))))) |
30 | 24, 29 | cbvrex2vw 2708 |
. . . 4
⊢
(∃𝑥 ∈
ℤ ∃𝑦 ∈
ℤ ∃𝑧 ∈
ℤ ∃𝑤 ∈
ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2)))) |
31 | | oveq1 5860 |
. . . . . . . . . 10
⊢ (𝑧 = 𝑐 → (𝑧↑2) = (𝑐↑2)) |
32 | 31 | oveq1d 5868 |
. . . . . . . . 9
⊢ (𝑧 = 𝑐 → ((𝑧↑2) + (𝑤↑2)) = ((𝑐↑2) + (𝑤↑2))) |
33 | 32 | oveq2d 5869 |
. . . . . . . 8
⊢ (𝑧 = 𝑐 → (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑤↑2)))) |
34 | 33 | eqeq2d 2182 |
. . . . . . 7
⊢ (𝑧 = 𝑐 → (𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑤↑2))))) |
35 | | oveq1 5860 |
. . . . . . . . . 10
⊢ (𝑤 = 𝑑 → (𝑤↑2) = (𝑑↑2)) |
36 | 35 | oveq2d 5869 |
. . . . . . . . 9
⊢ (𝑤 = 𝑑 → ((𝑐↑2) + (𝑤↑2)) = ((𝑐↑2) + (𝑑↑2))) |
37 | 36 | oveq2d 5869 |
. . . . . . . 8
⊢ (𝑤 = 𝑑 → (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑤↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))) |
38 | 37 | eqeq2d 2182 |
. . . . . . 7
⊢ (𝑤 = 𝑑 → (𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑤↑2))) ↔ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))) |
39 | 34, 38 | cbvrex2vw 2708 |
. . . . . 6
⊢
(∃𝑧 ∈
ℤ ∃𝑤 ∈
ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))) |
40 | | eqeq1 2177 |
. . . . . . 7
⊢ (𝑛 = 𝐴 → (𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))) |
41 | 40 | 2rexbidv 2495 |
. . . . . 6
⊢ (𝑛 = 𝐴 → (∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))) |
42 | 39, 41 | syl5bb 191 |
. . . . 5
⊢ (𝑛 = 𝐴 → (∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))) |
43 | 42 | 2rexbidv 2495 |
. . . 4
⊢ (𝑛 = 𝐴 → (∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑎↑2) + (𝑏↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))) |
44 | 30, 43 | syl5bb 191 |
. . 3
⊢ (𝑛 = 𝐴 → (∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2))) ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))) |
45 | 19, 44 | elab3 2882 |
. 2
⊢ (𝐴 ∈ {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))} ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))) |
46 | 2, 45 | bitri 183 |
1
⊢ (𝐴 ∈ 𝑆 ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))) |