Skip to content

Commit

Permalink
Update src/Init/Data/BitVec/Lemmas.lean
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Grosser <[email protected]>
  • Loading branch information
mhk119 and tobiasgrosser authored Nov 12, 2024
1 parent 3a1591d commit 9ecf998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Init/Data/BitVec/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ theorem toNat_ushiftRight_lt (x : BitVec w) (n : Nat) (hn : n ≤ w) :


/-- Shifting right by `n`, which is larger than the bitwidth `w` produces `0. -/
theorem ushiftRight_eq_zero (x : BitVec w) (n : Nat) (hn : w ≤ n) :
theorem ushiftRight_eq_zero {x : BitVec w} {n : Nat} (hn : w ≤ n) :
x >>> n = 0#w := by
simp [bv_toNat]
have : 2^w ≤ 2^n := Nat.pow_le_pow_of_le Nat.one_lt_two hn
Expand Down

0 comments on commit 9ecf998

Please sign in to comment.