Skip to content

Commit 185ead1

Browse files
committed
non-trivialize tests
1 parent 09fc51f commit 185ead1

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

Diff for: src/Lean/Elab/Tactic/BVDecide/Frontend/Normalize/IntToBitVec.lean

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ where
107107
-/
108108
let (motive, newGoalType) ←
109109
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
111111
withLocalDeclD `h otherArgType fun other => do
112112
let argType := mkApp (mkConst ``BitVec) z
113113
let argTypes := relevantTerms.map (fun _ => (`x, argType))
@@ -133,7 +133,7 @@ where
133133
goal.assign <| mkAppN casesOn (relevantTerms ++ abstractedHyps)
134134
-- remove all of the hold hypotheses about USize.toBitVec to prevent false counter examples
135135
(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
137137
(_, newGoal) ← newGoal.introN (relevantTerms.size + abstractedHyps.size)
138138
return newGoal
139139
else

Diff for: tests/lean/run/bv_uint.lean

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Std.Tactic.BVDecide
22

33
/-! 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
55
bv_decide
66

77
/--
@@ -16,7 +16,7 @@ example (a b : UInt8) : a + b = a := by
1616

1717

1818
/-! 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
2020
bv_decide
2121

2222
/--
@@ -31,7 +31,7 @@ example (a b : UInt16) : a + b = a := by
3131

3232

3333
/-! 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
3535
bv_decide
3636

3737
/--
@@ -46,7 +46,7 @@ example (a b : UInt32) : a + b = a := by
4646

4747

4848
/-! 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
5050
bv_decide
5151

5252
/--
@@ -61,7 +61,7 @@ example (a b : UInt64) : a + b = a := by
6161

6262

6363
/-! 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
6565
cases System.Platform.numBits_eq <;> bv_decide
6666

6767
/--
@@ -74,9 +74,5 @@ example (a b : USize) : a + b = a := by
7474
bv_normalize
7575
sorry
7676

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
8278
bv_decide

0 commit comments

Comments
 (0)