Skip to content

[Lean] Bound automatic-width counting by 12n+4 - #526

Draft
jamesyc wants to merge 2 commits into
CrocSwap:mainfrom
jamesyc:lean/count-receipt-amortization-20261011
Draft

jamesyc wants to merge 2 commits into
CrocSwap:mainfrom
jamesyc:lean/count-receipt-amortization-20261011

Conversation

@jamesyc

@jamesyc jamesyc commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Completed chunk and coverage

This supplement connects PR64's fixed-direction potential bound to the actual automatic-width counter in #519. For every finite Boolean word of length n, including empty input, the existing ten-state, two-tape machine reaches its exact halted endpoint at some t <= 12*n+4. Input starts at its represented right blank and the counter tape starts pristine.

Finite coverage: exact receipt equality for arbitrary widths/starting words, pass.reads = CounterArithmetic.totalSteps true n bits + 2n; hence pass.reads <= 6n+2width. With #519 allocation/controller overhead this yields 12n+4. Counter width and stored value are n.
Conditional-interface coverage: the exact pinned CurrentMain.FixedTapeMachine and PR519 endpoint.
Full-theorem coverage: no full multiplication or kappa theorem, first-completion claim, compact-output normalization, input-preparation-to-counter composition, selected source caller, or Plan/Budget discharge. All-size compiler, chart/routing, prime-supply, precision/recovery, complex-symbolic and analytic-transfer obligations remain.

Pins and explicit author-checked kappa

Base: 12a4934.
Head: e7d6dc6.
Author-checked conditional project kappa = 90446448750933/125000000000000000 = 0.000723571590007464, matched to the selected-result and retained PR279 certificate at that base. This is conditional project context, not a kappa theorem proved here. AUTHOR_CHECK.json records the author check.

Reuse and attribution

Three source files only: five unchanged list definitions extracted from PR64; its original arithmetic declaration/proof bodies with explicit import/local registration/elaboration-control notices; and the receipt-transport bridge. PR64 already supplies the potential proof and richer generic counter/first-completion results; no new generic counter algorithm is claimed.
Nine unchanged dependency sources are hash-pinned to #488 at edd3102, #511 at 79f7c03, and #519 at ffd3c48. None is assumed merged. Later CI provenance changes do not alter those source blobs.
Apache-2.0, source attribution, modification notices and OpenAI-assistance disclosure are preserved. Duplicate comparison covered #64, #511 and #519; this adds the concrete receipt bridge and bound.

Validation and reproduction

Lean 4.21.0, Mathlib 308445d7985027f538e281e18df29ca16ede2ba3; offline Python checker. README gives the exact command with three foundation worktrees and a fresh output directory. The checker validates 12 sources, 1,366 existing runtime source/object pairs and all 79 complete axiom probes. Only standard propext, Classical.choice and Quot.sound occur.
Completed reproduction: 17.7186 compiler seconds, 0.00557 FIFO seconds, peak VM 3,074,072,576 bytes. Ten verified fresh outputs were retained after a public notice syntax error; an independently reviewed one-byte ordinary-comment fix and guarded two-root suffix completed the replay. REPLAY_SUMMARY preserves this sequence. Eleven objects match research; the public arithmetic copy has its own accepted object. No unchecked failure is counted as a pass.
One additive commit: 18 files, 24,180 additions, zero deletions, only research/lean-count-receipt-amortization. Most bytes are exact dependency evidence. No root files or scientific checks changed. Local kernel evidence is distinct from CI; this branch inherits the known joint-dual provenance issue pending separately authorized rollout of the repair tested on #511. Fork CI is not yet passed; upstream execution may require maintainer approval.

jamesyc and others added 2 commits October 11, 2026 17:54
Add 18 files only under research/lean-count-receipt-amortization. Reuse PR64 potential arithmetic with explicit attribution and exact receipt transport to PR519. Three sources and nine pinned external dependencies; complete twelve-source offline replay and 79 standard-only probes. Author-checked conditional project kappa 90446448750933/125000000000000000 at base 12a4934. No first-completion, five-tape caller, compact output or multiplication theorem claimed. Root files and CI workflows unchanged.
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)
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