Skip to content

Reduce exact sampler clean work with optimal block checkpoints - #7782

Open
aliromman wants to merge 1 commit into
CrocSwap:mainfrom
aliromman:codex/consecutive-result-091
Open

aliromman wants to merge 1 commit into
CrocSwap:mainfrom
aliromman:codex/consecutive-result-091

Conversation

@aliromman

@aliromman aliromman commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Sampler workspace construction: the exact denominator-52 finite-window service now uses 559+51*ceil(2*sqrt(L)) clean work bits, with a linear Boolean gate count. It preserves every ordered label, first stopping depth, explicit censor flag and arbitrary-output XOR result from PR #7773. All inputs and clean work are restored. No new kappa or complete physical sampler is claimed.

Read the all-L proof and exact bill, full gate generator, certificate, checker, source pins and credits. The consumed source head is c1fe18fbca499b50c3bbfb12e11218ee9b6acf01.

Window Original clean bits New clean bits Original gates New gates
16 coins 1,426 967 34,939 58,693
64 coins 3,874 1,375 128,827 238,965
127 coins 7,087 1,732 252,055 475,729

These are complete logical gate and wire counts. The 12+L read-only parameter/coin wires and 3+bit_length(L+1) output wires remain separate. Resident coin storage still grows linearly. This is a reduction in additional clean work with more recomputation, not a physical runtime or total-space speedup.

The circuit retains block endpoints and reuses one local history bank. It accumulates each stopping-depth term exactly once while that state is available. It then clears checkpoints in reverse order. The short block goes first; a full last block saves recomputation. Among all partitions in this one-level architecture, the selector first minimizes clean work and then minimizes gates. No optimum over arbitrary circuits or deeper checkpoint schedules is claimed.

For maximum block B, K blocks and last-block length r, there are D=4*L-2*r draw-oracle calls. The exact gate count is 3643+977*D+102*(K-1)+2*L; clean work is 559+51*(B+K). The selected partition has B+K=ceil(2*sqrt(L)). Preparation, copies, partial blocks, answer extraction and all cleanup are included. The original full-history circuit is an executed positive control.

Python 3.12 and the standard library:

python3.12 -B scripts/research_package.py --package research/inverse52-block-checkpoints

Both modes print this prefix and elapsed seconds:

PASS_INVERSE52_BLOCK_CHECKPOINTS 940486 whole-wire cases 524800 block choices

The certificate covers all coin strings for all 2,704 source pairs at L=1,3,4,8; every stopping prefix with both constant suffixes and every live prefix at L=16; named larger-window and alternative-block cases; 524,800 block choices; and all 65,535 ordered partitions through L=16. It checks every wire forwards and backwards. Dirty outputs pass; omitted checkpoint cleanup and a missing boundary-depth term fail. The unchanged preparation and residue arithmetic also run. The full predecessor periodic-edge suite is retained, not rerun.

All 32 source files are authenticated. Normal/optimized registered replay, syntax/indentation, committed bytes/source history/modes, export, sealed read-only Git-free serial replay and publication checks pass. Hosted CI did not certify this package. The plan job failed in the shared test_current_ci_section_matches_selected_record: the base guide names frontier6030 while the selected record requires make frontier7000-verify. The log reports 760 tests, one failure and 24 skipped; package replay was skipped. This package changes no shared CI file. Local replay remains the scientific evidence.

C. H. Bennett supplied classical reversible checkpointing. Ali Romman (@aliromman) supplied the source finite-window proof, gate operations and checks. Nick Petalas (@petalas) supplied the underlying arithmetic gates in PR #7746. The retained credit chain credits JoyboyBrian's actual inverse domain and zxv's decision graph. The related batched-lifting checkpoint work in PR #3122 and PR #3129 uses a different machine contract; its physical tariff is not transferred.

This remains a censored finite service. Discarding or restarting censored draws is not justified. Unbounded sampling, fresh-coin delivery, owner extraction, tape movement, clean-stock funding and caller installation remain open. No selected cold replay, Lean, Docker, independent human or formal-kernel acceptance is claimed. All five assumptions and the selected frontier remain unchanged.

Base: canonical main e54523517d0f03e58352e647c403a5af3e525a57, priority revision 8. Prepared by Ali Romman with substantial OpenAI Codex assistance in research, implementation, verification and writing. Apache-2.0. Canonical claim.

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.

1 participant