Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tactic_benchmark fails when file contains sorry #3

Open
zhangir-azerbayev opened this issue Jan 24, 2024 · 0 comments
Open

tactic_benchmark fails when file contains sorry #3

zhangir-azerbayev opened this issue Jan 24, 2024 · 0 comments

Comments

@zhangir-azerbayev
Copy link

Being able to run tactic_benchmark on decls that use sorry is rather useful. For example, when benchmarking tactics on evaluations such as MiniF2F which don't come with proofs for every declaration. Currently, tactic_benchmark fails on files that contain sorry.

Suppose I replace Examples.lean with

import Mathlib.Tactic

theorem three_add_four : 3 + 4 = 7 := sorry

Then running lake exe tactic_benchmark --simp_all Examples yields

Examples
💥declaration uses 'sorry'
uncaught exception: Unexpected messages in: Examples during elaboration of (Command.declaration
 (Command.declModifiers [] [] [] [] [] [])
 (Command.theorem
  "theorem"
  (Command.declId `three_add_four [])
  (Command.declSig [] (Term.typeSpec ":" («term_=_» («term_+_» (num "3") "+" (num "4")) "=" (num "7"))))
  (Command.declValSimple ":=" (Term.sorry "sorry") [])
  []
  []))

Replacing sorry with by norm_num leads to successful execution of tactic_benchmark.

I'll work on fixing this, but I'm rather slow at metaprogramming, so if anyone wants to fix this before me it would be much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant