Step | Hyp | Ref
| Expression |
1 | | inss1 4162 |
. . . . . . . . . . 11
⊢ (𝐴 ∩ (0..^𝑁)) ⊆ 𝐴 |
2 | | sadasslem.1 |
. . . . . . . . . . 11
⊢ (𝜑 → 𝐴 ⊆
ℕ0) |
3 | 1, 2 | sstrid 3932 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐴 ∩ (0..^𝑁)) ⊆
ℕ0) |
4 | | fzofi 13694 |
. . . . . . . . . . . 12
⊢
(0..^𝑁) ∈
Fin |
5 | 4 | a1i 11 |
. . . . . . . . . . 11
⊢ (𝜑 → (0..^𝑁) ∈ Fin) |
6 | | inss2 4163 |
. . . . . . . . . . 11
⊢ (𝐴 ∩ (0..^𝑁)) ⊆ (0..^𝑁) |
7 | | ssfi 8956 |
. . . . . . . . . . 11
⊢
(((0..^𝑁) ∈ Fin
∧ (𝐴 ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (𝐴 ∩ (0..^𝑁)) ∈ Fin) |
8 | 5, 6, 7 | sylancl 586 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐴 ∩ (0..^𝑁)) ∈ Fin) |
9 | | elfpw 9121 |
. . . . . . . . . 10
⊢ ((𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) ↔ ((𝐴 ∩
(0..^𝑁)) ⊆
ℕ0 ∧ (𝐴 ∩ (0..^𝑁)) ∈ Fin)) |
10 | 3, 8, 9 | sylanbrc 583 |
. . . . . . . . 9
⊢ (𝜑 → (𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin)) |
11 | | bitsf1o 16152 |
. . . . . . . . . . 11
⊢ (bits
↾ ℕ0):ℕ0–1-1-onto→(𝒫 ℕ0 ∩
Fin) |
12 | | f1ocnv 6728 |
. . . . . . . . . . 11
⊢ ((bits
↾ ℕ0):ℕ0–1-1-onto→(𝒫 ℕ0 ∩ Fin)
→ ◡(bits ↾
ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0) |
13 | | f1of 6716 |
. . . . . . . . . . 11
⊢ (◡(bits ↾
ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0 → ◡(bits ↾
ℕ0):(𝒫 ℕ0 ∩
Fin)⟶ℕ0) |
14 | 11, 12, 13 | mp2b 10 |
. . . . . . . . . 10
⊢ ◡(bits ↾
ℕ0):(𝒫 ℕ0 ∩
Fin)⟶ℕ0 |
15 | 14 | ffvelrni 6960 |
. . . . . . . . 9
⊢ ((𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) → (◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) ∈
ℕ0) |
16 | 10, 15 | syl 17 |
. . . . . . . 8
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) ∈
ℕ0) |
17 | 16 | nn0cnd 12295 |
. . . . . . 7
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) ∈ ℂ) |
18 | | inss1 4162 |
. . . . . . . . . . 11
⊢ (𝐵 ∩ (0..^𝑁)) ⊆ 𝐵 |
19 | | sadasslem.2 |
. . . . . . . . . . 11
⊢ (𝜑 → 𝐵 ⊆
ℕ0) |
20 | 18, 19 | sstrid 3932 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐵 ∩ (0..^𝑁)) ⊆
ℕ0) |
21 | | inss2 4163 |
. . . . . . . . . . 11
⊢ (𝐵 ∩ (0..^𝑁)) ⊆ (0..^𝑁) |
22 | | ssfi 8956 |
. . . . . . . . . . 11
⊢
(((0..^𝑁) ∈ Fin
∧ (𝐵 ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (𝐵 ∩ (0..^𝑁)) ∈ Fin) |
23 | 5, 21, 22 | sylancl 586 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐵 ∩ (0..^𝑁)) ∈ Fin) |
24 | | elfpw 9121 |
. . . . . . . . . 10
⊢ ((𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) ↔ ((𝐵 ∩
(0..^𝑁)) ⊆
ℕ0 ∧ (𝐵 ∩ (0..^𝑁)) ∈ Fin)) |
25 | 20, 23, 24 | sylanbrc 583 |
. . . . . . . . 9
⊢ (𝜑 → (𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin)) |
26 | 14 | ffvelrni 6960 |
. . . . . . . . 9
⊢ ((𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) → (◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁))) ∈
ℕ0) |
27 | 25, 26 | syl 17 |
. . . . . . . 8
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁))) ∈
ℕ0) |
28 | 27 | nn0cnd 12295 |
. . . . . . 7
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁))) ∈ ℂ) |
29 | | inss1 4162 |
. . . . . . . . . . 11
⊢ (𝐶 ∩ (0..^𝑁)) ⊆ 𝐶 |
30 | | sadasslem.3 |
. . . . . . . . . . 11
⊢ (𝜑 → 𝐶 ⊆
ℕ0) |
31 | 29, 30 | sstrid 3932 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐶 ∩ (0..^𝑁)) ⊆
ℕ0) |
32 | | inss2 4163 |
. . . . . . . . . . 11
⊢ (𝐶 ∩ (0..^𝑁)) ⊆ (0..^𝑁) |
33 | | ssfi 8956 |
. . . . . . . . . . 11
⊢
(((0..^𝑁) ∈ Fin
∧ (𝐶 ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (𝐶 ∩ (0..^𝑁)) ∈ Fin) |
34 | 5, 32, 33 | sylancl 586 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐶 ∩ (0..^𝑁)) ∈ Fin) |
35 | | elfpw 9121 |
. . . . . . . . . 10
⊢ ((𝐶 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) ↔ ((𝐶 ∩
(0..^𝑁)) ⊆
ℕ0 ∧ (𝐶 ∩ (0..^𝑁)) ∈ Fin)) |
36 | 31, 34, 35 | sylanbrc 583 |
. . . . . . . . 9
⊢ (𝜑 → (𝐶 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin)) |
37 | 14 | ffvelrni 6960 |
. . . . . . . . 9
⊢ ((𝐶 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) → (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁))) ∈
ℕ0) |
38 | 36, 37 | syl 17 |
. . . . . . . 8
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁))) ∈
ℕ0) |
39 | 38 | nn0cnd 12295 |
. . . . . . 7
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁))) ∈ ℂ) |
40 | 17, 28, 39 | addassd 10997 |
. . . . . 6
⊢ (𝜑 → (((◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁)))) + (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁)))) = ((◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁)))))) |
41 | 40 | oveq1d 7290 |
. . . . 5
⊢ (𝜑 → ((((◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁)))) + (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁)) = (((◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁))))) mod (2↑𝑁))) |
42 | | inss1 4162 |
. . . . . . . . . 10
⊢ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ (𝐴 sadd 𝐵) |
43 | | sadcl 16169 |
. . . . . . . . . . 11
⊢ ((𝐴 ⊆ ℕ0
∧ 𝐵 ⊆
ℕ0) → (𝐴 sadd 𝐵) ⊆
ℕ0) |
44 | 2, 19, 43 | syl2anc 584 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐴 sadd 𝐵) ⊆
ℕ0) |
45 | 42, 44 | sstrid 3932 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆
ℕ0) |
46 | | inss2 4163 |
. . . . . . . . . 10
⊢ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ (0..^𝑁) |
47 | | ssfi 8956 |
. . . . . . . . . 10
⊢
(((0..^𝑁) ∈ Fin
∧ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ Fin) |
48 | 5, 46, 47 | sylancl 586 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ Fin) |
49 | | elfpw 9121 |
. . . . . . . . 9
⊢ (((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) ↔ (((𝐴 sadd
𝐵) ∩ (0..^𝑁)) ⊆ ℕ0
∧ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ Fin)) |
50 | 45, 48, 49 | sylanbrc 583 |
. . . . . . . 8
⊢ (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin)) |
51 | 14 | ffvelrni 6960 |
. . . . . . . 8
⊢ (((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) → (◡(bits ↾
ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈
ℕ0) |
52 | 50, 51 | syl 17 |
. . . . . . 7
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈
ℕ0) |
53 | 52 | nn0red 12294 |
. . . . . 6
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ ℝ) |
54 | 16 | nn0red 12294 |
. . . . . . 7
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) ∈ ℝ) |
55 | 27 | nn0red 12294 |
. . . . . . 7
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁))) ∈ ℝ) |
56 | 54, 55 | readdcld 11004 |
. . . . . 6
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁)))) ∈ ℝ) |
57 | 38 | nn0red 12294 |
. . . . . 6
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁))) ∈ ℝ) |
58 | | 2rp 12735 |
. . . . . . . 8
⊢ 2 ∈
ℝ+ |
59 | 58 | a1i 11 |
. . . . . . 7
⊢ (𝜑 → 2 ∈
ℝ+) |
60 | | sadasslem.4 |
. . . . . . . 8
⊢ (𝜑 → 𝑁 ∈
ℕ0) |
61 | 60 | nn0zd 12424 |
. . . . . . 7
⊢ (𝜑 → 𝑁 ∈ ℤ) |
62 | 59, 61 | rpexpcld 13962 |
. . . . . 6
⊢ (𝜑 → (2↑𝑁) ∈
ℝ+) |
63 | | eqid 2738 |
. . . . . . 7
⊢
seq0((𝑐 ∈
2o, 𝑚 ∈
ℕ0 ↦ if(cadd(𝑚 ∈ 𝐴, 𝑚 ∈ 𝐵, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0
↦ if(𝑛 = 0, ∅,
(𝑛 − 1)))) =
seq0((𝑐 ∈
2o, 𝑚 ∈
ℕ0 ↦ if(cadd(𝑚 ∈ 𝐴, 𝑚 ∈ 𝐵, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0
↦ if(𝑛 = 0, ∅,
(𝑛 −
1)))) |
64 | | eqid 2738 |
. . . . . . 7
⊢ ◡(bits ↾ ℕ0) = ◡(bits ↾
ℕ0) |
65 | 2, 19, 63, 60, 64 | sadadd3 16168 |
. . . . . 6
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) mod (2↑𝑁)) = (((◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁)))) mod (2↑𝑁))) |
66 | | eqidd 2739 |
. . . . . 6
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁))) mod (2↑𝑁)) = ((◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁))) mod (2↑𝑁))) |
67 | 53, 56, 57, 57, 62, 65, 66 | modadd12d 13647 |
. . . . 5
⊢ (𝜑 → (((◡(bits ↾
ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁)) = ((((◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁)))) + (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁))) |
68 | | inss1 4162 |
. . . . . . . . . 10
⊢ ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆ (𝐵 sadd 𝐶) |
69 | | sadcl 16169 |
. . . . . . . . . . 11
⊢ ((𝐵 ⊆ ℕ0
∧ 𝐶 ⊆
ℕ0) → (𝐵 sadd 𝐶) ⊆
ℕ0) |
70 | 19, 30, 69 | syl2anc 584 |
. . . . . . . . . 10
⊢ (𝜑 → (𝐵 sadd 𝐶) ⊆
ℕ0) |
71 | 68, 70 | sstrid 3932 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆
ℕ0) |
72 | | inss2 4163 |
. . . . . . . . . 10
⊢ ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆ (0..^𝑁) |
73 | | ssfi 8956 |
. . . . . . . . . 10
⊢
(((0..^𝑁) ∈ Fin
∧ ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin) |
74 | 5, 72, 73 | sylancl 586 |
. . . . . . . . 9
⊢ (𝜑 → ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin) |
75 | | elfpw 9121 |
. . . . . . . . 9
⊢ (((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) ↔ (((𝐵 sadd
𝐶) ∩ (0..^𝑁)) ⊆ ℕ0
∧ ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin)) |
76 | 71, 74, 75 | sylanbrc 583 |
. . . . . . . 8
⊢ (𝜑 → ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin)) |
77 | 14 | ffvelrni 6960 |
. . . . . . . 8
⊢ (((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) → (◡(bits ↾
ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁))) ∈
ℕ0) |
78 | 76, 77 | syl 17 |
. . . . . . 7
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁))) ∈
ℕ0) |
79 | 78 | nn0red 12294 |
. . . . . 6
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁))) ∈ ℝ) |
80 | 55, 57 | readdcld 11004 |
. . . . . 6
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁)))) ∈ ℝ) |
81 | | eqidd 2739 |
. . . . . 6
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) mod (2↑𝑁)) = ((◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) mod (2↑𝑁))) |
82 | | eqid 2738 |
. . . . . . 7
⊢
seq0((𝑐 ∈
2o, 𝑚 ∈
ℕ0 ↦ if(cadd(𝑚 ∈ 𝐵, 𝑚 ∈ 𝐶, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0
↦ if(𝑛 = 0, ∅,
(𝑛 − 1)))) =
seq0((𝑐 ∈
2o, 𝑚 ∈
ℕ0 ↦ if(cadd(𝑚 ∈ 𝐵, 𝑚 ∈ 𝐶, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0
↦ if(𝑛 = 0, ∅,
(𝑛 −
1)))) |
83 | 19, 30, 82, 60, 64 | sadadd3 16168 |
. . . . . 6
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁))) mod (2↑𝑁)) = (((◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁))) |
84 | 54, 54, 79, 80, 62, 81, 83 | modadd12d 13647 |
. . . . 5
⊢ (𝜑 → (((◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁)))) mod (2↑𝑁)) = (((◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((◡(bits ↾
ℕ0)‘(𝐵 ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁))))) mod (2↑𝑁))) |
85 | 41, 67, 84 | 3eqtr4d 2788 |
. . . 4
⊢ (𝜑 → (((◡(bits ↾
ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁)) = (((◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁)))) mod (2↑𝑁))) |
86 | | eqid 2738 |
. . . . 5
⊢
seq0((𝑐 ∈
2o, 𝑚 ∈
ℕ0 ↦ if(cadd(𝑚 ∈ (𝐴 sadd 𝐵), 𝑚 ∈ 𝐶, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0
↦ if(𝑛 = 0, ∅,
(𝑛 − 1)))) =
seq0((𝑐 ∈
2o, 𝑚 ∈
ℕ0 ↦ if(cadd(𝑚 ∈ (𝐴 sadd 𝐵), 𝑚 ∈ 𝐶, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0
↦ if(𝑛 = 0, ∅,
(𝑛 −
1)))) |
87 | 44, 30, 86, 60, 64 | sadadd3 16168 |
. . . 4
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) mod (2↑𝑁)) = (((◡(bits ↾
ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁))) |
88 | | eqid 2738 |
. . . . 5
⊢
seq0((𝑐 ∈
2o, 𝑚 ∈
ℕ0 ↦ if(cadd(𝑚 ∈ 𝐴, 𝑚 ∈ (𝐵 sadd 𝐶), ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0
↦ if(𝑛 = 0, ∅,
(𝑛 − 1)))) =
seq0((𝑐 ∈
2o, 𝑚 ∈
ℕ0 ↦ if(cadd(𝑚 ∈ 𝐴, 𝑚 ∈ (𝐵 sadd 𝐶), ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0
↦ if(𝑛 = 0, ∅,
(𝑛 −
1)))) |
89 | 2, 70, 88, 60, 64 | sadadd3 16168 |
. . . 4
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) mod (2↑𝑁)) = (((◡(bits ↾
ℕ0)‘(𝐴 ∩ (0..^𝑁))) + (◡(bits ↾
ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁)))) mod (2↑𝑁))) |
90 | 85, 87, 89 | 3eqtr4d 2788 |
. . 3
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) mod (2↑𝑁))) |
91 | | inss1 4162 |
. . . . . . . 8
⊢ (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ ((𝐴 sadd 𝐵) sadd 𝐶) |
92 | | sadcl 16169 |
. . . . . . . . 9
⊢ (((𝐴 sadd 𝐵) ⊆ ℕ0 ∧ 𝐶 ⊆ ℕ0)
→ ((𝐴 sadd 𝐵) sadd 𝐶) ⊆
ℕ0) |
93 | 44, 30, 92 | syl2anc 584 |
. . . . . . . 8
⊢ (𝜑 → ((𝐴 sadd 𝐵) sadd 𝐶) ⊆
ℕ0) |
94 | 91, 93 | sstrid 3932 |
. . . . . . 7
⊢ (𝜑 → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆
ℕ0) |
95 | | inss2 4163 |
. . . . . . . 8
⊢ (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ (0..^𝑁) |
96 | | ssfi 8956 |
. . . . . . . 8
⊢
(((0..^𝑁) ∈ Fin
∧ (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin) |
97 | 5, 95, 96 | sylancl 586 |
. . . . . . 7
⊢ (𝜑 → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin) |
98 | | elfpw 9121 |
. . . . . . 7
⊢ ((((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) ↔ ((((𝐴
sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ ℕ0 ∧
(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin)) |
99 | 94, 97, 98 | sylanbrc 583 |
. . . . . 6
⊢ (𝜑 → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin)) |
100 | 14 | ffvelrni 6960 |
. . . . . 6
⊢ ((((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) → (◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈
ℕ0) |
101 | 99, 100 | syl 17 |
. . . . 5
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈
ℕ0) |
102 | 101 | nn0red 12294 |
. . . 4
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℝ) |
103 | 101 | nn0ge0d 12296 |
. . . 4
⊢ (𝜑 → 0 ≤ (◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) |
104 | 101 | fvresd 6794 |
. . . . . . . 8
⊢ (𝜑 → ((bits ↾
ℕ0)‘(◡(bits
↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) = (bits‘(◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))))) |
105 | | f1ocnvfv2 7149 |
. . . . . . . . 9
⊢ (((bits
↾ ℕ0):ℕ0–1-1-onto→(𝒫 ℕ0 ∩ Fin)
∧ (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin)) → ((bits ↾ ℕ0)‘(◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) = (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) |
106 | 11, 99, 105 | sylancr 587 |
. . . . . . . 8
⊢ (𝜑 → ((bits ↾
ℕ0)‘(◡(bits
↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) = (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) |
107 | 104, 106 | eqtr3d 2780 |
. . . . . . 7
⊢ (𝜑 → (bits‘(◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) = (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) |
108 | 107, 95 | eqsstrdi 3975 |
. . . . . 6
⊢ (𝜑 → (bits‘(◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)) |
109 | 101 | nn0zd 12424 |
. . . . . . 7
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℤ) |
110 | | bitsfzo 16142 |
. . . . . . 7
⊢ (((◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℤ ∧ 𝑁 ∈ ℕ0) → ((◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘(◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) ⊆ (0..^𝑁))) |
111 | 109, 60, 110 | syl2anc 584 |
. . . . . 6
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘(◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) ⊆ (0..^𝑁))) |
112 | 108, 111 | mpbird 256 |
. . . . 5
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁))) |
113 | | elfzolt2 13396 |
. . . . 5
⊢ ((◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) → (◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) < (2↑𝑁)) |
114 | 112, 113 | syl 17 |
. . . 4
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) < (2↑𝑁)) |
115 | | modid 13616 |
. . . 4
⊢ ((((◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℝ ∧ (2↑𝑁) ∈ ℝ+)
∧ (0 ≤ (◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∧ (◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) < (2↑𝑁))) → ((◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) mod (2↑𝑁)) = (◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) |
116 | 102, 62, 103, 114, 115 | syl22anc 836 |
. . 3
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) mod (2↑𝑁)) = (◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) |
117 | | inss1 4162 |
. . . . . . . 8
⊢ ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ (𝐴 sadd (𝐵 sadd 𝐶)) |
118 | | sadcl 16169 |
. . . . . . . . 9
⊢ ((𝐴 ⊆ ℕ0
∧ (𝐵 sadd 𝐶) ⊆ ℕ0)
→ (𝐴 sadd (𝐵 sadd 𝐶)) ⊆
ℕ0) |
119 | 2, 70, 118 | syl2anc 584 |
. . . . . . . 8
⊢ (𝜑 → (𝐴 sadd (𝐵 sadd 𝐶)) ⊆
ℕ0) |
120 | 117, 119 | sstrid 3932 |
. . . . . . 7
⊢ (𝜑 → ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆
ℕ0) |
121 | | inss2 4163 |
. . . . . . . 8
⊢ ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ (0..^𝑁) |
122 | | ssfi 8956 |
. . . . . . . 8
⊢
(((0..^𝑁) ∈ Fin
∧ ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ Fin) |
123 | 5, 121, 122 | sylancl 586 |
. . . . . . 7
⊢ (𝜑 → ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ Fin) |
124 | | elfpw 9121 |
. . . . . . 7
⊢ (((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) ↔ (((𝐴 sadd
(𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ ℕ0 ∧ ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ Fin)) |
125 | 120, 123,
124 | sylanbrc 583 |
. . . . . 6
⊢ (𝜑 → ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin)) |
126 | 14 | ffvelrni 6960 |
. . . . . 6
⊢ (((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) → (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈
ℕ0) |
127 | 125, 126 | syl 17 |
. . . . 5
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈
ℕ0) |
128 | 127 | nn0red 12294 |
. . . 4
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℝ) |
129 | | 2nn 12046 |
. . . . . . 7
⊢ 2 ∈
ℕ |
130 | 129 | a1i 11 |
. . . . . 6
⊢ (𝜑 → 2 ∈
ℕ) |
131 | 130, 60 | nnexpcld 13960 |
. . . . 5
⊢ (𝜑 → (2↑𝑁) ∈ ℕ) |
132 | 131 | nnrpd 12770 |
. . . 4
⊢ (𝜑 → (2↑𝑁) ∈
ℝ+) |
133 | 127 | nn0ge0d 12296 |
. . . 4
⊢ (𝜑 → 0 ≤ (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) |
134 | 127 | fvresd 6794 |
. . . . . . . 8
⊢ (𝜑 → ((bits ↾
ℕ0)‘(◡(bits
↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) = (bits‘(◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))))) |
135 | | f1ocnvfv2 7149 |
. . . . . . . . 9
⊢ (((bits
↾ ℕ0):ℕ0–1-1-onto→(𝒫 ℕ0 ∩ Fin)
∧ ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin)) → ((bits ↾ ℕ0)‘(◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) |
136 | 11, 125, 135 | sylancr 587 |
. . . . . . . 8
⊢ (𝜑 → ((bits ↾
ℕ0)‘(◡(bits
↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) |
137 | 134, 136 | eqtr3d 2780 |
. . . . . . 7
⊢ (𝜑 → (bits‘(◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) |
138 | 137, 121 | eqsstrdi 3975 |
. . . . . 6
⊢ (𝜑 → (bits‘(◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)) |
139 | 127 | nn0zd 12424 |
. . . . . . 7
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℤ) |
140 | | bitsfzo 16142 |
. . . . . . 7
⊢ (((◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℤ ∧ 𝑁 ∈ ℕ0) → ((◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘(◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) ⊆ (0..^𝑁))) |
141 | 139, 60, 140 | syl2anc 584 |
. . . . . 6
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘(◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) ⊆ (0..^𝑁))) |
142 | 138, 141 | mpbird 256 |
. . . . 5
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁))) |
143 | | elfzolt2 13396 |
. . . . 5
⊢ ((◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) → (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) < (2↑𝑁)) |
144 | 142, 143 | syl 17 |
. . . 4
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) < (2↑𝑁)) |
145 | | modid 13616 |
. . . 4
⊢ ((((◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℝ ∧ (2↑𝑁) ∈ ℝ+)
∧ (0 ≤ (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∧ (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) < (2↑𝑁))) → ((◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) mod (2↑𝑁)) = (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) |
146 | 128, 132,
133, 144, 145 | syl22anc 836 |
. . 3
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) mod (2↑𝑁)) = (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) |
147 | 90, 116, 146 | 3eqtr3d 2786 |
. 2
⊢ (𝜑 → (◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) = (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) |
148 | | f1of1 6715 |
. . . . 5
⊢ (◡(bits ↾
ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0 → ◡(bits ↾
ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1→ℕ0) |
149 | 11, 12, 148 | mp2b 10 |
. . . 4
⊢ ◡(bits ↾
ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1→ℕ0 |
150 | | f1fveq 7135 |
. . . 4
⊢ ((◡(bits ↾
ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1→ℕ0 ∧ ((((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) ∧ ((𝐴 sadd
(𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin))) → ((◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) = (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ↔ (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) |
151 | 149, 150 | mpan 687 |
. . 3
⊢
(((((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin) ∧ ((𝐴 sadd
(𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0
∩ Fin)) → ((◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) = (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ↔ (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) |
152 | 99, 125, 151 | syl2anc 584 |
. 2
⊢ (𝜑 → ((◡(bits ↾
ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) = (◡(bits ↾
ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ↔ (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) |
153 | 147, 152 | mpbid 231 |
1
⊢ (𝜑 → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) |