Skip to content

Formalize P104 transport transcript capacity in Lean - #2178

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
commdata2338:lean-transport-cut
Oct 15, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
commdata2338:lean-transport-cut

Conversation

@commdata2338

Copy link
Copy Markdown
Contributor

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.

  • Model (TransportCut.lean): Runs n s t, where s and t are 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); and receive (one element of D read from both sides, with the target updated by A 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.
  • Theorems: 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 most n · dim D; and recovery_requires_receives, under which exact recovery of m independent arrays by any linear readout of all target storage needs m ≤ n. one_receive_attains shows 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 as p104_unsplit_floor and p104_refined_floor, conditional on their source and cut translations.
  • Source binding (SourceCut.lean and verify.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 in SourceCut.lean, which the kernel checks by decide (not native_decide). Interpreting the JSON into frames stays in Python, outside the kernel.
  • Status: a scoped formal proof plus a finite source-binding certificate. The transcript and rank method is standard; the contribution is its formalization and source binding. No supplier or κ change.
  • CI: following the repository's per-package workflow convention, the PR adds a path-filtered .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-Runs translation 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

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 lake

Linux 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.py validates every dependency head, compiles both files afresh with warnings as errors and at most four Lean workers, audits all 13 theorem roots (only propext, Classical.choice and Quot.sound are 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, a sorry, 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.

PASS_TRANSPORT_CUT_BINDING sources=104 crossings=8 transports=1410 controls=12 formal_not_run
PASS_REGISTERED_RESEARCH_PACKAGE research/lean-transport-cut outcome=completed
PASS_LEAN_TRANSPORT_CUT theorems=13 rejected_controls=8 no_sorry_or_custom_axioms

FORMAL-RECEIPT.json records 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:

  1. Formalize the native-event-to-Runs translation. 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.
  2. Formalize PR Rule out identity from nested P104 transport refinements #2136 and feat(research): price escape from refined P104 intervals #2148's refined crossing count. The rank theorem already accepts 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

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
@Mister-Meeseeks
Mister-Meeseeks merged commit 7191058 into CrocSwap:main Oct 15, 2026
56 of 62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants