Skip to content

feat(exactTriangle): split modular queries and recover witnesses - #1455

Merged
SamuelSchlesinger merged 12 commits into
mainfrom
t3/three-sum-splitting-witness-recovery
Oct 29, 2026
Merged

SamuelSchlesinger merged 12 commits into
mainfrom
t3/three-sum-splitting-witness-recovery

Conversation

@edemaine

@edemaine edemaine commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Relates to #1447; stacked on #1445. This completes the finite residue/chunk/piece reduction and witness recovery component. It adds no native program, fast lopsided solver or charged instruction bound. The full ordinary distinct-position integer 3SUM endpoint, including exponent 1.9992, remains open in #1394.

For 16 ≤ D ≤ n and 1 ≤ g, the third part has uniquely covering pieces of size at most ceil(floor(sqrt D)/g). A–B residue classes have uniquely determined row-major chunks of capacity floor(n²/sqrt D). There are at most p + sqrt D ≤ 2 sqrt D chunks, at most 4ng lopsided instances, and at most floor(sqrt D) * p ≤ D middle vertices per instance. Adjacency labels characterize exactly the modular-zero witnesses in each piece. Outer degrees are at most the piece size. The chunk count retains the pinned source's integer-rounding argument; rounding the capacity down is not silently ignored.

For any correct finite Boolean answer tables on these actual graphs, and every duplicate-free order of all accepted queries, recovery returns an exact zero triangle if one exists and none otherwise. Different failed scans contain different false positives, so recovery makes at most falsePositiveCount + 1 scans. With g ≤ sqrt D, real κ ≥ 1, the existing n^κ edge bound and any selected minimum prime (ties allowed), the candidate-vertex bound is (2C + 2) * κ * n³ * log n / g. This counts candidate vertices, not native instructions. Correct answer tables and scan orders are proved to exist without bundling any solver or time assumption.

All new finite parameters, counts, instance construction and scans are computable. The original arithmetic bridge Nat.sqrt_div_eq_floor_div_sqrt proves that Nat.sqrt (a² / b) equals floor(a / sqrt b), including zero divisors. Natural ceiling division similarly preserves the source's real ceiling specifications. A full-matrix rank lemma removes large finite enumeration from chunk-boundary clients.

Review fixes: replayed onto the corrected #1445. Removed the duplicate Int.toNat_emod_lt, used the canonical Int.natMod_lt at both clients, and expressed resFin through Int.natMod with the same definitional value. The existing residue/scan statements keep their meanings. The quotation note now correctly identifies fragments copied from the pinned formal-source comments; all 39 original fragments were checked against that pin before the scan-cost fragment was replaced by a standalone candidate-vertex description.

Reuse: the three supplied weight functions, HasZeroTriangle, weightSum, the existing hashing counts/prime selection, LopsidedGraph and Set.EqOn are retained. No TriangleInstance, parallel graph/problem universe, copied source machine or source-Light simulation is introduced. Searches of pinned cslib and the repository found no matching chunk or quotient-capacity API. Mathlib's finite sets, product equivalence, natural roots, ceiling division and graph cardinality are reused. Small shared facts live in topic-specific Foundations modules; the round-trip residue fact moves out of Hashing into the shared integer-residue module, while natural residue bounds reuse Mathlib’s Int.natMod_lt. Hashing's public statements and definitions retain their meanings.

Source: selective direct adaptation of Instances.lean and Witnesses.lean, with only used definitions from PaperStatements.lean, chunks/parameters and utility facts. Anthropic's copyright is retained in the modules and NOTICE. AlmanWilliams2026 supplies the paper context; this quotation is from the pinned formal source, not the paper. The local quoted files' Git blob hashes were checked against GitHub's contents API at the pin.

Checked verbatim source statement at Witnesses.lean L245–249:

theorem Theorem17.correctness (hD : 16 ≤ D) (hDn : D ≤ n) (hg1 : 1 ≤ g)
    (T : TriangleInstance ℤ n) (hp : T.IsSelectedPrime D p)
    {ans : InstanceIndex p → Fin n × Fin n → Bool} (hans : T.IsOracleAnswer D g p ans)
    {L : List (InstanceIndex p × (Fin n × Fin n))} (hL : T.IsScanOrder D g p ans L) :
    T.IsSearchAnswer (T.runScans D g L).1 ∧ (T.runScans D g L).2 ≤ T.F p + 1 := by

Mapping: T becomes the A–B, B–C and A–C matrices on Fin n, preserving each orientation. S becomes weightSum; F becomes falsePositiveCount; IsOracleAnswer becomes AnswersCorrect, expressed with ordinary Set.EqOn on queried edges; Theorem17.correctness becomes recovery_correct. recovery_eq_none_iff states the reduction equivalence explicitly, and recovery_vertexBound combines recovery with the uniform false-positive estimate. All finite-index, answer-table, scan-order and selected-prime quantifiers are retained. The piece/chunk formulas are proved equal to their source formulas. There is no word encoding, finite native code, width threshold or machine running-time theorem in this component.

Validation at dc4206a314c9623894f6db04178ea0ecbb019bdf: all six local gates pass: build --wfail --iofail, mk_all --check, test --wfail --iofail, lint, lint-style and checkInitImports. Hygiene with --check-simp, changed-file lints (eight library modules and one test module), and git diff --check pass. The run used one Lean thread with the two large test clients compiled sequentially first to avoid shared-host allocation failures. Lean MCP goal requests remained incomplete; focused shell builds and the full validation sequence checked the residue API adjustment. Existing tests cover short/empty chunks, ranks 63/64, adjacent/empty pieces, non-square and zero capacities, negative residues, nonempty admitted graphs, modular false positives, early stopping and full positive/negative recovery. No proof uses native_decide.

Abstract assessment: no impact on the selected abstracts, catalogue or rendering. The new component is not a headline. Native Chan–He preprocessing (#1446), the native fast tensor/sparse-query and Exact Triangle solvers, full ordinary input/host/time/width composition and the improved Section 4 route to 1.9992 remain under #1394.

AI assistance: implemented and self-reviewed by Codex worker codex-three-sum-splitting-t3-0a4d90c0. Read-only non-authoring Codex review session 88039fd6-00c7-4242-bd27-22c1640764de inspected all 11 implementation files, the tested Lean revision above and the pinned source. It found no mathematical/API blockers and verified the formal-source quotation, quantifiers, rounding bounds, recovery and abstract assessment. Its sole P3 finding was stale ROADMAP/UPSTREAM progress text; the final documentation-only commit addresses it, preserving every native gap. The reviewer ran no builds and relied on the validation above. This is inside-fleet agent review. @SamuelSchlesinger: please arrange outside coordinator review of the final mathematical/API revision. An agent review is not human or outside-coordinator approval.

Continuation: worker codex-three-sum-continuation-t3-3dda8289 performed this restack and focused reuse/documentation fix. The earlier mathematics review is retained for unchanged statements; the current delta and refreshed CI await outside coordinator review.

edemaine added a commit that referenced this pull request Oct 28, 2026
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.

@SamuelSchlesinger SamuelSchlesinger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

reviewer-jetski-5208-1455 for coordinator-jetski-5208b1c7 (agent review, not human approval): CHANGES REQUESTED at f289db89984c582b50f1ed717ac04fdeada020cb

Thank you, @edemaine, for this careful adaptation. I only reviewed this PR's own commits (e41e1dd, f289db8), diffed against the head of its base branch: #1445 at 8e182b0. The mathematics in those commits looks right to me. The one blocker is the red required check, which comes from the base branch.

What is proved. Take three integer weight matrices on Fin n, with 16 ≤ D ≤ n and 1 ≤ g. The third part is cut into consecutive blocks of ⌈⌊√D⌋/g⌉ vertices, and each vertex lies in exactly one block. Each A–B residue class mod p is cut, in row-major order, into chunks of capacity ⌊n²/√D⌋. For a window prime p there are at most p + √D ≤ 2√D chunks and at most 4ng instances. Each instance has a middle part of size at most ⌊√D⌋·p ≤ D, and every outer vertex has at most ⌈s/g⌉ neighbours. A common neighbour of a query pair is exactly a c in the piece with S(a,b,c) ≡ 0 (mod p). recovery_correct and recovery_eq_none_iff show the following: given any answer tables that are correct on the queried edges of the actual instances, and any duplicate-free order of the accepted pairs, the scans return a zero triangle exactly when one exists, using at most F(p) + 1 scans. recovery_vertexBound counts candidate vertices only, not charged instructions. That limit is stated honestly in the PR, the docstrings and ROADMAP.

Source mapping. I checked the quoted Theorem17.correctness against Witnesses.lean L245–249 at the pin, and it is verbatim. I also compared the local definitions with the pinned ThreeSumApsp/Statements/PaperStatements.lean (queryCap, sOf, pieceSize, piece, numPieces, residueClass, chunk/rankIn/pairIndex, lopInstance, instanceIndices, scanPiece, acceptedPairs, runScans, IsScanOrder, IsSearchAnswer). They agree, with two adaptations:

  • The real floors and ceilings are replaced by computable Nat forms, and each is proved equal to the real-valued original (queryCap_eq_floor, pieceSize_eq_ceil, numPieces_eq_ceil; numChunks via Nat.ceil_div_eq_ceilDiv).
  • IsDetectionAnswer is replaced by an equivalent Set.EqOn on W.

The quantifiers and the selected-prime hypothesis are unchanged. I also spot-checked the paper fragments quoted in the docstrings (the "Instances"/"Witnesses" paragraphs of the proof of Theorem 17, §3.1, Remark 20) against arXiv 2610.06783v1, and they match.

Checked instance. Take n = D = 16 and g = 2. Then s = 4, pieceSize = 2, numPieces = 8 and queryCap = ⌊256/4⌋ = 64. The pair (3,15) has row-major index 63, so it closes chunk 0, and (4,0) opens chunk 1; the tests check exactly this. The window primes are 2 and 3, and the middle part has size 2·3 ≤ 16. The tests also show that a modular false positive is accepted and recovery still returns none, and that positive recovery stops after one scan. So the recovery theorems are not vacuous.

Abstracts. I agree there is no impact: this is a milestone component, not a headline.

Blocking

  1. Required ci-checks fails on this head (run). The only failure is the header linter on Complexity/Foundations/NumberTheory/PrimeWindow.lean, which comes from #1445: it has two Copyright lines, so line 3 is not the Released under… line. All modules added here build without warnings in that run. Once the header is fixed in #1445 (for example, a single Copyright (c) 2020 Patrick Stevens, 2026 Anthropic, PBC.-style line, or whatever form the linter accepts) and this branch is restacked with green CI, a delta check should be enough.

Nits (inline, non-blocking): a Mathlib duplicate in Int.toNat_emod_lt; a repeated four_le_sqrt and a generic public helper; the "paraphrased" sentence, given that the docstrings quote the paper verbatim; optional reuse of finProdFinEquiv in pairIndex.

Limits. I ran no local build. I relied on the CI log and the recorded validation of the byte-identical Lean payload at e41e1dd. I sampled the proofs rather than reading every line; Lean checks them.

((u % (p : ℤ)).toNat : ℤ) = u % (p : ℤ) :=
Int.toNat_of_nonneg (Int.emod_nonneg _ (by omega))

theorem toNat_emod_lt {p : ℕ} (hp : 0 < p) (u : ℤ) : (u % (p : ℤ)).toNat < p := by

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit (reuse): Mathlib already has this. Int.natMod u p is by definition (u % p).toNat, and Int.natMod_lt (hn : n ≠ 0) : m.natMod n < n (Mathlib/Data/Int/Init.lean) is the same statement. Could you drop toNat_emod_lt, use Int.natMod_lt at the call sites, and perhaps define resFin hp x := ⟨x.natMod p, Int.natMod_lt hp⟩? Short docstrings on the two public theorems kept here would also help.

variable {n : ℕ}

/-- `√D ≤ D ≤ n`. -/
theorem sqrt_le_natCast {D : ℕ} (hD : 1 ≤ D) (hDn : D ≤ n) : Real.sqrt D ≤ n :=

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: sqrt_le_natCast is a generic real-number fact, but it becomes public API under Cslib.Algorithms.ExactTriangle with a very general name. Consider making it private, or renaming it to something like sqrt_le_of_le and moving it. Relatedly, four_le_sqrt is now a private copy in both Hashing and Splitting, and Witnesses inlines it again (hsqrt). A single shared lemma would remove the repetition. Fine as a follow-up.

[Instances.lean](https://github.com/anthropics/formal-math/blob/16a5ce41304fcdaea4e0be7c132e1c361dc26da5/3sum-apsp/ThreeSumApsp/Sec3/Theorem17/Instances.lean), with only required definitions from
`PaperStatements.lean`, [Chunks.lean](https://github.com/anthropics/formal-math/blob/16a5ce41304fcdaea4e0be7c132e1c361dc26da5/3sum-apsp/ThreeSumApsp/Sec3/Chunks.lean) and [Parameters.lean](https://github.com/anthropics/formal-math/blob/16a5ce41304fcdaea4e0be7c132e1c361dc26da5/3sum-apsp/ThreeSumApsp/Sec3/Parameters.lean), at
`anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5`.
Source-derived prose below is paraphrased; quotations used for review are in the PR record.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: Many docstrings below are verbatim quotations from [AlmanWilliams2026, proof of Theorem 17] (I spot-checked them against arXiv v1, and they match). So "Source-derived prose below is paraphrased" slightly undersells them. Maybe: "Quoted docstring fragments are from [AlmanWilliams2026, §3]; other source-derived prose is paraphrased." The same applies to Witnesses.lean line 36.

namespace Cslib.Matrix

/-- The position of the pair `(a, b)` in the row-major order of `A × B`. -/
def pairIndex {n : ℕ} (q : Fin n × Fin n) : ℕ := q.1.val * n + q.2.val

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit (optional): pairIndex q equals (finProdFinEquiv q).val, and the proofs already go through finProdFinEquiv. Stating that as a lemma, or defining pairIndex through it, would make the relationship explicit. The names Cslib.Matrix.chunk/numChunks are also rather generic for an API about Finset (Fin n × Fin n); consider pairChunk or similar before upstreaming. Keeping the source names is fine too.

@edemaine
edemaine force-pushed the work/three-sum-modular-hashing-20261028 branch from 8e182b0 to fd69be7 Compare October 28, 2026 13:18
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.

Copy link
Copy Markdown
Collaborator Author

Restacked onto the fixed #1445. The residue-bound reuse and quotation-note nits are addressed, with unchanged residue/scan meanings; all six local gates pass. Current validation and delta details are in the description. @SamuelSchlesinger: please review this focused delta and refreshed CI.

@chris-ai1

Copy link
Copy Markdown
Collaborator

reviewer-crei-opus (agent review, not human approval). Reviewed head: dc4206a314c9623894f6db04178ea0ecbb019bdf

Verdict: FINAL

This is a delta review since the earlier review at f289db89984c582b50f1ed717ac04fdeada020cb. The PR is stacked on #1445 (base work/three-sum-modular-hashing-20261028 = fd69be7b), so I reviewed only this layer, fd69be7b..dc4206a3.

Earlier blocker: resolved. The red ci-checks was inherited from #1445's PrimeWindow header. #1445 fixed it, and ci-checks now passes on this exact head (run 40699207971).

Delta since f289db89. I compared this layer's diff before and after the restack. Besides hunk offsets, the changes are:

  • toNat_emod_lt removed in favour of Mathlib's Int.natMod_lt (earlier nit; addressed). resFin hp x := ⟨x.natMod p, Int.natMod_lt hp⟩ has the same value as before, because Int.natMod m n is by definition (m % n).toNat. resFin_modEq now unfolds it with change. The Hashing call site uses Int.natMod_lt (m := -wAB a b) hp. Residue.lean keeps only Int.natCast_toNat_emod, which is now documented. No public meaning changes.
  • Quotation notes (earlier nit; addressed). Splitting.lean and Witnesses.lean now say: "Quoted docstring fragments reproduce comments in the pinned formal source; other prose describes the local Lean API." I checked this mechanically. All 38 quoted fragments in the two files (with [...] elisions split) occur verbatim in pinned anthropics/formal-math@16a5ce41 (Sec3/Theorem17/{Instances,Witnesses}.lean and PaperStatements.lean). No docstring carries source-quoted paper text without quotation marks.
  • New docstring on falsePositiveCount_add_one_mul_pieceSize_le. It states the hypotheses 16 ≤ D ≤ n, 1 ≤ g ≤ √D, κ ≥ 1, |w| ≤ n^κ and the bound (2·falsePositiveConst + 2)·κ·n³·log n / g, which matches the statement. It also correctly says that this counts candidate vertices, not instructions.

The earlier mathematical summary and checked instance are unaffected, since Splitting/Witnesses statements and the tests did not change. The instance is n = D = 16, g = 2, so s = 4, pieceSize = 2 and queryCap = 64; pair (3,15) has index 63 and closes chunk 0.

Nits (non-blocking, carried over). sqrt_le_natCast (Splitting L135) is still a generically named public real-number fact. The private four_le_sqrt is still duplicated in Hashing and Splitting, and inlined again in Witnesses (hsqrt). A follow-up is fine.

Limits: I did not build locally. Quotation checks were against the pinned formal source, not the paper.

@SamuelSchlesinger SamuelSchlesinger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Coordinator coordinator-codex-queue-20261028-tests-b: approve this layer at dc4206a314c9623894f6db04178ea0ecbb019bdf, adopting the existing independent review after confirming its revision remains current. Hosted CI now passes at this exact head. Integration must follow the reviewed supplier layers. No selected-abstract impact; the full #1394 endpoint remains open. Agent review; no repeat full review or local build.

@SamuelSchlesinger
SamuelSchlesinger changed the base branch from work/three-sum-modular-hashing-20261028 to main October 29, 2026 01:02
@SamuelSchlesinger
SamuelSchlesinger added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 29, 2026
Preserve the reviewed child Hashing implementation, source credit and remaining native objective; regenerate actual imports. Lean source and test payloads are unchanged. AI-assisted integration by OpenAI Codex.

Copy link
Copy Markdown
Collaborator

coordinator-codex-queue-20261028: integration repair at ab3e96c7. Merged actual main after #1445 landed, preserving the reviewed child Hashing implementation. Resolved source credit and coordination text, retaining the open native/global objective. All reviewed Lean and test blobs are unchanged; the 2529 imports match the merged inventory. Full source hygiene and diff checks pass; fresh full CI is running and bounded independent integration review is requested. Existing mathematics/source review remains applicable; no abstract impact. AI-assisted integration by OpenAI Codex.

@chris-ai1

Copy link
Copy Markdown
Collaborator

reviewer-crei-opus (agent review, not human approval): FINAL at ab3e96c7c454cff50c9bb197f92e2b0b5f6c1a4f

This is a delta review against my earlier FINAL at 02f1b495322d8cfee81969186795670e3574defa. The author is not chris-ai1, so this verdict is not advisory.

What changed. One merge commit, ab3e96c7c. It merges main at a13acc014, which now contains #1445, squash-merged as 1a5656675 from its reviewed head c0a41fc9c. The PR's base is now plain main.

Own-layer check.

  • I compared this PR's layer before the merge (c0a41fc9c..02f1b4953) with its layer after (origin/main..ab3e96c7c). Apart from index lines and hunk offsets, the two diffs are identical with one exception, described below. That covers all library and test files, NOTICE, ROADMAP.md and Complexity.lean.
  • In particular, the files Splitting, Witnesses, Quotient, Residue, PairChunks, CeilDiv, SqrtRatio and ExactTriangleSplitting are byte-identical to 02f1b4953. So is the layer's own Hashing.lean refactor, which uses the shared Int.natCast_toNat_emod and Int.natMod_lt.
  • The exception is one UPSTREAM.md paragraph. The merge resolved a conflict there. The result keeps the layer's added text, about adapting Splitting/Witnesses for feat(exactTriangle): split modular queries and recover zero-triangle witnesses #1447 and reusing the existing APIs. It also keeps a single, combined list of what remains for feat(3sum): adapt Anthropic’s algorithm directly to WordRAM #1394, so no content is lost or duplicated. Since this is documentation only, I accept it.

Limits. I did not build locally. ci-checks is pending at this head, and this FINAL assumes it passes.

Copy link
Copy Markdown
Collaborator

coordinator-codex-queue-20261028-stack-integration — approve refreshed integration at ab3e96c7c454cff50c9bb197f92e2b0b5f6c1a4f, conditional on fresh hosted CI (independent agent delta review, not human approval).

Verified merge parents 02f1b495 and main a13acc01. All thirteen Lean payloads changed on the old branch since its common main ancestor are byte-identical, including the reviewed Hashing shared-residue proof reuse; the conflict resolution does not restore duplicate helpers or alter statements. Attribution and the splitting milestone are preserved, with main’s native-source credit and remaining global objective retained. All 2529 sorted, distinct imports exactly cover the final tree.

Existing independent mathematical/API reviews are reused. Diff checks against main pass; modules deleted on main remain absent. No selected-abstract impact from this integration. Reviewed in an independent repository; no local build or repeat full mathematical review.

@SamuelSchlesinger
SamuelSchlesinger added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 414bcb8 Oct 29, 2026
2 checks passed
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
…-community#1456)

* 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

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

---------

Co-authored-by: Codex coordinator <codex@users.noreply.github.com>
Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
…munity#1464)

* 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(matrix): prove the tensor recursion and pruned evaluation core

* doc(matrix): clarify the overlapping contributing leaf

* doc(matrix): make tensor and pruning explanations standalone

* doc(matrix): replace copied source prose with API descriptions

Resolve the documentation-only requested changes on cslib-community#1464:
cslib-community#1464 (comment)
Rewrite source-quotation fragments and related explanations in Alphabets,
Identity, Full and Pruned for the local Lean declarations. Preserve the
mathematical attribution, bibliography keys, source pin and copyright.

A comment-aware comparison with 4f3226c proves every noncomment byte is
identical in all four files. No declaration, proof, definition, program,
import or test changes. Existing checked source-statement quotations and
notation/quantifier/model/resource mapping in the PR remain unchanged.
The final source-comment screen compares against quoted fragments in the
actual pinned Sec2 and Statements/PaperStatements files, including the
known local renames; no substantial quoted fragment remains unmarked.

Validation is recorded for this exact tree in PR cslib-community#1464. Source checkpoint
tree 8c3b87b. No abstract/catalogue/model/scope
or rendering impact; no new headline. The full native 1.9992 endpoint remains
open under cslib-community#1394. Ancestor and descendant remotes are unchanged.

AI assistance: documentation repair and validation by Codex continuation worker
codex-three-sum-continuation-t3-3dda8289. Existing independent mathematical/API
and checked-source review coverage is retained; outside review of the bounded
documentation delta is requested, with no new review agent commissioned.

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(doc): restore unrelated upstream coordination records

Restore the exact 231-line tail common to both integration parents after review caught an overbroad conflict-marker match. The intended 3SUM integration prose is retained; no Lean change. AI-assisted correction by OpenAI Codex.

---------

Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
…mmunity#1469)

* 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): 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

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(imports): regenerate aggregate after Chan-He parameter integration

* perf(wordram): reduce native parameter proof heartbeat budget

* chore(wordram): scope measured parameter proof budget to reduction task

---------

Co-authored-by: Codex coordinator <codex@users.noreply.github.com>
Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
…cslib-community#1496)

* 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(matrix): prove the tensor recursion and pruned evaluation core

* doc(matrix): clarify the overlapping contributing leaf

* doc(matrix): make tensor and pruning explanations standalone

* feat(matrix): prove finite thin-product correctness and sparse bounds

Implement the complete finite mathematical milestone of cslib-community#1463 above cslib-community#1464:
valid layouts, batch-product correctness/error exclusion, arbitrary-N tiling,
exact requested signed products, order/cardinality estimates, geometric tails
and the derived sparse bounds. At D=4^m, L=19m, D^18<=N and |W|*2^m<=N^2,
encoding entries are bounded by4*N^2/D^(1/18), contributing leaves by33
and passed-set cardinalities by(19m+1)*33 times that scale. Add finite
magnitude and auxiliary object-count bounds. None are native instruction costs.

All six final local gates pass: strict build, aggregate check, strict tests,
environment lint, style lint and init-import check. Hygiene --check-simp,
changed-file lints (14 library modules,1 new test) and diff --check pass.
Tests kernel-check signed results3,20,0,-8, true padding, empty/sparse and
negative-order boundaries, and instantiate all aggregate bounds with jointly
satisfiable m=1 parameters and symbolic matrices without resource overrides.

Read-only math/API review by /root/thin_product_review is clear after fixed
doc references/magnitude wording/quotation hygiene. Focused final delta review
by /root/thin_product_final_delta_review is clear for tree
b021e2d, reusing the prior mathematics review.
These are internal agent reviews, not outside coordinator or human approval.

Source: anthropics/formal-math@16a5ce4,
selective Section2 finite mathematics; Anthropic credit/NOTICE retained.
Abstract assessment: no impact on selected headlines, catalogue or rendering.
Full native tensor/sparse-product/Exact Triangle code, native Chan-He cslib-community#1446,
whole input/time/width composition and improved1.9992 remain under cslib-community#1394.

AI assistance: implementation and reviews with OpenAI Codex, worker session
codex-thin-product-math-20261028.

* doc(matrix): explain finite thin-product guarantees in the Lean API

Restack cslib-community#1463 above repaired cslib-community#1464 without changing the reviewed mathematics.
Rewrite 149 documentation blocks in 14 modules as standalone descriptions;
replace operation-cost and word-size narratives with the exact entry, leaf,
passed-set and specified-value quantities proved. Preserve pinned Anthropic
credit, source locators, statements, definitions, proof bodies and imports.
An independent comparison with original ee288fb confirms that all code bytes
outside comments are identical, including code whitespace.

Validation of this final tree: all six gates pass together (strict build,
aggregate check, strict tests, environment lint, style lint, init imports).
Citation-aware full hygiene --check-simp, changed-file lints (14 library modules,
one test) and git diff --check pass. Lean MCP FiniteMagnitude diagnostics finish
without errors or warnings. Serial Smoke/Axioms warmups avoid the shared-host
memory failure previously seen when these import-heavy clients run together.

Tests and substantive math/API review evidence are retained from the original
reviewed tree b021e2d in ee288fb. This change
is documentation-only; /root/draft_thin_docs authored the scratch map and the
continuation worker inspected/applied it. That drafting is not independent review.
Earlier math reviews are inside-fleet agent reviews, not outside or human approval.
Outside coordinator review will be requested on the final PR. No selected abstract,
catalogue or rendering is affected.

PR publication remains held while native dependent restacks are repaired, per
root sequencing. cslib-community#1394 remains open: native shared encodings/pruning/Exact Triangle,
Chan-He cslib-community#1446, complete Convolution/ordinary input/time/width composition and the
improved Section4 route to exponent1.9992 are not supplied by these finite counts.
AI assistance: OpenAI Codex workers codex-thin-product-math-20261028,
codex-three-sum-continuation-t3-3dda8289 and /root/draft_thin_docs.

* refactor(schonhage): reuse binomial bounds and sharpen signed tests

Address the bounded nonblocking review findings on cslib-community#1496. Keep Nat.choose_le_exp_mul_div_pow unchanged while deriving it from Cslib.sum_choose_le_exp_one_mul_div_pow in the existing real binomial module; remove the redundant module and migrate its import. Preserve Anthropic, Samuel Schlesinger, OpenAI and Erik Demaine credit. Kernel-check an actual mixed inner/outer L2,m1 signed pruned result of -8, remove two signature-only tests and retain positive admitted-parameter checks. Paraphrase the identified source-derived sentence, shorten generic source boilerplate and record the generic naming follow-up. No public mathematical statement or definition changes meaning; no selected abstract or endpoint promotion. Final validation/source/review evidence is in PR cslib-community#1496. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* doc(matrix): replace copied source prose with API descriptions

Resolve the documentation-only requested changes on cslib-community#1464:
cslib-community#1464 (comment)
Rewrite source-quotation fragments and related explanations in Alphabets,
Identity, Full and Pruned for the local Lean declarations. Preserve the
mathematical attribution, bibliography keys, source pin and copyright.

A comment-aware comparison with 4f3226c proves every noncomment byte is
identical in all four files. No declaration, proof, definition, program,
import or test changes. Existing checked source-statement quotations and
notation/quantifier/model/resource mapping in the PR remain unchanged.
The final source-comment screen compares against quoted fragments in the
actual pinned Sec2 and Statements/PaperStatements files, including the
known local renames; no substantial quoted fragment remains unmarked.

Validation is recorded for this exact tree in PR cslib-community#1464. Source checkpoint
tree 8c3b87b. No abstract/catalogue/model/scope
or rendering impact; no new headline. The full native 1.9992 endpoint remains
open under cslib-community#1394. Ancestor and descendant remotes are unchanged.

AI assistance: documentation repair and validation by Codex continuation worker
codex-three-sum-continuation-t3-3dda8289. Existing independent mathematical/API
and checked-source review coverage is retained; outside review of the bounded
documentation delta is requested, with no new review agent commissioned.

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(doc): restore unrelated upstream coordination records

Restore the exact 231-line tail common to both integration parents after review caught an overbroad conflict-marker match. The intended 3SUM integration prose is retained; no Lean change. AI-assisted correction by OpenAI Codex.

* doc(order-glue): restore paper citation and finite scope

* fix(imports): regenerate thin-product aggregate after main integration

---------

Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
cslib-community#1556)

* 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(matrix): prove the tensor recursion and pruned evaluation core

* doc(matrix): clarify the overlapping contributing leaf

* doc(matrix): make tensor and pruning explanations standalone

* feat(matrix): prove finite thin-product correctness and sparse bounds

Implement the complete finite mathematical milestone of cslib-community#1463 above cslib-community#1464:
valid layouts, batch-product correctness/error exclusion, arbitrary-N tiling,
exact requested signed products, order/cardinality estimates, geometric tails
and the derived sparse bounds. At D=4^m, L=19m, D^18<=N and |W|*2^m<=N^2,
encoding entries are bounded by4*N^2/D^(1/18), contributing leaves by33
and passed-set cardinalities by(19m+1)*33 times that scale. Add finite
magnitude and auxiliary object-count bounds. None are native instruction costs.

All six final local gates pass: strict build, aggregate check, strict tests,
environment lint, style lint and init-import check. Hygiene --check-simp,
changed-file lints (14 library modules,1 new test) and diff --check pass.
Tests kernel-check signed results3,20,0,-8, true padding, empty/sparse and
negative-order boundaries, and instantiate all aggregate bounds with jointly
satisfiable m=1 parameters and symbolic matrices without resource overrides.

Read-only math/API review by /root/thin_product_review is clear after fixed
doc references/magnitude wording/quotation hygiene. Focused final delta review
by /root/thin_product_final_delta_review is clear for tree
b021e2d, reusing the prior mathematics review.
These are internal agent reviews, not outside coordinator or human approval.

Source: anthropics/formal-math@16a5ce4,
selective Section2 finite mathematics; Anthropic credit/NOTICE retained.
Abstract assessment: no impact on selected headlines, catalogue or rendering.
Full native tensor/sparse-product/Exact Triangle code, native Chan-He cslib-community#1446,
whole input/time/width composition and improved1.9992 remain under cslib-community#1394.

AI assistance: implementation and reviews with OpenAI Codex, worker session
codex-thin-product-math-20261028.

* doc(matrix): explain finite thin-product guarantees in the Lean API

Restack cslib-community#1463 above repaired cslib-community#1464 without changing the reviewed mathematics.
Rewrite 149 documentation blocks in 14 modules as standalone descriptions;
replace operation-cost and word-size narratives with the exact entry, leaf,
passed-set and specified-value quantities proved. Preserve pinned Anthropic
credit, source locators, statements, definitions, proof bodies and imports.
An independent comparison with original ee288fb confirms that all code bytes
outside comments are identical, including code whitespace.

Validation of this final tree: all six gates pass together (strict build,
aggregate check, strict tests, environment lint, style lint, init imports).
Citation-aware full hygiene --check-simp, changed-file lints (14 library modules,
one test) and git diff --check pass. Lean MCP FiniteMagnitude diagnostics finish
without errors or warnings. Serial Smoke/Axioms warmups avoid the shared-host
memory failure previously seen when these import-heavy clients run together.

Tests and substantive math/API review evidence are retained from the original
reviewed tree b021e2d in ee288fb. This change
is documentation-only; /root/draft_thin_docs authored the scratch map and the
continuation worker inspected/applied it. That drafting is not independent review.
Earlier math reviews are inside-fleet agent reviews, not outside or human approval.
Outside coordinator review will be requested on the final PR. No selected abstract,
catalogue or rendering is affected.

PR publication remains held while native dependent restacks are repaired, per
root sequencing. cslib-community#1394 remains open: native shared encodings/pruning/Exact Triangle,
Chan-He cslib-community#1446, complete Convolution/ordinary input/time/width composition and the
improved Section4 route to exponent1.9992 are not supplied by these finite counts.
AI assistance: OpenAI Codex workers codex-thin-product-math-20261028,
codex-three-sum-continuation-t3-3dda8289 and /root/draft_thin_docs.

* refactor(schonhage): reuse binomial bounds and sharpen signed tests

Address the bounded nonblocking review findings on cslib-community#1496. Keep Nat.choose_le_exp_mul_div_pow unchanged while deriving it from Cslib.sum_choose_le_exp_one_mul_div_pow in the existing real binomial module; remove the redundant module and migrate its import. Preserve Anthropic, Samuel Schlesinger, OpenAI and Erik Demaine credit. Kernel-check an actual mixed inner/outer L2,m1 signed pruned result of -8, remove two signature-only tests and retain positive admitted-parameter checks. Paraphrase the identified source-derived sentence, shorten generic source boilerplate and record the generic naming follow-up. No public mathematical statement or definition changes meaning; no selected abstract or endpoint promotion. Final validation/source/review evidence is in PR cslib-community#1496. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* doc(matrix): replace copied source prose with API descriptions

Resolve the documentation-only requested changes on cslib-community#1464:
cslib-community#1464 (comment)
Rewrite source-quotation fragments and related explanations in Alphabets,
Identity, Full and Pruned for the local Lean declarations. Preserve the
mathematical attribution, bibliography keys, source pin and copyright.

A comment-aware comparison with 4f3226c proves every noncomment byte is
identical in all four files. No declaration, proof, definition, program,
import or test changes. Existing checked source-statement quotations and
notation/quantifier/model/resource mapping in the PR remain unchanged.
The final source-comment screen compares against quoted fragments in the
actual pinned Sec2 and Statements/PaperStatements files, including the
known local renames; no substantial quoted fragment remains unmarked.

Validation is recorded for this exact tree in PR cslib-community#1464. Source checkpoint
tree 8c3b87b. No abstract/catalogue/model/scope
or rendering impact; no new headline. The full native 1.9992 endpoint remains
open under cslib-community#1394. Ancestor and descendant remotes are unchanged.

AI assistance: documentation repair and validation by Codex continuation worker
codex-three-sum-continuation-t3-3dda8289. Existing independent mathematical/API
and checked-source review coverage is retained; outside review of the bounded
documentation delta is requested, with no new review agent commissioned.

* refactor(exact-triangle): move reusable bounds and clarify finite APIs

Address cslib-community#1546 and the placement/naming findings from cslib-community#1441, cslib-community#1445 and
cslib-community#1455. Move scalar logarithmic and prime-window bounds to focused generic
modules; use descriptive matrix and count-reconstruction APIs; migrate
every client. Queried detection uses iff directly instead of equality of
propositions. Remove local scalar wrappers in favor of Mathlib facts.

Surviving statement and definition meanings are unchanged. Existing source
credit/mappings remain applicable, with NOTICE updated for the moved prime
window. No native program, quantitative bound or 3SUM endpoint changes.

Validation: all six strict gates together, including global Axioms;
actual-base changed-file lints, full citation/simp hygiene, strict PR-name
and diff checks. Checked clients include signed -8 reconstruction, zero,
empty dimensions, prime-window endpoints and finite recovery.

Nonauthoring coordinator review /root/finite_api_review approves exact tree
4c4ee7c against base
68bbe40 under the delegated-review
exception for mechanical API/proof refactors. The review was read-only and
reused unchanged parent mathematical/source coverage. This is within-fleet
agent review, not human or outside-coordinator approval.

Curated abstracts: no impact on statements, scope, models or rendering.
AI assistance: OpenAI Codex implementation, self-review and validation.

* refactor(exact-triangle): share square-root bounds and refine names

Address all three optional findings from the outside FINAL review of
PR cslib-community#1556 at fc7b892. A shared
Real.four_le_sqrt_natCast replaces nine cast-proof copies in hashing,
splitting and recovery. Rename the false-positive bound to match its
lower-cardinality hypothesis, and use weightSum in Hashing prose.

All surviving endpoint statements and constants are unchanged modulo the
rename. The new public scalar helper states 4 <= sqrt(D) for natural
D >= 16; it reuses Real.le_sqrt_of_sq_le and cast normalization.

Validation: all six strict gates together, including global Axioms;
actual-base seven-library changed-file lints, full citation/simp hygiene,
strict PR-name and diff checks. All four edited modules have clean
Lean MCP diagnostics. Exact validated tree:
4028ff3.

The original outside coverage remains
cslib-community#1556 (comment)
Focused outside review is requested for this delta and the shared public
helper; prior approval is not claimed to cover the new API addition.

No native program or quantitative endpoint changes. Curated abstracts:
no impact on statements, scope or rendering. AI assistance: OpenAI Codex.

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(doc): restore unrelated upstream coordination records

Restore the exact 231-line tail common to both integration parents after review caught an overbroad conflict-marker match. The intended 3SUM integration prose is retained; no Lean change. AI-assisted correction by OpenAI Codex.

* doc(exact-triangle): retain reviewed Lopsided source citation

* doc(order-glue): restore paper citation and finite scope

* fix(imports): regenerate thin-product aggregate after main integration

---------

Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
…community#1531)

* 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): 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 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.

* 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.

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(imports): regenerate aggregate after Chan-He parameter integration

* perf(wordram): reduce native parameter proof heartbeat budget

* chore(wordram): scope measured parameter proof budget to reduction task

* doc(roadmap): separate conditional convolution host progress

Restore the shared Word RAM/tensor paragraph from actual main c5cb0fd and record the unchanged conditional host milestone separately, preserving the broader solver and full reduction objective. This avoids overlapping queued thin-product progress. Documentation only; all source, tests, abstracts, UPSTREAM records, allowances and imports unchanged. Queue group commits are read-only projection inputs, never author parents.

---------

Co-authored-by: Codex coordinator <codex@users.noreply.github.com>
Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
…ib-community#1497)

* 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): 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.

* 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.

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(imports): regenerate aggregate after Chan-He parameter integration

* perf(three-sum): check native query tests within default heartbeats

* perf(wordram): reduce native parameter proof heartbeat budget

* chore(wordram): scope measured parameter proof budget to reduction task

* doc(roadmap): restore tensor milestone reference

* doc(roadmap): separate native Chan-He progress from tensor work

---------

Co-authored-by: Codex coordinator <codex@users.noreply.github.com>
Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
* 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(matrix): prove the tensor recursion and pruned evaluation core

* doc(matrix): clarify the overlapping contributing leaf

* doc(matrix): make tensor and pruning explanations standalone

* 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(matrix): prove finite thin-product correctness and sparse bounds

Implement the complete finite mathematical milestone of cslib-community#1463 above cslib-community#1464:
valid layouts, batch-product correctness/error exclusion, arbitrary-N tiling,
exact requested signed products, order/cardinality estimates, geometric tails
and the derived sparse bounds. At D=4^m, L=19m, D^18<=N and |W|*2^m<=N^2,
encoding entries are bounded by4*N^2/D^(1/18), contributing leaves by33
and passed-set cardinalities by(19m+1)*33 times that scale. Add finite
magnitude and auxiliary object-count bounds. None are native instruction costs.

All six final local gates pass: strict build, aggregate check, strict tests,
environment lint, style lint and init-import check. Hygiene --check-simp,
changed-file lints (14 library modules,1 new test) and diff --check pass.
Tests kernel-check signed results3,20,0,-8, true padding, empty/sparse and
negative-order boundaries, and instantiate all aggregate bounds with jointly
satisfiable m=1 parameters and symbolic matrices without resource overrides.

Read-only math/API review by /root/thin_product_review is clear after fixed
doc references/magnitude wording/quotation hygiene. Focused final delta review
by /root/thin_product_final_delta_review is clear for tree
b021e2d, reusing the prior mathematics review.
These are internal agent reviews, not outside coordinator or human approval.

Source: anthropics/formal-math@16a5ce4,
selective Section2 finite mathematics; Anthropic credit/NOTICE retained.
Abstract assessment: no impact on selected headlines, catalogue or rendering.
Full native tensor/sparse-product/Exact Triangle code, native Chan-He cslib-community#1446,
whole input/time/width composition and improved1.9992 remain under cslib-community#1394.

AI assistance: implementation and reviews with OpenAI Codex, worker session
codex-thin-product-math-20261028.

* 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.

* doc(matrix): explain finite thin-product guarantees in the Lean API

Restack cslib-community#1463 above repaired cslib-community#1464 without changing the reviewed mathematics.
Rewrite 149 documentation blocks in 14 modules as standalone descriptions;
replace operation-cost and word-size narratives with the exact entry, leaf,
passed-set and specified-value quantities proved. Preserve pinned Anthropic
credit, source locators, statements, definitions, proof bodies and imports.
An independent comparison with original ee288fb confirms that all code bytes
outside comments are identical, including code whitespace.

Validation of this final tree: all six gates pass together (strict build,
aggregate check, strict tests, environment lint, style lint, init imports).
Citation-aware full hygiene --check-simp, changed-file lints (14 library modules,
one test) and git diff --check pass. Lean MCP FiniteMagnitude diagnostics finish
without errors or warnings. Serial Smoke/Axioms warmups avoid the shared-host
memory failure previously seen when these import-heavy clients run together.

Tests and substantive math/API review evidence are retained from the original
reviewed tree b021e2d in ee288fb. This change
is documentation-only; /root/draft_thin_docs authored the scratch map and the
continuation worker inspected/applied it. That drafting is not independent review.
Earlier math reviews are inside-fleet agent reviews, not outside or human approval.
Outside coordinator review will be requested on the final PR. No selected abstract,
catalogue or rendering is affected.

PR publication remains held while native dependent restacks are repaired, per
root sequencing. cslib-community#1394 remains open: native shared encodings/pruning/Exact Triangle,
Chan-He cslib-community#1446, complete Convolution/ordinary input/time/width composition and the
improved Section4 route to exponent1.9992 are not supplied by these finite counts.
AI assistance: OpenAI Codex workers codex-thin-product-math-20261028,
codex-three-sum-continuation-t3-3dda8289 and /root/draft_thin_docs.

* fix(wordram): repair parameter proof hygiene and ceiling-log docs

* feat(wordram): implement shared tensor encodings

Complete the shared left/right encoder milestone cslib-community#1493 above parent b4936ce
(cslib-community#1496). Fixed standard-WordRAM code with 32 registers computes every public
encodingL/encodingR leaf from actual initialized flat signed inputs. The native
bound is 240*(L+1)*10^L instructions plus halt, with explicit magnitude/address
inequalities, two alternating buffers, charged initialization/copying and the
complete outside frame. The full ordinary native 3SUM objective cslib-community#1394 remains
open; this component supplies no sparse-query or Exact Triangle solver.

Validation of tree b598513 against
b4936ce: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
changed-file lints (13 library modules, one new test) and diff checks pass.
Tests execute both encoders at depths zero, one and two, compare all 100
depth-two leaves with the unchanged public encodings, preserve input/frame
sentinels, and cover adjacent word widths and all three copy block orders.
Kernel-checked concrete flat executions discharge every width/magnitude
premise. Selected abstracts, catalogue and rendering are unaffected.

AI assistance: OpenAI Codex implementation and self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Independent correctness/API review is pending;
this is not an approval or a claim that the complete 3SUM objective is done.

* test(wordram): connect encoder witnesses to charged runs

Connect the zero-depth and two-stage regression memory witnesses to the
actual prefix Runs already proved by runs_left, rather than discarding that
conjunct. Bound the prefixes by 240 and 72000 instructions and expose the
same executions' charged halt at n+1. All library code is unchanged from
ad3e097 (tree b598513).

Validation of tree 8277017 against actual
parent b4936ce: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
fresh changed-file lints (13 library modules, one test), strict PR-draft
declaration-name check and staged/unstaged diff checks pass.

Independent nonauthor agent review 8034f3da approved exact ad3e097/tree
b598513, covering full code/model/cost/width/source and ArrayCopy with no
blockers. It is inside-fleet review, not outside approval. This test-only
delta addresses its optional witness-connection finding; focused final
test/source-mapping review remains pending through the parent coordinator.
No selected abstract, catalogue or rendering impact. The full ordinary
native 3SUM objective cslib-community#1394 remains open; this implements encoder issue cslib-community#1493.

AI assistance: OpenAI Codex implementation/self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Publication remains on hold for focused
review; this commit is not approval or a whole-3SUM completion claim.

* refactor(schonhage): reuse binomial bounds and sharpen signed tests

Address the bounded nonblocking review findings on cslib-community#1496. Keep Nat.choose_le_exp_mul_div_pow unchanged while deriving it from Cslib.sum_choose_le_exp_one_mul_div_pow in the existing real binomial module; remove the redundant module and migrate its import. Preserve Anthropic, Samuel Schlesinger, OpenAI and Erik Demaine credit. Kernel-check an actual mixed inner/outer L2,m1 signed pruned result of -8, remove two signature-only tests and retain positive admitted-parameter checks. Paraphrase the identified source-derived sentence, shorten generic source boilerplate and record the generic naming follow-up. No public mathematical statement or definition changes meaning; no selected abstract or endpoint promotion. Final validation/source/review evidence is in PR cslib-community#1496. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* doc(matrix): replace copied source prose with API descriptions

Resolve the documentation-only requested changes on cslib-community#1464:
cslib-community#1464 (comment)
Rewrite source-quotation fragments and related explanations in Alphabets,
Identity, Full and Pruned for the local Lean declarations. Preserve the
mathematical attribution, bibliography keys, source pin and copyright.

A comment-aware comparison with 4f3226c proves every noncomment byte is
identical in all four files. No declaration, proof, definition, program,
import or test changes. Existing checked source-statement quotations and
notation/quantifier/model/resource mapping in the PR remain unchanged.
The final source-comment screen compares against quoted fragments in the
actual pinned Sec2 and Statements/PaperStatements files, including the
known local renames; no substantial quoted fragment remains unmarked.

Validation is recorded for this exact tree in PR cslib-community#1464. Source checkpoint
tree 8c3b87b. No abstract/catalogue/model/scope
or rendering impact; no new headline. The full native 1.9992 endpoint remains
open under cslib-community#1394. Ancestor and descendant remotes are unchanged.

AI assistance: documentation repair and validation by Codex continuation worker
codex-three-sum-continuation-t3-3dda8289. Existing independent mathematical/API
and checked-source review coverage is retained; outside review of the bounded
documentation delta is requested, with no new review agent commissioned.

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(imports): regenerate aggregate after Chan-He parameter integration

* fix(imports): regenerate aggregate after shared-encoder integration

* perf(wordram): reduce native parameter proof heartbeat budget

* chore(wordram): scope measured parameter proof budget to reduction task

* perf(schonhage): focus cell arithmetic and use the default heartbeat budget

* fix(doc): restore unrelated upstream coordination records

Restore the exact 231-line tail common to both integration parents after review caught an overbroad conflict-marker match. The intended 3SUM integration prose is retained; no Lean change. AI-assisted correction by OpenAI Codex.

* doc(order-glue): restore paper citation and finite scope

* fix(imports): regenerate thin-product aggregate after main integration

* doc(wordram): separate shared-encoder integration records

Keep the reviewed finite-matrix supplier records intact and record native-encoder scope and source credit separately, so squash-queue integration does not overlap the ancestor documentation hunks. Preserve code, tests, concrete bounds and the complete unrelated upstream-record suffix. Queue revisions are used only for read-only projection, never as parents.

---------

Co-authored-by: Codex coordinator <codex@users.noreply.github.com>
Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
…cslib-community#1611)

* 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(matrix): prove the tensor recursion and pruned evaluation core

* doc(matrix): clarify the overlapping contributing leaf

* doc(matrix): make tensor and pruning explanations standalone

* 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(matrix): prove finite thin-product correctness and sparse bounds

Implement the complete finite mathematical milestone of cslib-community#1463 above cslib-community#1464:
valid layouts, batch-product correctness/error exclusion, arbitrary-N tiling,
exact requested signed products, order/cardinality estimates, geometric tails
and the derived sparse bounds. At D=4^m, L=19m, D^18<=N and |W|*2^m<=N^2,
encoding entries are bounded by4*N^2/D^(1/18), contributing leaves by33
and passed-set cardinalities by(19m+1)*33 times that scale. Add finite
magnitude and auxiliary object-count bounds. None are native instruction costs.

All six final local gates pass: strict build, aggregate check, strict tests,
environment lint, style lint and init-import check. Hygiene --check-simp,
changed-file lints (14 library modules,1 new test) and diff --check pass.
Tests kernel-check signed results3,20,0,-8, true padding, empty/sparse and
negative-order boundaries, and instantiate all aggregate bounds with jointly
satisfiable m=1 parameters and symbolic matrices without resource overrides.

Read-only math/API review by /root/thin_product_review is clear after fixed
doc references/magnitude wording/quotation hygiene. Focused final delta review
by /root/thin_product_final_delta_review is clear for tree
b021e2d, reusing the prior mathematics review.
These are internal agent reviews, not outside coordinator or human approval.

Source: anthropics/formal-math@16a5ce4,
selective Section2 finite mathematics; Anthropic credit/NOTICE retained.
Abstract assessment: no impact on selected headlines, catalogue or rendering.
Full native tensor/sparse-product/Exact Triangle code, native Chan-He cslib-community#1446,
whole input/time/width composition and improved1.9992 remain under cslib-community#1394.

AI assistance: implementation and reviews with OpenAI Codex, worker session
codex-thin-product-math-20261028.

* 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.

* doc(matrix): explain finite thin-product guarantees in the Lean API

Restack cslib-community#1463 above repaired cslib-community#1464 without changing the reviewed mathematics.
Rewrite 149 documentation blocks in 14 modules as standalone descriptions;
replace operation-cost and word-size narratives with the exact entry, leaf,
passed-set and specified-value quantities proved. Preserve pinned Anthropic
credit, source locators, statements, definitions, proof bodies and imports.
An independent comparison with original ee288fb confirms that all code bytes
outside comments are identical, including code whitespace.

Validation of this final tree: all six gates pass together (strict build,
aggregate check, strict tests, environment lint, style lint, init imports).
Citation-aware full hygiene --check-simp, changed-file lints (14 library modules,
one test) and git diff --check pass. Lean MCP FiniteMagnitude diagnostics finish
without errors or warnings. Serial Smoke/Axioms warmups avoid the shared-host
memory failure previously seen when these import-heavy clients run together.

Tests and substantive math/API review evidence are retained from the original
reviewed tree b021e2d in ee288fb. This change
is documentation-only; /root/draft_thin_docs authored the scratch map and the
continuation worker inspected/applied it. That drafting is not independent review.
Earlier math reviews are inside-fleet agent reviews, not outside or human approval.
Outside coordinator review will be requested on the final PR. No selected abstract,
catalogue or rendering is affected.

PR publication remains held while native dependent restacks are repaired, per
root sequencing. cslib-community#1394 remains open: native shared encodings/pruning/Exact Triangle,
Chan-He cslib-community#1446, complete Convolution/ordinary input/time/width composition and the
improved Section4 route to exponent1.9992 are not supplied by these finite counts.
AI assistance: OpenAI Codex workers codex-thin-product-math-20261028,
codex-three-sum-continuation-t3-3dda8289 and /root/draft_thin_docs.

* fix(wordram): repair parameter proof hygiene and ceiling-log docs

* feat(wordram): implement shared tensor encodings

Complete the shared left/right encoder milestone cslib-community#1493 above parent b4936ce
(cslib-community#1496). Fixed standard-WordRAM code with 32 registers computes every public
encodingL/encodingR leaf from actual initialized flat signed inputs. The native
bound is 240*(L+1)*10^L instructions plus halt, with explicit magnitude/address
inequalities, two alternating buffers, charged initialization/copying and the
complete outside frame. The full ordinary native 3SUM objective cslib-community#1394 remains
open; this component supplies no sparse-query or Exact Triangle solver.

Validation of tree b598513 against
b4936ce: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
changed-file lints (13 library modules, one new test) and diff checks pass.
Tests execute both encoders at depths zero, one and two, compare all 100
depth-two leaves with the unchanged public encodings, preserve input/frame
sentinels, and cover adjacent word widths and all three copy block orders.
Kernel-checked concrete flat executions discharge every width/magnitude
premise. Selected abstracts, catalogue and rendering are unaffected.

AI assistance: OpenAI Codex implementation and self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Independent correctness/API review is pending;
this is not an approval or a claim that the complete 3SUM objective is done.

* test(wordram): connect encoder witnesses to charged runs

Connect the zero-depth and two-stage regression memory witnesses to the
actual prefix Runs already proved by runs_left, rather than discarding that
conjunct. Bound the prefixes by 240 and 72000 instructions and expose the
same executions' charged halt at n+1. All library code is unchanged from
ad3e097 (tree b598513).

Validation of tree 8277017 against actual
parent b4936ce: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
fresh changed-file lints (13 library modules, one test), strict PR-draft
declaration-name check and staged/unstaged diff checks pass.

Independent nonauthor agent review 8034f3da approved exact ad3e097/tree
b598513, covering full code/model/cost/width/source and ArrayCopy with no
blockers. It is inside-fleet review, not outside approval. This test-only
delta addresses its optional witness-connection finding; focused final
test/source-mapping review remains pending through the parent coordinator.
No selected abstract, catalogue or rendering impact. The full ordinary
native 3SUM objective cslib-community#1394 remains open; this implements encoder issue cslib-community#1493.

AI assistance: OpenAI Codex implementation/self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Publication remains on hold for focused
review; this commit is not approval or a whole-3SUM completion claim.

* refactor(schonhage): reuse binomial bounds and sharpen signed tests

Address the bounded nonblocking review findings on cslib-community#1496. Keep Nat.choose_le_exp_mul_div_pow unchanged while deriving it from Cslib.sum_choose_le_exp_one_mul_div_pow in the existing real binomial module; remove the redundant module and migrate its import. Preserve Anthropic, Samuel Schlesinger, OpenAI and Erik Demaine credit. Kernel-check an actual mixed inner/outer L2,m1 signed pruned result of -8, remove two signature-only tests and retain positive admitted-parameter checks. Paraphrase the identified source-derived sentence, shorten generic source boilerplate and record the generic naming follow-up. No public mathematical statement or definition changes meaning; no selected abstract or endpoint promotion. Final validation/source/review evidence is in PR cslib-community#1496. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* feat(wordram): checkpoint native ET preparation kernels

Partial work for cslib-community#1532 under the still-open cslib-community#1394 endpoint. Implement fixed
native parameter, class/query, chunk-descriptor and raw zero/one matrix
programs. Reuse the existing signed residue kernel to execute actual flat
signed-weight input through all three residue arrays and A-B query classes.
Bridge counts/ranks/chunks to the existing finite splitting API and matrix
entries to its modular adjacency relations. Initialized compiler clients
connect readback witnesses to actual charged Runs and halt executions.

This checkpoint does not complete cslib-community#1532: whole catalogue/instance composition,
derived logarithmic-width bounds and the aggregate preparation estimate remain
open. No solver, prime selection or final subquadratic 3SUM claim is supplied.
X/Y entries are raw unsigned 0/1; the consuming thin-product input copy will
double them into canonical Signed.encode words with charged instructions.

Validation payload tree 4d9fb80:
all six strict gates passed together, one Lean thread and downloads disabled,
including global Axioms; full citation/simp hygiene, current-base changed-file
lints (8 library modules, 4 new tests) and diff checks pass. An earlier audit
was deliberately interrupted for slot coordination; only the completed final
sequence is claimed. Curated abstracts: no impact, no new headline selected.
Independent technical and outside coordinator review have not been requested
for this unfinished checkpoint. No PR is opened by this commit.

AI assistance: OpenAI Codex implemented and checked this checkpoint. Native
programs/proofs are original adaptations of the pinned Anthropic source;
source credit and exact source links are retained in the adapted modules.

* doc(wordram): record native ET source attribution

Add the new native ExactTriangle topic to the pinned-source attribution list. Documentation only; the Lean payload and its all-six/static checkpoint evidence remain unchanged from e3f5919. No curated abstract impact. AI assistance: OpenAI Codex.

* doc(matrix): replace copied source prose with API descriptions

Resolve the documentation-only requested changes on cslib-community#1464:
cslib-community#1464 (comment)
Rewrite source-quotation fragments and related explanations in Alphabets,
Identity, Full and Pruned for the local Lean declarations. Preserve the
mathematical attribution, bibliography keys, source pin and copyright.

A comment-aware comparison with 4f3226c proves every noncomment byte is
identical in all four files. No declaration, proof, definition, program,
import or test changes. Existing checked source-statement quotations and
notation/quantifier/model/resource mapping in the PR remain unchanged.
The final source-comment screen compares against quoted fragments in the
actual pinned Sec2 and Statements/PaperStatements files, including the
known local renames; no substantial quoted fragment remains unmarked.

Validation is recorded for this exact tree in PR cslib-community#1464. Source checkpoint
tree 8c3b87b. No abstract/catalogue/model/scope
or rendering impact; no new headline. The full native 1.9992 endpoint remains
open under cslib-community#1394. Ancestor and descendant remotes are unchanged.

AI assistance: documentation repair and validation by Codex continuation worker
codex-three-sum-continuation-t3-3dda8289. Existing independent mathematical/API
and checked-source review coverage is retained; outside review of the bounded
documentation delta is requested, with no new review agent commissioned.

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(imports): regenerate aggregate after Chan-He parameter integration

* fix(imports): regenerate aggregate after shared-encoder integration

* perf(wordram): reduce native parameter proof heartbeat budget

* chore(wordram): scope measured parameter proof budget to reduction task

* perf(schonhage): focus cell arithmetic and use the default heartbeat budget

* fix(doc): restore unrelated upstream coordination records

Restore the exact 231-line tail common to both integration parents after review caught an overbroad conflict-marker match. The intended 3SUM integration prose is retained; no Lean change. AI-assisted correction by OpenAI Codex.

* doc(order-glue): restore paper citation and finite scope

* fix(imports): regenerate thin-product aggregate after main integration

* doc(wordram): separate shared-encoder integration records

Keep the reviewed finite-matrix supplier records intact and record native-encoder scope and source credit separately, so squash-queue integration does not overlap the ancestor documentation hunks. Preserve code, tests, concrete bounds and the complete unrelated upstream-record suffix. Queue revisions are used only for read-only projection, never as parents.

* feat(wordram): prepare ExactTriangle instances from initialized input

Complete the native preparation milestone cslib-community#1532 above the original kernel
checkpoint. Fixed64 native code computes parameters, signed residues, actual
classes/query arrays/chunks and every record with raw n-by-D/D-by-n adjacency
matrices from the original input. Same-y State.init Runs plus charged halt,
exact finite readback/unique indices, full frames and derived fits are proved.
Source-regime cost is690n^2 Dg including halt. With size-bounded scalar headers
and A<=(n+2)^kappa, physical width is at most(kappa+18)clog2(n+2); every prefix's
words and address support lie below(n+2)^(kappa+19). No run/layout/time/solver
oracle. Prime selection, product/backend1581 and the full1394/1.9992 remain open.

Validation tree5a46782a1f51dee866e5c08f0c884f2bdf14a240 on reviewed encoder
parent6dbd0cc45f8cfba188c1a8211b8b8f15d78c59f6: all SIX strict gates passed
together, LEAN_NUM_THREADS=1 and cache downloads disabled during the sequence,
including Smoke/global Axioms; full citation/simp/heartbeat hygiene, actual-base
22-library/6-new-test lints,18 strict PR-body names and diff checks passed.
Source cases include signed tiny input, nonzero scratch/sentinels, shortchunks,
padding, insufficient-width faults, and a fully admitted n=D16,g1,p3 client.
The earlier interrupted cold-build checkpoint is not claimed as validation.

Nonauthoring native reviewer /root/et_preparation_review read the full own
layer at treea72db19345fa47bec57a62cea61d9c1b22b8a2c4, then approved the focused
final delta at5a46782a with no blockers/P2 findings. The ten executable-mode
nits were fixed; other final deltas are comments and exact already-reviewed
supplier parameter-budget metadata from1469@4b2d75ce, reduction tracked1583.
All program/public-statement/proof meanings unchanged by those deltas. This is
author-fleet agent review, not outside coordinator or human approval.

Quote and source mapping checked directly at Anthropic formal-math pin
16a5ce41304fcdaea4e0be7c132e1c361dc26da5, Sec3/Theorem17/Instances/
WriteMatrices.lean:15. Finite classes/chunks/lopInstance are reused. New native
instruction coefficients are original; source Light costs/full host not claimed.
Generic Width/Fits files are exact reviewed1537/1552 copies; other reviewed
native prerequisites retain their source credit. Selected abstracts/rendering
are unchanged; no new headline is promoted.

AI assistance: OpenAI Codex implemented, checked and documented this native
composition; separate nonauthoring agent reviewed correctness/API/source scope.

* doc(wordram): address native ET preparation review nits

Sort the1532 ROADMAP reference, add checked pinned-source links to Catalogue and Instances, and drop the unrelated Witnesses prose edit. No declaration, proof/program token, attribute or import changes. Focused documentation checks verify both pinned Git targets, reference order and unchanged Lean code/proof tokens; diff check passes. Reuse full implementation validation and outside FINAL at af9a2ec; refreshed hosted CI remains required for this documentation head. No curated abstract impact. The combined instance/adjacency/admissibility API remains an explicit ET-consumer follow-up under1394. AI assistance: OpenAI Codex.

---------

Co-authored-by: Codex coordinator <codex@users.noreply.github.com>
Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
…ommunity#1615)

* feat(exactTriangle): relate lopsided queries and matrix products

Adapt the finite counting interface and signed digit expansion from anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5 for milestone #1438. This is a mathematical interface; native preprocessing, fast solvers and full composition remain under #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 #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 #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 e41e1dda62a10c8f89917e2ccab54fbbedad1ad4, 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(matrix): prove the tensor recursion and pruned evaluation core

* doc(matrix): clarify the overlapping contributing leaf

* doc(matrix): make tensor and pruning explanations standalone

* 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 #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 8e182b091199b323c7e6271acebbfcee2e4cdd18 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(matrix): prove finite thin-product correctness and sparse bounds

Implement the complete finite mathematical milestone of #1463 above #1464:
valid layouts, batch-product correctness/error exclusion, arbitrary-N tiling,
exact requested signed products, order/cardinality estimates, geometric tails
and the derived sparse bounds. At D=4^m, L=19m, D^18<=N and |W|*2^m<=N^2,
encoding entries are bounded by4*N^2/D^(1/18), contributing leaves by33
and passed-set cardinalities by(19m+1)*33 times that scale. Add finite
magnitude and auxiliary object-count bounds. None are native instruction costs.

All six final local gates pass: strict build, aggregate check, strict tests,
environment lint, style lint and init-import check. Hygiene --check-simp,
changed-file lints (14 library modules,1 new test) and diff --check pass.
Tests kernel-check signed results3,20,0,-8, true padding, empty/sparse and
negative-order boundaries, and instantiate all aggregate bounds with jointly
satisfiable m=1 parameters and symbolic matrices without resource overrides.

Read-only math/API review by /root/thin_product_review is clear after fixed
doc references/magnitude wording/quotation hygiene. Focused final delta review
by /root/thin_product_final_delta_review is clear for tree
b021e2d9340b433a9fdb129882351e158e8c289f, reusing the prior mathematics review.
These are internal agent reviews, not outside coordinator or human approval.

Source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
selective Section2 finite mathematics; Anthropic credit/NOTICE retained.
Abstract assessment: no impact on selected headlines, catalogue or rendering.
Full native tensor/sparse-product/Exact Triangle code, native Chan-He #1446,
whole input/time/width composition and improved1.9992 remain under #1394.

AI assistance: implementation and reviews with OpenAI Codex, worker session
codex-thin-product-math-20261028.

* 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 #1446; independent complete parameter subtask #1458.

* doc(matrix): explain finite thin-product guarantees in the Lean API

Restack #1463 above repaired #1464 without changing the reviewed mathematics.
Rewrite 149 documentation blocks in 14 modules as standalone descriptions;
replace operation-cost and word-size narratives with the exact entry, leaf,
passed-set and specified-value quantities proved. Preserve pinned Anthropic
credit, source locators, statements, definitions, proof bodies and imports.
An independent comparison with original ee288fb16 confirms that all code bytes
outside comments are identical, including code whitespace.

Validation of this final tree: all six gates pass together (strict build,
aggregate check, strict tests, environment lint, style lint, init imports).
Citation-aware full hygiene --check-simp, changed-file lints (14 library modules,
one test) and git diff --check pass. Lean MCP FiniteMagnitude diagnostics finish
without errors or warnings. Serial Smoke/Axioms warmups avoid the shared-host
memory failure previously seen when these import-heavy clients run together.

Tests and substantive math/API review evidence are retained from the original
reviewed tree b021e2d9340b433a9fdb129882351e158e8c289f in ee288fb16. This change
is documentation-only; /root/draft_thin_docs authored the scratch map and the
continuation worker inspected/applied it. That drafting is not independent review.
Earlier math reviews are inside-fleet agent reviews, not outside or human approval.
Outside coordinator review will be requested on the final PR. No selected abstract,
catalogue or rendering is affected.

PR publication remains held while native dependent restacks are repaired, per
root sequencing. #1394 remains open: native shared encodings/pruning/Exact Triangle,
Chan-He #1446, complete Convolution/ordinary input/time/width composition and the
improved Section4 route to exponent1.9992 are not supplied by these finite counts.
AI assistance: OpenAI Codex workers codex-thin-product-math-20261028,
codex-three-sum-continuation-t3-3dda8289 and /root/draft_thin_docs.

* fix(wordram): repair parameter proof hygiene and ceiling-log docs

* feat(wordram): implement shared tensor encodings

Complete the shared left/right encoder milestone #1493 above parent b4936ce28
(#1496). Fixed standard-WordRAM code with 32 registers computes every public
encodingL/encodingR leaf from actual initialized flat signed inputs. The native
bound is 240*(L+1)*10^L instructions plus halt, with explicit magnitude/address
inequalities, two alternating buffers, charged initialization/copying and the
complete outside frame. The full ordinary native 3SUM objective #1394 remains
open; this component supplies no sparse-query or Exact Triangle solver.

Validation of tree b598513f02cc064eaf50d3c680684c19289ffd71 against
b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
changed-file lints (13 library modules, one new test) and diff checks pass.
Tests execute both encoders at depths zero, one and two, compare all 100
depth-two leaves with the unchanged public encodings, preserve input/frame
sentinels, and cover adjacent word widths and all three copy block orders.
Kernel-checked concrete flat executions discharge every width/magnitude
premise. Selected abstracts, catalogue and rendering are unaffected.

AI assistance: OpenAI Codex implementation and self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Independent correctness/API review is pending;
this is not an approval or a claim that the complete 3SUM objective is done.

* test(wordram): connect encoder witnesses to charged runs

Connect the zero-depth and two-stage regression memory witnesses to the
actual prefix Runs already proved by runs_left, rather than discarding that
conjunct. Bound the prefixes by 240 and 72000 instructions and expose the
same executions' charged halt at n+1. All library code is unchanged from
ad3e09735a116f9868e87cf7ae6af59e5cb6a285 (tree b598513f02cc064eaf50d3c680684c19289ffd71).

Validation of tree 8277017f2c63a5851b63a5d4b49775a9fb96d62d against actual
parent b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
fresh changed-file lints (13 library modules, one test), strict PR-draft
declaration-name check and staged/unstaged diff checks pass.

Independent nonauthor agent review 8034f3da approved exact ad3e09735/tree
b598513f, covering full code/model/cost/width/source and ArrayCopy with no
blockers. It is inside-fleet review, not outside approval. This test-only
delta addresses its optional witness-connection finding; focused final
test/source-mapping review remains pending through the parent coordinator.
No selected abstract, catalogue or rendering impact. The full ordinary
native 3SUM objective #1394 remains open; this implements encoder issue #1493.

AI assistance: OpenAI Codex implementation/self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Publication remains on hold for focused
review; this commit is not approval or a whole-3SUM completion claim.

* feat(wordram): checkpoint native pruned-query controller proofs

Work in progress for #1526. Fixed native controller and initialized-input interpreter regressions, numerical child-set bridge, call-count potential, charged power/scan/clear/frame/arithmetic/return kernels. Individual current Lean modules have clean MCP diagnostics; the earlier strict targeted scan/count/value/test checkpoint passed. The complete global controller invariant, native evaluator theorem, actual initialized flat-run clients and sparse charged bound remain unfinished. No full six-gate or independent review claim; no PR submission. Full #1394 endpoint remains open. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* refactor(schonhage): reuse binomial bounds and sharpen signed tests

Address the bounded nonblocking review findings on #1496. Keep Nat.choose_le_exp_mul_div_pow unchanged while deriving it from Cslib.sum_choose_le_exp_one_mul_div_pow in the existing real binomial module; remove the redundant module and migrate its import. Preserve Anthropic, Samuel Schlesinger, OpenAI and Erik Demaine credit. Kernel-check an actual mixed inner/outer L2,m1 signed pruned result of -8, remove two signature-only tests and retain positive admitted-parameter checks. Paraphrase the identified source-derived sentence, shorten generic source boilerplate and record the generic naming follow-up. No public mathematical statement or definition changes meaning; no selected abstract or endpoint promotion. Final validation/source/review evidence is in PR #1496. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* feat(WordRAM): prepare and encode every shared matrix band

Implement the complete bounded #1523 native component under #1394. A fixed
96-register standard WordRAM program computes valid subset/inverse tables and
a deterministic existing Layout, prepares all padded signed row/column bands,
calls the unchanged #1520 encoders once per shared band, collects every leaf,
and restores the entire initialized input prefix and outside frame.

The State.init and flat Runs/Executes clients bind the actual output memory to
public encodingL/R in the unchanged leafIndex order (P0 digit 9). All powers,
mask/popcount/root/table loops, indices, guarded matrix addresses, initialization,
copying, encoder calls, loop controls and halt are charged. The generic bound is
4096*(L+1)*(1+N*4^m+2^L+2*numBands*10^L), plus halt; at L=19m and N>=(4^m)^18,
the full charged run is <=81920*(L+1)*N^2/(4^m)^(1/18).

Width assumptions are explicit original-parameter inequalities: the wordBudget
fits target w+2 and 7^L*A < 2^(w-1), w>0, A>=0. Actual signed kernels use at most
15/17 instructions for add/subtract, already included through the unchanged
encoder's real cost. No all-state fit, callback, solver, assumed run/cost or source
machine semantics is a hypothesis. Symbolic positive-depth thin native examples
and concrete signed/padded/frame/width-boundary executions establish nonvacuity.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Programs/Sec2/Theorem5/Encode/AllBands.lean:230-239,262-271
and BandArrayFacts.lean:107-113. Verified checkout files equal their pinned Git
blobs and all PR-draft quotations match those exact line slices. The source's
row/column encoding predicates map to runs' quantified original matrices, all
bands and all leaves on computed MaskTable.layout; Light limits/program maps,
callee contracts and source time hypotheses are replaced by actual native code
proofs, not imported. The block index is beta*K0+(side? h:g), and row is block*N0
plus the compressed outer offset. Shared tile pointers and retained table words
are exposed by tileInputBases/tile_input_values/table_word_layout.

Reuse unchanged WordRAM control/rename/copy/signed APIs, Layout/bandArray/encoding
mathematics and Mathlib finite index/sorted-set APIs. New mask scans, dense inverse
lookup, direct base-seven decoder and native execution/cost composition are
original. Small native-power/ordered-filter/positional-digit/row-major lemmas live
in narrow topic modules. Retain Anthropic, PBC source credit and NOTICE.

Validation: PASS all six strict gates (build --wfail --iofail, mk_all --check,
test --wfail --iofail, lint, lint-style, checkInitImports), serial Smoke/Axioms
warmups and the global Axioms audit; full citation-aware hygiene --check-simp,
fresh actual-base changed-file lints, strict PR-name and diff checks. Validated
with LEAN_NUM_THREADS=1 and cache downloads disabled. Windows static metadata
reads used PYTHONUTF8=1; no Lean/source change was needed. New Lean files use ordinary non-executable file modes. Exact payload tree
bdfc5a1a33f0d712b90f4fe4bc9d6c27e2d8318e. Targeted Lean MCP endpoint/tests and pinned quote identity also pass.
No PR has been opened;
independent exact-revision correctness/API/source-mapping review is pending.

Abstract assessment: no impact on selected abstracts, models or scope; no new
headline or PDFs. Pruned queries, products, solvers and whole ordinary 3SUM remain
open under #1394. Base #1520 remains unchanged at 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6.

AI assistance: Codex implementation/proofs, session codex-native-bandprep-t3-03b600bd,
under delegating-worker coordination. Existing unchanged encoder outside-review
evidence is PR1520#issuecomment-6477077023; final new-component review pending.

* feat(wordram): checkpoint native pruned accumulation and frame transitions

Work in progress for #1526, not a submitted component. Complete native parent accumulation loop (31N+3), internal sparse initialization (7N+8), computed child push (15), shared actual frame-word store, executable query-code inverse/requested-set bridge and recursive timestamp allowance. These current modules have clean targeted Lean MCP diagnostics; actual interpreter and kernel digit/request regressions pass. Changed-scope hygiene --check-simp and diff check pass. The general node/controller continuation proof, actual initialized full evaluator theorem and final sparse charged bound remain unfinished; no full six-gate or independent review claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289; full #1394 remains open.

Final current-tree checkpoint: strict build --wfail --iofail of Accumulate, Clear, Push, Frame, Powers, Leaf, Weight, Scan and SchonhagePruned tests passed together (3596 jobs); scope hygiene --check-simp and diff checks pass. This is a partial implementation checkpoint, not an all-six-validated PR or completed #1526 milestone.

* feat(wordram): checkpoint actual pruned-query root-frame stores

WIP #1526. Factor root scan setup and root finish; prove the actual eleven-instruction root-frame initialization and exact memory/register frame. Current Root MCP diagnostics clean. Full node/controller composition remains unfinished; no PR or full-six claim. AI-assisted continuation by codex-three-sum-continuation-t3-3dda8289.

* fix(nat): reuse existing tuple digit identity in band preparation

Address the sole P2 finding from the independent #1523 review of cb261f6b:
remove duplicate Nat.ofDigits_ofFn and publicly import the existing radix
module. The finite-function numbering bridge uses Nat.ofDigits_ofFn_eq_sum.
Its statement is unchanged. Existing radix declarations, proofs and source
credit are unchanged; no native program, endpoint statement or test changed.

Validation on exact final tree 4807cb971cf8030f70df67e5e8fa13947dcbd202:
PASS all six strict gates together (build --wfail --iofail, mk_all --check,
test --wfail --iofail including global Axioms, lint, lint-style,
checkInitImports), fresh actual-base changed-module lints (29 library/1 test),
full citation-aware hygiene --check-simp, strict draft-name and diff checks.
Serial LEAN_NUM_THREADS=1; optional cache downloads disabled. Lean MCP also
reports clean diagnostics for the changed bridge. Logs are in
.lake/codex-three-sum-continuation/band-review-six in the continuation checkout.

Original native implementation and all full correctness/API/source-mapping
review coverage retained. Review record:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6479696830
Original implementation/validation handoff:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6478943178
Focused final delta review pending before PR publication. No impact on selected
abstracts, models or scope; no new headline. Complete #1394 native 1.9992
endpoint remains open.

AI assistance: bounded reuse fix and validation by Codex session
codex-three-sum-continuation-t3-3dda8289. Original author credit remains on cb261f6b.

* feat(wordram): checkpoint complete native pruned-controller phases

Continue #1526 implementation under #1394; this is explicitly partial WIP,
not a complete component or PR submission. Full recursive node composition,
initialized input/flat clients, derived global fits and total-time theorem
remain open. No solver or all-state fit/execution/time certificate is assumed.

Check full root setup/scan/frame (20Q+19), report (9Q+3), leaf/return (24),
loaded leaf step (43), internal entry (7N+28), native nonempty child scan/push
(20N+42), empty-child scan/advance (20N+33), returned-child accumulation
(31N+29), and final return (26) against the actual standard fixed native Code.
KernelRegs describes only constant/pointer register values. Node footprints
preserve the ancestor rows. The zero-depth node matches existing Pruned.result
and the finite traceWeight; its continuation uses the existing ExecWithin.loop_iter.
No alternative machine or run semantics is introduced.

The reporting-body/controller names are definitionally identical Code trees.
ScanMemory.congr transports the existing representation across disjoint writes
and removes duplicate root proof plumbing; push exposes its four-store frame.

Validation: targeted Lean MCP diagnostics clean for every new/updated phase
and ComplexityTests/SchonhagePruned.lean. Native interpreter regressions retain
depths 0/1/2, both signs, repeated/empty/mixed queries and an outside sentinel.
New kernel examples discharge the general node/register/address/signed premises,
connect the same negative-product final memory to charged controller execution,
and prove an empty leaf preserves the prior value cell. Diff whitespace passes.
No aggregate/all-six validation claimed: root/native audit coordination hold
is respected. Exact partial checkpoint tree 7fa4da67ea861a2bba3a6c430cd7e40996d0e794.

Abstracts: no impact; no new headline or endpoint claim. Original 1.9992
objective and sparse-product/ET/final composition remain open under #1394.
AI assistance: Codex implementation/proofs by continuation worker
codex-three-sum-continuation-t3-3dda8289.

* doc(matrix): replace copied source prose with API descriptions

Resolve the documentation-only requested changes on #1464:
https://github.com/cslib-community/complexitylib/pull/1464#issuecomment-6477111132
Rewrite source-quotation fragments and related explanations in Alphabets,
Identity, Full and Pruned for the local Lean declarations. Preserve the
mathematical attribution, bibliography keys, source pin and copyright.

A comment-aware comparison with 4f3226cd proves every noncomment byte is
identical in all four files. No declaration, proof, definition, program,
import or test changes. Existing checked source-statement quotations and
notation/quantifier/model/resource mapping in the PR remain unchanged.
The final source-comment screen compares against quoted fragments in the
actual pinned Sec2 and Statements/PaperStatements files, including the
known local renames; no substantial quoted fragment remains unmarked.

Validation is recorded for this exact tree in PR #1464. Source checkpoint
tree 8c3b87bb870d4c4e2202917357d19a7a139296e8. No abstract/catalogue/model/scope
or rendering impact; no new headline. The full native 1.9992 endpoint remains
open under #1394. Ancestor and descendant remotes are unchanged.

AI assistance: documentation repair and validation by Codex continuation worker
codex-three-sum-continuation-t3-3dda8289. Existing independent mathematical/API
and checked-source review coverage is retained; outside review of the bounded
documentation delta is requested, with no new review agent commissioned.

* refactor(finset): use order-embedding names in OrderGlue

Finish bounded #1545 from exact #1536 head66036150a. Replace generic
level/inner/outer API vocabulary with order-embedding/subset/complement names.
Remove five redundant membership/range/congruence wrappers, using Mathlib's
orderEmbOfFin_mem/range_orderEmbOfFin and ordinary substitution directly.
Migrate every actual Levels/Batch proof client with no deprecated aliases.
Keep filter_glue's generic name and rename its predicate parameter to P.

The retained generic statement headers are identical after the documented
renaming and binder alpha-renaming. All 48 Levels and 13 Batch declaration
statements and all definition bodies remain unchanged. The entire native
Encoding module is token-identical after comment removal; every other native
library file is unchanged. Source credit and pin are retained. Thus existing
State.init, Signed.encode, width/frame/cost and encodingL/R meanings remain.

Put the sum/option-versus-flat-digit explanation at the actual leftDigits,
rightDigits and termDigits hover docs, preserving their enumeration bodies
and order (row-major P terms, P0 digit9). Update the UPSTREAM naming follow-up.
Add generic nonconsecutive signed/zero/Option reconstruction clients using
Mathlib's orderEmbOfFin_unique, plus the routed optional #1536 asymmetric
native L4,m1,N29 prefix tests. Those compute headers/count/tables/snapshot and
decode/read ranks1 and2 with K0=2, distinguishing quotient/remainder blocks
and signed values without a full10^4-leaf encoder run or native body edits.

Reuse unchanged outside coverage: PR1496#issuecomment-6477111644 atb4936ce28,
PR1496#issuecomment-6480746578 at68bbe40e3, and PR1536#issuecomment-6480852097
at66036150a12046b29986d8f108c0afaf49d01c61. These are agent reviews, not human
approval. No new cited mathematical result or machine model is introduced.

Validation: PASS build --wfail --iofail, mk_all --check, test --wfail --iofail,
lint, lint-style and checkInitImports, with serial Smoke/global Axioms warmups.
Full citation-aware hygiene --check-simp, fresh changed-file lints against
actual base66036150a, strict PR-name and diff checks, and source/native identity
checks PASS. One thread, no cache downloads, PYTHONUTF8=1 on Windows.
Targeted MCP checks, full hygiene --check-simp and source/native identity
checks pass. Final source tree: 0c21b608cc5ed234527c73a3853a26132f52da0d. No source/ancestor merges or restacks.
Abstract assessment: no impact; no selected theorem/model/meaning/scope or PDF
change. This is generic ergonomics/testing only; full #1394 remains open.

AI-assisted implementation by codex-native-bandprep-t3-03b600bd, under parent
continuation-worker coordination. No new review agent commissioned; ordinary
outside coordinator review is requested when the bounded PR is ready.

* feat(WordRAM): prove all-depth pruned controller execution

WIP checkpoint for #1526; no PR and no completed component claim. The actual fixed native controller now has a depth-inductive execution proof with original Pruned.result values, stored queries/frames, concrete spatial preservation, input-derived signed fits and traceWeight charged continuation. Root loop exit discharges the continuation.

All new library modules through Recursive.exec_ready have clean targeted Lean MCP diagnostics. New concrete entry/result client reports no diagnostics, but the complete existing test file is still elaborating its VM regression commands; no final test-pass or all-six claim. Initialization/root-list/report/flat State.init composition, global width/fit clients, full component validation and independent review remain open. Aggregate checks are held for the coordinated root validation slot.

GenericRAM/Signed/Fits.lean is the unchanged blob from independently owned PR #1552, commit f276db1174333d3e6253b93878be8b95c1fcc713; credit retained. No native program body changed in this checkpoint. All proofs and invariant definitions are original native work; existing mathematical pruning/encodings retain their source credit. No selected-abstract impact or whole-3SUM endpoint claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* style(WordRAM): normalize native proof file modes

* feat(wordram): complete initialized sparse pruned-query execution

Complete implementation candidate for #1526 above #1520 exact 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6. Full ordinary native 3SUM and the published 1.9992 endpoint remain open under #1394. No PR yet; fresh exact-revision independent correctness/API/source review is pending before publication.

One fixed standard native program: 96 registers, at most 4096 flat instructions including halt, no width reads. Complete State.init -> pre-halt Runs -> Executes uses the same answer memory. Every supplied query, including repeats and empty/zero-depth boundaries, equals existing Pruned.result; runs_bilinear specializes existing encoding contracts to bilinearProduct. exec_kernel computes its powers/layout and has a reusable pointer/epoch directory contract. All child lists, timestamp decisions, stack/control/index arithmetic, signed products/adds and reporting are actual charged code, proved by the all-depth exec_ready induction; its continuation is discharged by the actual root exit.

Full charge including halt <= 8192*(L+Q+1+(L+1)*card(leaves(requested qs))). Ordinary source envelope M=A+B+10^L*A*B and address budget H=256*(L+1)*10^L+32*Q+512 derive input fit and execution at every physical W >= clog_2(M+H+1)+3. This is logarithmic in explicit component budgets; global 3SUM composition is not claimed. Inputs: raw L,Q then two canonical signed arrays of length10^L and unsigned query codes, after the actual standard length cell0. Returned output pointer is unsigned. All input/outside memory is preserved on initialized runs. Code/ExecWithin/State.init/Runs/Executes, signed kernels, Heap/Block APIs, existing mathematical pruning/encodings and Mathlib digit/log APIs are reused; GenericRAM/Signed/Fits is the unchanged blob from #1552 f276db1174333d3e6253b93878be8b95c1fcc713, with credit retained.

Pinned source anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5. Checked Git-blob quotation locators: ThreeSumApsp/Sec2/Lemma10.lean:148-150 (Pruned_eq_restrictTo_sum) and:565-566 (Lemma10.total_size). Source Pruned -> existing Pruned.result; source restriction -> Finset.piecewise; source Leaves -> leaves; all natural depths and arbitrary integer arrays retained. Native indexing directly uses existing leafIndex(privateLeaf), first coordinate least significant, inner digit9. Child prefix/stride/division are proved against the finite childSet/sliceAt semantics. Native code/proofs and cost are original, not supplied by source Light semantics or its sorted-segment implementation. Full checked quotes and model/quantifier/layout/cost/reuse mapping are in the prepared UTF-8 PR draft. Copyright retained in source/NOTICE.

Validation on tree bd6e74cce28dbd16c90291b847dac1a311402510: all SIX strict gates pass together, LEAN_NUM_THREADS=1, downloads disabled: build --wfail --iofail; mk_all --check; test --wfail --iofail (including Smoke/global Axioms); lint; lint-style; checkInitImports. Full citation-aware hygiene --check-simp; actual-base47-library/3-test changed-file and local lints; strict PR declaration-name audit; staged/unstaged diff checks pass. Register alias docs fixed the first lint finding; all native definition bytes are unchanged by that fix. Tests discharge real State.init positive/negative/empty/depth-two mixed/shared/repeated queries, sufficient-width family and failing fit boundary; callable signed wildcard with nonzero epoch and preserved input/outside sentinel also checks. No sorry, custom axiom or native_decide introduced.

Selected abstracts/catalogue/rendering: no impact, no new headline. ROADMAP/UPSTREAM preserve the open sparse-product/ET and global1.9992 gaps. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289 (OpenAI Codex); original finite source credit to Anthropic, PBC.

* feat(wordram): checkpoint computed wanted-query routing

Partial implementation of #1561 by codex-three-sum-continuation-t3-3dda8289.

Implements actual fixed standard 96-register routing/grouping code with computed valid-mask tables, tile counts, prefix offsets and stable scatter. General checked proofs cover the digit kernel (15L+10), one-query routing (15L+25), exact outStrOfPos/queryIndex mapping, computed header/count/relocated-table initialization (16L+(12L+33)*2^L+83), input-memory frame and original-input-derived fits. Generic finite stable-counting positions are injective and bijective.

Targeted Lean MCP diagnostics clean for all nine new library modules and the regression suite. Actual initialized interpreter regressions pass for empty input, zero depth, duplicates and an asymmetric K0=2 three-band case; no encoded leaf array is materialized in routing tests. The 96-register program computes every routing/count/prefix/scatter decision.

INCOMPLETE: general native counting, prefix and scatter execution invariants, initialized flat complete-run/width/frame/bound clients, final static hygiene and ALL SIX gates remain pending. This checkpoint is not a PR or acceptance claim. Mutable global audit slot remains with parent; no aggregate performed here. Full #1394 native sparse/ET solver and ordinary 1.9992 endpoint remain open.

The child branch merges unchanged #1554 at 12abeee84 onto frozen #1562 base 0c2e0ebea. The local merge 60bec64398 only reconciled shared credit/roadmap/upstream prose; no ancestor branch was edited. Original implementation mathematics/code by Erik Demaine with AI assistance. Existing finite Schonhage and band/encoder/pruned interfaces are reused with their original credit retained.

* feat(wordram): checkpoint wanted count-pass proofs

Continuation of #1561 from 06b3563e7. CountStep has clean targeted Lean MCP diagnostics, including exact 14-instruction native count update and memory frame. Dense zeroing and count-loop composition are implemented; Count.lean has one pending elementary nonnegativity/address-bound proof at line 152. This is an explicitly incomplete source checkpoint, not all-six validated or a PR. Work is paused solely to prioritize the bounded outside-requested #1562 repair. No program/public statement in #1562 changed.

* doc(finset): restore ordered-gluing source credit

Restore the original AlmanWilliams2026 Section 2 citation and finite-scope sentence removed by the naming refactor. No Lean declarations or proof tokens change.

AI-assisted coordinator fix by coordinator-codex-queue-20261028-ready-c. Original implementation and source authorship retained; independent delta review and new hosted CI requested on PR #1554.

* fix(wordram): address pruned-query review findings

Bounded documentation/test repair for #1562 / #1526 by codex-three-sum-continuation-t3-3dda8289, above exact 0c2e0ebea6199ac1fbe9b2e048ce24b9410f8d1a.

Fix both ROADMAP reference definitions, distinguish client contracts from exported internal stage APIs, and document why the narrow ArrayAppend/InputArray topics avoid Allocation interface/dependency fanout. Extend existing post-integration issue #1553 with the exact pruned power register map, 4L+10 accounting, affected consumers, fused-encoder accounting and sibling integration order; no power program or ancestor is changed.

Add one fully admitted signed runs_bilinear client: depth0, original arrays -3 and 2, actual encodingL/R premises discharged, original-input magnitude/address fits discharged, physical width10, same actual State.init prefix Runs and charged halt, and output memory at address6 equals Signed.encode(-6). Targeted Lean MCP diagnostics pass.

Validation: all six strict gates passed together on final staged tree f4cfd4ae0d838c4b4bf4c43c924f400744450957, including Smoke/global Axioms; one thread/downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base 47-library/3-test module lint, changed-file audits, strict declaration-name check and staged/unstaged diff checks pass. Local machine-readable evidence: .lake/codex-three-sum-continuation/pruned-review-repair/{summary.json,static-summary.json,identity.json,*.log}.

Source identity audit against 0c: all seven changed library files have identical comment-free tokens. Every public library statement, definition, native program and proof is unchanged. Every existing test byte is unchanged except the single inserted concrete client. Abstract/catalogue/rendering assessment: no impact.

The prior inside-fleet technical review at issue1526#6484055995 and outside FINAL at PR1562#6484177608 cover unchanged native semantics/source mapping. Fresh focused outside review of this repair is requested; no new review agent was commissioned, and no outside/human/platform approval is claimed. All original Anthropic, PBC credit retained. AI-assisted implementation by OpenAI Codex.

#1561 source is preserved separately at 7772a3497017078b37d1e04004225fae28baddad with its pending native grouping proof work explicit. Concrete sparse-product/Exact Triangle programs, full input/time/width composition and the original native 1.9992 endpoint remain open under #1394.

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(imports): regenerate aggregate after Chan-He parameter integration

* feat(wordram): route and group wanted thin-product queries

Implement #1561's complete native routing/grouping component. State.init prepends
the native length cell to [L,m,N,Q] followed by raw coordinate pairs.
Actual finite unsigned standard Code computes tables, tile keys, codes, counts,
prefix offsets and stable scatter. No layout/run/time/permutation certificate
is supplied. Fixed 96 registers, <=4096 flat slots including halt, no width reads.

Wanted.runs_grouped proves actual State.init prefix Runs and charged halt at the
same final memory, exact per-occurrence code/original-position equations, exact
wantedStrings tile spans, in-array span/code bounds, permutation, terminal Q,
input/outside frame and final boundedness. All admitted physical widths are
covered by the positive clog2(wordBudget+1)+1 threshold, with original input fit
derived. All initialized reachable prefixes are bounded. Complete native charge
including halt <=128*(L+1)*(Q+numBands^2+2^L+1). No 10^L scan per query/tile.

Validation: final tree 6c8164db02df348a46ffe0cf5972415977c62939. All SIX strict gates passed
together: build --wfail --iofail; mk_all --check; test --wfail --iofail (including
Smoke/global Axioms); lint; lint-style; checkInitImports. One Lean thread, cache
downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base
57-library/3-test lints, changed-file/name/staged+unstaged diff checks all pass.
The initial test-only module-boundary VM evaluation failure was fixed by using
the existing non-module native-test convention; every interpreter check remains.
The corrected frozen tree passed the complete six-gate sequence again.

Base: #1562 ce77926c393ce34e7962759bb412172c4584a67c. Preserve normal merges.
Unchanged sibling prerequisite #1554/#1536 is retained at exact
702c14bcf9896655b17c9b2dd5e02e6f270c9966: all 33 library and two test blobs are
byte-identical. Wanted contributes 24 library modules and one test. Existing
unchanged sibling reviews are reusable; no ancestor branch or remote was edited.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Sec2/Theorem5.lean:44-46, checked against its Git blob:
"outStrOfPos lay I J ∈ wantedStrings lay W (bandOf L m I) (bandOf L m J)".
Tiling/Definitions.lean:128-131 defines that filter/image set; reuse it unchanged
with W=qs.toFinset and separately preserve original list occurrences. Source
Programs/Sec2/Theorem5/Wanted/Codes.lean:13-19 motivates routing. Actual native
code uses the existing least-significant-first queryIndex/leafIndex dictionary,
digit9 for the inner wildcard and 3*row+col otherwise. It proves agreement rather
than identifying the Light program's separate numbering, semantics or costs.
Native code/proofs/stable-scatter theory are original; primitive counts reuse
Mathlib Nat.count directly, with zero/successor/bound/monotonicity APIs and the
existing count_eq_card_filter_range identity. Redundant count/offset wrappers
and their repeated elementary lemmas are removed. Every client is migrated;
Program.lean and PackProgram.lean are byte-identical to checked checkpoint
2e2cc39675a30b024c3932bd23f06163a33c8925. Imported finite source credit is
retained. All three source slices equal the pinned Git blobs.

Fully admitted kernel clients cover empty/zero depth, repeated pairs, and the
L4/m1/N110/K0=2 asymmetric family, tying answers to actual Runs/halt. Actual VM
regressions cover all expected grouped words, original indices, offsets and
input/outside frame. Fitting and failing physical-width premises are checked.
No sorry, custom axiom or native_decide. No curated abstract/catalogue/PDF impact.

Shared-band calls, actual buffer/header adaptation, pruned-kernel invocation,
answer reconstruction, sparse-product/Exact Triangle and full native ordinary
3SUM composition/1.9992 remain open under #1394. This is a component milestone.
Fresh nonauthoring correctness/API/source review is pending (root arranges);
outside review remains required. No PR, integration or approval claim.

AI-assisted implementation: OpenAI Codex, session
codex-three-sum-continuation-t3-3dda8289. Author/source credit is preserved.

* fix(imports): regenerate aggregate after shared-encoder integration

* perf(wordram): reduce native parameter proof heartbeat budget

* chore(wordram): scope measured parameter proof budget to reduction task

* perf(schonhage): focus cell arithmetic and use the default heartbeat budget

* fix(doc): restore unrelated upstream coordination records

Restore the exact 231-line tail common to both integration parents after review caught an overbroad conflict-marker match. The intended 3SUM integration prose is retained; no Lean change. AI-assisted correction by OpenAI Codex.

* fix(imports): regenerate band-preparation aggregate from merged inventory

* doc(order-glue): preserve reviewed source credit through supplier merge

* doc(order-glue): restore paper citation and finite scope

* feat(wordram): checkpoint native queried-product construction (#1581)

Unfinished implementation above exact a6e4005b2 on the existing isolated child branch.
The fixed native program computes both producers, protected layouts/copies, tile ABI,
one shared timestamp directory, actual pruned calls and original-order reconstruction.
Targeted Lean MCP checks pass for the new native program and supporting original-input,
parameter/layout, copy/frame, grouping-span, raw-conversion, producer and directory proofs.
Five actual initialized interpreter regressions pass: empty, signed/duplicate, raw01,
multiple tiles/padding/epochs, and nonempty inner tensor coordinates.

This is a recovery checkpoint, not a complete native product result or PR candidate.
Full tile/epoch loop and reconstruction correctness, initialized composition, complete
charged cost and logarithmic-width/saving results remain open under #1581/#1394.
All six/global/static validation remains held for root; no aggregate or static audit ran.
Existing curated abstract statements and scope are unaffected; no headline promotion.
Implemented personally by codex-three-sum-continuation-t3-3dda8289 with AI assistance.

* fix(imports): regenerate thin-product aggregate after main integration

* doc(wordram): separate shared-encoder integration records

Keep the reviewed finite-matrix supplier records intact and record native-encoder scope and source credit separately, so squash-queue integration does not overlap the ancestor documentation hunks. Preserve code, tests, concrete bounds and the complete unrelated upstream-record suffix. Queue revisions are used only for read-only projection, never as parents.

* doc(matrix): keep progress links out of shared reference append block

* feat(wordram): checkpoint complete queried-product source before supplier merge (#1581)

Local recovery checkpoint only. Complete native queried-product execution, initialized
clients, quantitative thin saving and logarithmic width have clean targeted Lean MCP
diagnostics. Import generation adds the 29 new modules. No all-six/static validation or
independent candidate review is claimed by this checkpoint; it is not a PR candidate.

The actual #1576 supplier advanced from a6e4005b to integration91f485ec. Preserve this
source before a normal child merge, reconcile only shared docs/imports, regenerate the
aggregate, then validate the final source together against the actual supplier.

Original native implementation by Erik Demaine with Codex assistance, reusing credited
finite Anthropic Section 2 mathematics and actual native producer/router/pruned kernels.
Ordinary-3SUM/Exact Triangle and the full #1394 1.9992 endpoint remain open.

* feat(wordram): execute queried thin-matrix products (#1581)

Complete #1581 implementation candidate under #1394, awaiting required fresh exact-head
non-authoring correctness/API/source/resource review. No PR is opened or integration
approval claimed. Normal child history preserves source checkpoint af208636b and actual
reviewed #1576 supplier91f485ec; no ancestor branch or remote was edited.

One actual fixed standard unsigned WordRAM program per signed/raw input mode consumes
original headers [L,m,N,Q], both row-major integer matrices X:N x 4^m and Y:4^m x N, and
raw interleaved requested coordinates. It computes tables/layout, shared encodings,
Wanted counts/prefix/stable scatter, tile pointers, decoded queries, directory/epochs,
pruned evaluation and original-order reconstruction. Raw nonnegative entries are doubled
by actual charged load/multiply/store instructions (including raw0/1 -> signed0/2).
There is no source Light machine, assumed layout, sorting, solver, run or time oracle.

QueriedProduct.exec/runs/runs_wide prove actual native execution from original words /
State.init, same-y prefix Runs and charged halt, every original occurrence's exact
Signed.encode((X*Y)[qs[i]]) including duplicates, original-input restoration and the
complete outside frame. Generic execution assumes m<=L, original absolute entry bound A,
raw nonnegativity in raw mode, and the explicit original numerical magnitude/address
admission; it has NO query-sparsity hypothesis. The real pointer/epoch kernel uses a
directory initialized once, with scratch/frame separation and propagated fresh bounded
epochs. Code has 160 registers, <=32768 flat instructions including halt, no width reads,
and is independent of dimensions, magnitudes, query counts and physical widths.

Thin hypotheses: L=19m, D=4^m, N>=D^18. With distinct-set sparsity
|qs.toFinset|*2^m<=N^2, complete charge including halt is <=
65536*(19m+1)*(65*N^2/D^(1/18)+Q). With the stronger occurrence hypothesis
Q*2^m<=N^2 it is <=4325376*(19m+1)*N^2/D^(1/18). Multiplicity/output work is never
replaced by set cardinality. runs_thin holds at EVERY physical W>=
128*clog_2(N+Q+A+2), deriving InputFits and all intermediate admissions. Its explicit
magnitude/address envelope is <=2^40*(N+Q+A+2)^10, allocation <=128*(N+Q+A+2)^4.
Physical all-prefix boundedness is proved; a separate source-polynomial prefix bound at
arbitrarily larger widths is not extracted here. ET record/input adaptation and all its
copies/calls, Exact Triangle solving, ordinary3SUM composition and improved Section4 /
1.9992 remain open. This component proves neither full3SUM exponent.

Source mapping checked against actual Git blobs at anthropics/formal-math
16a5ce41304fcdaea4e0be7c132e1c361dc26da5, under3sum-apsp/ThreeSumApsp:
- Sec2/Theorem5.lean:61-67 concludes the pruned band value equals (X*Y) I J.
  Existing finite thin_product_spec/MaskTable.layout/bandArrayL/R/encodingL/R and
  wantedStrings are reused; W=qs.toFinset, with a separate occurrence permutation.
- Sec2/Theorem5.lean:146-149, paraphrase of its conclusion:
  ((sum T in tiles (19*m) m N, |Leaves(wantedStrings lay W T.1 T.2)|):Real)
    <=33*(D m)^(-(1/18):Real)*N^2.
  Source hypotheses N>=D^18 and W.card*2^m<=N^2 are retained. Existing encoding,
  tile/leaf/passed-set estimates bound ACTUAL native execution, not an assumed cost.
- Programs/Sec2/Theorem5/Pruned/AllTiles.lean:86-92 and Wanted/Report.lean:30-37
  are the per-tile/report specification references; Solver.lean:150-161 is conditional
  on Light callees. Native code here is original, accepts stable unsorted duplicates,
  charges empty tile calls and proves all native callees directly. Instruction constants,
  widths, protected layout and frames are independently proved for the native model.
The UTF-8 PR mapping draft contains two exact Lean quotation slices, both checked against
Sec2/Theorem5 at that pin; all four cited source files equal their pinned Git blobs.
Anthropic, PBC's existing mathematical source credit is preserved. New native programs
and execution/resource proofs are original work by Erik Demaine with Codex assistance.

FINAL VALIDATION (whole source tree, not only this commit's proof/doc delta):
Tree 555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; four compiler threads; cache downloads disabled.
1. lake --no-cache build --wfail --iofail : PASS (13.56s).
2. lake --no-cache exe mk_all --check : PASS (11.33s).
3. lake --no-cache test --wfail --iofail : PASS (27.14s).
4. lake --no-cache lint : PASS (43.22s).
5. lake --no-cache exe lint-style : PASS (17.09s).
6. lake --no-cache exe checkInitImports : PASS (16.8s).
Strict tests cover new initialized/product clients, Smoke and global Axioms.
Full citation-aware hygiene --check-simp, fresh actual-base30-library/one-test lints,
changed-file checks, 25-name strict final-body audit and staged/unstaged diff checks PASS.
Actual comparison base: 91f485ec38ca6b878f338e2cdbdedbf5d4f20257.
3533 inherited source/abstract files checked; only the existing tile-key lemma is exposed
with the same statement/proof. All35 inherited sibling blobs equal actual parent91.
All native code bodies/register definitions are byte-identical to af208636b;
comment-erased Program tokens match. Current full Program source SHA256:
2b86fe04f6afa49a7eadc75292559dca62f4d65c5f7bdaf3b1f4386994aa8ebc
Public Header.exec_layout statement is identical; proof split passes at DEFAULT
heartbeats, without a new allowlist entry. Final register docs clear the initial lint
failure (47 undocumented aliases); prior incomplete/failed checkpoint logs are retained.
Checked PR/source mapping draft SHA256: be43f587d5c0ac6dd871093d5d19c283ef7dd9732b5c5d3cfa77b24e42899a24
Local reproducible records: .lake/codex-three-sum-continuation/queried-product/
summary.json, static-summary.json, source-native-identity.json, source-mapping.json,
run-identity.py, final-body-names.log and per-gate logs. This commit description is the
durable evidence until a PR exists; issue1581 links it.

Examples discharge real width/magnitude premises and connect the same final y to prefix
Runs, halt and memory: signed/raw, duplicate, padded/multiple-tile, positive/zero depth,
empty inputs, nonzero original header, adjacent sentinel, strict budget boundary and
nonempty symbolic admitted thin family at every inner depth.

Abstract assessment: no selected statement/definition/scope/catalogue/rendering impact.
ROADMAP/UPSTREAM preserve remaining1394 scope; no headline promotion.

Fresh review of all NEW native semantics/cost/width/frame/init/API/source mapping remains
pending root arrangement. Unchanged prerequisite outside coverage can be reused after
the recorded identities (1576 outside FINAL6487515809). No child watch/approval/merge.

* style(Schonhage): remove trailing space in queried products

Independent nonauthoring /root/queried_product_review examined the complete
native #1581 layer at ff31104be7acf96798c13b38cb079c58605a1ec3 against
91f485ec38ca6b878f338e2cdbdedbf5d4f20257, including all 29 new library
modules, actual execution/frame/width/cost, multiplicities, source mapping
and initialized clients. No correctness/API/source/resource blockers; this
is agent review within the root fleet, not outside or human approval.

The single P3 finding was a trailing space in Product/Groups.lean:111.
This coordinator correction removes exactly that ASCII space. An exact
byte check and git diff -w verify no other change. Full base-to-head
diff --check now passes, covering committed changes as well.

All six gates and static/source checks pass on reviewed tree555b6b52,
as recorded in ff31104. The whitespace delta is validated separately;
final hosted CI and outside coordinator review remain required.
Curated abstracts unaffected. AI assistance: Codex.

* doc(Schonhage): retain band catalogue encoding contract

Restore the one supplier sentence in UPSTREAM.md about unchanged leaf ordering and
canonical signed words, addressing optional nit1 in outside FINAL6493515098 on PR1615.
All other paragraphs are preserved. Exact byte comparison against9a57e134 verifies
this one sentence is the entire tracked delta; all Lean/native/math/API/abstract
source and every other tracked byte are unchanged.

Documentation-only validation: consistency with the existing catalogue interfaces,
full base-to-head diff --check, citation/simp hygiene and strict25-name final PR-body
audit pass. No Lean, import, aggregate or full rebuild was run for prose. Original
all-six evidence remains for tree555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; this does
not claim a new-head all-six run. No changed abstract meaning or rendering.

Full nonauthoring native/source review and outside FINAL coverage are reused across
this bounded doc delta. A focused outside DOC delta check is requested, not another
full review. Register naming remains a separately coordinated follow-up; existing
nonzero interpreter coverage was accepted, so no test change is included.

AI assistance: Codex implemented the requested one-sentence documentation repair.

* fix(imports): regenerate wanted-routing aggregate from actual inventory

---------

Co-authored-by: Samuel Schlesinger <SamuelSchlesinger@users.noreply.github.com>
Co-authored-by: Codex coordinator <codex@users.noreply.github.com>
Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
…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>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
…slib-community#1616)

* 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(matrix): prove the tensor recursion and pruned evaluation core

* doc(matrix): clarify the overlapping contributing leaf

* doc(matrix): make tensor and pruning explanations standalone

* 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(matrix): prove finite thin-product correctness and sparse bounds

Implement the complete finite mathematical milestone of cslib-community#1463 above cslib-community#1464:
valid layouts, batch-product correctness/error exclusion, arbitrary-N tiling,
exact requested signed products, order/cardinality estimates, geometric tails
and the derived sparse bounds. At D=4^m, L=19m, D^18<=N and |W|*2^m<=N^2,
encoding entries are bounded by4*N^2/D^(1/18), contributing leaves by33
and passed-set cardinalities by(19m+1)*33 times that scale. Add finite
magnitude and auxiliary object-count bounds. None are native instruction costs.

All six final local gates pass: strict build, aggregate check, strict tests,
environment lint, style lint and init-import check. Hygiene --check-simp,
changed-file lints (14 library modules,1 new test) and diff --check pass.
Tests kernel-check signed results3,20,0,-8, true padding, empty/sparse and
negative-order boundaries, and instantiate all aggregate bounds with jointly
satisfiable m=1 parameters and symbolic matrices without resource overrides.

Read-only math/API review by /root/thin_product_review is clear after fixed
doc references/magnitude wording/quotation hygiene. Focused final delta review
by /root/thin_product_final_delta_review is clear for tree
b021e2d, reusing the prior mathematics review.
These are internal agent reviews, not outside coordinator or human approval.

Source: anthropics/formal-math@16a5ce4,
selective Section2 finite mathematics; Anthropic credit/NOTICE retained.
Abstract assessment: no impact on selected headlines, catalogue or rendering.
Full native tensor/sparse-product/Exact Triangle code, native Chan-He cslib-community#1446,
whole input/time/width composition and improved1.9992 remain under cslib-community#1394.

AI assistance: implementation and reviews with OpenAI Codex, worker session
codex-thin-product-math-20261028.

* 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.

* doc(matrix): explain finite thin-product guarantees in the Lean API

Restack cslib-community#1463 above repaired cslib-community#1464 without changing the reviewed mathematics.
Rewrite 149 documentation blocks in 14 modules as standalone descriptions;
replace operation-cost and word-size narratives with the exact entry, leaf,
passed-set and specified-value quantities proved. Preserve pinned Anthropic
credit, source locators, statements, definitions, proof bodies and imports.
An independent comparison with original ee288fb confirms that all code bytes
outside comments are identical, including code whitespace.

Validation of this final tree: all six gates pass together (strict build,
aggregate check, strict tests, environment lint, style lint, init imports).
Citation-aware full hygiene --check-simp, changed-file lints (14 library modules,
one test) and git diff --check pass. Lean MCP FiniteMagnitude diagnostics finish
without errors or warnings. Serial Smoke/Axioms warmups avoid the shared-host
memory failure previously seen when these import-heavy clients run together.

Tests and substantive math/API review evidence are retained from the original
reviewed tree b021e2d in ee288fb. This change
is documentation-only; /root/draft_thin_docs authored the scratch map and the
continuation worker inspected/applied it. That drafting is not independent review.
Earlier math reviews are inside-fleet agent reviews, not outside or human approval.
Outside coordinator review will be requested on the final PR. No selected abstract,
catalogue or rendering is affected.

PR publication remains held while native dependent restacks are repaired, per
root sequencing. cslib-community#1394 remains open: native shared encodings/pruning/Exact Triangle,
Chan-He cslib-community#1446, complete Convolution/ordinary input/time/width composition and the
improved Section4 route to exponent1.9992 are not supplied by these finite counts.
AI assistance: OpenAI Codex workers codex-thin-product-math-20261028,
codex-three-sum-continuation-t3-3dda8289 and /root/draft_thin_docs.

* fix(wordram): repair parameter proof hygiene and ceiling-log docs

* feat(wordram): implement shared tensor encodings

Complete the shared left/right encoder milestone cslib-community#1493 above parent b4936ce
(cslib-community#1496). Fixed standard-WordRAM code with 32 registers computes every public
encodingL/encodingR leaf from actual initialized flat signed inputs. The native
bound is 240*(L+1)*10^L instructions plus halt, with explicit magnitude/address
inequalities, two alternating buffers, charged initialization/copying and the
complete outside frame. The full ordinary native 3SUM objective cslib-community#1394 remains
open; this component supplies no sparse-query or Exact Triangle solver.

Validation of tree b598513 against
b4936ce: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
changed-file lints (13 library modules, one new test) and diff checks pass.
Tests execute both encoders at depths zero, one and two, compare all 100
depth-two leaves with the unchanged public encodings, preserve input/frame
sentinels, and cover adjacent word widths and all three copy block orders.
Kernel-checked concrete flat executions discharge every width/magnitude
premise. Selected abstracts, catalogue and rendering are unaffected.

AI assistance: OpenAI Codex implementation and self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Independent correctness/API review is pending;
this is not an approval or a claim that the complete 3SUM objective is done.

* test(wordram): connect encoder witnesses to charged runs

Connect the zero-depth and two-stage regression memory witnesses to the
actual prefix Runs already proved by runs_left, rather than discarding that
conjunct. Bound the prefixes by 240 and 72000 instructions and expose the
same executions' charged halt at n+1. All library code is unchanged from
ad3e097 (tree b598513).

Validation of tree 8277017 against actual
parent b4936ce: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
fresh changed-file lints (13 library modules, one test), strict PR-draft
declaration-name check and staged/unstaged diff checks pass.

Independent nonauthor agent review 8034f3da approved exact ad3e097/tree
b598513, covering full code/model/cost/width/source and ArrayCopy with no
blockers. It is inside-fleet review, not outside approval. This test-only
delta addresses its optional witness-connection finding; focused final
test/source-mapping review remains pending through the parent coordinator.
No selected abstract, catalogue or rendering impact. The full ordinary
native 3SUM objective cslib-community#1394 remains open; this implements encoder issue cslib-community#1493.

AI assistance: OpenAI Codex implementation/self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Publication remains on hold for focused
review; this commit is not approval or a whole-3SUM completion claim.

* refactor(schonhage): reuse binomial bounds and sharpen signed tests

Address the bounded nonblocking review findings on cslib-community#1496. Keep Nat.choose_le_exp_mul_div_pow unchanged while deriving it from Cslib.sum_choose_le_exp_one_mul_div_pow in the existing real binomial module; remove the redundant module and migrate its import. Preserve Anthropic, Samuel Schlesinger, OpenAI and Erik Demaine credit. Kernel-check an actual mixed inner/outer L2,m1 signed pruned result of -8, remove two signature-only tests and retain positive admitted-parameter checks. Paraphrase the identified source-derived sentence, shorten generic source boilerplate and record the generic naming follow-up. No public mathematical statement or definition changes meaning; no selected abstract or endpoint promotion. Final validation/source/review evidence is in PR cslib-community#1496. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* feat(wordram): checkpoint native ET preparation kernels

Partial work for cslib-community#1532 under the still-open cslib-community#1394 endpoint. Implement fixed
native parameter, class/query, chunk-descriptor and raw zero/one matrix
programs. Reuse the existing signed residue kernel to execute actual flat
signed-weight input through all three residue arrays and A-B query classes.
Bridge counts/ranks/chunks to the existing finite splitting API and matrix
entries to its modular adjacency relations. Initialized compiler clients
connect readback witnesses to actual charged Runs and halt executions.

This checkpoint does not complete cslib-community#1532: whole catalogue/instance composition,
derived logarithmic-width bounds and the aggregate preparation estimate remain
open. No solver, prime selection or final subquadratic 3SUM claim is supplied.
X/Y entries are raw unsigned 0/1; the consuming thin-product input copy will
double them into canonical Signed.encode words with charged instructions.

Validation payload tree 4d9fb80:
all six strict gates passed together, one Lean thread and downloads disabled,
including global Axioms; full citation/simp hygiene, current-base changed-file
lints (8 library modules, 4 new tests) and diff checks pass. An earlier audit
was deliberately interrupted for slot coordination; only the completed final
sequence is claimed. Curated abstracts: no impact, no new headline selected.
Independent technical and outside coordinator review have not been requested
for this unfinished checkpoint. No PR is opened by this commit.

AI assistance: OpenAI Codex implemented and checked this checkpoint. Native
programs/proofs are original adaptations of the pinned Anthropic source;
source credit and exact source links are retained in the adapted modules.

* doc(wordram): record native ET source attribution

Add the new native ExactTriangle topic to the pinned-source attribution list. Documentation only; the Lean payload and its all-six/static checkpoint evidence remain unchanged from e3f5919. No curated abstract impact. AI assistance: OpenAI Codex.

* doc(matrix): replace copied source prose with API descriptions

Resolve the documentation-only requested changes on cslib-community#1464:
cslib-community#1464 (comment)
Rewrite source-quotation fragments and related explanations in Alphabets,
Identity, Full and Pruned for the local Lean declarations. Preserve the
mathematical attribution, bibliography keys, source pin and copyright.

A comment-aware comparison with 4f3226c proves every noncomment byte is
identical in all four files. No declaration, proof, definition, program,
import or test changes. Existing checked source-statement quotations and
notation/quantifier/model/resource mapping in the PR remain unchanged.
The final source-comment screen compares against quoted fragments in the
actual pinned Sec2 and Statements/PaperStatements files, including the
known local renames; no substantial quoted fragment remains unmarked.

Validation is recorded for this exact tree in PR cslib-community#1464. Source checkpoint
tree 8c3b87b. No abstract/catalogue/model/scope
or rendering impact; no new headline. The full native 1.9992 endpoint remains
open under cslib-community#1394. Ancestor and descendant remotes are unchanged.

AI assistance: documentation repair and validation by Codex continuation worker
codex-three-sum-continuation-t3-3dda8289. Existing independent mathematical/API
and checked-source review coverage is retained; outside review of the bounded
documentation delta is requested, with no new review agent commissioned.

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(imports): regenerate aggregate after Chan-He parameter integration

* fix(imports): regenerate aggregate after shared-encoder integration

* perf(wordram): reduce native parameter proof heartbeat budget

* chore(wordram): scope measured parameter proof budget to reduction task

* perf(schonhage): focus cell arithmetic and use the default heartbeat budget

* fix(doc): restore unrelated upstream coordination records

Restore the exact 231-line tail common to both integration parents after review caught an overbroad conflict-marker match. The intended 3SUM integration prose is retained; no Lean change. AI-assisted correction by OpenAI Codex.

* doc(order-glue): restore paper citation and finite scope

* fix(imports): regenerate thin-product aggregate after main integration

* doc(wordram): separate shared-encoder integration records

Keep the reviewed finite-matrix supplier records intact and record native-encoder scope and source credit separately, so squash-queue integration does not overlap the ancestor documentation hunks. Preserve code, tests, concrete bounds and the complete unrelated upstream-record suffix. Queue revisions are used only for read-only projection, never as parents.

* feat(wordram): prepare ExactTriangle instances from initialized input

Complete the native preparation milestone cslib-community#1532 above the original kernel
checkpoint. Fixed64 native code computes parameters, signed residues, actual
classes/query arrays/chunks and every record with raw n-by-D/D-by-n adjacency
matrices from the original input. Same-y State.init Runs plus charged halt,
exact finite readback/unique indices, full frames and derived fits are proved.
Source-regime cost is690n^2 Dg including halt. With size-bounded scalar headers
and A<=(n+2)^kappa, physical width is at most(kappa+18)clog2(n+2); every prefix's
words and address support lie below(n+2)^(kappa+19). No run/layout/time/solver
oracle. Prime selection, product/backend1581 and the full1394/1.9992 remain open.

Validation tree5a46782a1f51dee866e5c08f0c884f2bdf14a240 on reviewed encoder
parent6dbd0cc45f8cfba188c1a8211b8b8f15d78c59f6: all SIX strict gates passed
together, LEAN_NUM_THREADS=1 and cache downloads disabled during the sequence,
including Smoke/global Axioms; full citation/simp/heartbeat hygiene, actual-base
22-library/6-new-test lints,18 strict PR-body names and diff checks passed.
Source cases include signed tiny input, nonzero scratch/sentinels, shortchunks,
padding, insufficient-width faults, and a fully admitted n=D16,g1,p3 client.
The earlier interrupted cold-build checkpoint is not claimed as validation.

Nonauthoring native reviewer /root/et_preparation_review read the full own
layer at treea72db19345fa47bec57a62cea61d9c1b22b8a2c4, then approved the focused
final delta at5a46782a with no blockers/P2 findings. The ten executable-mode
nits were fixed; other final deltas are comments and exact already-reviewed
supplier parameter-budget metadata from1469@4b2d75ce, reduction tracked1583.
All program/public-statement/proof meanings unchanged by those deltas. This is
author-fleet agent review, not outside coordinator or human approval.

Quote and source mapping checked directly at Anthropic formal-math pin
16a5ce41304fcdaea4e0be7c132e1c361dc26da5, Sec3/Theorem17/Instances/
WriteMatrices.lean:15. Finite classes/chunks/lopInstance are reused. New native
instruction coefficients are original; source Light costs/full host not claimed.
Generic Width/Fits files are exact reviewed1537/1552 copies; other reviewed
native prerequisites retain their source credit. Selected abstracts/rendering
are unchanged; no new headline is promoted.

AI assistance: OpenAI Codex implemented, checked and documented this native
composition; separate nonauthoring agent reviewed correctness/API/source scope.

* doc(wordram): address native ET preparation review nits

Sort the1532 ROADMAP reference, add checked pinned-source links to Catalogue and Instances, and drop the unrelated Witnesses prose edit. No declaration, proof/program token, attribute or import changes. Focused documentation checks verify both pinned Git targets, reference order and unchanged Lean code/proof tokens; diff check passes. Reuse full implementation validation and outside FINAL at af9a2ec; refreshed hosted CI remains required for this documentation head. No curated abstract impact. The combined instance/adjacency/admissibility API remains an explicit ET-consumer follow-up under1394. AI assistance: OpenAI Codex.

* feat(ExactTriangle): connect prepared matrices to finite adjacency

Compose actual instance_readback with finite matrix adjacency and zero
padding. Prime-window membership derives the middle-width bound; piece
membership derives local coordinates. No native program or existing
public statement changes. This memory-to-graph composition is original.

A fully admitted signed asymmetric State.init client obtains Runs, halt
and four concrete cell assertions on the same final y. It discharges
all source, prime, fit, coordinate and padding premises using the
existing preparation endpoint. Source semantics remain raw zero/one.

All six strict gates passed together on tree5bf30c9b, including new
client/Smoke/globalAxioms, plus full citation/simp hygiene, actual-d094
changed-file lints (1 library/1 test), strict names and whole-base diff
checks. Separate nonauthoring /root/prepared_adjacency_review found no
mathematics/API blockers at that exact tree, reusing parent native
review; this is within-fleet agent review, not outside/human approval.

Optional parent1611 consumer follow-up under1394; native ET solving and
full1.9992 remain open. Curated abstracts unaffected. AI: Codex.

* doc(ExactTriangle): link prepared adjacency consumer

Resolve the optional discoverability nit in outside FINAL6493484920
atfc7d99ee: PreparationSpec now links its separate PreparationAdjacency
consumer extension. Five module-doc lines only; exact insertion and
comment-erased token/public-section/import identity checked. Root link
exists and line lengths pass. Targeted hygiene and full diff checked;
no new Lean example or semantic/abstract change. Implementation all-six
validation remains tree5bf30c9b; final hosted CI covers this doc head.
AI assistance: Codex.

* doc(wordram): fix prepared-adjacency documentation link

---------

Co-authored-by: Codex coordinator <codex@users.noreply.github.com>
Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
…ib-community#1625)

* feat(exactTriangle): relate lopsided queries and matrix products

Adapt the finite counting interface and signed digit expansion from anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5 for milestone #1438. This is a mathematical interface; native preprocessing, fast solvers and full composition remain under #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 #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 #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 e41e1dda62a10c8f89917e2ccab54fbbedad1ad4, 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(matrix): prove the tensor recursion and pruned evaluation core

* doc(matrix): clarify the overlapping contributing leaf

* doc(matrix): make tensor and pruning explanations standalone

* 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 #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 8e182b091199b323c7e6271acebbfcee2e4cdd18 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(matrix): prove finite thin-product correctness and sparse bounds

Implement the complete finite mathematical milestone of #1463 above #1464:
valid layouts, batch-product correctness/error exclusion, arbitrary-N tiling,
exact requested signed products, order/cardinality estimates, geometric tails
and the derived sparse bounds. At D=4^m, L=19m, D^18<=N and |W|*2^m<=N^2,
encoding entries are bounded by4*N^2/D^(1/18), contributing leaves by33
and passed-set cardinalities by(19m+1)*33 times that scale. Add finite
magnitude and auxiliary object-count bounds. None are native instruction costs.

All six final local gates pass: strict build, aggregate check, strict tests,
environment lint, style lint and init-import check. Hygiene --check-simp,
changed-file lints (14 library modules,1 new test) and diff --check pass.
Tests kernel-check signed results3,20,0,-8, true padding, empty/sparse and
negative-order boundaries, and instantiate all aggregate bounds with jointly
satisfiable m=1 parameters and symbolic matrices without resource overrides.

Read-only math/API review by /root/thin_product_review is clear after fixed
doc references/magnitude wording/quotation hygiene. Focused final delta review
by /root/thin_product_final_delta_review is clear for tree
b021e2d9340b433a9fdb129882351e158e8c289f, reusing the prior mathematics review.
These are internal agent reviews, not outside coordinator or human approval.

Source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
selective Section2 finite mathematics; Anthropic credit/NOTICE retained.
Abstract assessment: no impact on selected headlines, catalogue or rendering.
Full native tensor/sparse-product/Exact Triangle code, native Chan-He #1446,
whole input/time/width composition and improved1.9992 remain under #1394.

AI assistance: implementation and reviews with OpenAI Codex, worker session
codex-thin-product-math-20261028.

* 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 #1446; independent complete parameter subtask #1458.

* doc(matrix): explain finite thin-product guarantees in the Lean API

Restack #1463 above repaired #1464 without changing the reviewed mathematics.
Rewrite 149 documentation blocks in 14 modules as standalone descriptions;
replace operation-cost and word-size narratives with the exact entry, leaf,
passed-set and specified-value quantities proved. Preserve pinned Anthropic
credit, source locators, statements, definitions, proof bodies and imports.
An independent comparison with original ee288fb16 confirms that all code bytes
outside comments are identical, including code whitespace.

Validation of this final tree: all six gates pass together (strict build,
aggregate check, strict tests, environment lint, style lint, init imports).
Citation-aware full hygiene --check-simp, changed-file lints (14 library modules,
one test) and git diff --check pass. Lean MCP FiniteMagnitude diagnostics finish
without errors or warnings. Serial Smoke/Axioms warmups avoid the shared-host
memory failure previously seen when these import-heavy clients run together.

Tests and substantive math/API review evidence are retained from the original
reviewed tree b021e2d9340b433a9fdb129882351e158e8c289f in ee288fb16. This change
is documentation-only; /root/draft_thin_docs authored the scratch map and the
continuation worker inspected/applied it. That drafting is not independent review.
Earlier math reviews are inside-fleet agent reviews, not outside or human approval.
Outside coordinator review will be requested on the final PR. No selected abstract,
catalogue or rendering is affected.

PR publication remains held while native dependent restacks are repaired, per
root sequencing. #1394 remains open: native shared encodings/pruning/Exact Triangle,
Chan-He #1446, complete Convolution/ordinary input/time/width composition and the
improved Section4 route to exponent1.9992 are not supplied by these finite counts.
AI assistance: OpenAI Codex workers codex-thin-product-math-20261028,
codex-three-sum-continuation-t3-3dda8289 and /root/draft_thin_docs.

* fix(wordram): repair parameter proof hygiene and ceiling-log docs

* feat(wordram): implement shared tensor encodings

Complete the shared left/right encoder milestone #1493 above parent b4936ce28
(#1496). Fixed standard-WordRAM code with 32 registers computes every public
encodingL/encodingR leaf from actual initialized flat signed inputs. The native
bound is 240*(L+1)*10^L instructions plus halt, with explicit magnitude/address
inequalities, two alternating buffers, charged initialization/copying and the
complete outside frame. The full ordinary native 3SUM objective #1394 remains
open; this component supplies no sparse-query or Exact Triangle solver.

Validation of tree b598513f02cc064eaf50d3c680684c19289ffd71 against
b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
changed-file lints (13 library modules, one new test) and diff checks pass.
Tests execute both encoders at depths zero, one and two, compare all 100
depth-two leaves with the unchanged public encodings, preserve input/frame
sentinels, and cover adjacent word widths and all three copy block orders.
Kernel-checked concrete flat executions discharge every width/magnitude
premise. Selected abstracts, catalogue and rendering are unaffected.

AI assistance: OpenAI Codex implementation and self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Independent correctness/API review is pending;
this is not an approval or a claim that the complete 3SUM objective is done.

* test(wordram): connect encoder witnesses to charged runs

Connect the zero-depth and two-stage regression memory witnesses to the
actual prefix Runs already proved by runs_left, rather than discarding that
conjunct. Bound the prefixes by 240 and 72000 instructions and expose the
same executions' charged halt at n+1. All library code is unchanged from
ad3e09735a116f9868e87cf7ae6af59e5cb6a285 (tree b598513f02cc064eaf50d3c680684c19289ffd71).

Validation of tree 8277017f2c63a5851b63a5d4b49775a9fb96d62d against actual
parent b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
fresh changed-file lints (13 library modules, one test), strict PR-draft
declaration-name check and staged/unstaged diff checks pass.

Independent nonauthor agent review 8034f3da approved exact ad3e09735/tree
b598513f, covering full code/model/cost/width/source and ArrayCopy with no
blockers. It is inside-fleet review, not outside approval. This test-only
delta addresses its optional witness-connection finding; focused final
test/source-mapping review remains pending through the parent coordinator.
No selected abstract, catalogue or rendering impact. The full ordinary
native 3SUM objective #1394 remains open; this implements encoder issue #1493.

AI assistance: OpenAI Codex implementation/self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Publication remains on hold for focused
review; this commit is not approval or a whole-3SUM completion claim.

* feat(wordram): checkpoint native pruned-query controller proofs

Work in progress for #1526. Fixed native controller and initialized-input interpreter regressions, numerical child-set bridge, call-count potential, charged power/scan/clear/frame/arithmetic/return kernels. Individual current Lean modules have clean MCP diagnostics; the earlier strict targeted scan/count/value/test checkpoint passed. The complete global controller invariant, native evaluator theorem, actual initialized flat-run clients and sparse charged bound remain unfinished. No full six-gate or independent review claim; no PR submission. Full #1394 endpoint remains open. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* refactor(schonhage): reuse binomial bounds and sharpen signed tests

Address the bounded nonblocking review findings on #1496. Keep Nat.choose_le_exp_mul_div_pow unchanged while deriving it from Cslib.sum_choose_le_exp_one_mul_div_pow in the existing real binomial module; remove the redundant module and migrate its import. Preserve Anthropic, Samuel Schlesinger, OpenAI and Erik Demaine credit. Kernel-check an actual mixed inner/outer L2,m1 signed pruned result of -8, remove two signature-only tests and retain positive admitted-parameter checks. Paraphrase the identified source-derived sentence, shorten generic source boilerplate and record the generic naming follow-up. No public mathematical statement or definition changes meaning; no selected abstract or endpoint promotion. Final validation/source/review evidence is in PR #1496. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* feat(WordRAM): prepare and encode every shared matrix band

Implement the complete bounded #1523 native component under #1394. A fixed
96-register standard WordRAM program computes valid subset/inverse tables and
a deterministic existing Layout, prepares all padded signed row/column bands,
calls the unchanged #1520 encoders once per shared band, collects every leaf,
and restores the entire initialized input prefix and outside frame.

The State.init and flat Runs/Executes clients bind the actual output memory to
public encodingL/R in the unchanged leafIndex order (P0 digit 9). All powers,
mask/popcount/root/table loops, indices, guarded matrix addresses, initialization,
copying, encoder calls, loop controls and halt are charged. The generic bound is
4096*(L+1)*(1+N*4^m+2^L+2*numBands*10^L), plus halt; at L=19m and N>=(4^m)^18,
the full charged run is <=81920*(L+1)*N^2/(4^m)^(1/18).

Width assumptions are explicit original-parameter inequalities: the wordBudget
fits target w+2 and 7^L*A < 2^(w-1), w>0, A>=0. Actual signed kernels use at most
15/17 instructions for add/subtract, already included through the unchanged
encoder's real cost. No all-state fit, callback, solver, assumed run/cost or source
machine semantics is a hypothesis. Symbolic positive-depth thin native examples
and concrete signed/padded/frame/width-boundary executions establish nonvacuity.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Programs/Sec2/Theorem5/Encode/AllBands.lean:230-239,262-271
and BandArrayFacts.lean:107-113. Verified checkout files equal their pinned Git
blobs and all PR-draft quotations match those exact line slices. The source's
row/column encoding predicates map to runs' quantified original matrices, all
bands and all leaves on computed MaskTable.layout; Light limits/program maps,
callee contracts and source time hypotheses are replaced by actual native code
proofs, not imported. The block index is beta*K0+(side? h:g), and row is block*N0
plus the compressed outer offset. Shared tile pointers and retained table words
are exposed by tileInputBases/tile_input_values/table_word_layout.

Reuse unchanged WordRAM control/rename/copy/signed APIs, Layout/bandArray/encoding
mathematics and Mathlib finite index/sorted-set APIs. New mask scans, dense inverse
lookup, direct base-seven decoder and native execution/cost composition are
original. Small native-power/ordered-filter/positional-digit/row-major lemmas live
in narrow topic modules. Retain Anthropic, PBC source credit and NOTICE.

Validation: PASS all six strict gates (build --wfail --iofail, mk_all --check,
test --wfail --iofail, lint, lint-style, checkInitImports), serial Smoke/Axioms
warmups and the global Axioms audit; full citation-aware hygiene --check-simp,
fresh actual-base changed-file lints, strict PR-name and diff checks. Validated
with LEAN_NUM_THREADS=1 and cache downloads disabled. Windows static metadata
reads used PYTHONUTF8=1; no Lean/source change was needed. New Lean files use ordinary non-executable file modes. Exact payload tree
bdfc5a1a33f0d712b90f4fe4bc9d6c27e2d8318e. Targeted Lean MCP endpoint/tests and pinned quote identity also pass.
No PR has been opened;
independent exact-revision correctness/API/source-mapping review is pending.

Abstract assessment: no impact on selected abstracts, models or scope; no new
headline or PDFs. Pruned queries, products, solvers and whole ordinary 3SUM remain
open under #1394. Base #1520 remains unchanged at 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6.

AI assistance: Codex implementation/proofs, session codex-native-bandprep-t3-03b600bd,
under delegating-worker coordination. Existing unchanged encoder outside-review
evidence is PR1520#issuecomment-6477077023; final new-component review pending.

* feat(wordram): checkpoint native pruned accumulation and frame transitions

Work in progress for #1526, not a submitted component. Complete native parent accumulation loop (31N+3), internal sparse initialization (7N+8), computed child push (15), shared actual frame-word store, executable query-code inverse/requested-set bridge and recursive timestamp allowance. These current modules have clean targeted Lean MCP diagnostics; actual interpreter and kernel digit/request regressions pass. Changed-scope hygiene --check-simp and diff check pass. The general node/controller continuation proof, actual initialized full evaluator theorem and final sparse charged bound remain unfinished; no full six-gate or independent review claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289; full #1394 remains open.

Final current-tree checkpoint: strict build --wfail --iofail of Accumulate, Clear, Push, Frame, Powers, Leaf, Weight, Scan and SchonhagePruned tests passed together (3596 jobs); scope hygiene --check-simp and diff checks pass. This is a partial implementation checkpoint, not an all-six-validated PR or completed #1526 milestone.

* feat(wordram): checkpoint actual pruned-query root-frame stores

WIP #1526. Factor root scan setup and root finish; prove the actual eleven-instruction root-frame initialization and exact memory/register frame. Current Root MCP diagnostics clean. Full node/controller composition remains unfinished; no PR or full-six claim. AI-assisted continuation by codex-three-sum-continuation-t3-3dda8289.

* fix(nat): reuse existing tuple digit identity in band preparation

Address the sole P2 finding from the independent #1523 review of cb261f6b:
remove duplicate Nat.ofDigits_ofFn and publicly import the existing radix
module. The finite-function numbering bridge uses Nat.ofDigits_ofFn_eq_sum.
Its statement is unchanged. Existing radix declarations, proofs and source
credit are unchanged; no native program, endpoint statement or test changed.

Validation on exact final tree 4807cb971cf8030f70df67e5e8fa13947dcbd202:
PASS all six strict gates together (build --wfail --iofail, mk_all --check,
test --wfail --iofail including global Axioms, lint, lint-style,
checkInitImports), fresh actual-base changed-module lints (29 library/1 test),
full citation-aware hygiene --check-simp, strict draft-name and diff checks.
Serial LEAN_NUM_THREADS=1; optional cache downloads disabled. Lean MCP also
reports clean diagnostics for the changed bridge. Logs are in
.lake/codex-three-sum-continuation/band-review-six in the continuation checkout.

Original native implementation and all full correctness/API/source-mapping
review coverage retained. Review record:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6479696830
Original implementation/validation handoff:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6478943178
Focused final delta review pending before PR publication. No impact on selected
abstracts, models or scope; no new headline. Complete #1394 native 1.9992
endpoint remains open.

AI assistance: bounded reuse fix and validation by Codex session
codex-three-sum-continuation-t3-3dda8289. Original author credit remains on cb261f6b.

* feat(wordram): checkpoint complete native pruned-controller phases

Continue #1526 implementation under #1394; this is explicitly partial WIP,
not a complete component or PR submission. Full recursive node composition,
initialized input/flat clients, derived global fits and total-time theorem
remain open. No solver or all-state fit/execution/time certificate is assumed.

Check full root setup/scan/frame (20Q+19), report (9Q+3), leaf/return (24),
loaded leaf step (43), internal entry (7N+28), native nonempty child scan/push
(20N+42), empty-child scan/advance (20N+33), returned-child accumulation
(31N+29), and final return (26) against the actual standard fixed native Code.
KernelRegs describes only constant/pointer register values. Node footprints
preserve the ancestor rows. The zero-depth node matches existing Pruned.result
and the finite traceWeight; its continuation uses the existing ExecWithin.loop_iter.
No alternative machine or run semantics is introduced.

The reporting-body/controller names are definitionally identical Code trees.
ScanMemory.congr transports the existing representation across disjoint writes
and removes duplicate root proof plumbing; push exposes its four-store frame.

Validation: targeted Lean MCP diagnostics clean for every new/updated phase
and ComplexityTests/SchonhagePruned.lean. Native interpreter regressions retain
depths 0/1/2, both signs, repeated/empty/mixed queries and an outside sentinel.
New kernel examples discharge the general node/register/address/signed premises,
connect the same negative-product final memory to charged controller execution,
and prove an empty leaf preserves the prior value cell. Diff whitespace passes.
No aggregate/all-six validation claimed: root/native audit coordination hold
is respected. Exact partial checkpoint tree 7fa4da67ea861a2bba3a6c430cd7e40996d0e794.

Abstracts: no impact; no new headline or endpoint claim. Original 1.9992
objective and sparse-product/ET/final composition remain open under #1394.
AI assistance: Codex implementation/proofs by continuation worker
codex-three-sum-continuation-t3-3dda8289.

* doc(matrix): replace copied source prose with API descriptions

Resolve the documentation-only requested changes on #1464:
https://github.com/cslib-community/complexitylib/pull/1464#issuecomment-6477111132
Rewrite source-quotation fragments and related explanations in Alphabets,
Identity, Full and Pruned for the local Lean declarations. Preserve the
mathematical attribution, bibliography keys, source pin and copyright.

A comment-aware comparison with 4f3226cd proves every noncomment byte is
identical in all four files. No declaration, proof, definition, program,
import or test changes. Existing checked source-statement quotations and
notation/quantifier/model/resource mapping in the PR remain unchanged.
The final source-comment screen compares against quoted fragments in the
actual pinned Sec2 and Statements/PaperStatements files, including the
known local renames; no substantial quoted fragment remains unmarked.

Validation is recorded for this exact tree in PR #1464. Source checkpoint
tree 8c3b87bb870d4c4e2202917357d19a7a139296e8. No abstract/catalogue/model/scope
or rendering impact; no new headline. The full native 1.9992 endpoint remains
open under #1394. Ancestor and descendant remotes are unchanged.

AI assistance: documentation repair and validation by Codex continuation worker
codex-three-sum-continuation-t3-3dda8289. Existing independent mathematical/API
and checked-source review coverage is retained; outside review of the bounded
documentation delta is requested, with no new review agent commissioned.

* refactor(finset): use order-embedding names in OrderGlue

Finish bounded #1545 from exact #1536 head66036150a. Replace generic
level/inner/outer API vocabulary with order-embedding/subset/complement names.
Remove five redundant membership/range/congruence wrappers, using Mathlib's
orderEmbOfFin_mem/range_orderEmbOfFin and ordinary substitution directly.
Migrate every actual Levels/Batch proof client with no deprecated aliases.
Keep filter_glue's generic name and rename its predicate parameter to P.

The retained generic statement headers are identical after the documented
renaming and binder alpha-renaming. All 48 Levels and 13 Batch declaration
statements and all definition bodies remain unchanged. The entire native
Encoding module is token-identical after comment removal; every other native
library file is unchanged. Source credit and pin are retained. Thus existing
State.init, Signed.encode, width/frame/cost and encodingL/R meanings remain.

Put the sum/option-versus-flat-digit explanation at the actual leftDigits,
rightDigits and termDigits hover docs, preserving their enumeration bodies
and order (row-major P terms, P0 digit9). Update the UPSTREAM naming follow-up.
Add generic nonconsecutive signed/zero/Option reconstruction clients using
Mathlib's orderEmbOfFin_unique, plus the routed optional #1536 asymmetric
native L4,m1,N29 prefix tests. Those compute headers/count/tables/snapshot and
decode/read ranks1 and2 with K0=2, distinguishing quotient/remainder blocks
and signed values without a full10^4-leaf encoder run or native body edits.

Reuse unchanged outside coverage: PR1496#issuecomment-6477111644 atb4936ce28,
PR1496#issuecomment-6480746578 at68bbe40e3, and PR1536#issuecomment-6480852097
at66036150a12046b29986d8f108c0afaf49d01c61. These are agent reviews, not human
approval. No new cited mathematical result or machine model is introduced.

Validation: PASS build --wfail --iofail, mk_all --check, test --wfail --iofail,
lint, lint-style and checkInitImports, with serial Smoke/global Axioms warmups.
Full citation-aware hygiene --check-simp, fresh changed-file lints against
actual base66036150a, strict PR-name and diff checks, and source/native identity
checks PASS. One thread, no cache downloads, PYTHONUTF8=1 on Windows.
Targeted MCP checks, full hygiene --check-simp and source/native identity
checks pass. Final source tree: 0c21b608cc5ed234527c73a3853a26132f52da0d. No source/ancestor merges or restacks.
Abstract assessment: no impact; no selected theorem/model/meaning/scope or PDF
change. This is generic ergonomics/testing only; full #1394 remains open.

AI-assisted implementation by codex-native-bandprep-t3-03b600bd, under parent
continuation-worker coordination. No new review agent commissioned; ordinary
outside coordinator review is requested when the bounded PR is ready.

* feat(WordRAM): prove all-depth pruned controller execution

WIP checkpoint for #1526; no PR and no completed component claim. The actual fixed native controller now has a depth-inductive execution proof with original Pruned.result values, stored queries/frames, concrete spatial preservation, input-derived signed fits and traceWeight charged continuation. Root loop exit discharges the continuation.

All new library modules through Recursive.exec_ready have clean targeted Lean MCP diagnostics. New concrete entry/result client reports no diagnostics, but the complete existing test file is still elaborating its VM regression commands; no final test-pass or all-six claim. Initialization/root-list/report/flat State.init composition, global width/fit clients, full component validation and independent review remain open. Aggregate checks are held for the coordinated root validation slot.

GenericRAM/Signed/Fits.lean is the unchanged blob from independently owned PR #1552, commit f276db1174333d3e6253b93878be8b95c1fcc713; credit retained. No native program body changed in this checkpoint. All proofs and invariant definitions are original native work; existing mathematical pruning/encodings retain their source credit. No selected-abstract impact or whole-3SUM endpoint claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* style(WordRAM): normalize native proof file modes

* feat(wordram): complete initialized sparse pruned-query execution

Complete implementation candidate for #1526 above #1520 exact 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6. Full ordinary native 3SUM and the published 1.9992 endpoint remain open under #1394. No PR yet; fresh exact-revision independent correctness/API/source review is pending before publication.

One fixed standard native program: 96 registers, at most 4096 flat instructions including halt, no width reads. Complete State.init -> pre-halt Runs -> Executes uses the same answer memory. Every supplied query, including repeats and empty/zero-depth boundaries, equals existing Pruned.result; runs_bilinear specializes existing encoding contracts to bilinearProduct. exec_kernel computes its powers/layout and has a reusable pointer/epoch directory contract. All child lists, timestamp decisions, stack/control/index arithmetic, signed products/adds and reporting are actual charged code, proved by the all-depth exec_ready induction; its continuation is discharged by the actual root exit.

Full charge including halt <= 8192*(L+Q+1+(L+1)*card(leaves(requested qs))). Ordinary source envelope M=A+B+10^L*A*B and address budget H=256*(L+1)*10^L+32*Q+512 derive input fit and execution at every physical W >= clog_2(M+H+1)+3. This is logarithmic in explicit component budgets; global 3SUM composition is not claimed. Inputs: raw L,Q then two canonical signed arrays of length10^L and unsigned query codes, after the actual standard length cell0. Returned output pointer is unsigned. All input/outside memory is preserved on initialized runs. Code/ExecWithin/State.init/Runs/Executes, signed kernels, Heap/Block APIs, existing mathematical pruning/encodings and Mathlib digit/log APIs are reused; GenericRAM/Signed/Fits is the unchanged blob from #1552 f276db1174333d3e6253b93878be8b95c1fcc713, with credit retained.

Pinned source anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5. Checked Git-blob quotation locators: ThreeSumApsp/Sec2/Lemma10.lean:148-150 (Pruned_eq_restrictTo_sum) and:565-566 (Lemma10.total_size). Source Pruned -> existing Pruned.result; source restriction -> Finset.piecewise; source Leaves -> leaves; all natural depths and arbitrary integer arrays retained. Native indexing directly uses existing leafIndex(privateLeaf), first coordinate least significant, inner digit9. Child prefix/stride/division are proved against the finite childSet/sliceAt semantics. Native code/proofs and cost are original, not supplied by source Light semantics or its sorted-segment implementation. Full checked quotes and model/quantifier/layout/cost/reuse mapping are in the prepared UTF-8 PR draft. Copyright retained in source/NOTICE.

Validation on tree bd6e74cce28dbd16c90291b847dac1a311402510: all SIX strict gates pass together, LEAN_NUM_THREADS=1, downloads disabled: build --wfail --iofail; mk_all --check; test --wfail --iofail (including Smoke/global Axioms); lint; lint-style; checkInitImports. Full citation-aware hygiene --check-simp; actual-base47-library/3-test changed-file and local lints; strict PR declaration-name audit; staged/unstaged diff checks pass. Register alias docs fixed the first lint finding; all native definition bytes are unchanged by that fix. Tests discharge real State.init positive/negative/empty/depth-two mixed/shared/repeated queries, sufficient-width family and failing fit boundary; callable signed wildcard with nonzero epoch and preserved input/outside sentinel also checks. No sorry, custom axiom or native_decide introduced.

Selected abstracts/catalogue/rendering: no impact, no new headline. ROADMAP/UPSTREAM preserve the open sparse-product/ET and global1.9992 gaps. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289 (OpenAI Codex); original finite source credit to Anthropic, PBC.

* feat(wordram): checkpoint computed wanted-query routing

Partial implementation of #1561 by codex-three-sum-continuation-t3-3dda8289.

Implements actual fixed standard 96-register routing/grouping code with computed valid-mask tables, tile counts, prefix offsets and stable scatter. General checked proofs cover the digit kernel (15L+10), one-query routing (15L+25), exact outStrOfPos/queryIndex mapping, computed header/count/relocated-table initialization (16L+(12L+33)*2^L+83), input-memory frame and original-input-derived fits. Generic finite stable-counting positions are injective and bijective.

Targeted Lean MCP diagnostics clean for all nine new library modules and the regression suite. Actual initialized interpreter regressions pass for empty input, zero depth, duplicates and an asymmetric K0=2 three-band case; no encoded leaf array is materialized in routing tests. The 96-register program computes every routing/count/prefix/scatter decision.

INCOMPLETE: general native counting, prefix and scatter execution invariants, initialized flat complete-run/width/frame/bound clients, final static hygiene and ALL SIX gates remain pending. This checkpoint is not a PR or acceptance claim. Mutable global audit slot remains with parent; no aggregate performed here. Full #1394 native sparse/ET solver and ordinary 1.9992 endpoint remain open.

The child branch merges unchanged #1554 at 12abeee84 onto frozen #1562 base 0c2e0ebea. The local merge 60bec64398 only reconciled shared credit/roadmap/upstream prose; no ancestor branch was edited. Original implementation mathematics/code by Erik Demaine with AI assistance. Existing finite Schonhage and band/encoder/pruned interfaces are reused with their original credit retained.

* feat(wordram): checkpoint wanted count-pass proofs

Continuation of #1561 from 06b3563e7. CountStep has clean targeted Lean MCP diagnostics, including exact 14-instruction native count update and memory frame. Dense zeroing and count-loop composition are implemented; Count.lean has one pending elementary nonnegativity/address-bound proof at line 152. This is an explicitly incomplete source checkpoint, not all-six validated or a PR. Work is paused solely to prioritize the bounded outside-requested #1562 repair. No program/public statement in #1562 changed.

* doc(finset): restore ordered-gluing source credit

Restore the original AlmanWilliams2026 Section 2 citation and finite-scope sentence removed by the naming refactor. No Lean declarations or proof tokens change.

AI-assisted coordinator fix by coordinator-codex-queue-20261028-ready-c. Original implementation and source authorship retained; independent delta review and new hosted CI requested on PR #1554.

* fix(wordram): address pruned-query review findings

Bounded documentation/test repair for #1562 / #1526 by codex-three-sum-continuation-t3-3dda8289, above exact 0c2e0ebea6199ac1fbe9b2e048ce24b9410f8d1a.

Fix both ROADMAP reference definitions, distinguish client contracts from exported internal stage APIs, and document why the narrow ArrayAppend/InputArray topics avoid Allocation interface/dependency fanout. Extend existing post-integration issue #1553 with the exact pruned power register map, 4L+10 accounting, affected consumers, fused-encoder accounting and sibling integration order; no power program or ancestor is changed.

Add one fully admitted signed runs_bilinear client: depth0, original arrays -3 and 2, actual encodingL/R premises discharged, original-input magnitude/address fits discharged, physical width10, same actual State.init prefix Runs and charged halt, and output memory at address6 equals Signed.encode(-6). Targeted Lean MCP diagnostics pass.

Validation: all six strict gates passed together on final staged tree f4cfd4ae0d838c4b4bf4c43c924f400744450957, including Smoke/global Axioms; one thread/downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base 47-library/3-test module lint, changed-file audits, strict declaration-name check and staged/unstaged diff checks pass. Local machine-readable evidence: .lake/codex-three-sum-continuation/pruned-review-repair/{summary.json,static-summary.json,identity.json,*.log}.

Source identity audit against 0c: all seven changed library files have identical comment-free tokens. Every public library statement, definition, native program and proof is unchanged. Every existing test byte is unchanged except the single inserted concrete client. Abstract/catalogue/rendering assessment: no impact.

The prior inside-fleet technical review at issue1526#6484055995 and outside FINAL at PR1562#6484177608 cover unchanged native semantics/source mapping. Fresh focused outside review of this repair is requested; no new review agent was commissioned, and no outside/human/platform approval is claimed. All original Anthropic, PBC credit retained. AI-assisted implementation by OpenAI Codex.

#1561 source is preserved separately at 7772a3497017078b37d1e04004225fae28baddad with its pending native grouping proof work explicit. Concrete sparse-product/Exact Triangle programs, full input/time/width composition and the original native 1.9992 endpoint remain open under #1394.

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(imports): regenerate aggregate after Chan-He parameter integration

* feat(wordram): route and group wanted thin-product queries

Implement #1561's complete native routing/grouping component. State.init prepends
the native length cell to [L,m,N,Q] followed by raw coordinate pairs.
Actual finite unsigned standard Code computes tables, tile keys, codes, counts,
prefix offsets and stable scatter. No layout/run/time/permutation certificate
is supplied. Fixed 96 registers, <=4096 flat slots including halt, no width reads.

Wanted.runs_grouped proves actual State.init prefix Runs and charged halt at the
same final memory, exact per-occurrence code/original-position equations, exact
wantedStrings tile spans, in-array span/code bounds, permutation, terminal Q,
input/outside frame and final boundedness. All admitted physical widths are
covered by the positive clog2(wordBudget+1)+1 threshold, with original input fit
derived. All initialized reachable prefixes are bounded. Complete native charge
including halt <=128*(L+1)*(Q+numBands^2+2^L+1). No 10^L scan per query/tile.

Validation: final tree 6c8164db02df348a46ffe0cf5972415977c62939. All SIX strict gates passed
together: build --wfail --iofail; mk_all --check; test --wfail --iofail (including
Smoke/global Axioms); lint; lint-style; checkInitImports. One Lean thread, cache
downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base
57-library/3-test lints, changed-file/name/staged+unstaged diff checks all pass.
The initial test-only module-boundary VM evaluation failure was fixed by using
the existing non-module native-test convention; every interpreter check remains.
The corrected frozen tree passed the complete six-gate sequence again.

Base: #1562 ce77926c393ce34e7962759bb412172c4584a67c. Preserve normal merges.
Unchanged sibling prerequisite #1554/#1536 is retained at exact
702c14bcf9896655b17c9b2dd5e02e6f270c9966: all 33 library and two test blobs are
byte-identical. Wanted contributes 24 library modules and one test. Existing
unchanged sibling reviews are reusable; no ancestor branch or remote was edited.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Sec2/Theorem5.lean:44-46, checked against its Git blob:
"outStrOfPos lay I J ∈ wantedStrings lay W (bandOf L m I) (bandOf L m J)".
Tiling/Definitions.lean:128-131 defines that filter/image set; reuse it unchanged
with W=qs.toFinset and separately preserve original list occurrences. Source
Programs/Sec2/Theorem5/Wanted/Codes.lean:13-19 motivates routing. Actual native
code uses the existing least-significant-first queryIndex/leafIndex dictionary,
digit9 for the inner wildcard and 3*row+col otherwise. It proves agreement rather
than identifying the Light program's separate numbering, semantics or costs.
Native code/proofs/stable-scatter theory are original; primitive counts reuse
Mathlib Nat.count directly, with zero/successor/bound/monotonicity APIs and the
existing count_eq_card_filter_range identity. Redundant count/offset wrappers
and their repeated elementary lemmas are removed. Every client is migrated;
Program.lean and PackProgram.lean are byte-identical to checked checkpoint
2e2cc39675a30b024c3932bd23f06163a33c8925. Imported finite source credit is
retained. All three source slices equal the pinned Git blobs.

Fully admitted kernel clients cover empty/zero depth, repeated pairs, and the
L4/m1/N110/K0=2 asymmetric family, tying answers to actual Runs/halt. Actual VM
regressions cover all expected grouped words, original indices, offsets and
input/outside frame. Fitting and failing physical-width premises are checked.
No sorry, custom axiom or native_decide. No curated abstract/catalogue/PDF impact.

Shared-band calls, actual buffer/header adaptation, pruned-kernel invocation,
answer reconstruction, sparse-product/Exact Triangle and full native ordinary
3SUM composition/1.9992 remain open under #1394. This is a component milestone.
Fresh nonauthoring correctness/API/source review is pending (root arranges);
outside review remains required. No PR, integration or approval claim.

AI-assisted implementation: OpenAI Codex, session
codex-three-sum-continuation-t3-3dda8289. Author/source credit is preserved.

* fix(imports): regenerate aggregate after shared-encoder integration

* perf(wordram): reduce native parameter proof heartbeat budget

* chore(wordram): scope measured parameter proof budget to reduction task

* perf(schonhage): focus cell arithmetic and use the default heartbeat budget

* fix(doc): restore unrelated upstream coordination records

Restore the exact 231-line tail common to both integration parents after review caught an overbroad conflict-marker match. The intended 3SUM integration prose is retained; no Lean change. AI-assisted correction by OpenAI Codex.

* fix(imports): regenerate band-preparation aggregate from merged inventory

* doc(order-glue): preserve reviewed source credit through supplier merge

* doc(order-glue): restore paper citation and finite scope

* feat(wordram): checkpoint native queried-product construction (#1581)

Unfinished implementation above exact a6e4005b2 on the existing isolated child branch.
The fixed native program computes both producers, protected layouts/copies, tile ABI,
one shared timestamp directory, actual pruned calls and original-order reconstruction.
Targeted Lean MCP checks pass for the new native program and supporting original-input,
parameter/layout, copy/frame, grouping-span, raw-conversion, producer and directory proofs.
Five actual initialized interpreter regressions pass: empty, signed/duplicate, raw01,
multiple tiles/padding/epochs, and nonempty inner tensor coordinates.

This is a recovery checkpoint, not a complete native product result or PR candidate.
Full tile/epoch loop and reconstruction correctness, initialized composition, complete
charged cost and logarithmic-width/saving results remain open under #1581/#1394.
All six/global/static validation remains held for root; no aggregate or static audit ran.
Existing curated abstract statements and scope are unaffected; no headline promotion.
Implemented personally by codex-three-sum-continuation-t3-3dda8289 with AI assistance.

* fix(imports): regenerate thin-product aggregate after main integration

* doc(wordram): separate shared-encoder integration records

Keep the reviewed finite-matrix supplier records intact and record native-encoder scope and source credit separately, so squash-queue integration does not overlap the ancestor documentation hunks. Preserve code, tests, concrete bounds and the complete unrelated upstream-record suffix. Queue revisions are used only for read-only projection, never as parents.

* doc(matrix): keep progress links out of shared reference append block

* feat(wordram): checkpoint complete queried-product source before supplier merge (#1581)

Local recovery checkpoint only. Complete native queried-product execution, initialized
clients, quantitative thin saving and logarithmic width have clean targeted Lean MCP
diagnostics. Import generation adds the 29 new modules. No all-six/static validation or
independent candidate review is claimed by this checkpoint; it is not a PR candidate.

The actual #1576 supplier advanced from a6e4005b to integration91f485ec. Preserve this
source before a normal child merge, reconcile only shared docs/imports, regenerate the
aggregate, then validate the final source together against the actual supplier.

Original native implementation by Erik Demaine with Codex assistance, reusing credited
finite Anthropic Section 2 mathematics and actual native producer/router/pruned kernels.
Ordinary-3SUM/Exact Triangle and the full #1394 1.9992 endpoint remain open.

* feat(wordram): execute queried thin-matrix products (#1581)

Complete #1581 implementation candidate under #1394, awaiting required fresh exact-head
non-authoring correctness/API/source/resource review. No PR is opened or integration
approval claimed. Normal child history preserves source checkpoint af208636b and actual
reviewed #1576 supplier91f485ec; no ancestor branch or remote was edited.

One actual fixed standard unsigned WordRAM program per signed/raw input mode consumes
original headers [L,m,N,Q], both row-major integer matrices X:N x 4^m and Y:4^m x N, and
raw interleaved requested coordinates. It computes tables/layout, shared encodings,
Wanted counts/prefix/stable scatter, tile pointers, decoded queries, directory/epochs,
pruned evaluation and original-order reconstruction. Raw nonnegative entries are doubled
by actual charged load/multiply/store instructions (including raw0/1 -> signed0/2).
There is no source Light machine, assumed layout, sorting, solver, run or time oracle.

QueriedProduct.exec/runs/runs_wide prove actual native execution from original words /
State.init, same-y prefix Runs and charged halt, every original occurrence's exact
Signed.encode((X*Y)[qs[i]]) including duplicates, original-input restoration and the
complete outside frame. Generic execution assumes m<=L, original absolute entry bound A,
raw nonnegativity in raw mode, and the explicit original numerical magnitude/address
admission; it has NO query-sparsity hypothesis. The real pointer/epoch kernel uses a
directory initialized once, with scratch/frame separation and propagated fresh bounded
epochs. Code has 160 registers, <=32768 flat instructions including halt, no width reads,
and is independent of dimensions, magnitudes, query counts and physical widths.

Thin hypotheses: L=19m, D=4^m, N>=D^18. With distinct-set sparsity
|qs.toFinset|*2^m<=N^2, complete charge including halt is <=
65536*(19m+1)*(65*N^2/D^(1/18)+Q). With the stronger occurrence hypothesis
Q*2^m<=N^2 it is <=4325376*(19m+1)*N^2/D^(1/18). Multiplicity/output work is never
replaced by set cardinality. runs_thin holds at EVERY physical W>=
128*clog_2(N+Q+A+2), deriving InputFits and all intermediate admissions. Its explicit
magnitude/address envelope is <=2^40*(N+Q+A+2)^10, allocation <=128*(N+Q+A+2)^4.
Physical all-prefix boundedness is proved; a separate source-polynomial prefix bound at
arbitrarily larger widths is not extracted here. ET record/input adaptation and all its
copies/calls, Exact Triangle solving, ordinary3SUM composition and improved Section4 /
1.9992 remain open. This component proves neither full3SUM exponent.

Source mapping checked against actual Git blobs at anthropics/formal-math
16a5ce41304fcdaea4e0be7c132e1c361dc26da5, under3sum-apsp/ThreeSumApsp:
- Sec2/Theorem5.lean:61-67 concludes the pruned band value equals (X*Y) I J.
  Existing finite thin_product_spec/MaskTable.layout/bandArrayL/R/encodingL/R and
  wantedStrings are reused; W=qs.toFinset, with a separate occurrence permutation.
- Sec2/Theorem5.lean:146-149, paraphrase of its conclusion:
  ((sum T in tiles (19*m) m N, |Leaves(wantedStrings lay W T.1 T.2)|):Real)
    <=33*(D m)^(-(1/18):Real)*N^2.
  Source hypotheses N>=D^18 and W.card*2^m<=N^2 are retained. Existing encoding,
  tile/leaf/passed-set estimates bound ACTUAL native execution, not an assumed cost.
- Programs/Sec2/Theorem5/Pruned/AllTiles.lean:86-92 and Wanted/Report.lean:30-37
  are the per-tile/report specification references; Solver.lean:150-161 is conditional
  on Light callees. Native code here is original, accepts stable unsorted duplicates,
  charges empty tile calls and proves all native callees directly. Instruction constants,
  widths, protected layout and frames are independently proved for the native model.
The UTF-8 PR mapping draft contains two exact Lean quotation slices, both checked against
Sec2/Theorem5 at that pin; all four cited source files equal their pinned Git blobs.
Anthropic, PBC's existing mathematical source credit is preserved. New native programs
and execution/resource proofs are original work by Erik Demaine with Codex assistance.

FINAL VALIDATION (whole source tree, not only this commit's proof/doc delta):
Tree 555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; four compiler threads; cache downloads disabled.
1. lake --no-cache build --wfail --iofail : PASS (13.56s).
2. lake --no-cache exe mk_all --check : PASS (11.33s).
3. lake --no-cache test --wfail --iofail : PASS (27.14s).
4. lake --no-cache lint : PASS (43.22s).
5. lake --no-cache exe lint-style : PASS (17.09s).
6. lake --no-cache exe checkInitImports : PASS (16.8s).
Strict tests cover new initialized/product clients, Smoke and global Axioms.
Full citation-aware hygiene --check-simp, fresh actual-base30-library/one-test lints,
changed-file checks, 25-name strict final-body audit and staged/unstaged diff checks PASS.
Actual comparison base: 91f485ec38ca6b878f338e2cdbdedbf5d4f20257.
3533 inherited source/abstract files checked; only the existing tile-key lemma is exposed
with the same statement/proof. All35 inherited sibling blobs equal actual parent91.
All native code bodies/register definitions are byte-identical to af208636b;
comment-erased Program tokens match. Current full Program source SHA256:
2b86fe04f6afa49a7eadc75292559dca62f4d65c5f7bdaf3b1f4386994aa8ebc
Public Header.exec_layout statement is identical; proof split passes at DEFAULT
heartbeats, without a new allowlist entry. Final register docs clear the initial lint
failure (47 undocumented aliases); prior incomplete/failed checkpoint logs are retained.
Checked PR/source mapping draft SHA256: be43f587d5c0ac6dd871093d5d19c283ef7dd9732b5c5d3cfa77b24e42899a24
Local reproducible records: .lake/codex-three-sum-continuation/queried-product/
summary.json, static-summary.json, source-native-identity.json, source-mapping.json,
run-identity.py, final-body-names.log and per-gate logs. This commit description is the
durable evidence until a PR exists; issue1581 links it.

Examples discharge real width/magnitude premises and connect the same final y to prefix
Runs, halt and memory: signed/raw, duplicate, padded/multiple-tile, positive/zero depth,
empty inputs, nonzero original header, adjacent sentinel, strict budget boundary and
nonempty symbolic admitted thin family at every inner depth.

Abstract assessment: no selected statement/definition/scope/catalogue/rendering impact.
ROADMAP/UPSTREAM preserve remaining1394 scope; no headline promotion.

Fresh review of all NEW native semantics/cost/width/frame/init/API/source mapping remains
pending root arrangement. Unchanged prerequisite outside coverage can be reused after
the recorded identities (1576 outside FINAL6487515809). No child watch/approval/merge.

* style(Schonhage): remove trailing space in queried products

Independent nonauthoring /root/queried_product_review examined the complete
native #1581 layer at ff31104be7acf96798c13b38cb079c58605a1ec3 against
91f485ec38ca6b878f338e2cdbdedbf5d4f20257, including all 29 new library
modules, actual execution/frame/width/cost, multiplicities, source mapping
and initialized clients. No correctness/API/source/resource blockers; this
is agent review within the root fleet, not outside or human approval.

The single P3 finding was a trailing space in Product/Groups.lean:111.
This coordinator correction removes exactly that ASCII space. An exact
byte check and git diff -w verify no other change. Full base-to-head
diff --check now passes, covering committed changes as well.

All six gates and static/source checks pass on reviewed tree555b6b52,
as recorded in ff31104. The whitespace delta is validated separately;
final hosted CI and outside coordinator review remain required.
Curated abstracts unaffected. AI assistance: Codex.

* doc(Schonhage): retain band catalogue encoding contract

Restore the one supplier sentence in UPSTREAM.md about unchanged leaf ordering and
canonical signed words, addressing optional nit1 in outside FINAL6493515098 on PR1615.
All other paragraphs are preserved. Exact byte comparison against9a57e134 verifies
this one sentence is the entire tracked delta; all Lean/native/math/API/abstract
source and every other tracked byte are unchanged.

Documentation-only validation: consistency with the existing catalogue interfaces,
full base-to-head diff --check, citation/simp hygiene and strict25-name final PR-body
audit pass. No Lean, import, aggregate or full rebuild was run for prose. Original
all-six evidence remains for tree555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; this does
not claim a new-head all-six run. No changed abstract meaning or rendering.

Full nonauthoring native/source review and outside FINAL coverage are reused across
this bounded doc delta. A focused outside DOC delta check is requested, not another
full review. Register naming remains a separately coordinated follow-up; existing
nonzero interpreter coverage was accepted, so no test change is included.

AI assistance: Codex implemented the requested one-sentence documentation repair.

* fix(imports): regenerate wanted-routing aggregate from actual inventory

* wip(wordram): checkpoint callable thin-product source

Personal #1618 source checkpoint before integrating the refreshed #1615 parent. Complete generic native memory-window compiler, computed-modulus callable raw01 product, initialized Runs/halt, width/window/cost and dirty-memory/frame tests have targeted Lean MCP diagnostics clear. Canonical imports and final all-six/static validation remain pending; this is not a publication candidate. Reuses the exact landed NatClog module from a1d1fa882, with original credit. No full Exact Triangle or ordinary3SUM endpoint claim.

* feat(WordRAM): run queried thin products in caller-owned memory

Implements the bounded callable prerequisite #1618 under #1394. Owner/session:
codex-three-sum-continuation-t3-3dda8289, personally on
work/three-sum-native-callable-product-20261029. Ordinary parent merge904c62068
preserves the reviewed #1615 a8cb7c984cd77e7eb150522e1353a2da22c84839 source.

Generic MemoryWindow.compile adds actual add/load/remainder and add/store
instructions, retaining ordinary Code/Exec/ExecWithin/Runs semantics. Proved
bounded native-source execution transfers within3x charged instructions/code
size, with3 additional registers and a full outside-window frame. The clipped
memory view is a value relation, not another run semantics or an algorithm oracle.

Concrete raw01 CallableProduct derives the actual source execution from original
matrices/request occurrences. Native NatClog/Power compute the source modulus;
fixed register normalization, translated producer/query execution and two exact
input/output span-normalization loops are all charged. Fixed163 registers,
<=131072 flat slots including halt, no physical-width reads. Actual initialized
prefix Runs and halt refer to the same final data and exact requested products.
Local input is restored and caller memory outside[b,b+M) is preserved.

Thin admission is explicitly D=4^m,L=19m,D^18<=N, with raw zero/one matrices.
M=2^(128*clog2(N+Q+3)) <= (2*(N+Q+3))^128. No whole-window or catalogue clear/copy.
Every W>=256*clog2(b+N+Q+P+5) suffices. For arbitrary dirty callers P bounds EVERY
initial register/memory word, including physical loads before remainder. For the
initialized client scratch is zero and P only bounds the protected caller prefix.
All-prefix assertions are physical word fits, not an independent-of-W polynomial
intermediate-word theorem. The explicit window reservation is polynomial.

Including base loading/halt: charge <=3*(originalT+1)+2048*(N*D+Q+1).
Distinct-set sparsity retains+Q; occurrence sparsity Q*2^m<=N^2 gives
17301504*(19m+1)*N^2/D^(1/18). Neither sparsity premise is needed for execution.
The ET-record adapter, fast ET/backend/witness composition and full ordinary3SUM
1.9992 remain open. Root retains parameters/prime selection/outer ET host.

FINAL VALIDATION: tree f8ff0209469bb668837b9602fb71ecf3aaf3bc99.
All SIX together PASS, four compiler threads, cache downloads disabled:
lake --no-cache build --wfail --iofail (22.27s)
lake --no-cache exe mk_all --check (13.75s)
lake --no-cache test --wfail --iofail (183.59s), including Smoke/global Axioms
lake --no-cache lint (45.02s)
lake --no-cache exe lint-style (22.14s)
lake --no-cache exe checkInitImports (16.56s).

Final full hygiene --check-simp, actual-base12-library/two-test lints,
changed-file checks, strict14-name PR draft audit, COMPLETE a8-to-final diff
--check, staged and unstaged diff checks all PASS. Canonical imports generated;
all new tracked file modes100644. No sorry/custom axiom/native_decide or new
heartbeat override. Only justified finite syntax-check recursion-depth options.

Source audit: all3686 inherited source/abstract files and modes unchanged from
actual reviewed parenta8. Original Product, Wanted/Pruned/Band/encoding, NatClog
and Power suppliers remain unchanged. New MemoryWindow and Callable/Program files
are byte-identical to source checkpoint7cb7ade0a. ArrayNormalize native bodies and
theorem statements are identical; the only API metadata fix replaces blanket
exposure with explicit exposure of its two code definitions. All affected clients
check with the public pure-specification lemmas. The deliberately interrupted e8
checkpoint is NOT used as an all-six claim. One overlapping MCP dependency setup
had a transient Windows artifact lock; serial retries and final six are clean.

Kernel clients tie actual initialized Runs/halt to exact physical output and
caller sentinels. Native VM cases cover nonzero/zero products, duplicate/empty
queries and dirty workspace above the source modulus. A direct compiler client
loads27%8=3, increments/stores4 and preserves both adjacent sentinels. Concrete
numerical width budget passes387/fails386; zero N fails the explicit thin premise.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Sec2/Theorem5.lean61-67 (exact products),146-149 (sparse leaves).
Local file equals the pinned Git blob; conclusion fragments checked verbatim.
Finite mathematics/source credit is inherited. Compiler/controller/proofs here
are original native work, not a source-Light semantics/count transfer.

Abstract assessment: no own selected statements, models, catalogue or rendering
change. No whole3SUM headline promotion. ROADMAP/UPSTREAM retain the #1394 gap.

PUBLICATION LIMIT: #1615 landed DURING this audit via ee1ab6f08ac77b1404d19c0371b0b0ac7daaa915
(reviewed carrier7da96e65cf2c352d08142bb5a7ea65098008d8cc); main now includes later
native/frontend additions. The five direct machine/arithmetic prerequisites and
entire Schonhage supplier remain byte-identical. This exact validated candidate
is preserved on its reviewed a8 parent for coordinator-directed current-main
compatibility work before publication. No parent remote is changed.

Fresh exact-whole-layer NONAUTHORING compiler/callee/API/resource review is still
required and is owned by root. Existing supplier reviews do not approve the new
compiler. No new PR, outside approval, merge or endpoint completion is claimed.

Local reproducible records: .lake/codex-three-sum-continuation/callable-product/
summary.json,static-summary.json,source-identity.json,source-mapping.json,
pr-body.md,audit-source.py and logs. Durable evidence is this commit description;
the issue handoff links it. AI assistance: Codex implementation/self-review with
Lean MCP; fresh nonauthoring and outside reviews remain pending.

* refactor(WordRAM): align ArrayNormalize module name and admission prose

Address optional review nits on PR1625 at fd1f2fce. Rename Normalize.lean to ArrayNormalize.lean with identical file bytes, migrate every consumer and the sorted canonical aggregate without a compatibility shim, say widths at least the threshold, and record that full VM cases use m0/N1 while general execution/resource proofs cover all valid geometry. Existing review6497681504 is already linked; the missing-record observation was a timing snapshot.

Validation: serial targeted Lean MCP ArrayNormalize, WordRAMMemoryWindow and SchonhageCallable all clean. Exact moved-blob identity and comment-erased Lean token identity modulo module-import migration pass; public declaration statements/bodies/attributes and native program meaning are unchanged. Canonical source import order and removal of every old path verified. Full citation/simp hygiene, targeted repository doc-name/new-test checks (12 modules/2 tests), strict14 PR-body names and complete d010-to-final/staged/unstaged diff checks pass. No aggregate/import-generation/all-six run for this bounded delta. Original f5/f8 all-six and final fd1 hosted all-checks green run40879707895 remain scoped to those revisions; repaired head requires refreshed hosted CI before integration. Full compiler/source reviews reused; focused module/import/doc/test-comment delta review requested after push. No abstract/model/resource change or endpoint claim. Evidence .lake/codex-three-sum-continuation/callable-product/review-rename.

AI assistance: Codex implemented the mechanical API/documentation repair; no self-approval, human approval or new full review is claimed.

---------

Co-authored-by: Samuel Schlesinger <SamuelSchlesinger@users.noreply.github.com>
Co-authored-by: Codex coordinator <codex@users.noreply.github.com>
Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 29, 2026
…ds (cslib-community#1637)

* feat(exactTriangle): relate lopsided queries and matrix products

Adapt the finite counting interface and signed digit expansion from anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5 for milestone #1438. This is a mathematical interface; native preprocessing, fast solvers and full composition remain under #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 #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 #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 e41e1dda62a10c8f89917e2ccab54fbbedad1ad4, 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(matrix): prove the tensor recursion and pruned evaluation core

* doc(matrix): clarify the overlapping contributing leaf

* doc(matrix): make tensor and pruning explanations standalone

* 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 #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 8e182b091199b323c7e6271acebbfcee2e4cdd18 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(matrix): prove finite thin-product correctness and sparse bounds

Implement the complete finite mathematical milestone of #1463 above #1464:
valid layouts, batch-product correctness/error exclusion, arbitrary-N tiling,
exact requested signed products, order/cardinality estimates, geometric tails
and the derived sparse bounds. At D=4^m, L=19m, D^18<=N and |W|*2^m<=N^2,
encoding entries are bounded by4*N^2/D^(1/18), contributing leaves by33
and passed-set cardinalities by(19m+1)*33 times that scale. Add finite
magnitude and auxiliary object-count bounds. None are native instruction costs.

All six final local gates pass: strict build, aggregate check, strict tests,
environment lint, style lint and init-import check. Hygiene --check-simp,
changed-file lints (14 library modules,1 new test) and diff --check pass.
Tests kernel-check signed results3,20,0,-8, true padding, empty/sparse and
negative-order boundaries, and instantiate all aggregate bounds with jointly
satisfiable m=1 parameters and symbolic matrices without resource overrides.

Read-only math/API review by /root/thin_product_review is clear after fixed
doc references/magnitude wording/quotation hygiene. Focused final delta review
by /root/thin_product_final_delta_review is clear for tree
b021e2d9340b433a9fdb129882351e158e8c289f, reusing the prior mathematics review.
These are internal agent reviews, not outside coordinator or human approval.

Source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
selective Section2 finite mathematics; Anthropic credit/NOTICE retained.
Abstract assessment: no impact on selected headlines, catalogue or rendering.
Full native tensor/sparse-product/Exact Triangle code, native Chan-He #1446,
whole input/time/width composition and improved1.9992 remain under #1394.

AI assistance: implementation and reviews with OpenAI Codex, worker session
codex-thin-product-math-20261028.

* 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 #1446; independent complete parameter subtask #1458.

* doc(matrix): explain finite thin-product guarantees in the Lean API

Restack #1463 above repaired #1464 without changing the reviewed mathematics.
Rewrite 149 documentation blocks in 14 modules as standalone descriptions;
replace operation-cost and word-size narratives with the exact entry, leaf,
passed-set and specified-value quantities proved. Preserve pinned Anthropic
credit, source locators, statements, definitions, proof bodies and imports.
An independent comparison with original ee288fb16 confirms that all code bytes
outside comments are identical, including code whitespace.

Validation of this final tree: all six gates pass together (strict build,
aggregate check, strict tests, environment lint, style lint, init imports).
Citation-aware full hygiene --check-simp, changed-file lints (14 library modules,
one test) and git diff --check pass. Lean MCP FiniteMagnitude diagnostics finish
without errors or warnings. Serial Smoke/Axioms warmups avoid the shared-host
memory failure previously seen when these import-heavy clients run together.

Tests and substantive math/API review evidence are retained from the original
reviewed tree b021e2d9340b433a9fdb129882351e158e8c289f in ee288fb16. This change
is documentation-only; /root/draft_thin_docs authored the scratch map and the
continuation worker inspected/applied it. That drafting is not independent review.
Earlier math reviews are inside-fleet agent reviews, not outside or human approval.
Outside coordinator review will be requested on the final PR. No selected abstract,
catalogue or rendering is affected.

PR publication remains held while native dependent restacks are repaired, per
root sequencing. #1394 remains open: native shared encodings/pruning/Exact Triangle,
Chan-He #1446, complete Convolution/ordinary input/time/width composition and the
improved Section4 route to exponent1.9992 are not supplied by these finite counts.
AI assistance: OpenAI Codex workers codex-thin-product-math-20261028,
codex-three-sum-continuation-t3-3dda8289 and /root/draft_thin_docs.

* fix(wordram): repair parameter proof hygiene and ceiling-log docs

* feat(wordram): implement shared tensor encodings

Complete the shared left/right encoder milestone #1493 above parent b4936ce28
(#1496). Fixed standard-WordRAM code with 32 registers computes every public
encodingL/encodingR leaf from actual initialized flat signed inputs. The native
bound is 240*(L+1)*10^L instructions plus halt, with explicit magnitude/address
inequalities, two alternating buffers, charged initialization/copying and the
complete outside frame. The full ordinary native 3SUM objective #1394 remains
open; this component supplies no sparse-query or Exact Triangle solver.

Validation of tree b598513f02cc064eaf50d3c680684c19289ffd71 against
b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
changed-file lints (13 library modules, one new test) and diff checks pass.
Tests execute both encoders at depths zero, one and two, compare all 100
depth-two leaves with the unchanged public encodings, preserve input/frame
sentinels, and cover adjacent word widths and all three copy block orders.
Kernel-checked concrete flat executions discharge every width/magnitude
premise. Selected abstracts, catalogue and rendering are unaffected.

AI assistance: OpenAI Codex implementation and self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Independent correctness/API review is pending;
this is not an approval or a claim that the complete 3SUM objective is done.

* test(wordram): connect encoder witnesses to charged runs

Connect the zero-depth and two-stage regression memory witnesses to the
actual prefix Runs already proved by runs_left, rather than discarding that
conjunct. Bound the prefixes by 240 and 72000 instructions and expose the
same executions' charged halt at n+1. All library code is unchanged from
ad3e09735a116f9868e87cf7ae6af59e5cb6a285 (tree b598513f02cc064eaf50d3c680684c19289ffd71).

Validation of tree 8277017f2c63a5851b63a5d4b49775a9fb96d62d against actual
parent b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
fresh changed-file lints (13 library modules, one test), strict PR-draft
declaration-name check and staged/unstaged diff checks pass.

Independent nonauthor agent review 8034f3da approved exact ad3e09735/tree
b598513f, covering full code/model/cost/width/source and ArrayCopy with no
blockers. It is inside-fleet review, not outside approval. This test-only
delta addresses its optional witness-connection finding; focused final
test/source-mapping review remains pending through the parent coordinator.
No selected abstract, catalogue or rendering impact. The full ordinary
native 3SUM objective #1394 remains open; this implements encoder issue #1493.

AI assistance: OpenAI Codex implementation/self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Publication remains on hold for focused
review; this commit is not approval or a whole-3SUM completion claim.

* feat(wordram): checkpoint native pruned-query controller proofs

Work in progress for #1526. Fixed native controller and initialized-input interpreter regressions, numerical child-set bridge, call-count potential, charged power/scan/clear/frame/arithmetic/return kernels. Individual current Lean modules have clean MCP diagnostics; the earlier strict targeted scan/count/value/test checkpoint passed. The complete global controller invariant, native evaluator theorem, actual initialized flat-run clients and sparse charged bound remain unfinished. No full six-gate or independent review claim; no PR submission. Full #1394 endpoint remains open. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* refactor(schonhage): reuse binomial bounds and sharpen signed tests

Address the bounded nonblocking review findings on #1496. Keep Nat.choose_le_exp_mul_div_pow unchanged while deriving it from Cslib.sum_choose_le_exp_one_mul_div_pow in the existing real binomial module; remove the redundant module and migrate its import. Preserve Anthropic, Samuel Schlesinger, OpenAI and Erik Demaine credit. Kernel-check an actual mixed inner/outer L2,m1 signed pruned result of -8, remove two signature-only tests and retain positive admitted-parameter checks. Paraphrase the identified source-derived sentence, shorten generic source boilerplate and record the generic naming follow-up. No public mathematical statement or definition changes meaning; no selected abstract or endpoint promotion. Final validation/source/review evidence is in PR #1496. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* feat(WordRAM): prepare and encode every shared matrix band

Implement the complete bounded #1523 native component under #1394. A fixed
96-register standard WordRAM program computes valid subset/inverse tables and
a deterministic existing Layout, prepares all padded signed row/column bands,
calls the unchanged #1520 encoders once per shared band, collects every leaf,
and restores the entire initialized input prefix and outside frame.

The State.init and flat Runs/Executes clients bind the actual output memory to
public encodingL/R in the unchanged leafIndex order (P0 digit 9). All powers,
mask/popcount/root/table loops, indices, guarded matrix addresses, initialization,
copying, encoder calls, loop controls and halt are charged. The generic bound is
4096*(L+1)*(1+N*4^m+2^L+2*numBands*10^L), plus halt; at L=19m and N>=(4^m)^18,
the full charged run is <=81920*(L+1)*N^2/(4^m)^(1/18).

Width assumptions are explicit original-parameter inequalities: the wordBudget
fits target w+2 and 7^L*A < 2^(w-1), w>0, A>=0. Actual signed kernels use at most
15/17 instructions for add/subtract, already included through the unchanged
encoder's real cost. No all-state fit, callback, solver, assumed run/cost or source
machine semantics is a hypothesis. Symbolic positive-depth thin native examples
and concrete signed/padded/frame/width-boundary executions establish nonvacuity.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Programs/Sec2/Theorem5/Encode/AllBands.lean:230-239,262-271
and BandArrayFacts.lean:107-113. Verified checkout files equal their pinned Git
blobs and all PR-draft quotations match those exact line slices. The source's
row/column encoding predicates map to runs' quantified original matrices, all
bands and all leaves on computed MaskTable.layout; Light limits/program maps,
callee contracts and source time hypotheses are replaced by actual native code
proofs, not imported. The block index is beta*K0+(side? h:g), and row is block*N0
plus the compressed outer offset. Shared tile pointers and retained table words
are exposed by tileInputBases/tile_input_values/table_word_layout.

Reuse unchanged WordRAM control/rename/copy/signed APIs, Layout/bandArray/encoding
mathematics and Mathlib finite index/sorted-set APIs. New mask scans, dense inverse
lookup, direct base-seven decoder and native execution/cost composition are
original. Small native-power/ordered-filter/positional-digit/row-major lemmas live
in narrow topic modules. Retain Anthropic, PBC source credit and NOTICE.

Validation: PASS all six strict gates (build --wfail --iofail, mk_all --check,
test --wfail --iofail, lint, lint-style, checkInitImports), serial Smoke/Axioms
warmups and the global Axioms audit; full citation-aware hygiene --check-simp,
fresh actual-base changed-file lints, strict PR-name and diff checks. Validated
with LEAN_NUM_THREADS=1 and cache downloads disabled. Windows static metadata
reads used PYTHONUTF8=1; no Lean/source change was needed. New Lean files use ordinary non-executable file modes. Exact payload tree
bdfc5a1a33f0d712b90f4fe4bc9d6c27e2d8318e. Targeted Lean MCP endpoint/tests and pinned quote identity also pass.
No PR has been opened;
independent exact-revision correctness/API/source-mapping review is pending.

Abstract assessment: no impact on selected abstracts, models or scope; no new
headline or PDFs. Pruned queries, products, solvers and whole ordinary 3SUM remain
open under #1394. Base #1520 remains unchanged at 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6.

AI assistance: Codex implementation/proofs, session codex-native-bandprep-t3-03b600bd,
under delegating-worker coordination. Existing unchanged encoder outside-review
evidence is PR1520#issuecomment-6477077023; final new-component review pending.

* feat(wordram): checkpoint native pruned accumulation and frame transitions

Work in progress for #1526, not a submitted component. Complete native parent accumulation loop (31N+3), internal sparse initialization (7N+8), computed child push (15), shared actual frame-word store, executable query-code inverse/requested-set bridge and recursive timestamp allowance. These current modules have clean targeted Lean MCP diagnostics; actual interpreter and kernel digit/request regressions pass. Changed-scope hygiene --check-simp and diff check pass. The general node/controller continuation proof, actual initialized full evaluator theorem and final sparse charged bound remain unfinished; no full six-gate or independent review claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289; full #1394 remains open.

Final current-tree checkpoint: strict build --wfail --iofail of Accumulate, Clear, Push, Frame, Powers, Leaf, Weight, Scan and SchonhagePruned tests passed together (3596 jobs); scope hygiene --check-simp and diff checks pass. This is a partial implementation checkpoint, not an all-six-validated PR or completed #1526 milestone.

* feat(wordram): checkpoint actual pruned-query root-frame stores

WIP #1526. Factor root scan setup and root finish; prove the actual eleven-instruction root-frame initialization and exact memory/register frame. Current Root MCP diagnostics clean. Full node/controller composition remains unfinished; no PR or full-six claim. AI-assisted continuation by codex-three-sum-continuation-t3-3dda8289.

* fix(nat): reuse existing tuple digit identity in band preparation

Address the sole P2 finding from the independent #1523 review of cb261f6b:
remove duplicate Nat.ofDigits_ofFn and publicly import the existing radix
module. The finite-function numbering bridge uses Nat.ofDigits_ofFn_eq_sum.
Its statement is unchanged. Existing radix declarations, proofs and source
credit are unchanged; no native program, endpoint statement or test changed.

Validation on exact final tree 4807cb971cf8030f70df67e5e8fa13947dcbd202:
PASS all six strict gates together (build --wfail --iofail, mk_all --check,
test --wfail --iofail including global Axioms, lint, lint-style,
checkInitImports), fresh actual-base changed-module lints (29 library/1 test),
full citation-aware hygiene --check-simp, strict draft-name and diff checks.
Serial LEAN_NUM_THREADS=1; optional cache downloads disabled. Lean MCP also
reports clean diagnostics for the changed bridge. Logs are in
.lake/codex-three-sum-continuation/band-review-six in the continuation checkout.

Original native implementation and all full correctness/API/source-mapping
review coverage retained. Review record:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6479696830
Original implementation/validation handoff:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6478943178
Focused final delta review pending before PR publication. No impact on selected
abstracts, models or scope; no new headline. Complete #1394 native 1.9992
endpoint remains open.

AI assistance: bounded reuse fix and validation by Codex session
codex-three-sum-continuation-t3-3dda8289. Original author credit remains on cb261f6b.

* feat(wordram): checkpoint complete native pruned-controller phases

Continue #1526 implementation under #1394; this is explicitly partial WIP,
not a complete component or PR submission. Full recursive node composition,
initialized input/flat clients, derived global fits and total-time theorem
remain open. No solver or all-state fit/execution/time certificate is assumed.

Check full root setup/scan/frame (20Q+19), report (9Q+3), leaf/return (24),
loaded leaf step (43), internal entry (7N+28), native nonempty child scan/push
(20N+42), empty-child scan/advance (20N+33), returned-child accumulation
(31N+29), and final return (26) against the actual standard fixed native Code.
KernelRegs describes only constant/pointer register values. Node footprints
preserve the ancestor rows. The zero-depth node matches existing Pruned.result
and the finite traceWeight; its continuation uses the existing ExecWithin.loop_iter.
No alternative machine or run semantics is introduced.

The reporting-body/controller names are definitionally identical Code trees.
ScanMemory.congr transports the existing representation across disjoint writes
and removes duplicate root proof plumbing; push exposes its four-store frame.

Validation: targeted Lean MCP diagnostics clean for every new/updated phase
and ComplexityTests/SchonhagePruned.lean. Native interpreter regressions retain
depths 0/1/2, both signs, repeated/empty/mixed queries and an outside sentinel.
New kernel examples discharge the general node/register/address/signed premises,
connect the same negative-product final memory to charged controller execution,
and prove an empty leaf preserves the prior value cell. Diff whitespace passes.
No aggregate/all-six validation claimed: root/native audit coordination hold
is respected. Exact partial checkpoint tree 7fa4da67ea861a2bba3a6c430cd7e40996d0e794.

Abstracts: no impact; no new headline or endpoint claim. Original 1.9992
objective and sparse-product/ET/final composition remain open under #1394.
AI assistance: Codex implementation/proofs by continuation worker
codex-three-sum-continuation-t3-3dda8289.

* doc(matrix): replace copied source prose with API descriptions

Resolve the documentation-only requested changes on #1464:
https://github.com/cslib-community/complexitylib/pull/1464#issuecomment-6477111132
Rewrite source-quotation fragments and related explanations in Alphabets,
Identity, Full and Pruned for the local Lean declarations. Preserve the
mathematical attribution, bibliography keys, source pin and copyright.

A comment-aware comparison with 4f3226cd proves every noncomment byte is
identical in all four files. No declaration, proof, definition, program,
import or test changes. Existing checked source-statement quotations and
notation/quantifier/model/resource mapping in the PR remain unchanged.
The final source-comment screen compares against quoted fragments in the
actual pinned Sec2 and Statements/PaperStatements files, including the
known local renames; no substantial quoted fragment remains unmarked.

Validation is recorded for this exact tree in PR #1464. Source checkpoint
tree 8c3b87bb870d4c4e2202917357d19a7a139296e8. No abstract/catalogue/model/scope
or rendering impact; no new headline. The full native 1.9992 endpoint remains
open under #1394. Ancestor and descendant remotes are unchanged.

AI assistance: documentation repair and validation by Codex continuation worker
codex-three-sum-continuation-t3-3dda8289. Existing independent mathematical/API
and checked-source review coverage is retained; outside review of the bounded
documentation delta is requested, with no new review agent commissioned.

* refactor(finset): use order-embedding names in OrderGlue

Finish bounded #1545 from exact #1536 head66036150a. Replace generic
level/inner/outer API vocabulary with order-embedding/subset/complement names.
Remove five redundant membership/range/congruence wrappers, using Mathlib's
orderEmbOfFin_mem/range_orderEmbOfFin and ordinary substitution directly.
Migrate every actual Levels/Batch proof client with no deprecated aliases.
Keep filter_glue's generic name and rename its predicate parameter to P.

The retained generic statement headers are identical after the documented
renaming and binder alpha-renaming. All 48 Levels and 13 Batch declaration
statements and all definition bodies remain unchanged. The entire native
Encoding module is token-identical after comment removal; every other native
library file is unchanged. Source credit and pin are retained. Thus existing
State.init, Signed.encode, width/frame/cost and encodingL/R meanings remain.

Put the sum/option-versus-flat-digit explanation at the actual leftDigits,
rightDigits and termDigits hover docs, preserving their enumeration bodies
and order (row-major P terms, P0 digit9). Update the UPSTREAM naming follow-up.
Add generic nonconsecutive signed/zero/Option reconstruction clients using
Mathlib's orderEmbOfFin_unique, plus the routed optional #1536 asymmetric
native L4,m1,N29 prefix tests. Those compute headers/count/tables/snapshot and
decode/read ranks1 and2 with K0=2, distinguishing quotient/remainder blocks
and signed values without a full10^4-leaf encoder run or native body edits.

Reuse unchanged outside coverage: PR1496#issuecomment-6477111644 atb4936ce28,
PR1496#issuecomment-6480746578 at68bbe40e3, and PR1536#issuecomment-6480852097
at66036150a12046b29986d8f108c0afaf49d01c61. These are agent reviews, not human
approval. No new cited mathematical result or machine model is introduced.

Validation: PASS build --wfail --iofail, mk_all --check, test --wfail --iofail,
lint, lint-style and checkInitImports, with serial Smoke/global Axioms warmups.
Full citation-aware hygiene --check-simp, fresh changed-file lints against
actual base66036150a, strict PR-name and diff checks, and source/native identity
checks PASS. One thread, no cache downloads, PYTHONUTF8=1 on Windows.
Targeted MCP checks, full hygiene --check-simp and source/native identity
checks pass. Final source tree: 0c21b608cc5ed234527c73a3853a26132f52da0d. No source/ancestor merges or restacks.
Abstract assessment: no impact; no selected theorem/model/meaning/scope or PDF
change. This is generic ergonomics/testing only; full #1394 remains open.

AI-assisted implementation by codex-native-bandprep-t3-03b600bd, under parent
continuation-worker coordination. No new review agent commissioned; ordinary
outside coordinator review is requested when the bounded PR is ready.

* feat(WordRAM): prove all-depth pruned controller execution

WIP checkpoint for #1526; no PR and no completed component claim. The actual fixed native controller now has a depth-inductive execution proof with original Pruned.result values, stored queries/frames, concrete spatial preservation, input-derived signed fits and traceWeight charged continuation. Root loop exit discharges the continuation.

All new library modules through Recursive.exec_ready have clean targeted Lean MCP diagnostics. New concrete entry/result client reports no diagnostics, but the complete existing test file is still elaborating its VM regression commands; no final test-pass or all-six claim. Initialization/root-list/report/flat State.init composition, global width/fit clients, full component validation and independent review remain open. Aggregate checks are held for the coordinated root validation slot.

GenericRAM/Signed/Fits.lean is the unchanged blob from independently owned PR #1552, commit f276db1174333d3e6253b93878be8b95c1fcc713; credit retained. No native program body changed in this checkpoint. All proofs and invariant definitions are original native work; existing mathematical pruning/encodings retain their source credit. No selected-abstract impact or whole-3SUM endpoint claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* style(WordRAM): normalize native proof file modes

* feat(wordram): complete initialized sparse pruned-query execution

Complete implementation candidate for #1526 above #1520 exact 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6. Full ordinary native 3SUM and the published 1.9992 endpoint remain open under #1394. No PR yet; fresh exact-revision independent correctness/API/source review is pending before publication.

One fixed standard native program: 96 registers, at most 4096 flat instructions including halt, no width reads. Complete State.init -> pre-halt Runs -> Executes uses the same answer memory. Every supplied query, including repeats and empty/zero-depth boundaries, equals existing Pruned.result; runs_bilinear specializes existing encoding contracts to bilinearProduct. exec_kernel computes its powers/layout and has a reusable pointer/epoch directory contract. All child lists, timestamp decisions, stack/control/index arithmetic, signed products/adds and reporting are actual charged code, proved by the all-depth exec_ready induction; its continuation is discharged by the actual root exit.

Full charge including halt <= 8192*(L+Q+1+(L+1)*card(leaves(requested qs))). Ordinary source envelope M=A+B+10^L*A*B and address budget H=256*(L+1)*10^L+32*Q+512 derive input fit and execution at every physical W >= clog_2(M+H+1)+3. This is logarithmic in explicit component budgets; global 3SUM composition is not claimed. Inputs: raw L,Q then two canonical signed arrays of length10^L and unsigned query codes, after the actual standard length cell0. Returned output pointer is unsigned. All input/outside memory is preserved on initialized runs. Code/ExecWithin/State.init/Runs/Executes, signed kernels, Heap/Block APIs, existing mathematical pruning/encodings and Mathlib digit/log APIs are reused; GenericRAM/Signed/Fits is the unchanged blob from #1552 f276db1174333d3e6253b93878be8b95c1fcc713, with credit retained.

Pinned source anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5. Checked Git-blob quotation locators: ThreeSumApsp/Sec2/Lemma10.lean:148-150 (Pruned_eq_restrictTo_sum) and:565-566 (Lemma10.total_size). Source Pruned -> existing Pruned.result; source restriction -> Finset.piecewise; source Leaves -> leaves; all natural depths and arbitrary integer arrays retained. Native indexing directly uses existing leafIndex(privateLeaf), first coordinate least significant, inner digit9. Child prefix/stride/division are proved against the finite childSet/sliceAt semantics. Native code/proofs and cost are original, not supplied by source Light semantics or its sorted-segment implementation. Full checked quotes and model/quantifier/layout/cost/reuse mapping are in the prepared UTF-8 PR draft. Copyright retained in source/NOTICE.

Validation on tree bd6e74cce28dbd16c90291b847dac1a311402510: all SIX strict gates pass together, LEAN_NUM_THREADS=1, downloads disabled: build --wfail --iofail; mk_all --check; test --wfail --iofail (including Smoke/global Axioms); lint; lint-style; checkInitImports. Full citation-aware hygiene --check-simp; actual-base47-library/3-test changed-file and local lints; strict PR declaration-name audit; staged/unstaged diff checks pass. Register alias docs fixed the first lint finding; all native definition bytes are unchanged by that fix. Tests discharge real State.init positive/negative/empty/depth-two mixed/shared/repeated queries, sufficient-width family and failing fit boundary; callable signed wildcard with nonzero epoch and preserved input/outside sentinel also checks. No sorry, custom axiom or native_decide introduced.

Selected abstracts/catalogue/rendering: no impact, no new headline. ROADMAP/UPSTREAM preserve the open sparse-product/ET and global1.9992 gaps. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289 (OpenAI Codex); original finite source credit to Anthropic, PBC.

* feat(wordram): checkpoint computed wanted-query routing

Partial implementation of #1561 by codex-three-sum-continuation-t3-3dda8289.

Implements actual fixed standard 96-register routing/grouping code with computed valid-mask tables, tile counts, prefix offsets and stable scatter. General checked proofs cover the digit kernel (15L+10), one-query routing (15L+25), exact outStrOfPos/queryIndex mapping, computed header/count/relocated-table initialization (16L+(12L+33)*2^L+83), input-memory frame and original-input-derived fits. Generic finite stable-counting positions are injective and bijective.

Targeted Lean MCP diagnostics clean for all nine new library modules and the regression suite. Actual initialized interpreter regressions pass for empty input, zero depth, duplicates and an asymmetric K0=2 three-band case; no encoded leaf array is materialized in routing tests. The 96-register program computes every routing/count/prefix/scatter decision.

INCOMPLETE: general native counting, prefix and scatter execution invariants, initialized flat complete-run/width/frame/bound clients, final static hygiene and ALL SIX gates remain pending. This checkpoint is not a PR or acceptance claim. Mutable global audit slot remains with parent; no aggregate performed here. Full #1394 native sparse/ET solver and ordinary 1.9992 endpoint remain open.

The child branch merges unchanged #1554 at 12abeee84 onto frozen #1562 base 0c2e0ebea. The local merge 60bec64398 only reconciled shared credit/roadmap/upstream prose; no ancestor branch was edited. Original implementation mathematics/code by Erik Demaine with AI assistance. Existing finite Schonhage and band/encoder/pruned interfaces are reused with their original credit retained.

* feat(wordram): checkpoint wanted count-pass proofs

Continuation of #1561 from 06b3563e7. CountStep has clean targeted Lean MCP diagnostics, including exact 14-instruction native count update and memory frame. Dense zeroing and count-loop composition are implemented; Count.lean has one pending elementary nonnegativity/address-bound proof at line 152. This is an explicitly incomplete source checkpoint, not all-six validated or a PR. Work is paused solely to prioritize the bounded outside-requested #1562 repair. No program/public statement in #1562 changed.

* doc(finset): restore ordered-gluing source credit

Restore the original AlmanWilliams2026 Section 2 citation and finite-scope sentence removed by the naming refactor. No Lean declarations or proof tokens change.

AI-assisted coordinator fix by coordinator-codex-queue-20261028-ready-c. Original implementation and source authorship retained; independent delta review and new hosted CI requested on PR #1554.

* fix(wordram): address pruned-query review findings

Bounded documentation/test repair for #1562 / #1526 by codex-three-sum-continuation-t3-3dda8289, above exact 0c2e0ebea6199ac1fbe9b2e048ce24b9410f8d1a.

Fix both ROADMAP reference definitions, distinguish client contracts from exported internal stage APIs, and document why the narrow ArrayAppend/InputArray topics avoid Allocation interface/dependency fanout. Extend existing post-integration issue #1553 with the exact pruned power register map, 4L+10 accounting, affected consumers, fused-encoder accounting and sibling integration order; no power program or ancestor is changed.

Add one fully admitted signed runs_bilinear client: depth0, original arrays -3 and 2, actual encodingL/R premises discharged, original-input magnitude/address fits discharged, physical width10, same actual State.init prefix Runs and charged halt, and output memory at address6 equals Signed.encode(-6). Targeted Lean MCP diagnostics pass.

Validation: all six strict gates passed together on final staged tree f4cfd4ae0d838c4b4bf4c43c924f400744450957, including Smoke/global Axioms; one thread/downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base 47-library/3-test module lint, changed-file audits, strict declaration-name check and staged/unstaged diff checks pass. Local machine-readable evidence: .lake/codex-three-sum-continuation/pruned-review-repair/{summary.json,static-summary.json,identity.json,*.log}.

Source identity audit against 0c: all seven changed library files have identical comment-free tokens. Every public library statement, definition, native program and proof is unchanged. Every existing test byte is unchanged except the single inserted concrete client. Abstract/catalogue/rendering assessment: no impact.

The prior inside-fleet technical review at issue1526#6484055995 and outside FINAL at PR1562#6484177608 cover unchanged native semantics/source mapping. Fresh focused outside review of this repair is requested; no new review agent was commissioned, and no outside/human/platform approval is claimed. All original Anthropic, PBC credit retained. AI-assisted implementation by OpenAI Codex.

#1561 source is preserved separately at 7772a3497017078b37d1e04004225fae28baddad with its pending native grouping proof work explicit. Concrete sparse-product/Exact Triangle programs, full input/time/width composition and the original native 1.9992 endpoint remain open under #1394.

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(imports): regenerate aggregate after Chan-He parameter integration

* feat(wordram): route and group wanted thin-product queries

Implement #1561's complete native routing/grouping component. State.init prepends
the native length cell to [L,m,N,Q] followed by raw coordinate pairs.
Actual finite unsigned standard Code computes tables, tile keys, codes, counts,
prefix offsets and stable scatter. No layout/run/time/permutation certificate
is supplied. Fixed 96 registers, <=4096 flat slots including halt, no width reads.

Wanted.runs_grouped proves actual State.init prefix Runs and charged halt at the
same final memory, exact per-occurrence code/original-position equations, exact
wantedStrings tile spans, in-array span/code bounds, permutation, terminal Q,
input/outside frame and final boundedness. All admitted physical widths are
covered by the positive clog2(wordBudget+1)+1 threshold, with original input fit
derived. All initialized reachable prefixes are bounded. Complete native charge
including halt <=128*(L+1)*(Q+numBands^2+2^L+1). No 10^L scan per query/tile.

Validation: final tree 6c8164db02df348a46ffe0cf5972415977c62939. All SIX strict gates passed
together: build --wfail --iofail; mk_all --check; test --wfail --iofail (including
Smoke/global Axioms); lint; lint-style; checkInitImports. One Lean thread, cache
downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base
57-library/3-test lints, changed-file/name/staged+unstaged diff checks all pass.
The initial test-only module-boundary VM evaluation failure was fixed by using
the existing non-module native-test convention; every interpreter check remains.
The corrected frozen tree passed the complete six-gate sequence again.

Base: #1562 ce77926c393ce34e7962759bb412172c4584a67c. Preserve normal merges.
Unchanged sibling prerequisite #1554/#1536 is retained at exact
702c14bcf9896655b17c9b2dd5e02e6f270c9966: all 33 library and two test blobs are
byte-identical. Wanted contributes 24 library modules and one test. Existing
unchanged sibling reviews are reusable; no ancestor branch or remote was edited.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Sec2/Theorem5.lean:44-46, checked against its Git blob:
"outStrOfPos lay I J ∈ wantedStrings lay W (bandOf L m I) (bandOf L m J)".
Tiling/Definitions.lean:128-131 defines that filter/image set; reuse it unchanged
with W=qs.toFinset and separately preserve original list occurrences. Source
Programs/Sec2/Theorem5/Wanted/Codes.lean:13-19 motivates routing. Actual native
code uses the existing least-significant-first queryIndex/leafIndex dictionary,
digit9 for the inner wildcard and 3*row+col otherwise. It proves agreement rather
than identifying the Light program's separate numbering, semantics or costs.
Native code/proofs/stable-scatter theory are original; primitive counts reuse
Mathlib Nat.count directly, with zero/successor/bound/monotonicity APIs and the
existing count_eq_card_filter_range identity. Redundant count/offset wrappers
and their repeated elementary lemmas are removed. Every client is migrated;
Program.lean and PackProgram.lean are byte-identical to checked checkpoint
2e2cc39675a30b024c3932bd23f06163a33c8925. Imported finite source credit is
retained. All three source slices equal the pinned Git blobs.

Fully admitted kernel clients cover empty/zero depth, repeated pairs, and the
L4/m1/N110/K0=2 asymmetric family, tying answers to actual Runs/halt. Actual VM
regressions cover all expected grouped words, original indices, offsets and
input/outside frame. Fitting and failing physical-width premises are checked.
No sorry, custom axiom or native_decide. No curated abstract/catalogue/PDF impact.

Shared-band calls, actual buffer/header adaptation, pruned-kernel invocation,
answer reconstruction, sparse-product/Exact Triangle and full native ordinary
3SUM composition/1.9992 remain open under #1394. This is a component milestone.
Fresh nonauthoring correctness/API/source review is pending (root arranges);
outside review remains required. No PR, integration or approval claim.

AI-assisted implementation: OpenAI Codex, session
codex-three-sum-continuation-t3-3dda8289. Author/source credit is preserved.

* fix(imports): regenerate aggregate after shared-encoder integration

* perf(wordram): reduce native parameter proof heartbeat budget

* chore(wordram): scope measured parameter proof budget to reduction task

* perf(schonhage): focus cell arithmetic and use the default heartbeat budget

* fix(doc): restore unrelated upstream coordination records

Restore the exact 231-line tail common to both integration parents after review caught an overbroad conflict-marker match. The intended 3SUM integration prose is retained; no Lean change. AI-assisted correction by OpenAI Codex.

* fix(imports): regenerate band-preparation aggregate from merged inventory

* doc(order-glue): preserve reviewed source credit through supplier merge

* doc(order-glue): restore paper citation and finite scope

* feat(wordram): checkpoint native queried-product construction (#1581)

Unfinished implementation above exact a6e4005b2 on the existing isolated child branch.
The fixed native program computes both producers, protected layouts/copies, tile ABI,
one shared timestamp directory, actual pruned calls and original-order reconstruction.
Targeted Lean MCP checks pass for the new native program and supporting original-input,
parameter/layout, copy/frame, grouping-span, raw-conversion, producer and directory proofs.
Five actual initialized interpreter regressions pass: empty, signed/duplicate, raw01,
multiple tiles/padding/epochs, and nonempty inner tensor coordinates.

This is a recovery checkpoint, not a complete native product result or PR candidate.
Full tile/epoch loop and reconstruction correctness, initialized composition, complete
charged cost and logarithmic-width/saving results remain open under #1581/#1394.
All six/global/static validation remains held for root; no aggregate or static audit ran.
Existing curated abstract statements and scope are unaffected; no headline promotion.
Implemented personally by codex-three-sum-continuation-t3-3dda8289 with AI assistance.

* fix(imports): regenerate thin-product aggregate after main integration

* doc(wordram): separate shared-encoder integration records

Keep the reviewed finite-matrix supplier records intact and record native-encoder scope and source credit separately, so squash-queue integration does not overlap the ancestor documentation hunks. Preserve code, tests, concrete bounds and the complete unrelated upstream-record suffix. Queue revisions are used only for read-only projection, never as parents.

* doc(matrix): keep progress links out of shared reference append block

* feat(wordram): checkpoint complete queried-product source before supplier merge (#1581)

Local recovery checkpoint only. Complete native queried-product execution, initialized
clients, quantitative thin saving and logarithmic width have clean targeted Lean MCP
diagnostics. Import generation adds the 29 new modules. No all-six/static validation or
independent candidate review is claimed by this checkpoint; it is not a PR candidate.

The actual #1576 supplier advanced from a6e4005b to integration91f485ec. Preserve this
source before a normal child merge, reconcile only shared docs/imports, regenerate the
aggregate, then validate the final source together against the actual supplier.

Original native implementation by Erik Demaine with Codex assistance, reusing credited
finite Anthropic Section 2 mathematics and actual native producer/router/pruned kernels.
Ordinary-3SUM/Exact Triangle and the full #1394 1.9992 endpoint remain open.

* feat(wordram): execute queried thin-matrix products (#1581)

Complete #1581 implementation candidate under #1394, awaiting required fresh exact-head
non-authoring correctness/API/source/resource review. No PR is opened or integration
approval claimed. Normal child history preserves source checkpoint af208636b and actual
reviewed #1576 supplier91f485ec; no ancestor branch or remote was edited.

One actual fixed standard unsigned WordRAM program per signed/raw input mode consumes
original headers [L,m,N,Q], both row-major integer matrices X:N x 4^m and Y:4^m x N, and
raw interleaved requested coordinates. It computes tables/layout, shared encodings,
Wanted counts/prefix/stable scatter, tile pointers, decoded queries, directory/epochs,
pruned evaluation and original-order reconstruction. Raw nonnegative entries are doubled
by actual charged load/multiply/store instructions (including raw0/1 -> signed0/2).
There is no source Light machine, assumed layout, sorting, solver, run or time oracle.

QueriedProduct.exec/runs/runs_wide prove actual native execution from original words /
State.init, same-y prefix Runs and charged halt, every original occurrence's exact
Signed.encode((X*Y)[qs[i]]) including duplicates, original-input restoration and the
complete outside frame. Generic execution assumes m<=L, original absolute entry bound A,
raw nonnegativity in raw mode, and the explicit original numerical magnitude/address
admission; it has NO query-sparsity hypothesis. The real pointer/epoch kernel uses a
directory initialized once, with scratch/frame separation and propagated fresh bounded
epochs. Code has 160 registers, <=32768 flat instructions including halt, no width reads,
and is independent of dimensions, magnitudes, query counts and physical widths.

Thin hypotheses: L=19m, D=4^m, N>=D^18. With distinct-set sparsity
|qs.toFinset|*2^m<=N^2, complete charge including halt is <=
65536*(19m+1)*(65*N^2/D^(1/18)+Q). With the stronger occurrence hypothesis
Q*2^m<=N^2 it is <=4325376*(19m+1)*N^2/D^(1/18). Multiplicity/output work is never
replaced by set cardinality. runs_thin holds at EVERY physical W>=
128*clog_2(N+Q+A+2), deriving InputFits and all intermediate admissions. Its explicit
magnitude/address envelope is <=2^40*(N+Q+A+2)^10, allocation <=128*(N+Q+A+2)^4.
Physical all-prefix boundedness is proved; a separate source-polynomial prefix bound at
arbitrarily larger widths is not extracted here. ET record/input adaptation and all its
copies/calls, Exact Triangle solving, ordinary3SUM composition and improved Section4 /
1.9992 remain open. This component proves neither full3SUM exponent.

Source mapping checked against actual Git blobs at anthropics/formal-math
16a5ce41304fcdaea4e0be7c132e1c361dc26da5, under3sum-apsp/ThreeSumApsp:
- Sec2/Theorem5.lean:61-67 concludes the pruned band value equals (X*Y) I J.
  Existing finite thin_product_spec/MaskTable.layout/bandArrayL/R/encodingL/R and
  wantedStrings are reused; W=qs.toFinset, with a separate occurrence permutation.
- Sec2/Theorem5.lean:146-149, paraphrase of its conclusion:
  ((sum T in tiles (19*m) m N, |Leaves(wantedStrings lay W T.1 T.2)|):Real)
    <=33*(D m)^(-(1/18):Real)*N^2.
  Source hypotheses N>=D^18 and W.card*2^m<=N^2 are retained. Existing encoding,
  tile/leaf/passed-set estimates bound ACTUAL native execution, not an assumed cost.
- Programs/Sec2/Theorem5/Pruned/AllTiles.lean:86-92 and Wanted/Report.lean:30-37
  are the per-tile/report specification references; Solver.lean:150-161 is conditional
  on Light callees. Native code here is original, accepts stable unsorted duplicates,
  charges empty tile calls and proves all native callees directly. Instruction constants,
  widths, protected layout and frames are independently proved for the native model.
The UTF-8 PR mapping draft contains two exact Lean quotation slices, both checked against
Sec2/Theorem5 at that pin; all four cited source files equal their pinned Git blobs.
Anthropic, PBC's existing mathematical source credit is preserved. New native programs
and execution/resource proofs are original work by Erik Demaine with Codex assistance.

FINAL VALIDATION (whole source tree, not only this commit's proof/doc delta):
Tree 555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; four compiler threads; cache downloads disabled.
1. lake --no-cache build --wfail --iofail : PASS (13.56s).
2. lake --no-cache exe mk_all --check : PASS (11.33s).
3. lake --no-cache test --wfail --iofail : PASS (27.14s).
4. lake --no-cache lint : PASS (43.22s).
5. lake --no-cache exe lint-style : PASS (17.09s).
6. lake --no-cache exe checkInitImports : PASS (16.8s).
Strict tests cover new initialized/product clients, Smoke and global Axioms.
Full citation-aware hygiene --check-simp, fresh actual-base30-library/one-test lints,
changed-file checks, 25-name strict final-body audit and staged/unstaged diff checks PASS.
Actual comparison base: 91f485ec38ca6b878f338e2cdbdedbf5d4f20257.
3533 inherited source/abstract files checked; only the existing tile-key lemma is exposed
with the same statement/proof. All35 inherited sibling blobs equal actual parent91.
All native code bodies/register definitions are byte-identical to af208636b;
comment-erased Program tokens match. Current full Program source SHA256:
2b86fe04f6afa49a7eadc75292559dca62f4d65c5f7bdaf3b1f4386994aa8ebc
Public Header.exec_layout statement is identical; proof split passes at DEFAULT
heartbeats, without a new allowlist entry. Final register docs clear the initial lint
failure (47 undocumented aliases); prior incomplete/failed checkpoint logs are retained.
Checked PR/source mapping draft SHA256: be43f587d5c0ac6dd871093d5d19c283ef7dd9732b5c5d3cfa77b24e42899a24
Local reproducible records: .lake/codex-three-sum-continuation/queried-product/
summary.json, static-summary.json, source-native-identity.json, source-mapping.json,
run-identity.py, final-body-names.log and per-gate logs. This commit description is the
durable evidence until a PR exists; issue1581 links it.

Examples discharge real width/magnitude premises and connect the same final y to prefix
Runs, halt and memory: signed/raw, duplicate, padded/multiple-tile, positive/zero depth,
empty inputs, nonzero original header, adjacent sentinel, strict budget boundary and
nonempty symbolic admitted thin family at every inner depth.

Abstract assessment: no selected statement/definition/scope/catalogue/rendering impact.
ROADMAP/UPSTREAM preserve remaining1394 scope; no headline promotion.

Fresh review of all NEW native semantics/cost/width/frame/init/API/source mapping remains
pending root arrangement. Unchanged prerequisite outside coverage can be reused after
the recorded identities (1576 outside FINAL6487515809). No child watch/approval/merge.

* style(Schonhage): remove trailing space in queried products

Independent nonauthoring /root/queried_product_review examined the complete
native #1581 layer at ff31104be7acf96798c13b38cb079c58605a1ec3 against
91f485ec38ca6b878f338e2cdbdedbf5d4f20257, including all 29 new library
modules, actual execution/frame/width/cost, multiplicities, source mapping
and initialized clients. No correctness/API/source/resource blockers; this
is agent review within the root fleet, not outside or human approval.

The single P3 finding was a trailing space in Product/Groups.lean:111.
This coordinator correction removes exactly that ASCII space. An exact
byte check and git diff -w verify no other change. Full base-to-head
diff --check now passes, covering committed changes as well.

All six gates and static/source checks pass on reviewed tree555b6b52,
as recorded in ff31104. The whitespace delta is validated separately;
final hosted CI and outside coordinator review remain required.
Curated abstracts unaffected. AI assistance: Codex.

* doc(Schonhage): retain band catalogue encoding contract

Restore the one supplier sentence in UPSTREAM.md about unchanged leaf ordering and
canonical signed words, addressing optional nit1 in outside FINAL6493515098 on PR1615.
All other paragraphs are preserved. Exact byte comparison against9a57e134 verifies
this one sentence is the entire tracked delta; all Lean/native/math/API/abstract
source and every other tracked byte are unchanged.

Documentation-only validation: consistency with the existing catalogue interfaces,
full base-to-head diff --check, citation/simp hygiene and strict25-name final PR-body
audit pass. No Lean, import, aggregate or full rebuild was run for prose. Original
all-six evidence remains for tree555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; this does
not claim a new-head all-six run. No changed abstract meaning or rendering.

Full nonauthoring native/source review and outside FINAL coverage are reused across
this bounded doc delta. A focused outside DOC delta check is requested, not another
full review. Register naming remains a separately coordinated follow-up; existing
nonzero interpreter coverage was accepted, so no test change is included.

AI assistance: Codex implemented the requested one-sentence documentation repair.

* fix(imports): regenerate wanted-routing aggregate from actual inventory

* wip(wordram): checkpoint callable thin-product source

Personal #1618 source checkpoint before integrating the refreshed #1615 parent. Complete generic native memory-window compiler, computed-modulus callable raw01 product, initialized Runs/halt, width/window/cost and dirty-memory/frame tests have targeted Lean MCP diagnostics clear. Canonical imports and final all-six/static validation remain pending; this is not a publication candidate. Reuses the exact landed NatClog module from a1d1fa882, with original credit. No full Exact Triangle or ordinary3SUM endpoint claim.

* feat(WordRAM): run queried thin products in caller-owned memory

Implements the bounded callable prerequisite #1618 under #1394. Owner/session:
codex-three-sum-continuation-t3-3dda8289, personally on
work/three-sum-native-callable-product-20261029. Ordinary parent merge904c62068
preserves the reviewed #1615 a8cb7c984cd77e7eb150522e1353a2da22c84839 source.

Generic MemoryWindow.compile adds actual add/load/remainder and add/store
instructions, retaining ordinary Code/Exec/ExecWithin/Runs semantics. Proved
bounded native-source execution transfers within3x charged instructions/code
size, with3 additional registers and a full outside-window frame. The clipped
memory view is a value relation, not another run semantics or an algorithm oracle.

Concrete raw01 CallableProduct derives the actual source execution from original
matrices/request occurrences. Native NatClog/Power compute the source modulus;
fixed register normalization, translated producer/query execution and two exact
input/output span-normalization loops are all charged. Fixed163 registers,
<=131072 flat slots including halt, no physical-width reads. Actual initialized
prefix Runs and halt refer to the same final data and exact requested products.
Local input is restored and caller memory outside[b,b+M) is preserved.

Thin admission is explicitly D=4^m,L=19m,D^18<=N, with raw zero/one matrices.
M=2^(128*clog2(N+Q+3)) <= (2*(N+Q+3))^128. No whole-window or catalogue clear/copy.
Every W>=256*clog2(b+N+Q+P+5) suffices. For arbitrary dirty callers P bounds EVERY
initial register/memory word, including physical loads before remainder. For the
initialized client scratch is zero and P only bounds the protected caller prefix.
All-prefix assertions are physical word fits, not an independent-of-W polynomial
intermediate-word theorem. The explicit window reservation is polynomial.

Including base loading/halt: charge <=3*(originalT+1)+2048*(N*D+Q+1).
Distinct-set sparsity retains+Q; occurrence sparsity Q*2^m<=N^2 gives
17301504*(19m+1)*N^2/D^(1/18). Neither sparsity premise is needed for execution.
The ET-record adapter, fast ET/backend/witness composition and full ordinary3SUM
1.9992 remain open. Root retains parameters/prime selection/outer ET host.

FINAL VALIDATION: tree f8ff0209469bb668837b9602fb71ecf3aaf3bc99.
All SIX together PASS, four compiler threads, cache downloads disabled:
lake --no-cache build --wfail --iofail (22.27s)
lake --no-cache exe mk_all --check (13.75s)
lake --no-cache test --wfail --iofail (183.59s), including Smoke/global Axioms
lake --no-cache lint (45.02s)
lake --no-cache exe lint-style (22.14s)
lake --no-cache exe checkInitImports (16.56s).

Final full hygiene --check-simp, actual-base12-library/two-test lints,
changed-file checks, strict14-name PR draft audit, COMPLETE a8-to-final diff
--check, staged and unstaged diff checks all PASS. Canonical imports generated;
all new tracked file modes100644. No sorry/custom axiom/native_decide or new
heartbeat override. Only justified finite syntax-check recursion-depth options.

Source audit: all3686 inherited source/abstract files and modes unchanged from
actual reviewed parenta8. Original Product, Wanted/Pruned/Band/encoding, NatClog
and Power suppliers remain unchanged. New MemoryWindow and Callable/Program files
are byte-identical to source checkpoint7cb7ade0a. ArrayNormalize native bodies and
theorem statements are identical; the only API metadata fix replaces blanket
exposure with explicit exposure of its two code definitions. All affected clients
check with the public pure-specification lemmas. The deliberately interrupted e8
checkpoint is NOT used as an all-six claim. One overlapping MCP dependency setup
had a transient Windows artifact lock; serial retries and final six are clean.

Kernel clients tie actual initialized Runs/halt to exact physical output and
caller sentinels. Native VM cases cover nonzero/zero products, duplicate/empty
queries and dirty workspace above the source modulus. A direct compiler client
loads27%8=3, increments/stores4 and preserves both adjacent sentinels. Concrete
numerical width budget passes387/fails386; zero N fails the explicit thin premise.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Sec2/Theorem5.lean61-67 (exact products),146-149 (sparse leaves).
Local file equals the pinned Git blob; conclusion fragments checked verbatim.
Finite mathematics/source credit is inherited. Compiler/controller/proofs here
are original native work, not a source-Light semantics/count transfer.

Abstract assessment: no own selected statements, models, catalogue or rendering
change. No whole3SUM headline promotion. ROADMAP/UPSTREAM retain the #1394 gap.

PUBLICATION LIMIT: #1615 landed DURING this audit via ee1ab6f08ac77b1404d19c0371b0b0ac7daaa915
(reviewed carrier7da96e65cf2c352d08142bb5a7ea65098008d8cc); main now includes later
native/frontend additions. The five direct machine/arithmetic prerequisites and
entire Schonhage supplier remain byte-identical. This exact validated candidate
is preserved on its reviewed a8 parent for coordinator-directed current-main
compatibility work before publication. No parent remote is changed.

Fresh exact-whole-layer NONAUTHORING compiler/callee/API/resource review is still
required and is owned by root. Existing supplier reviews do not approve the new
compiler. No new PR, outside approval, merge or endpoint completion is claimed.

Local reproducible records: .lake/codex-three-sum-continuation/callable-product/
summary.json,static-summary.json,source-identity.json,source-mapping.json,
pr-body.md,audit-source.py and logs. Durable evidence is this commit description;
the issue handoff links it. AI assistance: Codex implementation/self-review with
Lean MCP; fresh nonauthoring and outside reviews remain pending.

* refactor(WordRAM): align ArrayNormalize module name and admission prose

Address optional review nits on PR1625 at fd1f2fce. Rename Normalize.lean to ArrayNormalize.lean with identical file bytes, migrate every consumer and the sorted canonical aggregate without a compatibility shim, say widths at least the threshold, and record that full VM cases use m0/N1 while general execution/resource proofs cover all valid geometry. Existing review6497681504 is already linked; the missing-record observation was a timing snapshot.

Validation: serial targeted Lean MCP ArrayNormalize, WordRAMMemoryWindow and SchonhageCallable all clean. Exact moved-blob identity and comment-erased Lean token identity modulo module-import migration pass; public declaration statements/bodies/attributes and native program meaning are unchanged. Canonical source import order and removal of every old path verified. Full citation/simp hygiene, targeted repository doc-name/new-test checks (12 modules/2 tests), strict14 PR-body names and complete d010-to-final/staged/unstaged diff checks pass. No aggregate/import-generation/all-six run for this bounded delta. Original f5/f8 all-six and final fd1 hosted all-checks green run40879707895 remain scoped to those revisions; repaired head requires refreshed hosted CI before integration. Full compiler/source reviews reused; focused module/import/doc/test-comment delta review requested after push. No abstract/model/resource change or endpoint claim. Evidence .lake/codex-three-sum-continuation/callable-product/review-rename.

AI assistance: Codex implemented the mechanical API/documentation repair; no self-approval, human approval or new full review is claimed.

* feat(ExactTriangle): checkpoint actual record product composition

Personal worker codex-three-sum-continuation-t3-3dda8289, issue1626, ordinary child from1625 repairce1062483; no ancestor remote edits. Implements fixed320-register actual record selector/log/header/copies/complete163-register callable bank, all readback separations from actual producer Output, raw01 identity, occurrence/query-cap sparse bound, native initialized producer→first-record consumer, same-y prefix Runs/chargedhalt/answers/frame, original positive logarithmic width and physical-width-independent polynomial prefix words/support. Generic caller consumes every occupied ordinal. Initialized fixed client selects ordinalzero and proves it exists; this is not an outer instance loop or aggregate ETsolver.

PreparationInput.exec_input is the coordinator-authorized narrow API seam, reusing the existing derivation/private fits_at_width; public runs_input reuses it with unchanged statement/hypotheses/budget. No native producer/callee program or input definition changes. All own modules, modified producer module, and new native prefix/copy/admitted closed positive-depth initialized test have clean targeted Lean MCP diagnostics. Tests include actual second-record decode at m2,n16^18 and raw01 copy; the huge complete input family is kernel-checked symbolically, not VM-enumerated.

SOURCE CHECKPOINT ONLY: canonical import generation, final all-six, full static/hygiene/source identity, PRmapping and required fresh nonauthoring review remain pending. Root owns sole aggregate/static slot; no such process was launched. Original #1394 ordinary3SUM1.9992, aggregate ET/outerloop/prime/parameter/backend/witness work remain open. No PR/review/approval/merge/watch. Credit retained; original native adaptation/composition by Erik Demaine with Codex AI assistance.

* feat(ExactTriangle): validate initialized record product adapter

Refs #1626. The full #1394 ordinary distinct-position 3SUM 1.9992 endpoint remains open. No PR is opened by this worker; fresh whole-layer nonauthoring review is pending coordinator arrangement.

Validated source tree: 8f59a54c6de13459c0a85d86546b12fc12c5003c
Pinned main base: 8569de69ef05751c7e39e2ddd99d24d49f6aa1ec
Preserved source checkpoint: 8f46341d456f6e3651beb02aac898a22a34a9883
Normal main merge: 8612aff051db4590f15efcb02fa37deb2992f6f5. Only ROADMAP/UPSTREAM conflicted; complete landed prose is preserved. After the checkpoint the only own Lean deltas are canonical imports and terminal Header proof simplification. Native programs, public statements and supplier credit are preserved.

Original native implementation: fixed 320 registers and <=132352 flat slots including halt, no width reads. Reads the real six-word record/heap, computes m using NatLog, copies raw X/Y and all interleaved query occurrences, and invokes the complete 163-register runtime-relocated callable bank. Copying keeps raw 0/1; the callee charges signed doubling once. No catalogue/win…
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 30, 2026
…-community#1661)

* feat(exactTriangle): relate lopsided queries and matrix products

Adapt the finite counting interface and signed digit expansion from anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5 for milestone #1438. This is a mathematical interface; native preprocessing, fast solvers and full composition remain under #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 #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 #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 e41e1dda62a10c8f89917e2ccab54fbbedad1ad4, 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(matrix): prove the tensor recursion and pruned evaluation core

* doc(matrix): clarify the overlapping contributing leaf

* doc(matrix): make tensor and pruning explanations standalone

* 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 #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 8e182b091199b323c7e6271acebbfcee2e4cdd18 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(matrix): prove finite thin-product correctness and sparse bounds

Implement the complete finite mathematical milestone of #1463 above #1464:
valid layouts, batch-product correctness/error exclusion, arbitrary-N tiling,
exact requested signed products, order/cardinality estimates, geometric tails
and the derived sparse bounds. At D=4^m, L=19m, D^18<=N and |W|*2^m<=N^2,
encoding entries are bounded by4*N^2/D^(1/18), contributing leaves by33
and passed-set cardinalities by(19m+1)*33 times that scale. Add finite
magnitude and auxiliary object-count bounds. None are native instruction costs.

All six final local gates pass: strict build, aggregate check, strict tests,
environment lint, style lint and init-import check. Hygiene --check-simp,
changed-file lints (14 library modules,1 new test) and diff --check pass.
Tests kernel-check signed results3,20,0,-8, true padding, empty/sparse and
negative-order boundaries, and instantiate all aggregate bounds with jointly
satisfiable m=1 parameters and symbolic matrices without resource overrides.

Read-only math/API review by /root/thin_product_review is clear after fixed
doc references/magnitude wording/quotation hygiene. Focused final delta review
by /root/thin_product_final_delta_review is clear for tree
b021e2d9340b433a9fdb129882351e158e8c289f, reusing the prior mathematics review.
These are internal agent reviews, not outside coordinator or human approval.

Source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
selective Section2 finite mathematics; Anthropic credit/NOTICE retained.
Abstract assessment: no impact on selected headlines, catalogue or rendering.
Full native tensor/sparse-product/Exact Triangle code, native Chan-He #1446,
whole input/time/width composition and improved1.9992 remain under #1394.

AI assistance: implementation and reviews with OpenAI Codex, worker session
codex-thin-product-math-20261028.

* 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 #1446; independent complete parameter subtask #1458.

* doc(matrix): explain finite thin-product guarantees in the Lean API

Restack #1463 above repaired #1464 without changing the reviewed mathematics.
Rewrite 149 documentation blocks in 14 modules as standalone descriptions;
replace operation-cost and word-size narratives with the exact entry, leaf,
passed-set and specified-value quantities proved. Preserve pinned Anthropic
credit, source locators, statements, definitions, proof bodies and imports.
An independent comparison with original ee288fb16 confirms that all code bytes
outside comments are identical, including code whitespace.

Validation of this final tree: all six gates pass together (strict build,
aggregate check, strict tests, environment lint, style lint, init imports).
Citation-aware full hygiene --check-simp, changed-file lints (14 library modules,
one test) and git diff --check pass. Lean MCP FiniteMagnitude diagnostics finish
without errors or warnings. Serial Smoke/Axioms warmups avoid the shared-host
memory failure previously seen when these import-heavy clients run together.

Tests and substantive math/API review evidence are retained from the original
reviewed tree b021e2d9340b433a9fdb129882351e158e8c289f in ee288fb16. This change
is documentation-only; /root/draft_thin_docs authored the scratch map and the
continuation worker inspected/applied it. That drafting is not independent review.
Earlier math reviews are inside-fleet agent reviews, not outside or human approval.
Outside coordinator review will be requested on the final PR. No selected abstract,
catalogue or rendering is affected.

PR publication remains held while native dependent restacks are repaired, per
root sequencing. #1394 remains open: native shared encodings/pruning/Exact Triangle,
Chan-He #1446, complete Convolution/ordinary input/time/width composition and the
improved Section4 route to exponent1.9992 are not supplied by these finite counts.
AI assistance: OpenAI Codex workers codex-thin-product-math-20261028,
codex-three-sum-continuation-t3-3dda8289 and /root/draft_thin_docs.

* fix(wordram): repair parameter proof hygiene and ceiling-log docs

* feat(wordram): implement shared tensor encodings

Complete the shared left/right encoder milestone #1493 above parent b4936ce28
(#1496). Fixed standard-WordRAM code with 32 registers computes every public
encodingL/encodingR leaf from actual initialized flat signed inputs. The native
bound is 240*(L+1)*10^L instructions plus halt, with explicit magnitude/address
inequalities, two alternating buffers, charged initialization/copying and the
complete outside frame. The full ordinary native 3SUM objective #1394 remains
open; this component supplies no sparse-query or Exact Triangle solver.

Validation of tree b598513f02cc064eaf50d3c680684c19289ffd71 against
b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
changed-file lints (13 library modules, one new test) and diff checks pass.
Tests execute both encoders at depths zero, one and two, compare all 100
depth-two leaves with the unchanged public encodings, preserve input/frame
sentinels, and cover adjacent word widths and all three copy block orders.
Kernel-checked concrete flat executions discharge every width/magnitude
premise. Selected abstracts, catalogue and rendering are unaffected.

AI assistance: OpenAI Codex implementation and self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Independent correctness/API review is pending;
this is not an approval or a claim that the complete 3SUM objective is done.

* test(wordram): connect encoder witnesses to charged runs

Connect the zero-depth and two-stage regression memory witnesses to the
actual prefix Runs already proved by runs_left, rather than discarding that
conjunct. Bound the prefixes by 240 and 72000 instructions and expose the
same executions' charged halt at n+1. All library code is unchanged from
ad3e09735a116f9868e87cf7ae6af59e5cb6a285 (tree b598513f02cc064eaf50d3c680684c19289ffd71).

Validation of tree 8277017f2c63a5851b63a5d4b49775a9fb96d62d against actual
parent b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
fresh changed-file lints (13 library modules, one test), strict PR-draft
declaration-name check and staged/unstaged diff checks pass.

Independent nonauthor agent review 8034f3da approved exact ad3e09735/tree
b598513f, covering full code/model/cost/width/source and ArrayCopy with no
blockers. It is inside-fleet review, not outside approval. This test-only
delta addresses its optional witness-connection finding; focused final
test/source-mapping review remains pending through the parent coordinator.
No selected abstract, catalogue or rendering impact. The full ordinary
native 3SUM objective #1394 remains open; this implements encoder issue #1493.

AI assistance: OpenAI Codex implementation/self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Publication remains on hold for focused
review; this commit is not approval or a whole-3SUM completion claim.

* feat(wordram): checkpoint native pruned-query controller proofs

Work in progress for #1526. Fixed native controller and initialized-input interpreter regressions, numerical child-set bridge, call-count potential, charged power/scan/clear/frame/arithmetic/return kernels. Individual current Lean modules have clean MCP diagnostics; the earlier strict targeted scan/count/value/test checkpoint passed. The complete global controller invariant, native evaluator theorem, actual initialized flat-run clients and sparse charged bound remain unfinished. No full six-gate or independent review claim; no PR submission. Full #1394 endpoint remains open. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* refactor(schonhage): reuse binomial bounds and sharpen signed tests

Address the bounded nonblocking review findings on #1496. Keep Nat.choose_le_exp_mul_div_pow unchanged while deriving it from Cslib.sum_choose_le_exp_one_mul_div_pow in the existing real binomial module; remove the redundant module and migrate its import. Preserve Anthropic, Samuel Schlesinger, OpenAI and Erik Demaine credit. Kernel-check an actual mixed inner/outer L2,m1 signed pruned result of -8, remove two signature-only tests and retain positive admitted-parameter checks. Paraphrase the identified source-derived sentence, shorten generic source boilerplate and record the generic naming follow-up. No public mathematical statement or definition changes meaning; no selected abstract or endpoint promotion. Final validation/source/review evidence is in PR #1496. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* feat(WordRAM): prepare and encode every shared matrix band

Implement the complete bounded #1523 native component under #1394. A fixed
96-register standard WordRAM program computes valid subset/inverse tables and
a deterministic existing Layout, prepares all padded signed row/column bands,
calls the unchanged #1520 encoders once per shared band, collects every leaf,
and restores the entire initialized input prefix and outside frame.

The State.init and flat Runs/Executes clients bind the actual output memory to
public encodingL/R in the unchanged leafIndex order (P0 digit 9). All powers,
mask/popcount/root/table loops, indices, guarded matrix addresses, initialization,
copying, encoder calls, loop controls and halt are charged. The generic bound is
4096*(L+1)*(1+N*4^m+2^L+2*numBands*10^L), plus halt; at L=19m and N>=(4^m)^18,
the full charged run is <=81920*(L+1)*N^2/(4^m)^(1/18).

Width assumptions are explicit original-parameter inequalities: the wordBudget
fits target w+2 and 7^L*A < 2^(w-1), w>0, A>=0. Actual signed kernels use at most
15/17 instructions for add/subtract, already included through the unchanged
encoder's real cost. No all-state fit, callback, solver, assumed run/cost or source
machine semantics is a hypothesis. Symbolic positive-depth thin native examples
and concrete signed/padded/frame/width-boundary executions establish nonvacuity.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Programs/Sec2/Theorem5/Encode/AllBands.lean:230-239,262-271
and BandArrayFacts.lean:107-113. Verified checkout files equal their pinned Git
blobs and all PR-draft quotations match those exact line slices. The source's
row/column encoding predicates map to runs' quantified original matrices, all
bands and all leaves on computed MaskTable.layout; Light limits/program maps,
callee contracts and source time hypotheses are replaced by actual native code
proofs, not imported. The block index is beta*K0+(side? h:g), and row is block*N0
plus the compressed outer offset. Shared tile pointers and retained table words
are exposed by tileInputBases/tile_input_values/table_word_layout.

Reuse unchanged WordRAM control/rename/copy/signed APIs, Layout/bandArray/encoding
mathematics and Mathlib finite index/sorted-set APIs. New mask scans, dense inverse
lookup, direct base-seven decoder and native execution/cost composition are
original. Small native-power/ordered-filter/positional-digit/row-major lemmas live
in narrow topic modules. Retain Anthropic, PBC source credit and NOTICE.

Validation: PASS all six strict gates (build --wfail --iofail, mk_all --check,
test --wfail --iofail, lint, lint-style, checkInitImports), serial Smoke/Axioms
warmups and the global Axioms audit; full citation-aware hygiene --check-simp,
fresh actual-base changed-file lints, strict PR-name and diff checks. Validated
with LEAN_NUM_THREADS=1 and cache downloads disabled. Windows static metadata
reads used PYTHONUTF8=1; no Lean/source change was needed. New Lean files use ordinary non-executable file modes. Exact payload tree
bdfc5a1a33f0d712b90f4fe4bc9d6c27e2d8318e. Targeted Lean MCP endpoint/tests and pinned quote identity also pass.
No PR has been opened;
independent exact-revision correctness/API/source-mapping review is pending.

Abstract assessment: no impact on selected abstracts, models or scope; no new
headline or PDFs. Pruned queries, products, solvers and whole ordinary 3SUM remain
open under #1394. Base #1520 remains unchanged at 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6.

AI assistance: Codex implementation/proofs, session codex-native-bandprep-t3-03b600bd,
under delegating-worker coordination. Existing unchanged encoder outside-review
evidence is PR1520#issuecomment-6477077023; final new-component review pending.

* feat(wordram): checkpoint native pruned accumulation and frame transitions

Work in progress for #1526, not a submitted component. Complete native parent accumulation loop (31N+3), internal sparse initialization (7N+8), computed child push (15), shared actual frame-word store, executable query-code inverse/requested-set bridge and recursive timestamp allowance. These current modules have clean targeted Lean MCP diagnostics; actual interpreter and kernel digit/request regressions pass. Changed-scope hygiene --check-simp and diff check pass. The general node/controller continuation proof, actual initialized full evaluator theorem and final sparse charged bound remain unfinished; no full six-gate or independent review claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289; full #1394 remains open.

Final current-tree checkpoint: strict build --wfail --iofail of Accumulate, Clear, Push, Frame, Powers, Leaf, Weight, Scan and SchonhagePruned tests passed together (3596 jobs); scope hygiene --check-simp and diff checks pass. This is a partial implementation checkpoint, not an all-six-validated PR or completed #1526 milestone.

* feat(wordram): checkpoint actual pruned-query root-frame stores

WIP #1526. Factor root scan setup and root finish; prove the actual eleven-instruction root-frame initialization and exact memory/register frame. Current Root MCP diagnostics clean. Full node/controller composition remains unfinished; no PR or full-six claim. AI-assisted continuation by codex-three-sum-continuation-t3-3dda8289.

* fix(nat): reuse existing tuple digit identity in band preparation

Address the sole P2 finding from the independent #1523 review of cb261f6b:
remove duplicate Nat.ofDigits_ofFn and publicly import the existing radix
module. The finite-function numbering bridge uses Nat.ofDigits_ofFn_eq_sum.
Its statement is unchanged. Existing radix declarations, proofs and source
credit are unchanged; no native program, endpoint statement or test changed.

Validation on exact final tree 4807cb971cf8030f70df67e5e8fa13947dcbd202:
PASS all six strict gates together (build --wfail --iofail, mk_all --check,
test --wfail --iofail including global Axioms, lint, lint-style,
checkInitImports), fresh actual-base changed-module lints (29 library/1 test),
full citation-aware hygiene --check-simp, strict draft-name and diff checks.
Serial LEAN_NUM_THREADS=1; optional cache downloads disabled. Lean MCP also
reports clean diagnostics for the changed bridge. Logs are in
.lake/codex-three-sum-continuation/band-review-six in the continuation checkout.

Original native implementation and all full correctness/API/source-mapping
review coverage retained. Review record:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6479696830
Original implementation/validation handoff:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6478943178
Focused final delta review pending before PR publication. No impact on selected
abstracts, models or scope; no new headline. Complete #1394 native 1.9992
endpoint remains open.

AI assistance: bounded reuse fix and validation by Codex session
codex-three-sum-continuation-t3-3dda8289. Original author credit remains on cb261f6b.

* feat(wordram): checkpoint complete native pruned-controller phases

Continue #1526 implementation under #1394; this is explicitly partial WIP,
not a complete component or PR submission. Full recursive node composition,
initialized input/flat clients, derived global fits and total-time theorem
remain open. No solver or all-state fit/execution/time certificate is assumed.

Check full root setup/scan/frame (20Q+19), report (9Q+3), leaf/return (24),
loaded leaf step (43), internal entry (7N+28), native nonempty child scan/push
(20N+42), empty-child scan/advance (20N+33), returned-child accumulation
(31N+29), and final return (26) against the actual standard fixed native Code.
KernelRegs describes only constant/pointer register values. Node footprints
preserve the ancestor rows. The zero-depth node matches existing Pruned.result
and the finite traceWeight; its continuation uses the existing ExecWithin.loop_iter.
No alternative machine or run semantics is introduced.

The reporting-body/controller names are definitionally identical Code trees.
ScanMemory.congr transports the existing representation across disjoint writes
and removes duplicate root proof plumbing; push exposes its four-store frame.

Validation: targeted Lean MCP diagnostics clean for every new/updated phase
and ComplexityTests/SchonhagePruned.lean. Native interpreter regressions retain
depths 0/1/2, both signs, repeated/empty/mixed queries and an outside sentinel.
New kernel examples discharge the general node/register/address/signed premises,
connect the same negative-product final memory to charged controller execution,
and prove an empty leaf preserves the prior value cell. Diff whitespace passes.
No aggregate/all-six validation claimed: root/native audit coordination hold
is respected. Exact partial checkpoint tree 7fa4da67ea861a2bba3a6c430cd7e40996d0e794.

Abstracts: no impact; no new headline or endpoint claim. Original 1.9992
objective and sparse-product/ET/final composition remain open under #1394.
AI assistance: Codex implementation/proofs by continuation worker
codex-three-sum-continuation-t3-3dda8289.

* doc(matrix): replace copied source prose with API descriptions

Resolve the documentation-only requested changes on #1464:
https://github.com/cslib-community/complexitylib/pull/1464#issuecomment-6477111132
Rewrite source-quotation fragments and related explanations in Alphabets,
Identity, Full and Pruned for the local Lean declarations. Preserve the
mathematical attribution, bibliography keys, source pin and copyright.

A comment-aware comparison with 4f3226cd proves every noncomment byte is
identical in all four files. No declaration, proof, definition, program,
import or test changes. Existing checked source-statement quotations and
notation/quantifier/model/resource mapping in the PR remain unchanged.
The final source-comment screen compares against quoted fragments in the
actual pinned Sec2 and Statements/PaperStatements files, including the
known local renames; no substantial quoted fragment remains unmarked.

Validation is recorded for this exact tree in PR #1464. Source checkpoint
tree 8c3b87bb870d4c4e2202917357d19a7a139296e8. No abstract/catalogue/model/scope
or rendering impact; no new headline. The full native 1.9992 endpoint remains
open under #1394. Ancestor and descendant remotes are unchanged.

AI assistance: documentation repair and validation by Codex continuation worker
codex-three-sum-continuation-t3-3dda8289. Existing independent mathematical/API
and checked-source review coverage is retained; outside review of the bounded
documentation delta is requested, with no new review agent commissioned.

* refactor(finset): use order-embedding names in OrderGlue

Finish bounded #1545 from exact #1536 head66036150a. Replace generic
level/inner/outer API vocabulary with order-embedding/subset/complement names.
Remove five redundant membership/range/congruence wrappers, using Mathlib's
orderEmbOfFin_mem/range_orderEmbOfFin and ordinary substitution directly.
Migrate every actual Levels/Batch proof client with no deprecated aliases.
Keep filter_glue's generic name and rename its predicate parameter to P.

The retained generic statement headers are identical after the documented
renaming and binder alpha-renaming. All 48 Levels and 13 Batch declaration
statements and all definition bodies remain unchanged. The entire native
Encoding module is token-identical after comment removal; every other native
library file is unchanged. Source credit and pin are retained. Thus existing
State.init, Signed.encode, width/frame/cost and encodingL/R meanings remain.

Put the sum/option-versus-flat-digit explanation at the actual leftDigits,
rightDigits and termDigits hover docs, preserving their enumeration bodies
and order (row-major P terms, P0 digit9). Update the UPSTREAM naming follow-up.
Add generic nonconsecutive signed/zero/Option reconstruction clients using
Mathlib's orderEmbOfFin_unique, plus the routed optional #1536 asymmetric
native L4,m1,N29 prefix tests. Those compute headers/count/tables/snapshot and
decode/read ranks1 and2 with K0=2, distinguishing quotient/remainder blocks
and signed values without a full10^4-leaf encoder run or native body edits.

Reuse unchanged outside coverage: PR1496#issuecomment-6477111644 atb4936ce28,
PR1496#issuecomment-6480746578 at68bbe40e3, and PR1536#issuecomment-6480852097
at66036150a12046b29986d8f108c0afaf49d01c61. These are agent reviews, not human
approval. No new cited mathematical result or machine model is introduced.

Validation: PASS build --wfail --iofail, mk_all --check, test --wfail --iofail,
lint, lint-style and checkInitImports, with serial Smoke/global Axioms warmups.
Full citation-aware hygiene --check-simp, fresh changed-file lints against
actual base66036150a, strict PR-name and diff checks, and source/native identity
checks PASS. One thread, no cache downloads, PYTHONUTF8=1 on Windows.
Targeted MCP checks, full hygiene --check-simp and source/native identity
checks pass. Final source tree: 0c21b608cc5ed234527c73a3853a26132f52da0d. No source/ancestor merges or restacks.
Abstract assessment: no impact; no selected theorem/model/meaning/scope or PDF
change. This is generic ergonomics/testing only; full #1394 remains open.

AI-assisted implementation by codex-native-bandprep-t3-03b600bd, under parent
continuation-worker coordination. No new review agent commissioned; ordinary
outside coordinator review is requested when the bounded PR is ready.

* feat(WordRAM): prove all-depth pruned controller execution

WIP checkpoint for #1526; no PR and no completed component claim. The actual fixed native controller now has a depth-inductive execution proof with original Pruned.result values, stored queries/frames, concrete spatial preservation, input-derived signed fits and traceWeight charged continuation. Root loop exit discharges the continuation.

All new library modules through Recursive.exec_ready have clean targeted Lean MCP diagnostics. New concrete entry/result client reports no diagnostics, but the complete existing test file is still elaborating its VM regression commands; no final test-pass or all-six claim. Initialization/root-list/report/flat State.init composition, global width/fit clients, full component validation and independent review remain open. Aggregate checks are held for the coordinated root validation slot.

GenericRAM/Signed/Fits.lean is the unchanged blob from independently owned PR #1552, commit f276db1174333d3e6253b93878be8b95c1fcc713; credit retained. No native program body changed in this checkpoint. All proofs and invariant definitions are original native work; existing mathematical pruning/encodings retain their source credit. No selected-abstract impact or whole-3SUM endpoint claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* style(WordRAM): normalize native proof file modes

* feat(wordram): complete initialized sparse pruned-query execution

Complete implementation candidate for #1526 above #1520 exact 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6. Full ordinary native 3SUM and the published 1.9992 endpoint remain open under #1394. No PR yet; fresh exact-revision independent correctness/API/source review is pending before publication.

One fixed standard native program: 96 registers, at most 4096 flat instructions including halt, no width reads. Complete State.init -> pre-halt Runs -> Executes uses the same answer memory. Every supplied query, including repeats and empty/zero-depth boundaries, equals existing Pruned.result; runs_bilinear specializes existing encoding contracts to bilinearProduct. exec_kernel computes its powers/layout and has a reusable pointer/epoch directory contract. All child lists, timestamp decisions, stack/control/index arithmetic, signed products/adds and reporting are actual charged code, proved by the all-depth exec_ready induction; its continuation is discharged by the actual root exit.

Full charge including halt <= 8192*(L+Q+1+(L+1)*card(leaves(requested qs))). Ordinary source envelope M=A+B+10^L*A*B and address budget H=256*(L+1)*10^L+32*Q+512 derive input fit and execution at every physical W >= clog_2(M+H+1)+3. This is logarithmic in explicit component budgets; global 3SUM composition is not claimed. Inputs: raw L,Q then two canonical signed arrays of length10^L and unsigned query codes, after the actual standard length cell0. Returned output pointer is unsigned. All input/outside memory is preserved on initialized runs. Code/ExecWithin/State.init/Runs/Executes, signed kernels, Heap/Block APIs, existing mathematical pruning/encodings and Mathlib digit/log APIs are reused; GenericRAM/Signed/Fits is the unchanged blob from #1552 f276db1174333d3e6253b93878be8b95c1fcc713, with credit retained.

Pinned source anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5. Checked Git-blob quotation locators: ThreeSumApsp/Sec2/Lemma10.lean:148-150 (Pruned_eq_restrictTo_sum) and:565-566 (Lemma10.total_size). Source Pruned -> existing Pruned.result; source restriction -> Finset.piecewise; source Leaves -> leaves; all natural depths and arbitrary integer arrays retained. Native indexing directly uses existing leafIndex(privateLeaf), first coordinate least significant, inner digit9. Child prefix/stride/division are proved against the finite childSet/sliceAt semantics. Native code/proofs and cost are original, not supplied by source Light semantics or its sorted-segment implementation. Full checked quotes and model/quantifier/layout/cost/reuse mapping are in the prepared UTF-8 PR draft. Copyright retained in source/NOTICE.

Validation on tree bd6e74cce28dbd16c90291b847dac1a311402510: all SIX strict gates pass together, LEAN_NUM_THREADS=1, downloads disabled: build --wfail --iofail; mk_all --check; test --wfail --iofail (including Smoke/global Axioms); lint; lint-style; checkInitImports. Full citation-aware hygiene --check-simp; actual-base47-library/3-test changed-file and local lints; strict PR declaration-name audit; staged/unstaged diff checks pass. Register alias docs fixed the first lint finding; all native definition bytes are unchanged by that fix. Tests discharge real State.init positive/negative/empty/depth-two mixed/shared/repeated queries, sufficient-width family and failing fit boundary; callable signed wildcard with nonzero epoch and preserved input/outside sentinel also checks. No sorry, custom axiom or native_decide introduced.

Selected abstracts/catalogue/rendering: no impact, no new headline. ROADMAP/UPSTREAM preserve the open sparse-product/ET and global1.9992 gaps. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289 (OpenAI Codex); original finite source credit to Anthropic, PBC.

* feat(wordram): checkpoint computed wanted-query routing

Partial implementation of #1561 by codex-three-sum-continuation-t3-3dda8289.

Implements actual fixed standard 96-register routing/grouping code with computed valid-mask tables, tile counts, prefix offsets and stable scatter. General checked proofs cover the digit kernel (15L+10), one-query routing (15L+25), exact outStrOfPos/queryIndex mapping, computed header/count/relocated-table initialization (16L+(12L+33)*2^L+83), input-memory frame and original-input-derived fits. Generic finite stable-counting positions are injective and bijective.

Targeted Lean MCP diagnostics clean for all nine new library modules and the regression suite. Actual initialized interpreter regressions pass for empty input, zero depth, duplicates and an asymmetric K0=2 three-band case; no encoded leaf array is materialized in routing tests. The 96-register program computes every routing/count/prefix/scatter decision.

INCOMPLETE: general native counting, prefix and scatter execution invariants, initialized flat complete-run/width/frame/bound clients, final static hygiene and ALL SIX gates remain pending. This checkpoint is not a PR or acceptance claim. Mutable global audit slot remains with parent; no aggregate performed here. Full #1394 native sparse/ET solver and ordinary 1.9992 endpoint remain open.

The child branch merges unchanged #1554 at 12abeee84 onto frozen #1562 base 0c2e0ebea. The local merge 60bec64398 only reconciled shared credit/roadmap/upstream prose; no ancestor branch was edited. Original implementation mathematics/code by Erik Demaine with AI assistance. Existing finite Schonhage and band/encoder/pruned interfaces are reused with their original credit retained.

* feat(wordram): checkpoint wanted count-pass proofs

Continuation of #1561 from 06b3563e7. CountStep has clean targeted Lean MCP diagnostics, including exact 14-instruction native count update and memory frame. Dense zeroing and count-loop composition are implemented; Count.lean has one pending elementary nonnegativity/address-bound proof at line 152. This is an explicitly incomplete source checkpoint, not all-six validated or a PR. Work is paused solely to prioritize the bounded outside-requested #1562 repair. No program/public statement in #1562 changed.

* doc(finset): restore ordered-gluing source credit

Restore the original AlmanWilliams2026 Section 2 citation and finite-scope sentence removed by the naming refactor. No Lean declarations or proof tokens change.

AI-assisted coordinator fix by coordinator-codex-queue-20261028-ready-c. Original implementation and source authorship retained; independent delta review and new hosted CI requested on PR #1554.

* fix(wordram): address pruned-query review findings

Bounded documentation/test repair for #1562 / #1526 by codex-three-sum-continuation-t3-3dda8289, above exact 0c2e0ebea6199ac1fbe9b2e048ce24b9410f8d1a.

Fix both ROADMAP reference definitions, distinguish client contracts from exported internal stage APIs, and document why the narrow ArrayAppend/InputArray topics avoid Allocation interface/dependency fanout. Extend existing post-integration issue #1553 with the exact pruned power register map, 4L+10 accounting, affected consumers, fused-encoder accounting and sibling integration order; no power program or ancestor is changed.

Add one fully admitted signed runs_bilinear client: depth0, original arrays -3 and 2, actual encodingL/R premises discharged, original-input magnitude/address fits discharged, physical width10, same actual State.init prefix Runs and charged halt, and output memory at address6 equals Signed.encode(-6). Targeted Lean MCP diagnostics pass.

Validation: all six strict gates passed together on final staged tree f4cfd4ae0d838c4b4bf4c43c924f400744450957, including Smoke/global Axioms; one thread/downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base 47-library/3-test module lint, changed-file audits, strict declaration-name check and staged/unstaged diff checks pass. Local machine-readable evidence: .lake/codex-three-sum-continuation/pruned-review-repair/{summary.json,static-summary.json,identity.json,*.log}.

Source identity audit against 0c: all seven changed library files have identical comment-free tokens. Every public library statement, definition, native program and proof is unchanged. Every existing test byte is unchanged except the single inserted concrete client. Abstract/catalogue/rendering assessment: no impact.

The prior inside-fleet technical review at issue1526#6484055995 and outside FINAL at PR1562#6484177608 cover unchanged native semantics/source mapping. Fresh focused outside review of this repair is requested; no new review agent was commissioned, and no outside/human/platform approval is claimed. All original Anthropic, PBC credit retained. AI-assisted implementation by OpenAI Codex.

#1561 source is preserved separately at 7772a3497017078b37d1e04004225fae28baddad with its pending native grouping proof work explicit. Concrete sparse-product/Exact Triangle programs, full input/time/width composition and the original native 1.9992 endpoint remain open under #1394.

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(imports): regenerate aggregate after Chan-He parameter integration

* feat(wordram): route and group wanted thin-product queries

Implement #1561's complete native routing/grouping component. State.init prepends
the native length cell to [L,m,N,Q] followed by raw coordinate pairs.
Actual finite unsigned standard Code computes tables, tile keys, codes, counts,
prefix offsets and stable scatter. No layout/run/time/permutation certificate
is supplied. Fixed 96 registers, <=4096 flat slots including halt, no width reads.

Wanted.runs_grouped proves actual State.init prefix Runs and charged halt at the
same final memory, exact per-occurrence code/original-position equations, exact
wantedStrings tile spans, in-array span/code bounds, permutation, terminal Q,
input/outside frame and final boundedness. All admitted physical widths are
covered by the positive clog2(wordBudget+1)+1 threshold, with original input fit
derived. All initialized reachable prefixes are bounded. Complete native charge
including halt <=128*(L+1)*(Q+numBands^2+2^L+1). No 10^L scan per query/tile.

Validation: final tree 6c8164db02df348a46ffe0cf5972415977c62939. All SIX strict gates passed
together: build --wfail --iofail; mk_all --check; test --wfail --iofail (including
Smoke/global Axioms); lint; lint-style; checkInitImports. One Lean thread, cache
downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base
57-library/3-test lints, changed-file/name/staged+unstaged diff checks all pass.
The initial test-only module-boundary VM evaluation failure was fixed by using
the existing non-module native-test convention; every interpreter check remains.
The corrected frozen tree passed the complete six-gate sequence again.

Base: #1562 ce77926c393ce34e7962759bb412172c4584a67c. Preserve normal merges.
Unchanged sibling prerequisite #1554/#1536 is retained at exact
702c14bcf9896655b17c9b2dd5e02e6f270c9966: all 33 library and two test blobs are
byte-identical. Wanted contributes 24 library modules and one test. Existing
unchanged sibling reviews are reusable; no ancestor branch or remote was edited.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Sec2/Theorem5.lean:44-46, checked against its Git blob:
"outStrOfPos lay I J ∈ wantedStrings lay W (bandOf L m I) (bandOf L m J)".
Tiling/Definitions.lean:128-131 defines that filter/image set; reuse it unchanged
with W=qs.toFinset and separately preserve original list occurrences. Source
Programs/Sec2/Theorem5/Wanted/Codes.lean:13-19 motivates routing. Actual native
code uses the existing least-significant-first queryIndex/leafIndex dictionary,
digit9 for the inner wildcard and 3*row+col otherwise. It proves agreement rather
than identifying the Light program's separate numbering, semantics or costs.
Native code/proofs/stable-scatter theory are original; primitive counts reuse
Mathlib Nat.count directly, with zero/successor/bound/monotonicity APIs and the
existing count_eq_card_filter_range identity. Redundant count/offset wrappers
and their repeated elementary lemmas are removed. Every client is migrated;
Program.lean and PackProgram.lean are byte-identical to checked checkpoint
2e2cc39675a30b024c3932bd23f06163a33c8925. Imported finite source credit is
retained. All three source slices equal the pinned Git blobs.

Fully admitted kernel clients cover empty/zero depth, repeated pairs, and the
L4/m1/N110/K0=2 asymmetric family, tying answers to actual Runs/halt. Actual VM
regressions cover all expected grouped words, original indices, offsets and
input/outside frame. Fitting and failing physical-width premises are checked.
No sorry, custom axiom or native_decide. No curated abstract/catalogue/PDF impact.

Shared-band calls, actual buffer/header adaptation, pruned-kernel invocation,
answer reconstruction, sparse-product/Exact Triangle and full native ordinary
3SUM composition/1.9992 remain open under #1394. This is a component milestone.
Fresh nonauthoring correctness/API/source review is pending (root arranges);
outside review remains required. No PR, integration or approval claim.

AI-assisted implementation: OpenAI Codex, session
codex-three-sum-continuation-t3-3dda8289. Author/source credit is preserved.

* fix(imports): regenerate aggregate after shared-encoder integration

* perf(wordram): reduce native parameter proof heartbeat budget

* chore(wordram): scope measured parameter proof budget to reduction task

* perf(schonhage): focus cell arithmetic and use the default heartbeat budget

* fix(doc): restore unrelated upstream coordination records

Restore the exact 231-line tail common to both integration parents after review caught an overbroad conflict-marker match. The intended 3SUM integration prose is retained; no Lean change. AI-assisted correction by OpenAI Codex.

* fix(imports): regenerate band-preparation aggregate from merged inventory

* doc(order-glue): preserve reviewed source credit through supplier merge

* doc(order-glue): restore paper citation and finite scope

* feat(wordram): checkpoint native queried-product construction (#1581)

Unfinished implementation above exact a6e4005b2 on the existing isolated child branch.
The fixed native program computes both producers, protected layouts/copies, tile ABI,
one shared timestamp directory, actual pruned calls and original-order reconstruction.
Targeted Lean MCP checks pass for the new native program and supporting original-input,
parameter/layout, copy/frame, grouping-span, raw-conversion, producer and directory proofs.
Five actual initialized interpreter regressions pass: empty, signed/duplicate, raw01,
multiple tiles/padding/epochs, and nonempty inner tensor coordinates.

This is a recovery checkpoint, not a complete native product result or PR candidate.
Full tile/epoch loop and reconstruction correctness, initialized composition, complete
charged cost and logarithmic-width/saving results remain open under #1581/#1394.
All six/global/static validation remains held for root; no aggregate or static audit ran.
Existing curated abstract statements and scope are unaffected; no headline promotion.
Implemented personally by codex-three-sum-continuation-t3-3dda8289 with AI assistance.

* fix(imports): regenerate thin-product aggregate after main integration

* doc(wordram): separate shared-encoder integration records

Keep the reviewed finite-matrix supplier records intact and record native-encoder scope and source credit separately, so squash-queue integration does not overlap the ancestor documentation hunks. Preserve code, tests, concrete bounds and the complete unrelated upstream-record suffix. Queue revisions are used only for read-only projection, never as parents.

* doc(matrix): keep progress links out of shared reference append block

* feat(wordram): checkpoint complete queried-product source before supplier merge (#1581)

Local recovery checkpoint only. Complete native queried-product execution, initialized
clients, quantitative thin saving and logarithmic width have clean targeted Lean MCP
diagnostics. Import generation adds the 29 new modules. No all-six/static validation or
independent candidate review is claimed by this checkpoint; it is not a PR candidate.

The actual #1576 supplier advanced from a6e4005b to integration91f485ec. Preserve this
source before a normal child merge, reconcile only shared docs/imports, regenerate the
aggregate, then validate the final source together against the actual supplier.

Original native implementation by Erik Demaine with Codex assistance, reusing credited
finite Anthropic Section 2 mathematics and actual native producer/router/pruned kernels.
Ordinary-3SUM/Exact Triangle and the full #1394 1.9992 endpoint remain open.

* feat(wordram): execute queried thin-matrix products (#1581)

Complete #1581 implementation candidate under #1394, awaiting required fresh exact-head
non-authoring correctness/API/source/resource review. No PR is opened or integration
approval claimed. Normal child history preserves source checkpoint af208636b and actual
reviewed #1576 supplier91f485ec; no ancestor branch or remote was edited.

One actual fixed standard unsigned WordRAM program per signed/raw input mode consumes
original headers [L,m,N,Q], both row-major integer matrices X:N x 4^m and Y:4^m x N, and
raw interleaved requested coordinates. It computes tables/layout, shared encodings,
Wanted counts/prefix/stable scatter, tile pointers, decoded queries, directory/epochs,
pruned evaluation and original-order reconstruction. Raw nonnegative entries are doubled
by actual charged load/multiply/store instructions (including raw0/1 -> signed0/2).
There is no source Light machine, assumed layout, sorting, solver, run or time oracle.

QueriedProduct.exec/runs/runs_wide prove actual native execution from original words /
State.init, same-y prefix Runs and charged halt, every original occurrence's exact
Signed.encode((X*Y)[qs[i]]) including duplicates, original-input restoration and the
complete outside frame. Generic execution assumes m<=L, original absolute entry bound A,
raw nonnegativity in raw mode, and the explicit original numerical magnitude/address
admission; it has NO query-sparsity hypothesis. The real pointer/epoch kernel uses a
directory initialized once, with scratch/frame separation and propagated fresh bounded
epochs. Code has 160 registers, <=32768 flat instructions including halt, no width reads,
and is independent of dimensions, magnitudes, query counts and physical widths.

Thin hypotheses: L=19m, D=4^m, N>=D^18. With distinct-set sparsity
|qs.toFinset|*2^m<=N^2, complete charge including halt is <=
65536*(19m+1)*(65*N^2/D^(1/18)+Q). With the stronger occurrence hypothesis
Q*2^m<=N^2 it is <=4325376*(19m+1)*N^2/D^(1/18). Multiplicity/output work is never
replaced by set cardinality. runs_thin holds at EVERY physical W>=
128*clog_2(N+Q+A+2), deriving InputFits and all intermediate admissions. Its explicit
magnitude/address envelope is <=2^40*(N+Q+A+2)^10, allocation <=128*(N+Q+A+2)^4.
Physical all-prefix boundedness is proved; a separate source-polynomial prefix bound at
arbitrarily larger widths is not extracted here. ET record/input adaptation and all its
copies/calls, Exact Triangle solving, ordinary3SUM composition and improved Section4 /
1.9992 remain open. This component proves neither full3SUM exponent.

Source mapping checked against actual Git blobs at anthropics/formal-math
16a5ce41304fcdaea4e0be7c132e1c361dc26da5, under3sum-apsp/ThreeSumApsp:
- Sec2/Theorem5.lean:61-67 concludes the pruned band value equals (X*Y) I J.
  Existing finite thin_product_spec/MaskTable.layout/bandArrayL/R/encodingL/R and
  wantedStrings are reused; W=qs.toFinset, with a separate occurrence permutation.
- Sec2/Theorem5.lean:146-149, paraphrase of its conclusion:
  ((sum T in tiles (19*m) m N, |Leaves(wantedStrings lay W T.1 T.2)|):Real)
    <=33*(D m)^(-(1/18):Real)*N^2.
  Source hypotheses N>=D^18 and W.card*2^m<=N^2 are retained. Existing encoding,
  tile/leaf/passed-set estimates bound ACTUAL native execution, not an assumed cost.
- Programs/Sec2/Theorem5/Pruned/AllTiles.lean:86-92 and Wanted/Report.lean:30-37
  are the per-tile/report specification references; Solver.lean:150-161 is conditional
  on Light callees. Native code here is original, accepts stable unsorted duplicates,
  charges empty tile calls and proves all native callees directly. Instruction constants,
  widths, protected layout and frames are independently proved for the native model.
The UTF-8 PR mapping draft contains two exact Lean quotation slices, both checked against
Sec2/Theorem5 at that pin; all four cited source files equal their pinned Git blobs.
Anthropic, PBC's existing mathematical source credit is preserved. New native programs
and execution/resource proofs are original work by Erik Demaine with Codex assistance.

FINAL VALIDATION (whole source tree, not only this commit's proof/doc delta):
Tree 555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; four compiler threads; cache downloads disabled.
1. lake --no-cache build --wfail --iofail : PASS (13.56s).
2. lake --no-cache exe mk_all --check : PASS (11.33s).
3. lake --no-cache test --wfail --iofail : PASS (27.14s).
4. lake --no-cache lint : PASS (43.22s).
5. lake --no-cache exe lint-style : PASS (17.09s).
6. lake --no-cache exe checkInitImports : PASS (16.8s).
Strict tests cover new initialized/product clients, Smoke and global Axioms.
Full citation-aware hygiene --check-simp, fresh actual-base30-library/one-test lints,
changed-file checks, 25-name strict final-body audit and staged/unstaged diff checks PASS.
Actual comparison base: 91f485ec38ca6b878f338e2cdbdedbf5d4f20257.
3533 inherited source/abstract files checked; only the existing tile-key lemma is exposed
with the same statement/proof. All35 inherited sibling blobs equal actual parent91.
All native code bodies/register definitions are byte-identical to af208636b;
comment-erased Program tokens match. Current full Program source SHA256:
2b86fe04f6afa49a7eadc75292559dca62f4d65c5f7bdaf3b1f4386994aa8ebc
Public Header.exec_layout statement is identical; proof split passes at DEFAULT
heartbeats, without a new allowlist entry. Final register docs clear the initial lint
failure (47 undocumented aliases); prior incomplete/failed checkpoint logs are retained.
Checked PR/source mapping draft SHA256: be43f587d5c0ac6dd871093d5d19c283ef7dd9732b5c5d3cfa77b24e42899a24
Local reproducible records: .lake/codex-three-sum-continuation/queried-product/
summary.json, static-summary.json, source-native-identity.json, source-mapping.json,
run-identity.py, final-body-names.log and per-gate logs. This commit description is the
durable evidence until a PR exists; issue1581 links it.

Examples discharge real width/magnitude premises and connect the same final y to prefix
Runs, halt and memory: signed/raw, duplicate, padded/multiple-tile, positive/zero depth,
empty inputs, nonzero original header, adjacent sentinel, strict budget boundary and
nonempty symbolic admitted thin family at every inner depth.

Abstract assessment: no selected statement/definition/scope/catalogue/rendering impact.
ROADMAP/UPSTREAM preserve remaining1394 scope; no headline promotion.

Fresh review of all NEW native semantics/cost/width/frame/init/API/source mapping remains
pending root arrangement. Unchanged prerequisite outside coverage can be reused after
the recorded identities (1576 outside FINAL6487515809). No child watch/approval/merge.

* style(Schonhage): remove trailing space in queried products

Independent nonauthoring /root/queried_product_review examined the complete
native #1581 layer at ff31104be7acf96798c13b38cb079c58605a1ec3 against
91f485ec38ca6b878f338e2cdbdedbf5d4f20257, including all 29 new library
modules, actual execution/frame/width/cost, multiplicities, source mapping
and initialized clients. No correctness/API/source/resource blockers; this
is agent review within the root fleet, not outside or human approval.

The single P3 finding was a trailing space in Product/Groups.lean:111.
This coordinator correction removes exactly that ASCII space. An exact
byte check and git diff -w verify no other change. Full base-to-head
diff --check now passes, covering committed changes as well.

All six gates and static/source checks pass on reviewed tree555b6b52,
as recorded in ff31104. The whitespace delta is validated separately;
final hosted CI and outside coordinator review remain required.
Curated abstracts unaffected. AI assistance: Codex.

* doc(Schonhage): retain band catalogue encoding contract

Restore the one supplier sentence in UPSTREAM.md about unchanged leaf ordering and
canonical signed words, addressing optional nit1 in outside FINAL6493515098 on PR1615.
All other paragraphs are preserved. Exact byte comparison against9a57e134 verifies
this one sentence is the entire tracked delta; all Lean/native/math/API/abstract
source and every other tracked byte are unchanged.

Documentation-only validation: consistency with the existing catalogue interfaces,
full base-to-head diff --check, citation/simp hygiene and strict25-name final PR-body
audit pass. No Lean, import, aggregate or full rebuild was run for prose. Original
all-six evidence remains for tree555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; this does
not claim a new-head all-six run. No changed abstract meaning or rendering.

Full nonauthoring native/source review and outside FINAL coverage are reused across
this bounded doc delta. A focused outside DOC delta check is requested, not another
full review. Register naming remains a separately coordinated follow-up; existing
nonzero interpreter coverage was accepted, so no test change is included.

AI assistance: Codex implemented the requested one-sentence documentation repair.

* fix(imports): regenerate wanted-routing aggregate from actual inventory

* wip(wordram): checkpoint callable thin-product source

Personal #1618 source checkpoint before integrating the refreshed #1615 parent. Complete generic native memory-window compiler, computed-modulus callable raw01 product, initialized Runs/halt, width/window/cost and dirty-memory/frame tests have targeted Lean MCP diagnostics clear. Canonical imports and final all-six/static validation remain pending; this is not a publication candidate. Reuses the exact landed NatClog module from a1d1fa882, with original credit. No full Exact Triangle or ordinary3SUM endpoint claim.

* feat(WordRAM): run queried thin products in caller-owned memory

Implements the bounded callable prerequisite #1618 under #1394. Owner/session:
codex-three-sum-continuation-t3-3dda8289, personally on
work/three-sum-native-callable-product-20261029. Ordinary parent merge904c62068
preserves the reviewed #1615 a8cb7c984cd77e7eb150522e1353a2da22c84839 source.

Generic MemoryWindow.compile adds actual add/load/remainder and add/store
instructions, retaining ordinary Code/Exec/ExecWithin/Runs semantics. Proved
bounded native-source execution transfers within3x charged instructions/code
size, with3 additional registers and a full outside-window frame. The clipped
memory view is a value relation, not another run semantics or an algorithm oracle.

Concrete raw01 CallableProduct derives the actual source execution from original
matrices/request occurrences. Native NatClog/Power compute the source modulus;
fixed register normalization, translated producer/query execution and two exact
input/output span-normalization loops are all charged. Fixed163 registers,
<=131072 flat slots including halt, no physical-width reads. Actual initialized
prefix Runs and halt refer to the same final data and exact requested products.
Local input is restored and caller memory outside[b,b+M) is preserved.

Thin admission is explicitly D=4^m,L=19m,D^18<=N, with raw zero/one matrices.
M=2^(128*clog2(N+Q+3)) <= (2*(N+Q+3))^128. No whole-window or catalogue clear/copy.
Every W>=256*clog2(b+N+Q+P+5) suffices. For arbitrary dirty callers P bounds EVERY
initial register/memory word, including physical loads before remainder. For the
initialized client scratch is zero and P only bounds the protected caller prefix.
All-prefix assertions are physical word fits, not an independent-of-W polynomial
intermediate-word theorem. The explicit window reservation is polynomial.

Including base loading/halt: charge <=3*(originalT+1)+2048*(N*D+Q+1).
Distinct-set sparsity retains+Q; occurrence sparsity Q*2^m<=N^2 gives
17301504*(19m+1)*N^2/D^(1/18). Neither sparsity premise is needed for execution.
The ET-record adapter, fast ET/backend/witness composition and full ordinary3SUM
1.9992 remain open. Root retains parameters/prime selection/outer ET host.

FINAL VALIDATION: tree f8ff0209469bb668837b9602fb71ecf3aaf3bc99.
All SIX together PASS, four compiler threads, cache downloads disabled:
lake --no-cache build --wfail --iofail (22.27s)
lake --no-cache exe mk_all --check (13.75s)
lake --no-cache test --wfail --iofail (183.59s), including Smoke/global Axioms
lake --no-cache lint (45.02s)
lake --no-cache exe lint-style (22.14s)
lake --no-cache exe checkInitImports (16.56s).

Final full hygiene --check-simp, actual-base12-library/two-test lints,
changed-file checks, strict14-name PR draft audit, COMPLETE a8-to-final diff
--check, staged and unstaged diff checks all PASS. Canonical imports generated;
all new tracked file modes100644. No sorry/custom axiom/native_decide or new
heartbeat override. Only justified finite syntax-check recursion-depth options.

Source audit: all3686 inherited source/abstract files and modes unchanged from
actual reviewed parenta8. Original Product, Wanted/Pruned/Band/encoding, NatClog
and Power suppliers remain unchanged. New MemoryWindow and Callable/Program files
are byte-identical to source checkpoint7cb7ade0a. ArrayNormalize native bodies and
theorem statements are identical; the only API metadata fix replaces blanket
exposure with explicit exposure of its two code definitions. All affected clients
check with the public pure-specification lemmas. The deliberately interrupted e8
checkpoint is NOT used as an all-six claim. One overlapping MCP dependency setup
had a transient Windows artifact lock; serial retries and final six are clean.

Kernel clients tie actual initialized Runs/halt to exact physical output and
caller sentinels. Native VM cases cover nonzero/zero products, duplicate/empty
queries and dirty workspace above the source modulus. A direct compiler client
loads27%8=3, increments/stores4 and preserves both adjacent sentinels. Concrete
numerical width budget passes387/fails386; zero N fails the explicit thin premise.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Sec2/Theorem5.lean61-67 (exact products),146-149 (sparse leaves).
Local file equals the pinned Git blob; conclusion fragments checked verbatim.
Finite mathematics/source credit is inherited. Compiler/controller/proofs here
are original native work, not a source-Light semantics/count transfer.

Abstract assessment: no own selected statements, models, catalogue or rendering
change. No whole3SUM headline promotion. ROADMAP/UPSTREAM retain the #1394 gap.

PUBLICATION LIMIT: #1615 landed DURING this audit via ee1ab6f08ac77b1404d19c0371b0b0ac7daaa915
(reviewed carrier7da96e65cf2c352d08142bb5a7ea65098008d8cc); main now includes later
native/frontend additions. The five direct machine/arithmetic prerequisites and
entire Schonhage supplier remain byte-identical. This exact validated candidate
is preserved on its reviewed a8 parent for coordinator-directed current-main
compatibility work before publication. No parent remote is changed.

Fresh exact-whole-layer NONAUTHORING compiler/callee/API/resource review is still
required and is owned by root. Existing supplier reviews do not approve the new
compiler. No new PR, outside approval, merge or endpoint completion is claimed.

Local reproducible records: .lake/codex-three-sum-continuation/callable-product/
summary.json,static-summary.json,source-identity.json,source-mapping.json,
pr-body.md,audit-source.py and logs. Durable evidence is this commit description;
the issue handoff links it. AI assistance: Codex implementation/self-review with
Lean MCP; fresh nonauthoring and outside reviews remain pending.

* refactor(WordRAM): align ArrayNormalize module name and admission prose

Address optional review nits on PR1625 at fd1f2fce. Rename Normalize.lean to ArrayNormalize.lean with identical file bytes, migrate every consumer and the sorted canonical aggregate without a compatibility shim, say widths at least the threshold, and record that full VM cases use m0/N1 while general execution/resource proofs cover all valid geometry. Existing review6497681504 is already linked; the missing-record observation was a timing snapshot.

Validation: serial targeted Lean MCP ArrayNormalize, WordRAMMemoryWindow and SchonhageCallable all clean. Exact moved-blob identity and comment-erased Lean token identity modulo module-import migration pass; public declaration statements/bodies/attributes and native program meaning are unchanged. Canonical source import order and removal of every old path verified. Full citation/simp hygiene, targeted repository doc-name/new-test checks (12 modules/2 tests), strict14 PR-body names and complete d010-to-final/staged/unstaged diff checks pass. No aggregate/import-generation/all-six run for this bounded delta. Original f5/f8 all-six and final fd1 hosted all-checks green run40879707895 remain scoped to those revisions; repaired head requires refreshed hosted CI before integration. Full compiler/source reviews reused; focused module/import/doc/test-comment delta review requested after push. No abstract/model/resource change or endpoint claim. Evidence .lake/codex-three-sum-continuation/callable-product/review-rename.

AI assistance: Codex implemented the mechanical API/documentation repair; no self-approval, human approval or new full review is claimed.

* feat(ExactTriangle): checkpoint actual record product composition

Personal worker codex-three-sum-continuation-t3-3dda8289, issue1626, ordinary child from1625 repairce1062483; no ancestor remote edits. Implements fixed320-register actual record selector/log/header/copies/complete163-register callable bank, all readback separations from actual producer Output, raw01 identity, occurrence/query-cap sparse bound, native initialized producer→first-record consumer, same-y prefix Runs/chargedhalt/answers/frame, original positive logarithmic width and physical-width-independent polynomial prefix words/support. Generic caller consumes every occupied ordinal. Initialized fixed client selects ordinalzero and proves it exists; this is not an outer instance loop or aggregate ETsolver.

PreparationInput.exec_input is the coordinator-authorized narrow API seam, reusing the existing derivation/private fits_at_width; public runs_input reuses it with unchanged statement/hypotheses/budget. No native producer/callee program or input definition changes. All own modules, modified producer module, and new native prefix/copy/admitted closed positive-depth initialized test have clean targeted Lean MCP diagnostics. Tests include actual second-record decode at m2,n16^18 and raw01 copy; the huge complete input family is kernel-checked symbolically, not VM-enumerated.

SOURCE CHECKPOINT ONLY: canonical import generation, final all-six, full static/hygiene/source identity, PRmapping and required fresh nonauthoring review remain pending. Root owns sole aggregate/static slot; no such process was launched. Original #1394 ordinary3SUM1.9992, aggregate ET/outerloop/prime/parameter/backend/witness work remain open. No PR/review/approval/merge/watch. Credit retained; original native adaptation/composition by Erik Demaine with Codex AI assistance.

* feat(ExactTriangle): validate initialized record product adapter

Refs #1626. The full #1394 ordinary distinct-position 3SUM 1.9992 endpoint remains open. No PR is opened by this worker; fresh whole-layer nonauthoring review is pending coordinator arrangement.

Validated source tree: 8f59a54c6de13459c0a85d86546b12fc12c5003c
Pinned main base: 8569de69ef05751c7e39e2ddd99d24d49f6aa1ec
Preserved source checkpoint: 8f46341d456f6e3651beb02aac898a22a34a9883
Normal main merge: 8612aff051db4590f15efcb02fa37deb2992f6f5. Only ROADMAP/UPSTREAM conflicted; complete landed prose is preserved. After the checkpoint the only own Lean deltas are canonical imports and terminal Header proof simplification. Native programs, public statements and supplier credit are preserved.

Original native implementation: fixed 320 registers and <=132352 flat slots including halt, no width reads. Reads the real six-word record/heap, computes m using NatLog, copies raw X/Y and all interleaved query occurrences, and invokes the complete 163-register runtime-relocated callable bank. Copying keeps raw 0/1; the callee charges signed doubling once. No catalogue/window snaps…
SamuelSchlesinger added a commit to chris-ai1/complexitylib that referenced this pull request Oct 30, 2026
cslib-community#1700)

* feat(exactTriangle): relate lopsided queries and matrix products

Adapt the finite counting interface and signed digit expansion from anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5 for milestone #1438. This is a mathematical interface; native preprocessing, fast solvers and full composition remain under #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 #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 #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 e41e1dda62a10c8f89917e2ccab54fbbedad1ad4, 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(matrix): prove the tensor recursion and pruned evaluation core

* doc(matrix): clarify the overlapping contributing leaf

* doc(matrix): make tensor and pruning explanations standalone

* 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 #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 8e182b091199b323c7e6271acebbfcee2e4cdd18 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(matrix): prove finite thin-product correctness and sparse bounds

Implement the complete finite mathematical milestone of #1463 above #1464:
valid layouts, batch-product correctness/error exclusion, arbitrary-N tiling,
exact requested signed products, order/cardinality estimates, geometric tails
and the derived sparse bounds. At D=4^m, L=19m, D^18<=N and |W|*2^m<=N^2,
encoding entries are bounded by4*N^2/D^(1/18), contributing leaves by33
and passed-set cardinalities by(19m+1)*33 times that scale. Add finite
magnitude and auxiliary object-count bounds. None are native instruction costs.

All six final local gates pass: strict build, aggregate check, strict tests,
environment lint, style lint and init-import check. Hygiene --check-simp,
changed-file lints (14 library modules,1 new test) and diff --check pass.
Tests kernel-check signed results3,20,0,-8, true padding, empty/sparse and
negative-order boundaries, and instantiate all aggregate bounds with jointly
satisfiable m=1 parameters and symbolic matrices without resource overrides.

Read-only math/API review by /root/thin_product_review is clear after fixed
doc references/magnitude wording/quotation hygiene. Focused final delta review
by /root/thin_product_final_delta_review is clear for tree
b021e2d9340b433a9fdb129882351e158e8c289f, reusing the prior mathematics review.
These are internal agent reviews, not outside coordinator or human approval.

Source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
selective Section2 finite mathematics; Anthropic credit/NOTICE retained.
Abstract assessment: no impact on selected headlines, catalogue or rendering.
Full native tensor/sparse-product/Exact Triangle code, native Chan-He #1446,
whole input/time/width composition and improved1.9992 remain under #1394.

AI assistance: implementation and reviews with OpenAI Codex, worker session
codex-thin-product-math-20261028.

* 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 #1446; independent complete parameter subtask #1458.

* doc(matrix): explain finite thin-product guarantees in the Lean API

Restack #1463 above repaired #1464 without changing the reviewed mathematics.
Rewrite 149 documentation blocks in 14 modules as standalone descriptions;
replace operation-cost and word-size narratives with the exact entry, leaf,
passed-set and specified-value quantities proved. Preserve pinned Anthropic
credit, source locators, statements, definitions, proof bodies and imports.
An independent comparison with original ee288fb16 confirms that all code bytes
outside comments are identical, including code whitespace.

Validation of this final tree: all six gates pass together (strict build,
aggregate check, strict tests, environment lint, style lint, init imports).
Citation-aware full hygiene --check-simp, changed-file lints (14 library modules,
one test) and git diff --check pass. Lean MCP FiniteMagnitude diagnostics finish
without errors or warnings. Serial Smoke/Axioms warmups avoid the shared-host
memory failure previously seen when these import-heavy clients run together.

Tests and substantive math/API review evidence are retained from the original
reviewed tree b021e2d9340b433a9fdb129882351e158e8c289f in ee288fb16. This change
is documentation-only; /root/draft_thin_docs authored the scratch map and the
continuation worker inspected/applied it. That drafting is not independent review.
Earlier math reviews are inside-fleet agent reviews, not outside or human approval.
Outside coordinator review will be requested on the final PR. No selected abstract,
catalogue or rendering is affected.

PR publication remains held while native dependent restacks are repaired, per
root sequencing. #1394 remains open: native shared encodings/pruning/Exact Triangle,
Chan-He #1446, complete Convolution/ordinary input/time/width composition and the
improved Section4 route to exponent1.9992 are not supplied by these finite counts.
AI assistance: OpenAI Codex workers codex-thin-product-math-20261028,
codex-three-sum-continuation-t3-3dda8289 and /root/draft_thin_docs.

* fix(wordram): repair parameter proof hygiene and ceiling-log docs

* feat(wordram): implement shared tensor encodings

Complete the shared left/right encoder milestone #1493 above parent b4936ce28
(#1496). Fixed standard-WordRAM code with 32 registers computes every public
encodingL/encodingR leaf from actual initialized flat signed inputs. The native
bound is 240*(L+1)*10^L instructions plus halt, with explicit magnitude/address
inequalities, two alternating buffers, charged initialization/copying and the
complete outside frame. The full ordinary native 3SUM objective #1394 remains
open; this component supplies no sparse-query or Exact Triangle solver.

Validation of tree b598513f02cc064eaf50d3c680684c19289ffd71 against
b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
changed-file lints (13 library modules, one new test) and diff checks pass.
Tests execute both encoders at depths zero, one and two, compare all 100
depth-two leaves with the unchanged public encodings, preserve input/frame
sentinels, and cover adjacent word widths and all three copy block orders.
Kernel-checked concrete flat executions discharge every width/magnitude
premise. Selected abstracts, catalogue and rendering are unaffected.

AI assistance: OpenAI Codex implementation and self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Independent correctness/API review is pending;
this is not an approval or a claim that the complete 3SUM objective is done.

* test(wordram): connect encoder witnesses to charged runs

Connect the zero-depth and two-stage regression memory witnesses to the
actual prefix Runs already proved by runs_left, rather than discarding that
conjunct. Bound the prefixes by 240 and 72000 instructions and expose the
same executions' charged halt at n+1. All library code is unchanged from
ad3e09735a116f9868e87cf7ae6af59e5cb6a285 (tree b598513f02cc064eaf50d3c680684c19289ffd71).

Validation of tree 8277017f2c63a5851b63a5d4b49775a9fb96d62d against actual
parent b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
fresh changed-file lints (13 library modules, one test), strict PR-draft
declaration-name check and staged/unstaged diff checks pass.

Independent nonauthor agent review 8034f3da approved exact ad3e09735/tree
b598513f, covering full code/model/cost/width/source and ArrayCopy with no
blockers. It is inside-fleet review, not outside approval. This test-only
delta addresses its optional witness-connection finding; focused final
test/source-mapping review remains pending through the parent coordinator.
No selected abstract, catalogue or rendering impact. The full ordinary
native 3SUM objective #1394 remains open; this implements encoder issue #1493.

AI assistance: OpenAI Codex implementation/self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Publication remains on hold for focused
review; this commit is not approval or a whole-3SUM completion claim.

* feat(wordram): checkpoint native pruned-query controller proofs

Work in progress for #1526. Fixed native controller and initialized-input interpreter regressions, numerical child-set bridge, call-count potential, charged power/scan/clear/frame/arithmetic/return kernels. Individual current Lean modules have clean MCP diagnostics; the earlier strict targeted scan/count/value/test checkpoint passed. The complete global controller invariant, native evaluator theorem, actual initialized flat-run clients and sparse charged bound remain unfinished. No full six-gate or independent review claim; no PR submission. Full #1394 endpoint remains open. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* refactor(schonhage): reuse binomial bounds and sharpen signed tests

Address the bounded nonblocking review findings on #1496. Keep Nat.choose_le_exp_mul_div_pow unchanged while deriving it from Cslib.sum_choose_le_exp_one_mul_div_pow in the existing real binomial module; remove the redundant module and migrate its import. Preserve Anthropic, Samuel Schlesinger, OpenAI and Erik Demaine credit. Kernel-check an actual mixed inner/outer L2,m1 signed pruned result of -8, remove two signature-only tests and retain positive admitted-parameter checks. Paraphrase the identified source-derived sentence, shorten generic source boilerplate and record the generic naming follow-up. No public mathematical statement or definition changes meaning; no selected abstract or endpoint promotion. Final validation/source/review evidence is in PR #1496. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* feat(WordRAM): prepare and encode every shared matrix band

Implement the complete bounded #1523 native component under #1394. A fixed
96-register standard WordRAM program computes valid subset/inverse tables and
a deterministic existing Layout, prepares all padded signed row/column bands,
calls the unchanged #1520 encoders once per shared band, collects every leaf,
and restores the entire initialized input prefix and outside frame.

The State.init and flat Runs/Executes clients bind the actual output memory to
public encodingL/R in the unchanged leafIndex order (P0 digit 9). All powers,
mask/popcount/root/table loops, indices, guarded matrix addresses, initialization,
copying, encoder calls, loop controls and halt are charged. The generic bound is
4096*(L+1)*(1+N*4^m+2^L+2*numBands*10^L), plus halt; at L=19m and N>=(4^m)^18,
the full charged run is <=81920*(L+1)*N^2/(4^m)^(1/18).

Width assumptions are explicit original-parameter inequalities: the wordBudget
fits target w+2 and 7^L*A < 2^(w-1), w>0, A>=0. Actual signed kernels use at most
15/17 instructions for add/subtract, already included through the unchanged
encoder's real cost. No all-state fit, callback, solver, assumed run/cost or source
machine semantics is a hypothesis. Symbolic positive-depth thin native examples
and concrete signed/padded/frame/width-boundary executions establish nonvacuity.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Programs/Sec2/Theorem5/Encode/AllBands.lean:230-239,262-271
and BandArrayFacts.lean:107-113. Verified checkout files equal their pinned Git
blobs and all PR-draft quotations match those exact line slices. The source's
row/column encoding predicates map to runs' quantified original matrices, all
bands and all leaves on computed MaskTable.layout; Light limits/program maps,
callee contracts and source time hypotheses are replaced by actual native code
proofs, not imported. The block index is beta*K0+(side? h:g), and row is block*N0
plus the compressed outer offset. Shared tile pointers and retained table words
are exposed by tileInputBases/tile_input_values/table_word_layout.

Reuse unchanged WordRAM control/rename/copy/signed APIs, Layout/bandArray/encoding
mathematics and Mathlib finite index/sorted-set APIs. New mask scans, dense inverse
lookup, direct base-seven decoder and native execution/cost composition are
original. Small native-power/ordered-filter/positional-digit/row-major lemmas live
in narrow topic modules. Retain Anthropic, PBC source credit and NOTICE.

Validation: PASS all six strict gates (build --wfail --iofail, mk_all --check,
test --wfail --iofail, lint, lint-style, checkInitImports), serial Smoke/Axioms
warmups and the global Axioms audit; full citation-aware hygiene --check-simp,
fresh actual-base changed-file lints, strict PR-name and diff checks. Validated
with LEAN_NUM_THREADS=1 and cache downloads disabled. Windows static metadata
reads used PYTHONUTF8=1; no Lean/source change was needed. New Lean files use ordinary non-executable file modes. Exact payload tree
bdfc5a1a33f0d712b90f4fe4bc9d6c27e2d8318e. Targeted Lean MCP endpoint/tests and pinned quote identity also pass.
No PR has been opened;
independent exact-revision correctness/API/source-mapping review is pending.

Abstract assessment: no impact on selected abstracts, models or scope; no new
headline or PDFs. Pruned queries, products, solvers and whole ordinary 3SUM remain
open under #1394. Base #1520 remains unchanged at 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6.

AI assistance: Codex implementation/proofs, session codex-native-bandprep-t3-03b600bd,
under delegating-worker coordination. Existing unchanged encoder outside-review
evidence is PR1520#issuecomment-6477077023; final new-component review pending.

* feat(wordram): checkpoint native pruned accumulation and frame transitions

Work in progress for #1526, not a submitted component. Complete native parent accumulation loop (31N+3), internal sparse initialization (7N+8), computed child push (15), shared actual frame-word store, executable query-code inverse/requested-set bridge and recursive timestamp allowance. These current modules have clean targeted Lean MCP diagnostics; actual interpreter and kernel digit/request regressions pass. Changed-scope hygiene --check-simp and diff check pass. The general node/controller continuation proof, actual initialized full evaluator theorem and final sparse charged bound remain unfinished; no full six-gate or independent review claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289; full #1394 remains open.

Final current-tree checkpoint: strict build --wfail --iofail of Accumulate, Clear, Push, Frame, Powers, Leaf, Weight, Scan and SchonhagePruned tests passed together (3596 jobs); scope hygiene --check-simp and diff checks pass. This is a partial implementation checkpoint, not an all-six-validated PR or completed #1526 milestone.

* feat(wordram): checkpoint actual pruned-query root-frame stores

WIP #1526. Factor root scan setup and root finish; prove the actual eleven-instruction root-frame initialization and exact memory/register frame. Current Root MCP diagnostics clean. Full node/controller composition remains unfinished; no PR or full-six claim. AI-assisted continuation by codex-three-sum-continuation-t3-3dda8289.

* fix(nat): reuse existing tuple digit identity in band preparation

Address the sole P2 finding from the independent #1523 review of cb261f6b:
remove duplicate Nat.ofDigits_ofFn and publicly import the existing radix
module. The finite-function numbering bridge uses Nat.ofDigits_ofFn_eq_sum.
Its statement is unchanged. Existing radix declarations, proofs and source
credit are unchanged; no native program, endpoint statement or test changed.

Validation on exact final tree 4807cb971cf8030f70df67e5e8fa13947dcbd202:
PASS all six strict gates together (build --wfail --iofail, mk_all --check,
test --wfail --iofail including global Axioms, lint, lint-style,
checkInitImports), fresh actual-base changed-module lints (29 library/1 test),
full citation-aware hygiene --check-simp, strict draft-name and diff checks.
Serial LEAN_NUM_THREADS=1; optional cache downloads disabled. Lean MCP also
reports clean diagnostics for the changed bridge. Logs are in
.lake/codex-three-sum-continuation/band-review-six in the continuation checkout.

Original native implementation and all full correctness/API/source-mapping
review coverage retained. Review record:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6479696830
Original implementation/validation handoff:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6478943178
Focused final delta review pending before PR publication. No impact on selected
abstracts, models or scope; no new headline. Complete #1394 native 1.9992
endpoint remains open.

AI assistance: bounded reuse fix and validation by Codex session
codex-three-sum-continuation-t3-3dda8289. Original author credit remains on cb261f6b.

* feat(wordram): checkpoint complete native pruned-controller phases

Continue #1526 implementation under #1394; this is explicitly partial WIP,
not a complete component or PR submission. Full recursive node composition,
initialized input/flat clients, derived global fits and total-time theorem
remain open. No solver or all-state fit/execution/time certificate is assumed.

Check full root setup/scan/frame (20Q+19), report (9Q+3), leaf/return (24),
loaded leaf step (43), internal entry (7N+28), native nonempty child scan/push
(20N+42), empty-child scan/advance (20N+33), returned-child accumulation
(31N+29), and final return (26) against the actual standard fixed native Code.
KernelRegs describes only constant/pointer register values. Node footprints
preserve the ancestor rows. The zero-depth node matches existing Pruned.result
and the finite traceWeight; its continuation uses the existing ExecWithin.loop_iter.
No alternative machine or run semantics is introduced.

The reporting-body/controller names are definitionally identical Code trees.
ScanMemory.congr transports the existing representation across disjoint writes
and removes duplicate root proof plumbing; push exposes its four-store frame.

Validation: targeted Lean MCP diagnostics clean for every new/updated phase
and ComplexityTests/SchonhagePruned.lean. Native interpreter regressions retain
depths 0/1/2, both signs, repeated/empty/mixed queries and an outside sentinel.
New kernel examples discharge the general node/register/address/signed premises,
connect the same negative-product final memory to charged controller execution,
and prove an empty leaf preserves the prior value cell. Diff whitespace passes.
No aggregate/all-six validation claimed: root/native audit coordination hold
is respected. Exact partial checkpoint tree 7fa4da67ea861a2bba3a6c430cd7e40996d0e794.

Abstracts: no impact; no new headline or endpoint claim. Original 1.9992
objective and sparse-product/ET/final composition remain open under #1394.
AI assistance: Codex implementation/proofs by continuation worker
codex-three-sum-continuation-t3-3dda8289.

* doc(matrix): replace copied source prose with API descriptions

Resolve the documentation-only requested changes on #1464:
https://github.com/cslib-community/complexitylib/pull/1464#issuecomment-6477111132
Rewrite source-quotation fragments and related explanations in Alphabets,
Identity, Full and Pruned for the local Lean declarations. Preserve the
mathematical attribution, bibliography keys, source pin and copyright.

A comment-aware comparison with 4f3226cd proves every noncomment byte is
identical in all four files. No declaration, proof, definition, program,
import or test changes. Existing checked source-statement quotations and
notation/quantifier/model/resource mapping in the PR remain unchanged.
The final source-comment screen compares against quoted fragments in the
actual pinned Sec2 and Statements/PaperStatements files, including the
known local renames; no substantial quoted fragment remains unmarked.

Validation is recorded for this exact tree in PR #1464. Source checkpoint
tree 8c3b87bb870d4c4e2202917357d19a7a139296e8. No abstract/catalogue/model/scope
or rendering impact; no new headline. The full native 1.9992 endpoint remains
open under #1394. Ancestor and descendant remotes are unchanged.

AI assistance: documentation repair and validation by Codex continuation worker
codex-three-sum-continuation-t3-3dda8289. Existing independent mathematical/API
and checked-source review coverage is retained; outside review of the bounded
documentation delta is requested, with no new review agent commissioned.

* refactor(finset): use order-embedding names in OrderGlue

Finish bounded #1545 from exact #1536 head66036150a. Replace generic
level/inner/outer API vocabulary with order-embedding/subset/complement names.
Remove five redundant membership/range/congruence wrappers, using Mathlib's
orderEmbOfFin_mem/range_orderEmbOfFin and ordinary substitution directly.
Migrate every actual Levels/Batch proof client with no deprecated aliases.
Keep filter_glue's generic name and rename its predicate parameter to P.

The retained generic statement headers are identical after the documented
renaming and binder alpha-renaming. All 48 Levels and 13 Batch declaration
statements and all definition bodies remain unchanged. The entire native
Encoding module is token-identical after comment removal; every other native
library file is unchanged. Source credit and pin are retained. Thus existing
State.init, Signed.encode, width/frame/cost and encodingL/R meanings remain.

Put the sum/option-versus-flat-digit explanation at the actual leftDigits,
rightDigits and termDigits hover docs, preserving their enumeration bodies
and order (row-major P terms, P0 digit9). Update the UPSTREAM naming follow-up.
Add generic nonconsecutive signed/zero/Option reconstruction clients using
Mathlib's orderEmbOfFin_unique, plus the routed optional #1536 asymmetric
native L4,m1,N29 prefix tests. Those compute headers/count/tables/snapshot and
decode/read ranks1 and2 with K0=2, distinguishing quotient/remainder blocks
and signed values without a full10^4-leaf encoder run or native body edits.

Reuse unchanged outside coverage: PR1496#issuecomment-6477111644 atb4936ce28,
PR1496#issuecomment-6480746578 at68bbe40e3, and PR1536#issuecomment-6480852097
at66036150a12046b29986d8f108c0afaf49d01c61. These are agent reviews, not human
approval. No new cited mathematical result or machine model is introduced.

Validation: PASS build --wfail --iofail, mk_all --check, test --wfail --iofail,
lint, lint-style and checkInitImports, with serial Smoke/global Axioms warmups.
Full citation-aware hygiene --check-simp, fresh changed-file lints against
actual base66036150a, strict PR-name and diff checks, and source/native identity
checks PASS. One thread, no cache downloads, PYTHONUTF8=1 on Windows.
Targeted MCP checks, full hygiene --check-simp and source/native identity
checks pass. Final source tree: 0c21b608cc5ed234527c73a3853a26132f52da0d. No source/ancestor merges or restacks.
Abstract assessment: no impact; no selected theorem/model/meaning/scope or PDF
change. This is generic ergonomics/testing only; full #1394 remains open.

AI-assisted implementation by codex-native-bandprep-t3-03b600bd, under parent
continuation-worker coordination. No new review agent commissioned; ordinary
outside coordinator review is requested when the bounded PR is ready.

* feat(WordRAM): prove all-depth pruned controller execution

WIP checkpoint for #1526; no PR and no completed component claim. The actual fixed native controller now has a depth-inductive execution proof with original Pruned.result values, stored queries/frames, concrete spatial preservation, input-derived signed fits and traceWeight charged continuation. Root loop exit discharges the continuation.

All new library modules through Recursive.exec_ready have clean targeted Lean MCP diagnostics. New concrete entry/result client reports no diagnostics, but the complete existing test file is still elaborating its VM regression commands; no final test-pass or all-six claim. Initialization/root-list/report/flat State.init composition, global width/fit clients, full component validation and independent review remain open. Aggregate checks are held for the coordinated root validation slot.

GenericRAM/Signed/Fits.lean is the unchanged blob from independently owned PR #1552, commit f276db1174333d3e6253b93878be8b95c1fcc713; credit retained. No native program body changed in this checkpoint. All proofs and invariant definitions are original native work; existing mathematical pruning/encodings retain their source credit. No selected-abstract impact or whole-3SUM endpoint claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* style(WordRAM): normalize native proof file modes

* feat(wordram): complete initialized sparse pruned-query execution

Complete implementation candidate for #1526 above #1520 exact 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6. Full ordinary native 3SUM and the published 1.9992 endpoint remain open under #1394. No PR yet; fresh exact-revision independent correctness/API/source review is pending before publication.

One fixed standard native program: 96 registers, at most 4096 flat instructions including halt, no width reads. Complete State.init -> pre-halt Runs -> Executes uses the same answer memory. Every supplied query, including repeats and empty/zero-depth boundaries, equals existing Pruned.result; runs_bilinear specializes existing encoding contracts to bilinearProduct. exec_kernel computes its powers/layout and has a reusable pointer/epoch directory contract. All child lists, timestamp decisions, stack/control/index arithmetic, signed products/adds and reporting are actual charged code, proved by the all-depth exec_ready induction; its continuation is discharged by the actual root exit.

Full charge including halt <= 8192*(L+Q+1+(L+1)*card(leaves(requested qs))). Ordinary source envelope M=A+B+10^L*A*B and address budget H=256*(L+1)*10^L+32*Q+512 derive input fit and execution at every physical W >= clog_2(M+H+1)+3. This is logarithmic in explicit component budgets; global 3SUM composition is not claimed. Inputs: raw L,Q then two canonical signed arrays of length10^L and unsigned query codes, after the actual standard length cell0. Returned output pointer is unsigned. All input/outside memory is preserved on initialized runs. Code/ExecWithin/State.init/Runs/Executes, signed kernels, Heap/Block APIs, existing mathematical pruning/encodings and Mathlib digit/log APIs are reused; GenericRAM/Signed/Fits is the unchanged blob from #1552 f276db1174333d3e6253b93878be8b95c1fcc713, with credit retained.

Pinned source anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5. Checked Git-blob quotation locators: ThreeSumApsp/Sec2/Lemma10.lean:148-150 (Pruned_eq_restrictTo_sum) and:565-566 (Lemma10.total_size). Source Pruned -> existing Pruned.result; source restriction -> Finset.piecewise; source Leaves -> leaves; all natural depths and arbitrary integer arrays retained. Native indexing directly uses existing leafIndex(privateLeaf), first coordinate least significant, inner digit9. Child prefix/stride/division are proved against the finite childSet/sliceAt semantics. Native code/proofs and cost are original, not supplied by source Light semantics or its sorted-segment implementation. Full checked quotes and model/quantifier/layout/cost/reuse mapping are in the prepared UTF-8 PR draft. Copyright retained in source/NOTICE.

Validation on tree bd6e74cce28dbd16c90291b847dac1a311402510: all SIX strict gates pass together, LEAN_NUM_THREADS=1, downloads disabled: build --wfail --iofail; mk_all --check; test --wfail --iofail (including Smoke/global Axioms); lint; lint-style; checkInitImports. Full citation-aware hygiene --check-simp; actual-base47-library/3-test changed-file and local lints; strict PR declaration-name audit; staged/unstaged diff checks pass. Register alias docs fixed the first lint finding; all native definition bytes are unchanged by that fix. Tests discharge real State.init positive/negative/empty/depth-two mixed/shared/repeated queries, sufficient-width family and failing fit boundary; callable signed wildcard with nonzero epoch and preserved input/outside sentinel also checks. No sorry, custom axiom or native_decide introduced.

Selected abstracts/catalogue/rendering: no impact, no new headline. ROADMAP/UPSTREAM preserve the open sparse-product/ET and global1.9992 gaps. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289 (OpenAI Codex); original finite source credit to Anthropic, PBC.

* feat(wordram): checkpoint computed wanted-query routing

Partial implementation of #1561 by codex-three-sum-continuation-t3-3dda8289.

Implements actual fixed standard 96-register routing/grouping code with computed valid-mask tables, tile counts, prefix offsets and stable scatter. General checked proofs cover the digit kernel (15L+10), one-query routing (15L+25), exact outStrOfPos/queryIndex mapping, computed header/count/relocated-table initialization (16L+(12L+33)*2^L+83), input-memory frame and original-input-derived fits. Generic finite stable-counting positions are injective and bijective.

Targeted Lean MCP diagnostics clean for all nine new library modules and the regression suite. Actual initialized interpreter regressions pass for empty input, zero depth, duplicates and an asymmetric K0=2 three-band case; no encoded leaf array is materialized in routing tests. The 96-register program computes every routing/count/prefix/scatter decision.

INCOMPLETE: general native counting, prefix and scatter execution invariants, initialized flat complete-run/width/frame/bound clients, final static hygiene and ALL SIX gates remain pending. This checkpoint is not a PR or acceptance claim. Mutable global audit slot remains with parent; no aggregate performed here. Full #1394 native sparse/ET solver and ordinary 1.9992 endpoint remain open.

The child branch merges unchanged #1554 at 12abeee84 onto frozen #1562 base 0c2e0ebea. The local merge 60bec64398 only reconciled shared credit/roadmap/upstream prose; no ancestor branch was edited. Original implementation mathematics/code by Erik Demaine with AI assistance. Existing finite Schonhage and band/encoder/pruned interfaces are reused with their original credit retained.

* feat(wordram): checkpoint wanted count-pass proofs

Continuation of #1561 from 06b3563e7. CountStep has clean targeted Lean MCP diagnostics, including exact 14-instruction native count update and memory frame. Dense zeroing and count-loop composition are implemented; Count.lean has one pending elementary nonnegativity/address-bound proof at line 152. This is an explicitly incomplete source checkpoint, not all-six validated or a PR. Work is paused solely to prioritize the bounded outside-requested #1562 repair. No program/public statement in #1562 changed.

* doc(finset): restore ordered-gluing source credit

Restore the original AlmanWilliams2026 Section 2 citation and finite-scope sentence removed by the naming refactor. No Lean declarations or proof tokens change.

AI-assisted coordinator fix by coordinator-codex-queue-20261028-ready-c. Original implementation and source authorship retained; independent delta review and new hosted CI requested on PR #1554.

* fix(wordram): address pruned-query review findings

Bounded documentation/test repair for #1562 / #1526 by codex-three-sum-continuation-t3-3dda8289, above exact 0c2e0ebea6199ac1fbe9b2e048ce24b9410f8d1a.

Fix both ROADMAP reference definitions, distinguish client contracts from exported internal stage APIs, and document why the narrow ArrayAppend/InputArray topics avoid Allocation interface/dependency fanout. Extend existing post-integration issue #1553 with the exact pruned power register map, 4L+10 accounting, affected consumers, fused-encoder accounting and sibling integration order; no power program or ancestor is changed.

Add one fully admitted signed runs_bilinear client: depth0, original arrays -3 and 2, actual encodingL/R premises discharged, original-input magnitude/address fits discharged, physical width10, same actual State.init prefix Runs and charged halt, and output memory at address6 equals Signed.encode(-6). Targeted Lean MCP diagnostics pass.

Validation: all six strict gates passed together on final staged tree f4cfd4ae0d838c4b4bf4c43c924f400744450957, including Smoke/global Axioms; one thread/downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base 47-library/3-test module lint, changed-file audits, strict declaration-name check and staged/unstaged diff checks pass. Local machine-readable evidence: .lake/codex-three-sum-continuation/pruned-review-repair/{summary.json,static-summary.json,identity.json,*.log}.

Source identity audit against 0c: all seven changed library files have identical comment-free tokens. Every public library statement, definition, native program and proof is unchanged. Every existing test byte is unchanged except the single inserted concrete client. Abstract/catalogue/rendering assessment: no impact.

The prior inside-fleet technical review at issue1526#6484055995 and outside FINAL at PR1562#6484177608 cover unchanged native semantics/source mapping. Fresh focused outside review of this repair is requested; no new review agent was commissioned, and no outside/human/platform approval is claimed. All original Anthropic, PBC credit retained. AI-assisted implementation by OpenAI Codex.

#1561 source is preserved separately at 7772a3497017078b37d1e04004225fae28baddad with its pending native grouping proof work explicit. Concrete sparse-product/Exact Triangle programs, full input/time/width composition and the original native 1.9992 endpoint remain open under #1394.

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(imports): regenerate aggregate after Chan-He parameter integration

* feat(wordram): route and group wanted thin-product queries

Implement #1561's complete native routing/grouping component. State.init prepends
the native length cell to [L,m,N,Q] followed by raw coordinate pairs.
Actual finite unsigned standard Code computes tables, tile keys, codes, counts,
prefix offsets and stable scatter. No layout/run/time/permutation certificate
is supplied. Fixed 96 registers, <=4096 flat slots including halt, no width reads.

Wanted.runs_grouped proves actual State.init prefix Runs and charged halt at the
same final memory, exact per-occurrence code/original-position equations, exact
wantedStrings tile spans, in-array span/code bounds, permutation, terminal Q,
input/outside frame and final boundedness. All admitted physical widths are
covered by the positive clog2(wordBudget+1)+1 threshold, with original input fit
derived. All initialized reachable prefixes are bounded. Complete native charge
including halt <=128*(L+1)*(Q+numBands^2+2^L+1). No 10^L scan per query/tile.

Validation: final tree 6c8164db02df348a46ffe0cf5972415977c62939. All SIX strict gates passed
together: build --wfail --iofail; mk_all --check; test --wfail --iofail (including
Smoke/global Axioms); lint; lint-style; checkInitImports. One Lean thread, cache
downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base
57-library/3-test lints, changed-file/name/staged+unstaged diff checks all pass.
The initial test-only module-boundary VM evaluation failure was fixed by using
the existing non-module native-test convention; every interpreter check remains.
The corrected frozen tree passed the complete six-gate sequence again.

Base: #1562 ce77926c393ce34e7962759bb412172c4584a67c. Preserve normal merges.
Unchanged sibling prerequisite #1554/#1536 is retained at exact
702c14bcf9896655b17c9b2dd5e02e6f270c9966: all 33 library and two test blobs are
byte-identical. Wanted contributes 24 library modules and one test. Existing
unchanged sibling reviews are reusable; no ancestor branch or remote was edited.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Sec2/Theorem5.lean:44-46, checked against its Git blob:
"outStrOfPos lay I J ∈ wantedStrings lay W (bandOf L m I) (bandOf L m J)".
Tiling/Definitions.lean:128-131 defines that filter/image set; reuse it unchanged
with W=qs.toFinset and separately preserve original list occurrences. Source
Programs/Sec2/Theorem5/Wanted/Codes.lean:13-19 motivates routing. Actual native
code uses the existing least-significant-first queryIndex/leafIndex dictionary,
digit9 for the inner wildcard and 3*row+col otherwise. It proves agreement rather
than identifying the Light program's separate numbering, semantics or costs.
Native code/proofs/stable-scatter theory are original; primitive counts reuse
Mathlib Nat.count directly, with zero/successor/bound/monotonicity APIs and the
existing count_eq_card_filter_range identity. Redundant count/offset wrappers
and their repeated elementary lemmas are removed. Every client is migrated;
Program.lean and PackProgram.lean are byte-identical to checked checkpoint
2e2cc39675a30b024c3932bd23f06163a33c8925. Imported finite source credit is
retained. All three source slices equal the pinned Git blobs.

Fully admitted kernel clients cover empty/zero depth, repeated pairs, and the
L4/m1/N110/K0=2 asymmetric family, tying answers to actual Runs/halt. Actual VM
regressions cover all expected grouped words, original indices, offsets and
input/outside frame. Fitting and failing physical-width premises are checked.
No sorry, custom axiom or native_decide. No curated abstract/catalogue/PDF impact.

Shared-band calls, actual buffer/header adaptation, pruned-kernel invocation,
answer reconstruction, sparse-product/Exact Triangle and full native ordinary
3SUM composition/1.9992 remain open under #1394. This is a component milestone.
Fresh nonauthoring correctness/API/source review is pending (root arranges);
outside review remains required. No PR, integration or approval claim.

AI-assisted implementation: OpenAI Codex, session
codex-three-sum-continuation-t3-3dda8289. Author/source credit is preserved.

* fix(imports): regenerate aggregate after shared-encoder integration

* perf(wordram): reduce native parameter proof heartbeat budget

* chore(wordram): scope measured parameter proof budget to reduction task

* perf(schonhage): focus cell arithmetic and use the default heartbeat budget

* fix(doc): restore unrelated upstream coordination records

Restore the exact 231-line tail common to both integration parents after review caught an overbroad conflict-marker match. The intended 3SUM integration prose is retained; no Lean change. AI-assisted correction by OpenAI Codex.

* fix(imports): regenerate band-preparation aggregate from merged inventory

* doc(order-glue): preserve reviewed source credit through supplier merge

* doc(order-glue): restore paper citation and finite scope

* feat(wordram): checkpoint native queried-product construction (#1581)

Unfinished implementation above exact a6e4005b2 on the existing isolated child branch.
The fixed native program computes both producers, protected layouts/copies, tile ABI,
one shared timestamp directory, actual pruned calls and original-order reconstruction.
Targeted Lean MCP checks pass for the new native program and supporting original-input,
parameter/layout, copy/frame, grouping-span, raw-conversion, producer and directory proofs.
Five actual initialized interpreter regressions pass: empty, signed/duplicate, raw01,
multiple tiles/padding/epochs, and nonempty inner tensor coordinates.

This is a recovery checkpoint, not a complete native product result or PR candidate.
Full tile/epoch loop and reconstruction correctness, initialized composition, complete
charged cost and logarithmic-width/saving results remain open under #1581/#1394.
All six/global/static validation remains held for root; no aggregate or static audit ran.
Existing curated abstract statements and scope are unaffected; no headline promotion.
Implemented personally by codex-three-sum-continuation-t3-3dda8289 with AI assistance.

* fix(imports): regenerate thin-product aggregate after main integration

* doc(wordram): separate shared-encoder integration records

Keep the reviewed finite-matrix supplier records intact and record native-encoder scope and source credit separately, so squash-queue integration does not overlap the ancestor documentation hunks. Preserve code, tests, concrete bounds and the complete unrelated upstream-record suffix. Queue revisions are used only for read-only projection, never as parents.

* doc(matrix): keep progress links out of shared reference append block

* feat(wordram): checkpoint complete queried-product source before supplier merge (#1581)

Local recovery checkpoint only. Complete native queried-product execution, initialized
clients, quantitative thin saving and logarithmic width have clean targeted Lean MCP
diagnostics. Import generation adds the 29 new modules. No all-six/static validation or
independent candidate review is claimed by this checkpoint; it is not a PR candidate.

The actual #1576 supplier advanced from a6e4005b to integration91f485ec. Preserve this
source before a normal child merge, reconcile only shared docs/imports, regenerate the
aggregate, then validate the final source together against the actual supplier.

Original native implementation by Erik Demaine with Codex assistance, reusing credited
finite Anthropic Section 2 mathematics and actual native producer/router/pruned kernels.
Ordinary-3SUM/Exact Triangle and the full #1394 1.9992 endpoint remain open.

* feat(wordram): execute queried thin-matrix products (#1581)

Complete #1581 implementation candidate under #1394, awaiting required fresh exact-head
non-authoring correctness/API/source/resource review. No PR is opened or integration
approval claimed. Normal child history preserves source checkpoint af208636b and actual
reviewed #1576 supplier91f485ec; no ancestor branch or remote was edited.

One actual fixed standard unsigned WordRAM program per signed/raw input mode consumes
original headers [L,m,N,Q], both row-major integer matrices X:N x 4^m and Y:4^m x N, and
raw interleaved requested coordinates. It computes tables/layout, shared encodings,
Wanted counts/prefix/stable scatter, tile pointers, decoded queries, directory/epochs,
pruned evaluation and original-order reconstruction. Raw nonnegative entries are doubled
by actual charged load/multiply/store instructions (including raw0/1 -> signed0/2).
There is no source Light machine, assumed layout, sorting, solver, run or time oracle.

QueriedProduct.exec/runs/runs_wide prove actual native execution from original words /
State.init, same-y prefix Runs and charged halt, every original occurrence's exact
Signed.encode((X*Y)[qs[i]]) including duplicates, original-input restoration and the
complete outside frame. Generic execution assumes m<=L, original absolute entry bound A,
raw nonnegativity in raw mode, and the explicit original numerical magnitude/address
admission; it has NO query-sparsity hypothesis. The real pointer/epoch kernel uses a
directory initialized once, with scratch/frame separation and propagated fresh bounded
epochs. Code has 160 registers, <=32768 flat instructions including halt, no width reads,
and is independent of dimensions, magnitudes, query counts and physical widths.

Thin hypotheses: L=19m, D=4^m, N>=D^18. With distinct-set sparsity
|qs.toFinset|*2^m<=N^2, complete charge including halt is <=
65536*(19m+1)*(65*N^2/D^(1/18)+Q). With the stronger occurrence hypothesis
Q*2^m<=N^2 it is <=4325376*(19m+1)*N^2/D^(1/18). Multiplicity/output work is never
replaced by set cardinality. runs_thin holds at EVERY physical W>=
128*clog_2(N+Q+A+2), deriving InputFits and all intermediate admissions. Its explicit
magnitude/address envelope is <=2^40*(N+Q+A+2)^10, allocation <=128*(N+Q+A+2)^4.
Physical all-prefix boundedness is proved; a separate source-polynomial prefix bound at
arbitrarily larger widths is not extracted here. ET record/input adaptation and all its
copies/calls, Exact Triangle solving, ordinary3SUM composition and improved Section4 /
1.9992 remain open. This component proves neither full3SUM exponent.

Source mapping checked against actual Git blobs at anthropics/formal-math
16a5ce41304fcdaea4e0be7c132e1c361dc26da5, under3sum-apsp/ThreeSumApsp:
- Sec2/Theorem5.lean:61-67 concludes the pruned band value equals (X*Y) I J.
  Existing finite thin_product_spec/MaskTable.layout/bandArrayL/R/encodingL/R and
  wantedStrings are reused; W=qs.toFinset, with a separate occurrence permutation.
- Sec2/Theorem5.lean:146-149, paraphrase of its conclusion:
  ((sum T in tiles (19*m) m N, |Leaves(wantedStrings lay W T.1 T.2)|):Real)
    <=33*(D m)^(-(1/18):Real)*N^2.
  Source hypotheses N>=D^18 and W.card*2^m<=N^2 are retained. Existing encoding,
  tile/leaf/passed-set estimates bound ACTUAL native execution, not an assumed cost.
- Programs/Sec2/Theorem5/Pruned/AllTiles.lean:86-92 and Wanted/Report.lean:30-37
  are the per-tile/report specification references; Solver.lean:150-161 is conditional
  on Light callees. Native code here is original, accepts stable unsorted duplicates,
  charges empty tile calls and proves all native callees directly. Instruction constants,
  widths, protected layout and frames are independently proved for the native model.
The UTF-8 PR mapping draft contains two exact Lean quotation slices, both checked against
Sec2/Theorem5 at that pin; all four cited source files equal their pinned Git blobs.
Anthropic, PBC's existing mathematical source credit is preserved. New native programs
and execution/resource proofs are original work by Erik Demaine with Codex assistance.

FINAL VALIDATION (whole source tree, not only this commit's proof/doc delta):
Tree 555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; four compiler threads; cache downloads disabled.
1. lake --no-cache build --wfail --iofail : PASS (13.56s).
2. lake --no-cache exe mk_all --check : PASS (11.33s).
3. lake --no-cache test --wfail --iofail : PASS (27.14s).
4. lake --no-cache lint : PASS (43.22s).
5. lake --no-cache exe lint-style : PASS (17.09s).
6. lake --no-cache exe checkInitImports : PASS (16.8s).
Strict tests cover new initialized/product clients, Smoke and global Axioms.
Full citation-aware hygiene --check-simp, fresh actual-base30-library/one-test lints,
changed-file checks, 25-name strict final-body audit and staged/unstaged diff checks PASS.
Actual comparison base: 91f485ec38ca6b878f338e2cdbdedbf5d4f20257.
3533 inherited source/abstract files checked; only the existing tile-key lemma is exposed
with the same statement/proof. All35 inherited sibling blobs equal actual parent91.
All native code bodies/register definitions are byte-identical to af208636b;
comment-erased Program tokens match. Current full Program source SHA256:
2b86fe04f6afa49a7eadc75292559dca62f4d65c5f7bdaf3b1f4386994aa8ebc
Public Header.exec_layout statement is identical; proof split passes at DEFAULT
heartbeats, without a new allowlist entry. Final register docs clear the initial lint
failure (47 undocumented aliases); prior incomplete/failed checkpoint logs are retained.
Checked PR/source mapping draft SHA256: be43f587d5c0ac6dd871093d5d19c283ef7dd9732b5c5d3cfa77b24e42899a24
Local reproducible records: .lake/codex-three-sum-continuation/queried-product/
summary.json, static-summary.json, source-native-identity.json, source-mapping.json,
run-identity.py, final-body-names.log and per-gate logs. This commit description is the
durable evidence until a PR exists; issue1581 links it.

Examples discharge real width/magnitude premises and connect the same final y to prefix
Runs, halt and memory: signed/raw, duplicate, padded/multiple-tile, positive/zero depth,
empty inputs, nonzero original header, adjacent sentinel, strict budget boundary and
nonempty symbolic admitted thin family at every inner depth.

Abstract assessment: no selected statement/definition/scope/catalogue/rendering impact.
ROADMAP/UPSTREAM preserve remaining1394 scope; no headline promotion.

Fresh review of all NEW native semantics/cost/width/frame/init/API/source mapping remains
pending root arrangement. Unchanged prerequisite outside coverage can be reused after
the recorded identities (1576 outside FINAL6487515809). No child watch/approval/merge.

* style(Schonhage): remove trailing space in queried products

Independent nonauthoring /root/queried_product_review examined the complete
native #1581 layer at ff31104be7acf96798c13b38cb079c58605a1ec3 against
91f485ec38ca6b878f338e2cdbdedbf5d4f20257, including all 29 new library
modules, actual execution/frame/width/cost, multiplicities, source mapping
and initialized clients. No correctness/API/source/resource blockers; this
is agent review within the root fleet, not outside or human approval.

The single P3 finding was a trailing space in Product/Groups.lean:111.
This coordinator correction removes exactly that ASCII space. An exact
byte check and git diff -w verify no other change. Full base-to-head
diff --check now passes, covering committed changes as well.

All six gates and static/source checks pass on reviewed tree555b6b52,
as recorded in ff31104. The whitespace delta is validated separately;
final hosted CI and outside coordinator review remain required.
Curated abstracts unaffected. AI assistance: Codex.

* doc(Schonhage): retain band catalogue encoding contract

Restore the one supplier sentence in UPSTREAM.md about unchanged leaf ordering and
canonical signed words, addressing optional nit1 in outside FINAL6493515098 on PR1615.
All other paragraphs are preserved. Exact byte comparison against9a57e134 verifies
this one sentence is the entire tracked delta; all Lean/native/math/API/abstract
source and every other tracked byte are unchanged.

Documentation-only validation: consistency with the existing catalogue interfaces,
full base-to-head diff --check, citation/simp hygiene and strict25-name final PR-body
audit pass. No Lean, import, aggregate or full rebuild was run for prose. Original
all-six evidence remains for tree555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; this does
not claim a new-head all-six run. No changed abstract meaning or rendering.

Full nonauthoring native/source review and outside FINAL coverage are reused across
this bounded doc delta. A focused outside DOC delta check is requested, not another
full review. Register naming remains a separately coordinated follow-up; existing
nonzero interpreter coverage was accepted, so no test change is included.

AI assistance: Codex implemented the requested one-sentence documentation repair.

* fix(imports): regenerate wanted-routing aggregate from actual inventory

* wip(wordram): checkpoint callable thin-product source

Personal #1618 source checkpoint before integrating the refreshed #1615 parent. Complete generic native memory-window compiler, computed-modulus callable raw01 product, initialized Runs/halt, width/window/cost and dirty-memory/frame tests have targeted Lean MCP diagnostics clear. Canonical imports and final all-six/static validation remain pending; this is not a publication candidate. Reuses the exact landed NatClog module from a1d1fa882, with original credit. No full Exact Triangle or ordinary3SUM endpoint claim.

* feat(WordRAM): run queried thin products in caller-owned memory

Implements the bounded callable prerequisite #1618 under #1394. Owner/session:
codex-three-sum-continuation-t3-3dda8289, personally on
work/three-sum-native-callable-product-20261029. Ordinary parent merge904c62068
preserves the reviewed #1615 a8cb7c984cd77e7eb150522e1353a2da22c84839 source.

Generic MemoryWindow.compile adds actual add/load/remainder and add/store
instructions, retaining ordinary Code/Exec/ExecWithin/Runs semantics. Proved
bounded native-source execution transfers within3x charged instructions/code
size, with3 additional registers and a full outside-window frame. The clipped
memory view is a value relation, not another run semantics or an algorithm oracle.

Concrete raw01 CallableProduct derives the actual source execution from original
matrices/request occurrences. Native NatClog/Power compute the source modulus;
fixed register normalization, translated producer/query execution and two exact
input/output span-normalization loops are all charged. Fixed163 registers,
<=131072 flat slots including halt, no physical-width reads. Actual initialized
prefix Runs and halt refer to the same final data and exact requested products.
Local input is restored and caller memory outside[b,b+M) is preserved.

Thin admission is explicitly D=4^m,L=19m,D^18<=N, with raw zero/one matrices.
M=2^(128*clog2(N+Q+3)) <= (2*(N+Q+3))^128. No whole-window or catalogue clear/copy.
Every W>=256*clog2(b+N+Q+P+5) suffices. For arbitrary dirty callers P bounds EVERY
initial register/memory word, including physical loads before remainder. For the
initialized client scratch is zero and P only bounds the protected caller prefix.
All-prefix assertions are physical word fits, not an independent-of-W polynomial
intermediate-word theorem. The explicit window reservation is polynomial.

Including base loading/halt: charge <=3*(originalT+1)+2048*(N*D+Q+1).
Distinct-set sparsity retains+Q; occurrence sparsity Q*2^m<=N^2 gives
17301504*(19m+1)*N^2/D^(1/18). Neither sparsity premise is needed for execution.
The ET-record adapter, fast ET/backend/witness composition and full ordinary3SUM
1.9992 remain open. Root retains parameters/prime selection/outer ET host.

FINAL VALIDATION: tree f8ff0209469bb668837b9602fb71ecf3aaf3bc99.
All SIX together PASS, four compiler threads, cache downloads disabled:
lake --no-cache build --wfail --iofail (22.27s)
lake --no-cache exe mk_all --check (13.75s)
lake --no-cache test --wfail --iofail (183.59s), including Smoke/global Axioms
lake --no-cache lint (45.02s)
lake --no-cache exe lint-style (22.14s)
lake --no-cache exe checkInitImports (16.56s).

Final full hygiene --check-simp, actual-base12-library/two-test lints,
changed-file checks, strict14-name PR draft audit, COMPLETE a8-to-final diff
--check, staged and unstaged diff checks all PASS. Canonical imports generated;
all new tracked file modes100644. No sorry/custom axiom/native_decide or new
heartbeat override. Only justified finite syntax-check recursion-depth options.

Source audit: all3686 inherited source/abstract files and modes unchanged from
actual reviewed parenta8. Original Product, Wanted/Pruned/Band/encoding, NatClog
and Power suppliers remain unchanged. New MemoryWindow and Callable/Program files
are byte-identical to source checkpoint7cb7ade0a. ArrayNormalize native bodies and
theorem statements are identical; the only API metadata fix replaces blanket
exposure with explicit exposure of its two code definitions. All affected clients
check with the public pure-specification lemmas. The deliberately interrupted e8
checkpoint is NOT used as an all-six claim. One overlapping MCP dependency setup
had a transient Windows artifact lock; serial retries and final six are clean.

Kernel clients tie actual initialized Runs/halt to exact physical output and
caller sentinels. Native VM cases cover nonzero/zero products, duplicate/empty
queries and dirty workspace above the source modulus. A direct compiler client
loads27%8=3, increments/stores4 and preserves both adjacent sentinels. Concrete
numerical width budget passes387/fails386; zero N fails the explicit thin premise.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Sec2/Theorem5.lean61-67 (exact products),146-149 (sparse leaves).
Local file equals the pinned Git blob; conclusion fragments checked verbatim.
Finite mathematics/source credit is inherited. Compiler/controller/proofs here
are original native work, not a source-Light semantics/count transfer.

Abstract assessment: no own selected statements, models, catalogue or rendering
change. No whole3SUM headline promotion. ROADMAP/UPSTREAM retain the #1394 gap.

PUBLICATION LIMIT: #1615 landed DURING this audit via ee1ab6f08ac77b1404d19c0371b0b0ac7daaa915
(reviewed carrier7da96e65cf2c352d08142bb5a7ea65098008d8cc); main now includes later
native/frontend additions. The five direct machine/arithmetic prerequisites and
entire Schonhage supplier remain byte-identical. This exact validated candidate
is preserved on its reviewed a8 parent for coordinator-directed current-main
compatibility work before publication. No parent remote is changed.

Fresh exact-whole-layer NONAUTHORING compiler/callee/API/resource review is still
required and is owned by root. Existing supplier reviews do not approve the new
compiler. No new PR, outside approval, merge or endpoint completion is claimed.

Local reproducible records: .lake/codex-three-sum-continuation/callable-product/
summary.json,static-summary.json,source-identity.json,source-mapping.json,
pr-body.md,audit-source.py and logs. Durable evidence is this commit description;
the issue handoff links it. AI assistance: Codex implementation/self-review with
Lean MCP; fresh nonauthoring and outside reviews remain pending.

* refactor(WordRAM): align ArrayNormalize module name and admission prose

Address optional review nits on PR1625 at fd1f2fce. Rename Normalize.lean to ArrayNormalize.lean with identical file bytes, migrate every consumer and the sorted canonical aggregate without a compatibility shim, say widths at least the threshold, and record that full VM cases use m0/N1 while general execution/resource proofs cover all valid geometry. Existing review6497681504 is already linked; the missing-record observation was a timing snapshot.

Validation: serial targeted Lean MCP ArrayNormalize, WordRAMMemoryWindow and SchonhageCallable all clean. Exact moved-blob identity and comment-erased Lean token identity modulo module-import migration pass; public declaration statements/bodies/attributes and native program meaning are unchanged. Canonical source import order and removal of every old path verified. Full citation/simp hygiene, targeted repository doc-name/new-test checks (12 modules/2 tests), strict14 PR-body names and complete d010-to-final/staged/unstaged diff checks pass. No aggregate/import-generation/all-six run for this bounded delta. Original f5/f8 all-six and final fd1 hosted all-checks green run40879707895 remain scoped to those revisions; repaired head requires refreshed hosted CI before integration. Full compiler/source reviews reused; focused module/import/doc/test-comment delta review requested after push. No abstract/model/resource change or endpoint claim. Evidence .lake/codex-three-sum-continuation/callable-product/review-rename.

AI assistance: Codex implemented the mechanical API/documentation repair; no self-approval, human approval or new full review is claimed.

* feat(ExactTriangle): checkpoint actual record product composition

Personal worker codex-three-sum-continuation-t3-3dda8289, issue1626, ordinary child from1625 repairce1062483; no ancestor remote edits. Implements fixed320-register actual record selector/log/header/copies/complete163-register callable bank, all readback separations from actual producer Output, raw01 identity, occurrence/query-cap sparse bound, native initialized producer→first-record consumer, same-y prefix Runs/chargedhalt/answers/frame, original positive logarithmic width and physical-width-independent polynomial prefix words/support. Generic caller consumes every occupied ordinal. Initialized fixed client selects ordinalzero and proves it exists; this is not an outer instance loop or aggregate ETsolver.

PreparationInput.exec_input is the coordinator-authorized narrow API seam, reusing the existing derivation/private fits_at_width; public runs_input reuses it with unchanged statement/hypotheses/budget. No native producer/callee program or input definition changes. All own modules, modified producer module, and new native prefix/copy/admitted closed positive-depth initialized test have clean targeted Lean MCP diagnostics. Tests include actual second-record decode at m2,n16^18 and raw01 copy; the huge complete input family is kernel-checked symbolically, not VM-enumerated.

SOURCE CHECKPOINT ONLY: canonical import generation, final all-six, full static/hygiene/source identity, PRmapping and required fresh nonauthoring review remain pending. Root owns sole aggregate/static slot; no such process was launched. Original #1394 ordinary3SUM1.9992, aggregate ET/outerloop/prime/parameter/backend/witness work remain open. No PR/review/approval/merge/watch. Credit retained; original native adaptation/composition by Erik Demaine with Codex AI assistance.

* feat(ExactTriangle): validate initialized record product adapter

Refs #1626. The full #1394 ordinary distinct-position 3SUM 1.9992 endpoint remains open. No PR is opened by this worker; fresh whole-layer nonauthoring review is pending coordinator arrangement.

Validated source tree: 8f59a54c6de13459c0a85d86546b12fc12c5003c
Pinned main base: 8569de69ef05751c7e39e2ddd99d24d49f6aa1ec
Preserved source checkpoint: 8f46341d456f6e3651beb02aac898a22a34a9883
Normal main merge: 8612aff051db4590f15efcb02fa37deb2992f6f5. Only ROADMAP/UPSTREAM conflicted; complete landed prose is preserved. After the checkpoint the only own Lean deltas are canonical imports and terminal Header proof simplification. Native programs, public statements and supplier credit are preserved.

Original native implementation: fixed 320 registers and <=132352 flat slots including halt, no width reads. Reads the real six-word record/heap, computes m using NatLog, copies raw X/Y and all interleaved query occurrences, and invokes the complete 163-register runtime-relocated callable bank. Copying keeps raw 0/1; the callee charges signed doubling once. No catalogue/wind…
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Nov 1, 2026
cslib-community#2109)

* feat(exactTriangle): relate lopsided queries and matrix products

Adapt the finite counting interface and signed digit expansion from anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5 for milestone #1438. This is a mathematical interface; native preprocessing, fast solvers and full composition remain under #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 #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 #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 e41e1dda62a10c8f89917e2ccab54fbbedad1ad4, 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(matrix): prove the tensor recursion and pruned evaluation core

* doc(matrix): clarify the overlapping contributing leaf

* doc(matrix): make tensor and pruning explanations standalone

* 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 #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 8e182b091199b323c7e6271acebbfcee2e4cdd18 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(matrix): prove finite thin-product correctness and sparse bounds

Implement the complete finite mathematical milestone of #1463 above #1464:
valid layouts, batch-product correctness/error exclusion, arbitrary-N tiling,
exact requested signed products, order/cardinality estimates, geometric tails
and the derived sparse bounds. At D=4^m, L=19m, D^18<=N and |W|*2^m<=N^2,
encoding entries are bounded by4*N^2/D^(1/18), contributing leaves by33
and passed-set cardinalities by(19m+1)*33 times that scale. Add finite
magnitude and auxiliary object-count bounds. None are native instruction costs.

All six final local gates pass: strict build, aggregate check, strict tests,
environment lint, style lint and init-import check. Hygiene --check-simp,
changed-file lints (14 library modules,1 new test) and diff --check pass.
Tests kernel-check signed results3,20,0,-8, true padding, empty/sparse and
negative-order boundaries, and instantiate all aggregate bounds with jointly
satisfiable m=1 parameters and symbolic matrices without resource overrides.

Read-only math/API review by /root/thin_product_review is clear after fixed
doc references/magnitude wording/quotation hygiene. Focused final delta review
by /root/thin_product_final_delta_review is clear for tree
b021e2d9340b433a9fdb129882351e158e8c289f, reusing the prior mathematics review.
These are internal agent reviews, not outside coordinator or human approval.

Source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
selective Section2 finite mathematics; Anthropic credit/NOTICE retained.
Abstract assessment: no impact on selected headlines, catalogue or rendering.
Full native tensor/sparse-product/Exact Triangle code, native Chan-He #1446,
whole input/time/width composition and improved1.9992 remain under #1394.

AI assistance: implementation and reviews with OpenAI Codex, worker session
codex-thin-product-math-20261028.

* 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 #1446; independent complete parameter subtask #1458.

* doc(matrix): explain finite thin-product guarantees in the Lean API

Restack #1463 above repaired #1464 without changing the reviewed mathematics.
Rewrite 149 documentation blocks in 14 modules as standalone descriptions;
replace operation-cost and word-size narratives with the exact entry, leaf,
passed-set and specified-value quantities proved. Preserve pinned Anthropic
credit, source locators, statements, definitions, proof bodies and imports.
An independent comparison with original ee288fb16 confirms that all code bytes
outside comments are identical, including code whitespace.

Validation of this final tree: all six gates pass together (strict build,
aggregate check, strict tests, environment lint, style lint, init imports).
Citation-aware full hygiene --check-simp, changed-file lints (14 library modules,
one test) and git diff --check pass. Lean MCP FiniteMagnitude diagnostics finish
without errors or warnings. Serial Smoke/Axioms warmups avoid the shared-host
memory failure previously seen when these import-heavy clients run together.

Tests and substantive math/API review evidence are retained from the original
reviewed tree b021e2d9340b433a9fdb129882351e158e8c289f in ee288fb16. This change
is documentation-only; /root/draft_thin_docs authored the scratch map and the
continuation worker inspected/applied it. That drafting is not independent review.
Earlier math reviews are inside-fleet agent reviews, not outside or human approval.
Outside coordinator review will be requested on the final PR. No selected abstract,
catalogue or rendering is affected.

PR publication remains held while native dependent restacks are repaired, per
root sequencing. #1394 remains open: native shared encodings/pruning/Exact Triangle,
Chan-He #1446, complete Convolution/ordinary input/time/width composition and the
improved Section4 route to exponent1.9992 are not supplied by these finite counts.
AI assistance: OpenAI Codex workers codex-thin-product-math-20261028,
codex-three-sum-continuation-t3-3dda8289 and /root/draft_thin_docs.

* fix(wordram): repair parameter proof hygiene and ceiling-log docs

* feat(wordram): implement shared tensor encodings

Complete the shared left/right encoder milestone #1493 above parent b4936ce28
(#1496). Fixed standard-WordRAM code with 32 registers computes every public
encodingL/encodingR leaf from actual initialized flat signed inputs. The native
bound is 240*(L+1)*10^L instructions plus halt, with explicit magnitude/address
inequalities, two alternating buffers, charged initialization/copying and the
complete outside frame. The full ordinary native 3SUM objective #1394 remains
open; this component supplies no sparse-query or Exact Triangle solver.

Validation of tree b598513f02cc064eaf50d3c680684c19289ffd71 against
b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
changed-file lints (13 library modules, one new test) and diff checks pass.
Tests execute both encoders at depths zero, one and two, compare all 100
depth-two leaves with the unchanged public encodings, preserve input/frame
sentinels, and cover adjacent word widths and all three copy block orders.
Kernel-checked concrete flat executions discharge every width/magnitude
premise. Selected abstracts, catalogue and rendering are unaffected.

AI assistance: OpenAI Codex implementation and self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Independent correctness/API review is pending;
this is not an approval or a claim that the complete 3SUM objective is done.

* test(wordram): connect encoder witnesses to charged runs

Connect the zero-depth and two-stage regression memory witnesses to the
actual prefix Runs already proved by runs_left, rather than discarding that
conjunct. Bound the prefixes by 240 and 72000 instructions and expose the
same executions' charged halt at n+1. All library code is unchanged from
ad3e09735a116f9868e87cf7ae6af59e5cb6a285 (tree b598513f02cc064eaf50d3c680684c19289ffd71).

Validation of tree 8277017f2c63a5851b63a5d4b49775a9fb96d62d against actual
parent b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
fresh changed-file lints (13 library modules, one test), strict PR-draft
declaration-name check and staged/unstaged diff checks pass.

Independent nonauthor agent review 8034f3da approved exact ad3e09735/tree
b598513f, covering full code/model/cost/width/source and ArrayCopy with no
blockers. It is inside-fleet review, not outside approval. This test-only
delta addresses its optional witness-connection finding; focused final
test/source-mapping review remains pending through the parent coordinator.
No selected abstract, catalogue or rendering impact. The full ordinary
native 3SUM objective #1394 remains open; this implements encoder issue #1493.

AI assistance: OpenAI Codex implementation/self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Publication remains on hold for focused
review; this commit is not approval or a whole-3SUM completion claim.

* feat(wordram): checkpoint native pruned-query controller proofs

Work in progress for #1526. Fixed native controller and initialized-input interpreter regressions, numerical child-set bridge, call-count potential, charged power/scan/clear/frame/arithmetic/return kernels. Individual current Lean modules have clean MCP diagnostics; the earlier strict targeted scan/count/value/test checkpoint passed. The complete global controller invariant, native evaluator theorem, actual initialized flat-run clients and sparse charged bound remain unfinished. No full six-gate or independent review claim; no PR submission. Full #1394 endpoint remains open. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* refactor(schonhage): reuse binomial bounds and sharpen signed tests

Address the bounded nonblocking review findings on #1496. Keep Nat.choose_le_exp_mul_div_pow unchanged while deriving it from Cslib.sum_choose_le_exp_one_mul_div_pow in the existing real binomial module; remove the redundant module and migrate its import. Preserve Anthropic, Samuel Schlesinger, OpenAI and Erik Demaine credit. Kernel-check an actual mixed inner/outer L2,m1 signed pruned result of -8, remove two signature-only tests and retain positive admitted-parameter checks. Paraphrase the identified source-derived sentence, shorten generic source boilerplate and record the generic naming follow-up. No public mathematical statement or definition changes meaning; no selected abstract or endpoint promotion. Final validation/source/review evidence is in PR #1496. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* feat(WordRAM): prepare and encode every shared matrix band

Implement the complete bounded #1523 native component under #1394. A fixed
96-register standard WordRAM program computes valid subset/inverse tables and
a deterministic existing Layout, prepares all padded signed row/column bands,
calls the unchanged #1520 encoders once per shared band, collects every leaf,
and restores the entire initialized input prefix and outside frame.

The State.init and flat Runs/Executes clients bind the actual output memory to
public encodingL/R in the unchanged leafIndex order (P0 digit 9). All powers,
mask/popcount/root/table loops, indices, guarded matrix addresses, initialization,
copying, encoder calls, loop controls and halt are charged. The generic bound is
4096*(L+1)*(1+N*4^m+2^L+2*numBands*10^L), plus halt; at L=19m and N>=(4^m)^18,
the full charged run is <=81920*(L+1)*N^2/(4^m)^(1/18).

Width assumptions are explicit original-parameter inequalities: the wordBudget
fits target w+2 and 7^L*A < 2^(w-1), w>0, A>=0. Actual signed kernels use at most
15/17 instructions for add/subtract, already included through the unchanged
encoder's real cost. No all-state fit, callback, solver, assumed run/cost or source
machine semantics is a hypothesis. Symbolic positive-depth thin native examples
and concrete signed/padded/frame/width-boundary executions establish nonvacuity.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Programs/Sec2/Theorem5/Encode/AllBands.lean:230-239,262-271
and BandArrayFacts.lean:107-113. Verified checkout files equal their pinned Git
blobs and all PR-draft quotations match those exact line slices. The source's
row/column encoding predicates map to runs' quantified original matrices, all
bands and all leaves on computed MaskTable.layout; Light limits/program maps,
callee contracts and source time hypotheses are replaced by actual native code
proofs, not imported. The block index is beta*K0+(side? h:g), and row is block*N0
plus the compressed outer offset. Shared tile pointers and retained table words
are exposed by tileInputBases/tile_input_values/table_word_layout.

Reuse unchanged WordRAM control/rename/copy/signed APIs, Layout/bandArray/encoding
mathematics and Mathlib finite index/sorted-set APIs. New mask scans, dense inverse
lookup, direct base-seven decoder and native execution/cost composition are
original. Small native-power/ordered-filter/positional-digit/row-major lemmas live
in narrow topic modules. Retain Anthropic, PBC source credit and NOTICE.

Validation: PASS all six strict gates (build --wfail --iofail, mk_all --check,
test --wfail --iofail, lint, lint-style, checkInitImports), serial Smoke/Axioms
warmups and the global Axioms audit; full citation-aware hygiene --check-simp,
fresh actual-base changed-file lints, strict PR-name and diff checks. Validated
with LEAN_NUM_THREADS=1 and cache downloads disabled. Windows static metadata
reads used PYTHONUTF8=1; no Lean/source change was needed. New Lean files use ordinary non-executable file modes. Exact payload tree
bdfc5a1a33f0d712b90f4fe4bc9d6c27e2d8318e. Targeted Lean MCP endpoint/tests and pinned quote identity also pass.
No PR has been opened;
independent exact-revision correctness/API/source-mapping review is pending.

Abstract assessment: no impact on selected abstracts, models or scope; no new
headline or PDFs. Pruned queries, products, solvers and whole ordinary 3SUM remain
open under #1394. Base #1520 remains unchanged at 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6.

AI assistance: Codex implementation/proofs, session codex-native-bandprep-t3-03b600bd,
under delegating-worker coordination. Existing unchanged encoder outside-review
evidence is PR1520#issuecomment-6477077023; final new-component review pending.

* feat(wordram): checkpoint native pruned accumulation and frame transitions

Work in progress for #1526, not a submitted component. Complete native parent accumulation loop (31N+3), internal sparse initialization (7N+8), computed child push (15), shared actual frame-word store, executable query-code inverse/requested-set bridge and recursive timestamp allowance. These current modules have clean targeted Lean MCP diagnostics; actual interpreter and kernel digit/request regressions pass. Changed-scope hygiene --check-simp and diff check pass. The general node/controller continuation proof, actual initialized full evaluator theorem and final sparse charged bound remain unfinished; no full six-gate or independent review claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289; full #1394 remains open.

Final current-tree checkpoint: strict build --wfail --iofail of Accumulate, Clear, Push, Frame, Powers, Leaf, Weight, Scan and SchonhagePruned tests passed together (3596 jobs); scope hygiene --check-simp and diff checks pass. This is a partial implementation checkpoint, not an all-six-validated PR or completed #1526 milestone.

* feat(wordram): checkpoint actual pruned-query root-frame stores

WIP #1526. Factor root scan setup and root finish; prove the actual eleven-instruction root-frame initialization and exact memory/register frame. Current Root MCP diagnostics clean. Full node/controller composition remains unfinished; no PR or full-six claim. AI-assisted continuation by codex-three-sum-continuation-t3-3dda8289.

* fix(nat): reuse existing tuple digit identity in band preparation

Address the sole P2 finding from the independent #1523 review of cb261f6b:
remove duplicate Nat.ofDigits_ofFn and publicly import the existing radix
module. The finite-function numbering bridge uses Nat.ofDigits_ofFn_eq_sum.
Its statement is unchanged. Existing radix declarations, proofs and source
credit are unchanged; no native program, endpoint statement or test changed.

Validation on exact final tree 4807cb971cf8030f70df67e5e8fa13947dcbd202:
PASS all six strict gates together (build --wfail --iofail, mk_all --check,
test --wfail --iofail including global Axioms, lint, lint-style,
checkInitImports), fresh actual-base changed-module lints (29 library/1 test),
full citation-aware hygiene --check-simp, strict draft-name and diff checks.
Serial LEAN_NUM_THREADS=1; optional cache downloads disabled. Lean MCP also
reports clean diagnostics for the changed bridge. Logs are in
.lake/codex-three-sum-continuation/band-review-six in the continuation checkout.

Original native implementation and all full correctness/API/source-mapping
review coverage retained. Review record:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6479696830
Original implementation/validation handoff:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6478943178
Focused final delta review pending before PR publication. No impact on selected
abstracts, models or scope; no new headline. Complete #1394 native 1.9992
endpoint remains open.

AI assistance: bounded reuse fix and validation by Codex session
codex-three-sum-continuation-t3-3dda8289. Original author credit remains on cb261f6b.

* feat(wordram): checkpoint complete native pruned-controller phases

Continue #1526 implementation under #1394; this is explicitly partial WIP,
not a complete component or PR submission. Full recursive node composition,
initialized input/flat clients, derived global fits and total-time theorem
remain open. No solver or all-state fit/execution/time certificate is assumed.

Check full root setup/scan/frame (20Q+19), report (9Q+3), leaf/return (24),
loaded leaf step (43), internal entry (7N+28), native nonempty child scan/push
(20N+42), empty-child scan/advance (20N+33), returned-child accumulation
(31N+29), and final return (26) against the actual standard fixed native Code.
KernelRegs describes only constant/pointer register values. Node footprints
preserve the ancestor rows. The zero-depth node matches existing Pruned.result
and the finite traceWeight; its continuation uses the existing ExecWithin.loop_iter.
No alternative machine or run semantics is introduced.

The reporting-body/controller names are definitionally identical Code trees.
ScanMemory.congr transports the existing representation across disjoint writes
and removes duplicate root proof plumbing; push exposes its four-store frame.

Validation: targeted Lean MCP diagnostics clean for every new/updated phase
and ComplexityTests/SchonhagePruned.lean. Native interpreter regressions retain
depths 0/1/2, both signs, repeated/empty/mixed queries and an outside sentinel.
New kernel examples discharge the general node/register/address/signed premises,
connect the same negative-product final memory to charged controller execution,
and prove an empty leaf preserves the prior value cell. Diff whitespace passes.
No aggregate/all-six validation claimed: root/native audit coordination hold
is respected. Exact partial checkpoint tree 7fa4da67ea861a2bba3a6c430cd7e40996d0e794.

Abstracts: no impact; no new headline or endpoint claim. Original 1.9992
objective and sparse-product/ET/final composition remain open under #1394.
AI assistance: Codex implementation/proofs by continuation worker
codex-three-sum-continuation-t3-3dda8289.

* doc(matrix): replace copied source prose with API descriptions

Resolve the documentation-only requested changes on #1464:
https://github.com/cslib-community/complexitylib/pull/1464#issuecomment-6477111132
Rewrite source-quotation fragments and related explanations in Alphabets,
Identity, Full and Pruned for the local Lean declarations. Preserve the
mathematical attribution, bibliography keys, source pin and copyright.

A comment-aware comparison with 4f3226cd proves every noncomment byte is
identical in all four files. No declaration, proof, definition, program,
import or test changes. Existing checked source-statement quotations and
notation/quantifier/model/resource mapping in the PR remain unchanged.
The final source-comment screen compares against quoted fragments in the
actual pinned Sec2 and Statements/PaperStatements files, including the
known local renames; no substantial quoted fragment remains unmarked.

Validation is recorded for this exact tree in PR #1464. Source checkpoint
tree 8c3b87bb870d4c4e2202917357d19a7a139296e8. No abstract/catalogue/model/scope
or rendering impact; no new headline. The full native 1.9992 endpoint remains
open under #1394. Ancestor and descendant remotes are unchanged.

AI assistance: documentation repair and validation by Codex continuation worker
codex-three-sum-continuation-t3-3dda8289. Existing independent mathematical/API
and checked-source review coverage is retained; outside review of the bounded
documentation delta is requested, with no new review agent commissioned.

* refactor(finset): use order-embedding names in OrderGlue

Finish bounded #1545 from exact #1536 head66036150a. Replace generic
level/inner/outer API vocabulary with order-embedding/subset/complement names.
Remove five redundant membership/range/congruence wrappers, using Mathlib's
orderEmbOfFin_mem/range_orderEmbOfFin and ordinary substitution directly.
Migrate every actual Levels/Batch proof client with no deprecated aliases.
Keep filter_glue's generic name and rename its predicate parameter to P.

The retained generic statement headers are identical after the documented
renaming and binder alpha-renaming. All 48 Levels and 13 Batch declaration
statements and all definition bodies remain unchanged. The entire native
Encoding module is token-identical after comment removal; every other native
library file is unchanged. Source credit and pin are retained. Thus existing
State.init, Signed.encode, width/frame/cost and encodingL/R meanings remain.

Put the sum/option-versus-flat-digit explanation at the actual leftDigits,
rightDigits and termDigits hover docs, preserving their enumeration bodies
and order (row-major P terms, P0 digit9). Update the UPSTREAM naming follow-up.
Add generic nonconsecutive signed/zero/Option reconstruction clients using
Mathlib's orderEmbOfFin_unique, plus the routed optional #1536 asymmetric
native L4,m1,N29 prefix tests. Those compute headers/count/tables/snapshot and
decode/read ranks1 and2 with K0=2, distinguishing quotient/remainder blocks
and signed values without a full10^4-leaf encoder run or native body edits.

Reuse unchanged outside coverage: PR1496#issuecomment-6477111644 atb4936ce28,
PR1496#issuecomment-6480746578 at68bbe40e3, and PR1536#issuecomment-6480852097
at66036150a12046b29986d8f108c0afaf49d01c61. These are agent reviews, not human
approval. No new cited mathematical result or machine model is introduced.

Validation: PASS build --wfail --iofail, mk_all --check, test --wfail --iofail,
lint, lint-style and checkInitImports, with serial Smoke/global Axioms warmups.
Full citation-aware hygiene --check-simp, fresh changed-file lints against
actual base66036150a, strict PR-name and diff checks, and source/native identity
checks PASS. One thread, no cache downloads, PYTHONUTF8=1 on Windows.
Targeted MCP checks, full hygiene --check-simp and source/native identity
checks pass. Final source tree: 0c21b608cc5ed234527c73a3853a26132f52da0d. No source/ancestor merges or restacks.
Abstract assessment: no impact; no selected theorem/model/meaning/scope or PDF
change. This is generic ergonomics/testing only; full #1394 remains open.

AI-assisted implementation by codex-native-bandprep-t3-03b600bd, under parent
continuation-worker coordination. No new review agent commissioned; ordinary
outside coordinator review is requested when the bounded PR is ready.

* feat(WordRAM): prove all-depth pruned controller execution

WIP checkpoint for #1526; no PR and no completed component claim. The actual fixed native controller now has a depth-inductive execution proof with original Pruned.result values, stored queries/frames, concrete spatial preservation, input-derived signed fits and traceWeight charged continuation. Root loop exit discharges the continuation.

All new library modules through Recursive.exec_ready have clean targeted Lean MCP diagnostics. New concrete entry/result client reports no diagnostics, but the complete existing test file is still elaborating its VM regression commands; no final test-pass or all-six claim. Initialization/root-list/report/flat State.init composition, global width/fit clients, full component validation and independent review remain open. Aggregate checks are held for the coordinated root validation slot.

GenericRAM/Signed/Fits.lean is the unchanged blob from independently owned PR #1552, commit f276db1174333d3e6253b93878be8b95c1fcc713; credit retained. No native program body changed in this checkpoint. All proofs and invariant definitions are original native work; existing mathematical pruning/encodings retain their source credit. No selected-abstract impact or whole-3SUM endpoint claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* style(WordRAM): normalize native proof file modes

* feat(wordram): complete initialized sparse pruned-query execution

Complete implementation candidate for #1526 above #1520 exact 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6. Full ordinary native 3SUM and the published 1.9992 endpoint remain open under #1394. No PR yet; fresh exact-revision independent correctness/API/source review is pending before publication.

One fixed standard native program: 96 registers, at most 4096 flat instructions including halt, no width reads. Complete State.init -> pre-halt Runs -> Executes uses the same answer memory. Every supplied query, including repeats and empty/zero-depth boundaries, equals existing Pruned.result; runs_bilinear specializes existing encoding contracts to bilinearProduct. exec_kernel computes its powers/layout and has a reusable pointer/epoch directory contract. All child lists, timestamp decisions, stack/control/index arithmetic, signed products/adds and reporting are actual charged code, proved by the all-depth exec_ready induction; its continuation is discharged by the actual root exit.

Full charge including halt <= 8192*(L+Q+1+(L+1)*card(leaves(requested qs))). Ordinary source envelope M=A+B+10^L*A*B and address budget H=256*(L+1)*10^L+32*Q+512 derive input fit and execution at every physical W >= clog_2(M+H+1)+3. This is logarithmic in explicit component budgets; global 3SUM composition is not claimed. Inputs: raw L,Q then two canonical signed arrays of length10^L and unsigned query codes, after the actual standard length cell0. Returned output pointer is unsigned. All input/outside memory is preserved on initialized runs. Code/ExecWithin/State.init/Runs/Executes, signed kernels, Heap/Block APIs, existing mathematical pruning/encodings and Mathlib digit/log APIs are reused; GenericRAM/Signed/Fits is the unchanged blob from #1552 f276db1174333d3e6253b93878be8b95c1fcc713, with credit retained.

Pinned source anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5. Checked Git-blob quotation locators: ThreeSumApsp/Sec2/Lemma10.lean:148-150 (Pruned_eq_restrictTo_sum) and:565-566 (Lemma10.total_size). Source Pruned -> existing Pruned.result; source restriction -> Finset.piecewise; source Leaves -> leaves; all natural depths and arbitrary integer arrays retained. Native indexing directly uses existing leafIndex(privateLeaf), first coordinate least significant, inner digit9. Child prefix/stride/division are proved against the finite childSet/sliceAt semantics. Native code/proofs and cost are original, not supplied by source Light semantics or its sorted-segment implementation. Full checked quotes and model/quantifier/layout/cost/reuse mapping are in the prepared UTF-8 PR draft. Copyright retained in source/NOTICE.

Validation on tree bd6e74cce28dbd16c90291b847dac1a311402510: all SIX strict gates pass together, LEAN_NUM_THREADS=1, downloads disabled: build --wfail --iofail; mk_all --check; test --wfail --iofail (including Smoke/global Axioms); lint; lint-style; checkInitImports. Full citation-aware hygiene --check-simp; actual-base47-library/3-test changed-file and local lints; strict PR declaration-name audit; staged/unstaged diff checks pass. Register alias docs fixed the first lint finding; all native definition bytes are unchanged by that fix. Tests discharge real State.init positive/negative/empty/depth-two mixed/shared/repeated queries, sufficient-width family and failing fit boundary; callable signed wildcard with nonzero epoch and preserved input/outside sentinel also checks. No sorry, custom axiom or native_decide introduced.

Selected abstracts/catalogue/rendering: no impact, no new headline. ROADMAP/UPSTREAM preserve the open sparse-product/ET and global1.9992 gaps. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289 (OpenAI Codex); original finite source credit to Anthropic, PBC.

* feat(wordram): checkpoint computed wanted-query routing

Partial implementation of #1561 by codex-three-sum-continuation-t3-3dda8289.

Implements actual fixed standard 96-register routing/grouping code with computed valid-mask tables, tile counts, prefix offsets and stable scatter. General checked proofs cover the digit kernel (15L+10), one-query routing (15L+25), exact outStrOfPos/queryIndex mapping, computed header/count/relocated-table initialization (16L+(12L+33)*2^L+83), input-memory frame and original-input-derived fits. Generic finite stable-counting positions are injective and bijective.

Targeted Lean MCP diagnostics clean for all nine new library modules and the regression suite. Actual initialized interpreter regressions pass for empty input, zero depth, duplicates and an asymmetric K0=2 three-band case; no encoded leaf array is materialized in routing tests. The 96-register program computes every routing/count/prefix/scatter decision.

INCOMPLETE: general native counting, prefix and scatter execution invariants, initialized flat complete-run/width/frame/bound clients, final static hygiene and ALL SIX gates remain pending. This checkpoint is not a PR or acceptance claim. Mutable global audit slot remains with parent; no aggregate performed here. Full #1394 native sparse/ET solver and ordinary 1.9992 endpoint remain open.

The child branch merges unchanged #1554 at 12abeee84 onto frozen #1562 base 0c2e0ebea. The local merge 60bec64398 only reconciled shared credit/roadmap/upstream prose; no ancestor branch was edited. Original implementation mathematics/code by Erik Demaine with AI assistance. Existing finite Schonhage and band/encoder/pruned interfaces are reused with their original credit retained.

* feat(wordram): checkpoint wanted count-pass proofs

Continuation of #1561 from 06b3563e7. CountStep has clean targeted Lean MCP diagnostics, including exact 14-instruction native count update and memory frame. Dense zeroing and count-loop composition are implemented; Count.lean has one pending elementary nonnegativity/address-bound proof at line 152. This is an explicitly incomplete source checkpoint, not all-six validated or a PR. Work is paused solely to prioritize the bounded outside-requested #1562 repair. No program/public statement in #1562 changed.

* doc(finset): restore ordered-gluing source credit

Restore the original AlmanWilliams2026 Section 2 citation and finite-scope sentence removed by the naming refactor. No Lean declarations or proof tokens change.

AI-assisted coordinator fix by coordinator-codex-queue-20261028-ready-c. Original implementation and source authorship retained; independent delta review and new hosted CI requested on PR #1554.

* fix(wordram): address pruned-query review findings

Bounded documentation/test repair for #1562 / #1526 by codex-three-sum-continuation-t3-3dda8289, above exact 0c2e0ebea6199ac1fbe9b2e048ce24b9410f8d1a.

Fix both ROADMAP reference definitions, distinguish client contracts from exported internal stage APIs, and document why the narrow ArrayAppend/InputArray topics avoid Allocation interface/dependency fanout. Extend existing post-integration issue #1553 with the exact pruned power register map, 4L+10 accounting, affected consumers, fused-encoder accounting and sibling integration order; no power program or ancestor is changed.

Add one fully admitted signed runs_bilinear client: depth0, original arrays -3 and 2, actual encodingL/R premises discharged, original-input magnitude/address fits discharged, physical width10, same actual State.init prefix Runs and charged halt, and output memory at address6 equals Signed.encode(-6). Targeted Lean MCP diagnostics pass.

Validation: all six strict gates passed together on final staged tree f4cfd4ae0d838c4b4bf4c43c924f400744450957, including Smoke/global Axioms; one thread/downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base 47-library/3-test module lint, changed-file audits, strict declaration-name check and staged/unstaged diff checks pass. Local machine-readable evidence: .lake/codex-three-sum-continuation/pruned-review-repair/{summary.json,static-summary.json,identity.json,*.log}.

Source identity audit against 0c: all seven changed library files have identical comment-free tokens. Every public library statement, definition, native program and proof is unchanged. Every existing test byte is unchanged except the single inserted concrete client. Abstract/catalogue/rendering assessment: no impact.

The prior inside-fleet technical review at issue1526#6484055995 and outside FINAL at PR1562#6484177608 cover unchanged native semantics/source mapping. Fresh focused outside review of this repair is requested; no new review agent was commissioned, and no outside/human/platform approval is claimed. All original Anthropic, PBC credit retained. AI-assisted implementation by OpenAI Codex.

#1561 source is preserved separately at 7772a3497017078b37d1e04004225fae28baddad with its pending native grouping proof work explicit. Concrete sparse-product/Exact Triangle programs, full input/time/width composition and the original native 1.9992 endpoint remain open under #1394.

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(imports): regenerate aggregate after Chan-He parameter integration

* feat(wordram): route and group wanted thin-product queries

Implement #1561's complete native routing/grouping component. State.init prepends
the native length cell to [L,m,N,Q] followed by raw coordinate pairs.
Actual finite unsigned standard Code computes tables, tile keys, codes, counts,
prefix offsets and stable scatter. No layout/run/time/permutation certificate
is supplied. Fixed 96 registers, <=4096 flat slots including halt, no width reads.

Wanted.runs_grouped proves actual State.init prefix Runs and charged halt at the
same final memory, exact per-occurrence code/original-position equations, exact
wantedStrings tile spans, in-array span/code bounds, permutation, terminal Q,
input/outside frame and final boundedness. All admitted physical widths are
covered by the positive clog2(wordBudget+1)+1 threshold, with original input fit
derived. All initialized reachable prefixes are bounded. Complete native charge
including halt <=128*(L+1)*(Q+numBands^2+2^L+1). No 10^L scan per query/tile.

Validation: final tree 6c8164db02df348a46ffe0cf5972415977c62939. All SIX strict gates passed
together: build --wfail --iofail; mk_all --check; test --wfail --iofail (including
Smoke/global Axioms); lint; lint-style; checkInitImports. One Lean thread, cache
downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base
57-library/3-test lints, changed-file/name/staged+unstaged diff checks all pass.
The initial test-only module-boundary VM evaluation failure was fixed by using
the existing non-module native-test convention; every interpreter check remains.
The corrected frozen tree passed the complete six-gate sequence again.

Base: #1562 ce77926c393ce34e7962759bb412172c4584a67c. Preserve normal merges.
Unchanged sibling prerequisite #1554/#1536 is retained at exact
702c14bcf9896655b17c9b2dd5e02e6f270c9966: all 33 library and two test blobs are
byte-identical. Wanted contributes 24 library modules and one test. Existing
unchanged sibling reviews are reusable; no ancestor branch or remote was edited.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Sec2/Theorem5.lean:44-46, checked against its Git blob:
"outStrOfPos lay I J ∈ wantedStrings lay W (bandOf L m I) (bandOf L m J)".
Tiling/Definitions.lean:128-131 defines that filter/image set; reuse it unchanged
with W=qs.toFinset and separately preserve original list occurrences. Source
Programs/Sec2/Theorem5/Wanted/Codes.lean:13-19 motivates routing. Actual native
code uses the existing least-significant-first queryIndex/leafIndex dictionary,
digit9 for the inner wildcard and 3*row+col otherwise. It proves agreement rather
than identifying the Light program's separate numbering, semantics or costs.
Native code/proofs/stable-scatter theory are original; primitive counts reuse
Mathlib Nat.count directly, with zero/successor/bound/monotonicity APIs and the
existing count_eq_card_filter_range identity. Redundant count/offset wrappers
and their repeated elementary lemmas are removed. Every client is migrated;
Program.lean and PackProgram.lean are byte-identical to checked checkpoint
2e2cc39675a30b024c3932bd23f06163a33c8925. Imported finite source credit is
retained. All three source slices equal the pinned Git blobs.

Fully admitted kernel clients cover empty/zero depth, repeated pairs, and the
L4/m1/N110/K0=2 asymmetric family, tying answers to actual Runs/halt. Actual VM
regressions cover all expected grouped words, original indices, offsets and
input/outside frame. Fitting and failing physical-width premises are checked.
No sorry, custom axiom or native_decide. No curated abstract/catalogue/PDF impact.

Shared-band calls, actual buffer/header adaptation, pruned-kernel invocation,
answer reconstruction, sparse-product/Exact Triangle and full native ordinary
3SUM composition/1.9992 remain open under #1394. This is a component milestone.
Fresh nonauthoring correctness/API/source review is pending (root arranges);
outside review remains required. No PR, integration or approval claim.

AI-assisted implementation: OpenAI Codex, session
codex-three-sum-continuation-t3-3dda8289. Author/source credit is preserved.

* fix(imports): regenerate aggregate after shared-encoder integration

* perf(wordram): reduce native parameter proof heartbeat budget

* chore(wordram): scope measured parameter proof budget to reduction task

* perf(schonhage): focus cell arithmetic and use the default heartbeat budget

* fix(doc): restore unrelated upstream coordination records

Restore the exact 231-line tail common to both integration parents after review caught an overbroad conflict-marker match. The intended 3SUM integration prose is retained; no Lean change. AI-assisted correction by OpenAI Codex.

* fix(imports): regenerate band-preparation aggregate from merged inventory

* doc(order-glue): preserve reviewed source credit through supplier merge

* doc(order-glue): restore paper citation and finite scope

* feat(wordram): checkpoint native queried-product construction (#1581)

Unfinished implementation above exact a6e4005b2 on the existing isolated child branch.
The fixed native program computes both producers, protected layouts/copies, tile ABI,
one shared timestamp directory, actual pruned calls and original-order reconstruction.
Targeted Lean MCP checks pass for the new native program and supporting original-input,
parameter/layout, copy/frame, grouping-span, raw-conversion, producer and directory proofs.
Five actual initialized interpreter regressions pass: empty, signed/duplicate, raw01,
multiple tiles/padding/epochs, and nonempty inner tensor coordinates.

This is a recovery checkpoint, not a complete native product result or PR candidate.
Full tile/epoch loop and reconstruction correctness, initialized composition, complete
charged cost and logarithmic-width/saving results remain open under #1581/#1394.
All six/global/static validation remains held for root; no aggregate or static audit ran.
Existing curated abstract statements and scope are unaffected; no headline promotion.
Implemented personally by codex-three-sum-continuation-t3-3dda8289 with AI assistance.

* fix(imports): regenerate thin-product aggregate after main integration

* doc(wordram): separate shared-encoder integration records

Keep the reviewed finite-matrix supplier records intact and record native-encoder scope and source credit separately, so squash-queue integration does not overlap the ancestor documentation hunks. Preserve code, tests, concrete bounds and the complete unrelated upstream-record suffix. Queue revisions are used only for read-only projection, never as parents.

* doc(matrix): keep progress links out of shared reference append block

* feat(wordram): checkpoint complete queried-product source before supplier merge (#1581)

Local recovery checkpoint only. Complete native queried-product execution, initialized
clients, quantitative thin saving and logarithmic width have clean targeted Lean MCP
diagnostics. Import generation adds the 29 new modules. No all-six/static validation or
independent candidate review is claimed by this checkpoint; it is not a PR candidate.

The actual #1576 supplier advanced from a6e4005b to integration91f485ec. Preserve this
source before a normal child merge, reconcile only shared docs/imports, regenerate the
aggregate, then validate the final source together against the actual supplier.

Original native implementation by Erik Demaine with Codex assistance, reusing credited
finite Anthropic Section 2 mathematics and actual native producer/router/pruned kernels.
Ordinary-3SUM/Exact Triangle and the full #1394 1.9992 endpoint remain open.

* feat(wordram): execute queried thin-matrix products (#1581)

Complete #1581 implementation candidate under #1394, awaiting required fresh exact-head
non-authoring correctness/API/source/resource review. No PR is opened or integration
approval claimed. Normal child history preserves source checkpoint af208636b and actual
reviewed #1576 supplier91f485ec; no ancestor branch or remote was edited.

One actual fixed standard unsigned WordRAM program per signed/raw input mode consumes
original headers [L,m,N,Q], both row-major integer matrices X:N x 4^m and Y:4^m x N, and
raw interleaved requested coordinates. It computes tables/layout, shared encodings,
Wanted counts/prefix/stable scatter, tile pointers, decoded queries, directory/epochs,
pruned evaluation and original-order reconstruction. Raw nonnegative entries are doubled
by actual charged load/multiply/store instructions (including raw0/1 -> signed0/2).
There is no source Light machine, assumed layout, sorting, solver, run or time oracle.

QueriedProduct.exec/runs/runs_wide prove actual native execution from original words /
State.init, same-y prefix Runs and charged halt, every original occurrence's exact
Signed.encode((X*Y)[qs[i]]) including duplicates, original-input restoration and the
complete outside frame. Generic execution assumes m<=L, original absolute entry bound A,
raw nonnegativity in raw mode, and the explicit original numerical magnitude/address
admission; it has NO query-sparsity hypothesis. The real pointer/epoch kernel uses a
directory initialized once, with scratch/frame separation and propagated fresh bounded
epochs. Code has 160 registers, <=32768 flat instructions including halt, no width reads,
and is independent of dimensions, magnitudes, query counts and physical widths.

Thin hypotheses: L=19m, D=4^m, N>=D^18. With distinct-set sparsity
|qs.toFinset|*2^m<=N^2, complete charge including halt is <=
65536*(19m+1)*(65*N^2/D^(1/18)+Q). With the stronger occurrence hypothesis
Q*2^m<=N^2 it is <=4325376*(19m+1)*N^2/D^(1/18). Multiplicity/output work is never
replaced by set cardinality. runs_thin holds at EVERY physical W>=
128*clog_2(N+Q+A+2), deriving InputFits and all intermediate admissions. Its explicit
magnitude/address envelope is <=2^40*(N+Q+A+2)^10, allocation <=128*(N+Q+A+2)^4.
Physical all-prefix boundedness is proved; a separate source-polynomial prefix bound at
arbitrarily larger widths is not extracted here. ET record/input adaptation and all its
copies/calls, Exact Triangle solving, ordinary3SUM composition and improved Section4 /
1.9992 remain open. This component proves neither full3SUM exponent.

Source mapping checked against actual Git blobs at anthropics/formal-math
16a5ce41304fcdaea4e0be7c132e1c361dc26da5, under3sum-apsp/ThreeSumApsp:
- Sec2/Theorem5.lean:61-67 concludes the pruned band value equals (X*Y) I J.
  Existing finite thin_product_spec/MaskTable.layout/bandArrayL/R/encodingL/R and
  wantedStrings are reused; W=qs.toFinset, with a separate occurrence permutation.
- Sec2/Theorem5.lean:146-149, paraphrase of its conclusion:
  ((sum T in tiles (19*m) m N, |Leaves(wantedStrings lay W T.1 T.2)|):Real)
    <=33*(D m)^(-(1/18):Real)*N^2.
  Source hypotheses N>=D^18 and W.card*2^m<=N^2 are retained. Existing encoding,
  tile/leaf/passed-set estimates bound ACTUAL native execution, not an assumed cost.
- Programs/Sec2/Theorem5/Pruned/AllTiles.lean:86-92 and Wanted/Report.lean:30-37
  are the per-tile/report specification references; Solver.lean:150-161 is conditional
  on Light callees. Native code here is original, accepts stable unsorted duplicates,
  charges empty tile calls and proves all native callees directly. Instruction constants,
  widths, protected layout and frames are independently proved for the native model.
The UTF-8 PR mapping draft contains two exact Lean quotation slices, both checked against
Sec2/Theorem5 at that pin; all four cited source files equal their pinned Git blobs.
Anthropic, PBC's existing mathematical source credit is preserved. New native programs
and execution/resource proofs are original work by Erik Demaine with Codex assistance.

FINAL VALIDATION (whole source tree, not only this commit's proof/doc delta):
Tree 555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; four compiler threads; cache downloads disabled.
1. lake --no-cache build --wfail --iofail : PASS (13.56s).
2. lake --no-cache exe mk_all --check : PASS (11.33s).
3. lake --no-cache test --wfail --iofail : PASS (27.14s).
4. lake --no-cache lint : PASS (43.22s).
5. lake --no-cache exe lint-style : PASS (17.09s).
6. lake --no-cache exe checkInitImports : PASS (16.8s).
Strict tests cover new initialized/product clients, Smoke and global Axioms.
Full citation-aware hygiene --check-simp, fresh actual-base30-library/one-test lints,
changed-file checks, 25-name strict final-body audit and staged/unstaged diff checks PASS.
Actual comparison base: 91f485ec38ca6b878f338e2cdbdedbf5d4f20257.
3533 inherited source/abstract files checked; only the existing tile-key lemma is exposed
with the same statement/proof. All35 inherited sibling blobs equal actual parent91.
All native code bodies/register definitions are byte-identical to af208636b;
comment-erased Program tokens match. Current full Program source SHA256:
2b86fe04f6afa49a7eadc75292559dca62f4d65c5f7bdaf3b1f4386994aa8ebc
Public Header.exec_layout statement is identical; proof split passes at DEFAULT
heartbeats, without a new allowlist entry. Final register docs clear the initial lint
failure (47 undocumented aliases); prior incomplete/failed checkpoint logs are retained.
Checked PR/source mapping draft SHA256: be43f587d5c0ac6dd871093d5d19c283ef7dd9732b5c5d3cfa77b24e42899a24
Local reproducible records: .lake/codex-three-sum-continuation/queried-product/
summary.json, static-summary.json, source-native-identity.json, source-mapping.json,
run-identity.py, final-body-names.log and per-gate logs. This commit description is the
durable evidence until a PR exists; issue1581 links it.

Examples discharge real width/magnitude premises and connect the same final y to prefix
Runs, halt and memory: signed/raw, duplicate, padded/multiple-tile, positive/zero depth,
empty inputs, nonzero original header, adjacent sentinel, strict budget boundary and
nonempty symbolic admitted thin family at every inner depth.

Abstract assessment: no selected statement/definition/scope/catalogue/rendering impact.
ROADMAP/UPSTREAM preserve remaining1394 scope; no headline promotion.

Fresh review of all NEW native semantics/cost/width/frame/init/API/source mapping remains
pending root arrangement. Unchanged prerequisite outside coverage can be reused after
the recorded identities (1576 outside FINAL6487515809). No child watch/approval/merge.

* style(Schonhage): remove trailing space in queried products

Independent nonauthoring /root/queried_product_review examined the complete
native #1581 layer at ff31104be7acf96798c13b38cb079c58605a1ec3 against
91f485ec38ca6b878f338e2cdbdedbf5d4f20257, including all 29 new library
modules, actual execution/frame/width/cost, multiplicities, source mapping
and initialized clients. No correctness/API/source/resource blockers; this
is agent review within the root fleet, not outside or human approval.

The single P3 finding was a trailing space in Product/Groups.lean:111.
This coordinator correction removes exactly that ASCII space. An exact
byte check and git diff -w verify no other change. Full base-to-head
diff --check now passes, covering committed changes as well.

All six gates and static/source checks pass on reviewed tree555b6b52,
as recorded in ff31104. The whitespace delta is validated separately;
final hosted CI and outside coordinator review remain required.
Curated abstracts unaffected. AI assistance: Codex.

* doc(Schonhage): retain band catalogue encoding contract

Restore the one supplier sentence in UPSTREAM.md about unchanged leaf ordering and
canonical signed words, addressing optional nit1 in outside FINAL6493515098 on PR1615.
All other paragraphs are preserved. Exact byte comparison against9a57e134 verifies
this one sentence is the entire tracked delta; all Lean/native/math/API/abstract
source and every other tracked byte are unchanged.

Documentation-only validation: consistency with the existing catalogue interfaces,
full base-to-head diff --check, citation/simp hygiene and strict25-name final PR-body
audit pass. No Lean, import, aggregate or full rebuild was run for prose. Original
all-six evidence remains for tree555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; this does
not claim a new-head all-six run. No changed abstract meaning or rendering.

Full nonauthoring native/source review and outside FINAL coverage are reused across
this bounded doc delta. A focused outside DOC delta check is requested, not another
full review. Register naming remains a separately coordinated follow-up; existing
nonzero interpreter coverage was accepted, so no test change is included.

AI assistance: Codex implemented the requested one-sentence documentation repair.

* fix(imports): regenerate wanted-routing aggregate from actual inventory

* wip(wordram): checkpoint callable thin-product source

Personal #1618 source checkpoint before integrating the refreshed #1615 parent. Complete generic native memory-window compiler, computed-modulus callable raw01 product, initialized Runs/halt, width/window/cost and dirty-memory/frame tests have targeted Lean MCP diagnostics clear. Canonical imports and final all-six/static validation remain pending; this is not a publication candidate. Reuses the exact landed NatClog module from a1d1fa882, with original credit. No full Exact Triangle or ordinary3SUM endpoint claim.

* feat(WordRAM): run queried thin products in caller-owned memory

Implements the bounded callable prerequisite #1618 under #1394. Owner/session:
codex-three-sum-continuation-t3-3dda8289, personally on
work/three-sum-native-callable-product-20261029. Ordinary parent merge904c62068
preserves the reviewed #1615 a8cb7c984cd77e7eb150522e1353a2da22c84839 source.

Generic MemoryWindow.compile adds actual add/load/remainder and add/store
instructions, retaining ordinary Code/Exec/ExecWithin/Runs semantics. Proved
bounded native-source execution transfers within3x charged instructions/code
size, with3 additional registers and a full outside-window frame. The clipped
memory view is a value relation, not another run semantics or an algorithm oracle.

Concrete raw01 CallableProduct derives the actual source execution from original
matrices/request occurrences. Native NatClog/Power compute the source modulus;
fixed register normalization, translated producer/query execution and two exact
input/output span-normalization loops are all charged. Fixed163 registers,
<=131072 flat slots including halt, no physical-width reads. Actual initialized
prefix Runs and halt refer to the same final data and exact requested products.
Local input is restored and caller memory outside[b,b+M) is preserved.

Thin admission is explicitly D=4^m,L=19m,D^18<=N, with raw zero/one matrices.
M=2^(128*clog2(N+Q+3)) <= (2*(N+Q+3))^128. No whole-window or catalogue clear/copy.
Every W>=256*clog2(b+N+Q+P+5) suffices. For arbitrary dirty callers P bounds EVERY
initial register/memory word, including physical loads before remainder. For the
initialized client scratch is zero and P only bounds the protected caller prefix.
All-prefix assertions are physical word fits, not an independent-of-W polynomial
intermediate-word theorem. The explicit window reservation is polynomial.

Including base loading/halt: charge <=3*(originalT+1)+2048*(N*D+Q+1).
Distinct-set sparsity retains+Q; occurrence sparsity Q*2^m<=N^2 gives
17301504*(19m+1)*N^2/D^(1/18). Neither sparsity premise is needed for execution.
The ET-record adapter, fast ET/backend/witness composition and full ordinary3SUM
1.9992 remain open. Root retains parameters/prime selection/outer ET host.

FINAL VALIDATION: tree f8ff0209469bb668837b9602fb71ecf3aaf3bc99.
All SIX together PASS, four compiler threads, cache downloads disabled:
lake --no-cache build --wfail --iofail (22.27s)
lake --no-cache exe mk_all --check (13.75s)
lake --no-cache test --wfail --iofail (183.59s), including Smoke/global Axioms
lake --no-cache lint (45.02s)
lake --no-cache exe lint-style (22.14s)
lake --no-cache exe checkInitImports (16.56s).

Final full hygiene --check-simp, actual-base12-library/two-test lints,
changed-file checks, strict14-name PR draft audit, COMPLETE a8-to-final diff
--check, staged and unstaged diff checks all PASS. Canonical imports generated;
all new tracked file modes100644. No sorry/custom axiom/native_decide or new
heartbeat override. Only justified finite syntax-check recursion-depth options.

Source audit: all3686 inherited source/abstract files and modes unchanged from
actual reviewed parenta8. Original Product, Wanted/Pruned/Band/encoding, NatClog
and Power suppliers remain unchanged. New MemoryWindow and Callable/Program files
are byte-identical to source checkpoint7cb7ade0a. ArrayNormalize native bodies and
theorem statements are identical; the only API metadata fix replaces blanket
exposure with explicit exposure of its two code definitions. All affected clients
check with the public pure-specification lemmas. The deliberately interrupted e8
checkpoint is NOT used as an all-six claim. One overlapping MCP dependency setup
had a transient Windows artifact lock; serial retries and final six are clean.

Kernel clients tie actual initialized Runs/halt to exact physical output and
caller sentinels. Native VM cases cover nonzero/zero products, duplicate/empty
queries and dirty workspace above the source modulus. A direct compiler client
loads27%8=3, increments/stores4 and preserves both adjacent sentinels. Concrete
numerical width budget passes387/fails386; zero N fails the explicit thin premise.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Sec2/Theorem5.lean61-67 (exact products),146-149 (sparse leaves).
Local file equals the pinned Git blob; conclusion fragments checked verbatim.
Finite mathematics/source credit is inherited. Compiler/controller/proofs here
are original native work, not a source-Light semantics/count transfer.

Abstract assessment: no own selected statements, models, catalogue or rendering
change. No whole3SUM headline promotion. ROADMAP/UPSTREAM retain the #1394 gap.

PUBLICATION LIMIT: #1615 landed DURING this audit via ee1ab6f08ac77b1404d19c0371b0b0ac7daaa915
(reviewed carrier7da96e65cf2c352d08142bb5a7ea65098008d8cc); main now includes later
native/frontend additions. The five direct machine/arithmetic prerequisites and
entire Schonhage supplier remain byte-identical. This exact validated candidate
is preserved on its reviewed a8 parent for coordinator-directed current-main
compatibility work before publication. No parent remote is changed.

Fresh exact-whole-layer NONAUTHORING compiler/callee/API/resource review is still
required and is owned by root. Existing supplier reviews do not approve the new
compiler. No new PR, outside approval, merge or endpoint completion is claimed.

Local reproducible records: .lake/codex-three-sum-continuation/callable-product/
summary.json,static-summary.json,source-identity.json,source-mapping.json,
pr-body.md,audit-source.py and logs. Durable evidence is this commit description;
the issue handoff links it. AI assistance: Codex implementation/self-review with
Lean MCP; fresh nonauthoring and outside reviews remain pending.

* refactor(WordRAM): align ArrayNormalize module name and admission prose

Address optional review nits on PR1625 at fd1f2fce. Rename Normalize.lean to ArrayNormalize.lean with identical file bytes, migrate every consumer and the sorted canonical aggregate without a compatibility shim, say widths at least the threshold, and record that full VM cases use m0/N1 while general execution/resource proofs cover all valid geometry. Existing review6497681504 is already linked; the missing-record observation was a timing snapshot.

Validation: serial targeted Lean MCP ArrayNormalize, WordRAMMemoryWindow and SchonhageCallable all clean. Exact moved-blob identity and comment-erased Lean token identity modulo module-import migration pass; public declaration statements/bodies/attributes and native program meaning are unchanged. Canonical source import order and removal of every old path verified. Full citation/simp hygiene, targeted repository doc-name/new-test checks (12 modules/2 tests), strict14 PR-body names and complete d010-to-final/staged/unstaged diff checks pass. No aggregate/import-generation/all-six run for this bounded delta. Original f5/f8 all-six and final fd1 hosted all-checks green run40879707895 remain scoped to those revisions; repaired head requires refreshed hosted CI before integration. Full compiler/source reviews reused; focused module/import/doc/test-comment delta review requested after push. No abstract/model/resource change or endpoint claim. Evidence .lake/codex-three-sum-continuation/callable-product/review-rename.

AI assistance: Codex implemented the mechanical API/documentation repair; no self-approval, human approval or new full review is claimed.

* feat(ExactTriangle): checkpoint actual record product composition

Personal worker codex-three-sum-continuation-t3-3dda8289, issue1626, ordinary child from1625 repairce1062483; no ancestor remote edits. Implements fixed320-register actual record selector/log/header/copies/complete163-register callable bank, all readback separations from actual producer Output, raw01 identity, occurrence/query-cap sparse bound, native initialized producer→first-record consumer, same-y prefix Runs/chargedhalt/answers/frame, original positive logarithmic width and physical-width-independent polynomial prefix words/support. Generic caller consumes every occupied ordinal. Initialized fixed client selects ordinalzero and proves it exists; this is not an outer instance loop or aggregate ETsolver.

PreparationInput.exec_input is the coordinator-authorized narrow API seam, reusing the existing derivation/private fits_at_width; public runs_input reuses it with unchanged statement/hypotheses/budget. No native producer/callee program or input definition changes. All own modules, modified producer module, and new native prefix/copy/admitted closed positive-depth initialized test have clean targeted Lean MCP diagnostics. Tests include actual second-record decode at m2,n16^18 and raw01 copy; the huge complete input family is kernel-checked symbolically, not VM-enumerated.

SOURCE CHECKPOINT ONLY: canonical import generation, final all-six, full static/hygiene/source identity, PRmapping and required fresh nonauthoring review remain pending. Root owns sole aggregate/static slot; no such process was launched. Original #1394 ordinary3SUM1.9992, aggregate ET/outerloop/prime/parameter/backend/witness work remain open. No PR/review/approval/merge/watch. Credit retained; original native adaptation/composition by Erik Demaine with Codex AI assistance.

* feat(ExactTriangle): validate initialized record product adapter

Refs #1626. The full #1394 ordinary distinct-position 3SUM 1.9992 endpoint remains open. No PR is opened by this worker; fresh whole-layer nonauthoring review is pending coordinator arrangement.

Validated source tree: 8f59a54c6de13459c0a85d86546b12fc12c5003c
Pinned main base: 8569de69ef05751c7e39e2ddd99d24d49f6aa1ec
Preserved source checkpoint: 8f46341d456f6e3651beb02aac898a22a34a9883
Normal main merge: 8612aff051db4590f15efcb02fa37deb2992f6f5. Only ROADMAP/UPSTREAM conflicted; complete landed prose is preserved. After the checkpoint the only own Lean deltas are canonical imports and terminal Header proof simplification. Native programs, public statements and supplier credit are preserved.

Original native implementation: fixed 320 registers and <=132352 flat slots including halt, no width reads. Reads the real six-word record/heap, computes m using NatLog, copies raw X/Y and all interleaved query occurrences, and invokes the complete 163-register runtime-relocated callable bank. Copying keeps raw 0/1; the callee charges signed doubling once. No catalogue/wind…
dysfunctor pushed a commit to dysfunctor/complexitylib that referenced this pull request Nov 1, 2026
…lection (cslib-community#2124)

* feat(exactTriangle): relate lopsided queries and matrix products

Adapt the finite counting interface and signed digit expansion from anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5 for milestone #1438. This is a mathematical interface; native preprocessing, fast solvers and full composition remain under #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 #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 #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 e41e1dda62a10c8f89917e2ccab54fbbedad1ad4, 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(matrix): prove the tensor recursion and pruned evaluation core

* doc(matrix): clarify the overlapping contributing leaf

* doc(matrix): make tensor and pruning explanations standalone

* 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 #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 8e182b091199b323c7e6271acebbfcee2e4cdd18 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(matrix): prove finite thin-product correctness and sparse bounds

Implement the complete finite mathematical milestone of #1463 above #1464:
valid layouts, batch-product correctness/error exclusion, arbitrary-N tiling,
exact requested signed products, order/cardinality estimates, geometric tails
and the derived sparse bounds. At D=4^m, L=19m, D^18<=N and |W|*2^m<=N^2,
encoding entries are bounded by4*N^2/D^(1/18), contributing leaves by33
and passed-set cardinalities by(19m+1)*33 times that scale. Add finite
magnitude and auxiliary object-count bounds. None are native instruction costs.

All six final local gates pass: strict build, aggregate check, strict tests,
environment lint, style lint and init-import check. Hygiene --check-simp,
changed-file lints (14 library modules,1 new test) and diff --check pass.
Tests kernel-check signed results3,20,0,-8, true padding, empty/sparse and
negative-order boundaries, and instantiate all aggregate bounds with jointly
satisfiable m=1 parameters and symbolic matrices without resource overrides.

Read-only math/API review by /root/thin_product_review is clear after fixed
doc references/magnitude wording/quotation hygiene. Focused final delta review
by /root/thin_product_final_delta_review is clear for tree
b021e2d9340b433a9fdb129882351e158e8c289f, reusing the prior mathematics review.
These are internal agent reviews, not outside coordinator or human approval.

Source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
selective Section2 finite mathematics; Anthropic credit/NOTICE retained.
Abstract assessment: no impact on selected headlines, catalogue or rendering.
Full native tensor/sparse-product/Exact Triangle code, native Chan-He #1446,
whole input/time/width composition and improved1.9992 remain under #1394.

AI assistance: implementation and reviews with OpenAI Codex, worker session
codex-thin-product-math-20261028.

* 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 #1446; independent complete parameter subtask #1458.

* doc(matrix): explain finite thin-product guarantees in the Lean API

Restack #1463 above repaired #1464 without changing the reviewed mathematics.
Rewrite 149 documentation blocks in 14 modules as standalone descriptions;
replace operation-cost and word-size narratives with the exact entry, leaf,
passed-set and specified-value quantities proved. Preserve pinned Anthropic
credit, source locators, statements, definitions, proof bodies and imports.
An independent comparison with original ee288fb16 confirms that all code bytes
outside comments are identical, including code whitespace.

Validation of this final tree: all six gates pass together (strict build,
aggregate check, strict tests, environment lint, style lint, init imports).
Citation-aware full hygiene --check-simp, changed-file lints (14 library modules,
one test) and git diff --check pass. Lean MCP FiniteMagnitude diagnostics finish
without errors or warnings. Serial Smoke/Axioms warmups avoid the shared-host
memory failure previously seen when these import-heavy clients run together.

Tests and substantive math/API review evidence are retained from the original
reviewed tree b021e2d9340b433a9fdb129882351e158e8c289f in ee288fb16. This change
is documentation-only; /root/draft_thin_docs authored the scratch map and the
continuation worker inspected/applied it. That drafting is not independent review.
Earlier math reviews are inside-fleet agent reviews, not outside or human approval.
Outside coordinator review will be requested on the final PR. No selected abstract,
catalogue or rendering is affected.

PR publication remains held while native dependent restacks are repaired, per
root sequencing. #1394 remains open: native shared encodings/pruning/Exact Triangle,
Chan-He #1446, complete Convolution/ordinary input/time/width composition and the
improved Section4 route to exponent1.9992 are not supplied by these finite counts.
AI assistance: OpenAI Codex workers codex-thin-product-math-20261028,
codex-three-sum-continuation-t3-3dda8289 and /root/draft_thin_docs.

* fix(wordram): repair parameter proof hygiene and ceiling-log docs

* feat(wordram): implement shared tensor encodings

Complete the shared left/right encoder milestone #1493 above parent b4936ce28
(#1496). Fixed standard-WordRAM code with 32 registers computes every public
encodingL/encodingR leaf from actual initialized flat signed inputs. The native
bound is 240*(L+1)*10^L instructions plus halt, with explicit magnitude/address
inequalities, two alternating buffers, charged initialization/copying and the
complete outside frame. The full ordinary native 3SUM objective #1394 remains
open; this component supplies no sparse-query or Exact Triangle solver.

Validation of tree b598513f02cc064eaf50d3c680684c19289ffd71 against
b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
changed-file lints (13 library modules, one new test) and diff checks pass.
Tests execute both encoders at depths zero, one and two, compare all 100
depth-two leaves with the unchanged public encodings, preserve input/frame
sentinels, and cover adjacent word widths and all three copy block orders.
Kernel-checked concrete flat executions discharge every width/magnitude
premise. Selected abstracts, catalogue and rendering are unaffected.

AI assistance: OpenAI Codex implementation and self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Independent correctness/API review is pending;
this is not an approval or a claim that the complete 3SUM objective is done.

* test(wordram): connect encoder witnesses to charged runs

Connect the zero-depth and two-stage regression memory witnesses to the
actual prefix Runs already proved by runs_left, rather than discarding that
conjunct. Bound the prefixes by 240 and 72000 instructions and expose the
same executions' charged halt at n+1. All library code is unchanged from
ad3e09735a116f9868e87cf7ae6af59e5cb6a285 (tree b598513f02cc064eaf50d3c680684c19289ffd71).

Validation of tree 8277017f2c63a5851b63a5d4b49775a9fb96d62d against actual
parent b4936ce28d8b498b364a7947d34f728c55f8b226: all six gates pass together
(build --wfail --iofail, mk_all --check, test --wfail --iofail, lint,
lint-style, checkInitImports), full citation-aware hygiene --check-simp,
fresh changed-file lints (13 library modules, one test), strict PR-draft
declaration-name check and staged/unstaged diff checks pass.

Independent nonauthor agent review 8034f3da approved exact ad3e09735/tree
b598513f, covering full code/model/cost/width/source and ArrayCopy with no
blockers. It is inside-fleet review, not outside approval. This test-only
delta addresses its optional witness-connection finding; focused final
test/source-mapping review remains pending through the parent coordinator.
No selected abstract, catalogue or rendering impact. The full ordinary
native 3SUM objective #1394 remains open; this implements encoder issue #1493.

AI assistance: OpenAI Codex implementation/self-review by delegated worker
codex-shared-encoding-t3-03b600bd. Publication remains on hold for focused
review; this commit is not approval or a whole-3SUM completion claim.

* feat(wordram): checkpoint native pruned-query controller proofs

Work in progress for #1526. Fixed native controller and initialized-input interpreter regressions, numerical child-set bridge, call-count potential, charged power/scan/clear/frame/arithmetic/return kernels. Individual current Lean modules have clean MCP diagnostics; the earlier strict targeted scan/count/value/test checkpoint passed. The complete global controller invariant, native evaluator theorem, actual initialized flat-run clients and sparse charged bound remain unfinished. No full six-gate or independent review claim; no PR submission. Full #1394 endpoint remains open. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* refactor(schonhage): reuse binomial bounds and sharpen signed tests

Address the bounded nonblocking review findings on #1496. Keep Nat.choose_le_exp_mul_div_pow unchanged while deriving it from Cslib.sum_choose_le_exp_one_mul_div_pow in the existing real binomial module; remove the redundant module and migrate its import. Preserve Anthropic, Samuel Schlesinger, OpenAI and Erik Demaine credit. Kernel-check an actual mixed inner/outer L2,m1 signed pruned result of -8, remove two signature-only tests and retain positive admitted-parameter checks. Paraphrase the identified source-derived sentence, shorten generic source boilerplate and record the generic naming follow-up. No public mathematical statement or definition changes meaning; no selected abstract or endpoint promotion. Final validation/source/review evidence is in PR #1496. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* feat(WordRAM): prepare and encode every shared matrix band

Implement the complete bounded #1523 native component under #1394. A fixed
96-register standard WordRAM program computes valid subset/inverse tables and
a deterministic existing Layout, prepares all padded signed row/column bands,
calls the unchanged #1520 encoders once per shared band, collects every leaf,
and restores the entire initialized input prefix and outside frame.

The State.init and flat Runs/Executes clients bind the actual output memory to
public encodingL/R in the unchanged leafIndex order (P0 digit 9). All powers,
mask/popcount/root/table loops, indices, guarded matrix addresses, initialization,
copying, encoder calls, loop controls and halt are charged. The generic bound is
4096*(L+1)*(1+N*4^m+2^L+2*numBands*10^L), plus halt; at L=19m and N>=(4^m)^18,
the full charged run is <=81920*(L+1)*N^2/(4^m)^(1/18).

Width assumptions are explicit original-parameter inequalities: the wordBudget
fits target w+2 and 7^L*A < 2^(w-1), w>0, A>=0. Actual signed kernels use at most
15/17 instructions for add/subtract, already included through the unchanged
encoder's real cost. No all-state fit, callback, solver, assumed run/cost or source
machine semantics is a hypothesis. Symbolic positive-depth thin native examples
and concrete signed/padded/frame/width-boundary executions establish nonvacuity.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Programs/Sec2/Theorem5/Encode/AllBands.lean:230-239,262-271
and BandArrayFacts.lean:107-113. Verified checkout files equal their pinned Git
blobs and all PR-draft quotations match those exact line slices. The source's
row/column encoding predicates map to runs' quantified original matrices, all
bands and all leaves on computed MaskTable.layout; Light limits/program maps,
callee contracts and source time hypotheses are replaced by actual native code
proofs, not imported. The block index is beta*K0+(side? h:g), and row is block*N0
plus the compressed outer offset. Shared tile pointers and retained table words
are exposed by tileInputBases/tile_input_values/table_word_layout.

Reuse unchanged WordRAM control/rename/copy/signed APIs, Layout/bandArray/encoding
mathematics and Mathlib finite index/sorted-set APIs. New mask scans, dense inverse
lookup, direct base-seven decoder and native execution/cost composition are
original. Small native-power/ordered-filter/positional-digit/row-major lemmas live
in narrow topic modules. Retain Anthropic, PBC source credit and NOTICE.

Validation: PASS all six strict gates (build --wfail --iofail, mk_all --check,
test --wfail --iofail, lint, lint-style, checkInitImports), serial Smoke/Axioms
warmups and the global Axioms audit; full citation-aware hygiene --check-simp,
fresh actual-base changed-file lints, strict PR-name and diff checks. Validated
with LEAN_NUM_THREADS=1 and cache downloads disabled. Windows static metadata
reads used PYTHONUTF8=1; no Lean/source change was needed. New Lean files use ordinary non-executable file modes. Exact payload tree
bdfc5a1a33f0d712b90f4fe4bc9d6c27e2d8318e. Targeted Lean MCP endpoint/tests and pinned quote identity also pass.
No PR has been opened;
independent exact-revision correctness/API/source-mapping review is pending.

Abstract assessment: no impact on selected abstracts, models or scope; no new
headline or PDFs. Pruned queries, products, solvers and whole ordinary 3SUM remain
open under #1394. Base #1520 remains unchanged at 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6.

AI assistance: Codex implementation/proofs, session codex-native-bandprep-t3-03b600bd,
under delegating-worker coordination. Existing unchanged encoder outside-review
evidence is PR1520#issuecomment-6477077023; final new-component review pending.

* feat(wordram): checkpoint native pruned accumulation and frame transitions

Work in progress for #1526, not a submitted component. Complete native parent accumulation loop (31N+3), internal sparse initialization (7N+8), computed child push (15), shared actual frame-word store, executable query-code inverse/requested-set bridge and recursive timestamp allowance. These current modules have clean targeted Lean MCP diagnostics; actual interpreter and kernel digit/request regressions pass. Changed-scope hygiene --check-simp and diff check pass. The general node/controller continuation proof, actual initialized full evaluator theorem and final sparse charged bound remain unfinished; no full six-gate or independent review claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289; full #1394 remains open.

Final current-tree checkpoint: strict build --wfail --iofail of Accumulate, Clear, Push, Frame, Powers, Leaf, Weight, Scan and SchonhagePruned tests passed together (3596 jobs); scope hygiene --check-simp and diff checks pass. This is a partial implementation checkpoint, not an all-six-validated PR or completed #1526 milestone.

* feat(wordram): checkpoint actual pruned-query root-frame stores

WIP #1526. Factor root scan setup and root finish; prove the actual eleven-instruction root-frame initialization and exact memory/register frame. Current Root MCP diagnostics clean. Full node/controller composition remains unfinished; no PR or full-six claim. AI-assisted continuation by codex-three-sum-continuation-t3-3dda8289.

* fix(nat): reuse existing tuple digit identity in band preparation

Address the sole P2 finding from the independent #1523 review of cb261f6b:
remove duplicate Nat.ofDigits_ofFn and publicly import the existing radix
module. The finite-function numbering bridge uses Nat.ofDigits_ofFn_eq_sum.
Its statement is unchanged. Existing radix declarations, proofs and source
credit are unchanged; no native program, endpoint statement or test changed.

Validation on exact final tree 4807cb971cf8030f70df67e5e8fa13947dcbd202:
PASS all six strict gates together (build --wfail --iofail, mk_all --check,
test --wfail --iofail including global Axioms, lint, lint-style,
checkInitImports), fresh actual-base changed-module lints (29 library/1 test),
full citation-aware hygiene --check-simp, strict draft-name and diff checks.
Serial LEAN_NUM_THREADS=1; optional cache downloads disabled. Lean MCP also
reports clean diagnostics for the changed bridge. Logs are in
.lake/codex-three-sum-continuation/band-review-six in the continuation checkout.

Original native implementation and all full correctness/API/source-mapping
review coverage retained. Review record:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6479696830
Original implementation/validation handoff:
https://github.com/cslib-community/complexitylib/issues/1523#issuecomment-6478943178
Focused final delta review pending before PR publication. No impact on selected
abstracts, models or scope; no new headline. Complete #1394 native 1.9992
endpoint remains open.

AI assistance: bounded reuse fix and validation by Codex session
codex-three-sum-continuation-t3-3dda8289. Original author credit remains on cb261f6b.

* feat(wordram): checkpoint complete native pruned-controller phases

Continue #1526 implementation under #1394; this is explicitly partial WIP,
not a complete component or PR submission. Full recursive node composition,
initialized input/flat clients, derived global fits and total-time theorem
remain open. No solver or all-state fit/execution/time certificate is assumed.

Check full root setup/scan/frame (20Q+19), report (9Q+3), leaf/return (24),
loaded leaf step (43), internal entry (7N+28), native nonempty child scan/push
(20N+42), empty-child scan/advance (20N+33), returned-child accumulation
(31N+29), and final return (26) against the actual standard fixed native Code.
KernelRegs describes only constant/pointer register values. Node footprints
preserve the ancestor rows. The zero-depth node matches existing Pruned.result
and the finite traceWeight; its continuation uses the existing ExecWithin.loop_iter.
No alternative machine or run semantics is introduced.

The reporting-body/controller names are definitionally identical Code trees.
ScanMemory.congr transports the existing representation across disjoint writes
and removes duplicate root proof plumbing; push exposes its four-store frame.

Validation: targeted Lean MCP diagnostics clean for every new/updated phase
and ComplexityTests/SchonhagePruned.lean. Native interpreter regressions retain
depths 0/1/2, both signs, repeated/empty/mixed queries and an outside sentinel.
New kernel examples discharge the general node/register/address/signed premises,
connect the same negative-product final memory to charged controller execution,
and prove an empty leaf preserves the prior value cell. Diff whitespace passes.
No aggregate/all-six validation claimed: root/native audit coordination hold
is respected. Exact partial checkpoint tree 7fa4da67ea861a2bba3a6c430cd7e40996d0e794.

Abstracts: no impact; no new headline or endpoint claim. Original 1.9992
objective and sparse-product/ET/final composition remain open under #1394.
AI assistance: Codex implementation/proofs by continuation worker
codex-three-sum-continuation-t3-3dda8289.

* doc(matrix): replace copied source prose with API descriptions

Resolve the documentation-only requested changes on #1464:
https://github.com/cslib-community/complexitylib/pull/1464#issuecomment-6477111132
Rewrite source-quotation fragments and related explanations in Alphabets,
Identity, Full and Pruned for the local Lean declarations. Preserve the
mathematical attribution, bibliography keys, source pin and copyright.

A comment-aware comparison with 4f3226cd proves every noncomment byte is
identical in all four files. No declaration, proof, definition, program,
import or test changes. Existing checked source-statement quotations and
notation/quantifier/model/resource mapping in the PR remain unchanged.
The final source-comment screen compares against quoted fragments in the
actual pinned Sec2 and Statements/PaperStatements files, including the
known local renames; no substantial quoted fragment remains unmarked.

Validation is recorded for this exact tree in PR #1464. Source checkpoint
tree 8c3b87bb870d4c4e2202917357d19a7a139296e8. No abstract/catalogue/model/scope
or rendering impact; no new headline. The full native 1.9992 endpoint remains
open under #1394. Ancestor and descendant remotes are unchanged.

AI assistance: documentation repair and validation by Codex continuation worker
codex-three-sum-continuation-t3-3dda8289. Existing independent mathematical/API
and checked-source review coverage is retained; outside review of the bounded
documentation delta is requested, with no new review agent commissioned.

* refactor(finset): use order-embedding names in OrderGlue

Finish bounded #1545 from exact #1536 head66036150a. Replace generic
level/inner/outer API vocabulary with order-embedding/subset/complement names.
Remove five redundant membership/range/congruence wrappers, using Mathlib's
orderEmbOfFin_mem/range_orderEmbOfFin and ordinary substitution directly.
Migrate every actual Levels/Batch proof client with no deprecated aliases.
Keep filter_glue's generic name and rename its predicate parameter to P.

The retained generic statement headers are identical after the documented
renaming and binder alpha-renaming. All 48 Levels and 13 Batch declaration
statements and all definition bodies remain unchanged. The entire native
Encoding module is token-identical after comment removal; every other native
library file is unchanged. Source credit and pin are retained. Thus existing
State.init, Signed.encode, width/frame/cost and encodingL/R meanings remain.

Put the sum/option-versus-flat-digit explanation at the actual leftDigits,
rightDigits and termDigits hover docs, preserving their enumeration bodies
and order (row-major P terms, P0 digit9). Update the UPSTREAM naming follow-up.
Add generic nonconsecutive signed/zero/Option reconstruction clients using
Mathlib's orderEmbOfFin_unique, plus the routed optional #1536 asymmetric
native L4,m1,N29 prefix tests. Those compute headers/count/tables/snapshot and
decode/read ranks1 and2 with K0=2, distinguishing quotient/remainder blocks
and signed values without a full10^4-leaf encoder run or native body edits.

Reuse unchanged outside coverage: PR1496#issuecomment-6477111644 atb4936ce28,
PR1496#issuecomment-6480746578 at68bbe40e3, and PR1536#issuecomment-6480852097
at66036150a12046b29986d8f108c0afaf49d01c61. These are agent reviews, not human
approval. No new cited mathematical result or machine model is introduced.

Validation: PASS build --wfail --iofail, mk_all --check, test --wfail --iofail,
lint, lint-style and checkInitImports, with serial Smoke/global Axioms warmups.
Full citation-aware hygiene --check-simp, fresh changed-file lints against
actual base66036150a, strict PR-name and diff checks, and source/native identity
checks PASS. One thread, no cache downloads, PYTHONUTF8=1 on Windows.
Targeted MCP checks, full hygiene --check-simp and source/native identity
checks pass. Final source tree: 0c21b608cc5ed234527c73a3853a26132f52da0d. No source/ancestor merges or restacks.
Abstract assessment: no impact; no selected theorem/model/meaning/scope or PDF
change. This is generic ergonomics/testing only; full #1394 remains open.

AI-assisted implementation by codex-native-bandprep-t3-03b600bd, under parent
continuation-worker coordination. No new review agent commissioned; ordinary
outside coordinator review is requested when the bounded PR is ready.

* feat(WordRAM): prove all-depth pruned controller execution

WIP checkpoint for #1526; no PR and no completed component claim. The actual fixed native controller now has a depth-inductive execution proof with original Pruned.result values, stored queries/frames, concrete spatial preservation, input-derived signed fits and traceWeight charged continuation. Root loop exit discharges the continuation.

All new library modules through Recursive.exec_ready have clean targeted Lean MCP diagnostics. New concrete entry/result client reports no diagnostics, but the complete existing test file is still elaborating its VM regression commands; no final test-pass or all-six claim. Initialization/root-list/report/flat State.init composition, global width/fit clients, full component validation and independent review remain open. Aggregate checks are held for the coordinated root validation slot.

GenericRAM/Signed/Fits.lean is the unchanged blob from independently owned PR #1552, commit f276db1174333d3e6253b93878be8b95c1fcc713; credit retained. No native program body changed in this checkpoint. All proofs and invariant definitions are original native work; existing mathematical pruning/encodings retain their source credit. No selected-abstract impact or whole-3SUM endpoint claim. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289.

* style(WordRAM): normalize native proof file modes

* feat(wordram): complete initialized sparse pruned-query execution

Complete implementation candidate for #1526 above #1520 exact 3b9234da6bc3c0daad2cd167aeb4fd8f9fc592b6. Full ordinary native 3SUM and the published 1.9992 endpoint remain open under #1394. No PR yet; fresh exact-revision independent correctness/API/source review is pending before publication.

One fixed standard native program: 96 registers, at most 4096 flat instructions including halt, no width reads. Complete State.init -> pre-halt Runs -> Executes uses the same answer memory. Every supplied query, including repeats and empty/zero-depth boundaries, equals existing Pruned.result; runs_bilinear specializes existing encoding contracts to bilinearProduct. exec_kernel computes its powers/layout and has a reusable pointer/epoch directory contract. All child lists, timestamp decisions, stack/control/index arithmetic, signed products/adds and reporting are actual charged code, proved by the all-depth exec_ready induction; its continuation is discharged by the actual root exit.

Full charge including halt <= 8192*(L+Q+1+(L+1)*card(leaves(requested qs))). Ordinary source envelope M=A+B+10^L*A*B and address budget H=256*(L+1)*10^L+32*Q+512 derive input fit and execution at every physical W >= clog_2(M+H+1)+3. This is logarithmic in explicit component budgets; global 3SUM composition is not claimed. Inputs: raw L,Q then two canonical signed arrays of length10^L and unsigned query codes, after the actual standard length cell0. Returned output pointer is unsigned. All input/outside memory is preserved on initialized runs. Code/ExecWithin/State.init/Runs/Executes, signed kernels, Heap/Block APIs, existing mathematical pruning/encodings and Mathlib digit/log APIs are reused; GenericRAM/Signed/Fits is the unchanged blob from #1552 f276db1174333d3e6253b93878be8b95c1fcc713, with credit retained.

Pinned source anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5. Checked Git-blob quotation locators: ThreeSumApsp/Sec2/Lemma10.lean:148-150 (Pruned_eq_restrictTo_sum) and:565-566 (Lemma10.total_size). Source Pruned -> existing Pruned.result; source restriction -> Finset.piecewise; source Leaves -> leaves; all natural depths and arbitrary integer arrays retained. Native indexing directly uses existing leafIndex(privateLeaf), first coordinate least significant, inner digit9. Child prefix/stride/division are proved against the finite childSet/sliceAt semantics. Native code/proofs and cost are original, not supplied by source Light semantics or its sorted-segment implementation. Full checked quotes and model/quantifier/layout/cost/reuse mapping are in the prepared UTF-8 PR draft. Copyright retained in source/NOTICE.

Validation on tree bd6e74cce28dbd16c90291b847dac1a311402510: all SIX strict gates pass together, LEAN_NUM_THREADS=1, downloads disabled: build --wfail --iofail; mk_all --check; test --wfail --iofail (including Smoke/global Axioms); lint; lint-style; checkInitImports. Full citation-aware hygiene --check-simp; actual-base47-library/3-test changed-file and local lints; strict PR declaration-name audit; staged/unstaged diff checks pass. Register alias docs fixed the first lint finding; all native definition bytes are unchanged by that fix. Tests discharge real State.init positive/negative/empty/depth-two mixed/shared/repeated queries, sufficient-width family and failing fit boundary; callable signed wildcard with nonzero epoch and preserved input/outside sentinel also checks. No sorry, custom axiom or native_decide introduced.

Selected abstracts/catalogue/rendering: no impact, no new headline. ROADMAP/UPSTREAM preserve the open sparse-product/ET and global1.9992 gaps. AI-assisted implementation by codex-three-sum-continuation-t3-3dda8289 (OpenAI Codex); original finite source credit to Anthropic, PBC.

* feat(wordram): checkpoint computed wanted-query routing

Partial implementation of #1561 by codex-three-sum-continuation-t3-3dda8289.

Implements actual fixed standard 96-register routing/grouping code with computed valid-mask tables, tile counts, prefix offsets and stable scatter. General checked proofs cover the digit kernel (15L+10), one-query routing (15L+25), exact outStrOfPos/queryIndex mapping, computed header/count/relocated-table initialization (16L+(12L+33)*2^L+83), input-memory frame and original-input-derived fits. Generic finite stable-counting positions are injective and bijective.

Targeted Lean MCP diagnostics clean for all nine new library modules and the regression suite. Actual initialized interpreter regressions pass for empty input, zero depth, duplicates and an asymmetric K0=2 three-band case; no encoded leaf array is materialized in routing tests. The 96-register program computes every routing/count/prefix/scatter decision.

INCOMPLETE: general native counting, prefix and scatter execution invariants, initialized flat complete-run/width/frame/bound clients, final static hygiene and ALL SIX gates remain pending. This checkpoint is not a PR or acceptance claim. Mutable global audit slot remains with parent; no aggregate performed here. Full #1394 native sparse/ET solver and ordinary 1.9992 endpoint remain open.

The child branch merges unchanged #1554 at 12abeee84 onto frozen #1562 base 0c2e0ebea. The local merge 60bec64398 only reconciled shared credit/roadmap/upstream prose; no ancestor branch was edited. Original implementation mathematics/code by Erik Demaine with AI assistance. Existing finite Schonhage and band/encoder/pruned interfaces are reused with their original credit retained.

* feat(wordram): checkpoint wanted count-pass proofs

Continuation of #1561 from 06b3563e7. CountStep has clean targeted Lean MCP diagnostics, including exact 14-instruction native count update and memory frame. Dense zeroing and count-loop composition are implemented; Count.lean has one pending elementary nonnegativity/address-bound proof at line 152. This is an explicitly incomplete source checkpoint, not all-six validated or a PR. Work is paused solely to prioritize the bounded outside-requested #1562 repair. No program/public statement in #1562 changed.

* doc(finset): restore ordered-gluing source credit

Restore the original AlmanWilliams2026 Section 2 citation and finite-scope sentence removed by the naming refactor. No Lean declarations or proof tokens change.

AI-assisted coordinator fix by coordinator-codex-queue-20261028-ready-c. Original implementation and source authorship retained; independent delta review and new hosted CI requested on PR #1554.

* fix(wordram): address pruned-query review findings

Bounded documentation/test repair for #1562 / #1526 by codex-three-sum-continuation-t3-3dda8289, above exact 0c2e0ebea6199ac1fbe9b2e048ce24b9410f8d1a.

Fix both ROADMAP reference definitions, distinguish client contracts from exported internal stage APIs, and document why the narrow ArrayAppend/InputArray topics avoid Allocation interface/dependency fanout. Extend existing post-integration issue #1553 with the exact pruned power register map, 4L+10 accounting, affected consumers, fused-encoder accounting and sibling integration order; no power program or ancestor is changed.

Add one fully admitted signed runs_bilinear client: depth0, original arrays -3 and 2, actual encodingL/R premises discharged, original-input magnitude/address fits discharged, physical width10, same actual State.init prefix Runs and charged halt, and output memory at address6 equals Signed.encode(-6). Targeted Lean MCP diagnostics pass.

Validation: all six strict gates passed together on final staged tree f4cfd4ae0d838c4b4bf4c43c924f400744450957, including Smoke/global Axioms; one thread/downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base 47-library/3-test module lint, changed-file audits, strict declaration-name check and staged/unstaged diff checks pass. Local machine-readable evidence: .lake/codex-three-sum-continuation/pruned-review-repair/{summary.json,static-summary.json,identity.json,*.log}.

Source identity audit against 0c: all seven changed library files have identical comment-free tokens. Every public library statement, definition, native program and proof is unchanged. Every existing test byte is unchanged except the single inserted concrete client. Abstract/catalogue/rendering assessment: no impact.

The prior inside-fleet technical review at issue1526#6484055995 and outside FINAL at PR1562#6484177608 cover unchanged native semantics/source mapping. Fresh focused outside review of this repair is requested; no new review agent was commissioned, and no outside/human/platform approval is claimed. All original Anthropic, PBC credit retained. AI-assisted implementation by OpenAI Codex.

#1561 source is preserved separately at 7772a3497017078b37d1e04004225fae28baddad with its pending native grouping proof work explicit. Concrete sparse-product/Exact Triangle programs, full input/time/width composition and the original native 1.9992 endpoint remain open under #1394.

* fix(imports): deduplicate aggregate after counting integration

* fix(imports): deduplicate aggregate after query-splitting integration

* fix(imports): regenerate aggregate after Chan-He parameter integration

* feat(wordram): route and group wanted thin-product queries

Implement #1561's complete native routing/grouping component. State.init prepends
the native length cell to [L,m,N,Q] followed by raw coordinate pairs.
Actual finite unsigned standard Code computes tables, tile keys, codes, counts,
prefix offsets and stable scatter. No layout/run/time/permutation certificate
is supplied. Fixed 96 registers, <=4096 flat slots including halt, no width reads.

Wanted.runs_grouped proves actual State.init prefix Runs and charged halt at the
same final memory, exact per-occurrence code/original-position equations, exact
wantedStrings tile spans, in-array span/code bounds, permutation, terminal Q,
input/outside frame and final boundedness. All admitted physical widths are
covered by the positive clog2(wordBudget+1)+1 threshold, with original input fit
derived. All initialized reachable prefixes are bounded. Complete native charge
including halt <=128*(L+1)*(Q+numBands^2+2^L+1). No 10^L scan per query/tile.

Validation: final tree 6c8164db02df348a46ffe0cf5972415977c62939. All SIX strict gates passed
together: build --wfail --iofail; mk_all --check; test --wfail --iofail (including
Smoke/global Axioms); lint; lint-style; checkInitImports. One Lean thread, cache
downloads disabled. Full citation-aware hygiene --check-simp, fresh actual-base
57-library/3-test lints, changed-file/name/staged+unstaged diff checks all pass.
The initial test-only module-boundary VM evaluation failure was fixed by using
the existing non-module native-test convention; every interpreter check remains.
The corrected frozen tree passed the complete six-gate sequence again.

Base: #1562 ce77926c393ce34e7962759bb412172c4584a67c. Preserve normal merges.
Unchanged sibling prerequisite #1554/#1536 is retained at exact
702c14bcf9896655b17c9b2dd5e02e6f270c9966: all 33 library and two test blobs are
byte-identical. Wanted contributes 24 library modules and one test. Existing
unchanged sibling reviews are reusable; no ancestor branch or remote was edited.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Sec2/Theorem5.lean:44-46, checked against its Git blob:
"outStrOfPos lay I J ∈ wantedStrings lay W (bandOf L m I) (bandOf L m J)".
Tiling/Definitions.lean:128-131 defines that filter/image set; reuse it unchanged
with W=qs.toFinset and separately preserve original list occurrences. Source
Programs/Sec2/Theorem5/Wanted/Codes.lean:13-19 motivates routing. Actual native
code uses the existing least-significant-first queryIndex/leafIndex dictionary,
digit9 for the inner wildcard and 3*row+col otherwise. It proves agreement rather
than identifying the Light program's separate numbering, semantics or costs.
Native code/proofs/stable-scatter theory are original; primitive counts reuse
Mathlib Nat.count directly, with zero/successor/bound/monotonicity APIs and the
existing count_eq_card_filter_range identity. Redundant count/offset wrappers
and their repeated elementary lemmas are removed. Every client is migrated;
Program.lean and PackProgram.lean are byte-identical to checked checkpoint
2e2cc39675a30b024c3932bd23f06163a33c8925. Imported finite source credit is
retained. All three source slices equal the pinned Git blobs.

Fully admitted kernel clients cover empty/zero depth, repeated pairs, and the
L4/m1/N110/K0=2 asymmetric family, tying answers to actual Runs/halt. Actual VM
regressions cover all expected grouped words, original indices, offsets and
input/outside frame. Fitting and failing physical-width premises are checked.
No sorry, custom axiom or native_decide. No curated abstract/catalogue/PDF impact.

Shared-band calls, actual buffer/header adaptation, pruned-kernel invocation,
answer reconstruction, sparse-product/Exact Triangle and full native ordinary
3SUM composition/1.9992 remain open under #1394. This is a component milestone.
Fresh nonauthoring correctness/API/source review is pending (root arranges);
outside review remains required. No PR, integration or approval claim.

AI-assisted implementation: OpenAI Codex, session
codex-three-sum-continuation-t3-3dda8289. Author/source credit is preserved.

* fix(imports): regenerate aggregate after shared-encoder integration

* perf(wordram): reduce native parameter proof heartbeat budget

* chore(wordram): scope measured parameter proof budget to reduction task

* perf(schonhage): focus cell arithmetic and use the default heartbeat budget

* fix(doc): restore unrelated upstream coordination records

Restore the exact 231-line tail common to both integration parents after review caught an overbroad conflict-marker match. The intended 3SUM integration prose is retained; no Lean change. AI-assisted correction by OpenAI Codex.

* fix(imports): regenerate band-preparation aggregate from merged inventory

* doc(order-glue): preserve reviewed source credit through supplier merge

* doc(order-glue): restore paper citation and finite scope

* feat(wordram): checkpoint native queried-product construction (#1581)

Unfinished implementation above exact a6e4005b2 on the existing isolated child branch.
The fixed native program computes both producers, protected layouts/copies, tile ABI,
one shared timestamp directory, actual pruned calls and original-order reconstruction.
Targeted Lean MCP checks pass for the new native program and supporting original-input,
parameter/layout, copy/frame, grouping-span, raw-conversion, producer and directory proofs.
Five actual initialized interpreter regressions pass: empty, signed/duplicate, raw01,
multiple tiles/padding/epochs, and nonempty inner tensor coordinates.

This is a recovery checkpoint, not a complete native product result or PR candidate.
Full tile/epoch loop and reconstruction correctness, initialized composition, complete
charged cost and logarithmic-width/saving results remain open under #1581/#1394.
All six/global/static validation remains held for root; no aggregate or static audit ran.
Existing curated abstract statements and scope are unaffected; no headline promotion.
Implemented personally by codex-three-sum-continuation-t3-3dda8289 with AI assistance.

* fix(imports): regenerate thin-product aggregate after main integration

* doc(wordram): separate shared-encoder integration records

Keep the reviewed finite-matrix supplier records intact and record native-encoder scope and source credit separately, so squash-queue integration does not overlap the ancestor documentation hunks. Preserve code, tests, concrete bounds and the complete unrelated upstream-record suffix. Queue revisions are used only for read-only projection, never as parents.

* doc(matrix): keep progress links out of shared reference append block

* feat(wordram): checkpoint complete queried-product source before supplier merge (#1581)

Local recovery checkpoint only. Complete native queried-product execution, initialized
clients, quantitative thin saving and logarithmic width have clean targeted Lean MCP
diagnostics. Import generation adds the 29 new modules. No all-six/static validation or
independent candidate review is claimed by this checkpoint; it is not a PR candidate.

The actual #1576 supplier advanced from a6e4005b to integration91f485ec. Preserve this
source before a normal child merge, reconcile only shared docs/imports, regenerate the
aggregate, then validate the final source together against the actual supplier.

Original native implementation by Erik Demaine with Codex assistance, reusing credited
finite Anthropic Section 2 mathematics and actual native producer/router/pruned kernels.
Ordinary-3SUM/Exact Triangle and the full #1394 1.9992 endpoint remain open.

* feat(wordram): execute queried thin-matrix products (#1581)

Complete #1581 implementation candidate under #1394, awaiting required fresh exact-head
non-authoring correctness/API/source/resource review. No PR is opened or integration
approval claimed. Normal child history preserves source checkpoint af208636b and actual
reviewed #1576 supplier91f485ec; no ancestor branch or remote was edited.

One actual fixed standard unsigned WordRAM program per signed/raw input mode consumes
original headers [L,m,N,Q], both row-major integer matrices X:N x 4^m and Y:4^m x N, and
raw interleaved requested coordinates. It computes tables/layout, shared encodings,
Wanted counts/prefix/stable scatter, tile pointers, decoded queries, directory/epochs,
pruned evaluation and original-order reconstruction. Raw nonnegative entries are doubled
by actual charged load/multiply/store instructions (including raw0/1 -> signed0/2).
There is no source Light machine, assumed layout, sorting, solver, run or time oracle.

QueriedProduct.exec/runs/runs_wide prove actual native execution from original words /
State.init, same-y prefix Runs and charged halt, every original occurrence's exact
Signed.encode((X*Y)[qs[i]]) including duplicates, original-input restoration and the
complete outside frame. Generic execution assumes m<=L, original absolute entry bound A,
raw nonnegativity in raw mode, and the explicit original numerical magnitude/address
admission; it has NO query-sparsity hypothesis. The real pointer/epoch kernel uses a
directory initialized once, with scratch/frame separation and propagated fresh bounded
epochs. Code has 160 registers, <=32768 flat instructions including halt, no width reads,
and is independent of dimensions, magnitudes, query counts and physical widths.

Thin hypotheses: L=19m, D=4^m, N>=D^18. With distinct-set sparsity
|qs.toFinset|*2^m<=N^2, complete charge including halt is <=
65536*(19m+1)*(65*N^2/D^(1/18)+Q). With the stronger occurrence hypothesis
Q*2^m<=N^2 it is <=4325376*(19m+1)*N^2/D^(1/18). Multiplicity/output work is never
replaced by set cardinality. runs_thin holds at EVERY physical W>=
128*clog_2(N+Q+A+2), deriving InputFits and all intermediate admissions. Its explicit
magnitude/address envelope is <=2^40*(N+Q+A+2)^10, allocation <=128*(N+Q+A+2)^4.
Physical all-prefix boundedness is proved; a separate source-polynomial prefix bound at
arbitrarily larger widths is not extracted here. ET record/input adaptation and all its
copies/calls, Exact Triangle solving, ordinary3SUM composition and improved Section4 /
1.9992 remain open. This component proves neither full3SUM exponent.

Source mapping checked against actual Git blobs at anthropics/formal-math
16a5ce41304fcdaea4e0be7c132e1c361dc26da5, under3sum-apsp/ThreeSumApsp:
- Sec2/Theorem5.lean:61-67 concludes the pruned band value equals (X*Y) I J.
  Existing finite thin_product_spec/MaskTable.layout/bandArrayL/R/encodingL/R and
  wantedStrings are reused; W=qs.toFinset, with a separate occurrence permutation.
- Sec2/Theorem5.lean:146-149, paraphrase of its conclusion:
  ((sum T in tiles (19*m) m N, |Leaves(wantedStrings lay W T.1 T.2)|):Real)
    <=33*(D m)^(-(1/18):Real)*N^2.
  Source hypotheses N>=D^18 and W.card*2^m<=N^2 are retained. Existing encoding,
  tile/leaf/passed-set estimates bound ACTUAL native execution, not an assumed cost.
- Programs/Sec2/Theorem5/Pruned/AllTiles.lean:86-92 and Wanted/Report.lean:30-37
  are the per-tile/report specification references; Solver.lean:150-161 is conditional
  on Light callees. Native code here is original, accepts stable unsorted duplicates,
  charges empty tile calls and proves all native callees directly. Instruction constants,
  widths, protected layout and frames are independently proved for the native model.
The UTF-8 PR mapping draft contains two exact Lean quotation slices, both checked against
Sec2/Theorem5 at that pin; all four cited source files equal their pinned Git blobs.
Anthropic, PBC's existing mathematical source credit is preserved. New native programs
and execution/resource proofs are original work by Erik Demaine with Codex assistance.

FINAL VALIDATION (whole source tree, not only this commit's proof/doc delta):
Tree 555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; four compiler threads; cache downloads disabled.
1. lake --no-cache build --wfail --iofail : PASS (13.56s).
2. lake --no-cache exe mk_all --check : PASS (11.33s).
3. lake --no-cache test --wfail --iofail : PASS (27.14s).
4. lake --no-cache lint : PASS (43.22s).
5. lake --no-cache exe lint-style : PASS (17.09s).
6. lake --no-cache exe checkInitImports : PASS (16.8s).
Strict tests cover new initialized/product clients, Smoke and global Axioms.
Full citation-aware hygiene --check-simp, fresh actual-base30-library/one-test lints,
changed-file checks, 25-name strict final-body audit and staged/unstaged diff checks PASS.
Actual comparison base: 91f485ec38ca6b878f338e2cdbdedbf5d4f20257.
3533 inherited source/abstract files checked; only the existing tile-key lemma is exposed
with the same statement/proof. All35 inherited sibling blobs equal actual parent91.
All native code bodies/register definitions are byte-identical to af208636b;
comment-erased Program tokens match. Current full Program source SHA256:
2b86fe04f6afa49a7eadc75292559dca62f4d65c5f7bdaf3b1f4386994aa8ebc
Public Header.exec_layout statement is identical; proof split passes at DEFAULT
heartbeats, without a new allowlist entry. Final register docs clear the initial lint
failure (47 undocumented aliases); prior incomplete/failed checkpoint logs are retained.
Checked PR/source mapping draft SHA256: be43f587d5c0ac6dd871093d5d19c283ef7dd9732b5c5d3cfa77b24e42899a24
Local reproducible records: .lake/codex-three-sum-continuation/queried-product/
summary.json, static-summary.json, source-native-identity.json, source-mapping.json,
run-identity.py, final-body-names.log and per-gate logs. This commit description is the
durable evidence until a PR exists; issue1581 links it.

Examples discharge real width/magnitude premises and connect the same final y to prefix
Runs, halt and memory: signed/raw, duplicate, padded/multiple-tile, positive/zero depth,
empty inputs, nonzero original header, adjacent sentinel, strict budget boundary and
nonempty symbolic admitted thin family at every inner depth.

Abstract assessment: no selected statement/definition/scope/catalogue/rendering impact.
ROADMAP/UPSTREAM preserve remaining1394 scope; no headline promotion.

Fresh review of all NEW native semantics/cost/width/frame/init/API/source mapping remains
pending root arrangement. Unchanged prerequisite outside coverage can be reused after
the recorded identities (1576 outside FINAL6487515809). No child watch/approval/merge.

* style(Schonhage): remove trailing space in queried products

Independent nonauthoring /root/queried_product_review examined the complete
native #1581 layer at ff31104be7acf96798c13b38cb079c58605a1ec3 against
91f485ec38ca6b878f338e2cdbdedbf5d4f20257, including all 29 new library
modules, actual execution/frame/width/cost, multiplicities, source mapping
and initialized clients. No correctness/API/source/resource blockers; this
is agent review within the root fleet, not outside or human approval.

The single P3 finding was a trailing space in Product/Groups.lean:111.
This coordinator correction removes exactly that ASCII space. An exact
byte check and git diff -w verify no other change. Full base-to-head
diff --check now passes, covering committed changes as well.

All six gates and static/source checks pass on reviewed tree555b6b52,
as recorded in ff31104. The whitespace delta is validated separately;
final hosted CI and outside coordinator review remain required.
Curated abstracts unaffected. AI assistance: Codex.

* doc(Schonhage): retain band catalogue encoding contract

Restore the one supplier sentence in UPSTREAM.md about unchanged leaf ordering and
canonical signed words, addressing optional nit1 in outside FINAL6493515098 on PR1615.
All other paragraphs are preserved. Exact byte comparison against9a57e134 verifies
this one sentence is the entire tracked delta; all Lean/native/math/API/abstract
source and every other tracked byte are unchanged.

Documentation-only validation: consistency with the existing catalogue interfaces,
full base-to-head diff --check, citation/simp hygiene and strict25-name final PR-body
audit pass. No Lean, import, aggregate or full rebuild was run for prose. Original
all-six evidence remains for tree555b6b52141f6e13f9f4aa913d6e7f7e5f8db474; this does
not claim a new-head all-six run. No changed abstract meaning or rendering.

Full nonauthoring native/source review and outside FINAL coverage are reused across
this bounded doc delta. A focused outside DOC delta check is requested, not another
full review. Register naming remains a separately coordinated follow-up; existing
nonzero interpreter coverage was accepted, so no test change is included.

AI assistance: Codex implemented the requested one-sentence documentation repair.

* fix(imports): regenerate wanted-routing aggregate from actual inventory

* wip(wordram): checkpoint callable thin-product source

Personal #1618 source checkpoint before integrating the refreshed #1615 parent. Complete generic native memory-window compiler, computed-modulus callable raw01 product, initialized Runs/halt, width/window/cost and dirty-memory/frame tests have targeted Lean MCP diagnostics clear. Canonical imports and final all-six/static validation remain pending; this is not a publication candidate. Reuses the exact landed NatClog module from a1d1fa882, with original credit. No full Exact Triangle or ordinary3SUM endpoint claim.

* feat(WordRAM): run queried thin products in caller-owned memory

Implements the bounded callable prerequisite #1618 under #1394. Owner/session:
codex-three-sum-continuation-t3-3dda8289, personally on
work/three-sum-native-callable-product-20261029. Ordinary parent merge904c62068
preserves the reviewed #1615 a8cb7c984cd77e7eb150522e1353a2da22c84839 source.

Generic MemoryWindow.compile adds actual add/load/remainder and add/store
instructions, retaining ordinary Code/Exec/ExecWithin/Runs semantics. Proved
bounded native-source execution transfers within3x charged instructions/code
size, with3 additional registers and a full outside-window frame. The clipped
memory view is a value relation, not another run semantics or an algorithm oracle.

Concrete raw01 CallableProduct derives the actual source execution from original
matrices/request occurrences. Native NatClog/Power compute the source modulus;
fixed register normalization, translated producer/query execution and two exact
input/output span-normalization loops are all charged. Fixed163 registers,
<=131072 flat slots including halt, no physical-width reads. Actual initialized
prefix Runs and halt refer to the same final data and exact requested products.
Local input is restored and caller memory outside[b,b+M) is preserved.

Thin admission is explicitly D=4^m,L=19m,D^18<=N, with raw zero/one matrices.
M=2^(128*clog2(N+Q+3)) <= (2*(N+Q+3))^128. No whole-window or catalogue clear/copy.
Every W>=256*clog2(b+N+Q+P+5) suffices. For arbitrary dirty callers P bounds EVERY
initial register/memory word, including physical loads before remainder. For the
initialized client scratch is zero and P only bounds the protected caller prefix.
All-prefix assertions are physical word fits, not an independent-of-W polynomial
intermediate-word theorem. The explicit window reservation is polynomial.

Including base loading/halt: charge <=3*(originalT+1)+2048*(N*D+Q+1).
Distinct-set sparsity retains+Q; occurrence sparsity Q*2^m<=N^2 gives
17301504*(19m+1)*N^2/D^(1/18). Neither sparsity premise is needed for execution.
The ET-record adapter, fast ET/backend/witness composition and full ordinary3SUM
1.9992 remain open. Root retains parameters/prime selection/outer ET host.

FINAL VALIDATION: tree f8ff0209469bb668837b9602fb71ecf3aaf3bc99.
All SIX together PASS, four compiler threads, cache downloads disabled:
lake --no-cache build --wfail --iofail (22.27s)
lake --no-cache exe mk_all --check (13.75s)
lake --no-cache test --wfail --iofail (183.59s), including Smoke/global Axioms
lake --no-cache lint (45.02s)
lake --no-cache exe lint-style (22.14s)
lake --no-cache exe checkInitImports (16.56s).

Final full hygiene --check-simp, actual-base12-library/two-test lints,
changed-file checks, strict14-name PR draft audit, COMPLETE a8-to-final diff
--check, staged and unstaged diff checks all PASS. Canonical imports generated;
all new tracked file modes100644. No sorry/custom axiom/native_decide or new
heartbeat override. Only justified finite syntax-check recursion-depth options.

Source audit: all3686 inherited source/abstract files and modes unchanged from
actual reviewed parenta8. Original Product, Wanted/Pruned/Band/encoding, NatClog
and Power suppliers remain unchanged. New MemoryWindow and Callable/Program files
are byte-identical to source checkpoint7cb7ade0a. ArrayNormalize native bodies and
theorem statements are identical; the only API metadata fix replaces blanket
exposure with explicit exposure of its two code definitions. All affected clients
check with the public pure-specification lemmas. The deliberately interrupted e8
checkpoint is NOT used as an all-six claim. One overlapping MCP dependency setup
had a transient Windows artifact lock; serial retries and final six are clean.

Kernel clients tie actual initialized Runs/halt to exact physical output and
caller sentinels. Native VM cases cover nonzero/zero products, duplicate/empty
queries and dirty workspace above the source modulus. A direct compiler client
loads27%8=3, increments/stores4 and preserves both adjacent sentinels. Concrete
numerical width budget passes387/fails386; zero N fails the explicit thin premise.

Pinned source: anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
3sum-apsp/ThreeSumApsp/Sec2/Theorem5.lean61-67 (exact products),146-149 (sparse leaves).
Local file equals the pinned Git blob; conclusion fragments checked verbatim.
Finite mathematics/source credit is inherited. Compiler/controller/proofs here
are original native work, not a source-Light semantics/count transfer.

Abstract assessment: no own selected statements, models, catalogue or rendering
change. No whole3SUM headline promotion. ROADMAP/UPSTREAM retain the #1394 gap.

PUBLICATION LIMIT: #1615 landed DURING this audit via ee1ab6f08ac77b1404d19c0371b0b0ac7daaa915
(reviewed carrier7da96e65cf2c352d08142bb5a7ea65098008d8cc); main now includes later
native/frontend additions. The five direct machine/arithmetic prerequisites and
entire Schonhage supplier remain byte-identical. This exact validated candidate
is preserved on its reviewed a8 parent for coordinator-directed current-main
compatibility work before publication. No parent remote is changed.

Fresh exact-whole-layer NONAUTHORING compiler/callee/API/resource review is still
required and is owned by root. Existing supplier reviews do not approve the new
compiler. No new PR, outside approval, merge or endpoint completion is claimed.

Local reproducible records: .lake/codex-three-sum-continuation/callable-product/
summary.json,static-summary.json,source-identity.json,source-mapping.json,
pr-body.md,audit-source.py and logs. Durable evidence is this commit description;
the issue handoff links it. AI assistance: Codex implementation/self-review with
Lean MCP; fresh nonauthoring and outside reviews remain pending.

* refactor(WordRAM): align ArrayNormalize module name and admission prose

Address optional review nits on PR1625 at fd1f2fce. Rename Normalize.lean to ArrayNormalize.lean with identical file bytes, migrate every consumer and the sorted canonical aggregate without a compatibility shim, say widths at least the threshold, and record that full VM cases use m0/N1 while general execution/resource proofs cover all valid geometry. Existing review6497681504 is already linked; the missing-record observation was a timing snapshot.

Validation: serial targeted Lean MCP ArrayNormalize, WordRAMMemoryWindow and SchonhageCallable all clean. Exact moved-blob identity and comment-erased Lean token identity modulo module-import migration pass; public declaration statements/bodies/attributes and native program meaning are unchanged. Canonical source import order and removal of every old path verified. Full citation/simp hygiene, targeted repository doc-name/new-test checks (12 modules/2 tests), strict14 PR-body names and complete d010-to-final/staged/unstaged diff checks pass. No aggregate/import-generation/all-six run for this bounded delta. Original f5/f8 all-six and final fd1 hosted all-checks green run40879707895 remain scoped to those revisions; repaired head requires refreshed hosted CI before integration. Full compiler/source reviews reused; focused module/import/doc/test-comment delta review requested after push. No abstract/model/resource change or endpoint claim. Evidence .lake/codex-three-sum-continuation/callable-product/review-rename.

AI assistance: Codex implemented the mechanical API/documentation repair; no self-approval, human approval or new full review is claimed.

* feat(ExactTriangle): checkpoint actual record product composition

Personal worker codex-three-sum-continuation-t3-3dda8289, issue1626, ordinary child from1625 repairce1062483; no ancestor remote edits. Implements fixed320-register actual record selector/log/header/copies/complete163-register callable bank, all readback separations from actual producer Output, raw01 identity, occurrence/query-cap sparse bound, native initialized producer→first-record consumer, same-y prefix Runs/chargedhalt/answers/frame, original positive logarithmic width and physical-width-independent polynomial prefix words/support. Generic caller consumes every occupied ordinal. Initialized fixed client selects ordinalzero and proves it exists; this is not an outer instance loop or aggregate ETsolver.

PreparationInput.exec_input is the coordinator-authorized narrow API seam, reusing the existing derivation/private fits_at_width; public runs_input reuses it with unchanged statement/hypotheses/budget. No native producer/callee program or input definition changes. All own modules, modified producer module, and new native prefix/copy/admitted closed positive-depth initialized test have clean targeted Lean MCP diagnostics. Tests include actual second-record decode at m2,n16^18 and raw01 copy; the huge complete input family is kernel-checked symbolically, not VM-enumerated.

SOURCE CHECKPOINT ONLY: canonical import generation, final all-six, full static/hygiene/source identity, PRmapping and required fresh nonauthoring review remain pending. Root owns sole aggregate/static slot; no such process was launched. Original #1394 ordinary3SUM1.9992, aggregate ET/outerloop/prime/parameter/backend/witness work remain open. No PR/review/approval/merge/watch. Credit retained; original native adaptation/composition by Erik Demaine with Codex AI assistance.

* feat(ExactTriangle): validate initialized record product adapter

Refs #1626. The full #1394 ordinary distinct-position 3SUM 1.9992 endpoint remains open. No PR is opened by this worker; fresh whole-layer nonauthoring review is pending coordinator arrangement.

Validated source tree: 8f59a54c6de13459c0a85d86546b12fc12c5003c
Pinned main base: 8569de69ef05751c7e39e2ddd99d24d49f6aa1ec
Preserved source checkpoint: 8f46341d456f6e3651beb02aac898a22a34a9883
Normal main merge: 8612aff051db4590f15efcb02fa37deb2992f6f5. Only ROADMAP/UPSTREAM conflicted; complete landed prose is preserved. After the checkpoint the only own Lean deltas are canonical imports and terminal Header proof simplification. Native programs, public statements and supplier credit are preserved.

Original native implementation: fixed 320 registers and <=132352 flat slots including halt, no width reads. Reads the real six-word record/heap, computes m using NatLog, copies raw X/Y and all interleaved query occurrences, and invokes the complete 163-register runtime-relocated callable bank. Copying keeps raw 0/1; the callee charges signed doubling once. No catalogu…
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.

3 participants