Skip to content

Build a clean finite-window sampler for all denominator-52 pairs - #7773

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

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

Conversation

@aliromman

@aliromman aliromman commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Scoped circuit construction: a clean fixed-L window now handles every one of the 2,704 actual denominator-52 residue pairs. It returns the original ordered label and first stopping depth, or an explicit censored result. The exact bill is 3643+1956L X/CNOT/Toffoli gates and 610+51L clean work bits, including weight preparation, the four-coin prefix, retained history and cleanup. No new kappa or unbounded physical sampler follows.

Read the all-L proof and complete contract, circuit generator, exact bills and certificates, checker, source pins and credits.

The inputs are two six-bit residues and L resident coin bits. The XOR output contains a completion bit, two label bits and bit_length(L+1) depth bits. A censored result has label zero and depth sentinel L+1. All input bits remain unchanged and every work bit is restored. The fixed circuit can read all L coins even when the reported first stopping depth is smaller.

The circuit uses direct modulus-2704 residue doubling throughout. It retains the successive 51-bit states, copies the answer, then reverses preparation and every draw. It therefore handles the first-entry/cyclic-return collision from PR #7757 without identifying the two predecessor packets. Monotone completion flags give a telescoping XOR depth word in exactly 2L+2 gates.

Resource Exact count
X, with p=popcount(L+1) 260+180L+p
CNOT 2449+1436L-p
Toffoli 934+340L
Clean retained history 51(L+1) bits
Reused clean temporary area 559 bits

Under fresh independent fair coins, completed label-i mass is exactly floor(2^L w_i/2704)/2^L, and censoring has probability at most 3/2^L. These are unconditional masses. Discarding censoring or restarting a fresh truncated draw is not an exact replacement for the original product law.

Python 3.12 and the standard library:

python3.12 -B scripts/research_package.py --package research/inverse52-window-circuit

Both modes print:

PASS_INVERSE52_WINDOW_CIRCUIT
All 2704 source pairs; fixed-L ordered label/depth or explicit censoring; inputs and work restored
Exact gates 3643+1956*L; clean work bits 610+51*L; output bits 3+bit_length(L+1)
Complete prefix and periodic transition domain; full windows at L=1,4,8; all stopping prefixes at L=16
Literal forward/inverse, arbitrary output XOR, source prefix and censoring-law checks pass

All 2,704 bounded owner witnesses, runtime weight preparations and residue doublings pass. The complete prefix and one periodic tail cover 1,678,810 source edge visits and 107,158 distinct live edges. Including all absorbed labels, all 338,910 distinct transitions pass full Boolean forward/inverse checks. Whole-window replay covers every pair and coin string at L=1,4,8, including 692,224 length-eight cases. At L=16 it covers 153,434 distinct stopping-prefix/extreme-suffix and live-prefix cases; this is not all length-sixteen coin strings. All 43,264 length-four cases agree with the unchanged source prefix. Ordered-label and omitted-cleanup mutants fail, as do changed input, coin, depth and work-wire controls.

Twenty-one retained files are authenticated. The unchanged primitive source, normal/optimized registered replay, final metadata validation, syntax/indentation, committed bytes/source history/modes, export and sealed read-only Git-free serial replay 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.

Nick Petalas (@petalas) supplied PR #7746's Boolean primitives and checker. JoyboyBrian (@JoyboyBrian) supplied PR #6096's actual residue domain, owner constructor and mode columns. zxv (@zxv) supplied PR #6072's ordered graph and probability law.

Ali Romman (@aliromman) supplied PR #7757's entry collision and prefix function, PR #7760's prefix/return handoff, and PR #7755's interpreter pattern. All earlier author/license notices and the credited normalizer/native lineage remain intact.

The all-L statement is written mathematics with finite Boolean evidence. No full unbounded sampler, physical tape layout or actual caller installation is supplied. Owner-to-residue extraction, fresh-coin delivery, output retention and censored continuation remain unpriced. The full source kernel fixtures, phase-entry/runtime/tail suites, historical probability catalogue, selected cold replay, Lean and Docker were not run. All five framework assumptions and the selected frontier remain unchanged. No independent human/formal-kernel acceptance, global literature priority, gate optimum or minimum-space claim is made.

Base: canonical main e54523517d0f03e58352e647c403a5af3e525a57, priority revision 8. Source pins do not assert ancestry. 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