You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Formalize Appendix D: recursive tensor contraction and the sharper Theorem 1.1 bound for #k-SAT #1538
Opened by coordinator-claude-c4b0c164-20261023 at Samuel's request. This is a follow-up to #1226, which is complete. Status: available.
Goal. Formalize the manuscript's sharper bound, Theorem 1.1, which Appendix D proves by recursive Boolean tensor contraction:
#F in (n+m)^{O_k(1)} · 2^{O_k(n log log n / √log n)};
2^{O_{k,D}(n / √log n)} when m ≤ Dn.
Today CountingNativeEndpoint proves the §6.4 bound ρ(n) = n (log log n)² / √log n.
Content (manuscript revised 25 October 2026; check every locator against the pinned openai/math commit before citing, per #1072):
Theorem D.1 (Boolean tensor contraction). The network is a bipartite multigraph with one bit per edge. It has at most Cs edges and maximum degree at most ⌈s^{9/10}⌉. Its entries lie in (ℤ/2^{P₀})[V]/(V^ℓ). Contraction takes (s+L)^{O(1)} 2^{O(s/√log s)} time and polynomial space.
D.3 (arbitrary density): built on the §5–6 parity tests, which are already merged.
D.4 (the proof): Cauchy deformation of the wire identifications, tapered Hermite recovery driven by 2-adic valuations, mode counting, and a recursion over wires with polynomial space.
New work: 2-adic and Galois-ring arithmetic, and a recursive runtime with polynomial space.
Endpoint. Prove the sharper rate natively, upgrade the catalogue abstract "OpenAI: the Exponential Time Hypothesis is false" so it states Theorem 1.1, and restate satExponent, ¬ETH and ¬SETH with the stronger counter.
Scope note (coordinator-claude-e6cf7b0d, Samuel's decision 2026-10-30): #1326's optional M5, counting over general tensor networks, is folded into this issue. #1326 is closed. Cover it in this issue's M0 design together with the sharper #k-SAT bound.
M0 design: Theorem D.1 (Boolean tensor contraction), first for ℓ = 1 (worker-claude-e6cf7b0d-hpv-tensor, Claude Code, Opus). I claim the ℓ = 1 contraction theorem for #1833. The general-ℓ statement and the sharper #k-SAT bound stay open here, and this design is meant to extend to them.
Source: the manuscript at the pinned revision openai/math@7ef5c0cc (OpenAI2026ETH). I checked every locator below in that PDF.
What the source proves and what Lean already has
Theorem D.1 (§D.1, p. 53).
Network. A bipartite Boolean tensor network with at most Cs edges and maximum degree at most ⌈s^{9/10}⌉. It has polynomially many vertices, and description length L.
Entries. In (ℤ/2^{P₀})[V]/(V^ℓ) with 1 ≤ P₀, ℓ ≤ Cs. Each entry is computable in time (s+L)^b 2^{A s^{9/10}} and space (s+L)^b.
Conclusion. The contraction is computable in (s+L)^{O(1)} 2^{O(s/√log s)} bit operations and (s+L)^{O(1)} space.
The proof is §D.4, pp. 57–64.
The openai/math Lean development does not contain Theorem D.1.lean/docs/378.md at the pinned commit scopes the Lean proof to the n (log log n)² / √log n rate. It names the sharper Theorem 1.1 bound as the manuscript's alone. I found no Appendix D material in lean/OAI/Algorithms/SubexponentialSAT/, so this port has no Lean guide. The math will be original formalization work, following the manuscript.
T1 (#1833) supplies the network layer, on branch claude/boolean-tensor-networks:
Cslib.Circuits.Frontier.TensorNetwork, the weighted form of the frontier constraint network on the same Frontier.Multigraph, with its contraction;
subdivision by equality tensors;
bipartiteness;
explicit tables (ExplicitTensorNetwork) and the write-out theorem;
the 0–1 bridge from Frontier.Network.
This answers the #950 reconciliation asked for when #1326's M5 was folded in. A #CSP or Boolean network in D.2 form is a TensorNetwork of indicator and equality tensors. The circuit compiler networks are 0–1 instances.
Proof structure, mapped to milestones
Each milestone is a PR of at most about 1.5k lines with a concrete test. Statements use plain computability.
T2.1: deformed contraction (§D.4.3, (D.7)–(D.8), p. 59).
Split the vertices by side. Give each edge a row bit Y_e and a column bit X_e.
For any port-identification matrix W, define F(W) = ∑_{X,Y} A(Y) B(X) ∏_e l_{Y_e}((W X)_e), and prove F(1) = Z.
Define the Cauchy kernel W_{xy}(T) = C(T) / (C'(0)(T − (y − x))) on the grid S = {−L, …, L−1}. Prove that W(0) = I and that W(t) is supported on y − x = t.
This is pure algebra over a commutative ring and ℚ[T]. Started: see below.
T2.2: the coefficient ring (§D.4.1, pp. 57–58).
O = ℤ_(2)[U]/(f), with f monic of degree e = 4⌈log s⌉ and irreducible mod 2, and A_p = O/2^p, a Galois ring.
Elements that are nonzero mod 2 are units, and v₂(xy) = v₂(x) + v₂(y) on K = ℚ[U]/(f).
The 2^e binary-coordinate lifts of residue-field elements have unit differences, so Lagrange interpolation holds over A_p.
A deterministic search finds f.
Mathlib has GaloisField, AdjoinRoot, IsLocalRing and Polynomial.Irreducible. Only the 2-adic valuation on K and the lift arguments are new.
T2.3: Lemma D.4, integral local coordinates (p. 59).
W(t + αz) has entries in O[z], where α = 2^{a+1} and S is a complete residue system mod 2^{a+1}.
Recover F(0) mod 2^p from truncated jets of F(t + αz) mod 2^{p_t}, with node multiplicities q_t = h·max(0, u − v₂(t)) that vary from node to node.
Prove the valuation estimate v₂(E_t(0)) ≥ −6Dh.
Reuse:Port OpenAI's ETH refutation (subexponential #k-SAT) natively into complexitylib #1226's Foundations/Data/Polynomial/HermiteInterpolation.lean (Polynomial.taylorJet, eq_zero_of_taylorJet_eq_zero, eval_zero_eq_of_taylorJet) handles a uniform multiplicity J. The tapered case needs the CRT form (D.9) with variable q_t. I propose generalizing that file to multiplicities J : Fin Q → ℕ instead of adding a parallel interpolation API.
T2.5: Lemma D.3, packing into packets (pp. 58–59).
Derandomized labels in [r]^a by conditional expectations, and packets of L slots, with properties (1)–(3).
This is a self-contained combinatorial lemma with a polynomial-time construction.
T2.6: modes and the child identity (§D.4.5–D.4.6, (D.12)–(D.16), pp. 62–64).
Expand the crossing terms geometrically. Bound the coefficient of a mode monomial by 2^{∑ w_Z β_Z}.
Prove the exact factorization F(t + αζ) ≡ ∑_β ∏_g Z_{g,β} (mod 2^{p_t}) over child networks.
Bound children by < M/8 edges and degree by ≤ Δ. Count tuples as in (D.15).
The children are TensorNetworks on {v // group v = g} ⊕ Packet, so they stay in T1's type.
T2.7: the recursion, its parameters and correctness (§D.4.2 (D.4)–(D.6), §D.4.4 (D.11), §D.4.7 p. 64).
Fix the parameter schedule u_d, a_d, L, D_arr, H.
Prove the precision bound (D.11), and correctness by induction from the leaves.
Count calls: exp(O(s/√λ)) in total.
T2.8: the native algorithm.
A depth-first implementation with an explicit stack.
Certify time (s+L)^{O(1)} 2^{O(s/√log s)} and polynomial space (see below).
T2.2–T2.5 are independent of each other and can run in parallel with T2.1. T2.6 needs T2.1, T2.3 and T2.5. T2.7 needs everything before it.
Proposed input contract (T2.9, consumed by E1)
Input.(P, r, d) with d : ExplicitTensorNetwork ℕ. Its rows are vertices 0, …, r−1 and its columns the rest.
Output.d.contraction % 2 ^ P, correct on every input. Over ℕ this is the ZMod (2^P) contraction of the residues.
Space. At most K (|input| + 1)^K on every input. The fallback is direct summation, which is already polynomial-space.
Time. At most K (|input|+1)^K 2^{K m / √log m}, where m = max(d.numEdges, 2), on inputs that meet a decidable guard:
every edge has exactly one row port and one column port;
d.maxDegree ≤ ⌈m^{9/10}⌉;
P ≤ C m;
every table has length 2^{deg}.
K depends only on C.
Producer.TensorNetwork.subdivide followed by toExplicit gives this rows-first form. The bipartition is part of the input, so the algorithm never has to 2-colour.
The note's Lemma 1.2 (degree O(log s), P = O(s)) is then a corollary, for all large s and by direct summation below that.
#1226 certified its native subexponential bound with GenericRAM.NativeCertificate (Computability/GenericRAM/Native/Certificate.lean): a finite multi-tape machine within input-dependent time and workspace bounds. These are composed through Native/Combinators.lean (prod, branch, post, clocked iterate), the streaming folds IndexFold and BooleanFold, and ExhaustiveCountFallback, the guard-plus-exhaustive fallback that absorbs small instances. T2 uses the same layer:
Leaves and small s:BooleanFold over 2^{#edges} assignments with a streaming product of table lookups. This is the first native PR, and it is also the fallback in the input contract.
Galois-ring arithmetic mod 2^p in the basis 1, U, …, U^{e−1}: polynomial-time certificates from the existing PolyTime.Nat.Binary primitives.
The recursion: an explicit stack of frames, each holding a call's packets, interpolation node and value, mode tuple and partial sums, run by NativeCertificate.iterate. Per step the time is polynomial. The step count is the number of calls times a polynomial, which is exp(O(s/√λ)) by T2.7. The space is the stack depth O(log λ) times a polynomial frame.
Enumerating mode tuples with polynomial delay (§D.4.5, p. 63): a mixed-radix successor under the weight budget, reusing the IndexFold pattern.
As in CountingNativeEndpoint, the endpoint fixes the machine and all constants before the input is given.
Existing notions considered
Frontier.Network and Frontier.Multigraph: reused (T1).
Cslib.Multigraph, given by ends : E → Sym2 V: not used. Subdivision needs the two named ends that Frontier.Multigraph provides.
Logic.PL.CSP: a CSP is a factor graph whose variables may occur in many constraints. A tensor network is the case where every variable has exactly two ports, and D.2's equality trees convert between them. A weighted CSP and its bridge can come with D.2. It is not needed for ℓ = 1.
Polynomial.taylorJet and the Hermite matrix: generalized, not duplicated (T2.4).
GaloisField, AdjoinRoot, padicValRat, Lagrange.interpolate: reused in T2.2–T2.4.
Scale and limits
This issue's opening estimate is 6–12k lines of mathematics plus 10–30k lines of runtime. ℓ = 1 removes the V^ℓ truncation bookkeeping but none of §D.4. I'll land T1 and T2.1, then hand off a precise state on this issue. T2.2–T2.5 are good parallel claims for other workers.
Handoff: T2 (Theorem D.1, ℓ = 1) (worker-claude-e6cf7b0d-hpv-tensor, Claude Code, Opus). I am stopping. The work is available for other workers, and the coordinator routes it.
TensorNetwork.map and contraction_map: reducing integer entries modulo 2^P is a ring map.
affineFactor, deformedContraction and deformedContraction_one (F(1) = Z).
cauchyGrid, cauchyKernel and its values on the grid, natDegree_cauchyKernel (2L − 1), cauchyMatrix with cauchyMatrix_eval_zero (W(0) = I), and eval_zero_deformedContraction_cauchyMatrix.
Next steps, in the order of the M0 above. T2.2–T2.5 are independent of each other.
T2.2, the Galois ring (§D.4.1).
Take A_p := AdjoinRoot (f.map (Int.castRingHom (ZMod (2^p)))), with f ∈ ℤ[X] monic of degree e, coefficients in {0, 1}, and irreducible mod 2.
Prove that A_p is local with maximal ideal (2) and residue field GaloisField 2 e, so that elements nonzero mod 2 are units.
Prove that differences of distinct 0/1-coordinate lifts are units, so Lagrange.interpolate applies.
For v₂ on K = ℚ[U]/(f), use the minimum coordinate padicValRat. Multiplicativity comes from O/2 being a field.
Keep O implicit where possible: the proofs mostly need "integral" as "all coordinates have nonnegative 2-adic valuation".
T2.3, Lemma D.4. For t ∈ S and α = 2^{a+1}, the polynomial cauchyKernel L d composed with t + αz has 2-integral coefficients. It is divisible by 2 unless d = t. This is ℚ-polynomial arithmetic with padicValRat. Apply it entrywise to cauchyMatrix and to the deformedContraction from T2.1.
T2.4, Lemma D.5.
Generalize Foundations/Data/Polynomial/HermiteInterpolation.lean from a uniform J to multiplicities J : Fin Q → ℕ. Its clients are ReplacementCounting, StagedJetArithmetic and Rational/Runtime/HermiteCramer, so keep the uniform case as a specialization.
Then prove the CRT form (D.9) and the valuation bound (D.10), v₂(E_t(0)) ≥ −6Dh.
T2.5, Lemma D.3: packing by conditional expectations. It is self-contained.
T2.6–T2.9: these follow the M0. The children are TensorNetworks on {v // group v = g} ⊕ Packet. The algorithm is a stack machine certified with GenericRAM.NativeCertificate. The first native PR should be the direct-summation leaf and fallback over ExplicitTensorNetwork, using BooleanFold and ExhaustiveCountFallback. That is useful on its own as the small-s case of the contract.
Open interface question for #1833 E1. The M0 proposes rows-first (P, r, d) with output d.contraction % 2^P. E1 has not yet confirmed it.
Claiming T2.4, Lemma D.5 (tapered Hermite recovery) (worker-claude-e6cf7b0d-t2-hermite, Claude Code, Opus), for #1833. Branch claude/t2-hermite-multiplicities, based on main: node-varying multiplicities in Foundations/Data/Polynomial/HermiteInterpolation.lean, the Chinese-remainder form (D.9) and the valuation bound (D.10). (D.10) concerns the rational number E_t(0), so I state it with padicValRat 2 and need nothing from T2.2's valuation on K.
reviewer-codex-edemaine: #1854 review has clean mathematical/API coverage; the remaining request is to label a shortened source sentence as a paraphrase. No new proof review is needed after that description-only correction.
It adds uniqueness, hermiteBasis and hermiteQuotient, and the Chinese-remainder form (D.9) in scaled coordinates T = t + αz: eval_eq_sum_hermiteBasis_mul_hermiteQuotient.
The uniform taylorJet and hermiteMatrix API is unchanged, so no client changes.
It gives the exact v₂(E_t(0)) = ∑_{i<j≤a} 2^(a−j)(j−i)(m j − m i) and the bound ≥ −6h·2^(a−i) (neg_le_padicValRat_eval_zero_hermiteBasis_taper).
E_t(0) is rational, so this uses padicValRat and needs nothing from T2.2.
Remaining for Lemma D.5. These are the precision steps on p. 61, and they need T2.2's integrality on K/A:
E_t(t + αz) has integral coefficients and constant term 1, so its truncated reciprocal, and hence hermiteQuotient, is integral when F(t + αz) is.
Evaluating at −t/α loses at most 4M(a+1) powers of two.
Assembly: F(0) mod 2^p from the jets mod 2^{p_t}, with p_t = p + 8hD_t + 8M(a+1).
The interface is hermiteQuotient s t J α i P, which takes the local jet P = F(t + αz) as a power series. hermiteQuotient_trunc shows that only its first J i coefficients matter. I'm stopping here; this is available after T2.2 lands.
reviewer-codex-edemaine: #1859 review requests an explicit ℓ=1/coefficient-ring source mapping and extraction of the shared AdjoinRoot reduction helpers. Mathematical coverage is clean; review only those fixes and affected imports next.
T2.5 and T2.8 status (worker-claude-e6cf7b0d-t2-packing, Claude Code, Opus).
T2.5, Lemma D.3: feat(combinatorics): packing edges into packets by conditional expectations (Lemma D.3) #1857, ready for outside review. It provides Cslib.PacketPacking.packing: labels chosen by conditional expectations, and an injective placement of the edges into packets of 2^a slots, oriented by the slot digits. Under (D.6) it has at most 3M/L packets and at most 2M/r ports per symbol, coordinate and side. The Lemma 4.5 greedy pass is generalized to any averaging score (greedyLabelPassBy) and reused, not duplicated. The source's polynomial-time bound for the construction is not certified yet.
Contract input encoding (ExplicitTensorNetwork.encContractionInput, for E1 and H3). The input is (P, r, d), rows first:
P in unary;
r, the number of row vertices (vertices 0, …, r−1), in binary;
d: its number of edges in unary, then its list of vertices. Each vertex is the pair of its port list and its table, both lists of binary numbers.
In Lean: encPair encUnary (encPair encNat encExplicitNetwork), with encExplicitNetwork = encOfEquiv equivProd (encPair encUnary (encList (encPair (encList encNat) (encList encNat)))). The output d.contraction % 2^P is binary (encNat). The unary P and edge count make the fallback polynomial-space on every input.
GaloisRing p n f is local with maximal ideal (p), and its residue field is GaloisField p (deg f). Its units are exactly the elements that are nonzero mod p.
Distinct digit lifts differ by units.
Lagrange.ringInterpolate gives Lagrange interpolation over a commutative ring at nodes with unit differences. Mathlib's Lagrange.interpolate needs a field, which A_p is not.
AdjoinRoot.padicValuation is v₂ on K = ℚ[U]/(f) as a Mathlib Valuation, so it is multiplicative. Its valuation ring is O, and elements of O that are nonzero mod 2 are units of O.
T2.8 status (worker-claude-e6cf7b0d-t2-direct, Claude Code, Opus): #1862 is ready for outside review at a96527eae4fb802da1723ca1437937180de85403, still stacked on #1844.
Direct summation modulo 2^P now has explicit bounds on every input, with m edges and input length n:
directContractionCertificate_bounds: time (2^m + 1)·T with T polynomial, and polynomial space;
exists_directContractionCertificate_le: one K with time ≤ K(n+1)^K 2^m and space ≤ K(n+1)^K;
exists_computableInO_contraction_mod: the plain ComputableInO form.
Precision in binary. E1's ContractionAlgorithm (#1865) takes P in binary, while the contract above had it in unary. directContractionBinaryCertificate bridges the two. It computes d.contraction % 2^P on encPair encNat (encPair encNat encExplicitNetwork), with the same bounds. A large binary P is capped at the encoded length |d| of the network, because d.contraction < 2^|d| (contraction_lt_two_pow_length).
The bound proof is a generic BooleanFold.certificate_bounds, which also replaces the counting-only proof in ExhaustiveCountFallback.
Next (T2.9). Branch to directContractionBinaryCertificate on leaves and small sizes, where 2^m fits the 2^(K s/√⌊log₂ s⌋) budget.
T2.6 status and T2.7 handoff (worker-claude-e6cf7b0d-t2-recursion, Claude Code, Opus). T2.6 is up for review in two stacked PRs. I did not start T2.7 code; it is available, with the plan below. I'm stopping now.
kernelValue_eq_sum is the geometric expansion (D.12) in any ℤ_(2)-algebra with 2^p = 0.
cauchyModeSplitting is the splitting of the Cauchy matrix at T = t + αζ, for a packing oriented in coordinate i = v₂(t). Its modes are (packet, tile, b), of weight b + 1.
deformedContraction_cauchyValueMatrix_eq_sum is (D.16) for the Cauchy matrix itself.
T2.7, next steps (§D.4.2 (D.4)–(D.6), §D.4.4 (D.11), §D.4.7; pp. 58, 61, 64).
Evaluation bridge. For tensors in a subring B ⊇ ℤ_(2), show that the image of F(t + αz) ∈ B[z] (feat(circuit/frontier): Lemma D.4, integral local coordinates of the Cauchy kernel #1867, deformedContraction_cauchyMatrix_comp_mem_liftsRing) under reduction followed by z ↦ ζ is deformedContraction along cauchyValueMatrix κ ζ. Use map_localKernel together with deformedContraction_map.
Claiming the #k-SAT application of Appendix D (worker-claude-e6cf7b0d-thm11, Claude Code, Opus; branch claude/thm11-fixed-density). Theorem D.1 for ℓ = 1 is now on main as CountingSimulation.fastContractionAlgorithm (#1995).
What is proved today.CountingNativeEndpoint.exists_modelCounter k: one machine counts the models of every width-k formula in time 2^(A·n (log log (n+16))² / √log(n+16)) · poly(L) and polynomial space, where n is the number of variables. This is the §6.4 scale ρ(n). not_ETH, not_SETH and satExponent_eq_zero use it.
What Theorem 1.1 claims (p. 2 of the pinned paper.txt, openai/math@7ef5c0cc):
time (n+m)^{O_k(1)} 2^{O_k(n log log n / √log n)} and polynomial space, for every input;
time (n+m)^{O_{k,D}(1)} 2^{O_{k,D}(n / √log n)} when m ≤ Dn.
How Appendix D gets each bound.
The fixed-density bound is §D.2 (p. 54). It uses clause tensors, equality trees, and one subdivision, then Theorem D.1 with ℓ = 1, P₀ = n + 1 and s = n + m. Everything it needs is on main.
The general bound is §D.3 (pp. 54–57). It uses Lemma D.2, which applies Theorem D.1 with truncation order ℓ = n + 1, over (ℤ/2^p)[V]/(V^ℓ). main has Theorem D.1 only for ℓ = 1, so this needs the general-ℓ contraction first.
Plan for this lane: the fixed-density bound, M1.
An explicit rows-first bipartite clause network for a CNF. It has one vertex per clause, and an equality chain with subdivision vertices per variable, so the degree is at most max k 4. It has 3·(#literal occurrences) edges.
Its contraction is φ.modelCount.
It is admissible for fastContractionAlgorithm.
It is built in polynomial time.
The counter. For each k, one machine computes modelCount on width-k formulas in time 2^(A·(m+1)/√⌊log₂(n+2)⌋) · poly(L) and polynomial space. When m ≤ Dn, this is Theorem 1.1's 2^{O_{k,D}(n/√log n)}.
Existential-constant check: A depends only on k. The √log divisor is explicit in the time function, so no constant can absorb it.
not_ETH/not_SETH and the catalogue abstract stay unchanged. The general bound, meaning general ℓ in Theorem D.1 plus Lemma D.2, stays open here.
#k-SAT application, M1: the fixed-density bound is up as #2029 (worker-claude-e6cf7b0d-thm11, Claude Code, Opus; head cdd9f296c). All six gates pass locally. It needs outside-fleet review. I'm stopping here.
ContractionCounting.exists_modelCounter k: one machine computes modelCount on width-k formulas in time 2^(A(m+1)/√⌊log₂(n+2)⌋)·poly(L) and polynomial space.
exists_modelCounter_fixedDensity k: for m ≤ Dn that is 2^(A_D(n+1)/√⌊log₂(n+2)⌋)·poly(L), which is Theorem 1.1's fixed-density bound (p. 2). The time function and the polynomial degree are fixed before D.
The route is §D.2 (p. 54). ClauseNetwork.clauseNetwork is an explicit rows-first network with equality chains: degree at most max k 4, 3N edges, and contraction equal to modelCount. It is built in polynomial time and contracted by fastContractionAlgorithm.
not_ETH, not_SETH and the abstract are unchanged. The PR notes that the abstract could gain a fixed-density headline.
What remains for Theorem 1.1 (locators checked in the pinned paper.txt):
The single algorithm (p. 57, last paragraph of §D.3). This is small and independent of the rest. Branch on m ≤ n·⌈log₂⌈log₂ n⌉⌉:
otherwise, run CountingNativeEndpoint.exists_modelCounter.
This gives one machine with the ρ(n) bound on every input and the n/√log n bound for m ≤ Dn. The work is the comparison (nν + 1)/√⌊log₂(n+2)⌋ = O(interpolationScale n).
Claiming the paper's single algorithm (p. 57, handoff item 1) and the endpoint restatement (handoff item 5) — worker-claude-e6cf7b0d-thm11-2, Claude Code, Opus; branch claude/thm11-single-algorithm, stacked by merge on #2029.
One machine branches on m ≤ n⌈log₂⌈log₂ n⌉⌉: below the threshold it runs #2029's contraction counter, above it the §6.4 counter. The target is a single time function with the ρ(n) bound on every input, the n log log n / √log n bound when m ≤ n⌈log₂⌈log₂ n⌉⌉, and the n / √log n bound when m ≤ Dn. The not_ETH/not_SETH statements and the catalogue abstract stay unchanged. Theorem D.1 for general ℓ is not part of this claim.
M0 (design only): Theorem D.1 for truncation order ℓ, in the form Lemma D.2 needs (worker-claude-e6cf7b0d-thm11-2, Claude Code, Opus). This is a proposal for the next claim. I'm not claiming it and haven't built anything. Locators are checked in the pinned paper.txt.
What Lemma D.2 needs from Theorem D.1 (pp. 54–56; the application is on p. 56):
size s = nν, O(s) wires and 2J = O(n^{1/4}) vertices;
degree at most n^{3/4} λ^{O(1)} ≤ ⌈s^{9/10}⌉;
entries in (ℤ/2^p)[V]/(V^ℓ), with p = ℓ = n + 1;
entries computed by procedures, in 2^{λ^{O(1)}} time and polynomial space.
Tables would have 2^{n^{3/4}…} entries, which breaks Theorem 1.1's polynomial-space claim. So there are two gaps, not one.
fastContractionAlgorithm takes explicit ℕ tables (ExplicitAdmissible), with degree at most C⌊log₂ s⌋ and ℓ = 1.
The recursion behind it is already more general:
its guard allows degree up to degreeBound m, which is at least m^{9/10};
its vertices are descriptors (VertexDesc = List ℕ ⊕ PacketDesc);
the math layer (Recursion, TaperedRecovery) is generic over a ℚ-algebra K and a subring B.
The native layer is fixed to coefficient lists of A_p = (ℤ/2^p)[U]/(f), where f is FastContraction.modulus m.
Gap 1: roots given by entry procedures (milestone E1, the larger one).
Add a descriptor case for input vertices: a procedure, given as a native certificate, that returns a coefficient list over A_{P₀} for the root's modulus.
It is read at higher precisions through canonical lifts, as packet vertices already are (§D.4.1, p. 58).
The contract outputs the A_P contraction as a coefficient list. It takes time (s+L)^{O(1)} 2^{O(s/√log s)} and polynomial space, under Theorem D.1's hypotheses (p. 53): ≤ Cs edges, degree ≤ ⌈s^{9/10}⌉, polynomially many vertices, P₀ ≤ Cs, entry time (s+L)^b 2^{A s^{9/10}} and entry space (s+L)^b.
The main work is the leaf and resource analysis (FastLeaves, FastAnalysis) with the entry certificate's cost, plus root well-formedness. fastContractionAlgorithm then becomes the case of table entries.
Gap 2: truncation order ℓ, by evaluation and interpolation (milestone E2, built on E1). This avoids threading V through the native layer.
Lift. Lift the entries to (ℤ/2^P)[V] with degree below ℓ. The untruncated contraction Z̃ has degree at most (ℓ−1)k, where k is the number of non-isolated vertices, so k ≤ 2Cs. The contraction over B is Z̃ mod V^ℓ, by contraction_map along (ℤ/2^P)[V] → B. Multiply in the scalars of isolated vertices directly in B.
Evaluate. Evaluate V at (ℓ−1)k + 1 binary-coordinate points of A_P, whose differences are units. Since deg f ≥ 4⌊log₂ m⌋ + 2, there are more than m^4 such points, enough for large s. Smaller s uses direct summation. Each evaluation is an E1 contraction whose entries are A_P coefficient lists computed by Horner's rule.
Interpolate.GaloisRingInterpolation.interp (pval_interp) returns Z̃'s coefficients; keep those below ℓ.
Cost.O(s²) contractions run one after another, which keeps polynomial space.
Why not generalize the ring. The paper handles V coordinatewise inside the recursion (§D.4.1, p. 58). Doing that here would change the representation in GaloisRingArith, CoeffScheme, PacketEvaluator, NativeRecovery, NativeCall and the FastContraction* modules, although the mathematics would not change. The evaluation route leaves the certified recursion untouched. It is our own route, not the paper's, and the PR should say so.
After E1 and E2 (out of scope for this M0):
Lemma D.2 itself: high-incidence branching, degree arrays, binomial index wires (D.3), and Möbius-inversion test entries;
#950 / #1326 M5. E1 and E2 reuse TensorNetwork, DescribedNetwork and VertexDesc; they add no parallel definition family.
Open questions for the claimant.
E1's entry procedure becomes a parameter of the machine: one machine per entry certificate, with constants depending only on its bounds, as Theorem D.1 says. Confirm that this fits the ContractionAlgorithm interface, or add a sibling interface.
E2 needs E1's contract to expose the modulus f, so that callers can build A_P entries.
Single algorithm: up as #2032, and I'm stopping here (worker-claude-e6cf7b0d-thm11-2, Claude Code, Opus). #2032 is at head 873b569c9, stacked by merge on #2029, and needs outside-fleet review.
What it proves.DensityBranchCounting.exists_modelCounter k: one machine with one time function satisfies three bounds:
2^{O(ρ(n))}·poly on every formula;
2^{O(n⌈log₂⌈log₂ n⌉⌉/√log n)}·poly when m ≤ n⌈log₂⌈log₂ n⌉⌉;
2^{O_D(n/√log n)}·poly when m ≤ Dn.
It is the single algorithm of p. 57, with the §6.4 counter as its dense branch.
Endpoint (item 5). The every-input bound is still ρ(n), so restating satExponent, not_ETH or not_SETH from this counter would give the same statements. I added no companions. The abstract is untouched; the PR body notes that it could gain a headline.
Claim: E2, Theorem D.1 at truncation order ℓ (worker-claude-e6cf7b0d-d1-general, Claude Code, Opus; branch claude/e2-truncation-order). This builds on the M0 in comment 6543617181. I'm not touching E1.
What truncation order ℓ means. An entry is a list of natural numbers: its coefficients of 1, V, V², …. The contraction is computed in B_{P,ℓ} = (ℤ/2^P)[V]/(V^ℓ) (Theorem D.1, p. 53), and the output is its ℓ coefficients in [0, 2^P):
noncomputabledefcoeffPoly (c : List ℕ) : ℕ[X] := ∑ i ∈ range c.length, C (c.getD i 0) * X ^ i
noncomputabledefDescribedNetwork.polyContraction (entry : T → List Bool → List ℕ)
(G : DescribedNetwork T) : ℕ[X] :=
G.contraction fun t bs => coeffPoly (entry t bs)
noncomputabledefDescribedNetwork.truncContraction (entry : T → List Bool → List ℕ) (P ℓ : ℕ)
(G : DescribedNetwork T) : List ℕ :=
(List.range ℓ).map fun j => (G.polyContraction entry).coeff j % 2 ^ P
A congruence lemma shows that the value depends only on the entries' images in B_{P,ℓ}, that is, their coefficients below ℓ modulo 2^P. So this is the B_{P,ℓ} contraction through canonical lifts, as in §D.4.1 (p. 58).
The interface I'm aiming at. Here n is the encoded length of the input (P, ℓ, r, G). P and ℓ are in unary; since both are at most D s this only changes the polynomial factor.
structureTruncatedContractionAlgorithm {T : Type} (encT : T ↪ List Bool)
(entry : T → List Bool → List ℕ) (Admissible : ℕ → ℕ → ℕ × DescribedNetwork T → Prop) where
certificate : NativeCertificate
(fun x : ℕ × ℕ × ℕ × DescribedNetwork T => x.2.2.2.truncContraction entry x.1 x.2.1)
(encPair encUnary (encPair encUnary (encPair encNat (encDescribed encT)))) (encList encNat)
bound : ∀ C D : ℕ, ∃ K : ℕ, ∀ s P ℓ r G, 2 ≤ s → 1 ≤ P → P ≤ D * s → 1 ≤ ℓ → ℓ ≤ D * s →
Admissible C s (r, G) →
certificate.time (P, ℓ, r, G) ≤ K * (n + 1) ^ K * 2 ^ (K * s / Nat.sqrt (Nat.log 2 s)) ∧
certificate.space (P, ℓ, r, G) ≤ K * (n + 1) ^ K
It comes from an ℓ = 1 interface over A_P = (ℤ/2^P)[U]/(f), which is E1's target. That interface would be one certificate out : ℕ × ℕ × DescribedNetwork T → List ℕ (with P in unary) where val P (modulus G.numEdges) (out (P, r, G)) is the contraction of the entries' values in A_P, with the same bound shape. The modulus is FastContraction.modulus m, which answers the M0's open question: callers can build A_P entries.
Route. This is our own route, not the paper's: the paper carries V through the recursion (§D.4.1, p. 58).
Cut each entry to its first ℓ coefficients. polyContraction then has degree at most (ℓ−1)k, where k is the number of vertices.
Take N = (ℓ−1)k + 1 binary-digit points ζ_i of A_P. They have unit differences when N ≤ 2^{deg f}. specNet P ℓ fl ζ G keeps the ports and replaces each entry by its Horner value at ζ (peval). Its A_P contraction is polyContraction evaluated at ζ.
Contract each specialized network, interpolate with GaloisRingArith.interp, and read the constant coordinates of the first ℓ coefficients.
When N > 2^{deg f}, use direct summation in A_P at the larger modulus modulus N, with the existing DescribedNetwork.contractionCertificate at SumOps.galois. This happens only for bounded s when admissibility gives s ≤ m and k ≤ C s.
Scope and limits.
The degree bound counts all vertices, so admissibility needs k = O(s). That holds for Lemma D.2 (2J vertices) and for the fixed-density network. Theorem D.1 allows polynomially many vertices; reaching that would mean splitting off the isolated vertices and multiplying their scalars in B.
This round: the correctness layer, meaning steps 1–3 and the engine interpContract proved equal to truncContraction at every irreducible modulus with enough points. If the native certificate and the time/space transfer don't fit, I'll post a precise handoff.
E2 status and handoff (worker-claude-e6cf7b0d-d1-general, Claude Code, Opus). I'm stopping here. E2 is partly done: correctness and a native machine are in review, but the time/space bound and the assembly are open. Both PRs need outside-fleet review, #2037 first.
In review
feat(Frontier/TensorNetwork): contraction at truncation order ℓ by evaluation and interpolation #2037 (head 6559c0287): correctness. DescribedNetwork.truncContraction entry P ℓ G is the B_{P,ℓ} contraction, and truncContraction_congr shows it depends only on the entries' images in B_{P,ℓ}. interpContract core fl P ℓ r G specializes the network at (ℓ−1)k+1 digit points of A_P, contracts each with core, and interpolates. interpContract_eq proves it equals truncContraction whenever f is irreducible mod 2, there are enough residues, and core is correct on those inputs.
engineCertificate_le — the loop's resource bound. Suggested statement: there is K such that, for every input y and all bounds R, Q, Yb, if every k < pointCount satisfies cc.time (coreInput y k) ≤ R, cc.space (coreInput y k) ≤ Q and |enc (core (coreInput y k))| ≤ Yb, then
time ≤ (N+1)·(K(|y| + N·Yb + 1)^K + R);
space ≤ K(|y| + N·Yb + 1)^K + Q.
The template is exists_computableInO_modSum (CountingSimulation/Accumulate.lean). State the bound on the fields of IndexFold.certificate, using maxRoundTime_le and maxRoundSpace_le, and not as a fresh ComputableInO. Two facts are needed:
the state after j rounds is at most |y| + j·(Yb + O(1)) long;
|coreInput y k| is polynomial in |y|, since specNet copies (P, ℓ, fl, ζ) into every vertex.
specEntryCertificate bound. Its time is ce.time + poly(|q| + |entry|); the fallback needs this.
Interfaces and assembly. These are the statements in my claim comment above, TruncatedContractionAlgorithm and the A_P interface.
The A_P interface should take encCore's input (P, fl, r, G'). Its correctness must hold when fl = FastContraction.modulus G'.numEdges, and its bound has the ContractionAlgorithm shape. E1 provides it, with the specialized descriptors SpecDesc T and specEntryCertificate as the entry procedure.
Assembly: branch on pointCount ℓ G ≤ 2 ^ (modulus m).length. If yes, use engineCertificate with E1's core at fl = modulus m; if no, use truncDirectCertificate. On admissible inputs (s ≤ m, k ≤ C s, ℓ ≤ D s), the first branch is taken once s ≥ s₀(C, D), because C D s² + 1 ≤ 2^{4⌊log₂ m⌋}. Below s₀, direct summation costs 2^{C s₀}·poly.
Limitation. The degree bound counts every vertex, so admissibility needs k = O(s). That holds for Lemma D.2 and for the fixed-density network. To allow polynomially many vertices, split off the isolated vertices and multiply their scalars in B_{P,ℓ}.
Not started: E1, Lemma D.2, and the arbitrary-density proof.
Claim: E2 handoff items 1–2 (cost bounds), and the assembly if E1's interface is ready (worker-claude-e6cf7b0d-d1-general-2, Claude Code, Opus; branch claude/e2-cost, stacked by merge on #2039). This continues the handoff in comment 6543960163.
engineCertificate_le: the loop's time and space from per-point bounds on the core.
A cost bound for specEntryCertificate.
TruncatedContractionAlgorithm and the branch on pointCount ≤ 2 ^ deg(modulus m). If E1 (worker-claude-e6cf7b0d-d1-entries) hasn't fixed its A_P interface by then, I'll state the assembly against a hypothesis on the core and say so here.
Claim and design: E1, root tensors given by entry procedures (worker-claude-e6cf7b0d-d1-entries, Claude Code, Opus; branch claude/e1-entry-procedures). This follows the M0 in comment 6543617181 and is shaped for E2 (comment 6543748490, handoff 6543960163). I'm not touching Truncated.lean or TruncatedPolyTime.lean. Locators below are checked in the pinned paper.txt.
What Theorem D.1 asks of the entries (p. 53). For every vertex and every Boolean choice of its ports, the entry is computable from the description in time (s+L)^b 2^{A s^{9/10}} and space (s+L)^b, with degree at most ⌈s^{9/10}⌉. The recursion keeps every original tensor implicit and reads it from its original description at each later precision through its canonical lift (§D.4.1, p. 58; §D.4.6, p. 63). A leaf sums directly over at most 2^H assignments with polynomially many entry evaluations each, at cost poly(s+L)·exp(O(H) + O(s^{9/10})) (§D.4.7, p. 64).
The interface (new module Frontier/TensorNetwork/EntryContraction.lean). An entry procedure is a descriptor type T with an encoding encT, a function entry : T → List Bool → List ℕ returning an A_P coefficient list, and a native certificate ce of entry on encPair encT encBits. This is the same shape as the evaluator of DescribedNetwork.contractionCertificate (#1928), and DescribedNetwork T is reused unchanged.
/-- ⌈s ^ (9/10)⌉: the least `x` with `s ^ 9 ≤ x ^ 10`. -/defceilNineTenths (s : ℕ) : ℕ
/-- The input `(P, fl, r, G)`: `P` in unary, the modulus, `r` in binary, the network. -/
abbrev encEntryInput (encT : T ↪ List Bool) : ℕ × List ℕ × ℕ × DescribedNetwork T ↪ List Bool :=
encPair encUnary (encPair (encList encNat) (encPair encNat (DescribedNetwork.encDescribed encT)))
/-- Theorem D.1's hypotheses with one constant `C` (for `C`, `A`, `b`), where `L` is the encodedlength of `G`: rows first; `s ≤ m ≤ C s` edges; degree ≤ ⌈s^{9/10}⌉; every entry within time`C (s + L + 1) ^ C 2 ^ (C ⌈s^{9/10}⌉)` and space `C (s + L + 1) ^ C`. -/defEntryAdmissible (ce : NativeCertificate (fun q : T × List Bool => entry q.1 q.2)
(encPair encT encBits) (encList encNat)) (C s : ℕ) (G : ℕ × DescribedNetwork T) : PropstructureEntryContractionAlgorithm (encT : T ↪ List Bool) (entry : T → List Bool → List ℕ)
(Admissible : ℕ → ℕ → ℕ × DescribedNetwork T → Prop) where
core : ℕ × List ℕ × ℕ × DescribedNetwork T → List ℕ
certificate : NativeCertificate core (encEntryInput encT) (encList encNat)
/-- Correct on every input at the modulus `FastContraction.modulus m`. -/
val_core : ∀ P r G, val P (modulus G.numEdges) (core (P, modulus G.numEdges, r, G)) =
G.contraction fun t bs => val P (modulus G.numEdges) (entry t bs)
/-- The `ContractionAlgorithm` bound shape on admissible inputs. -/
bound : ∀ C D : ℕ, ∃ K, ∀ s P r G, 2 ≤ s → 1 ≤ P → P ≤ D * s → Admissible C s (r, G) →
certificate.time (P, modulus G.numEdges, r, G) ≤ K * (n + 1) ^ K * 2 ^ (K * s / √⌊log₂ s⌋) ∧
certificate.space (P, modulus G.numEdges, r, G) ≤ K * (n + 1) ^ K
The E1 endpoint is then ∀ ce, EntryContractionAlgorithm encT entry (EntryAdmissible ce): one machine per entry certificate, with K depending only on C and D, as Theorem D.1 says.
Match with E2. At T := SpecDesc T₀ and encT := encSpecDesc encT₀, encEntryInput is literally #2039's encCore encT₀, so core plugs into engineCertificate core cc with cc := certificate. val_core is the hypothesis hcore of interpContract_eq at fl = modulus m, which is the modulus the assembly uses. E2's admissibility only has to imply EntryAdmissible (specEntryCertificate entry ce) C' s (r, specNet …); the specialized network has the same ports and edges, and its entry cost is ce.time + poly. Entry outputs need no separate size condition, because a native certificate's space bound already charges the encoded output.
How the recursion consumes it (the real work).
Generalize VertexDesc to VertexDesc T := T ⊕ PacketDesc, with VertexDesc.entry entry and entryCertificate ce, and thread T/entry through Call, scheme, value, StepCorrect, stepCorrect_nativeMk and leafCertificate. Explicit networks become T = List ℕ with the table lookup, so fastContractionAlgorithm keeps its statement. Retained root vertices keep their descriptor and are read through val p fl, which is already the canonical lift of §D.4.1.
The root takes (P, r, G) with P in unary and no cap: the cap at the encoded length is only valid for natural-number tables.
The leaf bound gains the entry cost: poly(n)·2^M·(packet factor + E). ceilNineTenths s ≤ degreeBound s = O(s^{9/10}), and that is o(s/√log s), so the analysis (FastSizes, FastLeaves, FastAnalysis) carries over with the leaf exponent changed.
Narrowings, the same as ExplicitAdmissible's:
s ≤ m. It is harmless: a caller can pad with disjoint edges whose row tensor is [x = 0] and column tensor 1, which leaves the contraction unchanged.
The vertex count is not bounded separately, since n already bounds it. E2 needs k = O(s) for its point count, but that stays in E2's predicate.
This round. First, the interface PR: EntryAdmissible, EntryContractionAlgorithm, and the all-input direct-summation core with its correctness and resource bound (the fallback branch and small-s case), plus a checked admissible instance. Then the VertexDesc T generalization. I'll post a handoff for whatever of the root and analysis remains.
E1 status and handoff (worker-claude-e6cf7b0d-d1-entries, Claude Code, Opus). The interface and the direct-summation layer are up for review as #2042 (head 5cd05f4df). The subexponential instance is not started, and I'm stopping here. The plan below is precise enough to claim.
#2042 provides (in Frontier/TensorNetwork/EntryContraction.lean):
EntryContraction.directCore ce: direct summation over A_P with an entry procedure. It is correct on every input. Its time is (2^m(k+1)+1)(K(n+ES+1)^K + 2E) on every input, and K(n+1)^K 2^{Ks} on admissible inputs. This is the fallback branch of the instance.
ceilNineTenths (⌈s^{9/10}⌉), with ceilNineTenths_le_degreeBound and exists_mul_ceilNineTenths_le: from some s₀(A) on, A⌈s^{9/10}⌉ ≤ s/√⌊log₂ s⌋. That is the leaf-budget fact.
exists_entryAdmissible_of_isPolynomial, and tables as the entry procedure tableEntry (tableEntryCertificate).
Why generic descriptors. E2 feeds networks over SpecDesc T₀. A List ℕ payload with a root evaluator cannot serve it: the evaluator would have to decode arbitrary codes, and a native certificate must be correct on every input. So the recursion has to become generic in the root descriptor type.
E1.2: generic root descriptors in the recursion. This is infrastructure: about 28 files and 500 mechanical sites. No statement on main changes.
VertexDesc.lean.
abbrev VertexDesc (T : Type) := T ⊕ PacketDesc and VertexDesc.enc (encT) := encSum encT encPacketDesc.
entry (ev : T → List Bool → List ℕ) : VertexDesc T → List Bool → List ℕ. Keep ev before the descriptor so d.entry ev bs works as dot notation.
entryCertificate ce: use NativeCertificate.option on getLeft?. The body is ce after (q, t) ↦ (t, q.2); the fallback is the packet evaluator on getRight?.getD default. This needs an Inhabited PacketCtx instance (PacketTerms.lean).
entryCertificate_le gains, for .inl t, the root's time and space as hypotheses E/ES. Get the output length from ce.computes: ComputableInO charges |enc out| ≤ c(space+1).
Move tableEntry and tableEntryCertificate here from EntryContraction, and keep val_entry_inl as the table lemma.
NativeChild, ChildEntries, DescribedLift, NativeCall. These are mechanical: VertexDesc → VertexDesc T, d.entry bs → d.entry ev bs, and defaultVertex := ([], .inr default). Their correctness proofs read .inl only through val/liftO; val_entry_inl is used only in FastContractionMachine.
FastContraction and FastContractionStep. These become Call T, leafValue ev, scheme ev mk, value ev mk, StepCorrect ev mk WF and val_value. nativeMk uses no entry, and stepCorrect_nativeMk holds for every ev.
Polynomial-time and size modules. These are NativeChildPolyTime, FastContractionPolyTime, FastContractionSize/Shape/Schedule/Derivation and NativeChildBounds. They become generic in encT, since descriptors are only copied. scheme_nativeMk_polyTime holds for every ev, because Scheme.PolyTime does not involve the leaf.
FastContractionMachine and FastContractionLeaf.
leafCertificate ce.
rootNet : DescribedNetwork T → DescribedNetwork (VertexDesc T).
leafCertificate_le gains the root costs: time K(n+R+ES+1)^K 2^M ((R+2)^Λ + E). Tables recover the present bound from tableEntryCertificate_isPolynomial.
CountingSimulation.Fast* specializes to T = List ℕ, ev = tableEntry, so fastContractionAlgorithm keeps its statement.
E1.3: the instance ∀ ce, EntryContractionAlgorithm encT entry (EntryAdmissible ce). This is the remaining mathematics (resource analysis).
Machine. On (P, fl, r, G), with P in unary and no cap (the cap at the encoded length is valid only for ℕ tables):
guard fl = modulus m, rows-first, and degree ≤ degreeBound m;
run scheme entry nativeMk from ((m, 0, m+1, P, fl, r), rootNet G) with clock fuel at m + P;
on a value tagged 0, output it; otherwise, and when the guard fails, output directCore ce.
Correctness is val_value plus wf_root.
Guard on admissible inputs. Degree ≤ ⌈s^{9/10}⌉ ≤ degreeBound s ≤ degreeBound m, using s ≤ m and the monotonicity of degreeBound, which needs a two-line lemma. So admissible inputs at fl = modulus m always pass, unlike the explicit case.
Analysis. Generalize FastSizes, reach_facts, FastLeaves and FastAnalysis from ExplicitAdmissible + capPrecision to EntryAdmissible + unary P. They use only s ≤ m ≤ Cs, the guard, P ≤ Ds and sizes.
The new ingredient is the leaf: E ≤ C(s+L+1)^C 2^{C⌈s^{9/10}⌉} ≤ poly(n)·2^{s/√⌊log₂ s⌋} from s₀(C) on, by exists_mul_ceilNineTenths_le.
Retained root vertices keep their descriptor and degree, so the entry hypothesis applies at every reached leaf: the ports are renumbered, but their number is unchanged.
Limits to record. The narrowing s ≤ m is the same as ExplicitAdmissible's; padding with [x=0]/1 edge pairs removes it. Polynomially many vertices are allowed, because n bounds them. E2's k = O(s) stays in E2's predicate.
#2042 needs outside-fleet review before anything stacks on it.
Claim: E1.2, generic root descriptors in the recursion (worker-claude-e6cf7b0d-d1-generic-root, Claude Code, Opus; branch claude/e1-generic-root, based on main). This follows the E1 handoff (comment 6544159759).
Plan, as two stacked PRs:
VertexDesc T := T ⊕ PacketDesc with VertexDesc.entry ev, threaded through NativeChild, ChildEntries, DescribedLift, NativeCall, FastContraction*, NativeChild* and the polynomial-time and size modules. The leaf machine stays at T = List ℕ with the table entry, so no statement on main changes meaning.
The generic entryCertificate ce (NativeCertificate.option on getLeft?, with Inhabited PacketCtx), leafCertificate ce, and the leaf bound with the root entry cost.
I'm basing on main, not #2042, because the generalization doesn't need its interface. tableEntry and its certificate move into VertexDesc.lean as Cslib.Circuits.Frontier.tableEntry; whichever of #2042 and this lands second drops the copy in EntryContraction. I won't touch EntryContraction.lean, Truncated*.lean or the E2 files (worker-claude-e6cf7b0d-d1-general-2, #2043).
E2: cost bounds and the assembly are done. Theorem D.1 at order ℓ now waits only on E1 (worker-claude-e6cf7b0d-d1-general-2, Claude Code, Opus). I'm stopping here. Both PRs need outside-fleet review, in the order #2037 → #2039 → #2043 → #2044.
#2043 (head 59a16a84f, base #2039): resources, in TruncatedResources.lean.
engineCertificate_le. Suppose each of the N + 1 charged calls takes time ≤ R and space ≤ Q, and outputs ≤ Yb bits. Then the reduction takes time (N+1)(K(n+Yb+1)^K + R) and space K(n+Yb+1)^K + Q.
length_encCore_coreInput_le: each call's input is at most 9(n+1)² bits. pointCount_le: N ≤ n² + 1.
specEntryCertificate_le: a specialized entry costs ce plus K(|q| + |entry| + 1)^K, with K uniform over ce.
directCoreCertificate_le and truncDirectCertificate_le: direct summation costs K(n+ES+1)^K·2^m·(E+1) in time and K(n+ES+1)^K in space.
#2044 (head 105f481d0, base #2043): TruncatedAlgorithm.lean.
TruncatedContractionAlgorithm encT entry Adm, the interface from comment 6543748490.
truncGuard: (ℓ−1)k+1 ≤ 2^deg(modulus m), which is polynomial-time.
truncGuard_of_le: the guard holds once s ≥ 4(CD+1), for k ≤ Cs, s ≤ m and ℓ ≤ Ds.
TruncatedContractionAlgorithm.ofCore: the guard branches to fastTruncCertificate cc or to truncDirectCertificate.
A test instance (boundedAlgorithm) shows the interface isn't vacuous.
For E1 (worker-claude-e6cf7b0d-d1-entries).ofCore takes your planned EntryContractionAlgorithm fields as hypotheses, at T := SpecDesc T₀ and encT := encSpecDesc encT₀:
hval, your val_core;
hcore, your bound with Admissible := CoreAdm.
It also takes:
htransfer: each specNet P ℓ (modulus m) (digits _ k) G of an admissible G is CoreAdm C' s;
hshape: s ≤ m ≤ Cs and k ≤ Cs;
hentry: entries within K(L+1)^K 2^(Ks) time and K(L+1)^K space.
I checked these shapes against #2042 at 5cd05f4df. At T := SpecDesc T₀, EntryContraction.encInput (encSpecDesc encT₀) unfolds to encCore encT₀. So A.certificate, A.val_core and A.bound go straight into ofCore's cc, hval and hcore.
Next step, once #2042 and #2044 land: a one-line corollary ofEntry (A : EntryContractionAlgorithm (encSpecDesc encT₀) (specEntry entry) (EntryAdmissible (specEntryCertificate entry ce))). It needs:
a concrete truncated admissibility, namely Theorem D.1's hypotheses with k ≤ Cs;
a proof of htransfer into EntryAdmissible (specEntryCertificate entry ce), using specEntryCertificate_le. The specialized network has the same ports, edges and degree.
Still open: E1 itself, Lemma D.2, and allowing polynomially many vertices (handoff item 4).
Activity
SamuelSchlesinger commentedon Oct 30, 2026
Scope note (
coordinator-claude-e6cf7b0d, Samuel's decision 2026-10-30): #1326's optional M5, counting over general tensor networks, is folded into this issue. #1326 is closed. Cover it in this issue's M0 design together with the sharper #k-SAT bound.SamuelSchlesinger commentedon Oct 30, 2026
M0 design: Theorem D.1 (Boolean tensor contraction), first for ℓ = 1 (
worker-claude-e6cf7b0d-hpv-tensor, Claude Code, Opus). I claim the ℓ = 1 contraction theorem for #1833. The general-ℓ statement and the sharper #k-SAT bound stay open here, and this design is meant to extend to them.Source: the manuscript at the pinned revision
openai/math@7ef5c0cc(OpenAI2026ETH). I checked every locator below in that PDF.What the source proves and what Lean already has
Theorem D.1 (§D.1, p. 53).
Csedges and maximum degree at most⌈s^{9/10}⌉. It has polynomially many vertices, and description lengthL.(ℤ/2^{P₀})[V]/(V^ℓ)with1 ≤ P₀, ℓ ≤ Cs. Each entry is computable in time(s+L)^b 2^{A s^{9/10}}and space(s+L)^b.(s+L)^{O(1)} 2^{O(s/√log s)}bit operations and(s+L)^{O(1)}space.The proof is §D.4, pp. 57–64.
The openai/math Lean development does not contain Theorem D.1.
lean/docs/378.mdat the pinned commit scopes the Lean proof to then (log log n)² / √log nrate. It names the sharper Theorem 1.1 bound as the manuscript's alone. I found no Appendix D material inlean/OAI/Algorithms/SubexponentialSAT/, so this port has no Lean guide. The math will be original formalization work, following the manuscript.T1 (#1833) supplies the network layer, on branch
claude/boolean-tensor-networks:Cslib.Circuits.Frontier.TensorNetwork, the weighted form of the frontier constraint network on the sameFrontier.Multigraph, with its contraction;ExplicitTensorNetwork) and the write-out theorem;0–1bridge fromFrontier.Network.This answers the #950 reconciliation asked for when #1326's M5 was folded in. A #CSP or Boolean network in D.2 form is a
TensorNetworkof indicator and equality tensors. The circuit compiler networks are0–1instances.Proof structure, mapped to milestones
Each milestone is a PR of at most about 1.5k lines with a concrete test. Statements use plain computability.
Y_eand a column bitX_e.W, defineF(W) = ∑_{X,Y} A(Y) B(X) ∏_e l_{Y_e}((W X)_e), and proveF(1) = Z.W_{xy}(T) = C(T) / (C'(0)(T − (y − x)))on the gridS = {−L, …, L−1}. Prove thatW(0) = Iand thatW(t)is supported ony − x = t.ℚ[T]. Started: see below.O = ℤ_(2)[U]/(f), withfmonic of degreee = 4⌈log s⌉and irreducible mod 2, andA_p = O/2^p, a Galois ring.v₂(xy) = v₂(x) + v₂(y)onK = ℚ[U]/(f).2^ebinary-coordinate lifts of residue-field elements have unit differences, so Lagrange interpolation holds overA_p.f.GaloisField,AdjoinRoot,IsLocalRingandPolynomial.Irreducible. Only the 2-adic valuation onKand the lift arguments are new.W(t + αz)has entries inO[z], whereα = 2^{a+1}andSis a complete residue system mod2^{a+1}.F(t + αz) ∈ A[z].F(0) mod 2^pfrom truncated jets ofF(t + αz) mod 2^{p_t}, with node multiplicitiesq_t = h·max(0, u − v₂(t))that vary from node to node.v₂(E_t(0)) ≥ −6Dh.Foundations/Data/Polynomial/HermiteInterpolation.lean(Polynomial.taylorJet,eq_zero_of_taylorJet_eq_zero,eval_zero_eq_of_taylorJet) handles a uniform multiplicityJ. The tapered case needs the CRT form (D.9) with variableq_t. I propose generalizing that file to multiplicitiesJ : Fin Q → ℕinstead of adding a parallel interpolation API.[r]^aby conditional expectations, and packets ofLslots, with properties (1)–(3).2^{∑ w_Z β_Z}.F(t + αζ) ≡ ∑_β ∏_g Z_{g,β} (mod 2^{p_t})over child networks.< M/8edges and degree by≤ Δ. Count tuples as in (D.15).TensorNetworks on{v // group v = g} ⊕ Packet, so they stay in T1's type.u_d,a_d,L,D_arr,H.exp(O(s/√λ))in total.(s+L)^{O(1)} 2^{O(s/√log s)}and polynomial space (see below).s, by direct summation.T2.2–T2.5 are independent of each other and can run in parallel with T2.1. T2.6 needs T2.1, T2.3 and T2.5. T2.7 needs everything before it.
Proposed input contract (T2.9, consumed by E1)
Input.
(P, r, d)withd : ExplicitTensorNetwork ℕ. Its rows are vertices0, …, r−1and its columns the rest.Output.
d.contraction % 2 ^ P, correct on every input. Overℕthis is theZMod (2^P)contraction of the residues.Space. At most
K (|input| + 1)^Kon every input. The fallback is direct summation, which is already polynomial-space.Time. At most
K (|input|+1)^K 2^{K m / √log m}, wherem = max(d.numEdges, 2), on inputs that meet a decidable guard:d.maxDegree ≤ ⌈m^{9/10}⌉;P ≤ C m;2^{deg}.Kdepends only onC.Producer.
TensorNetwork.subdividefollowed bytoExplicitgives this rows-first form. The bipartition is part of the input, so the algorithm never has to 2-colour.The note's Lemma 1.2 (degree
O(log s),P = O(s)) is then a corollary, for all largesand by direct summation below that.How runtime is certified (as in #1226)
#1226 certified its native subexponential bound with
GenericRAM.NativeCertificate(Computability/GenericRAM/Native/Certificate.lean): a finite multi-tape machine within input-dependent time and workspace bounds. These are composed throughNative/Combinators.lean(prod,branch,post, clockediterate), the streaming foldsIndexFoldandBooleanFold, andExhaustiveCountFallback, the guard-plus-exhaustive fallback that absorbs small instances. T2 uses the same layer:s:BooleanFoldover2^{#edges}assignments with a streaming product of table lookups. This is the first native PR, and it is also the fallback in the input contract.2^pin the basis1, U, …, U^{e−1}: polynomial-time certificates from the existingPolyTime.Nat.Binaryprimitives.NativeCertificate.iterate. Per step the time is polynomial. The step count is the number of calls times a polynomial, which isexp(O(s/√λ))by T2.7. The space is the stack depthO(log λ)times a polynomial frame.IndexFoldpattern.As in
CountingNativeEndpoint, the endpoint fixes the machine and all constants before the input is given.Existing notions considered
Frontier.NetworkandFrontier.Multigraph: reused (T1).Cslib.Multigraph, given byends : E → Sym2 V: not used. Subdivision needs the two named ends thatFrontier.Multigraphprovides.Logic.PL.CSP: a CSP is a factor graph whose variables may occur in many constraints. A tensor network is the case where every variable has exactly two ports, and D.2's equality trees convert between them. A weightedCSPand its bridge can come with D.2. It is not needed for ℓ = 1.Polynomial.taylorJetand the Hermite matrix: generalized, not duplicated (T2.4).GaloisField,AdjoinRoot,padicValRat,Lagrange.interpolate: reused in T2.2–T2.4.Scale and limits
This issue's opening estimate is 6–12k lines of mathematics plus 10–30k lines of runtime. ℓ = 1 removes the
V^ℓtruncation bookkeeping but none of §D.4. I'll land T1 and T2.1, then hand off a precise state on this issue. T2.2–T2.5 are good parallel claims for other workers.SamuelSchlesinger commentedon Oct 30, 2026
Handoff: T2 (Theorem D.1, ℓ = 1) (
worker-claude-e6cf7b0d-hpv-tensor, Claude Code, Opus). I am stopping. The work is available for other workers, and the coordinator routes it.Landed for review
TensorNetwork.mapandcontraction_map: reducing integer entries modulo2^Pis a ring map.affineFactor,deformedContractionanddeformedContraction_one(F(1) = Z).cauchyGrid,cauchyKerneland its values on the grid,natDegree_cauchyKernel(2L − 1),cauchyMatrixwithcauchyMatrix_eval_zero(W(0) = I), andeval_zero_deformedContraction_cauchyMatrix.Next steps, in the order of the M0 above. T2.2–T2.5 are independent of each other.
A_p := AdjoinRoot (f.map (Int.castRingHom (ZMod (2^p)))), withf ∈ ℤ[X]monic of degreee, coefficients in{0, 1}, and irreducible mod 2.A_pis local with maximal ideal(2)and residue fieldGaloisField 2 e, so that elements nonzero mod 2 are units.Lagrange.interpolateapplies.v₂onK = ℚ[U]/(f), use the minimum coordinatepadicValRat. Multiplicativity comes fromO/2being a field.Oimplicit where possible: the proofs mostly need "integral" as "all coordinates have nonnegative 2-adic valuation".t ∈ Sandα = 2^{a+1}, the polynomialcauchyKernel L dcomposed witht + αzhas 2-integral coefficients. It is divisible by2unlessd = t. This is ℚ-polynomial arithmetic withpadicValRat. Apply it entrywise tocauchyMatrixand to thedeformedContractionfrom T2.1.Foundations/Data/Polynomial/HermiteInterpolation.leanfrom a uniformJto multiplicitiesJ : Fin Q → ℕ. Its clients areReplacementCounting,StagedJetArithmeticandRational/Runtime/HermiteCramer, so keep the uniform case as a specialization.v₂(E_t(0)) ≥ −6Dh.TensorNetworks on{v // group v = g} ⊕ Packet. The algorithm is a stack machine certified withGenericRAM.NativeCertificate. The first native PR should be the direct-summation leaf and fallback overExplicitTensorNetwork, usingBooleanFoldandExhaustiveCountFallback. That is useful on its own as the small-scase of the contract.Open interface question for #1833 E1. The M0 proposes rows-first
(P, r, d)with outputd.contraction % 2^P. E1 has not yet confirmed it.SamuelSchlesinger commentedon Oct 30, 2026
Claiming T2.2 and T2.3 (
worker-claude-e6cf7b0d-t2-galois, Claude Code, Opus), for #1833.claude/t2-galois-ring, based onmain.claude/t2-integral-coordinates, stacked on feat(circuit/frontier): deformed contraction and the Cauchy kernel #1845 (claude/tensor-deformed-contraction).SamuelSchlesinger commentedon Oct 30, 2026
Claiming T2.4, Lemma D.5 (tapered Hermite recovery) (
worker-claude-e6cf7b0d-t2-hermite, Claude Code, Opus), for #1833. Branchclaude/t2-hermite-multiplicities, based onmain: node-varying multiplicities inFoundations/Data/Polynomial/HermiteInterpolation.lean, the Chinese-remainder form (D.9) and the valuation bound (D.10). (D.10) concerns the rational numberE_t(0), so I state it withpadicValRat 2and need nothing from T2.2's valuation onK.SamuelSchlesinger commentedon Oct 30, 2026
Claiming T2.5 and T2.8 (
worker-claude-e6cf7b0d-t2-packing, Claude Code, Opus), for #1833.claude/t2-packing, based onmain.ExplicitTensorNetwork, rows-first(P, r, d)as confirmed by E1 on Deterministic simulation of NTIME, BPTIME and PPTIME in 2^{O(T/√log T)} via HPV blocking and tensor contraction #1833: branchclaude/t2-direct-contraction, stacked on feat(circuit/frontier): Boolean tensor networks and their contraction #1844 (claude/boolean-tensor-networks).edemaine commentedon Oct 30, 2026
reviewer-codex-edemaine: #1854 review has clean mathematical/API coverage; the remaining request is to label a shortened source sentence as a paraphrase. No new proof review is needed after that description-only correction.
SamuelSchlesinger commentedon Oct 30, 2026
T2.4 status (
worker-claude-e6cf7b0d-t2-hermite, Claude Code, Opus): two PRs are up for review.HermiteInterpolation.leanto node-varying multiplicities over a Finset of nodes with unit differences.hermiteBasisandhermiteQuotient, and the Chinese-remainder form (D.9) in scaled coordinatesT = t + αz:eval_eq_sum_hermiteBasis_mul_hermiteQuotient.taylorJetandhermiteMatrixAPI is unchanged, so no client changes.[-2^a, 2^a).v₂(E_t(0)) = ∑_{i<j≤a} 2^(a−j)(j−i)(m j − m i)and the bound≥ −6h·2^(a−i)(neg_le_padicValRat_eval_zero_hermiteBasis_taper).E_t(0)is rational, so this usespadicValRatand needs nothing from T2.2.Remaining for Lemma D.5. These are the precision steps on p. 61, and they need T2.2's integrality on
K/A:E_t(t + αz)has integral coefficients and constant term 1, so its truncated reciprocal, and hencehermiteQuotient, is integral whenF(t + αz)is.−t/αloses at most4M(a+1)powers of two.F(0) mod 2^pfrom the jetsmod 2^{p_t}, withp_t = p + 8hD_t + 8M(a+1).The interface is
hermiteQuotient s t J α i P, which takes the local jetP = F(t + αz)as a power series.hermiteQuotient_truncshows that only its firstJ icoefficients matter. I'm stopping here; this is available after T2.2 lands.edemaine commentedon Oct 30, 2026
reviewer-codex-edemaine: #1859 review requests an explicit ℓ=1/coefficient-ring source mapping and extraction of the shared AdjoinRoot reduction helpers. Mathematical coverage is clean; review only those fixes and affected imports next.
SamuelSchlesinger commentedon Oct 30, 2026
T2.5 and T2.8 status (
worker-claude-e6cf7b0d-t2-packing, Claude Code, Opus).Cslib.PacketPacking.packing: labels chosen by conditional expectations, and an injective placement of the edges into packets of2^aslots, oriented by the slot digits. Under (D.6) it has at most3M/Lpackets and at most2M/rports per symbol, coordinate and side. The Lemma 4.5 greedy pass is generalized to any averaging score (greedyLabelPassBy) and reused, not duplicated. The source's polynomial-time bound for the construction is not certified yet.directContraction (P, r, d) = d.contraction % 2 ^ Pon every input, gives polynomial-time certificates for the weight and one loop step, and builds the nativeBooleanFoldcertificate. The rest of T2.8 is to extract its explicit bounds,(2^m + 1)·polytime andpolyspace on every input, and then the unconditionalK(|input|+1)^K 2^(K m)form that E1 asked for on Deterministic simulation of NTIME, BPTIME and PPTIME in 2^{O(T/√log T)} via HPV blocking and tensor contraction #1833.Contract input encoding (
ExplicitTensorNetwork.encContractionInput, for E1 and H3). The input is(P, r, d), rows first:Pin unary;r, the number of row vertices (vertices0, …, r−1), in binary;d: its number of edges in unary, then its list of vertices. Each vertex is the pair of its port list and its table, both lists of binary numbers.In Lean:
encPair encUnary (encPair encNat encExplicitNetwork), withencExplicitNetwork = encOfEquiv equivProd (encPair encUnary (encList (encPair (encList encNat) (encList encNat)))). The outputd.contraction % 2^Pis binary (encNat). The unaryPand edge count make the fallback polynomial-space on every input.SamuelSchlesinger commentedon Oct 30, 2026
T2.2 and T2.3 are ready for review (
worker-claude-e6cf7b0d-t2-galois, Claude Code, Opus), toward #1833.main.GaloisRing p n fis local with maximal ideal(p), and its residue field isGaloisField p (deg f). Its units are exactly the elements that are nonzero modp.Lagrange.ringInterpolategives Lagrange interpolation over a commutative ring at nodes with unit differences. Mathlib'sLagrange.interpolateneeds a field, whichA_pis not.AdjoinRoot.padicValuationisv₂onK = ℚ[U]/(f)as a MathlibValuation, so it is multiplicative. Its valuation ring isO, and elements ofOthat are nonzero mod 2 are units ofO.W_d(t + αz)hasℤ_(2)coefficients, and it is divisible by 2 whend ≠ t. This also holds entrywise forcauchyMatrix.F(t + αz) ∈ B[z]for any subringBcontainingℤ_(2)and the tensor entries.Rat.padicIntegerToZModPowreducesℤ_(2)coefficients mod2^p.SamuelSchlesinger commentedon Oct 30, 2026
Claiming T2.6 and T2.7 (
worker-claude-e6cf7b0d-t2-recursion, Claude Code, Opus), for #1833.claude/t2-mode-expansion, stacked on feat(circuit/frontier): deformed contraction and the Cauchy kernel #1845. The children areTensorNetworks on{v // group v = g} ⊕ Packet, as in the M0.SamuelSchlesinger commentedon Oct 30, 2026
T2.8 status (
worker-claude-e6cf7b0d-t2-direct, Claude Code, Opus): #1862 is ready for outside review ata96527eae4fb802da1723ca1437937180de85403, still stacked on #1844.Direct summation modulo
2^Pnow has explicit bounds on every input, withmedges and input lengthn:directContractionCertificate_bounds: time(2^m + 1)·TwithTpolynomial, and polynomial space;exists_directContractionCertificate_le: oneKwith time≤ K(n+1)^K 2^mand space≤ K(n+1)^K;exists_computableInO_contraction_mod: the plainComputableInOform.Precision in binary. E1's
ContractionAlgorithm(#1865) takesPin binary, while the contract above had it in unary.directContractionBinaryCertificatebridges the two. It computesd.contraction % 2^PonencPair encNat (encPair encNat encExplicitNetwork), with the same bounds. A large binaryPis capped at the encoded length|d|of the network, becaused.contraction < 2^|d|(contraction_lt_two_pow_length).The bound proof is a generic
BooleanFold.certificate_bounds, which also replaces the counting-only proof inExhaustiveCountFallback.Next (T2.9). Branch to
directContractionBinaryCertificateon leaves and small sizes, where2^mfits the2^(K s/√⌊log₂ s⌋)budget.feat(circuit/frontier): Boolean tensor networks and their contraction (…
SamuelSchlesinger commentedon Oct 30, 2026
T2.6 status and T2.7 handoff (
worker-claude-e6cf7b0d-t2-recursion, Claude Code, Opus). T2.6 is up for review in two stacked PRs. I did not start T2.7 code; it is available, with the plan below. I'm stopping now.T2.6, ready for review
adeeddc47), stacked on feat(circuit/frontier): deformed contraction and the Cauchy kernel #1845. This is the child identity (D.16) for an abstractTensorNetwork.ModeSplitting.TensorNetworks on{v // group v = g} ⊕ P, with one edge per port of their group.deformedContraction_eq_sum_prod_contraction_child:F(W) = ∑_{β ∈ modeBudget w p} ∏_g Z_{g,β}whenπ^{w Z} ∣ coeffandπ^p = 0.05c80d0e4), stacked on feat(circuit/frontier): mode expansion and the child identity (D.16) #1876 with feat(circuit/frontier): Lemma D.4, integral local coordinates of the Cauchy kernel #1867 merged in. These are the manuscript's modes, from the Cauchy kernel.kernelValue_eq_sumis the geometric expansion (D.12) in anyℤ_(2)-algebra with2^p = 0.cauchyModeSplittingis the splitting of the Cauchy matrix atT = t + αζ, for a packing oriented in coordinatei = v₂(t). Its modes are (packet, tile,b), of weightb + 1.deformedContraction_cauchyValueMatrix_eq_sumis (D.16) for the Cauchy matrix itself.T2.7, next steps (§D.4.2 (D.4)–(D.6), §D.4.4 (D.11), §D.4.7; pp. 58, 61, 64).
B ⊇ ℤ_(2), show that the image ofF(t + αz) ∈ B[z](feat(circuit/frontier): Lemma D.4, integral local coordinates of the Cauchy kernel #1867,deformedContraction_cauchyMatrix_comp_mem_liftsRing) under reduction followed byz ↦ ζisdeformedContractionalongcauchyValueMatrix κ ζ. Usemap_localKerneltogether withdeformedContraction_map.Packingat coordinatei:groupcomes fromrowLabel/colLabelati,sym q := symbols q i, andhorientislabels_eq e i.card_edges_childtogether with Lemma D.3 (3) gives at most4M/r < M/8(feat(combinatorics): packing edges into packets by conditional expectations (Lemma D.3) #1857 proves2M/rper side).2L, by the injectivity of slots. Old degrees are unchanged.#modeBudget. There are at most6M/Dmodes of each weight (D.13):3M/Lpackets times2^{i+1}tiles.H,u_d,a_d,LandD_arras in (D.4), and prove (D.5), (D.6) and (D.11) for larges.Nat.log 2 sandNat.sqrt. Align the schedule with that.twithq_t > 0, computeF(t + αζ)atM(2L−1)+1liftsζ, using feat(circuit/frontier): modes of the Cauchy matrix and the geometric expansion (D.12) #1879.A_{p_t}, with feat(foundations): Galois rings, ring Lagrange interpolation and the p-adic valuation of ℚ[X]/(f) #1859'sLagrange.ringInterpolate.F(0) mod 2^pby Lemma D.5, then applyeval_zero_deformedContraction_cauchyMatrix(feat(circuit/frontier): deformed contraction and the Cauchy kernel #1845).F(0) mod 2^passembly, after feat(Polynomial): Hermite interpolation with node-varying multiplicities #1854/feat(Polynomial): two-adic bound for tapered Hermite basis values (D.10) #1860), which is still unclaimed.103 remaining items
feat(circuit/frontier): the contraction recursion as one native machi…
feat(circuit/frontier): the resource analysis of the native contracti…
SamuelSchlesinger commentedon Oct 31, 2026
Claiming the #k-SAT application of Appendix D (
worker-claude-e6cf7b0d-thm11, Claude Code, Opus; branchclaude/thm11-fixed-density). Theorem D.1 for ℓ = 1 is now onmainasCountingSimulation.fastContractionAlgorithm(#1995).What is proved today.
CountingNativeEndpoint.exists_modelCounter k: one machine counts the models of every width-kformula in time2^(A·n (log log (n+16))² / √log(n+16)) · poly(L)and polynomial space, wherenis the number of variables. This is the §6.4 scale ρ(n).not_ETH,not_SETHandsatExponent_eq_zerouse it.What Theorem 1.1 claims (p. 2 of the pinned
paper.txt,openai/math@7ef5c0cc):(n+m)^{O_k(1)} 2^{O_k(n log log n / √log n)}and polynomial space, for every input;(n+m)^{O_{k,D}(1)} 2^{O_{k,D}(n / √log n)}whenm ≤ Dn.How Appendix D gets each bound.
ℓ = 1,P₀ = n + 1ands = n + m. Everything it needs is onmain.ℓ = n + 1, over(ℤ/2^p)[V]/(V^ℓ).mainhas Theorem D.1 only forℓ = 1, so this needs the general-ℓ contraction first.Plan for this lane: the fixed-density bound, M1.
max k 4. It has3·(#literal occurrences)edges.φ.modelCount.fastContractionAlgorithm.k, one machine computesmodelCounton width-kformulas in time2^(A·(m+1)/√⌊log₂(n+2)⌋) · poly(L)and polynomial space. Whenm ≤ Dn, this is Theorem 1.1's2^{O_{k,D}(n/√log n)}.Adepends only onk. The√logdivisor is explicit in the time function, so no constant can absorb it.not_ETH/not_SETHand the catalogue abstract stay unchanged. The general bound, meaning general ℓ in Theorem D.1 plus Lemma D.2, stays open here.feat(Classes/CountingSimulation): NTIME, BPTIME and PPTIME in time 2^…
SamuelSchlesinger commentedon Oct 31, 2026
#k-SAT application, M1: the fixed-density bound is up as #2029 (
worker-claude-e6cf7b0d-thm11, Claude Code, Opus; headcdd9f296c). All six gates pass locally. It needs outside-fleet review. I'm stopping here.What #2029 proves.
ContractionCounting.exists_modelCounter k: one machine computesmodelCounton width-kformulas in time2^(A(m+1)/√⌊log₂(n+2)⌋)·poly(L)and polynomial space.exists_modelCounter_fixedDensity k: form ≤ Dnthat is2^(A_D(n+1)/√⌊log₂(n+2)⌋)·poly(L), which is Theorem 1.1's fixed-density bound (p. 2). The time function and the polynomial degree are fixed beforeD.ClauseNetwork.clauseNetworkis an explicit rows-first network with equality chains: degree at mostmax k 4,3Nedges, and contraction equal tomodelCount. It is built in polynomial time and contracted byfastContractionAlgorithm.not_ETH,not_SETHand the abstract are unchanged. The PR notes that the abstract could gain a fixed-density headline.What remains for Theorem 1.1 (locators checked in the pinned
paper.txt):The single algorithm (p. 57, last paragraph of §D.3). This is small and independent of the rest. Branch on
m ≤ n·⌈log₂⌈log₂ n⌉⌉:CountingNativeEndpoint.exists_modelCounter.This gives one machine with the ρ(n) bound on every input and the
n/√log nbound form ≤ Dn. The work is the comparison(nν + 1)/√⌊log₂(n+2)⌋ = O(interpolationScale n).Theorem D.1 for truncation order ℓ (p. 53): entries in
(ℤ/2^{P₀})[V]/(V^ℓ), withℓ, P₀ ≤ Cs. The ℓ = 1 pipeline (feat(circuit/frontier): Boolean tensor networks and their contraction #1844 → feat(Classes/CountingSimulation): NTIME, BPTIME and PPTIME in time 2^O(T/√log T) and polynomial space, unconditionally #1995) needs:ContractionAlgorithm/ExplicitAdmissibleover tables ofV-polynomials;A_p[V]/(V^ℓ)arithmetic in the native recursion's coefficient scheme;This is the large step.
Lemma D.2 (pp. 54–57): counting the common zeros of sparse
F₂systems. It needs:D* = max{1,⌈N₀/n⌉}⌈√λ⌉;B̄_ibuilt from Lemma 5.1'se_j;J = ⌈n^{1/4}⌉groups and degree arrays;M ≤ J² + K log₂(e(N+K)/K)(D.3);It applies (2) with
s = nνandℓ = n + 1.The arbitrary-density proof (p. 57). Apply Lemma 6.3 with
σ = 1/⌈√λ⌉, then the greedy selection of Lemmas 6.1–6.2, with Lemma D.2 as the evaluator. The §6 machinery from Port OpenAI's ETH refutation (subexponential #k-SAT) natively into complexitylib #1226 (CountingSparsification, the bounded-incidence counter) should carry most of this.Endpoint. Restate
satExponent,¬ETHand¬SETHfrom the stronger counter, and decide on the abstract (Samuel).(1) is a good next claim. (2)–(4) need an M0 design pass that reconciles with the ℓ = 1 modules before code.
SamuelSchlesinger commentedon Oct 31, 2026
Claiming the paper's single algorithm (p. 57, handoff item 1) and the endpoint restatement (handoff item 5) —
worker-claude-e6cf7b0d-thm11-2, Claude Code, Opus; branchclaude/thm11-single-algorithm, stacked by merge on #2029.One machine branches on
m ≤ n⌈log₂⌈log₂ n⌉⌉: below the threshold it runs #2029's contraction counter, above it the §6.4 counter. The target is a single time function with the ρ(n) bound on every input, then log log n / √log nbound whenm ≤ n⌈log₂⌈log₂ n⌉⌉, and then / √log nbound whenm ≤ Dn. Thenot_ETH/not_SETHstatements and the catalogue abstract stay unchanged. Theorem D.1 for general ℓ is not part of this claim.SamuelSchlesinger commentedon Oct 31, 2026
M0 (design only): Theorem D.1 for truncation order ℓ, in the form Lemma D.2 needs (
worker-claude-e6cf7b0d-thm11-2, Claude Code, Opus). This is a proposal for the next claim. I'm not claiming it and haven't built anything. Locators are checked in the pinnedpaper.txt.What Lemma D.2 needs from Theorem D.1 (pp. 54–56; the application is on p. 56):
s = nν,O(s)wires and2J = O(n^{1/4})vertices;n^{3/4} λ^{O(1)} ≤ ⌈s^{9/10}⌉;(ℤ/2^p)[V]/(V^ℓ), withp = ℓ = n + 1;2^{λ^{O(1)}}time and polynomial space.Tables would have
2^{n^{3/4}…}entries, which breaks Theorem 1.1's polynomial-space claim. So there are two gaps, not one.What
mainhas (#1995):fastContractionAlgorithmtakes explicitℕtables (ExplicitAdmissible), with degree at mostC⌊log₂ s⌋andℓ = 1.degreeBound m, which is at leastm^{9/10};VertexDesc = List ℕ ⊕ PacketDesc);Recursion,TaperedRecovery) is generic over aℚ-algebraKand a subringB.A_p = (ℤ/2^p)[U]/(f), wherefisFastContraction.modulus m.Gap 1: roots given by entry procedures (milestone E1, the larger one).
A_{P₀}for the root's modulus.A_Pcontraction as a coefficient list. It takes time(s+L)^{O(1)} 2^{O(s/√log s)}and polynomial space, under Theorem D.1's hypotheses (p. 53):≤ Csedges, degree≤ ⌈s^{9/10}⌉, polynomially many vertices,P₀ ≤ Cs, entry time(s+L)^b 2^{A s^{9/10}}and entry space(s+L)^b.FastLeaves,FastAnalysis) with the entry certificate's cost, plus root well-formedness.fastContractionAlgorithmthen becomes the case of table entries.Gap 2: truncation order ℓ, by evaluation and interpolation (milestone E2, built on E1). This avoids threading
Vthrough the native layer.(ℤ/2^P)[V]with degree belowℓ. The untruncated contractionZ̃has degree at most(ℓ−1)k, wherekis the number of non-isolated vertices, sok ≤ 2Cs. The contraction overBisZ̃ mod V^ℓ, bycontraction_mapalong(ℤ/2^P)[V] → B. Multiply in the scalars of isolated vertices directly inB.Vat(ℓ−1)k + 1binary-coordinate points ofA_P, whose differences are units. Sincedeg f ≥ 4⌊log₂ m⌋ + 2, there are more thanm^4such points, enough for larges. Smallersuses direct summation. Each evaluation is an E1 contraction whose entries areA_Pcoefficient lists computed by Horner's rule.GaloisRingInterpolation.interp(pval_interp) returnsZ̃'s coefficients; keep those belowℓ.O(s²)contractions run one after another, which keeps polynomial space.Vcoordinatewise inside the recursion (§D.4.1, p. 58). Doing that here would change the representation inGaloisRingArith,CoeffScheme,PacketEvaluator,NativeRecovery,NativeCalland theFastContraction*modules, although the mathematics would not change. The evaluation route leaves the certified recursion untouched. It is our own route, not the paper's, and the PR should say so.After E1 and E2 (out of scope for this M0):
n log log n / √log n.#950 / #1326 M5. E1 and E2 reuse
TensorNetwork,DescribedNetworkandVertexDesc; they add no parallel definition family.Open questions for the claimant.
ContractionAlgorithminterface, or add a sibling interface.f, so that callers can buildA_Pentries.SamuelSchlesinger commentedon Oct 31, 2026
Single algorithm: up as #2032, and I'm stopping here (
worker-claude-e6cf7b0d-thm11-2, Claude Code, Opus). #2032 is at head873b569c9, stacked by merge on #2029, and needs outside-fleet review.What it proves.
DensityBranchCounting.exists_modelCounter k: one machine with one time function satisfies three bounds:2^{O(ρ(n))}·polyon every formula;2^{O(n⌈log₂⌈log₂ n⌉⌉/√log n)}·polywhenm ≤ n⌈log₂⌈log₂ n⌉⌉;2^{O_D(n/√log n)}·polywhenm ≤ Dn.It is the single algorithm of p. 57, with the §6.4 counter as its dense branch.
Endpoint (item 5). The every-input bound is still ρ(n), so restating
satExponent,not_ETHornot_SETHfrom this counter would give the same statements. I added no companions. The abstract is untouched; the PR body notes that it could gain a headline.feat(FineGrained): fixed-density #k-SAT counting by tensor contraction (Theorem 1.1, D.2) #2029. I fixed its Source hygiene failure (bare
simp) in0062da138.Next. Theorem D.1 for general ℓ plus root entry procedures, then Lemma D.2; see the M0 above. Once the arbitrary-density counter exists, swapping it into feat(FineGrained): one #k-SAT counter with both bounds of Theorem 1.1 (single algorithm, p. 57) #2032's dense branch gives Theorem 1.1's full every-input bound.
SamuelSchlesinger commentedon Oct 31, 2026
Claim: E2, Theorem D.1 at truncation order ℓ (
worker-claude-e6cf7b0d-d1-general, Claude Code, Opus; branchclaude/e2-truncation-order). This builds on the M0 in comment 6543617181. I'm not touching E1.What truncation order ℓ means. An entry is a list of natural numbers: its coefficients of
1, V, V², …. The contraction is computed inB_{P,ℓ} = (ℤ/2^P)[V]/(V^ℓ)(Theorem D.1, p. 53), and the output is itsℓcoefficients in[0, 2^P):A congruence lemma shows that the value depends only on the entries' images in
B_{P,ℓ}, that is, their coefficients belowℓmodulo2^P. So this is theB_{P,ℓ}contraction through canonical lifts, as in §D.4.1 (p. 58).The interface I'm aiming at. Here
nis the encoded length of the input(P, ℓ, r, G).Pandℓare in unary; since both are at mostD sthis only changes the polynomial factor.It comes from an
ℓ = 1interface overA_P = (ℤ/2^P)[U]/(f), which is E1's target. That interface would be one certificateout : ℕ × ℕ × DescribedNetwork T → List ℕ(withPin unary) whereval P (modulus G.numEdges) (out (P, r, G))is the contraction of the entries' values inA_P, with the same bound shape. The modulus isFastContraction.modulus m, which answers the M0's open question: callers can buildA_Pentries.Route. This is our own route, not the paper's: the paper carries
Vthrough the recursion (§D.4.1, p. 58).ℓcoefficients.polyContractionthen has degree at most(ℓ−1)k, wherekis the number of vertices.N = (ℓ−1)k + 1binary-digit pointsζ_iofA_P. They have unit differences whenN ≤ 2^{deg f}.specNet P ℓ fl ζ Gkeeps the ports and replaces each entry by its Horner value atζ(peval). ItsA_Pcontraction ispolyContractionevaluated atζ.GaloisRingArith.interp, and read the constant coordinates of the firstℓcoefficients.N > 2^{deg f}, use direct summation inA_Pat the larger modulusmodulus N, with the existingDescribedNetwork.contractionCertificateatSumOps.galois. This happens only for boundedswhen admissibility givess ≤ mandk ≤ C s.Scope and limits.
k = O(s). That holds for Lemma D.2 (2Jvertices) and for the fixed-density network. Theorem D.1 allows polynomially many vertices; reaching that would mean splitting off the isolated vertices and multiplying their scalars inB.interpContractproved equal totruncContractionat every irreducible modulus with enough points. If the native certificate and the time/space transfer don't fit, I'll post a precise handoff.SamuelSchlesinger commentedon Oct 31, 2026
E2 status and handoff (
worker-claude-e6cf7b0d-d1-general, Claude Code, Opus). I'm stopping here. E2 is partly done: correctness and a native machine are in review, but the time/space bound and the assembly are open. Both PRs need outside-fleet review, #2037 first.In review
6559c0287): correctness.DescribedNetwork.truncContraction entry P ℓ Gis theB_{P,ℓ}contraction, andtruncContraction_congrshows it depends only on the entries' images inB_{P,ℓ}.interpContract core fl P ℓ r Gspecializes the network at(ℓ−1)k+1digit points ofA_P, contracts each withcore, and interpolates.interpContract_eqproves it equalstruncContractionwheneverfis irreducible mod 2, there are enough residues, andcoreis correct on those inputs.3015e73fb, stacked on feat(Frontier/TensorNetwork): contraction at truncation order ℓ by evaluation and interpolation #2037; after feat(Frontier/TensorNetwork): contraction at truncation order ℓ by evaluation and interpolation #2037 lands, retarget it tomainand mergemain):engineCertificate core ccis one native machine forinterpContract. It streams over the points withIndexFoldand callscconce per point.truncDirectCertificate ceuses direct summation overA_PatFastContraction.modulus nand computestruncContractionon every input from an entry certificatece. It is the fallback branch, and it shows the interface is not vacuous.Left for E2
engineCertificate_le— the loop's resource bound. Suggested statement: there isKsuch that, for every inputyand all boundsR,Q,Yb, if everyk < pointCountsatisfiescc.time (coreInput y k) ≤ R,cc.space (coreInput y k) ≤ Qand|enc (core (coreInput y k))| ≤ Yb, then≤ (N+1)·(K(|y| + N·Yb + 1)^K + R);≤ K(|y| + N·Yb + 1)^K + Q.The template is
exists_computableInO_modSum(CountingSimulation/Accumulate.lean). State the bound on the fields ofIndexFold.certificate, usingmaxRoundTime_leandmaxRoundSpace_le, and not as a freshComputableInO. Two facts are needed:jrounds is at most|y| + j·(Yb + O(1))long;|coreInput y k|is polynomial in|y|, sincespecNetcopies(P, ℓ, fl, ζ)into every vertex.specEntryCertificatebound. Its time isce.time + poly(|q| + |entry|); the fallback needs this.Interfaces and assembly. These are the statements in my claim comment above,
TruncatedContractionAlgorithmand theA_Pinterface.A_Pinterface should takeencCore's input(P, fl, r, G'). Its correctness must hold whenfl = FastContraction.modulus G'.numEdges, and its bound has theContractionAlgorithmshape. E1 provides it, with the specialized descriptorsSpecDesc TandspecEntryCertificateas the entry procedure.pointCount ℓ G ≤ 2 ^ (modulus m).length. If yes, useengineCertificatewith E1's core atfl = modulus m; if no, usetruncDirectCertificate. On admissible inputs (s ≤ m,k ≤ C s,ℓ ≤ D s), the first branch is taken onces ≥ s₀(C, D), becauseC D s² + 1 ≤ 2^{4⌊log₂ m⌋}. Belows₀, direct summation costs2^{C s₀}·poly.Limitation. The degree bound counts every vertex, so admissibility needs
k = O(s). That holds for Lemma D.2 and for the fixed-density network. To allow polynomially many vertices, split off the isolated vertices and multiply their scalars inB_{P,ℓ}.Not started: E1, Lemma D.2, and the arbitrary-density proof.
SamuelSchlesinger commentedon Oct 31, 2026
Claim: E2 handoff items 1–2 (cost bounds), and the assembly if E1's interface is ready (
worker-claude-e6cf7b0d-d1-general-2, Claude Code, Opus; branchclaude/e2-cost, stacked by merge on #2039). This continues the handoff in comment 6543960163.engineCertificate_le: the loop's time and space from per-point bounds on the core.specEntryCertificate.TruncatedContractionAlgorithmand the branch onpointCount ≤ 2 ^ deg(modulus m). If E1 (worker-claude-e6cf7b0d-d1-entries) hasn't fixed itsA_Pinterface by then, I'll state the assembly against a hypothesis on the core and say so here.I won't edit E1's files.
SamuelSchlesinger commentedon Oct 31, 2026
Claim and design: E1, root tensors given by entry procedures (
worker-claude-e6cf7b0d-d1-entries, Claude Code, Opus; branchclaude/e1-entry-procedures). This follows the M0 in comment 6543617181 and is shaped for E2 (comment 6543748490, handoff 6543960163). I'm not touchingTruncated.leanorTruncatedPolyTime.lean. Locators below are checked in the pinnedpaper.txt.What Theorem D.1 asks of the entries (p. 53). For every vertex and every Boolean choice of its ports, the entry is computable from the description in time
(s+L)^b 2^{A s^{9/10}}and space(s+L)^b, with degree at most⌈s^{9/10}⌉. The recursion keeps every original tensor implicit and reads it from its original description at each later precision through its canonical lift (§D.4.1, p. 58; §D.4.6, p. 63). A leaf sums directly over at most2^Hassignments with polynomially many entry evaluations each, at costpoly(s+L)·exp(O(H) + O(s^{9/10}))(§D.4.7, p. 64).The interface (new module
Frontier/TensorNetwork/EntryContraction.lean). An entry procedure is a descriptor typeTwith an encodingencT, a functionentry : T → List Bool → List ℕreturning anA_Pcoefficient list, and a native certificateceofentryonencPair encT encBits. This is the same shape as the evaluator ofDescribedNetwork.contractionCertificate(#1928), andDescribedNetwork Tis reused unchanged.The E1 endpoint is then
∀ ce, EntryContractionAlgorithm encT entry (EntryAdmissible ce): one machine per entry certificate, withKdepending only onCandD, as Theorem D.1 says.Match with E2. At
T := SpecDesc T₀andencT := encSpecDesc encT₀,encEntryInputis literally #2039'sencCore encT₀, socoreplugs intoengineCertificate core ccwithcc := certificate.val_coreis the hypothesishcoreofinterpContract_eqatfl = modulus m, which is the modulus the assembly uses. E2's admissibility only has to implyEntryAdmissible (specEntryCertificate entry ce) C' s (r, specNet …); the specialized network has the same ports and edges, and its entry cost isce.time + poly. Entry outputs need no separate size condition, because a native certificate's space bound already charges the encoded output.How the recursion consumes it (the real work).
VertexDesctoVertexDesc T := T ⊕ PacketDesc, withVertexDesc.entry entryandentryCertificate ce, and threadT/entrythroughCall,scheme,value,StepCorrect,stepCorrect_nativeMkandleafCertificate. Explicit networks becomeT = List ℕwith the table lookup, sofastContractionAlgorithmkeeps its statement. Retained root vertices keep their descriptor and are read throughval p fl, which is already the canonical lift of §D.4.1.(P, r, G)withPin unary and no cap: the cap at the encoded length is only valid for natural-number tables.poly(n)·2^M·(packet factor + E).ceilNineTenths s ≤ degreeBound s = O(s^{9/10}), and that iso(s/√log s), so the analysis (FastSizes,FastLeaves,FastAnalysis) carries over with the leaf exponent changed.Narrowings, the same as
ExplicitAdmissible's:s ≤ m. It is harmless: a caller can pad with disjoint edges whose row tensor is[x = 0]and column tensor1, which leaves the contraction unchanged.nalready bounds it. E2 needsk = O(s)for its point count, but that stays in E2's predicate.This round. First, the interface PR:
EntryAdmissible,EntryContractionAlgorithm, and the all-input direct-summation core with its correctness and resource bound (the fallback branch and small-scase), plus a checked admissible instance. Then theVertexDesc Tgeneralization. I'll post a handoff for whatever of the root and analysis remains.SamuelSchlesinger commentedon Oct 31, 2026
E1 status and handoff (
worker-claude-e6cf7b0d-d1-entries, Claude Code, Opus). The interface and the direct-summation layer are up for review as #2042 (head5cd05f4df). The subexponential instance is not started, and I'm stopping here. The plan below is precise enough to claim.#2042 provides (in
Frontier/TensorNetwork/EntryContraction.lean):EntryAdmissible ce C s (r, G)andEntryContractionAlgorithm encT entry Admissible, as designed in comment 6544003710. AtT = SpecDesc T₀the input encoding is feat(Frontier/TensorNetwork): native machine for the truncation-order reduction #2039'sencCore encT₀, andval_coreishcore.EntryContraction.directCore ce: direct summation overA_Pwith an entry procedure. It is correct on every input. Its time is(2^m(k+1)+1)(K(n+ES+1)^K + 2E)on every input, andK(n+1)^K 2^{Ks}on admissible inputs. This is the fallback branch of the instance.ceilNineTenths(⌈s^{9/10}⌉), withceilNineTenths_le_degreeBoundandexists_mul_ceilNineTenths_le: from somes₀(A)on,A⌈s^{9/10}⌉ ≤ s/√⌊log₂ s⌋. That is the leaf-budget fact.exists_entryAdmissible_of_isPolynomial, and tables as the entry proceduretableEntry(tableEntryCertificate).Why generic descriptors. E2 feeds networks over
SpecDesc T₀. AList ℕpayload with a root evaluator cannot serve it: the evaluator would have to decode arbitrary codes, and a native certificate must be correct on every input. So the recursion has to become generic in the root descriptor type.E1.2: generic root descriptors in the recursion. This is infrastructure: about 28 files and 500 mechanical sites. No statement on
mainchanges.VertexDesc.lean.abbrev VertexDesc (T : Type) := T ⊕ PacketDescandVertexDesc.enc (encT) := encSum encT encPacketDesc.entry (ev : T → List Bool → List ℕ) : VertexDesc T → List Bool → List ℕ. Keepevbefore the descriptor sod.entry ev bsworks as dot notation.entryCertificate ce: useNativeCertificate.optionongetLeft?. The body isceafter(q, t) ↦ (t, q.2); the fallback is the packet evaluator ongetRight?.getD default. This needs anInhabited PacketCtxinstance (PacketTerms.lean).entryCertificate_legains, for.inl t, the root's time and space as hypothesesE/ES. Get the output length fromce.computes:ComputableInOcharges|enc out| ≤ c(space+1).tableEntryandtableEntryCertificatehere fromEntryContraction, and keepval_entry_inlas the table lemma.NativeChild,ChildEntries,DescribedLift,NativeCall. These are mechanical:VertexDesc→VertexDesc T,d.entry bs→d.entry ev bs, anddefaultVertex := ([], .inr default). Their correctness proofs read.inlonly throughval/liftO;val_entry_inlis used only inFastContractionMachine.FastContractionandFastContractionStep. These becomeCall T,leafValue ev,scheme ev mk,value ev mk,StepCorrect ev mk WFandval_value.nativeMkuses no entry, andstepCorrect_nativeMkholds for everyev.NativeChildPolyTime,FastContractionPolyTime,FastContractionSize/Shape/Schedule/DerivationandNativeChildBounds. They become generic inencT, since descriptors are only copied.scheme_nativeMk_polyTimeholds for everyev, becauseScheme.PolyTimedoes not involve the leaf.FastContractionMachineandFastContractionLeaf.leafCertificate ce.rootNet : DescribedNetwork T → DescribedNetwork (VertexDesc T).leafCertificate_legains the root costs: timeK(n+R+ES+1)^K 2^M ((R+2)^Λ + E). Tables recover the present bound fromtableEntryCertificate_isPolynomial.CountingSimulation.Fast*specializes toT = List ℕ,ev = tableEntry, sofastContractionAlgorithmkeeps its statement.E1.3: the instance
∀ ce, EntryContractionAlgorithm encT entry (EntryAdmissible ce). This is the remaining mathematics (resource analysis).Machine. On
(P, fl, r, G), withPin unary and no cap (the cap at the encoded length is valid only for ℕ tables):fl = modulus m, rows-first, and degree≤ degreeBound m;scheme entry nativeMkfrom((m, 0, m+1, P, fl, r), rootNet G)with clockfuelatm + P;0, output it; otherwise, and when the guard fails, outputdirectCore ce.Correctness is
val_valuepluswf_root.Guard on admissible inputs. Degree
≤ ⌈s^{9/10}⌉ ≤ degreeBound s ≤ degreeBound m, usings ≤ mand the monotonicity ofdegreeBound, which needs a two-line lemma. So admissible inputs atfl = modulus malways pass, unlike the explicit case.Analysis. Generalize
FastSizes,reach_facts,FastLeavesandFastAnalysisfromExplicitAdmissible+capPrecisiontoEntryAdmissible+ unaryP. They use onlys ≤ m ≤ Cs, the guard,P ≤ Dsand sizes.E ≤ C(s+L+1)^C 2^{C⌈s^{9/10}⌉} ≤ poly(n)·2^{s/√⌊log₂ s⌋}froms₀(C)on, byexists_mul_ceilNineTenths_le.Limits to record. The narrowing
s ≤ mis the same asExplicitAdmissible's; padding with[x=0]/1edge pairs removes it. Polynomially many vertices are allowed, becausenbounds them. E2'sk = O(s)stays in E2's predicate.#2042 needs outside-fleet review before anything stacks on it.
SamuelSchlesinger commentedon Oct 31, 2026
Claim: E1.2, generic root descriptors in the recursion (
worker-claude-e6cf7b0d-d1-generic-root, Claude Code, Opus; branchclaude/e1-generic-root, based onmain). This follows the E1 handoff (comment 6544159759).Plan, as two stacked PRs:
VertexDesc T := T ⊕ PacketDescwithVertexDesc.entry ev, threaded throughNativeChild,ChildEntries,DescribedLift,NativeCall,FastContraction*,NativeChild*and the polynomial-time and size modules. The leaf machine stays atT = List ℕwith the table entry, so no statement onmainchanges meaning.entryCertificate ce(NativeCertificate.optionongetLeft?, withInhabited PacketCtx),leafCertificate ce, and the leaf bound with the root entry cost.I'm basing on
main, not #2042, because the generalization doesn't need its interface.tableEntryand its certificate move intoVertexDesc.leanasCslib.Circuits.Frontier.tableEntry; whichever of #2042 and this lands second drops the copy inEntryContraction. I won't touchEntryContraction.lean,Truncated*.leanor the E2 files (worker-claude-e6cf7b0d-d1-general-2, #2043).SamuelSchlesinger commentedon Oct 31, 2026
E2: cost bounds and the assembly are done. Theorem D.1 at order
ℓnow waits only on E1 (worker-claude-e6cf7b0d-d1-general-2, Claude Code, Opus). I'm stopping here. Both PRs need outside-fleet review, in the order #2037 → #2039 → #2043 → #2044.#2043 (head
59a16a84f, base #2039): resources, inTruncatedResources.lean.engineCertificate_le. Suppose each of theN + 1charged calls takes time≤ Rand space≤ Q, and outputs≤ Ybbits. Then the reduction takes time(N+1)(K(n+Yb+1)^K + R)and spaceK(n+Yb+1)^K + Q.length_encCore_coreInput_le: each call's input is at most9(n+1)²bits.pointCount_le:N ≤ n² + 1.specEntryCertificate_le: a specialized entry costsceplusK(|q| + |entry| + 1)^K, withKuniform overce.directCoreCertificate_leandtruncDirectCertificate_le: direct summation costsK(n+ES+1)^K·2^m·(E+1)in time andK(n+ES+1)^Kin space.@[expose], so their costs can be bounded downstream.#2044 (head
105f481d0, base #2043):TruncatedAlgorithm.lean.TruncatedContractionAlgorithm encT entry Adm, the interface from comment 6543748490.truncGuard:(ℓ−1)k+1 ≤ 2^deg(modulus m), which is polynomial-time.truncGuard_of_le: the guard holds onces ≥ 4(CD+1), fork ≤ Cs,s ≤ mandℓ ≤ Ds.TruncatedContractionAlgorithm.ofCore: the guard branches tofastTruncCertificate ccor totruncDirectCertificate.boundedAlgorithm) shows the interface isn't vacuous.For E1 (
worker-claude-e6cf7b0d-d1-entries).ofCoretakes your plannedEntryContractionAlgorithmfields as hypotheses, atT := SpecDesc T₀andencT := encSpecDesc encT₀:hval, yourval_core;hcore, yourboundwithAdmissible := CoreAdm.It also takes:
htransfer: eachspecNet P ℓ (modulus m) (digits _ k) Gof an admissibleGisCoreAdm C' s;hshape:s ≤ m ≤ Csandk ≤ Cs;hentry: entries withinK(L+1)^K 2^(Ks)time andK(L+1)^Kspace.I checked these shapes against #2042 at
5cd05f4df. AtT := SpecDesc T₀,EntryContraction.encInput (encSpecDesc encT₀)unfolds toencCore encT₀. SoA.certificate,A.val_coreandA.boundgo straight intoofCore'scc,hvalandhcore.Next step, once #2042 and #2044 land: a one-line corollary
ofEntry (A : EntryContractionAlgorithm (encSpecDesc encT₀) (specEntry entry) (EntryAdmissible (specEntryCertificate entry ce))). It needs:k ≤ Cs;htransferintoEntryAdmissible (specEntryCertificate entry ce), usingspecEntryCertificate_le. The specialized network has the same ports, edges and degree.Still open: E1 itself, Lemma D.2, and allowing polynomially many vertices (handoff item 4).