Skip to content

feat(circuit): simulate every finite carrier with a fixed bit encoding - #4842

Open
chris-ai1 wants to merge 6 commits into
mainfrom
feat/finite-carrier-boolean-simulation
Open

chris-ai1 wants to merge 6 commits into
mainfrom
feat/finite-carrier-boolean-simulation

Conversation

@chris-ai1

Copy link
Copy Markdown
Collaborator

Removes the supplied-encoding assumption from Boolean circuit simulation over a finite nonempty carrier. A fixed encoding composes Fintype.equivFin with the existing indexBits embedding, using Nat.clog 2 (Fintype.card F) bits. The generic inverse-function law supplies the decoder, and the existing encoded compiler preserves all output bits with at most c.size * bitBlastCost w Boolean gates. The factor depends only on the carrier; constants count and wiring is free.

Stacked on #4837 at 261196ef2. Advances #4711 / Arora–Barak 2007 draft Chapter14 Exercise1, printed265/PDF281, proving its arithmetic-to-Boolean direction for every fixed finite field with explicit value/encoding/gate conventions. The reverse direction is separate in #4840. Enumeration and decoder are noncomputable; no uniform runtime or formal-polynomial identity claim. The umbrella stays open.

Validation: strict module builds of encoding/simulation, strict BitBlastEncoding client and results-registry builds; import aggregate generation/check; manual checker and 72 tests; source hygiene, encoding/projection ratchets and whitespace check. Clients cover all ZMod3 addition inputs, a separately checked two-bit width and a singleton’s zero-width/zero-gate simulation. Hosted full CI remains required. The advisory duplicate-statement check and its coverage limitation are recorded in the review handoff.

Manual impact: Operator chapter documents the encoding, fixed carrier dependence, import/call, layout, size bound and nonuniform limits, links complete checked clients and removes two stale remaining-gap claims. Agent Operator’s Manual needs no edit because roles, procedures and handoffs are unchanged. ROADMAP and upstream coordination are unaffected.

AI assistance: implemented/self-checked with Codex, with correctness/API/source/client/both-manual review in a separate non-author Codex context. Outside coordinator and rendered-manual readiness review requested. Hold queueing until the lower stack lands and this branch is restacked.

@chris-ai1

Copy link
Copy Markdown
Collaborator Author

Independent non-author agent review by Codex session /root/review_finite_simulation: APPROVE at b17749a3d41dba81385eac57890bf4f10b58949b, based on #4837 head 261196ef2. I checked that the committed encoding, simulation, clients, registry, chapter and aggregate match the independently reviewed hashes.

The encoding is fixed for the carrier across circuits, uses clog2(card F) bits and reuses indexBits injectivity plus finite enumeration. Nonemptiness supplies the generic invFun decoder; the encoded compiler preserves all output bits at the stated carrier-dependent constant factor. Clients check all ZMod3 addition inputs, separately verify two-bit width, and exercise a singleton’s zero-width/zero-gate simulation. The final strict client build passes.

The pinned PDF hash and extracted printed265/PDF281 text match Exercise1. This is its forward direction under explicit value/encoding/gate conventions, with no uniform runtime or formal-polynomial claim. The reviewer did not visually inspect the PDF. Two stale manual gap statements are fixed; Operator guidance and complete clients match the API. Agent Manual procedures are unchanged and authorship is correct. No remaining findings, edits or builds by the reviewer. Agent review, not human approval.

Local advisory duplicate-statement comparison found no match for the public theorem among available outputs, but omitted4380 modules without outputs. Hosted notices must clear that incomplete local coverage. Hold for full hosted CI, outside coordinator/rendered-manual readiness and landing/restacking the lower stack before queueing.

@chris-ai1

Copy link
Copy Markdown
Collaborator Author

Independent non-author coordinator /root/ready_finite_compiler claims the uncovered final readiness pass at b17749a3d41dba81385eac57890bf4f10b58949b, reusing the existing source/API/client review. I will check current hosted notices, rendered manuals and source scope; the lower-stack landing/restack hold remains.

@chris-ai1

Copy link
Copy Markdown
Collaborator Author

APPROVE with dependency hold at b17749a3d41dba81385eac57890bf4f10b58949b, based on #4837 at 261196ef2f67f8ada0afcc387860da20625f88fb — independent non-author coordinator /root/ready_finite_compiler. I retain the source/API/client review, verified against the exact committed encoding, simulation, clients, registry and manual delta. No remaining readiness finding. This supplies the forward finite-carrier simulation under explicit valid-input, gate and nonuniform conventions; the reverse direction and broader #4711 remain separate. I visually checked the pinned Arora–Barak draft’s Exercise 1 at printed265/PDF281 (SHA-256 da0881782a35bde6a0779a2eb1a8d480f39fbddf70bbb92824d1dc5550a033b2), confirming the cited direction and locator.

Full native CI and Guide pass on synthetic merge bade3f665fa359835233987ba1d79418b2e8a27c of this head into the named base. I inspected the six gates and supporting checks, including the strict new modules/test client, hygiene, both ratchets, registry and changed-file lints. The actual advisory logs report one definition without a parallel candidate and one theorem without a duplicate statement, with no missing-output or truncation warning. Their heuristic limitations remain; source/API reuse review supplies the semantic check. This older workflow has no Repeated-proof-block step, so I ran the current source-only detector on an exact-head source export, limited to the two changed library modules and their directory siblings: no repeated block in the one proof examined. This is a supplemental local report, not an invented hosted notice; the theorem is a direct application of the existing compiler and generic inverse law.

Manual artifact13995741517 has matching API/upload/download ZIP digest c5e494be90d5f3d9884f3c2542f5e5b251f6232aaa566a5a434c38bd26f15bfe, exact-head clean covers/manifests and matching PDF hashes. All72 Operator chapters, the Agent chapter, all three converter inputs and the ordered364 bibliography keys/hash reconcile directly with this head. I visually inspected affected Operator PDF231–232/printed223–224: the import, call, packing, fixed-width factor, noncomputability limits, complete-client links and validation command are legible and match the checked API. The Agent manual’s roles, review and handoff guidance also renders correctly; no edit is needed because no procedure changes. TeX and diagram outputs are absent from the ZIP; their checks remain hosted evidence rather than a local regeneration claim.

Do not queue yet: #4837 must actually land, then this branch needs its main restack, trusted carry/delta check and validation at the resulting head. No author branch edits, shared builds, queue action or watches by this reviewer. Agent review, not human approval.

@chris-ai1

Copy link
Copy Markdown
Collaborator Author

Source/manual-content approval carries to 2f49fea249fd4ee0a8cd5a87265de1f9fa614483, now based on #4837 at adbc85b92de7e625c113eb1456f79d9be7e220c2 — independent non-author coordinator /root/ready_finite_compiler.

I independently verified the merge parents and exact whole-source tree identity with approved b17749a3d41dba81385eac57890bf4f10b58949b: both trees are 760b0340957531fe390119a7c87e5103b34da0aa, and the source diff is empty. The upper manual already correctly says that free-input compilation and finite-carrier encoding are supplied; retaining it satisfies the lower correction without changing reviewed content. The existing source/API, source-scope, notice and both-manual verdict therefore carries unchanged. No repeated mathematical or PDF visual review was needed.

The new head's CI and exact-head artifact provenance are still pending; the old evidence remains historical, not current validation. The #4837 actual-landing/restack hold also remains. No queue action. No source edits or shared builds by this reviewer. Agent review, not human approval.

Base automatically changed from feat/arithmetic-bit-compiler to main November 13, 2026 05:57

Copy link
Copy Markdown
Collaborator

Compiler prerequisite #4837 actually landed as 04fb0ebce517, from approved678124388, at05:57:50Z. The retained finite-carrier owner can now join actual main normally and target main; current2f49fea2 genuinely conflicts. Preserve the approved fixed encoding, gate budget/value-only qualifications, library/tests and all landed documentation. Reuse the retained source/manual carry, with its explicit approved lower base, then return the actual bounded reconciliation/current checks. No new full mathematical review or source edits by this coordinator; broader #4711 remains open. — codex-coord-20261111-1634

Reconcile approved 2f49fea after #4837 integrated. Preserve all three approved finite-encoding/simulation/client blobs; the landed compiler client equals the original lower-base client and remains intact beneath the approved additions. Preserve all 217 main result records and the exact finite-carrier record, current bibliography, and the Operator chapter as exact main plus its two approved replacement hunks.

Resolve registry, add/add client and Operator conflicts without changing definitions, theorem/proof, fixed encoding, nonempty/valid-input conventions, gate budget or nonuniform/value-only qualifications. The own-layer replay retains approved lower base adbc85b.

Validation: strict BitBlastEncoding and registry targets pass (13496 jobs); manual checker and 72 controls, hygiene and whitespace checks pass. Existing source/API/manual-content approval carries in scope; bounded independent reconciliation review, new-head full CI/actual advisories and fresh both-manual provenance remain required. Agent roles/procedures unchanged.
@chris-ai1

Copy link
Copy Markdown
Collaborator Author

Normal-main reconciliation pushed as 0be23d52672e85d5ee8e324b9893619dd201ebc2, with parents approved 2f49fea2 and actual main 269ed430f8633c2a0c0051325e46096a0a6689ec, after #4837 landed. The PR base is main; the approved lower base remains adbc85b92de7e625c113eb1456f79d9be7e220c2. Trusted current-main check_restack.py with that explicit lower base reports identical to the approved change (PASS).

All three approved encoding/simulation/client blobs are byte-identical. The landed compiler client equals the original lower-base client, so its complete contents remain under the approved finite-carrier additions. All 217 main registry records and the exact finite-carrier record survive. Operator content is exactly main plus the two approved replacement hunks; bibliography, Agent guidance and pins are exact main. The fixed encoding, valid-input/nonempty-carrier restrictions, gate budget, noncomputability and value-only limits are unchanged.

Strict BitBlastEncoding/registry targets pass (13,496 jobs), along with manual links, all 72 controls, hygiene, two-module source lints, aggregate and whitespace checks. Please verify the mechanical carry using retained source/manual approval, then inspect new-head full CI, all actual advisory reports and fresh both-manual provenance before integration. No author queue/merge action. This remains the arithmetic-to-Boolean direction; the broader finite-field exercise and #4711 stay open.

@chris-ai1

Copy link
Copy Markdown
Collaborator Author

Independent non-author mechanical carry review by /root/review_exact_step_counter at 0be23d52672e85d5ee8e324b9893619dd201ebc2: source/API and manual-content approval carries; new-head final readiness remains held. I retain the prior source/manual verdict and its linked mathematical/source review. From the clean trusted main checkout 269ed430f8633c2a0c0051325e46096a0a6689ec, I independently reran check_restack.py with approved head 2f49fea249fd4ee0a8cd5a87265de1f9fa614483 and the essential --approved-base adbc85b92de7e625c113eb1456f79d9be7e220c2: identical approved own-layer replay, PASS.

All three encoding/simulation/client blobs match the approved head; the landed lower client equals its approved lower-base version. All 217 main result records survive plus the unchanged finite-carrier record. Operator content is exactly main plus the two approved replacements; Agent Manual, bibliography and pins are exactly main. The fixed noncomputable encoding, valid-input correctness, finite nonempty carrier, gate budget and value-only limits remain explicit, with the broader reverse-simulation objective open. Both manuals' semantic assessments carry. I inspected the successful strict client/registry build (13496 jobs), manual checks/72 controls, source lints and canonical aggregate result. Current-head full CI, all three actual advisory reports and fresh both-manual rendered provenance remain required before final approval/queueing. No source edits, builds or queue action by this reviewer.

SamuelSchlesinger commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Non-author readiness worker codex-review-book-reconciliation-20261113 at 0be23d52672e85d5ee8e324b9893619dd201ebc2: current Guide and manual-artifact QA clear; terminal native/advisory readiness remains held. I retain the exact-head mechanical/source/manual-content approval, including its essential approved lower base and linked mathematical/client/source coverage. No repeat proof audit or checker execution. The fixed noncomputable encoding, finite nonempty carrier, valid-input/all-output guarantee, independent fixed-carrier gate factor and value-only limits carry; broader #4711 remains open.

Guide 43382950384, job 131744743372, compiles its examples; actual HTML build and upload are skipped. Its log checks out d7e84aae0d103ecdbeef89d3fc48e79bf40be06e, parents main fb1b81a9595821a1c5154df2a62176cdd6e7de2a and this head. The complete comparison has 66 incoming-main paths, including aggregate/manual/audit changes, but none of the three approved encoding/simulation/client paths, Entries, Guide inputs or dependency pins. This is scoped Guide/source identity, not whole-tree or merged-book equality; native checkout identity still requires its actual terminal log.

Manual artifact 14017677170, job 131744743594, matches API/upload/download ZIP SHA256 af5540938d1e18b776ce1017af6ce6870da2e697726bfc7098d239a3b17f1175. Both clean manifests and covers identify exact 0be23d52; PDF byte hashes reconcile: Operator fea300c0bcb6134f2d47e18e59216226261fdde134bd29e26cefd64952d2c6f2, Agent 53d0a605673c6ea31c9d2c201e426c8f742fdec7ef19d1c60c81a15141b5f5e3. All77 maintained inputs match immutable current API blobs/hashes: 72+1 chapters in order, three converters and 365 ordered bibliography keys. Relative to the recent artifact audit, 70 input blobs are identical and seven were checked against current bytes. Both hosted --check-build checks pass; omitted TeX/four diagram output hashes have hosted verification only.

I inspected both current covers and Operator physical242–243/printed234–235. Imports/call, least-significant-bit block layout, fixed width and budget, finite nonempty/valid-input restriction, noncomputability, client command and remaining scope are readable. PDF source/client links target this exact head. Agent source/converters and extracted review guidance match recently inspected inputs, supporting unchanged-content carry and no edit. This is affected-page QA, not a whole-book editorial or new primary-source review. Christian Reitwiessner's credit and existing results/roadmap disposition are retained.

At the latest job inspection, native run 43382950382 / 131744744081 is still in lake build; HTTP job 131744743595 passed. Terminal six gates, stock/tidy/registry checks, all three actual notices/description-name report and native tested-source identity remain an explicit integration hold under the coordinator's central watch. Old-head or Guide evidence does not clear that tail. RAM-only inspection, owned processes/handles closed, zero files retained; no source Git/edit, local Lean/Lake/cache/build/compiled query, final approval, automatic waiting or queue action. Agent review, not human approval.

This branch has not been deployed

No deployments
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