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

Theorem smumullem 15138
Description: Lemma for smumul 15139. (Contributed by Mario Carneiro, 22-Sep-2016.)
Hypotheses
Ref Expression
smumullem.a (𝜑𝐴 ∈ ℤ)
smumullem.b (𝜑𝐵 ∈ ℤ)
smumullem.n (𝜑𝑁 ∈ ℕ0)
Assertion
Ref Expression
smumullem (𝜑 → (((bits‘𝐴) ∩ (0..^𝑁)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑁)) · 𝐵)))

Proof of Theorem smumullem
Dummy variables 𝑘 𝑛 𝑥 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 smumullem.n . 2 (𝜑𝑁 ∈ ℕ0)
2 oveq2 6612 . . . . . . . . . 10 (𝑥 = 0 → (0..^𝑥) = (0..^0))
3 fzo0 12433 . . . . . . . . . 10 (0..^0) = ∅
42, 3syl6eq 2671 . . . . . . . . 9 (𝑥 = 0 → (0..^𝑥) = ∅)
54ineq2d 3792 . . . . . . . 8 (𝑥 = 0 → ((bits‘𝐴) ∩ (0..^𝑥)) = ((bits‘𝐴) ∩ ∅))
6 in0 3940 . . . . . . . 8 ((bits‘𝐴) ∩ ∅) = ∅
75, 6syl6eq 2671 . . . . . . 7 (𝑥 = 0 → ((bits‘𝐴) ∩ (0..^𝑥)) = ∅)
87oveq1d 6619 . . . . . 6 (𝑥 = 0 → (((bits‘𝐴) ∩ (0..^𝑥)) smul (bits‘𝐵)) = (∅ smul (bits‘𝐵)))
9 bitsss 15072 . . . . . . 7 (bits‘𝐵) ⊆ ℕ0
10 smu02 15133 . . . . . . 7 ((bits‘𝐵) ⊆ ℕ0 → (∅ smul (bits‘𝐵)) = ∅)
119, 10ax-mp 5 . . . . . 6 (∅ smul (bits‘𝐵)) = ∅
128, 11syl6eq 2671 . . . . 5 (𝑥 = 0 → (((bits‘𝐴) ∩ (0..^𝑥)) smul (bits‘𝐵)) = ∅)
13 oveq2 6612 . . . . . . . . 9 (𝑥 = 0 → (2↑𝑥) = (2↑0))
14 2cn 11035 . . . . . . . . . 10 2 ∈ ℂ
15 exp0 12804 . . . . . . . . . 10 (2 ∈ ℂ → (2↑0) = 1)
1614, 15ax-mp 5 . . . . . . . . 9 (2↑0) = 1
1713, 16syl6eq 2671 . . . . . . . 8 (𝑥 = 0 → (2↑𝑥) = 1)
1817oveq2d 6620 . . . . . . 7 (𝑥 = 0 → (𝐴 mod (2↑𝑥)) = (𝐴 mod 1))
1918oveq1d 6619 . . . . . 6 (𝑥 = 0 → ((𝐴 mod (2↑𝑥)) · 𝐵) = ((𝐴 mod 1) · 𝐵))
2019fveq2d 6152 . . . . 5 (𝑥 = 0 → (bits‘((𝐴 mod (2↑𝑥)) · 𝐵)) = (bits‘((𝐴 mod 1) · 𝐵)))
2112, 20eqeq12d 2636 . . . 4 (𝑥 = 0 → ((((bits‘𝐴) ∩ (0..^𝑥)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑥)) · 𝐵)) ↔ ∅ = (bits‘((𝐴 mod 1) · 𝐵))))
2221imbi2d 330 . . 3 (𝑥 = 0 → ((𝜑 → (((bits‘𝐴) ∩ (0..^𝑥)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑥)) · 𝐵))) ↔ (𝜑 → ∅ = (bits‘((𝐴 mod 1) · 𝐵)))))
23 oveq2 6612 . . . . . . 7 (𝑥 = 𝑘 → (0..^𝑥) = (0..^𝑘))
2423ineq2d 3792 . . . . . 6 (𝑥 = 𝑘 → ((bits‘𝐴) ∩ (0..^𝑥)) = ((bits‘𝐴) ∩ (0..^𝑘)))
2524oveq1d 6619 . . . . 5 (𝑥 = 𝑘 → (((bits‘𝐴) ∩ (0..^𝑥)) smul (bits‘𝐵)) = (((bits‘𝐴) ∩ (0..^𝑘)) smul (bits‘𝐵)))
26 oveq2 6612 . . . . . . . 8 (𝑥 = 𝑘 → (2↑𝑥) = (2↑𝑘))
2726oveq2d 6620 . . . . . . 7 (𝑥 = 𝑘 → (𝐴 mod (2↑𝑥)) = (𝐴 mod (2↑𝑘)))
2827oveq1d 6619 . . . . . 6 (𝑥 = 𝑘 → ((𝐴 mod (2↑𝑥)) · 𝐵) = ((𝐴 mod (2↑𝑘)) · 𝐵))
2928fveq2d 6152 . . . . 5 (𝑥 = 𝑘 → (bits‘((𝐴 mod (2↑𝑥)) · 𝐵)) = (bits‘((𝐴 mod (2↑𝑘)) · 𝐵)))
3025, 29eqeq12d 2636 . . . 4 (𝑥 = 𝑘 → ((((bits‘𝐴) ∩ (0..^𝑥)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑥)) · 𝐵)) ↔ (((bits‘𝐴) ∩ (0..^𝑘)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑘)) · 𝐵))))
3130imbi2d 330 . . 3 (𝑥 = 𝑘 → ((𝜑 → (((bits‘𝐴) ∩ (0..^𝑥)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑥)) · 𝐵))) ↔ (𝜑 → (((bits‘𝐴) ∩ (0..^𝑘)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑘)) · 𝐵)))))
32 oveq2 6612 . . . . . . 7 (𝑥 = (𝑘 + 1) → (0..^𝑥) = (0..^(𝑘 + 1)))
3332ineq2d 3792 . . . . . 6 (𝑥 = (𝑘 + 1) → ((bits‘𝐴) ∩ (0..^𝑥)) = ((bits‘𝐴) ∩ (0..^(𝑘 + 1))))
3433oveq1d 6619 . . . . 5 (𝑥 = (𝑘 + 1) → (((bits‘𝐴) ∩ (0..^𝑥)) smul (bits‘𝐵)) = (((bits‘𝐴) ∩ (0..^(𝑘 + 1))) smul (bits‘𝐵)))
35 oveq2 6612 . . . . . . . 8 (𝑥 = (𝑘 + 1) → (2↑𝑥) = (2↑(𝑘 + 1)))
3635oveq2d 6620 . . . . . . 7 (𝑥 = (𝑘 + 1) → (𝐴 mod (2↑𝑥)) = (𝐴 mod (2↑(𝑘 + 1))))
3736oveq1d 6619 . . . . . 6 (𝑥 = (𝑘 + 1) → ((𝐴 mod (2↑𝑥)) · 𝐵) = ((𝐴 mod (2↑(𝑘 + 1))) · 𝐵))
3837fveq2d 6152 . . . . 5 (𝑥 = (𝑘 + 1) → (bits‘((𝐴 mod (2↑𝑥)) · 𝐵)) = (bits‘((𝐴 mod (2↑(𝑘 + 1))) · 𝐵)))
3934, 38eqeq12d 2636 . . . 4 (𝑥 = (𝑘 + 1) → ((((bits‘𝐴) ∩ (0..^𝑥)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑥)) · 𝐵)) ↔ (((bits‘𝐴) ∩ (0..^(𝑘 + 1))) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑(𝑘 + 1))) · 𝐵))))
4039imbi2d 330 . . 3 (𝑥 = (𝑘 + 1) → ((𝜑 → (((bits‘𝐴) ∩ (0..^𝑥)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑥)) · 𝐵))) ↔ (𝜑 → (((bits‘𝐴) ∩ (0..^(𝑘 + 1))) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑(𝑘 + 1))) · 𝐵)))))
41 oveq2 6612 . . . . . . 7 (𝑥 = 𝑁 → (0..^𝑥) = (0..^𝑁))
4241ineq2d 3792 . . . . . 6 (𝑥 = 𝑁 → ((bits‘𝐴) ∩ (0..^𝑥)) = ((bits‘𝐴) ∩ (0..^𝑁)))
4342oveq1d 6619 . . . . 5 (𝑥 = 𝑁 → (((bits‘𝐴) ∩ (0..^𝑥)) smul (bits‘𝐵)) = (((bits‘𝐴) ∩ (0..^𝑁)) smul (bits‘𝐵)))
44 oveq2 6612 . . . . . . . 8 (𝑥 = 𝑁 → (2↑𝑥) = (2↑𝑁))
4544oveq2d 6620 . . . . . . 7 (𝑥 = 𝑁 → (𝐴 mod (2↑𝑥)) = (𝐴 mod (2↑𝑁)))
4645oveq1d 6619 . . . . . 6 (𝑥 = 𝑁 → ((𝐴 mod (2↑𝑥)) · 𝐵) = ((𝐴 mod (2↑𝑁)) · 𝐵))
4746fveq2d 6152 . . . . 5 (𝑥 = 𝑁 → (bits‘((𝐴 mod (2↑𝑥)) · 𝐵)) = (bits‘((𝐴 mod (2↑𝑁)) · 𝐵)))
4843, 47eqeq12d 2636 . . . 4 (𝑥 = 𝑁 → ((((bits‘𝐴) ∩ (0..^𝑥)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑥)) · 𝐵)) ↔ (((bits‘𝐴) ∩ (0..^𝑁)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑁)) · 𝐵))))
4948imbi2d 330 . . 3 (𝑥 = 𝑁 → ((𝜑 → (((bits‘𝐴) ∩ (0..^𝑥)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑥)) · 𝐵))) ↔ (𝜑 → (((bits‘𝐴) ∩ (0..^𝑁)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑁)) · 𝐵)))))
50 smumullem.a . . . . . . . 8 (𝜑𝐴 ∈ ℤ)
51 zmod10 12626 . . . . . . . 8 (𝐴 ∈ ℤ → (𝐴 mod 1) = 0)
5250, 51syl 17 . . . . . . 7 (𝜑 → (𝐴 mod 1) = 0)
5352oveq1d 6619 . . . . . 6 (𝜑 → ((𝐴 mod 1) · 𝐵) = (0 · 𝐵))
54 smumullem.b . . . . . . . 8 (𝜑𝐵 ∈ ℤ)
5554zcnd 11427 . . . . . . 7 (𝜑𝐵 ∈ ℂ)
5655mul02d 10178 . . . . . 6 (𝜑 → (0 · 𝐵) = 0)
5753, 56eqtrd 2655 . . . . 5 (𝜑 → ((𝐴 mod 1) · 𝐵) = 0)
5857fveq2d 6152 . . . 4 (𝜑 → (bits‘((𝐴 mod 1) · 𝐵)) = (bits‘0))
59 0bits 15085 . . . 4 (bits‘0) = ∅
6058, 59syl6req 2672 . . 3 (𝜑 → ∅ = (bits‘((𝐴 mod 1) · 𝐵)))
61 oveq1 6611 . . . . . 6 ((((bits‘𝐴) ∩ (0..^𝑘)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑘)) · 𝐵)) → ((((bits‘𝐴) ∩ (0..^𝑘)) smul (bits‘𝐵)) sadd {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))}) = ((bits‘((𝐴 mod (2↑𝑘)) · 𝐵)) sadd {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))}))
62 bitsss 15072 . . . . . . . . 9 (bits‘𝐴) ⊆ ℕ0
6362a1i 11 . . . . . . . 8 ((𝜑𝑘 ∈ ℕ0) → (bits‘𝐴) ⊆ ℕ0)
649a1i 11 . . . . . . . 8 ((𝜑𝑘 ∈ ℕ0) → (bits‘𝐵) ⊆ ℕ0)
65 simpr 477 . . . . . . . 8 ((𝜑𝑘 ∈ ℕ0) → 𝑘 ∈ ℕ0)
6663, 64, 65smup1 15135 . . . . . . 7 ((𝜑𝑘 ∈ ℕ0) → (((bits‘𝐴) ∩ (0..^(𝑘 + 1))) smul (bits‘𝐵)) = ((((bits‘𝐴) ∩ (0..^𝑘)) smul (bits‘𝐵)) sadd {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))}))
67 bitsinv1lem 15087 . . . . . . . . . . . 12 ((𝐴 ∈ ℤ ∧ 𝑘 ∈ ℕ0) → (𝐴 mod (2↑(𝑘 + 1))) = ((𝐴 mod (2↑𝑘)) + if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)))
6850, 67sylan 488 . . . . . . . . . . 11 ((𝜑𝑘 ∈ ℕ0) → (𝐴 mod (2↑(𝑘 + 1))) = ((𝐴 mod (2↑𝑘)) + if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)))
6968oveq1d 6619 . . . . . . . . . 10 ((𝜑𝑘 ∈ ℕ0) → ((𝐴 mod (2↑(𝑘 + 1))) · 𝐵) = (((𝐴 mod (2↑𝑘)) + if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)) · 𝐵))
7050adantr 481 . . . . . . . . . . . . 13 ((𝜑𝑘 ∈ ℕ0) → 𝐴 ∈ ℤ)
71 2nn 11129 . . . . . . . . . . . . . . 15 2 ∈ ℕ
7271a1i 11 . . . . . . . . . . . . . 14 ((𝜑𝑘 ∈ ℕ0) → 2 ∈ ℕ)
7372, 65nnexpcld 12970 . . . . . . . . . . . . 13 ((𝜑𝑘 ∈ ℕ0) → (2↑𝑘) ∈ ℕ)
7470, 73zmodcld 12631 . . . . . . . . . . . 12 ((𝜑𝑘 ∈ ℕ0) → (𝐴 mod (2↑𝑘)) ∈ ℕ0)
7574nn0cnd 11297 . . . . . . . . . . 11 ((𝜑𝑘 ∈ ℕ0) → (𝐴 mod (2↑𝑘)) ∈ ℂ)
7673nnnn0d 11295 . . . . . . . . . . . . 13 ((𝜑𝑘 ∈ ℕ0) → (2↑𝑘) ∈ ℕ0)
77 0nn0 11251 . . . . . . . . . . . . 13 0 ∈ ℕ0
78 ifcl 4102 . . . . . . . . . . . . 13 (((2↑𝑘) ∈ ℕ0 ∧ 0 ∈ ℕ0) → if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0) ∈ ℕ0)
7976, 77, 78sylancl 693 . . . . . . . . . . . 12 ((𝜑𝑘 ∈ ℕ0) → if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0) ∈ ℕ0)
8079nn0cnd 11297 . . . . . . . . . . 11 ((𝜑𝑘 ∈ ℕ0) → if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0) ∈ ℂ)
8155adantr 481 . . . . . . . . . . 11 ((𝜑𝑘 ∈ ℕ0) → 𝐵 ∈ ℂ)
8275, 80, 81adddird 10009 . . . . . . . . . 10 ((𝜑𝑘 ∈ ℕ0) → (((𝐴 mod (2↑𝑘)) + if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)) · 𝐵) = (((𝐴 mod (2↑𝑘)) · 𝐵) + (if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0) · 𝐵)))
8380, 81mulcomd 10005 . . . . . . . . . . 11 ((𝜑𝑘 ∈ ℕ0) → (if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0) · 𝐵) = (𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)))
8483oveq2d 6620 . . . . . . . . . 10 ((𝜑𝑘 ∈ ℕ0) → (((𝐴 mod (2↑𝑘)) · 𝐵) + (if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0) · 𝐵)) = (((𝐴 mod (2↑𝑘)) · 𝐵) + (𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0))))
8569, 82, 843eqtrd 2659 . . . . . . . . 9 ((𝜑𝑘 ∈ ℕ0) → ((𝐴 mod (2↑(𝑘 + 1))) · 𝐵) = (((𝐴 mod (2↑𝑘)) · 𝐵) + (𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0))))
8685fveq2d 6152 . . . . . . . 8 ((𝜑𝑘 ∈ ℕ0) → (bits‘((𝐴 mod (2↑(𝑘 + 1))) · 𝐵)) = (bits‘(((𝐴 mod (2↑𝑘)) · 𝐵) + (𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)))))
8774nn0zd 11424 . . . . . . . . . 10 ((𝜑𝑘 ∈ ℕ0) → (𝐴 mod (2↑𝑘)) ∈ ℤ)
8854adantr 481 . . . . . . . . . 10 ((𝜑𝑘 ∈ ℕ0) → 𝐵 ∈ ℤ)
8987, 88zmulcld 11432 . . . . . . . . 9 ((𝜑𝑘 ∈ ℕ0) → ((𝐴 mod (2↑𝑘)) · 𝐵) ∈ ℤ)
9079nn0zd 11424 . . . . . . . . . 10 ((𝜑𝑘 ∈ ℕ0) → if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0) ∈ ℤ)
9188, 90zmulcld 11432 . . . . . . . . 9 ((𝜑𝑘 ∈ ℕ0) → (𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)) ∈ ℤ)
92 sadadd 15113 . . . . . . . . 9 ((((𝐴 mod (2↑𝑘)) · 𝐵) ∈ ℤ ∧ (𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)) ∈ ℤ) → ((bits‘((𝐴 mod (2↑𝑘)) · 𝐵)) sadd (bits‘(𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)))) = (bits‘(((𝐴 mod (2↑𝑘)) · 𝐵) + (𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)))))
9389, 91, 92syl2anc 692 . . . . . . . 8 ((𝜑𝑘 ∈ ℕ0) → ((bits‘((𝐴 mod (2↑𝑘)) · 𝐵)) sadd (bits‘(𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)))) = (bits‘(((𝐴 mod (2↑𝑘)) · 𝐵) + (𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)))))
94 oveq2 6612 . . . . . . . . . . . 12 ((2↑𝑘) = if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0) → (𝐵 · (2↑𝑘)) = (𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)))
9594fveq2d 6152 . . . . . . . . . . 11 ((2↑𝑘) = if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0) → (bits‘(𝐵 · (2↑𝑘))) = (bits‘(𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0))))
9695eqeq1d 2623 . . . . . . . . . 10 ((2↑𝑘) = if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0) → ((bits‘(𝐵 · (2↑𝑘))) = {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))} ↔ (bits‘(𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0))) = {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))}))
97 oveq2 6612 . . . . . . . . . . . 12 (0 = if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0) → (𝐵 · 0) = (𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)))
9897fveq2d 6152 . . . . . . . . . . 11 (0 = if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0) → (bits‘(𝐵 · 0)) = (bits‘(𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0))))
9998eqeq1d 2623 . . . . . . . . . 10 (0 = if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0) → ((bits‘(𝐵 · 0)) = {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))} ↔ (bits‘(𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0))) = {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))}))
100 bitsshft 15121 . . . . . . . . . . . 12 ((𝐵 ∈ ℤ ∧ 𝑘 ∈ ℕ0) → {𝑛 ∈ ℕ0 ∣ (𝑛𝑘) ∈ (bits‘𝐵)} = (bits‘(𝐵 · (2↑𝑘))))
10154, 100sylan 488 . . . . . . . . . . 11 ((𝜑𝑘 ∈ ℕ0) → {𝑛 ∈ ℕ0 ∣ (𝑛𝑘) ∈ (bits‘𝐵)} = (bits‘(𝐵 · (2↑𝑘))))
102 ibar 525 . . . . . . . . . . . 12 (𝑘 ∈ (bits‘𝐴) → ((𝑛𝑘) ∈ (bits‘𝐵) ↔ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))))
103102rabbidv 3177 . . . . . . . . . . 11 (𝑘 ∈ (bits‘𝐴) → {𝑛 ∈ ℕ0 ∣ (𝑛𝑘) ∈ (bits‘𝐵)} = {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))})
104101, 103sylan9req 2676 . . . . . . . . . 10 (((𝜑𝑘 ∈ ℕ0) ∧ 𝑘 ∈ (bits‘𝐴)) → (bits‘(𝐵 · (2↑𝑘))) = {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))})
10581adantr 481 . . . . . . . . . . . . 13 (((𝜑𝑘 ∈ ℕ0) ∧ ¬ 𝑘 ∈ (bits‘𝐴)) → 𝐵 ∈ ℂ)
106105mul01d 10179 . . . . . . . . . . . 12 (((𝜑𝑘 ∈ ℕ0) ∧ ¬ 𝑘 ∈ (bits‘𝐴)) → (𝐵 · 0) = 0)
107106fveq2d 6152 . . . . . . . . . . 11 (((𝜑𝑘 ∈ ℕ0) ∧ ¬ 𝑘 ∈ (bits‘𝐴)) → (bits‘(𝐵 · 0)) = (bits‘0))
108 simpr 477 . . . . . . . . . . . . . 14 (((𝜑𝑘 ∈ ℕ0) ∧ ¬ 𝑘 ∈ (bits‘𝐴)) → ¬ 𝑘 ∈ (bits‘𝐴))
109108intnanrd 962 . . . . . . . . . . . . 13 (((𝜑𝑘 ∈ ℕ0) ∧ ¬ 𝑘 ∈ (bits‘𝐴)) → ¬ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵)))
110109ralrimivw 2961 . . . . . . . . . . . 12 (((𝜑𝑘 ∈ ℕ0) ∧ ¬ 𝑘 ∈ (bits‘𝐴)) → ∀𝑛 ∈ ℕ0 ¬ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵)))
111 rabeq0 3931 . . . . . . . . . . . 12 ({𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))} = ∅ ↔ ∀𝑛 ∈ ℕ0 ¬ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵)))
112110, 111sylibr 224 . . . . . . . . . . 11 (((𝜑𝑘 ∈ ℕ0) ∧ ¬ 𝑘 ∈ (bits‘𝐴)) → {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))} = ∅)
11359, 107, 1123eqtr4a 2681 . . . . . . . . . 10 (((𝜑𝑘 ∈ ℕ0) ∧ ¬ 𝑘 ∈ (bits‘𝐴)) → (bits‘(𝐵 · 0)) = {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))})
11496, 99, 104, 113ifbothda 4095 . . . . . . . . 9 ((𝜑𝑘 ∈ ℕ0) → (bits‘(𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0))) = {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))})
115114oveq2d 6620 . . . . . . . 8 ((𝜑𝑘 ∈ ℕ0) → ((bits‘((𝐴 mod (2↑𝑘)) · 𝐵)) sadd (bits‘(𝐵 · if(𝑘 ∈ (bits‘𝐴), (2↑𝑘), 0)))) = ((bits‘((𝐴 mod (2↑𝑘)) · 𝐵)) sadd {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))}))
11686, 93, 1153eqtr2d 2661 . . . . . . 7 ((𝜑𝑘 ∈ ℕ0) → (bits‘((𝐴 mod (2↑(𝑘 + 1))) · 𝐵)) = ((bits‘((𝐴 mod (2↑𝑘)) · 𝐵)) sadd {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))}))
11766, 116eqeq12d 2636 . . . . . 6 ((𝜑𝑘 ∈ ℕ0) → ((((bits‘𝐴) ∩ (0..^(𝑘 + 1))) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑(𝑘 + 1))) · 𝐵)) ↔ ((((bits‘𝐴) ∩ (0..^𝑘)) smul (bits‘𝐵)) sadd {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))}) = ((bits‘((𝐴 mod (2↑𝑘)) · 𝐵)) sadd {𝑛 ∈ ℕ0 ∣ (𝑘 ∈ (bits‘𝐴) ∧ (𝑛𝑘) ∈ (bits‘𝐵))})))
11861, 117syl5ibr 236 . . . . 5 ((𝜑𝑘 ∈ ℕ0) → ((((bits‘𝐴) ∩ (0..^𝑘)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑘)) · 𝐵)) → (((bits‘𝐴) ∩ (0..^(𝑘 + 1))) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑(𝑘 + 1))) · 𝐵))))
119118expcom 451 . . . 4 (𝑘 ∈ ℕ0 → (𝜑 → ((((bits‘𝐴) ∩ (0..^𝑘)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑘)) · 𝐵)) → (((bits‘𝐴) ∩ (0..^(𝑘 + 1))) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑(𝑘 + 1))) · 𝐵)))))
120119a2d 29 . . 3 (𝑘 ∈ ℕ0 → ((𝜑 → (((bits‘𝐴) ∩ (0..^𝑘)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑘)) · 𝐵))) → (𝜑 → (((bits‘𝐴) ∩ (0..^(𝑘 + 1))) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑(𝑘 + 1))) · 𝐵)))))
12122, 31, 40, 49, 60, 120nn0ind 11416 . 2 (𝑁 ∈ ℕ0 → (𝜑 → (((bits‘𝐴) ∩ (0..^𝑁)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑁)) · 𝐵))))
1221, 121mpcom 38 1 (𝜑 → (((bits‘𝐴) ∩ (0..^𝑁)) smul (bits‘𝐵)) = (bits‘((𝐴 mod (2↑𝑁)) · 𝐵)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wa 384   = wceq 1480  wcel 1987  wral 2907  {crab 2911  cin 3554  wss 3555  c0 3891  ifcif 4058  cfv 5847  (class class class)co 6604  cc 9878  0cc0 9880  1c1 9881   + caddc 9883   · cmul 9885  cmin 10210  cn 10964  2c2 11014  0cn0 11236  cz 11321  ..^cfzo 12406   mod cmo 12608  cexp 12800  bitscbits 15065   sadd csad 15066   smul csmu 15067
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-rep 4731  ax-sep 4741  ax-nul 4749  ax-pow 4803  ax-pr 4867  ax-un 6902  ax-inf2 8482  ax-cnex 9936  ax-resscn 9937  ax-1cn 9938  ax-icn 9939  ax-addcl 9940  ax-addrcl 9941  ax-mulcl 9942  ax-mulrcl 9943  ax-mulcom 9944  ax-addass 9945  ax-mulass 9946  ax-distr 9947  ax-i2m1 9948  ax-1ne0 9949  ax-1rid 9950  ax-rnegex 9951  ax-rrecex 9952  ax-cnre 9953  ax-pre-lttri 9954  ax-pre-lttrn 9955  ax-pre-ltadd 9956  ax-pre-mulgt0 9957  ax-pre-sup 9958
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-xor 1462  df-tru 1483  df-fal 1486  df-had 1530  df-cad 1543  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-nel 2894  df-ral 2912  df-rex 2913  df-reu 2914  df-rmo 2915  df-rab 2916  df-v 3188  df-sbc 3418  df-csb 3515  df-dif 3558  df-un 3560  df-in 3562  df-ss 3569  df-pss 3571  df-nul 3892  df-if 4059  df-pw 4132  df-sn 4149  df-pr 4151  df-tp 4153  df-op 4155  df-uni 4403  df-int 4441  df-iun 4487  df-disj 4584  df-br 4614  df-opab 4674  df-mpt 4675  df-tr 4713  df-eprel 4985  df-id 4989  df-po 4995  df-so 4996  df-fr 5033  df-se 5034  df-we 5035  df-xp 5080  df-rel 5081  df-cnv 5082  df-co 5083  df-dm 5084  df-rn 5085  df-res 5086  df-ima 5087  df-pred 5639  df-ord 5685  df-on 5686  df-lim 5687  df-suc 5688  df-iota 5810  df-fun 5849  df-fn 5850  df-f 5851  df-f1 5852  df-fo 5853  df-f1o 5854  df-fv 5855  df-isom 5856  df-riota 6565  df-ov 6607  df-oprab 6608  df-mpt2 6609  df-om 7013  df-1st 7113  df-2nd 7114  df-wrecs 7352  df-recs 7413  df-rdg 7451  df-1o 7505  df-2o 7506  df-oadd 7509  df-er 7687  df-map 7804  df-pm 7805  df-en 7900  df-dom 7901  df-sdom 7902  df-fin 7903  df-sup 8292  df-inf 8293  df-oi 8359  df-card 8709  df-cda 8934  df-pnf 10020  df-mnf 10021  df-xr 10022  df-ltxr 10023  df-le 10024  df-sub 10212  df-neg 10213  df-div 10629  df-nn 10965  df-2 11023  df-3 11024  df-n0 11237  df-xnn0 11308  df-z 11322  df-uz 11632  df-rp 11777  df-fz 12269  df-fzo 12407  df-fl 12533  df-mod 12609  df-seq 12742  df-exp 12801  df-hash 13058  df-cj 13773  df-re 13774  df-im 13775  df-sqrt 13909  df-abs 13910  df-clim 14153  df-sum 14351  df-dvds 14908  df-bits 15068  df-sad 15097  df-smu 15122
This theorem is referenced by:  smumul  15139
  Copyright terms: Public domain W3C validator