Skip to content

Commit 0028f5f

Browse files
bollutobiasgrosser
andauthored
Update src/Init/Data/BitVec/Lemmas.lean
Co-authored-by: Tobias Grosser <github@grosser.es>
1 parent 5eeb6d3 commit 0028f5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Init/Data/BitVec/Lemmas.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2977,7 +2977,7 @@ theorem abs_eq_ite (x : BitVec w) : x.abs =
29772977
by_cases hx : x.msb = true <;> by_cases hx' : x = BitVec.intMin w <;> simp [hx, hx']
29782978

29792979
theorem toInt_abs (x : BitVec w) :
2980-
x.abs.toInt = if x = (intMin w) then if w = 0 then 0 else - 2^(w - 1) else x.toInt.abs := by
2980+
x.abs.toInt = if x = (intMin w) then (intMin w).toInt else x.toInt.abs := by
29812981
rcases w with rfl | w
29822982
· simp [toInt_zero_length]
29832983
· simp only [gt_iff_lt, Nat.zero_lt_succ, Nat.add_one_ne_zero, ↓reduceIte]

0 commit comments

Comments
 (0)