Skip to content

Research: lower selected complex scalar primitives by 22–25% (no new kappa) - #696

Merged
Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
thakrarsagar:research/complex-dyadic-lowering-seed22
Oct 13, 2026
Merged

Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
thakrarsagar:research/complex-dyadic-lowering-seed22

Conversation

@thakrarsagar

Copy link
Copy Markdown
Contributor

The selected CK and JP8 complex programs price every dyadic addition with cleared-work binary Horner. This research contribution replaces its leading clear/add pair with a copy and uses signed accumulation plus a work clear for unit coefficients. Both circuits preserve arbitrary private input and the complete scalar boundary.

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

Provider Orientation Original real primitives Replacement Saved
CK Forward 224,938 169,618 55,320
CK Backward 224,986 169,634 55,352
JP8 Forward 257,232 200,380 56,852
JP8 Backward 257,280 200,396 56,884

The 22.1–24.6% reduction covers scalar primitives, including source copies, coefficient preparation, signed accumulation and private clearing. Recursive calls, adapters and residual wrappers retain their existing costs. Scalar macro words, frames, paid profiles and κ are unchanged. No runtime speedup is claimed.

Only research/complex-dyadic-lowering/ is added. It contains the executable lowering, exact rational primitive interpreter, deterministic certificate, source pins, proof, local sprint claim and validation receipt. No selected emitter or certificate is changed.

Reproduce

python3 -B research/complex-dyadic-lowering/verify.py

Expected:

PASS_COMPLEX_DYADIC_LOWERING programs=4 columns=716 savings=55320,55352,56852,56884 controls=10

Python 3.11+, standard library, offline, no writes. Both receipt modes check the committed evidence. The verifier executes all 716 input columns of each selected program plus an arbitrary coefficient-work input. It checks all 686 distinct coefficients and proves finite prefix containment by exact per-register row membership in the reference Horner traces. Ten controls cover wrong signs, omitted copy/cleanup, coefficient and alias errors, cost inflation, and endpoint-neutral prefix growth.

Validation and scope

Repository-wide make verify, cold supplier regeneration, Linux CI and Lean were not run. The unchanged geometric/physical admission and uniform precision, compiler, hosting, tape and analytic contracts remain inherited. This is an exact local circuit result, not a formal proof of the multiplication theorem or production integration of a new selected supplier.

@Mister-Meeseeks
Mister-Meeseeks merged commit 9e6049d into CrocSwap:main Oct 13, 2026
@thakrarsagar
thakrarsagar deleted the research/complex-dyadic-lowering-seed22 branch October 13, 2026 18:58
Mister-Meeseeks pushed a commit that referenced this pull request Oct 14, 2026
…pa change)

Confirms 55,320/55,352/56,852/56,884 saved real-component primitives (22.10-24.60%) against PR #696 head 5a3f983. Credit: Sagar Thakrar (#696). Prepared with substantial AI assistance. Apache-2.0.
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