calc
  LenBit i (a % k) ↔ ((a % k) / i) % 2 = 1                            := LenBit.iff_rem
  _                  ↔ ((2 * k') * (a / k) + a % k / i) % 2 = 1       := by simp [mul_assoc]
  _                  ↔ (((2 * k') * (a / k) * i + a % k) / i) % 2 = 1 := by simp [div_mul_add_self, pos]
  _                  ↔ ((k * (a / k) + a % k) / i) % 2 = 1            := iff_of_eq (by
                                                                                    congr 3
                                                                                    simp [mul_right_comm _ (a / k), mul_right_comm 2 k' i, ←hk'])
  _                  ↔ LenBit i a                                     := by simp [div_add_mod a k, LenBit.iff_rem]
case inr.intro
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈open
i a k : M
this : 0 ≤ i
pos : 0 < i
k' : M
hk' : k = 2 * i * k'
⊢ LenBit i (a % k) ↔ LenBit i a
no goals