Skip to content

Add staggered dual-paired rational-center and bit producers (κ = 8.032517e-5 complex-only / 8.800233e-5 joint) - #121

Closed
Th0rgal wants to merge 3 commits into
CrocSwap:mainfrom
Th0rgal:research/staggered-rational-centers
Closed

Th0rgal wants to merge 3 commits into
CrocSwap:mainfrom
Th0rgal:research/staggered-rational-centers

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Oct 9, 2026

Copy link
Copy Markdown

Summary

Supersedes #104 (research/stopped-product-rational-centers) and #107 (research/reversed-rational-centers) by replacing the binary-tree prefix/suffix schedules inside the $(h, d) = (24, 24)$ rational-center complex producer and the $h = 23$ positive-label bit producer with staggered dual-paired linear-chain schedules (research/staggered-rational-centers).

Both the complex-only bound (holding #104's frozen stopped-product-bit-axis.json and parent.AB = 803380799 / 10^13 fixed) and the joint bound (regenerating both the $h=23$ positive-label bit producer and the $h=24$ rational-center complex producer from source through the unmodified C++ maximum-cardinality bipartite matchers) are verified in research/staggered-rational-centers/verify.py:

Metric PR #104 (stopped-product-rational-centers) PR #107 (reversed-rational-centers) This PR (Complex-Only) This PR (Joint Bit + Complex)
Complex height / degree $(h, d)$ $(24, 24)$ $(24, 24)$ $(24, 24)$ $(24, 24)$
Complex addition gates $c$ $47,796$ $47,796$ $48,958$ $48,958$
Complex non-output non-input gates $q$ $6,958$ $6,958$ $8,120$ $8,120$
Complex matched pairs (match_complex_general) $9,836$ $9,836$ $18,038$ $18,038$
Complex recursion roles $R = c + q - 2\cdot\text{matched}$ $44,918$ $44,918$ $39,040$ ($-5,878$) $39,040$ ($-5,878$)
Complex rank sum / $\ell$ $976,842$ / $552$ $975,786$ / $552$ $938,064$ / $552$ $938,064$ / $552$
Certified complex floor $b$ $7.798287495 \times 10^{-5}$ $7.801725496 \times 10^{-5}$ $8.801801147 \times 10^{-5}$ $8.801801147 \times 10^{-5}$
Bit $h=23$ roles $R_{\text{bit}} = c + q - 2\cdot\text{matched}$ $38,776$ $38,776$ $38,776$ (inherited) $34,014$ ($-4,762$)
Certified bit saving $AB$ $8.03380799 \times 10^{-5}$ $8.03380799 \times 10^{-5}$ $8.03380799 \times 10^{-5}$ $8.921551719638 \times 10^{-5}$
Headline certified saving $\kappa$ $7.7950234824805 \times 10^{-5}$ $7.7984487412405 \times 10^{-5}$ $8.0325171150015 \times 10^{-5}$ $8.8002329264725 \times 10^{-5}$

Key Mechanisms

  1. Staggered Dual-Paired Prefix/Suffix Strip Schedules (StaggeredPairedTriple):

    • At even indices $i$, prefix advances via paired sums add(prefix[-2], add(values[i-1], values[i])); at odd indices $i$, suffix advances via paired sums add(suffix[-2], add(values[n-1-i], values[n-i])).
    • Every intermediate gate in a paired step has one fan-in at odd distance and one fan-in at even distance in the linear chain, making all paired partial sums eligible under match_complex_general.cpp (non_overlap, valid_S, valid_T) and match_positive_dag.cpp.
    • At the top level of two[u,v] (len(values) == 11, len(vals) == 10), keeping prefix unpaired while pairing suffix at odd indices $i \in {1, 3, 5, 7}$ preserves all 10 suffix[i] nodes in lookup[s] (so pre[2], pre[4], \dots, pre[20] in complex.py hit lookup with zero duplicate gates) while matching (suffix[2m], suffix[2m-1]) via suffix[2m+1] and q_m = add(vals[2m-1], vals[2m]) into prefix[2m+1] via vals[2m].
  2. Linear-Chain Block, Coarse, and Coefficient Aggregations (rtotal):

    • Replaces balanced binary trees in block, coarse, and coeff with reverse linear fold rtotal while keeping binary-tree total inside result[excluded] so 1-, 2-, and 3-survivor inclusion-exclusion partial sums remain shared.
  3. Leave-One-Pair-Out Readout Bridge & Same-Group Pair-Star Prefix Pairing:

    • In complex.py (StaggeredComplexProducer), when (a ^ 1) != b and 2 <= j < 18 and (i // 2 < a // 2 or (j // 2) % 2 == 0), missing[p][q] is assembled via the leave-one-pair-out bridge add(add(pre[jj], suf[jj + 2]), w[jj ^ (1 - (j & 1))]) (jj = j & ~1), aligning with the odd-step suffix pairs from two[u,v] and eliminating 680 high-rank gates.
    • For the 12 same-group pair stars (a ^ 1) == b (skipped by two[u,v]), pairing pre at odd idx_w < 20 reuses add(w[idx_w-1], w[idx_w]) from suf via lookup with zero extra gates and adds 54 matched pairs.

Verification

python3 -B research/staggered-rational-centers/verify.py
python3 -B research/staggered-rational-centers/test_controls.py
python3 -B research/reversed-rational-centers/verify.py
python3 -B research/reversed-rational-centers/test_controls.py

Prepared by Thomas Marchand with Google Antigravity assistance.

@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

Thank you @Th0rgal. This contribution is now recorded on main in the scoped reconciliation review and contributor credits.

Contribution: Staggered prefix/suffix pairs with compatible supports.

Review and limits: Exact-head CI evidence; joint and complex-only snapshots remain distinct.

The complete original source, proof/research notes, notices and relevant replay/CI evidence are retained through the pinned source archive. The review distinguishes fresh runs, exact-head historical CI and prior integration evidence. Closing this historical PR as reconciled; its obsolete headline does not replace the current selected bound, and draft/retracted claims retain their explicit qualifications.

Reviewed head: 446dd07dbe14f6dcfcca629f3a9cb01cb148f003. Publication: b84ba67156a01f9c2cb34fe1e3cb1dcdeab00d9c.

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.

4 participants