Skip to content

Construction: complete complex factory lowering from 44 to 38 paid primitives - #1064

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
aliromman:codex/s8-complex-factory
Oct 14, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
aliromman:codex/s8-complex-factory

Conversation

@aliromman

@aliromman aliromman commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

This construction lowers the complete PR #924 eight-register factory to 38 paid primitives per real component, including its exit work clear. A stronger comparator that combines persistent coefficient work, repeated unit additions, and source scales restored after each macro costs 44. The new circuit keeps source scales between macros and restores the complete eight-register map at the checked factory boundary.

Review files: Proof and scope · Evidence · Source pins and credit.

The circuit uses 26 unit ADDs, nine binary shifts and two sign changes, followed by the clear. An exact integer primal/dual certificate proves that nine shifts are minimal within the fixed ordered unit-ADD topology and diagonal-conjugation class. This is not a minimum over arbitrary circuits. All four orientations are checked against both PR #924 and the original 87-macro map.

The verifier installs the circuit in fourteen raw PR #622 factory windows and their inverse cleanups. It checks both complete program orientations on all 725 arbitrary input columns, all 492 helper restorations, frame boundaries, exact phase recipes, and every call in the existing 72-call dedicated-bank host. The source-scale rule refines a complete 32-macro compiler block; the original interface and adapter reserves remain paid.

Complete raw program Strong comparator New circuit Saving
Forward 121,392 121,056 336
Inverse transpose 121,408 121,072 336
40 forward and 32 inverse-transpose calls 8,740,736 8,716,544 24,192

These counts include both real components. The full bound per cover vertex falls from 635,470,496,884,300 to 635,470,496,860,108. Stock, helper banks, recursive profile, adapters, bridges, complements, idle work, precision, source access and routing reserves remain paid. The homogeneous child profile is unchanged, so no new kappa is claimed. This is an instruction-count improvement, not a runtime benchmark.

Concurrent PR #1032 supplies the historical persistent-work comparison. PR #1036 supplies the elementary small-integer routes. Those routes are applied equally outside the factories, saving 304 primitives per complete call on each side; that saving is excluded from the new 24,192 gain. A finite census also checks all 39,424 one-scale magnitude placements in each orientation under the stated source-version cache class. Its minimum is 44. PR #1033's short-window, per-ADD model does not include this whole-block lowering. Exact heads and distinctions are in OVERLAP.json.

Reproduce with Python 3.11+ and NumPy, from the repository root:

OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 \
python3 -I -B research/complex-factory-fusion/verify.py
python3 -I -B research/complex-factory-fusion/test_package.py

Expected primary result: PASS_EXACT_COMPLEX_FACTORY_FUSION primitives=44->38 columns=725 calls=72 extra_vs_strong=24192 no_new_kappa. The ten complete program variants and five hosted invoices pass. The 168 mathematical rejection cases, four inherited native controls, minimal optimized relocation, two corruption controls, and two output-preservation controls pass. A separate parent review and full optimized replay reproduced the final receipt. VALIDATION.md records the environment, exact source freeze, failed environment probes and omitted checks.

Exact base: 8bddbee377e2f3ce1f1247196c4b290d55767d20. Only research/complex-factory-fusion/ is added. The result concerns the reconstructed raw 492-helper supplier. Transport to the selected T37 supplier, changed delivery cells or owner arrangements remains open. The all-size compiler, common-label mutable-source realization, physical hosting, precision/tape recovery and analytic transfer remain inherited assumptions. The selected certificate and upstream/ are unchanged.

Prepared for Ali Romman (@aliromman) with substantial OpenAI Codex assistance. Credit Alluri (@alluri-ritual)/PR #681, @CubeJerry's PR #922 and PR #924, Ross Richardson (@RossRichardson)'s scale-placement floor, Sagar Thakrar (@thakrarsagar)/PR #696, @woklerx's PR #1032, Hanson Sun (@bbMisk)/PR #1036, Seb (@ZK-Snarky)/PR #999, and the retained PR #622, PR #626, PR #531 compiler and hosting lineage. Predecessor notices remain intact; new work is Apache-2.0. No independent human review or formal proof of the full multiplication theorem is claimed.

@Mister-Meeseeks
Mister-Meeseeks merged commit b7c0205 into CrocSwap:main Oct 14, 2026
60 checks passed
@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

100-PR batch review at b0181971c2364744d1dd9b0c2d4ee1ea532b8bb6.

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

Reviewed scope: Unit-add complex factory lowering with restored source scales and full historical raw orientations; no per-macro invoice substitution.

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.

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