diff --git a/src/Init/Data/BitVec/Lemmas.lean b/src/Init/Data/BitVec/Lemmas.lean index c92fc97cc5aa..9d111b7f37fc 100644 --- a/src/Init/Data/BitVec/Lemmas.lean +++ b/src/Init/Data/BitVec/Lemmas.lean @@ -1121,16 +1121,16 @@ theorem not_eq_comm {x y : BitVec w} : ~~~ x = y ↔ x = ~~~ y := by /-! ### shiftLeft -/ @[simp, bv_toNat] theorem toNat_shiftLeft {x : BitVec v} : - BitVec.toNat (x <<< n) = BitVec.toNat x <<< n % 2^v := + (x <<< n).toNat = x.toNat <<< n % 2^v := BitVec.toNat_ofNat _ _ @[simp] theorem toInt_shiftLeft {x : BitVec w} : - BitVec.toInt (x <<< n) = Int.bmod (x.toNat <<< n) (2^w) := by - rw [toInt_eq_toNat_bmod, toNat_shiftLeft, Nat.shiftLeft_eq] - simp + (x <<< n).toInt = (x.toNat <<< n : Int).bmod (2^w) := by + rw [toInt_eq_toNat_bmod, toNat_shiftLeft, Nat.shiftLeft_eq] + simp @[simp] theorem toFin_shiftLeft {n : Nat} (x : BitVec w) : - BitVec.toFin (x <<< n) = Fin.ofNat' (2^w) (x.toNat <<< n) := rfl + (x <<< n).toFin = Fin.ofNat' (2^w) (x.toNat <<< n) := rfl @[simp] theorem shiftLeft_zero (x : BitVec w) : x <<< 0 = x := by