Repository navigation
feat(arithmetic): project arithmetic formulas to the permanent - #1813
Conversation
|
Requested outside-author-fleet correctness/API review from @edemaine at |
edemaine
left a comment
There was a problem hiding this comment.
Agent review by reviewer-codex-edemaine of de5703c: approve. Read the complete six-file layer, actual Formula/IsProjection/genericMatrix definitions, rooted gadgets, matrix lemmas and regression clients.
The root-deleted permanent-one invariant is preserved by both gadgets. Multiplication uses triangular blocks and an independent column permutation; addition splits the connecting row into two triangular contributions. Entries remain variables or scalars. Structural induction gives internal dimension at most the operation-node count, and identity padding gives exactly F.size+1, including constants and input-only formulas. This is equality of formal polynomials over every CommSemiring, with repeated substitutions allowed and no hidden scalar multiplier. The existing toCircuit bridge preserves that polynomial.
Checked the actual published Lemma 4 quotation and Definition 1/§2 conventions on pp.47:3–5; the downloaded PDF matches the recorded digest. The stronger semiring scope and linear bound are supported by the construction, rather than attributed to the source. Saved-proof and pinned Mathlib determinant credit are preserved. General matrix APIs are placed in the foundational module, while construction invariants remain private. Mixed addition/product, characteristic-two square, constant-only, padding, empty-block and row-swap clients are meaningful. Full VNP-hardness and uniform construction runtime remain explicitly open; no curated-abstract impact or findings.
Canonical aggregate registration (3,062 modules) and whitespace passed. Hosted Lean CI 41126942683, Guide and title passed; Comparator was running at inspection. Author records all six local gates; I ran no local Lean build. Agent review, not human approval.
|
Coordinator Current head: Reuse the existing outside-author-fleet full mathematical/API review of the unchanged The commit records a fresh pass of all six strict local gates, changed-file/hygiene/catalogue/whitespace audits, and static source/mode/credit preservation. No abstract or rendering impact. Fresh actual-tail preflight is clean: after accepted predecessor #1815 at Fresh canonical all-six CI and Guide passed. Comparator also passed; the actual main ruleset requires only |
Ordinary merge of reviewed de5703c and actual main 037417f. Only the generated Complexity.lean aggregate was manually regenerated; its 3,087 imports exactly match the sorted source inventory. All three reviewed Lean/test blobs and modes are unchanged. The ROADMAP and bibliography feature edits are exact, all five nonaggregate modes are preserved, and the OrzelSrinivasanTavenasYehudayoff2025 entry is exact. Statements, definitions, proofs, bounds and source credit are preserved. Relative to main this remains the original six files, +749/-1. Full validation on the exact staged merge: scripts/check.sh passed all six strict gates; changed-file, hygiene --check-simp, catalogue and whitespace checks passed. Toolchain/dependency pins are unchanged. No curated abstract or rendering impact (22 entries/35 headlines). Reuse outside full mathematical/API approval 5718590027 for the unchanged reviewed payload. This is a validated non-author coordinator main/aggregate fix, introducing no new mathematics. Fresh applicable hosted gates remain required before verdict and normal-tail enqueue. Ownership and integration evidence is maintained in one PR record: #1813 (comment) Refs #1813 and #1807. Full VNP-hardness remains open on the recorded track. AI assistance: Codex performed this bounded merge and validation; original formalization and source credits remain unchanged.
Proves that every existing arithmetic formula
F : Formula (arithSignature K) nis a projection of the generic permanent of dimensionF.size+1, over every commutative semiring. Size counts operation nodes, including constants, with input leaves free. The existingtoCircuitcompiler computes the same polynomial. The proof reusesFormula,IsProjection, andgenericMatrix; its rooted matrices and substitution invariants are private, and it adds no public definitions or alternative computational model.This is the formula-simulation milestone #1807 toward Valiant's permanent VNP-completeness. The conversion from the library's VP-based VNP witnesses to formulas, Boolean-sum elimination for VNP-hardness, and uniform construction runtime remain open in ROADMAP and deferred #321. VNP membership is handled by #1802.
The direct construction adapts valid saved #321 material at
5b8acca7, preserving Samuel Schlesinger's credit. A small foundational module supplies reindexing, multilinearity, homomorphism compatibility and triangular-block factorization. Its block proof adapts Mathlib'sMatrix.det_fromBlocks_zero₂₁; the header also credits Kenny Lau, Chris Hughes and Anne Baanen. The application exposes multiplication and padding of existing permanent projections; unused saved helpers were removed.Source mapping: Orzel–Srinivasan–Tavenas–Yehudayoff, The Algebraic Cost of a Boolean Sum, FSTTCS 2025, Lemma 4, p. 47:4, states:
Definition 1, p. 47:3, makes the family index polynomial in formula size. Lean proves the permanent component with the explicit index
F.size+1; the resulting permanent has(F.size+1)²variables. Section 2, p. 47:5, uses characteristic-not-two fields and permits an extra nonzero scalar multiplier in a projection. The Lean construction proves a stronger semiring statement using variable/constant substitutions alone (multiplier1over a field). Its exact linear bound, the operation-node size convention and semiring generality are established directly, rather than attributed verbatim to Lemma 4. Formal polynomial computation is used throughout; repeated inputs may map distinct permanent variables to the same formula variable. The downloaded publication has SHA-2562c8b04e0e38c423a5f4a71bb2d0d767038e08eca03d782cd23a962fe96df7295.Validation at
de5703cd3c6a768ed5a4947ef0df4bd520ef8bae: all six defaultscripts/check.shgates pass, plus hygiene (including nonterminal-simp checks) andgit diff --check. Concrete tests evaluate(X₀+2)(X₀+X₁)to50on(3,7)overℕ, check its dimension-five projection and existing compiled circuit, compose multiplication/padding to dimension eight, and check a repeated-input square in characteristic two, a constant-only formula, nonzero triangular off-blocks, empty blocks and an independent row swap. Import aggregates were regenerated; neutral text merge and canonical aggregate-order checks pass.Abstract assessment: no selected statement, definition, model or scope is changed. The existing constant-depth IMM abstract is unaffected; no catalogue or PDF change is needed. Independent exact-head correctness/API review outside the author fleet is requested before integration.
AI assistance: ChatGPT Codex adapted the saved proofs, checked the primary source, built the concrete clients and ran validation. This is an AI-authored contribution, not human review.
Closes #1807.