diff options
author | Son Ho | 2024-03-18 06:59:11 +0100 |
---|---|---|
committer | Son Ho | 2024-03-18 06:59:11 +0100 |
commit | 59bc33b42009ef3a71b43c844f44cd632476e4fe (patch) | |
tree | 15feb48f4747234ff49fccd119dc69c65b73b43b /backends/lean/Base | |
parent | 5a1317e51a5854699befb3b470bc346551b1691a (diff) |
Fix a minor issue
Diffstat (limited to '')
-rw-r--r-- | backends/lean/Base/Primitives/Base.lean | 4 |
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 |