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

 Description: Any element of a sequence sum only depends on the values of the argument sequences up to and including that point. (Contributed by Mario Carneiro, 9-Sep-2016.)
Hypotheses
Ref Expression
sadeq.a (𝜑𝐴 ⊆ ℕ0)
sadeq.b (𝜑𝐵 ⊆ ℕ0)
sadeq.n (𝜑𝑁 ∈ ℕ0)
Assertion
Ref Expression
sadeq (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) = (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)))

Proof of Theorem sadeq
Dummy variables 𝑚 𝑐 𝑛 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 inass 4149 . . . . . . . 8 ((𝐴 ∩ (0..^𝑁)) ∩ (0..^𝑁)) = (𝐴 ∩ ((0..^𝑁) ∩ (0..^𝑁)))
2 inidm 4148 . . . . . . . . 9 ((0..^𝑁) ∩ (0..^𝑁)) = (0..^𝑁)
32ineq2i 4139 . . . . . . . 8 (𝐴 ∩ ((0..^𝑁) ∩ (0..^𝑁))) = (𝐴 ∩ (0..^𝑁))
41, 3eqtri 2821 . . . . . . 7 ((𝐴 ∩ (0..^𝑁)) ∩ (0..^𝑁)) = (𝐴 ∩ (0..^𝑁))
54fveq2i 6658 . . . . . 6 ((bits ↾ ℕ0)‘((𝐴 ∩ (0..^𝑁)) ∩ (0..^𝑁))) = ((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁)))
6 inass 4149 . . . . . . . 8 ((𝐵 ∩ (0..^𝑁)) ∩ (0..^𝑁)) = (𝐵 ∩ ((0..^𝑁) ∩ (0..^𝑁)))
72ineq2i 4139 . . . . . . . 8 (𝐵 ∩ ((0..^𝑁) ∩ (0..^𝑁))) = (𝐵 ∩ (0..^𝑁))
86, 7eqtri 2821 . . . . . . 7 ((𝐵 ∩ (0..^𝑁)) ∩ (0..^𝑁)) = (𝐵 ∩ (0..^𝑁))
98fveq2i 6658 . . . . . 6 ((bits ↾ ℕ0)‘((𝐵 ∩ (0..^𝑁)) ∩ (0..^𝑁))) = ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))
105, 9oveq12i 7157 . . . . 5 (((bits ↾ ℕ0)‘((𝐴 ∩ (0..^𝑁)) ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘((𝐵 ∩ (0..^𝑁)) ∩ (0..^𝑁)))) = (((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁))))
1110oveq1i 7155 . . . 4 ((((bits ↾ ℕ0)‘((𝐴 ∩ (0..^𝑁)) ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘((𝐵 ∩ (0..^𝑁)) ∩ (0..^𝑁)))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) mod (2↑𝑁))
12 inss1 4158 . . . . . 6 (𝐴 ∩ (0..^𝑁)) ⊆ 𝐴
13 sadeq.a . . . . . 6 (𝜑𝐴 ⊆ ℕ0)
1412, 13sstrid 3928 . . . . 5 (𝜑 → (𝐴 ∩ (0..^𝑁)) ⊆ ℕ0)
15 inss1 4158 . . . . . 6 (𝐵 ∩ (0..^𝑁)) ⊆ 𝐵
16 sadeq.b . . . . . 6 (𝜑𝐵 ⊆ ℕ0)
1715, 16sstrid 3928 . . . . 5 (𝜑 → (𝐵 ∩ (0..^𝑁)) ⊆ ℕ0)
18 eqid 2798 . . . . 5 seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚 ∈ (𝐴 ∩ (0..^𝑁)), 𝑚 ∈ (𝐵 ∩ (0..^𝑁)), ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1)))) = seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚 ∈ (𝐴 ∩ (0..^𝑁)), 𝑚 ∈ (𝐵 ∩ (0..^𝑁)), ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
19 sadeq.n . . . . 5 (𝜑𝑁 ∈ ℕ0)
20 eqid 2798 . . . . 5 (bits ↾ ℕ0) = (bits ↾ ℕ0)
2114, 17, 18, 19, 20sadadd3 15820 . . . 4 (𝜑 → (((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘((𝐴 ∩ (0..^𝑁)) ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘((𝐵 ∩ (0..^𝑁)) ∩ (0..^𝑁)))) mod (2↑𝑁)))
22 eqid 2798 . . . . 5 seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚𝐵, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1)))) = seq0((𝑐 ∈ 2o, 𝑚 ∈ ℕ0 ↦ if(cadd(𝑚𝐴, 𝑚𝐵, ∅ ∈ 𝑐), 1o, ∅)), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
2313, 16, 22, 19, 20sadadd3 15820 . . . 4 (𝜑 → (((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((((bits ↾ ℕ0)‘(𝐴 ∩ (0..^𝑁))) + ((bits ↾ ℕ0)‘(𝐵 ∩ (0..^𝑁)))) mod (2↑𝑁)))
2411, 21, 233eqtr4a 2859 . . 3 (𝜑 → (((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) mod (2↑𝑁)) = (((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) mod (2↑𝑁)))
25 inss1 4158 . . . . . . . 8 (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ⊆ ((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁)))
26 sadcl 15821 . . . . . . . . 9 (((𝐴 ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (𝐵 ∩ (0..^𝑁)) ⊆ ℕ0) → ((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ⊆ ℕ0)
2714, 17, 26syl2anc 587 . . . . . . . 8 (𝜑 → ((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ⊆ ℕ0)
2825, 27sstrid 3928 . . . . . . 7 (𝜑 → (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ⊆ ℕ0)
29 fzofi 13357 . . . . . . . . 9 (0..^𝑁) ∈ Fin
3029a1i 11 . . . . . . . 8 (𝜑 → (0..^𝑁) ∈ Fin)
31 inss2 4159 . . . . . . . 8 (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ⊆ (0..^𝑁)
32 ssfi 8740 . . . . . . . 8 (((0..^𝑁) ∈ Fin ∧ (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ∈ Fin)
3330, 31, 32sylancl 589 . . . . . . 7 (𝜑 → (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ∈ Fin)
34 elfpw 8828 . . . . . . 7 ((((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ ((((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ⊆ ℕ0 ∧ (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ∈ Fin))
3528, 33, 34sylanbrc 586 . . . . . 6 (𝜑 → (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
36 bitsf1o 15804 . . . . . . . 8 (bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin)
37 f1ocnv 6611 . . . . . . . 8 ((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) → (bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0)
38 f1of 6599 . . . . . . . 8 ((bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0(bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)⟶ℕ0)
3936, 37, 38mp2b 10 . . . . . . 7 (bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)⟶ℕ0
4039ffvelrni 6837 . . . . . 6 ((((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ∈ ℕ0)
4135, 40syl 17 . . . . 5 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ∈ ℕ0)
4241nn0red 11964 . . . 4 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ∈ ℝ)
43 2rp 12402 . . . . . 6 2 ∈ ℝ+
4443a1i 11 . . . . 5 (𝜑 → 2 ∈ ℝ+)
4519nn0zd 12093 . . . . 5 (𝜑𝑁 ∈ ℤ)
4644, 45rpexpcld 13624 . . . 4 (𝜑 → (2↑𝑁) ∈ ℝ+)
4741nn0ge0d 11966 . . . 4 (𝜑 → 0 ≤ ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))))
4841fvresd 6675 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)))) = (bits‘((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)))))
49 f1ocnvfv2 7022 . . . . . . . . 9 (((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) ∧ (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin)) → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)))) = (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)))
5036, 35, 49sylancr 590 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)))) = (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)))
5148, 50eqtr3d 2835 . . . . . . 7 (𝜑 → (bits‘((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)))) = (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)))
5251, 31eqsstrdi 3971 . . . . . 6 (𝜑 → (bits‘((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)))) ⊆ (0..^𝑁))
5341nn0zd 12093 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ∈ ℤ)
54 bitsfzo 15794 . . . . . . 7 ((((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ∈ ℤ ∧ 𝑁 ∈ ℕ0) → (((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
5553, 19, 54syl2anc 587 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
5652, 55mpbird 260 . . . . 5 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)))
57 elfzolt2 13062 . . . . 5 (((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) → ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) < (2↑𝑁))
5856, 57syl 17 . . . 4 (𝜑 → ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) < (2↑𝑁))
59 modid 13279 . . . 4 (((((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ∈ ℝ ∧ (2↑𝑁) ∈ ℝ+) ∧ (0 ≤ ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ∧ ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) < (2↑𝑁))) → (((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))))
6042, 46, 47, 58, 59syl22anc 837 . . 3 (𝜑 → (((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))))
61 inss1 4158 . . . . . . . 8 ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ (𝐴 sadd 𝐵)
62 sadcl 15821 . . . . . . . . 9 ((𝐴 ⊆ ℕ0𝐵 ⊆ ℕ0) → (𝐴 sadd 𝐵) ⊆ ℕ0)
6313, 16, 62syl2anc 587 . . . . . . . 8 (𝜑 → (𝐴 sadd 𝐵) ⊆ ℕ0)
6461, 63sstrid 3928 . . . . . . 7 (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ ℕ0)
65 inss2 4159 . . . . . . . 8 ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ (0..^𝑁)
66 ssfi 8740 . . . . . . . 8 (((0..^𝑁) ∈ Fin ∧ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ (0..^𝑁)) → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ Fin)
6730, 65, 66sylancl 589 . . . . . . 7 (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ Fin)
68 elfpw 8828 . . . . . . 7 (((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ↔ (((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ⊆ ℕ0 ∧ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ Fin))
6964, 67, 68sylanbrc 586 . . . . . 6 (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))
7039ffvelrni 6837 . . . . . 6 (((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ ℕ0)
7169, 70syl 17 . . . . 5 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ ℕ0)
7271nn0red 11964 . . . 4 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ ℝ)
7371nn0ge0d 11966 . . . 4 (𝜑 → 0 ≤ ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))))
7471fvresd 6675 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁)))) = (bits‘((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁)))))
75 f1ocnvfv2 7022 . . . . . . . . 9 (((bits ↾ ℕ0):ℕ01-1-onto→(𝒫 ℕ0 ∩ Fin) ∧ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin)) → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁)))) = ((𝐴 sadd 𝐵) ∩ (0..^𝑁)))
7636, 69, 75sylancr 590 . . . . . . . 8 (𝜑 → ((bits ↾ ℕ0)‘((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁)))) = ((𝐴 sadd 𝐵) ∩ (0..^𝑁)))
7774, 76eqtr3d 2835 . . . . . . 7 (𝜑 → (bits‘((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁)))) = ((𝐴 sadd 𝐵) ∩ (0..^𝑁)))
7877, 65eqsstrdi 3971 . . . . . 6 (𝜑 → (bits‘((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁)))) ⊆ (0..^𝑁))
7971nn0zd 12093 . . . . . . 7 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ ℤ)
80 bitsfzo 15794 . . . . . . 7 ((((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ ℤ ∧ 𝑁 ∈ ℕ0) → (((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
8179, 19, 80syl2anc 587 . . . . . 6 (𝜑 → (((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) ↔ (bits‘((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁)))) ⊆ (0..^𝑁)))
8278, 81mpbird 260 . . . . 5 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)))
83 elfzolt2 13062 . . . . 5 (((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ (0..^(2↑𝑁)) → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) < (2↑𝑁))
8482, 83syl 17 . . . 4 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) < (2↑𝑁))
85 modid 13279 . . . 4 (((((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∈ ℝ ∧ (2↑𝑁) ∈ ℝ+) ∧ (0 ≤ ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) ∧ ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) < (2↑𝑁))) → (((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))))
8672, 46, 73, 84, 85syl22anc 837 . . 3 (𝜑 → (((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) mod (2↑𝑁)) = ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))))
8724, 60, 863eqtr3rd 2842 . 2 (𝜑 → ((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) = ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))))
88 f1of1 6598 . . . . 5 ((bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1-onto→ℕ0(bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1→ℕ0)
8936, 37, 88mp2b 10 . . . 4 (bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1→ℕ0
90 f1fveq 7008 . . . 4 (((bits ↾ ℕ0):(𝒫 ℕ0 ∩ Fin)–1-1→ℕ0 ∧ (((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ∧ (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin))) → (((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) = ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ↔ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) = (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))))
9189, 90mpan 689 . . 3 ((((𝐴 sadd 𝐵) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin) ∧ (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)) ∈ (𝒫 ℕ0 ∩ Fin)) → (((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) = ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ↔ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) = (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))))
9269, 35, 91syl2anc 587 . 2 (𝜑 → (((bits ↾ ℕ0)‘((𝐴 sadd 𝐵) ∩ (0..^𝑁))) = ((bits ↾ ℕ0)‘(((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))) ↔ ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) = (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁))))
9387, 92mpbid 235 1 (𝜑 → ((𝐴 sadd 𝐵) ∩ (0..^𝑁)) = (((𝐴 ∩ (0..^𝑁)) sadd (𝐵 ∩ (0..^𝑁))) ∩ (0..^𝑁)))