We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e77b528 commit 6df6011Copy full SHA for 6df6011
src/Init/Data/BitVec/Lemmas.lean
@@ -4212,6 +4212,10 @@ theorem udiv_twoPow_eq_of_lt {w : Nat} {x : BitVec w} {k : Nat} (hk : k < w) : x
4212
have : 2^k < 2^w := Nat.pow_lt_pow_of_lt (by decide) hk
4213
simp [bitvec_to_nat, Nat.shiftRight_eq_div_pow, Nat.mod_eq_of_lt this]
4214
4215
+theorem shiftLeft_neg {x : BitVec w} {y : Nat} :
4216
+ (-x) <<< y = - (x <<< y) := by
4217
+ rw [shiftLeft_eq_mul_twoPow, shiftLeft_eq_mul_twoPow, BitVec.neg_mul]
4218
+
4219
/- ### cons -/
4220
4221
@[simp] theorem true_cons_zero : cons true 0#w = twoPow (w + 1) w := by
0 commit comments