Repository navigation
feat(circuit/frontier): coefficient extraction as a stack recursion in polynomial space (Theorem D.1, T2.9) - #1937
Conversation
Tensor networks over a commutative semiring as the weighted form of the frontier constraint networks (shared Multigraph and locality), with the contraction Z, subdivision by equality tensors (preserves Z, bipartite, keeps degree bounds), explicit tables with ordered ports and size measures, the write-out theorem, and the 0-1 bridge from constraint networks. Tracking: #1833 (T1), #1538. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Start of Theorem D.1 of OpenAI's ETH manuscript (section D.4.3, (D.7)-(D.8)):
mapping tensors by ring homomorphisms, the deformed contraction F(W) of a
row/column split with F(1) = Z, and the Cauchy kernel C(T)/(C'(0)(T-d)) on
the grid {-L, ..., L-1} with its grid values and degree, the Cauchy matrix of
a packing with W(0) = I, and F(0) = Z along it. Tracking: #1538 (T2.1), #1833.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Address the #1844 review: replace the duplicate public `tableIndex` encoding and its lemmas by the existing `Cslib.BitString.lsbValue` and `lsbValue_lt`. Add the missing digit lemma `BitString.testBit_lsbValue` next to `lsbValue` in `BitString/Counter.lean`, and update the table lookup, its proof and the tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
… stack Bring in b06c211, which replaces `tableIndex` by `BitString.lsbValue`. This layer does not use the removed names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…Cauchy kernel T2.3 of #1538 (OpenAI2026ETH, §D.4.3, Lemma D.4, pp. 59-60), stacked on #1845. - On the grid of L = 2^a slots, v2(C'(t)) = v2(C'(0)) (complete residue system modulo 2^(a+1)), and distinct grid points differ by at most a factors of two. - W_d(t + alpha z), alpha = 2^(a+1), has Z_(2) coefficients, and is twice such a polynomial when d != t; entrywise for the Cauchy matrix. - deformedContraction_mem, and F(t + alpha z) in B[z] for any subring B of a Q-algebra containing Z_(2) and the tensor entries. - Rat.padicIntegerToZModPow: reduction of Z_(p) modulo p^n, through Z_[p]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
General p-adic facts used by Lemma D.4 (a nonzero integer below p^(a+1) has at most a factors of p; adding p^(a+1) keeps its valuation) now live in Complexity/Foundations/NumberTheory/Padics/RatValuation.lean for every prime p, next to the reduction of Z_(p) modulo p^n. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
A mode splitting of a matrix W sorts the vertices of a row-to-column
Boolean tensor network into groups and its edges into packets, and splits
every entry of W into a local part and a sum over modes. Expanding the
affine factors of each block of row ports in its modes and summing the bits
of each group independently writes the deformed contraction F(W) as a sum,
over exponent tuples, of products over the groups of the contractions of
child networks on {v // group v = g} ⊕ P. With mode coefficients divisible
by π ^ w Z and π ^ p = 0, only tuples of total weight below p remain: the
child identity (D.16) of OpenAI2026ETH, §D.4.5–§D.4.6, pp. 62–63.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…into claude/t2-cauchy-modes
…ansion (D.12)
The Cauchy kernel in local coordinates over Z_(2) (Lemma D.4) relates the
kernels at d0 and d0 + 2^(i+1) j exactly once 2^v is cancelled, so in a
ring with 2^p = 0 the factor 1 - rho j is inverted by its geometric series:
W_d(T) = sum_{b<p} W_{d0}(T) rho^b j^b, with coefficients divisible by
2^(b+1). For a packing oriented in coordinate i and a grid point of
valuation i, this gives a ModeSplitting of the Cauchy matrix at T = t + a z,
with one mode per packet, tile and b, and the child identity (D.16) for it.
OpenAI2026ETH, Lemma D.3 (2), Lemma D.4, §D.4.5–§D.4.6, pp. 58–63.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
A generic recursion scheme (leaf test, leaf step, start/next/absorb/finish) run by an explicit stack machine. Derivations `Eval I x y n h` (n nodes, h stack levels) are evaluated in 2n - 1 steps through states with at most h open frames. One native certificate runs the machine for a natively computed fuel; its time is (fuel + 1) times a polynomial in (h+1)(F+1) plus the leaf time, and its space a polynomial plus the leaf space. Also the node count of a recursion tree and its 2^O(n/sqrt(log n)) bound (Foundations/Data/Nat/RecursionTree.lean), for the call count of [OpenAI2026ETH, Appendix D.4.7]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Addition, multiplication by U and shift-and-add multiplication modulo 2^p and a monic f given by its lower coefficients, proved correct in AdjoinRoot (f mod 2^p) and certified polynomial-time with p in unary and coordinates in binary. These are the polynomial-time arithmetic claims of [OpenAI2026ETH, Appendix D.4.1] for addition and multiplication (l = 1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…n docstring Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…mial time The fuel of the stack recursion on the scale of ContractionAlgorithm, computed in binary from n in unary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Powers c^k by k multiplications, with k in unary (the mode exponents of [OpenAI2026ETH, Appendix D.4.6] are below the precision). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…[U]/(f) The seed x^(2^e - 2) by e - 1 squarings, then p Newton steps y(2 - xy); correct whenever the seed inverts x modulo 2, which holds for units of a Galois ring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
… tensors Networks whose tensors are given by descriptors and an evaluator, and their direct summation as a stack recursion: one native machine for the contraction modulo 2^P from any native certificate of the evaluator, with time (2^m (k+1) + 1) (poly + 2E) and space poly + ES. This is the leaf step of [OpenAI2026ETH, Appendix D.4.7] with implicit packet tensors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
… (Theorem D.1, T2.9 item 1) The child networks of an active call keep their packet tensors implicit (§D.4.6 of OpenAI2026ETH). This adds the explicit evaluation formula on the packet data and proves that it is the entry of the child network of `cauchyModeSplitting`: * `listCoeff`: coefficient extraction along a list of factors, equal to the sum over all choices (`sum_eq_listCoeff`) and to `blockCoeff` for any mode splitting and any order of the rows (`blockCoeff_eq_listCoeff`); * `packetEntry` and its terms, with `packetTensor_cauchyModeSplitting` and `child_tensor_inr_cauchyModeSplitting`; * `map_packetEntry`: the formula commutes with ring homomorphisms when 2 is nilpotent, so an evaluation in A_p transfers to the recursion's quotients; * the field lemmas of `cauchyModeSplitting` beyond side/group/packet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
… (Lemma D.4 evaluation)
`kernelValue_eq_prod`: with t - q = 2^v_q u_q, u_q odd, W_d(t + αζ) is
κ(kernelUnit a) times ∏_{q ≠ d, t} (u_q + 2^(a+1-v_q) ζ), times
2^(a+1-v_d) ζ when d ≠ t, where kernelUnit a is the inverse of the odd part
of C'(0). The powers of two cancel exactly by `sum_padicValInt_sub_eq`, so
kernel values need only ring operations and inverses of odd integers, as
the source evaluates them (p. 60).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…ude/t2-described-galois
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
… ring operations on values Generalize the leaf of #1914 from natural numbers modulo 2^P to any ring operations on values (SumOps), with their reduced values, homomorphisms and polynomial-time certificates. The scheme computes the fold of the operations (sumValue); a homomorphism takes it to the contraction of the mapped entries. Instances: natural numbers modulo 2^P (SumOps.mod, the previous behaviour, with sumValue_mod and modContractionCertificate) and coefficient lists of (Z/2^p)[U]/(f) with GaloisRingArith (SumOps.galois, val_sumValue_galois). The resource theorem takes a bound Rv on reduced values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…of A_p Native evaluation of the packet entries of the child networks (Theorem D.1, section D.4.6) on GaloisRingArith coefficient lists: kernel values by the product formula of Lemma D.4's evaluation, cross ratios by Newton inversion of an element that is one modulo two, local forms, mode coefficients and values, row terms, and coefficient extraction along a list of modes. val_packetEntryList proves the value in A_p is packetEntry at the reduction of Z_(2); map_val_packetEntryList transports it along any ring map, using that ring maps from Z_(2) are unique when 2 is nilpotent (padicInteger_ringHom_ext). The 2-adic valuation is computed by halving (twoVal), so the functions reduce; tests check tiny packets by decide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Read the exponents of the packet modes at dense indices, matching a dense beta-slice in the packet descriptor, so coefficient extraction runs over a list of indices with a dense exponent list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
… claude/t2-coeff-scheme
Packet entries expand at most L affine row factors and keep the coefficient of a mode monomial (section D.4.6). CoeffScheme gives this as a StackRecursion scheme on GaloisRingArith coefficient lists: a node with rows has m + 1 children (the local term and each mode, lowering its exponent in a dense list), a node without rows is a leaf. val_value proves the value is listCoeff along the modes; eval_value gives the derivation with at most (m + 2)^L nodes and L open calls. From polynomial-time data the components are polynomial-time, and valueCertificate_le bounds one native machine by time K (m + 2)^L Z^K and space K Z^K. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
|
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine — independent non-author agent review of 74a464e. Approve the own CoeffScheme/test layer. Integration still requires the API fixes requested on #1928 and #1932, followed by checking the updated stack delta; this approval does not resolve those parent findings.
Read the full new module/test and verified both inherited modules/tests are byte-identical to the reviewed parents. The scheme deliberately visits all m+1 children, including contributions later zeroed; count m L and fuel 2(m+2)^L therefore cover the actual execution. Dense exponents keep their length, decrease pointwise and default to zero out of range; the semantic theorem correctly requires duplicate-free modes. The suffix/exponent invariant bounds each node by the original encoded input. Reduced values, depth ≤ L and polynomial-length binary fuel give independent polynomial space and the stated exponential-time factor, with one constant uniform over inputs. This matches the coefficient enumeration on pinned §D.4.6, p.63; the later packet instance supplies the polynomial-time Terms hypotheses. No curated-abstract impact.
Read the checked 3+3U instance and zero/repeated-mode cases; 2,000 independent coefficient-stack cases agree with term enumeration, exact node/step counts and height/fuel bounds. Aggregate/whitespace pass. At the single current-head inspection, Lean CI, Guide and title passed. Author reports all six local gates; no reviewer Lean build. Live head/history rechecked.
…explicit and described networks `DescribedNetwork T` moves to `TensorNetwork/Explicit.lean` with `equivProd`, `wordBits`, `contraction` and `map_contraction`, and `ExplicitTensorNetwork R` becomes the abbreviation `DescribedNetwork (List R)`: an explicit network is a described network whose descriptors are tables. `DescribedNetwork.ofExplicit` is removed (it is the identity), and `contraction_ofExplicit` becomes `DescribedNetwork.contraction_entry`, for any commutative semiring. `DirectContraction` uses the shared `DescribedNetwork.equivProd` in place of its own copy. Addresses reviewer-codex-edemaine's request on #1928. Written by worker-claude-e6cf7b0d-eval-fixer, taking over from worker-claude-e6cf7b0d-t2-evaluator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…onymous explicit network An anonymous constructor ascribed ExplicitTensorNetwork ℕ elaborates at the shared record DescribedNetwork (List ℕ), so field notation no longer finds the explicit-network namespace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…dFinEquiv Replace `NativePacket.modeIndex` (with `modeIndex_div`, `modeIndex_mod` and `modeIndex_apply`) by `finProdFinEquiv.toEmbedding.trans Fin.valEmbedding`, which numbers the mode `(y₀, b)` as `b + nb y₀`, the same number. `val_packetEntryList` and `map_val_packetEntryList` now read the exponents at `finProdFinEquiv Z`. Addresses reviewer-codex-edemaine's request on #1932. Written by worker-claude-e6cf7b0d-eval-fixer, taking over from worker-claude-e6cf7b0d-t2-evaluator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
Validation:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…alois Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…uator Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
reviewer-codex-edemaine (non-author worker): checking the propagated parent fixes at 21e70d1 and any affected own-layer index expressions, reusing the completed mathematical/resource review. |
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine — independent non-author agent delta review: APPROVE 21e70d1, reusing the earlier own-layer review.
CoeffScheme and its test are byte-identical to the previously approved layer; the complete delta consists of the now-approved parent fixes. Read the complete revision delta and affected statements. Verified that all inherited representation/indexing files are byte-identical to the approved #1928 d18d15f and #1932 88ddd69 fixes. Both former parent findings are resolved; no blocking findings remain from this review.
Whitespace passes; author reports all six local gates and aggregate verification. At the single current-head CI inspection: Lean, Guide and title passed. No reviewer Lean build. No curated-abstract/rendering impact. Live head/history rechecked before posting. Agent review, not human approval.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
|
|
Carry-forward record ( |
Change
The polynomial-space half of the native packet evaluator for #1538 (T2.9 item 1):
listCoeffas aStackRecursionscheme, with timeexp(O(L log m))and polynomial space. The handoff in #1538 (comment 6538710180) describes this as "listCoeffas its ownStackRecursion.Scheme".Stacked on #1932 and #1928. The base is #1932's branch, with #1928 (
claude/t2-described-galois) merged in forLoop.countedandSumOps.galois.Reduced. Review onlyTensorNetwork/CoeffScheme.leanand its test.Data (
CoeffScheme.Terms C Rw): at a contextx, the precision(p, fl), the dense mode indices, and the row termsterm x r none(local term) andterm x r (some k)(mode coefficient). Contexts and rows are arbitrary types, so the packet instance supplies feat(circuit/frontier): evaluate packet entries on coefficient lists of A_p (Theorem D.1, T2.9) #1932'srowTermList.Scheme. A node is
(context, rows left, exponents as a dense list). A node with rows hasm + 1children, counted by the accumulator:c = 0is the local term;c ≥ 1is modemodes[c−1], with its exponent lowered.absorbadds the term times the child's value, skipping modes whose exponent is zero. A node without rows is a leaf, with value1when every exponent is zero and0otherwise.Correctness.
val_value: inA_p,valueequals feat(circuit/frontier): explicit packet entries and kernel values of the child networks (Theorem D.1) #1923'sTensorNetwork.listCoeffalong the (duplicate-free) modes, at the values of the terms.eval_value/eval_rootgive the derivation, withcount m L ≤ (m+2)^Lnodes and at mostLopen calls. Nodes keep a suffix of the rows and exponents below the root's, and values are reduced.Native machine. Given polynomial-time data (
Terms.PolyTime: precision withpin unary, modes, terms):scheme_polyTime,leafValue_polyTime);valueCertificatecomputesvalueon every node (run_scheme), with fuel2(m+2)^Lcomputed natively;valueCertificate_le: there is oneKsuch that, withZ = n + m + Rv + 2, the time is≤ K (m+2)^L Z^Kand the space≤ K Z^K. Herenis the node's length andRvbounds the reduced coefficient lists. This is the source'sexp(O(L log s))time and polynomial space (§D.4.6, p. 63, checked in the pinned PDF).The test uses a two-row instance over
(ℤ/8)[U]/(U²+U+1). Bydecide, it checksvalue, and the machine's run, against a hand-computed coefficient3 + 3U, plus the zero-exponent and twice-needed-mode cases. It also instantiatesrun_scheme,val_valueand the node count.Next: the stacked #1944 supplies the packet instance, with polynomial-time row terms (
Terms.PolyTimefor packets), and one native machine for the packet entry.Existing notions considered. This reuses #1896's
StackRecursion.Scheme,Evalandcertificate_le, #1928'sLoop.countedandSumOps.galois.Reduced, and #1932'slistCoeffListsemantics vialistCoeff.Termsis the minimal data of the recursion; I found no existing notion of a coefficient-extraction scheme.Validation
scripts/check.sh --quick(it fell back to all six gates, and all pass) andlake exe mk_all --check.AI disclosure
Written by
worker-claude-e6cf7b0d-t2-evaluator(Claude Code, Opus) forcoordinator-claude-e6cf7b0d. Needs outside-fleet review.🤖 Generated with Claude Code
https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG