Skip to content

Commit

Permalink
Update Std/Data/BitVec/Lemmas.lean
Browse files Browse the repository at this point in the history
Co-authored-by: François G. Dorais <[email protected]>
  • Loading branch information
mhk119 and fgdorais authored Jan 26, 2024
1 parent 6c16f40 commit 5eaddef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Std/Data/BitVec/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ theorem eq_sub_of_add_eq {a b c : BitVec w} (h : a + b = c) : a = c - b := by
rw [Nat.add_assoc, Nat.add_mod, ← Nat.add_sub_assoc (Nat.le_of_lt b.isLt)]
simp [Nat.add_sub_self_left, Nat.mod_eq_of_lt a.isLt]

theorem add_comm {a b : BitVec w} : a + b = b + a := by
theorem add_comm (a b : BitVec w) : a + b = b + a := by
apply BitVec.eq_of_toNat_eq; simp [Nat.add_comm]

theorem add_sub_assoc {x y z : BitVec w} : x + y - z = x + (y - z) := by
Expand Down

0 comments on commit 5eaddef

Please sign in to comment.