Skip to content

Commit

Permalink
chore: @[simp] for Nat.testBit_one_eq_true_iff_self_eq_zero
Browse files Browse the repository at this point in the history
  • Loading branch information
bollu committed Jun 28, 2024
1 parent faf6697 commit 37e8ef9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Init/Data/Nat/Bitwise/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ theorem testBit_bool_to_nat (b : Bool) (i : Nat) :
Nat.mod_eq_of_lt]

/-- `testBit 1 i` is true iff the index `i` equals 0. -/
@[simp]
theorem testBit_one_eq_true_iff_self_eq_zero {i : Nat} :
Nat.testBit 1 i = true ↔ i = 0 := by
cases i <;> simp
Expand Down

0 comments on commit 37e8ef9

Please sign in to comment.