-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Tobias Grosser <[email protected]>
- Loading branch information
1 parent
d770d3e
commit d63aaad
Showing
4 changed files
with
50 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/- | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
-/ | ||
|
||
import SSA.Projects.InstCombine.TacticAuto | ||
import SSA.Projects.InstCombine.ForLean | ||
|
||
@[simp] | ||
theorem shiftRight_and_or_shiftLeft_distrib {x y z : BitVec w} {n : Nat} : | ||
(x >>> n &&& y ||| z) <<< n = x &&& y <<< n ||| z <<< n := by | ||
bv_auto | ||
|
||
@[simp] | ||
theorem or_shiftRight_and_shiftLeft_distrib {x y z : BitVec w} {n : Nat} : | ||
(z ||| x >>> n &&& y) <<< n = z <<< n ||| x &&& y <<< n := by | ||
bv_auto | ||
|
||
@[simp] | ||
theorem shiftRight_and_xor_shiftLeft_distrib {x y z : BitVec w} {n : Nat} : | ||
(x >>> n &&& y ^^^ z) <<< n = x &&& y <<< n ^^^ z <<< n := by | ||
bv_auto | ||
|
||
@[simp] | ||
theorem xor_shiftRight_and_shiftLeft_distrib {x y z : BitVec w} {n : Nat} : | ||
(z ^^^ x >>> n &&& y) <<< n = z <<< n ^^^ x &&& y <<< n := by | ||
bv_auto | ||
|
||
@[simp] | ||
theorem and_shiftLeft_allOnes {x y : BitVec w} {n : Nat} : | ||
x &&& BitVec.allOnes w <<< n &&& y <<< n = x &&& y <<< n := by | ||
bv_auto | ||
|
||
@[simp] | ||
theorem or_shiftLeft_allOnes {x y : BitVec w} {n : Nat} : | ||
x ||| BitVec.allOnes w <<< n &&& y <<< n = x ||| y <<< n := by | ||
bv_auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters