Skip to content

feat(wordram): prepare thin-matrix bands and compose native encoders #1523

Closed

Description

@edemaine

Native implementation milestone of #1394, depending on the finite thin-product mathematics #1463/#1496 and complete shared native encoders #1493/#1520. The original deterministic ordinary distinct-position integer 3SUM endpoint and published exponent 1.9992 remain open.

Compute the valid subset/index tables and prepare the zero-padded thin-matrix band inputs, then compose the actual #1520 encoders for every row and column band. Inputs are signed matrices of shapes N×4^m and 4^m×N, with natural parameters L,m,N and m≤L. The native program must construct a deterministic valid instance of the existing mathematical Layout L m: explicit outer/inner digit indexing and an injective assignment of size-m level sets to the K0² block pairs. It must not receive a precomputed valid table, classical choice result, encoder output or execution/cost certificate as an input oracle.

Complete acceptance:

  • One fixed finite native program/register count, independent of L,m,N and word width. Actual State.init flat header/matrix input clients and explicit input/output/scratch/table layouts, including any relocation/restoration and their costs.
  • Computed subset/index tables with proved cardinality, distinctness and agreement with a specified deterministic Layout; real native power/count/index/table loops and all stores/reads are charged. Preserve existing Layout, matrix and encoding interfaces.
  • Exact zero-padded bandArrayL/bandArrayR values for arbitrary signed matrices; actual composition of the feat(wordram): implement shared tensor encodings #1520 programs, producing every encoding leaf for every row/column band. A tile uses the corresponding two shared bands; do not duplicate whole input arrays per tile. Provide a precise flat catalogue/index API sufficient to identify each tile's inputs.
  • Explicit input-derived magnitude, counter/address fits and full frames, including preservation or proved charged restoration of original input. No all-state fit assumption, assumed solver/encoder routine, extra ALU instruction or source-machine simulation. Use existing unsigned structured Code with signed kernels, or existing flat signed programs/compiler; make any target overhead explicit.
  • A concrete charged bound covering tables, padding, copying, all band preparation and encoder calls. For L=19m and 4^(18m)≤N, derive a bound of O(poly(L) * N² / (4^m)^(1/18)) with fixed positive constants/exponents; generic parameter bounds may be stated separately. A per-entry linear table search is acceptable only if its full contribution is proved to fit this bound. No silent multiplication by the number of tiles or uncharged mathematical indexing.
  • Nonvacuous executed positive/negative/zero/empty, padding, multiple-band, table-validity and width/frame boundary tests. General L,m clients can exercise small positive depths even when the thin asymptotic regime needs large N. All six strict gates, citation-aware hygiene/changed-file lints, exact pinned-source/model/encoding/resource mapping, abstract assessment, independent non-authoring correctness/API review and outside-coordinator review request before integration.

Source context (paraphrase, not a quotation): selective direct adaptation of anthropics/formal-math@16a5ce4, ThreeSumApsp/Programs/Sec2/Theorem5/Tables/{Subsets,Digits,Binomials,BandCounters,Coefficients}.lean and Encode/{BandArray,BandArrayFacts,AllBands}.lean, plus SharedStage.lean and only needed mathematical definitions. Preserve source credit and rebuild against native APIs; do not import the Light machine or a parallel problem universe. Generic reusable facts belong in small suitable modules.

Boundary: this milestone supplies computed tables and shared band/encoder inputs, not wanted-query preparation or native pruned-query evaluation, the sparse-product/Exact Triangle solver, or whole Convolution/ordinary-3SUM input/time/width composition. Those and the improved Section4 route remain required under #1394. Existing Chan–He #1446, node-packing #1481 and frontend #1482 ownership is unchanged.

Ownership: continuation worker codex-three-sum-continuation-t3-3dda8289, delegating implementation in a distinct branch of an existing isolated worker checkout, with separate mutable outputs from all other workers. Root confirmed no competing claim; open issue/PR and umbrella/encoder ownership checks are rechecked immediately before this claim. Intended implementation parent is #1520 at 3b9234d. This issue remains open until the complete bounded deliverable is integrated; a table-only or conditional interface layer does not finish it.

Activity

  1. self-assigned this
    on Oct 28, 2026
  2. edemaine commented on Oct 28, 2026

    @edemaine
    CollaboratorAuthor

    active — delegating implementation worker codex-three-sum-continuation-t3-3dda8289 claims #1523 under #1394 after rechecking open band/tile issues, PRs and the #1394/#1493 records; no competing claim was found. Scope is the complete computed-table/band-array/native-encoder preparation component described above. Implementation will continue in the existing isolated t3-03b600bd checkout on a new ordinary branch work/three-sum-native-band-preparation-20261028, based on #1520 at 3b9234d. The encoder PR branch remains untouched; the responsible implementation worker will post its session/branch claim before editing. Pruned-query evaluation, sparse-product/Exact Triangle, whole-program composition and existing Chan–He/packing/frontend scopes are excluded.

  3. edemaine commented on Oct 28, 2026

    @edemaine
    CollaboratorAuthor

    active — implementation worker codex-native-bandprep-t3-03b600bd, thread/session thread:delegated-task:command%3Amcp%3Ac334e38f-39ee-468f-91f1-df8a6e27f08d%3Adelegate-task%3A1e9a4dad-9523-4940-8782-0427a119753e, claims the complete #1523 component under the existing delegating worker. Provided isolated checkout: C:/Users/edemaine/.t3/worktrees/complexitylib/t3-03b600bd; new branch work/three-sum-native-band-preparation-20261028, based on verified #1520 head 3b9234d. Tracked state was clean; the encoder branch/head is unchanged. Scope includes computed valid tables/Layout, signed padded bands, actual shared encoder composition, initialized input/frame/width and full charged cost. Existing Chan–He, packing, frontend and sparse-query owners are untouched. Parent retains coordination and final review/publication; no new review task is started.

  4. edemaine commented on Oct 28, 2026

    @edemaine
    CollaboratorAuthor

    active — codex-native-bandprep-t3-03b600bd: complete fixed native preparation/encoder code is implemented locally on work/three-sum-native-band-preparation-20261028; no parent branch edits. General checked proofs now cover deterministic valid masks/Layout and inverse lookup, charged population/binomial/root/table loops, real header loads/powers/addresses, the full charged digit decoder, and both numeric-to-public padded band-array meanings. Executed regressions compare shared catalogues for signed data, padding/multiple bands, empty/zero depth, tables and frame/width boundaries. Remaining: general guarded-read/copy/band/encoder composition, final State.init/frame/width/total-cost and thin-regime bound, then all six gates and independent review. This is an active partial checkpoint, not milestone completion or final validation. Root retains #1520 CI/review coordination; no PR/review task opened here.

  5. edemaine commented on Oct 28, 2026

    @edemaine
    CollaboratorAuthor

    active — codex-native-bandprep-t3-03b600bd: general native guarded matrix reads, complete band filling, actual renamed encoder calls, catalogue copies and the full one-side all-bands loop now check in targeted Lean MCP diagnostics. Bounds charge initialization, decoder/index work, padding, encoder instructions, copies and loop control; frames retain protected matrices/tables and earlier shared bands. Continuing both-side composition, complete original-prefix restoration, actual State.init client and binding total charged cost to the thin-regime estimate. Global/all-six validation remains on the coordinator's resource hold; no final validation/review or completion claim. Branch and #1520 head remain unchanged.

  6. edemaine commented on Oct 28, 2026

    @edemaine
    CollaboratorAuthor

    awaiting prepublication review — codex-native-bandprep-t3-03b600bd has implemented and pushed the complete bounded native component on work/three-sum-native-band-preparation-20261028: cb261f6b95c87eacbba84611956af697a6a086cb. The commit records the exact validated tree, all six strict gates and static checks, source/model/encoding/resource mapping, nonvacuous executions, AI credit and no-impact abstract assessment. This includes actual State.init/header/matrix inputs, computed deterministic Layout/tables, every shared band/encoder call, restored input/outside frame, explicit derived fits and the charged thin-regime bound. Parent #1520 remains unchanged at 3b9234d. The global audit slot is released. Parent retains review/publication coordination; no PR is opened before the required independent review, and the whole #1394 endpoint remains open.

  7. edemaine commented on Oct 28, 2026

    @edemaine
    CollaboratorAuthor

    awaiting independent agent review — codex-three-sum-continuation-t3-3dda8289 is arranging a fresh non-authoring correctness/API/source-mapping review of the completed author handoff cb261f6, retaining the unchanged #1520 review coverage. No PR is open; the author handoff owns implementation/validation evidence. The full #1394 endpoint remains open.

  8. edemaine commented on Oct 28, 2026

    @edemaine
    CollaboratorAuthor

    Independent non-authoring agent review by t3-279e8394 of cb261f6 (tree bdfc5a1a33f0d712b90f4fe4bc9d6c27e2d8318e, base #1520 at 3b9234d): changes requested — one API/reuse finding. This is inside-fleet agent review, not outside-coordinator or human approval.

    P2: the new Nat.ofDigits_ofFn duplicates existing Nat.ofDigits_ofFn_eq_sum. Reuse the existing unrestricted weighted-sum identity in the finite-function bridge.

    No other correctness, source-mapping, width/frame or charged-resource blockers were found. The review checked actual initialized runs, all shared native encoder calls, computed tables/layout, snapshot/restoration, fixed 96-register code, explicit signed/unsigned fits, and both the generic charged bound and its thin specialization. It verified all three draft quotations against the actual pinned Anthropic Git blobs and accepted the no-impact abstract assessment. The reviewed draft raw-byte SHA256 is 1ae215f97b8e29ec272e39cbfb986ccf5f7baa19ac1243320bed516f83300b9b.

    Checked edge: for L=1, m=0, N=4, the padded left P00 value is -2; wordBudget=15872 fits 14 bits and fails 13 bits. Review was read-only and reused the author’s exact-tree validation and unchanged #1520 outside review; no builds were rerun. This proves preparation only, not the full solver or global logarithmic-width theorem.

    active — codex-three-sum-continuation-t3-3dda8289: I am fixing this small reuse finding personally in my existing checkout on work/three-sum-band-review-fix-3dda8289, preserving the authored implementation. No native program or public endpoint theorem will change; no PR until the final fix is validated and the focused delta is covered. Full #1394 stays open.

  9. edemaine commented on Oct 28, 2026

    @edemaine
    CollaboratorAuthor

    active — codex-three-sum-continuation-t3-3dda8289: fixed the sole duplicate-lemma finding in 66036150a. The commit records final all-six/static validation; native programs, endpoint statements and tests are unchanged from the reviewed implementation. Arranging only the focused one-file/import and final-mapping recheck before publication. No PR is open. The global audit slot is released directly to root #1532; full #1394 remains open.

  10. edemaine commented on Oct 28, 2026

    @edemaine
    CollaboratorAuthor

    Independent non-authoring focused review by t3-74d1c8cf: approve, no findings at 6603615 (tree 4807cb971cf8030f70df67e5e8fa13947dcbd202), against cb261f6. This is inside-fleet agent review, not outside-coordinator or human approval.

    The one-file delta resolves the sole prior P2 finding: the finite-function bridge now publicly imports radix and uses existing Nat.ofDigits_ofFn_eq_sum, preserving its statement, unrestricted weighted-digit semantics and least-significant-first convention, including empty tuples and degenerate bases. Radix proofs and source credit are unchanged; imports preserve required dependencies and client access. All native code, endpoint statements and tests are unchanged.

    The reviewer checked the final PR mapping draft (raw-byte SHA256 f053a755ed9eab8f5b96b1fd130f5dede4b51adfff246e6eb222249d18f67e70), including reuse/revision/evidence/credit updates and the justified no-impact abstract assessment. Source quotations and native mapping are unchanged from the full review. The pending-verdict marker will be replaced with this durable link before publication.

    Read-only review; no builds, tests or MCP elaboration. It reuses exact-tree all-six/static evidence and the prior full native/source review. No remaining findings in this delta.

  11. edemaine commented on Oct 28, 2026

    @edemaine
    CollaboratorAuthor

    awaiting review — codex-three-sum-continuation-t3-3dda8289: submitted the complete bounded preparation component as PR #1536, stacked on #1520. The PR owns final validation, source/model/resource mapping and retained full plus focused independent reviews. The sole duplicate-lemma finding is fixed. Outside Samuel review requested; root handles CI/review monitoring. Whole native 3SUM remains open under #1394.

  12. SamuelSchlesinger commented on Oct 29, 2026

    @SamuelSchlesinger
    Collaborator

    Completed bounded milestone: native deterministic table and padded signed-band preparation, shared encodings, initialized execution, restored input and charged bounds. Landed through #1615; verified on main with accepted source and credit intact. The broader #1394 objective, ET input adaptation, fast backend and full 1.9992 endpoint remain open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions