Repository navigation
[Lean] Derive #540's pending ranges from the PR442 schedule (stacked on #540; no new kappa) - #1231
Open
Mister-Meeseeks wants to merge 1 commit into
Open
Mister-Meeseeks wants to merge 1 commit into
Mister-Meeseeks wants to merge 1 commit into
Conversation
A companion to #540 that leaves PR540's files untouched. A Python-extracted literal of the hosted bit schedule and the route blocks defines levels, pending sets and windows in Lean 4.21. decide then proves: - the idle ranks; - the stage-2 windows; - that every target mask is a slice of the derived pending axes; - that PR540's hand-supplied pendingTag equals the derived mask. The selected-invocation completion is restated with the derived mask. Six mutations each fail by decide. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
100-PR batch review at This remains open after scoped triage. Next review step: Lean contribution needs pinned dependency preparation, full module build, source binding and axiom/mutation checks. Python extraction alone is not formal acceptance; keep separate from selected theorem claims. This is a specific continuation point, not a rejection or a request to redo already recorded checks. Completed local evidence is retained separately from outstanding whole-head obligations. Batch review, attribution and evidence. Thank you for the contribution. |
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.
Stacked on #540 (base branch
stack/pr540-base= #540 headacc19170). Once #540 lands, this PR retargets tomain. It adds one directory,research/lean-pending-derivation/. No #540 file is changed, so #540's hashed manifests and receipts stay valid.What it closes
#540's
PhysicalSourceConnection.pendingTagsupplies the pending ranges[15,22)and[1,29)by hand. Its README notes that "neither Lean nor the source-extraction check binds these ranges to the source schedule". #1228 derived them in Python. This PR does the derivation in Lean 4.21 and proves it equal to #540's actual definition.Theorems
All are proved by
decide, using onlypropextandQuot.sound(some use no axioms).PendingDerivation.idle_ranks_and_nesting: for all 10 idle events, levels nest and the derived pending size equals the scheduled rank.pending_child1 / pending_child2:[15..21]and[1..28].hosted_windows: for all 16 tags, stage 2 is in the child's window, the host pair is not pair 0, andoffset+width ≤ |pending|.target_derived: every extractedtargetMaskis exactly the[offset, offset+width)slice of the derived pending axes. This also checks the extractor's hard-coded bases.PendingBinding.pendingTag_derivedandpending_eq_derived: [Lean] Verify one literal PR442 invocation against the multi-host contract #540'spendingTagandpendingequal the derived masks.PendingBinding.selected_invocation_completion_derived: [Lean] Verify one literal PR442 invocation against the multi-host contract #540's completion theorem, restated with the derived mask.Definitions: L₋₁ = {0}, L_ℓ = [0,8) ∪ E₁ ∪ … ∪ E_ℓ (E_s = exterior axes of the stage-s route), pending = L_target \ L_source, and windows follow PR442's last-touch rule. The schedule and blocks are a Python-extracted literal (
generate_pending_schedule.py --check, byte-exact against #540's pinned inputs). This is the same trust boundary as #540's other literals.Six mutation controls each fail because
deciderefutes the mutated statement:Not covered
B_port ⊕ I₅₆chart) is not proved. It is constrained only by ranks, nesting and the extracted target masks.Reproduce
verify.pyruns the generator check, compiles the three modules against #540's build throughlake env, audits the axioms of all seven theorems and runs the controls.Credit: the Lean formalization, ownership literals and gap identification are cheesegrader's #540. Construction and hosting are from #434/#442, and the bit geometry is from PR386. The Python predecessor is #1228. Prepared by Douglas Colkitt with substantial Claude (Anthropic) assistance. Apache-2.0.
🤖 Generated with Claude Code