Multilinear folding completeness#534
Conversation
🤖 PR Summary
The overview should be written directly, starting with the substantive content or headers. No meta prefaces. Statistics
Lean Declarations ✏️ Added: 49 declaration(s)
📋 **Additional Analysis**The diff introduces significant new functionality but contains several violations of the project's style and documentation guidelines. The most notable issues are missing or improperly formatted docstrings, a missing module docstring in 📄 **Per-File Summaries**
It introduces:
No The file depends on several imported modules for polynomial algebra, domain theory, and coding-theoretic foundations, and it operates in the
Last updated: 2026-07-10 12:04 UTC. |
9a7ac62 to
85f9da3
Compare
572cf18 to
ab5e030
Compare
5526e24 to
87ad7f5
Compare
87ad7f5 to
2dde0ee
Compare
2dde0ee to
2fa10aa
Compare
alexanderlhicks
left a comment
There was a problem hiding this comment.
AI-generated review. This review was produced by Codex and has not been written by a human reviewer. Every finding below was checked against exact head
2fa10aaa3e100bbbc24af3f6bd76d7efdc82b2eb, the referenced paper, and the current ArkLib interfaces.
Conclusion: changes are needed before this should land. The recurrence, univariate degree-bound theorem, and even/odd algebra are meaningful, axiom-clean progress, but the advertised multilinear result is only the full-rate m = n specialization of WHIR Claim 4.15, pp. 26–27. It does not yet formalize the paper's independent code parameter m ≤ n.
Validation performed
- Ran
./scripts/validate.shat this exact SHA: all 4,050 Lean jobs and repository gates passed. I also refreshed GitHub checks on 2026-07-19; all reported checks pass. - Ran
#print axiomson the principal new fold/MLE declarations: only standard Lean/Mathlib axioms were reported, with nosorryAx. - Compared the public statements to WHIR Definition 4.14 and Claim 4.15 and to ArkLib's existing
ReedSolomon.smoothCode,mem_rs_code_iff_exists_mle,ProximityGap.foldWord, and proof-systemFold.fold_ksurfaces. - Tested integration against current main and the related PRs: this work overlaps #657's binary-fold insertion and places Reed–Solomon corollaries in a domain module, so semantic integration is required rather than a mechanical merge.
Required outcome
- Generalize the MLE statement to independent
mandn, with a paper-shapedsmoothCodewrapper. - Preserve ArkLib's dependency direction by moving coding-theory corollaries out of
CosetFftDomain/Subdomain. - Prove/document equivalence with the existing STIR/WHIR fold APIs and #657's explicit-root theorem.
Series-wide context: of the seven WHIR items directly targeted by PRs #534/#603/#616/#657 (Definition 4.14, Claim 4.15, Definitions 4.16–4.18, Claim 4.19, Claim 4.22), only Claim 4.19 is currently both paper-faithful and axiom-clean end-to-end. This PR advances Claim 4.15, but does not yet close it, and it does not close a numbered STIR result.
|
|
||
| /-- One step of lemma 4.15 from [ACFY24]. -/ | ||
| lemma foldWord_eq_evalOnPoints_powAlgHom [NeZero n] {α : F} | ||
| {g : F⦃≤ 1⦄[X (Fin n)]} |
There was a problem hiding this comment.
AI-generated inline feedback — paper fidelity (blocking). Here g has variables Fin n, where the same n fixes the domain cardinality 2^n. I validated this against WHIR Claim 4.15, pp. 26–27: the paper starts from RS[F,L,m] with independent k ≤ m ≤ n and returns an (m-k)-variate MLE. Thus the present theorem covers only m = n. Please quantify m independently and add a paper-shaped wrapper starting from f ∈ ReedSolomon.smoothCode domain m; ArkLib's mem_rs_code_iff_exists_mle already exposes a Fin m witness. Add at least one test/example with m < n to prevent this conflation from returning.
|
|
||
| import ArkLib.Data.Domain.CosetFftDomain.Ops | ||
| import ArkLib.Data.Domain.FftDomain.Ops | ||
| import ArkLib.Data.CodingTheory.ReedSolomon |
There was a problem hiding this comment.
AI-generated inline feedback — layering (blocking for integration). I validated the import graph against current ArkLib: coding theory imports domain infrastructure, while this new import makes CosetFftDomain/Subdomain depend on ReedSolomon. Please retain only generic subdomain/power lemmas here and move ReedSolomon.evalOnPoints corollaries to Data/CodingTheory/ProximityGap/Folding/Multilinear.lean (or another coding-theory module). This also avoids the content conflict observed when stacking this PR after #603.
| /-- The version of a folding where | ||
| k steps are achieved via iterated application | ||
| of k=1 folding. -/ | ||
| noncomputable def iteratedFoldWord (domain : SmoothCosetFftDomain n F) |
There was a problem hiding this comment.
AI-generated inline feedback — canonical fold API. I checked current ArkLib and the related heads: main already has ProximityGap.foldWord, the proof-system development has Fold.fold_k, and #657 adds an axiom-clean explicit-root binary theorem. Please prove the exact equivalence/migration lemma for iteratedFoldWord and make downstream Claims 4.20–4.23 use one canonical surface. WHIR Definition 4.14 defines the k-fold recursively, so two unbridged recurrences are not enough to establish faithful reuse.
| have := (‹CosetFftDomainClass D (Fin (2 ^ n)) F›.injective ω) h_eq | ||
| simp_all only [ne_eq, Fin.ext_iff] | ||
| -- Since $2^i * j \equiv 2^i * j' \pmod{2^n}$, | ||
| -- we can divide both sides by $2^i$ (which is valid since $2^i$ is coprime to $2^n$). |
There was a problem hiding this comment.
AI-generated inline feedback — proof documentation. The powers of two here are not coprime. I checked the proof immediately below: it cancels a common power-of-two factor using the divisibility relation. Please rewrite the comment to describe that cancellation; the present explanation states a false number-theoretic fact.
This PR introduces iterated folding operation as defined in the WHIR paper, proves it completeness, and its multilinear counterpart.