Skip to content

Commit

Permalink
Update src/Init/Data/BitVec/Lemmas.lean
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Grosser <github@grosser.es>
  • Loading branch information
mhk119 and tobiasgrosser authored Dec 9, 2024
1 parent 01199ca commit fcbdbed
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Init/Data/BitVec/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1126,9 +1126,8 @@ theorem not_eq_comm {x y : BitVec w} : ~~~ x = y ↔ x = ~~~ y := by

@[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

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

Expand Down

0 comments on commit fcbdbed

Please sign in to comment.