File tree 2 files changed +8
-12
lines changed
src/Lean/Elab/Tactic/BVDecide/Frontend/Normalize
2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ where
107
107
-/
108
108
let (motive, newGoalType) ←
109
109
withLocalDeclD `z (mkConst ``Nat) fun z => do
110
- let otherArgType := mkApp2 (mkConst ``Eq [1 ]) (toExpr numBits ) (mkConst ``System.Platform. numBits)
110
+ let otherArgType := mkApp3 (mkConst ``Eq [1 ]) (mkConst ``Nat ) (toExpr numBits) z
111
111
withLocalDeclD `h otherArgType fun other => do
112
112
let argType := mkApp (mkConst ``BitVec) z
113
113
let argTypes := relevantTerms.map (fun _ => (`x, argType))
@@ -133,7 +133,7 @@ where
133
133
goal.assign <| mkAppN casesOn (relevantTerms ++ abstractedHyps)
134
134
-- remove all of the hold hypotheses about USize.toBitVec to prevent false counter examples
135
135
(newGoal, _) ← newGoal.tryClearMany' (abstractedHyps.map Expr.fvarId!)
136
- -- intro both the new `BitVec 32 ` as well as all hypotheses about them
136
+ -- intro both the new `BitVec const ` as well as all hypotheses about them
137
137
(_, newGoal) ← newGoal.introN (relevantTerms.size + abstractedHyps.size)
138
138
return newGoal
139
139
else
Original file line number Diff line number Diff line change 1
1
import Std.Tactic.BVDecide
2
2
3
3
/-! UInt8 -/
4
- example (a b : UInt8) : a + b = b + a := by
4
+ example (a b c : UInt8) (h1 : a < b) (h2 : b < c) : a < c := by
5
5
bv_decide
6
6
7
7
/--
@@ -16,7 +16,7 @@ example (a b : UInt8) : a + b = a := by
16
16
17
17
18
18
/-! UInt16 -/
19
- example (a b : UInt16) : a + b = b + a := by
19
+ example (a b c : UInt16) (h1 : a < b) (h2 : b < c) : a < c := by
20
20
bv_decide
21
21
22
22
/--
@@ -31,7 +31,7 @@ example (a b : UInt16) : a + b = a := by
31
31
32
32
33
33
/-! UInt32 -/
34
- example (a b : UInt32) : a + b = b + a := by
34
+ example (a b c : UInt32) (h1 : a < b) (h2 : b < c) : a < c := by
35
35
bv_decide
36
36
37
37
/--
@@ -46,7 +46,7 @@ example (a b : UInt32) : a + b = a := by
46
46
47
47
48
48
/-! UInt64 -/
49
- example (a b : UInt64) : a + b = b + a := by
49
+ example (a b c : UInt64) (h1 : a < b) (h2 : b < c) : a < c := by
50
50
bv_decide
51
51
52
52
/--
@@ -61,7 +61,7 @@ example (a b : UInt64) : a + b = a := by
61
61
62
62
63
63
/-! USize -/
64
- example (a b : USize) : a + b = b + a := by
64
+ example (a b c : USize) (h1 : a < b) (h2 : b < c) : a < c := by
65
65
cases System.Platform.numBits_eq <;> bv_decide
66
66
67
67
/--
@@ -74,9 +74,5 @@ example (a b : USize) : a + b = a := by
74
74
bv_normalize
75
75
sorry
76
76
77
-
78
- example (h : 32 = System.Platform.numBits) (a b : USize) : a + b = b + a := by
79
- bv_decide
80
-
81
- example (h : System.Platform.numBits = 32 ) (a b : USize) : a + b = a := by
77
+ example (h : 32 = System.Platform.numBits) (a b c : USize) (h1 : a < b) (h2 : b < c) : a < c := by
82
78
bv_decide
You can’t perform that action at this time.
0 commit comments