proof: thread spec functions through stmt list seam#2107
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_a8a64fb4-cb76-4f19-9f1b-65b585350d14) |
537afbf to
4f6e96c
Compare
6abf2ac to
3469224
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_66ce5f6b-3c54-4f27-b732-9e8cbad042e7) |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_e0c9cc8d-c77f-4cf4-95f5-5db12230885c) |
Continues #2080 as the next proof-tier slice after phase 12 / #2106.
Stacked on #2106 (
paloma/issue-2080-spec-functions-stmt-witness) because #2106 and the earlier #2102-#2105 chain are still open. Please review/merge this after #2106.What changed
compileStmtList_cons_eq_ok_with_internals, a narrow internal-functions-parametric cons reconstruction lemma forcompileStmtList.StmtListGenericWithHelpersAndHelperIRWithInternals, a spec-functions-aware statement-list seam whose heads carryCompiledStmtStepWithHelpersAndHelperIRWithInternals.compileStmtList_ok_of_stmtListGenericWithHelpersAndHelperIRWithInternals_exact, compiling statement lists withspec.functions.ExprInternalHelperHeadStepBridgeWithInternalswitness through the new list seam with cons and all-heads assemblers.PrintAxioms.leanfor the new theorem declarations.Current blocker / next API
This closes exact-scope list reconstruction for the
spec.functionsworld. Full replacement ofcompileStmtList_ok_of_stmtListGenericWithHelpersAndHelperIRstill needs aninternalFunctions-parametric version ofFunctionBody.compileStmt_ok_any_scope_with_surface/compileStmtList_ok_any_scope_with_surface, because the existing scope-lift proof recursively hardcodes the default empty internal-function world.Validation
lake env lean Compiler/Proofs/IRGeneration/GenericInduction/ResultRelation.leanlake env lean Compiler/Proofs/HelperStepProofs.leanlean-slot lake build Compiler.Proofs.IRGeneration.GenericInduction.ResultRelationlean-slot lake build Compiler.Proofs.HelperStepProofspython3 scripts/lean_lint.py --only lean_hygienepython3 scripts/lean_lint.py --only proof_lengthmake checkNote:
lean-slotattempted Spark offload but Spark returned HTTP 403 for this isolated worktree path, so the builds ran locally and passed.Note
Low Risk
Additive Lean proof infrastructure only; no runtime, auth, or compiler executable changes. Residual risk is localized to formal verification maintenance and the documented gap before full list-level scope lifting.
Overview
Continues the #2080 helper/spec-functions proof tier by wiring statement lists through
spec.functionsinstead of the default empty internal-function compile world.ResultRelation.leanintroducesStmtListGenericWithHelpersAndHelperIRWithInternals(list-level witness withCompiledStmtStepWithHelpersAndHelperIRWithInternalsheads),compileStmtList_cons_eq_ok_with_internals(cons reconstruction wheninternalFunctionsis threaded), andcompileStmtList_ok_of_stmtListGenericWithHelpersAndHelperIRWithInternals_exact(from that witness,compileStmtListsucceeds at the same scope withspec.functions). Arbitrary-scope lifting of the legacycompileStmtList_ok_of_stmtListGenericWithHelpersAndHelperIRis explicitly deferred until aninternalFunctions-parametric scope API exists.HelperStepProofs.leanadds cons and whole-list assemblers that turn per-statementExprInternalHelperHeadStepBridgeWithInternalsintoStmtListGenericWithHelpersAndHelperIRWithInternals(narrow scaffold: all heads via expression bridges; mixed direct/residual lists still use the legacy seam).PrintAxioms.leanregisters the new public theorems (theorem count 5495 → 5499).Reviewed by Cursor Bugbot for commit 3469224. Bugbot is set up for automated code reviews on this repo. Configure here.