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 e106be1 commit cc42a17Copy full SHA for cc42a17
src/Init/Data/BitVec/Lemmas.lean
@@ -733,6 +733,21 @@ theorem getLsb_shiftLeft' {x : BitVec w₁} {y : BitVec w₂} {i : Nat} :
733
getLsb (x >>> i) j = getLsb x (i+j) := by
734
unfold getLsb ; simp
735
736
+theorem ushiftRight_xor_distrib (x y : BitVec w) (n : Nat) :
737
+ (x ^^^ y) >>> n = (x >>> n) ^^^ (y >>> n) := by
738
+ ext
739
+ simp
740
+
741
+theorem ushiftRight_and_distrib (x y : BitVec w) (n : Nat) :
742
+ (x &&& y) >>> n = (x >>> n) &&& (y >>> n) := by
743
744
745
746
+theorem ushiftRight_or_distrib (x y : BitVec w) (n : Nat) :
747
+ (x ||| y) >>> n = (x >>> n) ||| (y >>> n) := by
748
749
750
751
@[simp]
752
theorem ushiftRight_zero_eq (x : BitVec w) : x >>> 0 = x := by
753
simp [bv_toNat]
0 commit comments