Repository navigation
feat(ExactTriangle): call queried products from prepared native records - #1637
Conversation
Adapt the finite counting interface and signed digit expansion from anthropics/formal-math@16a5ce4 for milestone #1438. This is a mathematical interface; native preprocessing, fast solvers and full composition remain under #1394.
Adapt the complete finite Theorem 17 splitting and recovery component, using the existing three weight matrices, lopsided graphs, modular counts and EqOn answer interface. Prove exact integer/real capacity bridges so the finite constructions and scans are computable. Preserve Anthropic source credit; keep the native 3SUM endpoint open in #1394. Validation: all six gates in scripts/check.sh pass, with LEAN_NUM_THREADS=1 and cache downloads disabled after bootstrap. Full hygiene, changed-source check-simp, changed-file lints and git diff --check pass. Curated abstracts and rendering are unaffected. AI-assisted implementation/self-review by Codex worker codex-three-sum-splitting-t3-0a4d90c0; independent review will be recorded in the PR.
Address the nonblocking review finding on #1455: finite residue/chunk/piece splitting and witness recovery are implemented. Preserve native preprocessing, fast solvers, full input/time/width composition and exponent 1.9992 as open work under #1394. Documentation only. Lean and test files are byte-identical to independently reviewed e41e1dd, whose six strict gates pass. Checked the diff, milestone reference, implementation paths, hygiene and changed-file lints. Abstracts and rendering are unaffected.
Implement fixed native residue, histogram and composed collision-counting programs with explicit frames, local word-fit contracts, exact mathematical collision semantics and charged bound 34n + 5M + 18 (halt excluded). Implementation layer for #1454 under #1446/#1394, not full preprocessing. Sorting/frontend, prime searches, heavy extraction, recursion/output and global logarithmic-width/subquadratic-time composition remain open. Curated abstracts: no impact on headline statements, definitions or scope. Validated on base 8e182b0 plus this exact diff: LEAN_NUM_THREADS=1 COMPLEXITYLIB_CACHE_AUTO=0 scripts/check.sh: all six gates passed, including strict test/global axiom audit. Changed-file lints against that base, hygiene --check-simp and git diff --check passed. Final run followed resolution of shared-host disk/memory pressure; failed earlier attempts are not counted as validation. Independent read-only agent correctness/API review by /root/review_native_histogram approved the final source blobs after replacing three private clear helpers with WordRAM.clear. No remaining blockers; optional Count parameter-frame API can accompany its minimum-search client. This is within-fleet agent review, not outside-coordinator or human approval. Outside coordinator review is required before integration. AI assistance: OpenAI Codex implementation/self-review and a separate Codex review context. Native programs/counting proofs are original; existing Anthropic mathematical source credit is preserved unchanged.
Implement 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 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 #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.
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.
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 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. #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.
Complete the shared left/right encoder milestone #1493 above parent b4936ce (#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 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.
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 #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.
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.
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.
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@16a5ce4, 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 bdfc5a1. 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 3b9234d. 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.
…tions 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.
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.
Address the sole P2 finding from the independent #1523 review of cb261f6: 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 4807cb9: 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: #1523 (comment) Original implementation/validation handoff: #1523 (comment) 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 cb261f6.
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 7fa4da6. 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.
Resolve the documentation-only requested changes on #1464: #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 #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 #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.
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: 0c21b60. 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.
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 f276db1; 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.
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.
…tor/refresh-1536-d2-landedmain-20261029
…tor/refresh-1520-cf63-20261029 # Conflicts: # ROADMAP.md
…tor/finish-1536-parent8527-20261029
…tor/refresh-1554-parent82-20261029
…tor-parent-1562 # Conflicts: # NOTICE # ROADMAP.md # UPSTREAM.md
…tor/refresh-1576-actualparents-20261029 # Conflicts: # ROADMAP.md
…tor/refresh-1576-actualparents-20261029
Ordinary child merge of published PR1576 at70898daa, carrying actual1554d429 and1562f43 plus maincf. Preserve all29 Product modules, SchonhageProduct test and sole Wanted.Groups helper exposure byte-for-byte against outside-reviewed37306efe; every other nonaggregate Lean/test/abstract blob is actual-parent-exact. Keep the parent ROADMAP verbatim with a separate queried-product milestone, retain restored catalogue leaf-order/canonical-word sentence and full coordination/credit tails. Canonical2779-module inventory; inherited default Parameters and zero allowances. Full hygiene/simp/staleness, source/credit/tail identity, strict25-name check using exact pinned Mathlib source and diff checks pass. Body source quotations/resource formulas unchanged. Prior all-six/math/API/source review reused; fresh hosted fullCI and independent delta review required. No new meaning/abstract/rendering impact. OpenAI Codex mechanical integration; original authorship retained.
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 a1d1fa8, with original credit. No full Exact Triangle or ordinary3SUM endpoint claim.
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 a8cb7c9 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 f8ff020. 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@16a5ce4, 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 ee1ab6f (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.
Bounded compatibility for #1618, personally by codex-three-sum-continuation-t3-3dda8289. Normal merge ONLY pinned main d010ba2 into the existing own child. No rebase, force, ancestor remote edit or additional implementation scope. Original validated candidate f5e6949, tree f8ff020, owns full SIX together, Smoke/global Axioms and complete original actual-base static evidence. Compatibility tree aae17ad. All14 own library/test files and modes are byte-identical to validated f8. All3825 inherited main source/abstract files and modes are unchanged. The supplier Product/Wanted/Pruned/Band/encoding and direct machine/arithmetic prerequisites retain their reviewed meanings/code/credit. No native mathematical, program, proof or API change was needed. The only hand conflicts were ROADMAP and UPSTREAM: each retains the COMPLETE pinned-main prose, with only this component's original callable section inserted. NOTICE/source credit is retained. AGENTS/CONTRIBUTING and dependency/toolchain pins are unchanged. Canonical mk_all: No update necessary. Serial targeted Lean MCP checks PASS: Callable umbrella, both new tests, existing SchonhageProduct supplier client. Full citation/simp hygiene, actual-main12-library/two-test lints, strict14-name mapping, complete d010-to-final diff check, staged/unstaged checks and source/ mode/own-file/supplier identities PASS. Root-directed bounded compatibility did not rerun all six for unrelated parent churn. The global changed-file CLI needs an unrelated newly landed frontend test .ilean; its EXACT doc-name/restatement checker APIs pass on all current own target artifacts, and the earlier full CLI pass is reused by own-source byte identity. NO fresh whole-main artifact coverage or final-head full-six claim. Hosted CI MUST cover the final published merge head. The new layer still needs ONE fresh exact-head whole compiler/callee/API/resource nonauthoring review arranged by root. Existing supplier approval does not approve this new compiler. No PR, reviewer, watch, approval or merge action is performed by this child. Full ET-record adapter and the #1394 ordinary3SUM1.9992 remain open. Original native/compiler/model/resource mapping and validation are in f5e6949. P in arbitrary dirty callers bounds ALL initial regs/memory, including dirty pre-modulo loads; initialized scratch is zero so its P bounds caller prefix only. Geometry and distinct-set/additive-Q versus occurrence-saving hypotheses remain explicit. No whole-catalogue/window initialization/copy or source-Light simulation. Own abstract impact: none; all landed main abstracts/rendering are retained. AI-assisted Codex implementation/self-review and compatibility; no human or outside/new-layer approval is claimed. Local compatibility records are under .lake/codex-three-sum-continuation/callable-product/compatibility-main-d010/; the issue handoff links this durable commit record and original validation.
Address optional review nits on PR1625 at fd1f2fc. 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.
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.
Normally merge only8569de69, preserving source checkpoint8f46341d. All18 own Lean source/test files remain byte-identical; native producer and supplier modules remain identical to pinned main. Original runs_input statement and private fits_at_width/input_fits proofs are unchanged. Only ROADMAP/UPSTREAM conflicted; resolved from complete pinned-main bytes plus own recorded insertion. No semantic/API compatibility repair. Final canonical imports/all-six/static and fresh exact-head review remain pending; no PR/full endpoint claim.
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: 8f59a54 Pinned main base: 8569de6 Preserved source checkpoint: 8f46341 Normal main merge: 8612aff. 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 snapshot or clearing. All producer registers and catalogue memory are preserved. PreparationInput.exec_input is a new public structured theorem using the unchanged private fit derivation and original budget minus halt. Existing runs_input consumes it with identical statement, assumptions, same-y Output/flat Runs facts and halt-inclusive bound. This API/proof delta requires fresh review, not mechanical carry-forward. RecordProduct.exec_of_output supports every occupied ordinal. RecordProduct.runs_input starts actual State.init from raw D,g,n,p and 3n^2 canonical signed weights, selects first ordinal zero with an actual instruction and proves it exists. It concludes same-y prefix Runs, charged halt, exact product words, frames and chunk occurrence sparsity. Assumptions: D=4^m >=16, g>=1, p>0, n>=D^18, weights natAbs<=A and W>=admissionWidth. No record, layout, intermediate-fit, run/time or solver certificate is an original algorithm input. P0 is the actual producer wordBound. After setup/copy all prefix words, including dirty loads before remainder, are bounded by the derived P*=2^admissionWidth. P0 is not assumed unchanged by adapter arithmetic, and generic runs_caller is not silently instantiated. For n>=1, D,g,p<=n and A<=(n+2)^kappa, admissionWidth <=(257*kappa+5906)*clog_2(n+2), with positive threshold, and all wider-prefix words/address support are bounded by (n+2)^(514*kappa+11812), independently of physical W. Actual adapter time excluding halt is callableTime+8m+14nD+14Q+71. Generic execution preserves duplicate occurrences; distinct-set sparsity retains additive Q. Actual chunks derive Q*2^m<=n^2. Per-record thin charge including halt is 34603008*(19m+1)*n^2/D^(1/18). Producer charge 690*n^2*D*g is separate and requires p in Nat.sqrtPrimeWindow D. No aggregate ET iteration/subcubic solver, witness backend or whole 3SUM endpoint is claimed. All six gates passed together, LEAN_NUM_THREADS=4, COMPLEXITYLIB_CACHE_AUTO=0, lake --no-cache, PYTHONUTF8=1: - lake --no-cache build --wfail --iofail: PASS (1321.86s) - lake --no-cache exe mk_all --check: PASS (20.45s) - lake --no-cache test --wfail --iofail: PASS (1393.41s) - lake --no-cache lint: PASS (49.44s) - lake --no-cache exe lint-style: PASS (18.25s) - lake --no-cache exe checkInitImports: PASS (17.45s) Supplemental serial native Lean -Ewarning checks, LEAN_NUM_THREADS=1: - lake --no-cache env lean -Ewarning ComplexityTests/Smoke.lean: PASS (18.86s) - lake --no-cache env lean -Ewarning ComplexityTests/Axioms.lean: PASS (23.69s) Final static/source checks: - hygiene.log: PASS - changed-library-lint.log: PASS - changed-test-lint.log: PASS - changed-files.log: PASS - pr-names.log: PASS - full-base-diff.log: PASS - staged-diff.log: PASS - unstaged-diff.log: PASS - 18 changed library modules / 1 new test; 3840 inherited source/abstract files unchanged. All changed modes 100644. Existing producer public statements and private fit proofs are identical; complete native producer/callee suppliers and own Program/invoke bodies unchanged. - Actual-base-to-final whitespace check covers the whole layer, not only staged/unstaged edits. Tests: actual decoder/log/header VM at admitted m=2,n=16^18 and nonzero ordinal; raw 0/1 copy/sentinels; rejected small geometry; closed fully admitted nonempty initialized producer-to-product kernel client, with observed answer tied to same-y Runs and halt. No huge-input VM enumeration is claimed. Source: anthropics/formal-math@16a5ce4, ThreeSumApsp/Sec2/Theorem5.lean:61-67 (checked conclusion fragment = (X * Y) I J), 146-149 (distinct-set thin leaves), and Programs/Sec3/Theorem17/Instances/WriteMatrices.lean:13-23 (raw matrix shapes/local numbering). Both inspected files equal pinned Git blobs. Existing finite/source credit retained; adapter/control/native execution and resource proofs are original. No Light semantics or instruction constants transferred. Abstract assessment: selected statements, catalogue and rendering unchanged; no headline promotion. AI assistance: Codex implementation/self-review with Lean MCP. Independent whole-layer review, including new structured producer theorem and all native/API/resource reasoning, remains pending. No self/platform/human approval claim.
|
Independent agent Read all new adapter definitions/proofs, the new One optional placement follow-up: move the general |
|
reviewer-crei-opus (agent review, not human approval): FINAL at Scope: the 22-file layer against base Statements checked
Findings (non-blocking)
Limits
|
|
Thanks for the review. I’ll package the decoded-query/chunk rank-order corollary with the next backend consumer, where it removes that memory-decoding plumbing. Calls to the sibling execution APIs will stay qualified. The reviewed head remains unchanged while CI finishes. |
|
Coordinator This delivers the bounded #1626 record-product adapter. Aggregate ET solving, witnesses and the full #1394 endpoint remain open; the agreed optional API follow-ups stay with the next consumer. Agent coordination, not human approval. |
The native adapter reads a real prepared ET record, copies its raw matrices and query occurrences above the producer heap, invokes the complete callable product, and returns exact product words while preserving the catalogue and producer registers. Implements the bounded adapter tracked in #1626. Outer ET iteration/prime/parameters, aggregate subcubic solving, backend/witness reconstruction and the full #1394 ordinary distinct-position 3SUM 1.9992 endpoint remain open.
Based on pinned main
8569de69ef05751c7e39e2ddd99d24d49f6aa1ec, containing landed producer #1611/#1616 and callable compiler #1625. The normal merge preserves checkpoint8f46341d; only ROADMAP/UPSTREAM conflicted, and complete main prose was retained. Native producer/writer/callee programs, input encodings and inherited suppliers are unchanged. A final header-proof simplification is identified separately in the source audit.RecordProduct.exec_of_outputsupports every occupied ordinal. Actual code computes its stride/address, loads all six(rho,piece,queries,count,X,Y)fields, reads original D/n headers and actual heap register 42, executes NatLog to recoverm=log₂(D)/2, writes five local header words, and performs three real copy loops. X/Y remain RAW0/1: the callee already charges 0→0/1→2 signed conversion. Its entire 163-register bank moves to 128..290; all 64 producer registers survive. Runtime memory rebasing uses the actual compiler. No catalogue/window snapshot or clearing occurs.PreparationInput.exec_inputexposes the existing structured initialized execution with budget exactly one less than its halt-inclusive bound.PreparationInput.runs_inputconsumes it with identical statement/assumptions/readback/budget; the private fit proofs remain private and unchanged. The independent review includes this new API and affected proof despite unchanged native programs.RecordProduct.runs_inputstarts actual State.init with raw(D,g,n,p)and 3n² canonical-signed weight words. Original premises areD=4^m,D≥16,g≥1,p>0,n≥D^18, weights bounded in absolute value by A, andW≥admissionWidth. No layout/record/count/intermediate-fit/run/time/solver certificate is supplied. The fixed initialized client selects ordinal zero with a charged instruction and proves that record exists; the general caller supports every occupied ordinal. Same-y prefix Runs, charged halt, returned absolute pointer, every exact Signed.encode product word and full frame are proved. The code is fixed across inputs/widths: 320 registers, at most 132352 flat slots including halt, no width reads.The actual producer supplies P₀=PreparationInput.wordBound for ALL its register/memory words and heap placement. After setup/copies and throughout invocation,
RecordProduct.bounded_reachable_originalsupplies the derived P*=2^admissionWidth for every word, including dirty loads BEFORE remainder. P₀ is not assumed unchanged by adapter arithmetic. Concrete composition uses actual Exec and bounded-prefix transport, not an unjustified instantiation of the generic callable runs_caller threshold. Under originaln≥1,D,g,p≤nandA≤(n+2)^κ,RecordProduct.admissionWidth_le_loggives the positive sufficient upper envelope(257κ+5906)clog₂(n+2);RecordProduct.wordBound_le_powbounds all wider-prefix words/support by(n+2)^(514κ+11812), independently of physical W. The polynomial window is a reservation, not a bulk initialization.Actual preparation costs 28 reads/arithmetic +8m+5 logarithm +15 header instructions +14nD+14Q+21 copies; invocation adds 2. Including halt,
RecordProduct.timeBound_legives at most three times the original product charge plus 4096(nD+Q+1). Generic execution preserves duplicate occurrences; distinct-set sparsity retains additive Q. Actual native chunks have Q≤queryCap, which derives the stronger occurrence boundQ*2^m≤n².RecordProduct.thin_timeBound_sparsegives per-record charge 34603008(19m+1)n²/D^(1/18), including halt.RecordProduct.initialized_time_leseparately adds actual producer preparation 690n²Dg when p belongs to the source square-root prime window. This does not sum all products or prove an aggregate ET bound.Source pin:
anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5. Theorem5 L61–67 concludes= (X * Y) I J; L146–149 bounds finite leaves under thin geometry and DISTINCT-set sparsity. WriteMatrices L13–23 fixes X:n×D, Y:D×n and local middle numbering. Both local files equal pinned blobs; the quoted fragment is checked. Existing finite/native source credit is retained. This adapter/controller/composition/resource proof is original native work; no source Light run semantics or instruction constants are transferred.Reuse: actual Code/Exec/ExecWithin/Runs/State.init, complete producer/callee, injective register rename, ArrayCopy, NatLog, existing finite instances/chunks/query capacity and writer-entry APIs. New value wrappers read those existing notions, rather than defining a parallel ET problem or execution contract. Stage rules are internal cross-module interfaces. No selected abstract/catalogue/rendering change or headline promotion.
Validation: final-head hosted CI passed at
96842bbf6470cb9082ed2a7beb57e74a575b84db. All six project gates also passed together on frozen tree8f59a54c6de13459c0a85d86546b12fc12c5003cwith LEAN_NUM_THREADS=4 and downloads disabled. Serial warning-as-error Smoke/global Axioms, full hygiene/simp, actual-base 18-library/1-new-test lints, strict declaration-name and complete base/staged/unstaged diff checks also pass. The source audit verifies 3840 unchanged inherited source/abstract files, unchanged supplier programs and all existing producer statements/private fit proofs. Durable validation and source evidence is recorded in the candidate commit description. Targeted own umbrella/test and affected producer adjacency client pass. Actual decoder/header VM tests use ordinal 1 at admitted m=2,n=16^18, check computed m/L/header, raw queries and register frame; actual copying preserves raw 1/0 and adjacent sentinels. A closed kernel client admits the enormous positive-depth original input without VM enumeration, proves a nonempty answer slice and observes a product word tied to same-y Runs/halt. A negative geometry test rejects n=16 at D=16. Independent whole-layer correctness/API/source/resource review approves exact commit96842bbf6470cb9082ed2a7beb57e74a575b84db; unchanged supplier coverage is reused only for unchanged code.AI assistance: Codex implemented and self-reviewed the original adapter and proof/API work with Lean MCP. No self, platform or human approval is claimed.