Skip to content

Research: save 62 CK primitives per orientation by relocating one scale (no new kappa) - #750

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
thakrarsagar:research/complex-ck-scaling-fold-seed34
Oct 14, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
thakrarsagar:research/complex-ck-scaling-fold-seed34

Conversation

@thakrarsagar

Copy link
Copy Markdown
Contributor

The selected #626 CK cleanup doubles register 97 before 37 additions that read it. Moving that doubling after the additions and doubling their coefficients preserves the complete register map and saves 62 real-component primitives per orientation under the retained binary-Horner lowering.

Status: finite complex-supplier circuit improvement / research note; no new κ.

Complete CK program Before After
Forward real primitives 224,938 224,876
Inverse-transpose real primitives 224,986 224,924

Both exact positive prefix bounds remain unchanged at 40 and 62 bits. Source reads, coefficient preparation, signed accumulation, private clearing and the relocated scale are charged. Helpers, frames, recursive child profiles, wrappers and macro counts remain unchanged.

Only research/complex-ck-scaling-fold/ is added. It contains an executable local-program reconstruction, exact certificate, proof and accounting note, independent checker, local sprint claim and validation record. The selected emitter, global invoice, frontier and upstream/ are unchanged; production integration remains a separate obligation.

The completed search prices all 123 scales × 8,309 positions = 1,022,007 single-scale relocations of the pinned cleanup word. Its best complex-component delta is −31. An independent valuation-only implementation finds the same bound and all 644 minimizing placements. The chosen witness has the shortest displacement. This bound applies only to the stated fixed-word, single-relocation, original-Horner class, not arbitrary circuit synthesis or multiple relocations.

Reproduce

python3 -B research/complex-ck-scaling-fold/verify.py

Expected: PASS_CK_SINGLE_SCALE_RELOCATION candidates=1022007 saving=62/62 columns=38/38 controls=6.

python3 -B research/complex-ck-scaling-fold/independent.py separately checks all placements with dyadic valuations, both 38-column boundary maps using exact integer arithmetic, and eight adverse controls. The surrounding 678 register columns are unaffected by the changed interval.

Validation passed on macOS arm64 with CPython 3.14.8, including isolated optimized execution, invocation outside the repository, alternate gzip packaging, source/certificate rejection controls, selected-record verification and staged whitespace checks. Full make verify, cold selected replay, global admission, Lean and remote Linux were not run. Inherited all-size/compiler/realization/hosting/precision/tape/analytic assumptions remain; finite replay is not a formal multiplication theorem.

Base: 66849e1475c930fd7732b1a0067ffee7e1e95f60. Selected #626 source: 660de893d27bb7abd1d5b01b1640207528a5c851; #622: f69477f4f6d3c7eb1f740b166881bffed4ffa9f6; retained #543: 2065fe4f72a914d907f1046603f5a36f17018535. Consumed sources have full SHA-256 pins.

OS assignment seed 34 selected the complex track and CK. No pinned sprint issue existed, so the claim is local. The pre-submission refresh covered 566 open PRs through #747. Related #696/#723/#734 change within-macro lowering, #722/#739 share private coefficient work, #719 studies repeated-addition fusion, and #698 changes B frames. This contribution relocates a live CK cleanup scale and supplies an exhaustive class-specific optimum. No pending implementation is imported and savings are not asserted additive without a composed recount.

Credit to icekylinx's direct-delivery/emitter lineage, Jeremy Kothe's CK/K-triangle work, DreamingOfClouds' cold-helper and native checks, Chafik Boukhalfa's #626 package, eumemic's #543, and the retained predecessor notices. Prepared for @thakrarsagar with substantial OpenAI Codex assistance, including one separately implemented AI verification worker. No independent human review is claimed. New files are Apache-2.0.

@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

100-PR batch review at b6d6934092c063ab2575ebee00f48bbc7b1c9d82.

Merged to main, preserving the original contributor commits and package attribution.

Reviewed scope: CK scaling-fold rewrite across 37 legal reads saves 62 primitives per orientation; exact prefix and map checks.

The pinned scoped command passed; the batch ledger contains its command, input hashes, environment and log. This incorporates the research/tooling contribution and does not change the selected κ or discharge the inherited multiplication-theorem assumptions.

Batch review, attribution and evidence. Thank you for the contribution.

@thakrarsagar
thakrarsagar deleted the research/complex-ck-scaling-fold-seed34 branch October 14, 2026 19:57
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