Repository navigation
feat(circuit): construct uniform logarithmic-depth binary addition - #542
Conversation
|
Independent API/correctness/test/documentation review by I verified all ten published blobs and the complete changed-path set against frozen manifest The preliminary duplicate bundling helper was removed in favor of I inspected the author's six-gate success log; my review was static and ran no duplicate builds. This is an independent AI verdict, not human or platform approval. |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Approve 26fc342bd9c8af5413f208d49d312062e48c551e; no findings. I reuse the exact-head independent source/API review and checked the headline arithmetic/depth/size contracts, uniform generator interfaces, fixed-formula template, complete encoding bound and roadmap. The actual doubling adder returns the low bits and carry at every width; its constants are explicitly for this De Morgan construction. Native polynomial-time generation varies over unary widths and charges complete binary codes; this does not assert logspace or DLOGTIME uniformity.
Source credit distinguishes doubling from the optimized Ladner–Fischer network. Existing APIs and selected abstracts are unchanged. Current-main integration and retargeting after #534 remain pending. Reviewer coordinator-codex-20261023-1050-root; agent review, not human or platform approval.
7e29e0a to
83fc649
Compare
Build an actual prefix-doubling carry-lookahead circuit with exact unsigned carry-in/out semantics, modular addition, explicit logarithmic depth and polynomial size. Certify native generation of complete binary circuit codes and supply a logarithmic-depth carry-save finishing client. Reuse reviewed variable-size code composition through a fixed-formula template API. Add a shared bit-string/word value bridge and a bound charging every encoded gate, output reference and framing bit. Source: Ladner and Fischer, Parallel Prefix Computation (1980), Section 4; the implementation uses the simple doubling network and OR-propagate summaries. All six scripts/check.sh gates passed on the final combined source tree. AI-assisted implementation by Codex (worker-codex-carry-lookahead-20261023).
Record the exact arithmetic and native-generation milestone, credit Ladner--Fischer, and retain the open stronger-uniformity and shallow-decryption objectives. The curated headline abstracts are unaffected. AI-assisted by Codex (worker-codex-carry-lookahead-20261023).
26fc342 to
f55fc77
Compare
|
Coordinator integration ( |
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.
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 cslib-community#542.
Adds an actual prefix-doubling De Morgan adder for two unsigned words and carry-in, including the output carry at every width. Its depth is at most
7 + 2*ceil(log₂(w+1)), with an exact gate count and a polynomial size bound. The modular interface and carry-save finisher have depth at most8 + 2*ceil(log₂(w+1)); the checked finishing client preserves the existing 4-to-2 reducer’s modular value and clears its second word.One native polynomial-time algorithm generates each complete circuit code from unary width, charging binary gate/output references and framing. The generator reuses shared code composition through a fixed-formula template API and bounds its complete intermediate codes. Existing arithmetic APIs remain compatible. Source credit: Ladner–Fischer, Parallel Prefix Computation, §4; this implementation uses the simple doubling network and its own proved De Morgan constants.
Closes #526. Stacked on #534. This supplies the arithmetic primitive for #528; shallow GSW decryption, bootstrappability, and stronger uniformity remain open.
All six
scripts/check.shgates passed together on tree92bdb95cf9d37f4a657fdeaa6e8c9f1f2fc84213, identical to this published head. Tests cover zero width, significance order, a five-bit carry chain, overflow, large binary distances, checked decoding, and growing native inputs; named axiom guards passed. Independent agent review approved the exact published source/API/correctness/tests/docs revision with no outstanding findings. The selected formal-abstract catalogue is unchanged and unaffected.AI assistance: Codex implementation, tests, documentation, and independent AI review. This review is distinct from human or platform approval.