summaryrefslogtreecommitdiff
path: root/backends/lean
diff options
context:
space:
mode:
authorSon Ho2023-09-14 08:17:15 +0200
committerSon Ho2023-09-14 08:17:15 +0200
commit743e8cb9d5366b879f53d7d0ba8adeb2f83ef72f (patch)
tree4a105b1284821a89ca344188fdddb727de2deea3 /backends/lean
parentc9f4a412763ef46ed20c72a9d7fe2cca817d3817 (diff)
Fix the hashmap proofs in Lean
Diffstat (limited to 'backends/lean')
-rw-r--r--backends/lean/Base/Progress/Progress.lean13
-rw-r--r--backends/lean/Base/Utils.lean2
2 files changed, 8 insertions, 7 deletions
diff --git a/backends/lean/Base/Progress/Progress.lean b/backends/lean/Base/Progress/Progress.lean
index afe3056e..4fd88e36 100644
--- a/backends/lean/Base/Progress/Progress.lean
+++ b/backends/lean/Base/Progress/Progress.lean
@@ -110,8 +110,9 @@ def progressWith (fExpr : Expr) (th : TheoremOrLocal)
-- then continue splitting the post-condition
splitEqAndPost fun hEq hPost ids => do
trace[Progress] "eq and post:\n{hEq} : {← inferType hEq}\n{hPost}"
- simpAt [] [``Primitives.bind_tc_ret, ``Primitives.bind_tc_fail, ``Primitives.bind_tc_div]
- [hEq.fvarId!] (.targets #[] true)
+ tryTac (
+ simpAt [] [``Primitives.bind_tc_ret, ``Primitives.bind_tc_fail, ``Primitives.bind_tc_div]
+ [hEq.fvarId!] (.targets #[] true))
-- Clear the equality, unless the user requests not to do so
let mgoal ← do
if keep.isSome then getMainGoal
@@ -345,11 +346,11 @@ elab "progress" args:progressArgs : tactic =>
namespace Test
open Primitives Result
- set_option trace.Progress true
- set_option pp.rawOnError true
+ -- set_option trace.Progress true
+ -- set_option pp.rawOnError true
- #eval showStoredPSpec
- #eval showStoredPSpecClass
+ -- #eval showStoredPSpec
+ -- #eval showStoredPSpecClass
example {ty} {x y : Scalar ty}
(hmin : Scalar.min ty ≤ x.val + y.val)
diff --git a/backends/lean/Base/Utils.lean b/backends/lean/Base/Utils.lean
index e58198f4..5224e1c3 100644
--- a/backends/lean/Base/Utils.lean
+++ b/backends/lean/Base/Utils.lean
@@ -303,7 +303,7 @@ example (x : Bool) : Nat := by
-- Attempt to apply a tactic
def tryTac (tac : TacticM Unit) : TacticM Unit := do
- let _ := tryTactic tac
+ let _ ← tryTactic tac
-- Repeatedly apply a tactic
partial def repeatTac (tac : TacticM Unit) : TacticM Unit := do