summaryrefslogtreecommitdiff
path: root/backends/lean/Base
diff options
context:
space:
mode:
authorSon Ho2024-03-18 06:59:11 +0100
committerSon Ho2024-03-18 06:59:11 +0100
commit59bc33b42009ef3a71b43c844f44cd632476e4fe (patch)
tree15feb48f4747234ff49fccd119dc69c65b73b43b /backends/lean/Base
parent5a1317e51a5854699befb3b470bc346551b1691a (diff)
Fix a minor issue
Diffstat (limited to '')
-rw-r--r--backends/lean/Base/Primitives/Base.lean4
1 files changed, 3 insertions, 1 deletions
diff --git a/backends/lean/Base/Primitives/Base.lean b/backends/lean/Base/Primitives/Base.lean
index d2695854..0c64eca1 100644
--- a/backends/lean/Base/Primitives/Base.lean
+++ b/backends/lean/Base/Primitives/Base.lean
@@ -69,7 +69,9 @@ def div? {α: Type u} (r: Result α): Bool :=
def massert (b:Bool) : Result Unit :=
if b then ret () else fail assertionFailure
-def eval_global {α: Type u} (x: Result α) (_: ret? x := by first | apply Eq.refl | decide): α :=
+macro "prove_eval_global" : tactic => `(tactic| first | apply Eq.refl | decide)
+
+def eval_global {α: Type u} (x: Result α) (_: ret? x := by prove_eval_global) : α :=
match x with
| fail _ | div => by contradiction
| ret x => x