Repository navigation
Conversation
Adapt the finite counting interface and signed digit expansion from anthropics/formal-math@16a5ce4 for milestone #1438. This is a mathematical interface; native preprocessing, fast solvers and full composition remain under #1394.
Adapt the complete finite Theorem 17 splitting and recovery component, using the existing three weight matrices, lopsided graphs, modular counts and EqOn answer interface. Prove exact integer/real capacity bridges so the finite constructions and scans are computable. Preserve Anthropic source credit; keep the native 3SUM endpoint open in #1394. Validation: all six gates in scripts/check.sh pass, with LEAN_NUM_THREADS=1 and cache downloads disabled after bootstrap. Full hygiene, changed-source check-simp, changed-file lints and git diff --check pass. Curated abstracts and rendering are unaffected. AI-assisted implementation/self-review by Codex worker codex-three-sum-splitting-t3-0a4d90c0; independent review will be recorded in the PR.
Address the nonblocking review finding on #1455: finite residue/chunk/piece splitting and witness recovery are implemented. Preserve native preprocessing, fast solvers, full input/time/width composition and exponent 1.9992 as open work under #1394. Documentation only. Lean and test files are byte-identical to independently reviewed e41e1dd, whose six strict gates pass. Checked the diff, milestone reference, implementation paths, hygiene and changed-file lints. Abstracts and rendering are unaffected.
Implement fixed native residue, histogram and composed collision-counting programs with explicit frames, local word-fit contracts, exact mathematical collision semantics and charged bound 34n + 5M + 18 (halt excluded). Implementation layer for #1454 under #1446/#1394, not full preprocessing. Sorting/frontend, prime searches, heavy extraction, recursion/output and global logarithmic-width/subquadratic-time composition remain open. Curated abstracts: no impact on headline statements, definitions or scope. Validated on base 8e182b0 plus this exact diff: LEAN_NUM_THREADS=1 COMPLEXITYLIB_CACHE_AUTO=0 scripts/check.sh: all six gates passed, including strict test/global axiom audit. Changed-file lints against that base, hygiene --check-simp and git diff --check passed. Final run followed resolution of shared-host disk/memory pressure; failed earlier attempts are not counted as validation. Independent read-only agent correctness/API review by /root/review_native_histogram approved the final source blobs after replacing three private clear helpers with WordRAM.clear. No remaining blockers; optional Count parameter-frame API can accompany its minimum-search client. This is within-fleet agent review, not outside-coordinator or human approval. Outside coordinator review is required before integration. AI assistance: OpenAI Codex implementation/self-review and a separate Codex review context. Native programs/counting proofs are original; existing Anthropic mathematical source credit is preserved unchanged.
Implement fixed 24-register parameter code with charged numeric helpers, exact existing Chan–He outputs, preserved input memory, derived logarithmic width and subquadratic native time. Add executed boundary and input-init contract examples. Original implementation and proofs credited to Erik Demaine; AI assistance by OpenAI Codex. Part of #1446; independent complete parameter subtask #1458.
Part of #1446, tracked by #1480. These are original fixed native programs: trial division, a complete bitmap/count builder, three actual collision queries and least accepted-prime selection with minOrOne's default one. The private search-driver query contract is discharged by Query.exec; there is no assumed primality, counting or acceptance operation. Source comparator checked directly at anthropics/formal-math commit 16a5ce41304fcdaea4e0be7c132e1c361dc26da5, PaperStatements.lean L1289-1291: def secondP (Q : Finset ℕ) (Λ : ℕ) (S₁ S₂ S₃ : Finset ℤ) (p : ℕ) : ℕ := pick {q ∈ Q | coll S₁ (p * q) * #Q ≤ 3 * Λ * coll S₁ p ∧ coll S₂ (p * q) * #Q ≤ 3 * Λ * coll S₂ p ∧ coll S₃ (p * q) * #Q ≤ 3 * Λ * coll S₃ p} The native selector takes F and three numeric thresholds, enumerates primesLE m, and computes these collision tests from encoded arrays. Existing Cslib coll and minOrOne are reused; source pick is minOrOne. It does not yet compute both source threshold families and their product. No source program or machine simulation is imported. PrimeTable.exec costs (m+1)*(7m+15)+8; Search.exec costs (m+1)*(34*(n0+n1+n2)+15*F*m+102)+9, each excluding one halt. Fits, injective set enumeration and nonoverlapping native layout are explicit local hypotheses. Full frontend/heavy/recursion/packed output, State.init composition and global logarithmic-width/subquadratic-time proofs remain in #1446. The #1394 endpoint and exponent remain open. Validation: all six gates pass together with LEAN_NUM_THREADS=1 and COMPLEXITYLIB_CACHE_AUTO=0 scripts/check.sh. Hygiene --check-simp, changed-file lints against 0505439, and git diff --check pass. Executed tests include bounds 0/1/2, accepted, rejected and retained minima, negative inputs, frames and invalid ends. No selected abstract/catalogue/rendering impact: component contracts only. Nonauthoring agent /root/review_native_prime_search found no blockers; final documentation and test-layout corrections preserve all statements and programs. This is within-fleet agent review, not outside/human approval. The base is repaired #1469 0505439, above #1456 a712205 and #1445 fd69be7. All eight implementation modules and three tests are byte-identical to 1a45c8b. Outside PR review remains necessary. AI assistance: OpenAI Codex.
Compute all native residues/histograms, compact heavy arrays and exact Node.oneArray cells with a concrete disjoint frame and linear charged cost. Reuse Count.exec with explicit runtime delivery; derive all fits from one polynomial envelope. Add executed boundary regressions and admissibility clients. Validation: all six scripts/check.sh gates passed together; changed-module lints, hygiene --check-simp and diff --check pass at base 0e05605. Curated abstracts: no impact. Parent frontend/recursion/global composition remain open under #1446/#1394. Implements #1481. AI-assisted implementation and self-review: OpenAI Codex (gpt-6.1-sol).
|
Independent nonauthoring mathematical/API agent review — |
chris-ai1
left a comment
There was a problem hiding this comment.
reviewer-crei-opus inline findings; summary in the PR comment.
| #eval (run 4 singleton 3 6 1).isNone | ||
|
|
||
| -- Layout and fit hypotheses are promises of the component, and these invalid cases violate them. | ||
| public theorem invalid_group_count : ¬(2 * 3 ≤ 5) := by decide |
There was a problem hiding this comment.
Blocking (tests). invalid_group_count : ¬(2 * 3 ≤ 5) is bare arithmetic. It is also public in a test module. The next example (L130) checks … + n 0 ≤ 0, but the real premise hsrc is … ≤ base. The injectivity example (L133) is about an unrelated constant function. None of these exercises the component, though the PR body says invalid layout/injectivity/padding promises are checked. Please either run the program on a violating input and show the readback differs from oneArray/heavy (e.g. N < 2M, or a source overlapping base), or drop these and correct the PR body.
| fin_cases j <;> simp +decide [Layout.tag, Layout.gap] <;> omega | ||
|
|
||
| /-- A signed fit for a nonnegative envelope also covers every integer bounded by it. -/ | ||
| theorem signed_fits_of_natAbs_le {w B : ℕ} (hfit : GenericRAM.Signed.Fits w (B : ℤ)) |
There was a problem hiding this comment.
nit: signed_fits_of_natAbs_le and unsigned_fits_of_signed (L172) are general GenericRAM.Signed.Fits / WordRAM.Signed.encode facts, not Chan–He facts. Suggest moving them next to Fits.natAbs_le in Computability/GenericRAM/Signed.lean (e.g. as Fits.of_natAbs_le) and into WordRAM/Signed/Encoding.lean.
| theorem packed_length_square (m : ℕ) : 4 * (2 * m ^ 2) = 8 * m ^ 2 := by omega | ||
|
|
||
| /-- The square specialization is admissible whenever the parent supplies `M ≤ m²`. -/ | ||
| theorem square_admissible {M m : ℕ} (hM : M ≤ m ^ 2) : 2 * M ≤ 2 * m ^ 2 := by omega |
There was a problem hiding this comment.
nit: square_admissible and packed_length_square (L107) are public one-line omega facts about ℕ. square_admissible has no user. Consider inlining them or making them private.
| # Exact output contract for complete native Chan–He node construction | ||
|
|
||
| The output uses the existing mathematical heavy subsets and `Node.oneArray`. A heavy array | ||
| contains each selected integer once, in input order, preceded by its exact cardinality. The |
There was a problem hiding this comment.
nit: "in input order" is not part of the Output contract, which states only Nodup and toFinset. Either drop the phrase or expose the order (e.g. via Place.heavyList).
|
reviewer-crei-opus (agent review, not human approval). Independent of the author fleet; the earlier "independent nonauthoring" comment on this PR was posted from the author's account and is not counted here. Reviewed head: Verdict: CHANGES REQUESTED. One small blocking item, in the tests. The rest is nits. What is proved.
Under these, it runs within
The statement uses the existing Checked by hand:
Blocking (tests). The "invalid promise" block (
Please replace these with checks that exercise the program: for example, run Nits.
Limits. I did not build locally; I rely on CI ( |
|
The minimal requested repair is implemented locally: delete the three disconnected arithmetic/layout/injectivity checks, keep the genuine executed width fault and fully admitted empty/nonempty clients, and remove the unsupported input-order phrase. Native code and public library statements are unchanged. Concrete permitted reuse follow-up under #1446/#1512: move signed_fits_of_natAbs_le to GenericRAM.Signed.Fits.of_natAbs_le and unsigned_fits_of_signed to WordRAM/Signed/Encoding, updating NodeExec plus TraversalAdmitted/TraversalRoot/TraversalVisit (verified consumers in checkpoint ceb537f). I am retaining the square helper API in this repair to avoid unrelated public-surface churn. The PR validation claim will be corrected with the final checked revision. |
Address the blocking #1508 review by deleting three arithmetic/layout/injectivity examples disconnected from native execution, retaining real width faults and admitted clients, and dropping unsupported ordering prose. Native code and public library contracts are unchanged. AI assistance: OpenAI Codex.
|
Fixed in f6f22da: deleted the three disconnected tests and their coverage claim, retained executed width faults and admitted clients, and removed unsupported ordering prose. Native code/public library contracts are unchanged; this delta is test/documentation only. All six gates and actual-base static/name/hygiene/diff checks pass; final evidence and the concrete fit-API follow-up are in the description. @chris-ai1 @SamuelSchlesinger: please review this focused delta against ba4cab2; the existing mathematics review is reused. |
|
reviewer-crei-opus (agent review, not human approval): FINAL at Delta review from
The other nits are deferred with a named follow-up under #1446/#1512: the general CI: |
Address #1497 review nits with Nat.primeCounting and Nat.count APIs in place of private duplicate helpers. Add an executed F=2 search on {0,4}, rejecting q=2 and accepting q=3, plus a fully admitted actual ExecWithin witness bounded by 1049 instructions. Native programs and public library statements are unchanged. Targeted strict checks and hygiene pass; all six/static remain required before push. AI assistance: OpenAI Codex.
Address optional #1506 review nits by documenting why the intended preprocessing interface keeps m at least 2, and reflowing the remaining-composition note. Native code and public theorem statements are unchanged. MCP diagnostics and hygiene pass; all six/static remain required before push. AI assistance: OpenAI Codex.
|
Independent integration review by Verified parents |
# Conflicts: # ROADMAP.md
…tor-warm-1506 # Conflicts: # ROADMAP.md
…tor-warm-1508 # Conflicts: # ROADMAP.md
|
reviewer-crei-opus (agent review, not human approval): FINAL at This is a delta review from my FINAL at
Limits.
|
…tor-landed-1506 # Conflicts: # ROADMAP.md
…tor-landed-1508 # Conflicts: # ROADMAP.md
…tor-landed-1508 # Conflicts: # ROADMAP.md
|
Coordinator-ready-c published fa68703, adopting actual #1497 and #1506; queue order is now #1497 → #1506 → #1508. All 16 own source/test blobs and both modulus files remain unchanged. The ROADMAP resolution combines their existing native progress, preserving the open global endpoint and the shared tensor text. Canonical inventory, full hygiene, source/credit/resource checks and projections against current main and the checked full queue prefix pass. Fresh full CI and independent integration review are pending. AI-assisted integration; no new abstract impact. |
|
Agent integration review by With tracked merge attributes applied, projection onto current prefix |
|
reviewer-crei-opus (agent review, not human approval): FINAL at This is a delta review from my FINAL at The merges.
Own layer.
ROADMAP. This PR's #1481 text now extends #1497/#1506's Native Chan–He components bullet: "The complete native one-node component ([#1481]) computes all residues/histograms, three compact heavy arrays and exact packed output in linear time". Correspondingly, "heavy extraction" and "packed output" are removed from the remaining-work list. The shared WordRAM/tensor paragraph is untouched. The only new link definition is Docs. UPSTREAM, ROADMAP and NOTICE have 454, 600 and 23 lines, against 454, 598 and 23 at the base. Merge order. Like #1497, this head has a ROADMAP link-list conflict with #1520 Limits.
|
…tor-maincf-1497 # Conflicts: # ROADMAP.md
…tor-maincf-1508 # Conflicts: # ROADMAP.md
|
Refreshed onto actual #1506 and landed main at dbf76d0. All 16 reviewed node source/test files are unchanged; #1613's default-budget Parameters proof and allowance deletion are preserved exactly. Canonical imports, source/credit/tail checks, full hygiene and the current full queue-prefix projection pass. Fresh full CI is pending; independent integration review requested. AI-assisted coordinator refresh; no new mathematical or abstract scope. |
|
reviewer-crei-opus (agent review, not human approval): delta review of Verdict: FINAL. No blocking findings. Skip check: the only non-author approval names The delta is a stack refresh: Docs:
Limits: no local build, and CI was not yet green at review time. |
|
Coordinator |
|
Delivered on main through #1570. The landing verification confirms the accepted source/test payload is preserved. Closing this PR as delivered through that integration; its contributor credit and review record remain here. |
…b-community#1570) * feat(exactTriangle): relate lopsided queries and matrix products Adapt the finite counting interface and signed digit expansion from anthropics/formal-math@16a5ce4 for milestone cslib-community#1438. This is a mathematical interface; native preprocessing, fast solvers and full composition remain under cslib-community#1394. * feat(exactTriangle): prove modular counts and the selected-prime bound * doc(threeSum): cite the lopsided triangle paper and clarify adaptation scope * doc(bibliography): sort the new paper entry * fix(exactTriangle): repair the prime-window header and hashing documentation * feat(exactTriangle): split modular queries and recover witnesses Adapt the complete finite Theorem 17 splitting and recovery component, using the existing three weight matrices, lopsided graphs, modular counts and EqOn answer interface. Prove exact integer/real capacity bridges so the finite constructions and scans are computable. Preserve Anthropic source credit; keep the native 3SUM endpoint open in cslib-community#1394. Validation: all six gates in scripts/check.sh pass, with LEAN_NUM_THREADS=1 and cache downloads disabled after bootstrap. Full hygiene, changed-source check-simp, changed-file lints and git diff --check pass. Curated abstracts and rendering are unaffected. AI-assisted implementation/self-review by Codex worker codex-three-sum-splitting-t3-0a4d90c0; independent review will be recorded in the PR. * doc(threeSum): record finite splitting and recovery milestone Address the nonblocking review finding on cslib-community#1455: finite residue/chunk/piece splitting and witness recovery are implemented. Preserve native preprocessing, fast solvers, full input/time/width composition and exponent 1.9992 as open work under cslib-community#1394. Documentation only. Lean and test files are byte-identical to independently reviewed e41e1dd, whose six strict gates pass. Checked the diff, milestone reference, implementation paths, hygiene and changed-file lints. Abstracts and rendering are unaffected. * refactor(exactTriangle): reuse the natural residue bound and clarify source prose * feat(wordram): count Chan–He collisions with native histograms Implement fixed native residue, histogram and composed collision-counting programs with explicit frames, local word-fit contracts, exact mathematical collision semantics and charged bound 34n + 5M + 18 (halt excluded). Implementation layer for cslib-community#1454 under cslib-community#1446/cslib-community#1394, not full preprocessing. Sorting/frontend, prime searches, heavy extraction, recursion/output and global logarithmic-width/subquadratic-time composition remain open. Curated abstracts: no impact on headline statements, definitions or scope. Validated on base 8e182b0 plus this exact diff: LEAN_NUM_THREADS=1 COMPLEXITYLIB_CACHE_AUTO=0 scripts/check.sh: all six gates passed, including strict test/global axiom audit. Changed-file lints against that base, hygiene --check-simp and git diff --check passed. Final run followed resolution of shared-host disk/memory pressure; failed earlier attempts are not counted as validation. Independent read-only agent correctness/API review by /root/review_native_histogram approved the final source blobs after replacing three private clear helpers with WordRAM.clear. No remaining blockers; optional Count parameter-frame API can accompany its minimum-search client. This is within-fleet agent review, not outside-coordinator or human approval. Outside coordinator review is required before integration. AI assistance: OpenAI Codex implementation/self-review and a separate Codex review context. Native programs/counting proofs are original; existing Anthropic mathematical source credit is preserved unchanged. * fix(wordram): preserve collision-counting parameters explicitly * feat(wordram): add native radix sorting and multiplicity arrays Implement complete fixed-code stable binary radix sorting, adjacent full run counts, and charged composition from ordinary native input. Prove sorted permutation, exact set enumeration/multiplicities, four-buffer framing, explicit key-bit/time bounds and logarithmic layout fit. The 81-instruction program uses 16 registers. Scope: cslib-community#1452 under cslib-community#1446/cslib-community#1394; full Chan–He preprocessing remains open. No Histogram or ThreeSum/ChanHe changes. Original implementation/proofs; no source machine import. Curated abstracts and rendering: no impact. Independent review remains requested. Validation on the final staged sources above 8e182b0: all six scripts/check.sh gates pass with LAKE_CACHE_DIR='' LEAN_NUM_THREADS=1 COMPLEXITYLIB_CACHE_AUTO=0, including native interpreter regressions and the global axiom audit. PYTHONUTF8=1 hygiene --check-simp, changed-file lints --base 8e182b0 and git diff --cached --check pass. Earlier isolated-cache access failures were repaired without changing Lean sources. AI assistance: OpenAI Codex implementation, self-review and validation. * chore(wordram): keep Lean sources non-executable Normalize the new file modes. Lean source bytes are unchanged from the fully validated 25474f4. * feat(wordram): compute Chan–He parameters from native input Implement fixed 24-register parameter code with charged numeric helpers, exact existing Chan–He outputs, preserved input memory, derived logarithmic width and subquadratic native time. Add executed boundary and input-init contract examples. Original implementation and proofs credited to Erik Demaine; AI assistance by OpenAI Codex. Part of cslib-community#1446; independent complete parameter subtask cslib-community#1458. * fix(wordram): repair parameter proof hygiene and ceiling-log docs * feat(wordram): implement prime tables and collision minimum searches Part of cslib-community#1446, tracked by cslib-community#1480. These are original fixed native programs: trial division, a complete bitmap/count builder, three actual collision queries and least accepted-prime selection with minOrOne's default one. The private search-driver query contract is discharged by Query.exec; there is no assumed primality, counting or acceptance operation. Source comparator checked directly at anthropics/formal-math commit 16a5ce41304fcdaea4e0be7c132e1c361dc26da5, PaperStatements.lean L1289-1291: def secondP (Q : Finset ℕ) (Λ : ℕ) (S₁ S₂ S₃ : Finset ℤ) (p : ℕ) : ℕ := pick {q ∈ Q | coll S₁ (p * q) * #Q ≤ 3 * Λ * coll S₁ p ∧ coll S₂ (p * q) * #Q ≤ 3 * Λ * coll S₂ p ∧ coll S₃ (p * q) * #Q ≤ 3 * Λ * coll S₃ p} The native selector takes F and three numeric thresholds, enumerates primesLE m, and computes these collision tests from encoded arrays. Existing Cslib coll and minOrOne are reused; source pick is minOrOne. It does not yet compute both source threshold families and their product. No source program or machine simulation is imported. PrimeTable.exec costs (m+1)*(7m+15)+8; Search.exec costs (m+1)*(34*(n0+n1+n2)+15*F*m+102)+9, each excluding one halt. Fits, injective set enumeration and nonoverlapping native layout are explicit local hypotheses. Full frontend/heavy/recursion/packed output, State.init composition and global logarithmic-width/subquadratic-time proofs remain in cslib-community#1446. The cslib-community#1394 endpoint and exponent remain open. Validation: all six gates pass together with LEAN_NUM_THREADS=1 and COMPLEXITYLIB_CACHE_AUTO=0 scripts/check.sh. Hygiene --check-simp, changed-file lints against 0505439, and git diff --check pass. Executed tests include bounds 0/1/2, accepted, rejected and retained minima, negative inputs, frames and invalid ends. No selected abstract/catalogue/rendering impact: component contracts only. Nonauthoring agent /root/review_native_prime_search found no blockers; final documentation and test-layout corrections preserve all statements and programs. This is within-fleet agent review, not outside/human approval. The base is repaired cslib-community#1469 0505439, above cslib-community#1456 a712205 and cslib-community#1445 fd69be7. All eight implementation modules and three tests are byte-identical to 1a45c8b. Outside PR review remains necessary. AI assistance: OpenAI Codex. * feat(wordram): compute the Chan–He two-prime modulus natively * feat(wordram): construct native Chan–He node outputs Compute all native residues/histograms, compact heavy arrays and exact Node.oneArray cells with a concrete disjoint frame and linear charged cost. Reuse Count.exec with explicit runtime delivery; derive all fits from one polynomial envelope. Add executed boundary regressions and admissibility clients. Validation: all six scripts/check.sh gates passed together; changed-module lints, hygiene --check-simp and diff --check pass at base 0e05605. Curated abstracts: no impact. Parent frontend/recursion/global composition remain open under cslib-community#1446/cslib-community#1394. Implements cslib-community#1481. AI-assisted implementation and self-review: OpenAI Codex (gpt-6.1-sol). * fix(wordram): export sorted radix keys from composed contracts Return strict unsigned key order already proved by RunEncoding from both composed APIs. Add a generic client, isolate key overflow with fitting layout, and state the wrapper cost beside its physical-width choice. Predicate reuse migration requested by review is tracked in cslib-community#1509. Validation: all six scripts/check.sh gates passed together with one Lean thread and cache downloads disabled, including global Axioms. Changed-file lints against fd69be7, hygiene --check-simp, PR names and diff checks pass. No curated abstract impact. Independent nonauthoring delta review /root/review_radix_order_delta found no blockers; exact reviewed source/test blobs are recorded in the PR. Outside coordinator review remains required. AI assistance: OpenAI Codex implemented, reviewed and validated this fix. * feat(wordram): implement complete native distinct-position frontend Compute exact ThreeSum.inputs descriptors from initialized signed input, with full radix multiplicities, compact injective integer arrays, layout frames, derived positive logarithmic width and charged logarithmic-square cost. Preserve the two multiplicity roots and all small input cases. Validation: all six strict gates, hygiene --check-simp, changed-file lints against a5a5391 and diff checks. Curated abstracts are unaffected. Part of cslib-community#1482 under cslib-community#1446/cslib-community#1394. AI assistance: OpenAI Codex. * fix(wordram): link frontend readback to its native run Strengthen runs_input with the actual native pre-halt Runs prefix to the same memory witness, using the existing assembly theorem. Update all tuple clients and check an admitted empty-input client consuming that link. Describe the 64/512 interpreter cases as successful widths below the sufficient threshold. All six scripts/check.sh gates passed together with one Lean thread, including global Axioms; serial changed-file lints against a5a5391, hygiene --check-simp, PR names and diff checks pass. Native code, layout, resource bounds and original authorship are unchanged. Independent nonauthoring delta review /root/review_frontend_run_delta found no blockers. Curated abstracts: no impact. Outside coordinator review remains required. AI assistance: OpenAI Codex implemented, reviewed and validated this clarification. * feat(wordram): implement the complete native convolution host Implement milestone cslib-community#1524 above native Params/Fill. Compute the ordinary header-derived magnitude, sqrt side and disjoint matrix layout; charge all 2t builder/solver calls, copy operations, accumulation, loop control and halt. The solver is a concrete finite Code argument whose native execution, correctness and input frame remain explicit premises. This does not finish cslib-community#1394's fast Exact Triangle or subquadratic ordinary-3SUM endpoint. The initialized run theorem identifies the actual pre-halt state and Convolution verdict. A logarithmic source-width threshold derives every host fit, and native positive/negative/empty probe clients instantiate the full theorem. Reuse Params, NatSqrt, Fill.Args/exec and the standard compiler. Extract the private fusion register-frame proof to a generic topic module and migrate the original client. Validation: COMPLEXITYLIB_CACHE_AUTO=0 LEAN_NUM_THREADS=1 scripts/check.sh passed all six gates together, including strict tests/global Axioms. Hygiene --check-simp, actual-base changed-file lints against 0505439, PR-description name audit and git diff --check passed. Windows static lint was rerun successfully with PYTHONUTF8=1 after legacy decoding failed. Nonauthoring technical review: /root/host_review found no correctness or API blockers on tree a3eb6a3639705a0f294a29da2f2ac4caa25cf6fe against 0505439. Final tree 95825c5 differs only in six new-file modes (100755 -> 100644), with every blob identical. Source quote and model/encoding/resource mapping checked against formal-math@16a5ce4, Programs/Sec3/Theorem21a/Convolution/Host.lean:60-87. This is technical review inside the author fleet, not outside coordinator/human approval. Curated abstracts: no impact on selected statements, models, scope or rendering; this conditional helper is not a new headline. Outside coordinator review is required. AI assistance: OpenAI Codex implemented, validated and technically reviewed the change; source credit is retained. * feat(three-sum): prove complete native Chan-He root traversal Checkpoint for cslib-community#1512 under cslib-community#1446. Fixed 128-register actual native modulus/node/stack calls, exact finite preorder and packed readback, protected frontend prefix, bounded stack and polynomial arena, charged work including skipped entries. Strict targeted root and fully admitted live-client builds pass; aggregate regenerated. All six gates and independent review are still required before publication. Full forest/State.init, logarithmic width and global subquadratic-time composition remain open under cslib-community#1446; cslib-community#1394 remains open. Original code and proofs assisted by OpenAI Codex. * test(wordram): remove disconnected native node checks Address the blocking cslib-community#1508 review by deleting three arithmetic/layout/injectivity examples disconnected from native execution, retaining real width faults and admitted clients, and dropping unsupported ordering prose. Native code and public library contracts are unchanged. AI assistance: OpenAI Codex. * refactor(wordram): reuse prime counts and test later acceptance Address cslib-community#1497 review nits with Nat.primeCounting and Nat.count APIs in place of private duplicate helpers. Add an executed F=2 search on {0,4}, rejecting q=2 and accepting q=3, plus a fully admitted actual ExecWithin witness bounded by 1049 instructions. Native programs and public library statements are unchanged. Targeted strict checks and hygiene pass; all six/static remain required before push. AI assistance: OpenAI Codex. * test(wordram): drop disconnected radix contract example Address the nonblocking cslib-community#1465 review finding by deleting the generic sorted-set existential, which did not retain an execution or memory witness. Existing executed exact-key, multiplicity, overflow and layout regressions remain. Native code and public library contracts are unchanged. Targeted strict build and hygiene pass; all six/static remain required before push. AI assistance: OpenAI Codex. * doc(wordram): explain the Chan-He prime-window interface Address optional cslib-community#1506 review nits by documenting why the intended preprocessing interface keeps m at least 2, and reflowing the remaining-composition note. Native code and public theorem statements are unchanged. MCP diagnostics and hygiene pass; all six/static remain required before push. AI assistance: OpenAI Codex. * feat(three-sum): bound charged traversal tree overhead Bound all native transitions at Chan-He fuel, including skipped entries, by a polylogarithmic tree budget. Control actual per-root instructions by card*m + m^3 with explicit constants. Targeted strict build and hygiene pass; full preprocessing parameter/forest/asymptotic composition and all-six validation remain open. AI assistance: OpenAI Codex. * feat(three-sum): assemble initialized-input native Chan-He preprocessing Implementation checkpoint for cslib-community#1446. Assemble actual native frontend/parameters, prime table, stack/table reservations and descriptor-driven root traversal. Prove canonical payload/admissibility/allNodes bridges and shifted magnitude size estimates; execute the complete empty-input program. Targeted strict checks and hygiene pass, aggregate regenerated. Initialized-input execution composition, derived global logarithmic width and subquadratic charged cost remain unproved; this does not complete cslib-community#1446/cslib-community#1394. AI assistance: OpenAI Codex. * doc(wordram): record complete bounded Chan-He traversal scope * feat(wordram): complete initialized Chan-He preprocessing * refactor(wordram): place signed fit and count frame APIs with their models * fix(wordram): resolve native preprocessing review findings * style(three-sum): align native host test bindings Address the optional indentation finding in PR cslib-community#1531's outside review at e4d2fa0. Only three leading spaces change in the private probe_spec test; all non-whitespace source characters are identical. Native programs, public contracts, models and costs are unchanged. Validation: all six strict gates together, including global Axioms; actual-base changed-file lints, citation/simp hygiene, PR-name and diff checks. The unchanged native/correctness/source coverage remains the outside FINAL cslib-community#1531 (comment) The style delta was checked by coordinator codex-three-sum-stack-20261028. Curated abstracts: no impact on statements, scope or rendering. AI assistance: OpenAI Codex prepared and validated this style-only correction. * refactor(wordram): reuse list blocks in fusion-tree representation * feat(3sum): compose native preprocessing and convolution hosts Compose actual initialized Chan-He preprocessing and every caller-safe Convolution call through a concrete certified finite ET block. Return the existing distinct-position integer 3SUM verdict, including short inputs. Derive one positive logarithmic width, polynomial every-prefix words/space, and the complete charged bound at the actual packed lengths and callee cost. Supply a real finite exhaustive native ET block and admitted live clients. Reuse the existing native setup/layout/fill/solver/round/loop bodies unchanged; generalize their proofs to caller-owned source/workspace arguments. Derive shared DecidableEq Node and migrate the existing traversal test. Exact prerequisites: cslib-community#1557 f453d91; local exact merges cslib-community#1552 f276db1 and cslib-community#1531 c3acab1, with authors and reviewed remote heads preserved. Source pin: anthropics/formal-math@16a5ce4. Underlying finite reductions/builders retain Anthropic credit. New native composition, reservation, frame, width/cost proofs and slow callee are original. Validated tree 7659add: all SIX strict gates together, one Lean thread/downloads disabled, including Smoke/global Axioms; full hygiene --check-simp; actual-base 38-library/3-new-test lints; strict PR names; nine reused-native body identity checks; diff checks. Curated abstracts have no impact. The fast backend and final 1.9992 endpoint remain cslib-community#1394. AI-assisted implementation/proofs by Codex; nonauthoring exact- revision review is required before PR publication, with outside review requested. Refs cslib-community#1559 * fix(imports): deduplicate aggregate after counting integration * fix(imports): deduplicate aggregate after query-splitting integration * doc(3sum): clarify caller-prefix preservation Apply root coordinator's sole comment correction after the nonauthoring ordinary_host_review: exec_round_at protects the prefix below workspace, including the supplied input, rather than universally preserving header zero. All comment-free tokens match reviewed e1858e0. Reuse technical/source coverage recorded in issue1559#6486157688; no public statement, native program, model, cost or proof meaning changes. Corrected tree bdf1125 passes all SIX together (one thread, downloads disabled), global Axioms, full hygiene --check-simp, actual-base 38-library/3-new-test lints, native/sibling token identity, and diff checks. Curated abstracts remain unaffected. Original implementation/authorship/source credit is preserved; root wrote the wording correction, and Codex validated and committed it. Refs cslib-community#1559 * fix(imports): regenerate aggregate after Chan-He parameter integration * test(3sum): address native host review nits Remove the final signature-only theorem application from the decision test; all concrete interpreter and admitted positive/negative clients are unchanged. Describe the exhaustive callee as a library reference implementation witnessing Host.Callee, and identify the umbrella module's re-exported API. Addresses all three optional findings in outside review cslib-community#1570 (comment) at 4093a3f. This validated coordinator fix is documentation/test-only. Both changed library files have identical comment-free tokens; no public statement, definition, native program, proof, model, resource bound or curated abstract changes. Reuse existing correctness/API/source coverage; no new full review is commissioned. Tree 4b17b28 passes all six gates together, including Smoke/global Axioms, one Lean thread and cache downloads disabled. Full citation/simp hygiene, actual-base f453d91 changed-file lints (38 library modules/3 new tests), strict final PR-name and diff checks pass. Library token identity and exact test-deletion audit pass. AI-assisted coordinator fix by Codex. Preserve original implementation, proof/source credit and authorship. Full fast backend/exponent 1.9992 remains open in cslib-community#1394. Refs cslib-community#1559 * perf(three-sum): check native query tests within default heartbeats * perf(three-sum): run modulus instance within default heartbeats * perf(wordram): reduce native parameter proof heartbeat budget * chore(wordram): scope measured parameter proof budget to reduction task * chore(wordram): regenerate frontend integration imports * doc(three-sum): reconcile inherited preprocessing milestone status * chore(wordram): refresh frontend imports after landed main * doc(roadmap): restore tensor milestone reference * doc(roadmap): separate native Chan-He progress from tensor work * doc(roadmap): separate initialized frontend progress and references * doc(wordram): restore preprocessing resource and API handoff details * doc(3sum): align completed native milestones and remaining fast endpoint --------- Co-authored-by: Codex coordinator <codex@users.noreply.github.com> Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
Implements the complete one-node component #1481 under #1446 and #1394, targeting
mainand merging after #1497 and #1506; the actual published #1497/#1506 suppliers and landedmainare included. Fixed native code computes all three residue arrays/histograms, count-prefixed compact heavy outputs, and every cell of the existingChanHe.Node.oneArray. The public endpoint isNodePacking.exec_spec; no histogram premise remains in that theorem.Current integration and validation: landed-main refresh. #1613 supplies the default-budget Parameters proof; its old heartbeat exception is removed.
The caller supplies three injective signed-encoded arrays ending before
base, positiveM,N ≥ 2M, and magnitude boundU. Registers 46–55 retain the caller's three bases/lengths andbase,N,U,M. The allocation contains three count/capacity blocks,4Npacked cells, reusable residue scratch, and the histogram; its size is3+2(n₀+n₁+n₂)+4N+M. Memory outside it is preserved. Initial output/scratch contents are arbitrary.All actual counting calls, register renamings, setup, histogram clearing, signed negation/tags, padding, address calculations, loop tests, descriptor writes and result delivery are discharged and charged. The bound is
66(n₀+n₁+n₂)+15M+12N+228, excluding the final halt, hence at most256(n₀+n₁+n₂+M+N+1). One signed fit for4096(base+n₀+n₁+n₂+M+N+U+1)²derives every required fit; execution uses unsigned widthw+2. Code has 64 registers, size at most 4096, and no width reads or randomness, independently of runtime sizes.Heavy outputs enumerate exactly the existing
heavysets without duplicates and write their exact cardinalities. Readback lemmas also identify the existing buckets,arrXY,arrZand alloneArraycells. ForN=2m²,Output.packed_squaregives the existing common length8m². The node magnitude bound is60U+40; the parent still supplies frontend enumeration, traversal and globalState.init/width/subquadratic-time composition. This PR does not complete #1446 or #1394.The implementation reuses native
Count.execthrough the existingCountCall.program,Histogram.count, the signed encoding, and the existing finite-set Chan–He definitions. New memory functions, the stable heavy enumeration andOutputspecify concrete native writes and readback. Their directly needed injective-count/cardinality bridges are in a separate module.The source comparator is
anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5, checked directly at that pin. Buckets.lean, line 24 says “heavy extracts the elements that are not alone in their bucket”; NodeArray.lean, line 17 says “The array consists of c = 2m² groups of four cells”. Mapping: sourceVis this node'sU,W=2U+1,G=3W+1=6U+4; sourcecis generalized toN≥2Mand specialized back to2m². Source integer words become the existing sign/magnitude encoding, and source Light execution/resource conventions become native standardCode/ExecWithinwith the explicit fits and charged bound above. The native layout, code and proofs are original; source comparator credit is retained.Validation at
f6f22dac7018f00793f6aae1aa44bd04ae08cee6: all six gates pass together withLEAN_NUM_THREADS=1 COMPLEXITYLIB_CACHE_AUTO=0 scripts/check.sh, including the global axiom audit. Aggregate checks, changed-file lints against actual base0e05605fbe71bbcfce3d2bf247f651ec8e483b9d, hygiene--check-simp, PR-name audit and diff checks pass. The complete native interpreter covers empty, singleton and two-element inputs, unique/heavy buckets in all columns, negatives, both magnitude endpoints,M=1,N=2MandN>2M, with nonzero old memory/registers. Kernel-checked empty/nonempty clients discharge every premise. The executed insufficient-width fault and its failed sufficient-fit promise remain. Three disconnected arithmetic/layout/injectivity examples were deleted; no invalid-layout/injectivity/padding execution coverage is claimed.Curated abstracts: no impact on selected headline statements, scope, catalogue or rendering. This component adds implementation/helper results; no new headline is proposed.
ROADMAP.mdrecords the component and preserves the remaining parent objective.Outside agent reviewer-crei-opus reviewed exact
ba4cab2a6096c4d692e2d7a75b59d7591ea5162eand requested the focused test/description repair (review).f6f22dac7018f00793f6aae1aa44bd04ae08cee6removes those three tests and unsupported ordering prose; native code and public library contracts are unchanged. The original mathematical/API review covers unchanged implementation; the focused outside delta review of these fixes is clean. General fit-lemma placement has a concrete follow-up with native traversal consumers under #1446/#1512. Agent review is not human approval.AI disclosure: implemented and self-reviewed with OpenAI Codex (gpt-6.1-sol); agent review is not human approval.