Metamath Proof Explorer < Previous   Next > Nearby theorems Mirrors  >  Home  >  MPE Home  >  Th. List  >  sadasslem Structured version   Visualization version   GIF version

 Description: Lemma for sadass 15810. (Contributed by Mario Carneiro, 9-Sep-2016.)
Hypotheses
Ref Expression
sadasslem.1 (𝜑𝐴 ⊆ ℕ0)
sadasslem.2 (𝜑𝐵 ⊆ ℕ0)
sadasslem.3 (𝜑𝐶 ⊆ ℕ0)
sadasslem.4 (𝜑𝑁 ∈ ℕ0)
Assertion
Ref Expression
sadasslem (𝜑 → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))

Proof of Theorem sadasslem
Dummy variables 𝑐 𝑚 𝑛 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 inss1 4155 . . . . . . . . . . 11 (𝐴 ∩ (0..^𝑁)) ⊆ 𝐴
2 sadasslem.1 . . . . . . . . . . 11 (𝜑𝐴 ⊆ ℕ0)
31, 2sstrid 3926 . . . . . . . . . 10 (𝜑 → (𝐴 ∩ (0..^𝑁)) ⊆ ℕ0)
4 fzofi 13337 . . . . . . . . . . . 12 (0..^𝑁) ∈ Fin
54a1i 11 . . . . . . . . . . 11 (𝜑 → (0..^𝑁) ∈ Fin)
6 inss2 4156 . . . . . . . . . . 11 (𝐴 ∩ (0..^𝑁)) ⊆ (0..^𝑁)
7 ssfi 8722 . . . . . . . . . . 11 (((0..^𝑁) ∈ Fin ∧ (𝐴 ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (𝐴 ∩ (0..^𝑁)) ∈ Fin)
85, 6, 7sylancl 589 . . . . . . . . . 10 (𝜑 → (𝐴 ∩ (0..^𝑁)) ∈ Fin)
9 elfpw 8810 . . . . . . . . . 10 ((𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ ((𝐴 ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (𝐴 ∩ (0..^𝑁)) ∈ Fin))
103, 8, 9sylanbrc 586 . . . . . . . . 9 (𝜑 → (𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
11 bitsf1o 15784 . . . . . . . . . . 11 (bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin)
12 f1ocnv 6602 . . . . . . . . . . 11 ((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) → (bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0)
13 f1of 6590 . . . . . . . . . . 11 ((bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0(bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)⟶ℕ0)
1411, 12, 13mp2b 10 . . . . . . . . . 10 (bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)⟶ℕ0
1514ffvelrni 6827 . . . . . . . . 9 ((𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) ∈ ℕ0)
1610, 15syl 17 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) ∈ ℕ0)
1716nn0cnd 11945 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) ∈ ℂ)
18 inss1 4155 . . . . . . . . . . 11 (𝐵 ∩ (0..^𝑁)) ⊆ 𝐵
19 sadasslem.2 . . . . . . . . . . 11 (𝜑𝐵 ⊆ ℕ0)
2018, 19sstrid 3926 . . . . . . . . . 10 (𝜑 → (𝐵 ∩ (0..^𝑁)) ⊆ ℕ0)
21 inss2 4156 . . . . . . . . . . 11 (𝐵 ∩ (0..^𝑁)) ⊆ (0..^𝑁)
22 ssfi 8722 . . . . . . . . . . 11 (((0..^𝑁) ∈ Fin ∧ (𝐵 ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (𝐵 ∩ (0..^𝑁)) ∈ Fin)
235, 21, 22sylancl 589 . . . . . . . . . 10 (𝜑 → (𝐵 ∩ (0..^𝑁)) ∈ Fin)
24 elfpw 8810 . . . . . . . . . 10 ((𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ ((𝐵 ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (𝐵 ∩ (0..^𝑁)) ∈ Fin))
2520, 23, 24sylanbrc 586 . . . . . . . . 9 (𝜑 → (𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
2614ffvelrni 6827 . . . . . . . . 9 ((𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) ∈ ℕ0)
2725, 26syl 17 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) ∈ ℕ0)
2827nn0cnd 11945 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) ∈ ℂ)
29 inss1 4155 . . . . . . . . . . 11 (𝐶 ∩ (0..^𝑁)) ⊆ 𝐶
30 sadasslem.3 . . . . . . . . . . 11 (𝜑𝐶 ⊆ ℕ0)
3129, 30sstrid 3926 . . . . . . . . . 10 (𝜑 → (𝐶 ∩ (0..^𝑁)) ⊆ ℕ0)
32 inss2 4156 . . . . . . . . . . 11 (𝐶 ∩ (0..^𝑁)) ⊆ (0..^𝑁)
33 ssfi 8722 . . . . . . . . . . 11 (((0..^𝑁) ∈ Fin ∧ (𝐶 ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (𝐶 ∩ (0..^𝑁)) ∈ Fin)
345, 32, 33sylancl 589 . . . . . . . . . 10 (𝜑 → (𝐶 ∩ (0..^𝑁)) ∈ Fin)
35 elfpw 8810 . . . . . . . . . 10 ((𝐶 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ ((𝐶 ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (𝐶 ∩ (0..^𝑁)) ∈ Fin))
3631, 34, 35sylanbrc 586 . . . . . . . . 9 (𝜑 → (𝐶 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
3714ffvelrni 6827 . . . . . . . . 9 ((𝐶 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))) ∈ ℕ0)
3836, 37syl 17 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))) ∈ ℕ0)
3938nn0cnd 11945 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))) ∈ ℂ)
4017, 28, 39addassd 10652 . . . . . 6 (𝜑 → ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) = (((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + (((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))))))
4140oveq1d 7150 . . . . 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 4155 . . . . . . . . . 10 ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ (𝐴 sadd 𝐵)
43 sadcl 15801 . . . . . . . . . . 11 ((𝐴 ⊆ ℕ0𝐵 ⊆ ℕ0) → (𝐴 sadd 𝐵) ⊆ ℕ0)
442, 19, 43syl2anc 587 . . . . . . . . . 10 (𝜑 → (𝐴 sadd 𝐵) ⊆ ℕ0)
4542, 44sstrid 3926 . . . . . . . . 9 (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ ℕ0)
46 inss2 4156 . . . . . . . . . 10 ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ (0..^𝑁)
47 ssfi 8722 . . . . . . . . . 10 (((0..^𝑁) ∈ Fin ∧ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ Fin)
485, 46, 47sylancl 589 . . . . . . . . 9 (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ Fin)
49 elfpw 8810 . . . . . . . . 9 (((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ (((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ ℕ0 ∧ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ Fin))
5045, 48, 49sylanbrc 586 . . . . . . . 8 (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
5114ffvelrni 6827 . . . . . . . 8 (((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ ℕ0)
5250, 51syl 17 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ ℕ0)
5352nn0red 11944 . . . . . 6 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ ℝ)
5416nn0red 11944 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) ∈ ℝ)
5527nn0red 11944 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) ∈ ℝ)
5654, 55readdcld 10659 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) ∈ ℝ)
5738nn0red 11944 . . . . . 6 (𝜑 → ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))) ∈ ℝ)
58 2rp 12382 . . . . . . . 8 2 ∈ ℝ+
5958a1i 11 . . . . . . 7 (𝜑 → 2 ∈ ℝ+)
60 sadasslem.4 . . . . . . . 8 (𝜑𝑁 ∈ ℕ0)
6160nn0zd 12073 . . . . . . 7 (𝜑𝑁 ∈ ℤ)
6259, 61rpexpcld 13604 . . . . . 6 (𝜑 → (2↑𝑁) ∈ ℝ+)
63 eqid 2798 . . . . . . 7 seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚𝐵, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1)))) = seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚𝐵, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
64 eqid 2798 . . . . . . 7 (bits ↾ ℕ0) = (bits ↾ ℕ0)
652, 19, 63, 60, 64sadadd3 15800 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) mod (2↑𝑁)))
66 eqidd 2799 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))) mod (2↑𝑁)) = (((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))) mod (2↑𝑁)))
6753, 56, 57, 57, 62, 65, 66modadd12d 13290 . . . . 5 (𝜑 → ((((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁)) = (((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁)))
68 inss1 4155 . . . . . . . . . 10 ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆ (𝐵 sadd 𝐶)
69 sadcl 15801 . . . . . . . . . . 11 ((𝐵 ⊆ ℕ0𝐶 ⊆ ℕ0) → (𝐵 sadd 𝐶) ⊆ ℕ0)
7019, 30, 69syl2anc 587 . . . . . . . . . 10 (𝜑 → (𝐵 sadd 𝐶) ⊆ ℕ0)
7168, 70sstrid 3926 . . . . . . . . 9 (𝜑 → ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆ ℕ0)
72 inss2 4156 . . . . . . . . . 10 ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆ (0..^𝑁)
73 ssfi 8722 . . . . . . . . . 10 (((0..^𝑁) ∈ Fin ∧ ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin)
745, 72, 73sylancl 589 . . . . . . . . 9 (𝜑 → ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin)
75 elfpw 8810 . . . . . . . . 9 (((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ (((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆ ℕ0 ∧ ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin))
7671, 74, 75sylanbrc 586 . . . . . . . 8 (𝜑 → ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
7714ffvelrni 6827 . . . . . . . 8 (((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁))) ∈ ℕ0)
7876, 77syl 17 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁))) ∈ ℕ0)
7978nn0red 11944 . . . . . 6 (𝜑 → ((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁))) ∈ ℝ)
8055, 57readdcld 10659 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) ∈ ℝ)
81 eqidd 2799 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) mod (2↑𝑁)) = (((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) mod (2↑𝑁)))
82 eqid 2798 . . . . . . 7 seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐵, 𝑚𝐶, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1)))) = seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐵, 𝑚𝐶, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
8319, 30, 82, 60, 64sadadd3 15800 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁)))
8454, 54, 79, 80, 62, 81, 83modadd12d 13290 . . . . 5 (𝜑 → ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁)))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + (((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))))) mod (2↑𝑁)))
8541, 67, 843eqtr4d 2843 . . . 4 (𝜑 → ((((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁)))) mod (2↑𝑁)))
86 eqid 2798 . . . . 5 seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚 ∈ (𝐴 sadd 𝐵), 𝑚𝐶, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1)))) = seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚 ∈ (𝐴 sadd 𝐵), 𝑚𝐶, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
8744, 30, 86, 60, 64sadadd3 15800 . . . 4 (𝜑 → (((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁)))
88 eqid 2798 . . . . 5 seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚 ∈ (𝐵 sadd 𝐶), ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1)))) = seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚 ∈ (𝐵 sadd 𝐶), ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
892, 70, 88, 60, 64sadadd3 15800 . . . 4 (𝜑 → (((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁)))) mod (2↑𝑁)))
9085, 87, 893eqtr4d 2843 . . 3 (𝜑 → (((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) mod (2↑𝑁)) = (((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) mod (2↑𝑁)))
91 inss1 4155 . . . . . . . 8 (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ ((𝐴 sadd 𝐵) sadd 𝐶)
92 sadcl 15801 . . . . . . . . 9 (((𝐴 sadd 𝐵) ⊆ ℕ0𝐶 ⊆ ℕ0) → ((𝐴 sadd 𝐵) sadd 𝐶) ⊆ ℕ0)
9344, 30, 92syl2anc 587 . . . . . . . 8 (𝜑 → ((𝐴 sadd 𝐵) sadd 𝐶) ⊆ ℕ0)
9491, 93sstrid 3926 . . . . . . 7 (𝜑 → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ ℕ0)
95 inss2 4156 . . . . . . . 8 (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ (0..^𝑁)
96 ssfi 8722 . . . . . . . 8 (((0..^𝑁) ∈ Fin ∧ (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin)
975, 95, 96sylancl 589 . . . . . . 7 (𝜑 → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin)
98 elfpw 8810 . . . . . . 7 ((((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ ((((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin))
9994, 97, 98sylanbrc 586 . . . . . 6 (𝜑 → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
10014ffvelrni 6827 . . . . . 6 ((((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℕ0)
10199, 100syl 17 . . . . 5 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℕ0)
102101nn0red 11944 . . . 4 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℝ)
103101nn0ge0d 11946 . . . 4 (𝜑 → 0 ≤ ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))))
104101fvresd 6665 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) = (bits‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))))
105 f1ocnvfv2 7012 . . . . . . . . 9 (((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) ∧ (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin)) → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) = (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))
10611, 99, 105sylancr 590 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) = (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))
107104, 106eqtr3d 2835 . . . . . . 7 (𝜑 → (bits‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) = (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))
108107, 95eqsstrdi 3969 . . . . . 6 (𝜑 → (bits‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) ⊆ (0..^𝑁))
109101nn0zd 12073 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℤ)
110 bitsfzo 15774 . . . . . . 7 ((((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℤ ∧ 𝑁 ∈ ℕ0) → (((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
111109, 60, 110syl2anc 587 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
112108, 111mpbird 260 . . . . 5 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)))
113 elfzolt2 13042 . . . . 5 (((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) < (2↑𝑁))
114112, 113syl 17 . . . 4 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) < (2↑𝑁))
115 modid 13259 . . . 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..^𝑁))))
116102, 62, 103, 114, 115syl22anc 837 . . 3 (𝜑 → (((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))))
117 inss1 4155 . . . . . . . 8 ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ (𝐴 sadd (𝐵 sadd 𝐶))
118 sadcl 15801 . . . . . . . . 9 ((𝐴 ⊆ ℕ0 ∧ (𝐵 sadd 𝐶) ⊆ ℕ0) → (𝐴 sadd (𝐵 sadd 𝐶)) ⊆ ℕ0)
1192, 70, 118syl2anc 587 . . . . . . . 8 (𝜑 → (𝐴 sadd (𝐵 sadd 𝐶)) ⊆ ℕ0)
120117, 119sstrid 3926 . . . . . . 7 (𝜑 → ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ ℕ0)
121 inss2 4156 . . . . . . . 8 ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ (0..^𝑁)
122 ssfi 8722 . . . . . . . 8 (((0..^𝑁) ∈ Fin ∧ ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ Fin)
1235, 121, 122sylancl 589 . . . . . . 7 (𝜑 → ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ Fin)
124 elfpw 8810 . . . . . . 7 (((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ (((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ ℕ0 ∧ ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ Fin))
125120, 123, 124sylanbrc 586 . . . . . 6 (𝜑 → ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
12614ffvelrni 6827 . . . . . 6 (((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℕ0)
127125, 126syl 17 . . . . 5 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℕ0)
128127nn0red 11944 . . . 4 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℝ)
129 2nn 11698 . . . . . . 7 2 ∈ ℕ
130129a1i 11 . . . . . 6 (𝜑 → 2 ∈ ℕ)
131130, 60nnexpcld 13602 . . . . 5 (𝜑 → (2↑𝑁) ∈ ℕ)
132131nnrpd 12417 . . . 4 (𝜑 → (2↑𝑁) ∈ ℝ+)
133127nn0ge0d 11946 . . . 4 (𝜑 → 0 ≤ ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))))
134127fvresd 6665 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) = (bits‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))))
135 f1ocnvfv2 7012 . . . . . . . . 9 (((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) ∧ ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin)) → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))
13611, 125, 135sylancr 590 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))
137134, 136eqtr3d 2835 . . . . . . 7 (𝜑 → (bits‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))
138137, 121eqsstrdi 3969 . . . . . 6 (𝜑 → (bits‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) ⊆ (0..^𝑁))
139127nn0zd 12073 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℤ)
140 bitsfzo 15774 . . . . . . 7 ((((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℤ ∧ 𝑁 ∈ ℕ0) → (((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
141139, 60, 140syl2anc 587 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
142138, 141mpbird 260 . . . . 5 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)))
143 elfzolt2 13042 . . . . 5 (((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) < (2↑𝑁))
144142, 143syl 17 . . . 4 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) < (2↑𝑁))
145 modid 13259 . . . 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..^𝑁))))
146128, 132, 133, 144, 145syl22anc 837 . . 3 (𝜑 → (((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))))
14790, 116, 1463eqtr3d 2841 . 2 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) = ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))))
148 f1of1 6589 . . . . 5 ((bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0(bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1→ℕ0)
14911, 12, 148mp2b 10 . . . 4 (bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1→ℕ0