Skip to content

Commit

Permalink
fix: add @[simp] attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkeizer committed Feb 24, 2024
1 parent 7dbfbea commit b010052
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Init/Data/BitVec/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -467,18 +467,18 @@ theorem getLsb_concat (x : BitVec w) (b : Bool) (i : Nat) :
@[simp] theorem getLsb_concat_succ : (concat x b).getLsb (i + 1) = x.getLsb i := by
simp [getLsb_concat]

theorem not_concat (x : BitVec w) (b : Bool) : ~~~(concat x b) = concat (~~~x) !b := by
@[simp] theorem not_concat (x : BitVec w) (b : Bool) : ~~~(concat x b) = concat (~~~x) !b := by
ext i; cases i using Fin.succRecOn <;> simp [*, Nat.succ_lt_succ]

theorem concat_or_concat (x y : BitVec w) (a b : Bool) :
@[simp] theorem concat_or_concat (x y : BitVec w) (a b : Bool) :
(concat x a) ||| (concat y b) = concat (x ||| y) (a || b) := by
ext i; cases i using Fin.succRecOn <;> simp

theorem concat_and_concat (x y : BitVec w) (a b : Bool) :
@[simp] theorem concat_and_concat (x y : BitVec w) (a b : Bool) :
(concat x a) &&& (concat y b) = concat (x &&& y) (a && b) := by
ext i; cases i using Fin.succRecOn <;> simp

theorem concat_xor_concat (x y : BitVec w) (a b : Bool) :
@[simp] theorem concat_xor_concat (x y : BitVec w) (a b : Bool) :
(concat x a) ^^^ (concat y b) = concat (x ^^^ y) (xor a b) := by
ext i; cases i using Fin.succRecOn <;> simp

Expand Down

0 comments on commit b010052

Please sign in to comment.