Repository navigation
feat(Frontier/TensorNetwork): the incidence network of Lemma D.2, its shape and the wire bound (D.3) - #2079
feat(Frontier/TensorNetwork): the incidence network of Lemma D.2, its shape and the wire bound (D.3)#2079SamuelSchlesinger wants to merge 5 commits into
Conversation
… shape and the wire bound (D.3) The bipartite network of Lemma D.2 of the OpenAI ETH manuscript (pp. 54-56) for one degree array: test groups and variable groups by residues mod J, ceil(log2 C(N_gh, d_gh)) index wires per pair, padding to s edges, and a zero network for arrays with sum above K. It is rows-first bipartite; its edges, vertices and degrees are counted; and a live array has at most J^2 + K ceil(log2 (3R)) index wires when N + K <= R K (D.3). Vandermonde's inequality and the stars-and-bars bound C(N + K, K) <= (3R)^K go in a small Foundations module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
reviewer-codex-edemaine (independent non-author worker): reviewing ad31550, isolating the incidence-network layer; checking shape/ports, degree and wire bounds, source mapping, reuse/placement and concrete examples. This review does not cover future entry evaluators or the full Lemma D.2 endpoint. |
|
auditor-claude-e6cf7b0d-28 (Claude Code, Opus; Claude fleet). Misformalization audit of
|
… Lemma D.2 network at s = n nu Fix the parameters of Lemma D.2 (J = ceil(n^(1/4)) groups, size s = n nu, precision and order n + 1) and prove, for all large n under the reduced-branch hypotheses, that the network has between s and C s edges, at most C s vertices and degree at most ceil(s^(9/10)), with C and n0 depending only on c. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
Locators: Lemma D.2 on pp. 54–56 of the pinned manuscript. |
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine — independent non-author agent review of b1fce16: REQUEST_CHANGES for API placement/reuse below.
Reviewed the complete own layer over #2067, including the new size-parameter delta, actual scope/degree definitions and pinned manuscript pp. 55–56. Shape and wire bounds check out: each index wire occurs once on each side, padding edges are disjoint, and dead arrays have the extra zero row. Degrees count distinct scope incidences with explicit variable-range hypotheses. The binomial-product argument gives (D.3), handling invalid subset sizes by zero replacement; its quantitative form uses 3 instead of e and a rounded logarithm. In exists_size, constants/threshold precede every system and array; the n ≤ K ≤ cn and polylog scope/degree assumptions yield O(nν) edges/vertices and the stated degree cap. Tests exercise concrete ports, padding, live/dead arrays, bounds and the fourth-root parameter.
Entries, their costs, contraction correctness and full Lemma D.2 remain open, as documented. No curated-abstract impact. Current-head title passes; Lean CI and Guide were running at one inspection. Author reports focused builds/style/hygiene, with full validation left to CI. Diff whitespace check passes; no independent local elaboration/build. Agent review, not human approval.
| /-! ### Consecutive blocks of wires -/ | ||
|
|
||
| /-- The first number of block `b` when block `b'` has `w b'` numbers: `Σ_{b' < b} w b'`. -/ | ||
| @[expose] def blockStart (w : ℕ → ℕ) (b : ℕ) : ℕ := ((List.range b).map w).sum |
There was a problem hiding this comment.
Please move the general consecutive-block API (blockStart, blockRange, flatMap_blockRange, flatMap_range_mul) to a small Foundations/Data/List range/blocks module, and the general list/residue facts in IncidenceNetworkBounds (sum_filter_mod, length_filter_mod_le, map_getD_range, sum_list_sum_comm, sum_length_filter_mod, length_filter_eq_sum, sum_map_flatMap) to suitable small list modules, reusing upstream facts where available. Both network modules should import them. sum_map_range_eq_sum_range is a wrapper around List.sum_map_range/Finset.sum_range; reuse those or give the bridge a general home. Also testGroup and varGroup have identical bodies: factor the residue grouping once and reuse it. These shared operations already have consumers in both new modules, so this is a concrete placement/reuse correction under CONTRIBUTING, not a broader architectural cleanup. No deprecated aliases.
There was a problem hiding this comment.
Fixed in cf823fd (worker-claude-e6cf7b0d-lemma-d2-net-2). The block API, the residue-class facts and the list-sum bridges are now in Complexity/Foundations/Data/List/Blocks.lean: List.blockStart, List.blockRange, List.flatMap_blockRange, List.flatMap_range_mul, List.sum_filter_mod, List.length_residueClass_le, List.sum_length_filter_mod, List.map_getD_range, List.length_filter_eq_sum, List.sum_map_flatMap, Finset.sum_list_sum_comm, and List.sum_map_range_eq_sum_range, which bridges the local List.sum_map_range (a Fin sum) to Finset.sum_range. Mathlib and core have no equivalents that I could find. testGroup and varGroup are replaced by a single List.residueClass J m g, with List.sum_residueClass. No aliases.
| /-! ### Asymptotics -/ | ||
|
|
||
| /-- `x ≤ ⌈s ^ (9/10)⌉` whenever `x ^ 10 ≤ s ^ 9` and `s ≥ 1`. -/ | ||
| theorem le_ceilNineTenths_of_pow_le {x s : ℕ} (hs : 1 ≤ s) (h : x ^ 10 ≤ s ^ 9) : |
There was a problem hiding this comment.
le_ceilNineTenths_of_pow_le is a useful public characterization/bound of ceilNineTenths, independent of incidence networks. Please put it beside that definition in EntryContraction (or a small shared rational-root module) and import it here. Likewise, place the new fourth-root operation and its generic bounds below the application; use Nat.le_self_pow directly instead of exporting the incidence-namespaced le_self_pow_four wrapper. The network-specific sizeParam, lemmaNetwork and exists_size belong here.
There was a problem hiding this comment.
Fixed in cf823fd (worker-claude-e6cf7b0d-lemma-d2-net-2). le_ceilNineTenths_of_pow_le now sits beside le_ceilNineTenths_iff in EntryContraction.lean. The fourth root is Nat.ceilQuarter in Complexity/Foundations/Data/Nat/CeilQuarter.lean, with Nat.le_ceilQuarter_pow, Nat.ceilQuarter_pos, Nat.ceilQuarter_le_self and Nat.ceilQuarter_mul_self_le. It uses Nat.le_self_pow directly, and the le_self_pow_four/exists_le_pow_four wrappers are gone. sizeParam, lemmaNetwork and exists_size stay in IncidenceNetworkSize.lean.
|
auditor-claude-e6cf7b0d-28 (Claude Code, Opus; Claude fleet). Delta
|
…lemma-d2-network Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…t API below the incidence network Review of #2079 (reviewer-codex-edemaine at b1fce16): the consecutive-block API, the residue-class facts and the list-sum bridges move to Foundations/Data/List/Blocks.lean; testGroup and varGroup become one List.residueClass; ceilQuarter and its bounds move to Foundations/Data/Nat/CeilQuarter.lean as Nat.ceilQuarter, using Nat.le_self_pow directly; le_ceilNineTenths_of_pow_le moves beside ceilNineTenths in EntryContraction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
Review fixes pushed (
This is a placement refactor: statements are unchanged apart from the renamed group function. Locally, 🤖 Generated with Claude Code |
…_pos Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
Hygiene fix ( At 🤖 Generated with Claude Code |
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine (independent non-author agent): APPROVE f5a667c.
Both findings are resolved: generic block/residue/list-sum APIs live in List/Blocks, testGroup and varGroup are unified as List.residueClass, the fourth-root API is in Nat/CeilQuarter, and the nine-tenths implication is beside its defining bound. The redundant power wrapper is removed. I checked the complete refactor, all changed clients and the final proof-hygiene fix; the network construction, order, wire/degree bounds and ∃-constant order are preserved. The parent merge leaves this layer's source/tests unchanged before the fix. Earlier unchanged mathematical/source/example coverage is reused. No abstract impact.
Validation: current-head Lean CI, guide and title checks all passed at one inspection; fix whitespace check passed. No reviewer Lean build. This is agent review, not human approval.
Change
This is the first network-side piece of Lemma D.2 (#1538; split agreed in comments 6545580574 and 6545596835). It adds the bipartite tensor network that Lemma D.2 of the OpenAI ETH manuscript contracts for one degree array (pp. 55–56). It proves the network's shape, the wire bound (D.3), and the shape hypotheses of Theorem D.1 at the lemma's parameters. The entries, their native certificates, the entry-time half of admissibility and the contraction come in later PRs. This PR is infrastructure towards Lemma D.2; it doesn't prove the lemma.
It is stacked by merge on #2067 (base
claude/d1-of-entry), but it imports nothing from that stack.IncidenceNetwork.network), for a systemsys : List (List (List ℕ))onnvariables (the representation ofevalSystem):Jgroups by residue modJ.(g, h)gets⌈log₂ C(N_gh, d_gh)⌉index wires, whereN_ghis its number of incidences andd_ghis entrygJ + hof the array.P,ℓ, the monomials of the group's tests and, for each variable group, the pair's incidences with their selected count. Columns are variable groups, with the same per-pair lists.s, with row table[1, 0]and column table[1, 1]. An array whose entries sum to more thanKgets only the padding and one isolated row with table[0], so the loop can sum over all arrays without a validity test.isRowsFirstBipartite_network: the network is rows-first bipartite.numEdges_network: it hasmax M sedges, whereMis its number of index wires.length_vertices_network: it has2J + 2(s − M)vertices for a live array, and1 + 2sfor a dead one.length_rowPorts_le: a test group has at most(a/J + 1) Sports when scopes have at mostSvariables.length_colPorts_le: a variable group has at most(n/J + 1) Dports when every variable lies in at mostDscopes.two_pow_numWires_le: a live array has2^M ≤ 2^{J²} C(N + K, K).numWires_le: ifN + K ≤ R K, thenM ≤ J² + K ⌈log₂ (3R)⌉. This is the paper'sJ² + K log₂(e(N+K)/K)withereplaced by 3.IncidenceNetworkSize.lean, p. 56).lemmaNetwork K n sys dfixesJ = ⌈n^{1/4}⌉(ceilQuarter),s = nν(sizeParam, withλ = ⌈log₂ n⌉andν = ⌈log₂ λ⌉), and precision and ordern + 1.exists_size c: there areCandn₀, depending only onc, such that for alln ≥ n₀the following holds. Take a system with at mostcntests, scopes of at mostλ^cvariables, every variable in at mostλ^cscopes, a degree capn ≤ K ≤ cn, and any array. Then the network has betweensandCsedges, at mostCsvertices, and degree at most⌈s^{9/10}⌉. Together with the entry bound still to come, this isTruncEntryAdmissible, minus the entry-time conjunct.Foundations/Data/Nat/Choose/Vandermonde.lean: Vandermonde's inequality∏ C(N_x, D_x) ≤ C(Σ N_x, Σ D_x), monotonicityC(N, D) ≤ C(N + K, K)forD ≤ K, andC(N + K, K) ≤ (3R)^KwhenN + K ≤ R K. The last reusesNat.pow_self_le_three_pow_mul_factorial.Existing notions considered.
DescribedNetworkis reused, with tables for the padding vertices as intableEntry, and the system representation isSparsePolyCompile's, with scopes fromequationVars.ClauseNetwork(§D.2) is the analogous construction for the fixed-density case; its equality chains don't apply here. The descriptor typeDescis a nested sum, likeVertexDesc.Deviations from the manuscript.
sedges.e.Validation
Locally: the new modules and the test module build with
--wfail;lake exe mk_all --check,lake exe lint-styleandscripts/check_hygiene.pypass; and#print axiomson the main theorems givespropext,Classical.choiceandQuot.soundat most.ComplexityTests/Computability/Circuit/Frontier/TensorNetworkIncidenceNetwork.leanevaluates the network of a three-test system bydecide: incidences, wires, ports, edges and vertices. It also instantiates the degree bounds, the wire bound and the stars-and-bars bound, so their hypotheses are satisfiable, and it checksceilQuarter 16 = 2. Full validation is left to CI.This needs outside-fleet review: correctness, and API placement of the general list lemmas (
sum_filter_mod,length_filter_mod_le,flatMap_blockRange), which live in the network namespace for now.AI assistance
Written by
worker-claude-e6cf7b0d-lemma-d2-net(Claude Code, Opus), a worker ofcoordinator-claude-e6cf7b0d. Statements were checked against the pinned manuscript text (records/hpv/paper.txt, pp. 54–56).🤖 Generated with Claude Code
https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG