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

 Description: Lemma for sadass 15031. (Contributed by Mario Carneiro, 9-Sep-2016.)
Hypotheses
Ref Expression
Assertion
Ref Expression

Dummy variables 𝑐 𝑚 𝑛 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 inss1 3795 . . . . . . . . . . 11 (𝐴 ∩ (0..^𝑁)) ⊆ 𝐴
2 sadasslem.1 . . . . . . . . . . 11 (𝜑𝐴 ⊆ ℕ0)
31, 2syl5ss 3579 . . . . . . . . . 10 (𝜑 → (𝐴 ∩ (0..^𝑁)) ⊆ ℕ0)
4 fzofi 12635 . . . . . . . . . . . 12 (0..^𝑁) ∈ Fin
54a1i 11 . . . . . . . . . . 11 (𝜑 → (0..^𝑁) ∈ Fin)
6 inss2 3796 . . . . . . . . . . 11 (𝐴 ∩ (0..^𝑁)) ⊆ (0..^𝑁)
7 ssfi 8065 . . . . . . . . . . 11 (((0..^𝑁) ∈ Fin ∧ (𝐴 ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (𝐴 ∩ (0..^𝑁)) ∈ Fin)
85, 6, 7sylancl 693 . . . . . . . . . 10 (𝜑 → (𝐴 ∩ (0..^𝑁)) ∈ Fin)
9 elfpw 8151 . . . . . . . . . 10 ((𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ ((𝐴 ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (𝐴 ∩ (0..^𝑁)) ∈ Fin))
103, 8, 9sylanbrc 695 . . . . . . . . 9 (𝜑 → (𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
11 bitsf1o 15005 . . . . . . . . . . 11 (bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin)
12 f1ocnv 6062 . . . . . . . . . . 11 ((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) → (bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0)
13 f1of 6050 . . . . . . . . . . 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 6266 . . . . . . . . 9 ((𝐴 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) ∈ ℕ0)
1610, 15syl 17 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) ∈ ℕ0)
1716nn0cnd 11230 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) ∈ ℂ)
18 inss1 3795 . . . . . . . . . . 11 (𝐵 ∩ (0..^𝑁)) ⊆ 𝐵
19 sadasslem.2 . . . . . . . . . . 11 (𝜑𝐵 ⊆ ℕ0)
2018, 19syl5ss 3579 . . . . . . . . . 10 (𝜑 → (𝐵 ∩ (0..^𝑁)) ⊆ ℕ0)
21 inss2 3796 . . . . . . . . . . 11 (𝐵 ∩ (0..^𝑁)) ⊆ (0..^𝑁)
22 ssfi 8065 . . . . . . . . . . 11 (((0..^𝑁) ∈ Fin ∧ (𝐵 ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (𝐵 ∩ (0..^𝑁)) ∈ Fin)
235, 21, 22sylancl 693 . . . . . . . . . 10 (𝜑 → (𝐵 ∩ (0..^𝑁)) ∈ Fin)
24 elfpw 8151 . . . . . . . . . 10 ((𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ ((𝐵 ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (𝐵 ∩ (0..^𝑁)) ∈ Fin))
2520, 23, 24sylanbrc 695 . . . . . . . . 9 (𝜑 → (𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
2614ffvelrni 6266 . . . . . . . . 9 ((𝐵 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) ∈ ℕ0)
2725, 26syl 17 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) ∈ ℕ0)
2827nn0cnd 11230 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) ∈ ℂ)
29 inss1 3795 . . . . . . . . . . 11 (𝐶 ∩ (0..^𝑁)) ⊆ 𝐶
30 sadasslem.3 . . . . . . . . . . 11 (𝜑𝐶 ⊆ ℕ0)
3129, 30syl5ss 3579 . . . . . . . . . 10 (𝜑 → (𝐶 ∩ (0..^𝑁)) ⊆ ℕ0)
32 inss2 3796 . . . . . . . . . . 11 (𝐶 ∩ (0..^𝑁)) ⊆ (0..^𝑁)
33 ssfi 8065 . . . . . . . . . . 11 (((0..^𝑁) ∈ Fin ∧ (𝐶 ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (𝐶 ∩ (0..^𝑁)) ∈ Fin)
345, 32, 33sylancl 693 . . . . . . . . . 10 (𝜑 → (𝐶 ∩ (0..^𝑁)) ∈ Fin)
35 elfpw 8151 . . . . . . . . . 10 ((𝐶 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ ((𝐶 ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (𝐶 ∩ (0..^𝑁)) ∈ Fin))
3631, 34, 35sylanbrc 695 . . . . . . . . 9 (𝜑 → (𝐶 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
3714ffvelrni 6266 . . . . . . . . 9 ((𝐶 ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))) ∈ ℕ0)
3836, 37syl 17 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))) ∈ ℕ0)
3938nn0cnd 11230 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))) ∈ ℂ)
4017, 28, 39addassd 9941 . . . . . 6 (𝜑 → ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) = (((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + (((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))))))
4140oveq1d 6564 . . . . 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 3795 . . . . . . . . . 10 ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ (𝐴 sadd 𝐵)
43 sadcl 15022 . . . . . . . . . . 11 ((𝐴 ⊆ ℕ0𝐵 ⊆ ℕ0) → (𝐴 sadd 𝐵) ⊆ ℕ0)
442, 19, 43syl2anc 691 . . . . . . . . . 10 (𝜑 → (𝐴 sadd 𝐵) ⊆ ℕ0)
4542, 44syl5ss 3579 . . . . . . . . 9 (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ ℕ0)
46 inss2 3796 . . . . . . . . . 10 ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ (0..^𝑁)
47 ssfi 8065 . . . . . . . . . 10 (((0..^𝑁) ∈ Fin ∧ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ Fin)
485, 46, 47sylancl 693 . . . . . . . . 9 (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ Fin)
49 elfpw 8151 . . . . . . . . 9 (((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ (((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ ℕ0 ∧ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ Fin))
5045, 48, 49sylanbrc 695 . . . . . . . 8 (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
5114ffvelrni 6266 . . . . . . . 8 (((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ ℕ0)
5250, 51syl 17 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ ℕ0)
5352nn0red 11229 . . . . . 6 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ ℝ)
5416nn0red 11229 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) ∈ ℝ)
5527nn0red 11229 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) ∈ ℝ)
5654, 55readdcld 9948 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) ∈ ℝ)
5738nn0red 11229 . . . . . 6 (𝜑 → ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))) ∈ ℝ)
58 2rp 11713 . . . . . . . 8 2 ∈ ℝ+
5958a1i 11 . . . . . . 7 (𝜑 → 2 ∈ ℝ+)
60 sadasslem.4 . . . . . . . 8 (𝜑𝑁 ∈ ℕ0)
6160nn0zd 11356 . . . . . . 7 (𝜑𝑁 ∈ ℤ)
6259, 61rpexpcld 12894 . . . . . 6 (𝜑 → (2↑𝑁) ∈ ℝ+)
63 eqid 2610 . . . . . . 7 seq0((𝑐 ∈ 2𝑜, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚𝐵, ∅ ∈ 𝑐), 1𝑜, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1)))) = seq0((𝑐 ∈ 2𝑜, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚𝐵, ∅ ∈ 𝑐), 1𝑜, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
64 eqid 2610 . . . . . . 7 (bits ↾ ℕ0) = (bits ↾ ℕ0)
652, 19, 63, 60, 64sadadd3 15021 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) mod (2↑𝑁)))
66 eqidd 2611 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))) mod (2↑𝑁)) = (((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))) mod (2↑𝑁)))
6753, 56, 57, 57, 62, 65, 66modadd12d 12588 . . . . 5 (𝜑 → ((((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁)) = (((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁)))
68 inss1 3795 . . . . . . . . . 10 ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆ (𝐵 sadd 𝐶)
69 sadcl 15022 . . . . . . . . . . 11 ((𝐵 ⊆ ℕ0𝐶 ⊆ ℕ0) → (𝐵 sadd 𝐶) ⊆ ℕ0)
7019, 30, 69syl2anc 691 . . . . . . . . . 10 (𝜑 → (𝐵 sadd 𝐶) ⊆ ℕ0)
7168, 70syl5ss 3579 . . . . . . . . 9 (𝜑 → ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆ ℕ0)
72 inss2 3796 . . . . . . . . . 10 ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆ (0..^𝑁)
73 ssfi 8065 . . . . . . . . . 10 (((0..^𝑁) ∈ Fin ∧ ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin)
745, 72, 73sylancl 693 . . . . . . . . 9 (𝜑 → ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin)
75 elfpw 8151 . . . . . . . . 9 (((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ (((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ⊆ ℕ0 ∧ ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin))
7671, 74, 75sylanbrc 695 . . . . . . . 8 (𝜑 → ((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
7714ffvelrni 6266 . . . . . . . 8 (((𝐵 sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁))) ∈ ℕ0)
7876, 77syl 17 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁))) ∈ ℕ0)
7978nn0red 11229 . . . . . 6 (𝜑 → ((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁))) ∈ ℝ)
8055, 57readdcld 9948 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) ∈ ℝ)
81 eqidd 2611 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) mod (2↑𝑁)) = (((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) mod (2↑𝑁)))
82 eqid 2610 . . . . . . 7 seq0((𝑐 ∈ 2𝑜, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐵, 𝑚𝐶, ∅ ∈ 𝑐), 1𝑜, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1)))) = seq0((𝑐 ∈ 2𝑜, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐵, 𝑚𝐶, ∅ ∈ 𝑐), 1𝑜, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
8319, 30, 82, 60, 64sadadd3 15021 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁)))
8454, 54, 79, 80, 62, 81, 83modadd12d 12588 . . . . 5 (𝜑 → ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁)))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + (((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁))))) mod (2↑𝑁)))
8541, 67, 843eqtr4d 2654 . . . 4 (𝜑 → ((((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁)))) mod (2↑𝑁)))
86 eqid 2610 . . . . 5 seq0((𝑐 ∈ 2𝑜, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚 ∈ (𝐴 sadd 𝐵), 𝑚𝐶, ∅ ∈ 𝑐), 1𝑜, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1)))) = seq0((𝑐 ∈ 2𝑜, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚 ∈ (𝐴 sadd 𝐵), 𝑚𝐶, ∅ ∈ 𝑐), 1𝑜, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
8744, 30, 86, 60, 64sadadd3 15021 . . . 4 (𝜑 → (((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐶 ∩ (0..^𝑁)))) mod (2↑𝑁)))
88 eqid 2610 . . . . 5 seq0((𝑐 ∈ 2𝑜, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚 ∈ (𝐵 sadd 𝐶), ∅ ∈ 𝑐), 1𝑜, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1)))) = seq0((𝑐 ∈ 2𝑜, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚 ∈ (𝐵 sadd 𝐶), ∅ ∈ 𝑐), 1𝑜, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
892, 70, 88, 60, 64sadadd3 15021 . . . 4 (𝜑 → (((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘((𝐵 sadd 𝐶) ∩ (0..^𝑁)))) mod (2↑𝑁)))
9085, 87, 893eqtr4d 2654 . . 3 (𝜑 → (((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) mod (2↑𝑁)) = (((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) mod (2↑𝑁)))
91 inss1 3795 . . . . . . . 8 (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ ((𝐴 sadd 𝐵) sadd 𝐶)
92 sadcl 15022 . . . . . . . . 9 (((𝐴 sadd 𝐵) ⊆ ℕ0𝐶 ⊆ ℕ0) → ((𝐴 sadd 𝐵) sadd 𝐶) ⊆ ℕ0)
9344, 30, 92syl2anc 691 . . . . . . . 8 (𝜑 → ((𝐴 sadd 𝐵) sadd 𝐶) ⊆ ℕ0)
9491, 93syl5ss 3579 . . . . . . 7 (𝜑 → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ ℕ0)
95 inss2 3796 . . . . . . . 8 (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ (0..^𝑁)
96 ssfi 8065 . . . . . . . 8 (((0..^𝑁) ∈ Fin ∧ (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin)
975, 95, 96sylancl 693 . . . . . . 7 (𝜑 → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin)
98 elfpw 8151 . . . . . . 7 ((((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ ((((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ Fin))
9994, 97, 98sylanbrc 695 . . . . . 6 (𝜑 → (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
10014ffvelrni 6266 . . . . . 6 ((((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℕ0)
10199, 100syl 17 . . . . 5 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℕ0)
102101nn0red 11229 . . . 4 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℝ)
103101nn0ge0d 11231 . . . 4 (𝜑 → 0 ≤ ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))))
104 fvres 6117 . . . . . . . . 9 (((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℕ0 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) = (bits‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))))
105101, 104syl 17 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) = (bits‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))))
106 f1ocnvfv2 6433 . . . . . . . . 9 (((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) ∧ (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin)) → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) = (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))
10711, 99, 106sylancr 694 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) = (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))
108105, 107eqtr3d 2646 . . . . . . 7 (𝜑 → (bits‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) = (((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))
109108, 95syl6eqss 3618 . . . . . 6 (𝜑 → (bits‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) ⊆ (0..^𝑁))
110101nn0zd 11356 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℤ)
111 bitsfzo 14995 . . . . . . 7 ((((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ ℤ ∧ 𝑁 ∈ ℕ0) → (((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
112110, 60, 111syl2anc 691 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
113109, 112mpbird 246 . . . . 5 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)))
114 elfzolt2 12348 . . . . 5 (((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) < (2↑𝑁))
115113, 114syl 17 . . . 4 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) < (2↑𝑁))
116 modid 12557 . . . 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..^𝑁))))
117102, 62, 103, 115, 116syl22anc 1319 . . 3 (𝜑 → (((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))))
118 inss1 3795 . . . . . . . 8 ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ (𝐴 sadd (𝐵 sadd 𝐶))
119 sadcl 15022 . . . . . . . . 9 ((𝐴 ⊆ ℕ0 ∧ (𝐵 sadd 𝐶) ⊆ ℕ0) → (𝐴 sadd (𝐵 sadd 𝐶)) ⊆ ℕ0)
1202, 70, 119syl2anc 691 . . . . . . . 8 (𝜑 → (𝐴 sadd (𝐵 sadd 𝐶)) ⊆ ℕ0)
121118, 120syl5ss 3579 . . . . . . 7 (𝜑 → ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ ℕ0)
122 inss2 3796 . . . . . . . 8 ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ (0..^𝑁)
123 ssfi 8065 . . . . . . . 8 (((0..^𝑁) ∈ Fin ∧ ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ Fin)
1245, 122, 123sylancl 693 . . . . . . 7 (𝜑 → ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ Fin)
125 elfpw 8151 . . . . . . 7 (((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ (((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ⊆ ℕ0 ∧ ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ Fin))
126121, 124, 125sylanbrc 695 . . . . . 6 (𝜑 → ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
12714ffvelrni 6266 . . . . . 6 (((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℕ0)
128126, 127syl 17 . . . . 5 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℕ0)
129128nn0red 11229 . . . 4 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℝ)
130 2nn 11062 . . . . . . 7 2 ∈ ℕ
131130a1i 11 . . . . . 6 (𝜑 → 2 ∈ ℕ)
132131, 60nnexpcld 12892 . . . . 5 (𝜑 → (2↑𝑁) ∈ ℕ)
133132nnrpd 11746 . . . 4 (𝜑 → (2↑𝑁) ∈ ℝ+)
134128nn0ge0d 11231 . . . 4 (𝜑 → 0 ≤ ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))))
135 fvres 6117 . . . . . . . . 9 (((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℕ0 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) = (bits‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))))
136128, 135syl 17 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) = (bits‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))))
137 f1ocnvfv2 6433 . . . . . . . . 9 (((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) ∧ ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin)) → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))
13811, 126, 137sylancr 694 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))
139136, 138eqtr3d 2646 . . . . . . 7 (𝜑 → (bits‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) = ((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))
140139, 122syl6eqss 3618 . . . . . 6 (𝜑 → (bits‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) ⊆ (0..^𝑁))
141128nn0zd 11356 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℤ)
142 bitsfzo 14995 . . . . . . 7 ((((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ ℤ ∧ 𝑁 ∈ ℕ0) → (((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
143141, 60, 142syl2anc 691 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
144140, 143mpbird 246 . . . . 5 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)))
145 elfzolt2 12348 . . . . 5 (((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) < (2↑𝑁))
146144, 145syl 17 . . . 4 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) < (2↑𝑁))
147 modid 12557 . . . 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..^𝑁))))
148129, 133, 134, 146, 147syl22anc 1319 . . 3 (𝜑 → (((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))))
14990, 117, 1483eqtr3d 2652 . 2 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 sadd 𝐵) sadd 𝐶) ∩ (0..^𝑁))) = ((bits ↾ ℕ0)‘((𝐴 sadd (𝐵 sadd 𝐶)) ∩ (0..^𝑁))))
150 f1of1 6049 . . . . 5 ((bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0(bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1→ℕ0)
15111, 12, 150mp2b 10 . . . 4 (bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1→ℕ0