Repository navigation
Formalize P104 transport transcript capacity in Lean - #2178
Merged
Merged
Conversation
Machine-checks the chronological step behind the P104 transport floors of PR CrocSwap#2127 and CrocSwap#2148, as requested in PR CrocSwap#2163's handoff. In an inductive linear execution grammar (source-independent initialization; free same-side work, storage and return traffic; one D-valued message per counted receive), every target-side state factors through a transcript of n whole arrays, so its source dependence has rank at most n*dim D and recovering m independent arrays needs m <= n. The 96-transport and 48-rank floors follow as conditional corollaries. Lean 4.21.0 with pinned Mathlib: 13 theorem roots audited to the standard axioms only, 8 rejected formal controls. A Python binder reconstructs the PR CrocSwap#1972 witness and regenerates SourceCut.lean's finite facts, which the kernel checks by decide. The native-event-to-model translation stays written; no supplier or kappa change. Adds research/lean-transport-cut/ and its path-filtered workflow .github/workflows/lean-transport-cut.yml. Submitted by @commdata2338 with substantial AI assistance (OpenAI Codex research and implementation; packaged with Claude Code). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X86sCSXdoDd61SDFfC1PKG
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.
Change and mathematical scope
This machine-checks the chronological step behind the P104 transport floors of Ross Richardson's PR #2127 and Nick Petalas's PR #2148, the "+1 array per added transport" implication that Michael Yee's PR #2163 asked to have formalized.
TransportCut.lean):Runs n s t, wheresandtare the source-dependent linear blocks of the source-side and target-side states. Its four constructors:init(arbitrary source-side input, zero source dependence on the target side);source(any linear update of the source side from both sides, so all return traffic is free);target(any linear endomorphism of the target side); andreceive(one element ofDread from both sides, with the target updated byA t + B z, the only constructor that increases the count n). Copies, storage, basis changes, feedback and cycles in the static frame graph are all included.runs_factor, under which every target-side state factors through a transcript of n whole arrays (t = decode ∘ encode,encode : X → (Fin n → D));runs_rank, giving rank at mostn · dim D; andrecovery_requires_receives, under which exact recovery of m independent arrays by any linear readout of all target storage needsm ≤ n.one_receive_attainsshows the bound is attained. PR Prove P104 transport floor with arbitrary added storage #2127's 96-transport floor and PR feat(research): price escape from refined P104 intervals #2148's 48-rank floor follow asp104_unsplit_floorandp104_refined_floor, conditional on their source and cut translations.SourceCut.leanandverify.py): a Python binder reconstructs PR Draft construction: P104 dirty-restored gather and low-rank channel with COPY56 (no new kappa) #1972's witness (4,058 events, 1,410 transports, 444 frames split 222/222, 104 source entrances and target exits, and exactly eight inward C descents at events 2463 to 2518) and regenerates the Boolean facts inSourceCut.lean, which the kernel checks bydecide(notnative_decide). Interpreting the JSON into frames stays in Python, outside the kernel..github/workflows/lean-transport-cut.yml: read-only permissions, credentials not persisted, the same pinned checkout and setup-python actions as the existing workflows, and the checksum-pinned official Lean 4.21.0 release. It runs the same commands as below. Hosted CI has not been observed for this contribution.Remaining obligations. The native-event-to-
Runstranslation is written, not formalized. The refined separator and its crossing-count premise (PR #2136, #2148) remain outside Lean. No native phase, owner or hosting realization; no physical transport tariff, coverage credit, precision or tape proof, all-size lift or selected cold replay. No independent human review.Task and overlap
formal-interface-lemma(636f26dec98e26b296e8), refined toP104/chronological-transcript-factorization/arbitrary-linear-feedback/Lean. Chooser noncec0ba36ea40e7964ca3d6bcd152c6c2cf, track recursive-interfaces, priority revision 4. Following revision 4's preference for a live central handoff, this was taken over the chooser's suggestions (centre-path-sharing, whose nearest native lift is this account's PR Scoped proof: PR1918's selected centre-source minor lifts to native rank 8192 (no new kappa) #2048;connector-alphabet-change, whose immediate cases are covered;coverage-law-change, with no concrete new identity). No reroll.0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2, rechecked unchanged at 22:12 UTC; contributiona553060b8fa93b2eadfac00834cc8ccc8dc0415e. PR Prove P104 transport floor with arbitrary added storage #2127befebf0f4ae7a3f69fe9c5e136262559dcac125f, PR feat(research): price escape from refined P104 intervals #2148937b132f3f143ce0f2621b3b12e1ebc413e66730and PR Independent max-flow audit of the P104 rank-eight cut family (no new κ) #21639f6e1f2783aef0c52bb3f26f587a918a8be32fa9(reconfirmed by anonymous fetch). Scientific input: main's PR Draft construction: P104 dirty-restored gather and low-rank channel with COPY56 (no new kappa) #1972 witness, SHA-2560f541bef7f19fdeffd67157684e9f03d785f42c89973632f508fc1a0452b580e. Lean 4.21.0 and Mathlib308445d7985027f538e281e18df29ca16ede2ba3are pinned inlake-manifest.json.Validation
python3 -I -B scripts/research_package.py --package research/lean-transport-cut cd research/lean-transport-cut lake exe cache get Mathlib.LinearAlgebra.Dimension.Constructions Mathlib.LinearAlgebra.FiniteDimensional.Basic python3 -I -B check_lean.py --lake lakeLinux x86_64, CPython 3.12.3, Lean 4.21.0. The registered Python replay (source binding, 12 finite and source controls, 8 artifact groups) deliberately does not compile Lean.
check_lean.pyvalidates every dependency head, compiles both files afresh with warnings as errors and at most four Lean workers, audits all 13 theorem roots (onlypropext,Classical.choiceandQuot.soundare allowed; SourceCut's six finite facts use no axioms), and requires eight weakened variants to fail: an uncharged receive, an informative outside initialization, the false floors 97 and 49, asorry, a custom-axiom proof, a missing recovery probe and an undercounted original cut. The custom-axiom and missing-probe controls must compile and then fail the audit, so a syntax error cannot pass for audit coverage.Both were run again on the final package bytes before submission, under an 8 GiB memory cap: the Python replay in about 4 seconds and the Lean check in about 30 seconds, leaving the worktree unchanged.
FORMAL-RECEIPT.jsonrecords that local run: compiler, dependency heads, proof hashes, theorem axioms and the rejected controls.Credit
New work is Apache-2.0; retained notices are unchanged.
AI assistance: submitted by @commdata2338 with substantial AI assistance. OpenAI Codex (GPT-6 Astra) did the formalization, the implementation, the checking and the writing; it was packaged and submitted with Claude Code. No independent human review is claimed.
Open next questions
From the package README:
Runstranslation. It would remove the written bridge for arbitrary retained-occurrence programs. First step: a typed register and frame semantics, with a proof that each primitive has one of the four constructor forms. Blocker: agreeing on the allowed initialization, array width and cross-chart access rules.n ≤ 8 + B; the next step is a kernel proof of that premise from the survivor separator and nested paths. Blocker: the finite-subspace and interval model, not the 56/8 arithmetic.Workflow feedback (optional)
🤖 Generated with Claude Code
https://claude.ai/code/session_01X86sCSXdoDd61SDFfC1PKG