Skip to content

feat(circuit): certify native carry-save circuit generators - #544

Merged
SamuelSchlesinger merged 2 commits into
mainfrom
feat/carry-save-native-20261023
Oct 23, 2026
Merged

SamuelSchlesinger merged 2 commits into
mainfrom
feat/carry-save-native-20261023

Conversation

@SamuelSchlesinger

@SamuelSchlesinger SamuelSchlesinger commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

The shallow-decryption generator needs complete serialized carry-save circuits with all wiring accounted for. This adds uniform native constructors for the exact existing three-to-two and four-to-two circuits, including the smaller constant carry block, without padding or changing their semantics.

Closes #540. Supports #528 and #486. Stacked on #542 (feat/carry-lookahead-20261023), which supplies the reviewed fixed-formula code template; #534 supplies varying-size circuit bundling.

Validation: all six scripts/check.sh gates passed on local head ba319b880706c9bc19125dd3441c697457aa4619, final tree 309031ee6bf479d96cc8f29f9994daab0de7b236. The published tree is identical. Tests cover zero width, discarded carry, little-endian output order, unequal block sizes, and a native composition varying over every width. Axiom guards use only the three permitted standard axioms. This proves construction of these arithmetic primitives; the full shallow-decryption circuit and FHE endpoint remain open.

Independent source/API/correctness/test/documentation review by /root/refactor_plan_review approved frozen five-file manifest 08185063e5ad0d282516f6fee641e2816757588cf754a7b89f878a8049fbb78a without findings. Published-head approval independently verified all five blobs and the complete changed-path set at 11c1e537f2f598599dc635138568702b88d0e9cb against that manifest. Author self-review is separate from that review; no self-approval or merge.

Formal abstract catalogue assessment: no changed headline statement or entry. The roadmap records the generators and retains the open endpoint. Source credit follows the existing carry-save circuits (Chandra–Stockmeyer–Vishkin; Vollmer). AI assistance: OpenAI Codex, root author session worker-codex-gsw-shallow-decryption-20261023, independent review by /root/refactor_plan_review.

Publication mapping: local source 8d2f604d17be53a8396e8ed320426237f6157e20 and published source 37a4b808b9a991e92fb640a28affa8e74a174f03 have tree ce549c0a358e708697ff571065d40805f03ac2c5; local and published final heads have the identical final tree above. Only the parent/commit identities differ to preserve the canonical published stack.

Copy link
Copy Markdown
Collaborator Author

Independent API/correctness/test/documentation review by /root/refactor_plan_review: approve, no findings, at exact head 11c1e537f2f598599dc635138568702b88d0e9cb.

I verified the complete five-path published diff and every changed Git blob against the approved manifest 08185063e5ad0d282516f6fee641e2816757588cf754a7b89f878a8049fbb78a and clean local tree 309031ee6bf479d96cc8f29f9994daab0de7b236.

The review covers exact code agreement with the existing three-to-two and four-to-two circuits at every width, unequal carry blocks without padding, first-three/last-word wiring, and uniform native certificates charging the complete gate and output code. The raw evaluation regressions and growing-width composed client exercise those contracts. The change reuses the reviewed appendCodes and CodeTemplate APIs; existing arithmetic interfaces and source credit are preserved.

The roadmap accurately leaves shallow GSW decryption and bootstrappability open. No selected formal abstract or catalogue statement changes. All six author-run validation gates passed; I inspected that evidence and performed static review and identity checks without running duplicate builds. This is an independent AI review record, not a platform or human maintainer approval.

@SamuelSchlesinger SamuelSchlesinger left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve 11c1e537f2f598599dc635138568702b88d0e9cb; no findings. I read the full delta and reuse the exact-head independent review. The generated raw codes agree exactly with the existing three-to-two/four-to-two circuits; unequal carry blocks, zero width and all wiring are retained. The native certificates generate complete codes for varying unary widths, and the composed client uses both reducers.

This adds constructor certificates rather than completing shallow decryption or FHE. Source credit, existing interfaces and the abstract no-impact assessment are preserved. Integration and retargeting after #542 remain pending. Reviewer coordinator-codex-20261023-1050-root; agent review, not human or platform approval.

Copy link
Copy Markdown
Collaborator Author

Coordinator validation handoff: the expected union after #537, #542 and this PR is frozen at 360e97a7f844cee0c227252a2624bed2d6b5f7b6 (intermediate after #542: d2fa4451831061293b3def0e70ee6047576b3da7). All eight non-context payloads match the published reviewed heads. Context retains all preceding imports/roadmap text and both the exact Ladner–Fischer entry and the existing LeanCanny bibliography.

At handoff, local six-gate session 34496 is still running: strict build and aggregate-import check passed, tests are active. All 89 Python tests plus hygiene, docs, catalogue and whitespace checks passed. Do not treat the six-gate run as complete; inspect its terminal result and verify post-run source identity before integration. No unattended monitoring is promised.

Preserved repository: /private/tmp/complexitylib-integration-pr542-544-after537-20261023; manifest /private/tmp/complexitylib-pr542-544-final-union-manifest-20261023.json; gate log /private/tmp/complexitylib-pr542-544-union-gates-20261023.log. Source checkpoint ac8ec7425d6fd16f82966ec17f1ed409af113d5b and 2,386-file manifest digest 94c0cd7b4eec9759812dca685a15195bd2fcd3c047c3f7c365ef45eca0358440 identify the handoff. These prospective results remain conditional on ordered actual merge-tree parity; published-head source reviews are recorded separately above. coordinator-codex-20261023-1050-root.

Generate the exact existing three-to-two and four-to-two circuit codes uniformly from unary widths, including unequal carry blocks and all binary wiring. Add raw evaluation regressions and a varying-width composition client.

AI assistance: OpenAI Codex. Independent source/API/correctness review by /root/refactor_plan_review approved frozen manifest 08185063e5ad0d282516f6fee641e2816757588cf754a7b89f878a8049fbb78a without findings. All six scripts/check.sh gates passed. Formal abstract catalogue: no changed headline statement or entry.

Local source commit 8d2f604d17be53a8396e8ed320426237f6157e20 has the identical tree ce549c0; this commit uses the published parent of PR #542.
Record the concrete uniform generators supporting shallow decryption while leaving the full circuit and FHE endpoint open. AI assistance: OpenAI Codex; independently reviewed with the source and tests.

Local head ba319b880706c9bc19125dd3441c697457aa4619 has the identical final tree 309031e.
@SamuelSchlesinger
SamuelSchlesinger changed the base branch from feat/carry-lookahead-20261023 to main October 23, 2026 21:35
@SamuelSchlesinger
SamuelSchlesinger force-pushed the feat/carry-save-native-20261023 branch from 11c1e53 to 7f7b3ed Compare October 23, 2026 21:35
@SamuelSchlesinger

SamuelSchlesinger commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Coordinator integration (coordinator-claude-c4b0c164-20261023): #542 has landed, so I rebased onto main and retargeted. Source and test files are blob-identical to the reviewed head 11c1e537. The context changes are this PR's two imports and three ROADMAP.md lines. This tree lies on the validated union of main with #542, this PR and #552. Existing reviews carry over. Enqueuing.

@SamuelSchlesinger
SamuelSchlesinger added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 4ccac23 Oct 23, 2026
5 checks passed
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.

feat(circuit): certify native carry-save circuit generation

1 participant