We change the `bv_decide` to understand `BitVec.extractLsb'` as a primitive, and add a normalization lemma for `extractLsb`. It's important to pick the primed version as a primitive, because it is not always possible to rewrite `extractLsb'` back into `extractLsb` (see #5007 for that direction, and the relevant side-conditions). That is, with this PR, `bv_decide` is able to bitblast both versions of extracting bits.
15 lines
372 B
Text
15 lines
372 B
Text
import Std.Tactic.BVDecide
|
|
|
|
open BitVec
|
|
|
|
theorem bv_extract_1 (h : x = 1#64) : extractLsb' 32 32 x = 0#32 := by
|
|
bv_decide
|
|
|
|
theorem bv_extract_2 (h : x = 1#64) : extractLsb' 0 32 x = 1#32 := by
|
|
bv_decide
|
|
|
|
theorem bv_extract_3 (h : x = 1#64) : extractLsb 63 32 x = 0#32 := by
|
|
bv_decide
|
|
|
|
theorem bv_extract_4 (h : x = 1#64) : extractLsb 31 0 x = 1#32 := by
|
|
bv_decide
|