Skip to content

[Lean] Add checked binary count dispatcher - #511

Draft
jamesyc wants to merge 4 commits into
CrocSwap:mainfrom
jamesyc:lean/binary-count-dispatcher-20261011
Draft

jamesyc wants to merge 4 commits into
CrocSwap:mainfrom
jamesyc:lean/binary-count-dispatcher-20261011

Conversation

@jamesyc

@jamesyc jamesyc commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Completed chunk and coverage

Adds a concrete seven-state, two-tape, three-symbol binary count dispatcher. For every finite input word and supplied fixed-width counter, it reaches the specified halted endpoint with value (initial value + input length) modulo 2^width. Empty input, zero width and overflow are covered. The checked transition bound is CarryTape.pass's read receipt plus 2 * input length + 1.

Finite coverage: explicit transition tables, marked blank endpoints and supplied-width modular counting. This is not a replay of the complete selected source program.
Conditional-interface coverage: exact CurrentMain.FixedTapeMachine controller and carry-pass interface, including successful-prefix simulation and actual-symbol restart.
Full-theorem coverage: no full multiplication theorem, kappa theorem, width allocation, compact output, cross-model linear amortized bound, source prelude/caller or Plan/Budget composition.

Author-checked kappa and exact pins

Base: 12a4934.
Head: 79f7c03.
Explicit author-checked selected conditional project kappa = 90446448750933/125000000000000000 = 0.000723571590007464. The captured selected-result and linked certificate agree. This is source-matched project context, not a kappa bound proved by this helper; all-size compiler, weighted/common-ancestor chart, restored-row, selector/routing, prime-supply, precision/recovery, complex-symbolic and analytic-transfer assumptions remain.

Reuse and attribution

Compared with merged #64: its richer literal counter/stack, directional, exterior-tape, first-completion and amortized results are acknowledged. Binary increment is not claimed as new. This chunk adds the explicit symbol-driven restart controller and its two-tape endpoint in our current machine model. PR64-to-current-model arithmetic transport remains open.
Two exact foundation sources are reused from #488 at edd3102; that PR need not be merged. Four source files are included here. Apache-2.0, source attribution and OpenAI-assistance disclosure are preserved.

Validation and reproduction

Offline Linux/Python3/Lean4.21 checker, no Mathlib or downloads. See research/lean-binary-count-dispatcher/README.md and FOUNDATIONS.json for the separate exact foundation checkout and fresh build-directory command.
Fresh isolated six-module replay: 8.8320 compiler seconds, 0.00303 queue seconds, peak virtual memory 2,735,955,968 bytes. All six object hashes and 36 axiom outputs match accepted evidence. Source/hash manifests, author check, complete scope and replay receipts are included. These local kernel results are separate from fork CI and upstream CI/maintainer gates, which are not claimed passed here.
One additive commit, 17 files, no inherited root changes.

jamesyc and others added 4 commits October 11, 2026 16:02
Six-module offline replay; four included Lean sources with two pinned PR488 dependencies. Supplied-width modular count helper only. Author-checked project context kappa=90446448750933/125000000000000000 at base12a4934. No full multiplication or kappa theorem claimed.
This commit changes one file only: research/joint-dual/SOURCE.json. Its Makefile and README.md SHA256 values are reconciled to the reviewed existing 12a4934 bytes. The Makefile and README files themselves are not edited. The other 49 source pins are unchanged. Historical-to-current source review found only integration-target and introductory-documentation changes. No certificate file changes are included in this commit. Full verification is not claimed.
Changes exactly two files: joint-dual-kappa.json source_manifest_sha256 and joint-dual-validation.json certificate_sha256. These complete the reviewed SOURCE.json reconciliation in 8c9ba0c. Every numerical and historical validation field is unchanged. The existing PASS receipt remains historical; this commit does not claim a fresh physical-word or CRT replay. The unchanged full verifier must pass on this exact head. Independently checked: four digest changes across the three-file repair, unchanged 47 positive constraints and seven margins, and author-checked historical kappa 4764513337/100000000000000.
The joint-dual check froze these three files by hash, but nothing in its
computation reads them. Any edit to them, even a README typo, therefore broke
`verify_joint_dual.py` until the manifest, `joint-dual-kappa.json` and
`joint-dual-validation.json` were regenerated.

Remove the three names from the pin script and from the closure check, re-pin,
and regenerate the two derived certificates. The conditional kappa and every
mathematical field are unchanged; the diff to the certificates is hashes only.
Update the current reproduction guide's "Shared source bindings" section.
Earlier round notes that describe the old binding are left as historical.

(cherry picked from commit f8c4314)

(cherry picked from commit 1fa0915)
@jamesyc

jamesyc commented Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

CI provenance repair: current head is 9a20ad0. The original Lean package remains unchanged at 79f7c03. Two follow-up commits change exactly four digest values in three JSON files: the Makefile/README source pins, the source-manifest digest in joint-dual-kappa.json, and its digest in joint-dual-validation.json.

The exact d697aaa-to-12a4934 comparison lists 590 changed paths and intersects all 51 frozen joint-dual source paths only at Makefile and README.md. Their reviewed changes add newer integration targets and introductory result documentation; the joint-dual recipe and all scientific code/data pins are unchanged. No assertion, workflow or scientific test was removed.

Local independent checks verified inverse byte substitutions, the hash chain, unchanged numerical payload, all 47 stored positive constraints and seven margins. Author-checked historical joint-dual kappa remains 4764513337/100000000000000; selected-main conditional kappa remains 90446448750933/125000000000000000. Neither is newly proved by this provenance repair.

The existing numerical PASS receipt is historical; updating its certificate digest does not claim a new physical-word/CRT replay. The unchanged full verifier is now queued on the final fork head: https://github.com/jamesyc/integer-mult-bounds/actions/runs/38185514421 . Upstream workflows still require maintainer approval.

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