Repository navigation
Research: bidirectional Horner saves 312 SW4 primitives per orientation (no new kappa) - #837
Merged
Mister-Meeseeks merged 2 commits intoOct 13, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A dyadic coefficient can sometimes be built more cheaply by processing its digits from low to high, halving between reads. This contribution chooses between binary/NAF Horner in both directions while preserving the original per-macro scratch boundary. Finite complex-supplier circuit construction; no new κ.
Beyond the credited #696 copy/unit and #723/#787 forward signed-digit methods, this saves 312 real primitives per orientation on the #741 SW4 supplier selected at the starting base, plus 928 for historical CK and 810 for historical JP8:
Every source read, copy, shift, accumulation and clear is charged. All 716+9 checkpoint or 728+9 SW4 arbitrary input columns pass exact primitive replay, including dirty helpers and private scratch. Fresh positive prefix bounds remain within the inherited 192-bit local allowance. Frames, paid children and macro clearing boundaries are preserved. These are circuit counts, not measured runtime improvements.
Only
research/dyadic-horner-direction/is added: executable lowering, induction/cost proof, exact receipt, pins, separate integer checker, tests, local claim and validation.Expected: six programs, 962 distinct coefficients, additional savings
928,810,312per orientation, 14 adverse controls; the separate integer checker agrees on every coefficient and 13,286 grid inputs; eight tests pass. Both implementations were written by one AI agent, not independent human reviewers.Linux CPython 3.12.3 and 3.14.4 pass, including optimization, no site packages and minimal relocation. Source/receipt/typed-JSON/circuit corruption fails as intended; gzip/tar repackaging passes; existing output is preserved. Selected-record and staged whitespace checks pass. Full repository/cold supplier/global admission/phase-wrapper regeneration, Lean and hosted CI passes are not claimed.
Exact base:
7ee02b7c96d85f22b38d28bd7ed49bb8c1aeb261. OS seed 39, complex supplier; no sprint coordination issue was available. Both reviewed records are bound through their manifests to the consumed SPEC/program payloads. SW4 uses the committed maintainer replay archive; the complete construction chain is not rebuilt here. The final overlap snapshot covered 646 open PRs through #833; upstream main was unchanged at that check. During publication main advanced tof567884aeb8851b6e794af1184119a3bfbe1e631, selecting #799 at κ = 0.001661634653669567. The complete receipt also passes against its actual inputs and new selected pointer; #741's identical pinned record is accepted at its new official checkpoint location. A corrupted checkpoint is rejected. This remains a #741/#626 contribution, with no transport claim for #799.Credit Sagar Thakrar's #696/#723, Chris Pagolu's #734, our #787 replay, icekylinx, DreamingOfClouds, Jeremy Kothe, Chafik Boukhalfa, Rohan Arun, eumemic and the retained #622/#626/#741 lineage. #696's lowering is vendored verbatim with its source notice. #751 and #830 collect/transpose work across macro boundaries; this construction reverses digits within individual coefficients. #739/#769/#811 and the target/helper panel constructions are also distinct; their savings are not assumed additive.
Prepared for Gareth Davidson (@bitplane) with substantial OpenAI Codex assistance, Apache-2.0. Production integration and refreshed global invoices remain separate work. Uniform compiler, realization, hosting, recursive interface, precision/tape and analytic assumptions remain inherited. The selected frontier is unchanged; finite replay is not a full multiplication theorem proof.