Repository navigation
Lean example: lean-eval problems checked by lake comparator - #54
Merged
Merged
Conversation
…y lake comparator setup.py scaffolds a bundled problem (problems/) or a lean-eval problem (--lean-eval DIR ID) in lean-eval's workspace layout: the agent writes Submission.lean and Submission/; the trusted Challenge.lean, ChallengeDeps.lean, Solution.lean and config.json live in autohelix/NAME/ with check.py (gate: lake comparator with sorry allowed; observe: the strict check and metrics; stop: proved = 1). goal-text.py derives the /goal arm's text from the config.
examples/lean/README.md: what the check enforces (and doesn't), the loop, setup. tests/check_cases.py runs check.py's gate and strict check on ten known submissions (tests/cases/, expectations in tests/cases.json; the complete-proof case uses a small test statement in tests/fixture/, not the bundled problem's solution). goal-text.py (the /goal comparison's prompt) removed. tests/test_examples.py: the example's setup.py writes a config that validates.
…t enforce setup.py takes a lean-eval checkout and a problem id, and refuses a checkout not on Lean v4.36.0. The dimension formula moves into the tests' fixture, a lean-eval-shaped checkout. The README gets a short results paragraph and says plainly that the agent's session can change what the check trusts (Mathlib, the toolchain, the stored check.py). check.py exits 2 without bwrap; check_cases.py reads metrics anywhere in a line, so the spoof case tests the escaping.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
examples/lean/: an AutoHelix setup for proving lean-eval problems, checked bylake comparator.setup.py LEAN_EVAL_CHECKOUT PROBLEM_ID --dir DIRmakes a project from lean-eval'sgenerated/<id>/(Mathlib-only problems with theorem holes; refuses a checkout not on Lean v4.36.0). Nothing of lean-eval is vendored.template/check.pyis the gate (builds, statements unchanged, permitted axioms,sorryallowed), the strict observe check (proved,sorry_decls,errors,builds,lines) and the stop command. It builds the submission in a fresh project next to trusted copies of the fixed files; build output is escaped and never sets metrics.tests/check_cases.py: ten cheating cases (editedSolution.lean, spoofed metric lines, a new axiom,native_decide, a weakened statement, notation that redefines a term, ...) on two fixture problems. Needs Lean, about 20 minutes, run by hand: all ten pass on Linux with Lean v4.36.0, andspooffails when the escaping is removed.check.py; for a benchmark, make them read-only and re-check proofs), and a short results paragraph: 16 of 20 lean-eval problems proved with Opus 5.5, each re-checked with comparator in paranoid mode.examples/README.md;tests/test_examples.pycovers setup (with a fakedlake) and the toolchain refusal.