Skip to content

Prove optimal linear-bit canonical rotation switch queries - #7734

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

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

Conversation

@aliromman

@aliromman aliromman commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

The exact canonical padded-rotation switch predicate has Theta(h) worst-case bit cost and O(h) temporary storage. A closed formula replaces the repeated descent in PR #7504, whose published arithmetic bound is O(h^2). A matching bit-probe lower bound makes the new order of growth sharp. This is an arithmetic construction with a scoped proof; No new kappa or complete physical caller improvement follows.

Read the proof, direct query, receipt, verifier, source pins and credit.

For height h, modulus s, offset a, row j and its current wire x, the formula is:

d = min(j, 2h-2-j),  M = 2^d-1,  t = x mod 2^d
A = floor((a+t)/2^d)
B = floor((s-a+M-t)/2^d)

Either zero length means identity. Otherwise one retained endpoint formula at height h-d and wire x shifted by d gives the exact canonical bit. The proof covers every legal height and handles offset reduction, empty children and padded-wire switches. It uses a fixed number of linear binary operations. The lower bound needs h-1 input-bit probes for padded offsets, or h-2 for minimal positive encodings, without query advice or preprocessing.

Check Coverage
Canonical graph compiler and source recurrence 1,633,182 entries each, all 2,793 networks at heights 1 through 6
Routed permutation endpoints 152,526 routed addresses
Closed descent 892,854 states
Wider queries 420 source comparisons through height 4096; explicit cases through height 65536
Rejection and sensitivity 12 invalid domains, 5 changed formulas, 8,479 one-bit changes

Python 3.12, standard library only:

python3.12 -B scripts/research_package.py --package research/rotation-switch-closed-descent

Both registered commands print:

PASS_ROTATION_SWITCH_CLOSED_DESCENT optimal O(h) bit query

Normal and optimized replay, committed bytes/source history/modes, package export and read-only Git-free serial exported 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. The executable height cap is 65536; the proof is not a finite-size extrapolation.

Nick Petalas supplied the endpoint and child theorem. Cinna Davis supplied the canonical compiler in PR #4100. Their retained executables are unchanged comparison dependencies. Jerry Chen's PR #7593, head 56335a406469fad85e88ff72820d506d8bea6f63, provides related fourteen-tape lowering of the earlier recurrence; this contribution does not replace its physical proof.

Current-state CRT offset production, serialized descriptors, owned predicate return, clearing, head restoration, payload consumption and complete workload pricing remain open. The comparison does not claim measured runtime speedup or a lower bound for preprocessed repeated queries. Historical suites, physical caller replay, selected cold replay, Lean and Docker were not run. All five framework assumptions remain and the selected frontier is unchanged.

Base: canonical main e54523517d0f03e58352e647c403a5af3e525a57, priority revision 8. The consumed PR7504 head is 7efb9a84277ec31abe2a934aeef8c8a70548aa5b; the canonical compiler pin is 337d04939571a637aeab54a0f58f54fde811663a. Six retained files have exact byte pins and preserved notices. No unmerged source ancestry is asserted. Prepared by Ali Romman with substantial OpenAI Codex assistance in research, implementation, verification and writing. This is source-aware author checking, not independent human or formal-kernel acceptance. 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