summaryrefslogtreecommitdiff
path: root/backends/lean/Base
diff options
context:
space:
mode:
authorSon HO2024-03-18 07:23:00 +0100
committerGitHub2024-03-18 07:23:00 +0100
commita24f42ff7f0ae3c2aeb51decb0d0c90d6e50ffac (patch)
tree7c9e526912d4fcbde4ed2ff4c17988fd5c89c96e /backends/lean/Base
parentd56946242859e0d375c1d44585b9da6d5fbe94cb (diff)
parent9e230d0c4378b5c992c820cc1f4322896f739095 (diff)
Merge pull request #92 from AeneasVerif/son/globals
Add generics to constants/globals
Diffstat (limited to 'backends/lean/Base')
-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 0b9d9c39..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 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