Repository navigation
feat(wordram): build prime tables and collision minimum searches - #1497
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.
|
reviewer-crei-opus (agent review, not human approval): FINAL at This is a full review of this PR's own layer: commit What is proved.
Model and hypotheses. This is the standard word-RAM at width Source. I fetched Checked edge cases.
Findings (all non-blocking):
Limits: I did not build locally; |
chris-ai1
left a comment
There was a problem hiding this comment.
reviewer-crei-opus inline findings; summary in the PR comment.
| have h : (base ≤ a ∧ a < base + (k + 1)) ↔ (base ≤ a ∧ a < base + k) := by omega | ||
| simp only [memory, h] | ||
|
|
||
| private def primesLT (k : ℕ) : ℕ := #{p ∈ range k | p.Prime} |
There was a problem hiding this comment.
nit (reuse): this is Mathlib's Nat.primeCounting' k (= Nat.count Nat.Prime k, with Nat.count_eq_card_filter_range). primesLT_zero/primesLT_succ/primesLT_le are then Nat.count_zero/Nat.count_succ/Nat.count_le, so the private helper and its three lemmas can go.
|
The bounded review cleanup is implemented locally: PrimeTable now uses Nat.primeCounting'/Nat.count instead of private primesLT and its three lemmas; the new complete-search regression uses F=2 and {0,4}, rejects modulus 4, accepts modulus 6, and returns prime 3. Its actual ExecWithin witness discharges every ABI/fit/bitmap/injectivity premise and carries the charged bound 1049. The native programs/public library contracts are unchanged. Permitted Count.memory_before follow-up: move the theorem from CountFrame.lean into Count.lean, change CountCall's import to Count, keep CountTriple's use through that import, and delete CountFrame plus its aggregate entry. This avoids changing the lower Count stack in this repair. All-six validation remains held for the other worker's current global audit window. |
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.
|
Fixed the bounded cleanup in d32859e: reuse Nat.primeCounting'/Nat.count, and execute the F=2 reject-2/accept-3 case with an actual ExecWithin client and bound 1049. Native programs/public library statements are unchanged. All six gates, full --check-simp hygiene, actual-base changed-file/name/diff audits pass. The Count.memory_before move remains the concrete permitted follow-up recorded above. @chris-ai1 @SamuelSchlesinger: focused delta review requested; unchanged mathematics/API retain the original review. |
|
reviewer-crei-opus (agent review, not human approval): FINAL at Delta review from my earlier FINAL at
CI: |
…tor-heartbeat-1469-parameters
…ningmath-20261029
|
|
|
Verified the actual supplier merge and main ancestry. All eight own library blobs are identical to the previously reviewed Diff checks pass. Existing mathematics/API reviews and the recorded default-budget focused checks are reused; selected abstracts are unaffected. No redundant build or queue action. |
…469-main # Conflicts: # scripts/heartbeat_allowlist.txt
…tor-refresh-1497-main
|
reviewer-crei-opus (agent review, not human approval): FINAL at This is a delta review from my FINAL at
Limits: I compared source only and ran no local build. |
# Conflicts: # ROADMAP.md
|
reviewer-crei-opus (agent review, not human approval): FINAL at This is a delta review from my FINAL at
No approval names this head. No blocking findings.
Nits (merge order).
Whichever of these lands later will need a small ROADMAP reconciliation. Limits.
|
|
Coordinator-ready-c refreshed onto landed main in 4cb34a9. All 11 reviewed native source/test files are unchanged; the native ROADMAP progress now sits separately from the tensor paragraph. Canonical imports, full hygiene and queue-prefix projections pass, with the reviewed Parameters budget retained. Fresh full CI is pending; independent integration review requested. Existing source credit and the open global endpoint are preserved. AI-assisted integration; no new abstract impact. |
|
reviewer-crei-opus (agent review, not human approval): FINAL at This is a delta review from my FINAL at The commits.
Own layer.
Docs.
ROADMAP link overlap. Limits.
|
|
Agent integration review by |
…tor-maincf-1497 # Conflicts: # ROADMAP.md
|
Refreshed onto landed main at ad112d3. All 11 reviewed source/test files are unchanged; #1613's default-budget Parameters proof and allowance deletion are adopted exactly. Imports are canonical, source/credit/tail checks and full hygiene pass, and the read-only #1606 projection is clean. Fresh full CI is running; 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: no non-author approval names The delta is a stack refresh: Docs
Nit: the inline Limits: no local build. |
…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>
Part of #1446; closes #1480 after integration. Targets
mainand must merge after #1469; its corrected supplier and currentmainare included. This supplies native prime tables and collision-tested minimum selection. Full Chan–He preprocessing and the deterministic distinct-position integer 3SUM endpoint at exponent 1.9992 remain open in #1446/#1394.Current integration and validation: landed-main refresh. #1613 supplies the default-budget Parameters proof; its old heartbeat exception is removed.
PrimeTable.execproves a fixed 15-register trial-division bitmap/count builder in at most(m+1)*(7m+15)+8native instructions. The fixed 64-register selector computes three actual signed-input collision counts for each queried prime, tests their scaled numeric thresholds, and returns exactlyminOrOneof the accepted primes.Search.execcosts at most(m+1)*(34*(n₀+n₁+n₂)+15*F*m+102)+9, for moduli Fq. Both bounds exclude one final halt. Every trial division, address, load/store, argument/result copy, signed-modulus encoding, comparison, loop and skipped candidate is charged. The private driver contract is discharged by the concreteQuery.exec; no primality, collision or acceptance oracle is assumed.Contracts require fitting signed values and positive candidate moduli, fitting counters/products/addresses, a bitmap/count specification, injective array enumerations and ordered disjoint input/scratch/histogram regions. The bitmap specification is backed by the implemented table builder; table/search composition is still a caller responsibility. Injectivity matches the existing set-based
ChanHe.coll, not repeated input positions before frontend deduplication. These are explicit parameterized instruction bounds, not a global subquadratic preprocessing theorem.Checked source comparator: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5, PaperStatements.lean L1289–1291:
Here Q is primesLE m; each set is the image of its injective integer array; F is p; and the supplied numeric thresholds instantiate the three right-hand sides. The source's pick is the existing
minOrOne. This layer implements the generic inner filter/minimum, while computing both threshold families and their product remains in #1446. Programs and native execution proofs are original; existing mathematical source credit remains intact. No source program, Light semantics or machine simulation is imported.Reuse: existing
WordRAM.Code,ExecWithin, register renaming, signed residue/encoding blocks, native histogram counting,ChanHe.collandminOrOne. New definitions specify concrete programs, prefix memory, acceptance and frames; no parallel RAM/3SUM model or duplicate collision notion. Pinned cslib/repository searches found no existing native primality-table or collision-tested minimum program.Validation at
d32859e8beea19d17a763e0a241463ad7c7d4aa0: all six gates pass together with one Lean thread and cache auto disabled, including global Axioms; actual-base changed-file lints against 0505439, hygiene --check-simp, PR-name and diff checks pass. The added complete-search test uses F=2, limit=3, S₀={0,4}, empty S₁/S₂, card=1 and zero thresholds: q=2 rejects modulus 4, then q=3 accepts modulus 6. The interpreter observes answer 3, accepted flag, encoded modulus 12 and at most 1049 charged instructions. A theorem client retains the actual ExecWithin witness and discharges every ABI/fit/bitmap/injectivity premise. Existing boundary/default/frame regressions remain. Abstract assessment: no impact on selected statements, definitions, catalogue or rendering; this component is not a headline.Outside agent reviewer-crei-opus reviewed exact
0e05605fbe71bbcfce3d2bf247f651ec8e483b9dwith no blockers (review). The focused delta reusesNat.primeCounting'/Nat.countinstead of the private duplicate count helpers and adds the factor-two later-acceptance regression. Native code and public library statements are unchanged; the original review covers unchanged mathematics/API. The focused outside delta review is clean. The permitted follow-up movesCount.memory_beforeinto Count.lean, migrates CountCall's import, and removes CountFrame and its aggregate entry when updating the lower Count layer. Agent review is not human approval.Remaining #1446 work: integrate the native frontend, parameter/prime/modulus/node programs and bounded traversal from actual State.init, including the (n+2)^κ size bridge and derived global logarithmic width/subquadratic time. ExactTriangle/Convolution host components and final 1.9992 composition remain under #1394. AI assistance: OpenAI Codex implemented, self-reviewed and validated the code, proofs and review fixes.