proof(ir): switch support — full loop-free splice simulation (lane 2.2) - #2295
Merged
Conversation
…ee fragment (lane 2.2) Extend SpliceSim with switch (cases/default sub-fragments and LoopFree bridges), prove the find? commutation with the key-preserving case splice, membership bound domination, and spliced_cons_switch (selected case via find?, default, and no-default branches, each propagating through the list step). The main induction gains structurally-static companion recursions over case lists and defaults (execIRStmts_splicedCases/_splicedDflt), avoiding membership-based termination measures. The end-to-end guardedUnit theorems inherit the widened fragment unchanged.
|
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_aeb2a88d-48be-4bff-83b7-02a36a28c824) |
Contributor
There was a problem hiding this comment.
OpenCodeReview first-pass review
⚪ OCR did not run — this diff has no OCR-supported files. Not a review outcome.
No changed files matched OCR include rules.
OCR pilot metrics & packet coverage
OCR pilot metrics
- Routing: no-supported (router-v10)
- Changed files: 0 supported / 0 total; Lean 0, trust docs 0, workflow/scripts 0, contracts 0, docs 0
- Changed lines: 0 supported; thresholds large Lean >=3 files or >800 lines
- OCR: status no-supported; comments 0; files 0; tokens 0; tool calls 0; warnings 0; duration 0s
Pilot mode: advisory only. Codex Review remains the merge gate.
This was referenced Aug 12, 2026
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.
Removes the
switchexclusion from #2291's fragment:SpliceSimnow coversswitch(cases + default), with thefind?-vs-splice commutation, bound domination by membership,spliced_cons_switch, and structurally-static companion recursions (execIRStmts_splicedCases/_splicedDflt) in the main mutual induction. The end-to-endguardedUnittheorems (#2294) inherit the widened fragment with no change — the guarded correspondence now covers every loop-free compiled body with modeled exits.Validation: full
lake buildOK,make checkall passed, no sorry/admit/new axiom.Note
Medium Risk
Changes are proof-only but extend a critical IR correctness chain (non-reentrant guard /
guardedUnit); errors would be in formal reasoning, not runtime code.Overview
Extends the lock-release splice simulation fragment so
switch(case arms and default) is no longer excluded:SpliceSimnow mirrorsLoopFreewithSpliceSimCases/SpliceSimDflt, andSpliceSim.loopFreeproves the fragment still implies loop-freedom.Adds the switch cons-step machinery for
execIRStmts_spliced:find?_spliceCases(branch lookup commutes with splicing),spliced_case_bound_le(fuel bounds for spliced arms),spliced_cons_switch, and mutual companion lemmasexecIRStmts_splicedCases/execIRStmts_splicedDfltwith explicittermination_by/decreasing_byon the main induction.Registers the new lemmas in
PrintAxioms.leanand allowlistsspliced_cons_switchincheck_proof_length.py(theorem count 6239 → 6247).Reviewed by Cursor Bugbot for commit 6474250. Bugbot is set up for automated code reviews on this repo. Configure here.