Skip to content

Commit

Permalink
feat: BitVec.zero_sub (#658)
Browse files Browse the repository at this point in the history
Co-authored-by: emmau678 <[email protected]>
Co-authored-by: Tobias Grosser <[email protected]>
  • Loading branch information
3 people authored Sep 26, 2024
1 parent 1b9ebb8 commit 831c747
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SSA/Projects/InstCombine/ForLean.lean
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,10 @@ theorem allOnes_shiftLeft_or_shiftLeft {x : BitVec w} (n : Nat) :
BitVec.allOnes w <<< n ||| x <<< n = BitVec.allOnes w <<< n := by
simp [← BitVec.shiftLeft_or_distrib]

@[simp]
theorem zero_sub {x : BitVec w} : 0#w - x = - x := by
simp [bv_toNat]

end BitVec

namespace Bool
Expand Down

0 comments on commit 831c747

Please sign in to comment.