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) |
* proof: make scope lift helper-world parametric * proof: route expr helper lists through WithInternals assembly
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_8161597a-6a15-48d0-94fa-d933eb664848) |
98ac7a0
into
paloma/issue-2080-spec-functions-stmt-witness
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
Medium Risk
Changes sit on the formal compiler correctness proof chain (stmt-list compilation and helper IR), but are additive Lean scaffolding with no runtime or security surface.
Overview
Extends the phase-12 WithInternals helper proof path so statement lists compile and assemble under
spec.functionsinstead of the legacy empty internal-function world.Compiler lemmas: Adds
compileStmtList_cons_eq_ok_with_internals/compileStmtList_cons_ok_inv_with_internals, generalizescompileStmt_ok_any_scope_with_surface_auxto takeinternalFunctions, and exposescompileStmt_*_with_internals/compileStmtList_*_with_internalsscope-lift theorems.New list seams: Introduces
StmtListGenericWithHelpersAndHelperIRWithInternalsandStmtListExprInternalHelperStepInterfaceWithInternals, with exact- and scope-liftedcompileStmtList_ok_of_stmtListGenericWithHelpersAndHelperIRWithInternals*reconstruction and an assembly bridge from the expression-helper interface.Composition: Wires
ExprInternalHelperHeadStepBridgeWithInternalsthrough cons / all-heads list assemblers inHelperStepProofs; updatesPrintAxioms.lean.Scope is intentionally narrow (e.g. all expression-helper heads for the whole-list bridge); mixed lists still use legacy assembly until more WithInternals interfaces exist.
Reviewed by Cursor Bugbot for commit 73564ef. Bugbot is set up for automated code reviews on this repo. Configure here.