Skip to content

Commit

Permalink
fix rebased changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hargoniX committed Oct 8, 2024
1 parent f1b996e commit 5e958f5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Init/Data/BitVec/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1353,9 +1353,8 @@ theorem toNat_udiv {x y : BitVec n} : (x / y).toNat = x.toNat / y.toNat := by
exact Nat.lt_of_le_of_lt (Nat.div_le_self ..) (by omega)

@[simp]
theorem udiv_zero {x : BitVec n} : x.udiv 0#n = 0#n := by
simp only [udiv, toNat_ofNat, Nat.zero_mod, Nat.div_zero]
rfl
theorem udiv_zero {x : BitVec n} : x / 0#n = 0#n := by
simp [udiv_def]

/-! ### umod -/

Expand All @@ -1370,8 +1369,8 @@ theorem toNat_umod {x y : BitVec n} :
(x % y).toNat = x.toNat % y.toNat := rfl

@[simp]
theorem umod_zero {x : BitVec n} : x.umod 0#n = x := by
simp [umod_eq]
theorem umod_zero {x : BitVec n} : x % 0#n = x := by
simp [umod_def]

/-! ### sdiv -/

Expand Down Expand Up @@ -2205,7 +2204,7 @@ protected theorem ne_of_lt {x y : BitVec n} : x < y → x ≠ y := by
simp only [lt_def, ne_eq, toNat_eq]
apply Nat.ne_of_lt

protected theorem umod_lt (x : BitVec n) {y : BitVec n} : 0 < y → x.umod y < y := by
protected theorem umod_lt (x : BitVec n) {y : BitVec n} : 0 < y → x % y < y := by
simp only [ofNat_eq_ofNat, lt_def, toNat_ofNat, Nat.zero_mod, umod, toNat_ofNatLt]
apply Nat.mod_lt

Expand Down

0 comments on commit 5e958f5

Please sign in to comment.