perf: restore kernel-reduction friendly Nat.hasNotBit definition (#11657)
This PR improves upon #11652 by keeping the kernel-reduction-optimized definition.
This commit is contained in:
parent
38c401cf3b
commit
0bfbb71796
1 changed files with 5 additions and 2 deletions
|
|
@ -144,7 +144,10 @@ Asserts that the `(n+1)`th least significant bit of `m` is not set.
|
|||
|
||||
(This definition is used by Lean internally for compact bitmaps.)
|
||||
-/
|
||||
@[expose, reducible] protected def hasNotBit (m n : Nat) : Prop :=
|
||||
1 &&& (m >>> n) ≠ 1
|
||||
@[expose] protected def hasNotBit (m n : Nat) : Prop :=
|
||||
Nat.land 1 (Nat.shiftRight m n) ≠ 1
|
||||
|
||||
@[grind =]
|
||||
theorem hasNotBit_eq (m n : Nat) : Nat.hasNotBit m n = (1 &&& (m >>> n) ≠ 1) := rfl
|
||||
|
||||
end Nat
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue