Preliminaries #
testBit #
Depending on use cases either testBit_add_one
or testBit_div_two
may be more useful as a simp
lemma, so neither is a global simp
lemma.
eq_of_testBit_eq
allows proving two natural numbers are equal
if their bits are all equal.
testBit 1 i
is true iff the index i
equals 0.
bitwise #
bitwise #
and #
@[reducible, inline, deprecated Nat.and_pow_two_sub_one_eq_mod]
Instances For
@[reducible, inline, deprecated Nat.and_pow_two_sub_one_of_lt_two_pow]
Instances For
lor #
theorem
Nat.instLawfulCommIdentityHOrOfNat :
Std.LawfulCommIdentity (fun (x1 x2 : Nat) => x1 ||| x2) 0
xor #
theorem
Nat.instLawfulCommIdentityHXorOfNat :
Std.LawfulCommIdentity (fun (x1 x2 : Nat) => x1 ^^^ x2) 0