Skip to content

Commit

Permalink
use explicit = true
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasgrosser committed Nov 22, 2024
1 parent 77781a1 commit 9525d54
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 @@ -2249,7 +2249,7 @@ theorem msb_fill {w : Nat} {v : Bool} :
(fill w v).msb = (v && decide (0 < w)) := by
simp [BitVec.msb]

theorem fill_eq {w : Nat} {v : Bool} : fill w v = if v then allOnes w else 0#w := by
theorem fill_eq {w : Nat} {v : Bool} : fill w v = if v = true then allOnes w else 0#w := by
by_cases h : v <;> (simp only [h] ; ext ; simp)

@[simp]
Expand All @@ -2261,15 +2261,15 @@ theorem fill_eq_zero {w : Nat} : fill w false = 0#w := by
simp [fill_eq]

@[simp] theorem fill_toNat {w : Nat} {v : Bool} :
(fill w v).toNat = if v then 2^w - 1 else 0 := by
(fill w v).toNat = if v = true then 2^w - 1 else 0 := by
by_cases h : v <;> simp [h]

@[simp] theorem fill_toInt {w : Nat} {v : Bool} :
(fill w v).toInt = if v && 0 < w then -1 else 0 := by
(fill w v).toInt = if v = true && 0 < w then -1 else 0 := by
by_cases h : v <;> simp [h]

@[simp] theorem fill_toFin {w : Nat} {v : Bool} :
(fill w v).toFin = if v then (allOnes w).toFin else Fin.ofNat' (2 ^ w) 0 := by
(fill w v).toFin = if v = true then (allOnes w).toFin else Fin.ofNat' (2 ^ w) 0 := by
by_cases h : v <;> simp [h]

/-! ### mul -/
Expand Down

0 comments on commit 9525d54

Please sign in to comment.