Repository navigation
Construction: complete complex factory lowering from 44 to 38 paid primitives - #1064
Merged
Mister-Meeseeks merged 1 commit intoOct 14, 2026
Merged
Conversation
Contributor
|
100-PR batch review at Merged to 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. |
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.
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.
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:
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.