proof: add structural WithInternals head witnesses#2113
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_70d0d6c3-753b-4205-9509-3d10b59094d2) |
|
Scoped review of #2113 found no code-level blocker in the single-commit diff ( Not merging yet:
Next action: wait for #2113 CI to finish green, merge the predecessor stack first, then recheck and merge #2113. Exact blocker: #2113 CI is still pending and predecessor PRs #2108/#2111/#2112 are still open. |
Base / dependency
Stacked on PR #2112 (
paloma/issue-2080-structural-withinternals). Do not merge until predecessor stack is merged/green.Predecessor stack observed before PR creation:
Summary
StmtListGenericWithHelpersAndHelperIRWithInternalsassembly bridge for lists whose heads are all structural helper-recursive heads.WithInternalsstructural head witnesses forStmt.iteandStmt.forEach, packaging exactCompiledStmtStepWithHelpersAndHelperIRWithInternalshead steps into the phase-17 structural interface without falling back to the legacy/default-empty helper-world list seam.PrintAxioms.leanfor the two new public theorem names.Validation
lean-slot lake build Compiler.Proofs.HelperStepProofs- passedlean-slot lake build Compiler.Proofs.IRGeneration.GenericInduction.InterfaceAssembly- passedpython3 scripts/generate_print_axioms.py --check- passedpython3 scripts/check_proof_length.py- passed (5729 proofs scanned; no new proofs exceed hard limit)git diff --check- passedrg -n "\b(sorry|admit|axiom)\b" Compiler/Proofs/HelperStepProofs.lean Compiler/Proofs/IRGeneration/GenericInduction/InterfaceAssembly.lean- no matchesRemaining #2080 interface/gate
This narrows the structural recursive-head packaging, but it does not yet prove full structural
ite/forEachpreservation from nestedStmtListGenericWithHelpersAndHelperIRWithInternalsbodies. The next gate remains adding/using theWithInternalsexecution sibling for the helper-IR generic list theorem so body-level/function-level preservation can consume the mixedWithInternalslist witness directly and continue reducing reliance onSupportedStmtList.helperSurfaceClosed.Refs #2080
Note
Low Risk
Lean proof-only additions (inductive packaging and thin wrappers); no compiler runtime, auth, or execution semantics changes.
Overview
Extends the phase-17 WithInternals helper-proof plumbing so structural recursive heads (
Stmt.ite,Stmt.forEach) can be wired without the legacy empty-internal-functions compile path.HelperStepProofs adds two thin lemmas that take an exact
CompiledStmtStepWithHelpersAndHelperIRWithInternalshead step and a structural tail witness, then buildStmtListStructuralInternalHelperStepInterfaceWithInternalsforite :: restandforEach :: rest(both delegate to the existingcons_of_compiledSteplemma).InterfaceAssembly adds
stmtListGenericWithHelpersAndHelperIRWithInternals_of_structuralInternalHelperStepInterfaceWithInternals, mirroring the expression- and direct-helper list bridges: when every statement in the list is a structural helper head, the structural interface inductively assembles intoStmtListGenericWithHelpersAndHelperIRWithInternals.PrintAxioms.lean is regenerated to register the two new public theorem names (+2 public lemmas in the inventory).
Reviewed by Cursor Bugbot for commit 1cbc08a. Bugbot is set up for automated code reviews on this repo. Configure here.