Commit 9c47f39 1 parent 3f98b48 commit 9c47f39 Copy full SHA for 9c47f39
File tree 3 files changed +7
-11
lines changed
src/Std/Tactic/BVDecide/Normalize
3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,6 @@ theorem if_eq_cond {b : Bool} {x y : α} : (if b = true then x else y) = (bif b
52
52
@[bv_normalize]
53
53
theorem Bool.not_xor : ∀ (a b : Bool), !(a ^^ b) = (a == b) := by decide
54
54
55
- @[bv_normalize]
56
- theorem Bool.or_elim : ∀ (a b : Bool), (a || b) = !(!a && !b) := by decide
57
-
58
55
@[bv_normalize]
59
56
theorem Bool.not_beq_one : ∀ (a : BitVec 1 ), (!(a == 1 #1 )) = (a == 0 #1 ) := by
60
57
decide
Original file line number Diff line number Diff line change @@ -54,9 +54,8 @@ theorem Bool.and_to_and (a b : Bool) : ((a = true) ∧ (b = true)) = ((a && b) =
54
54
simp
55
55
56
56
@[bv_normalize]
57
- theorem Bool.iff_to_or (a b : Bool)
58
- : ((a = true ) ↔ (b = true )) = (((!a || b) && (!b || a)) = true ) := by
59
- revert a b
57
+ theorem Bool.iff_to_beq :
58
+ ∀ (a b : Bool), ((a = true ) ↔ (b = true )) = ((a == b) = true ) := by
60
59
decide
61
60
62
61
@[bv_normalize]
@@ -67,10 +66,6 @@ theorem Bool.eq_false (a : Bool) : ((a = true) = False) = ((!a) = true) := by
67
66
theorem Bool.decide_eq_true (a : Bool) : (decide (a = true )) = a := by
68
67
simp
69
68
70
- @[bv_normalize]
71
- theorem Bool.eq_true_eq_true_eq (x y : Bool) : ((x = true ) = (y = true )) ↔ ((x == y) = true ) := by
72
- simp
73
-
74
69
attribute [bv_normalize] BitVec.getLsbD_cast
75
70
attribute [bv_normalize] BitVec.testBit_toNat
76
71
@@ -80,10 +75,13 @@ theorem BitVec.lt_ult (x y : BitVec w) : (x < y) = (BitVec.ult x y = true) := by
80
75
simp only [(· < ·)]
81
76
simp
82
77
78
+ @[bv_normalize]
79
+ theorem Bool.or_elim : ∀ (a b : Bool), (a || b) = !(!a && !b) := by decide
80
+
83
81
@[bv_normalize]
84
82
theorem BitVec.or_elim (x y : BitVec w) : x ||| y = ~~~(~~~x &&& ~~~y) := by
85
83
ext
86
- simp_all
84
+ simp
87
85
88
86
attribute [bv_normalize] BitVec.natCast_eq_ofNat
89
87
attribute [bv_normalize] BitVec.append_eq
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ theorem mem_subset_refl : mem_subset a1 a2 a1 a2 := by
26
26
unfold mem_subset
27
27
bv_normalize
28
28
29
+ example (a b : Bool) : ((a = true ) ↔ (b = true )) ↔ (a == b) := by bv_normalize
29
30
example {x : BitVec 16 } : 0 #16 + x = x := by bv_normalize
30
31
example {x : BitVec 16 } : x + 0 #16 = x := by bv_normalize
31
32
example {x : BitVec 16 } : x.setWidth 16 = x := by bv_normalize
You can’t perform that action at this time.
0 commit comments