Preserve active options around extracted syntax context - #1
Conversation
|
Full integration evidence with #2 applied after this PR on a fresh
The two generator commits cherry-pick without conflict and their combined generator/contract/golden suite is green. Source report SHA-256: |
|
Pre-review edge-case fix |
The ledger now names the verified path for each entry: the two drift cases retire with the toolchain bump (kim-em compiled both generated Challenges at the target pins on a merge with google-deepmind#4428), and the Erdos125 entry retires when the generator pin advances past leanprover/lean-eval-generator#1.
Summary
set_optioncommands in source order with extracted variables and syntax declarationsset_option ... incommands from leaking onto the generated target theoremWhy
Formal Conjectures'
Erdos125.erdos_125.variants.positive_unequal_densitydeclaresset_option quotPrecheck falsebefore two local set-builder notations. The generator copied the notations intoChallenge.lean,Submission.lean, andSolution.leanwithout the active option, so quotation precheck rejected the generated files.Verification
lake buildlake env lean --run tests/Context.leanpython3 tests/scripts/contract.pypython3 -m py_compile tests/scripts/*.pygit diff --checkgoogle-deepmind/formal-conjectures#4951at54abfe518d4484b74bba5470589841bb37e927c6using this binarysorrywarnings inChallenge.leanandSubmission.leanremained