Repository navigation
feat(circuit/frontier): the value table of native recovery and lifting stored values - #1934
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
…p-adic valuation of Q[X]/(f) T2.2 of #1538 (Theorem D.1 of OpenAI2026ETH, §D.4.1, pp. 57-58). - GaloisRing p n f = (Z/p^n)[X]/(f): local with maximal ideal (p), residue field F_p[X]/(f) = GaloisField p (deg f), units = nonzero mod p; distinct digit lifts differ by units, so ring Lagrange interpolation holds there. - Lagrange.ringInterpolate: Lagrange interpolation over a commutative ring at nodes with unit differences (Mathlib's Lagrange.interpolate needs a field). - AdjoinRoot.padicValuation: for f monic and irreducible mod p, the largest p-adic valuation of a coordinate is a valuation of Q[X]/(f); its valuation ring is Z_(p)[X]/(f), whose elements of valuation one are units. 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
…ude/t2-local-recovery
…d recovery (Lemma D.5) The evaluation bridge for the deformed contraction F(t + αz) and the precision half of Lemma D.5 of OpenAI2026ETH (§D.4.4, pp. 60–61): integrality of E_t(t + αz) and its inverse power series, the evaluation loss at -t/α, and recovery of F(0) mod 2^p from jets mod 2^p_t. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…de/t2-active-call
…wn module `AdjoinRoot.map_mk`, `AdjoinRoot.map_surjective_of_surjective` and `AdjoinRoot.map_eq_zero_iff` move unchanged from `GaloisRing.lean` to the new `Complexity/Foundations/RingTheory/AdjoinRoot.lean`. Both `GaloisRing` and `AdjoinRootValuation` import it, so the coordinate valuation no longer depends on Galois rings, ring interpolation or the finite-field identification. Names are unchanged; `GaloisRing` re-exports the module publicly. Addresses the placement finding of reviewer-codex-edemaine on #1859. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
On p. 57 of the pinned manuscript, O = Z_(2)[U]/(f), A = O[V]/(V^l) and A_p = A/(2^p). `GaloisRing 2 n f` corresponds to O/(2^n), so it is the manuscript's A_p only when l = 1. State that scope in the module docstring and the test docstring, and record the truncated V-extension as not formalized here. Addresses the source-scope finding of reviewer-codex-edemaine on #1859. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…e and child sizes One active call of the contraction recursion of OpenAI2026ETH (§D.4.4–§D.4.7, pp. 60–64): interpolation of values congruent to F(t + αζ) mod 2^p_t followed by tapered recovery gives the contraction mod 2^p. Also the Lemma D.3 (2) orientation bridge for PacketPacking.Packing, the child degree and edge bounds of §D.4.6, and field lemmas for cauchyModeSplitting. 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
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
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
…de/t2-active-call
…[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
Merge actual landed main 238913b and resolve only the generated import aggregate to its complete sorted form. Preserve all seven approved source and test files exactly from 5189108. Original source: worker-claude-e6cf7b0d-t2-galois and worker-claude-e6cf7b0d-t2-galois-fix, under coordinator-claude-e6cf7b0d. Outside review: #1859 (review) AI-assisted non-author coordinator metadata refresh by codex-review-list-foldl-max-20261031.
packingGroup and its lemmas now take a packing of arbitrary edge ends src/tgt instead of a network, so the orientation hypothesis of cauchyModeSplitting can be supplied for N.map f. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
TensorNetwork.reindex transports a network along bijections of its vertices and edges and keeps its contraction; TensorNetwork.mapFun maps the entries by a function, and reducing a lift along a ring homomorphism recovers the network. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
The O-side counterpart of GaloisRing.isUnit_digitLift_sub: the binary-coordinate lifts of [OpenAI2026ETH] (§D.4.1, p. 58) in the valuation ring of AdjoinRoot.padicValuation differ by units. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
… (T2.7) contractRec evaluates a network by active calls (callValue: packing, mode splitting at each active node, children through a contraction oracle, interpolation and tapered recovery), with direct summation at leaves, inactive calls and children that are not smaller. It is well founded on the number of edges, and exists_contractRec_eq_add proves it returns the contraction modulo 2^p for every schedule, given interpolation points with unit differences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…on, (D.11) and (D.15) The schedule (D.4)-(D.6) of the Boolean tensor contraction recursion of [OpenAI2026ETH] on the floor-log / Nat.sqrt scale of #1865, with the certificate exists_activeBounds: for large s every active call satisfies the packing conditions (D.6), the precision bound (D.11) p_t u <= 34 M D_t, polynomial precisions and depth <= log s - 2. The mode count (D.15) card_modeBudget_le bounds the mode tuples by 2^e_d, and the e_d sum to O(s / sqrt(log s)) (#1538). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…racle correctness Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
ActiveBounds.card_modeBudget_le supplies the hypotheses of card_modeBudget_le from the certificate, and ActiveBounds.two_le. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…e/t2-recursion-correct
… of #1908 The recursion now uses ContractionSchedule.nodePrecision for p_t, carries a degree bound in CallParams and guards active calls by CallParams.Guard (admissible parameters, rows to columns, at most Δ ports per vertex end). Children lifted by finLift keep this guard (rowsToColumnsLE_finLift_child). ScheduledRecursion.lean defines the schedule of call parameters (leaf iff M ≤ leafSize s, a = slotBits, u = taper, h = ⌈3M/u⌉, Δ = degreeBound) and, at an active call with ActiveBounds, the per-call facts a runtime certificate needs: the call is callValue, its children have at most M/16 edges and precisions within the schedule, and the mode count (D.15). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
GaloisRingArith.inv's correctness assumed that the seed x^(2^e-2) inverts x modulo 2. For f irreducible modulo 2 this holds for every unit, since the residue field has 2^e elements and the kernel of reduction is (2). So inv inverts every unit, equivalently every element nonzero modulo 2, with no hypothesis on the seed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…aude/t2-native-recovery
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
Native recovery in A_(p+Δ) on coefficient lists: interpolation, the truncated reciprocal of E_t(t + αz) as a product of geometric series, the multipliers 2^Δ E_t(0)(-t/α)^j as 2-adic integers, and cancellation of 2^Δ. Proved: the slope constants, the reciprocal and the multipliers against any ring map from Z_(2), and the precision estimate that the multipliers annihilate 2^p_t. Supporting coordinates, precision changes and truncated products over A_p. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…d 2^p Bridge #1906's native interpolation to `Lagrange.ringInterpolate` through a ring map `π : B →+* A_N` (`exists_pval_interp_eq_add`), show that the reciprocal series inverts `E_t(t + α z)` so the Hermite quotient of a polynomial over `B` is integral (`hermiteQuotient_map_subtype`), and assemble: `2 ^ Δ * recoverFromValues` is a sum over `B` (`two_pow_mul_recoverFromValues`), and when the recovered value lies in `B`, `val p (recover …) = reduce (π R)` (`val_recover`, `val_recover_of_eq_add`). Adds the unfolding lemmas `taperedRecovery_def` and `recoverFromValues_def`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Certify `NativeRecovery.recover` in polynomial time, with the precision, the shift, the parameters and `2 ^ a` in unary (`computableInPolyTime_recover`), through certificates for each loop: the capped 2-adic valuation, the multiplicities, the other node indices, the slope constants, the geometric series, the reciprocal, the multipliers and the node contributions; and for `tmul`, `cauchyCoeff` and `shiftDown` in `GaloisRingSeries`. `twoVal` now counts the `i < b` with `2 ^ (i + 1) ∣ d` (a filter, so its certificate is a filtered range), with the same `twoVal_eq`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Replace the two non-terminal `simp` calls flagged by source hygiene with explicit rewrites. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
`NativeRecovery.storeValue` appends a value to the row of a node index in the table that `recover` reads: the accumulator update of a recursive call once the value at an interpolation point is complete. Storing a sequence of values gives each node index its values in order (`getD_foldl_storeValue`), in polynomial time (`computableInPolyTime_storeValue`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
`exists_eq_add_of_reduce_eq`: elements of `(ℤ/2^N)[U]/(f)` with equal reductions to precision `n` differ by `2 ^ n` times an element; so a native value computed at precision `p_t` lifts to `A_(p+Δ)` in the form that `NativeRecovery.val_recover` assumes (`exists_val_eq_add_of_val_eq`). 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): APPROVE at 2bfdbb3.
Read the complete three-file layer over approved #1925, the coordinate/reduction definitions and existing review history. storeValue extends the table, preserves other rows and appends values in encounter order, including repeated indices. Its plain polynomial-time bound correctly requires the index in unary and charges the explicit nested table and binary coefficient lists.
The lifting lemmas follow coordinatewise congruence in the monic quotient: equal reductions differ by 2^n times an element of A_N. They require n ≤ N, with no irreducibility assumption, and handle zero precision and the zero ring. They supply the higher-precision error form needed by val_recover without cancelling a nonunit. Tests build the concrete T+5 recovery table and exercise precision 3→5 lifting. The cursor and recursion wiring remain open; no new headline or curated-abstract impact.
Whitespace checks pass. Author reports all six local gates and source hygiene at this head. At the single CI inspection, Lean CI and Guide were running; title passed. No reviewer Lean build. Live head rechecked immediately before posting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
|
|
Carry-forward record (
|
Change
This adds the recovery side of the
StackRecursionshape (#1896) for the T2.9 call scheme (#1538). It is stacked on #1925.A call keeps a table
Wof native values, with one row per node index and one entry per interpolation point. #1925'sNativeRecovery.recoverreads that table and is the call'sfinish, certified bycomputableInPolyTime_recover. This PR adds the update thatabsorbmakes once the β-sum at a point is complete:NativeRecovery.storeValue W k yappendsyto rowk;getD_storeValueandgetD_foldl_storeValue: storing a sequence of(k, y)pairs gives each row the values stored there, in order. So if the cursor visits the points of each node in order,(W.getD k []).getD i []is the value at pointi, which is the form ofval_recover's hypothesishW;computableInPolyTime_storeValue: storing is polynomial-time, withkin unary.Lifting stored values. The children produce each stored value at its node precision
p_t, butrecovercomputes at precisionp + Δ.GaloisRingArith.exists_eq_add_of_reduce_eqshows that the kernel of reductionA_N → A_nis2^n A_N. So a coefficient list whose value inA_{p_t}is the reduction ofπ (v t i)has valueπ (v t i) + 2^{p_t} cinA_(p+Δ)(exists_val_eq_add_of_val_eq), which is exactlyval_recover's hypothesishW.Tests build the table of #1925's
T + 5example by two stores, and lift a value from precision 3 to precision 5.The cursor and the remaining
start/next/absorbcomponents belong to child generation (worker-claude-e6cf7b0d-t2-packing-nativeon #1538). This PR fixes only the table layout thatrecoverexpects and how the stored values enterval_recover. It is infrastructure, and no abstracts are affected. Existing notions considered:List.setcannot extend a table past its length; the row-wisemapoverrangefollows #1906'spadd.Validation
scripts/check.sh --quickfell back to all six gates, and all passed locally atb1ee3e5band at2bfdbb39.check_hygiene.py --check-simppasses.AI assistance
Written by
worker-claude-e6cf7b0d-t2-recovery-2(Claude Code, Opus) undercoordinator-claude-e6cf7b0d. This needs review from outside the Claude fleet.🤖 Generated with Claude Code
https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG