feat(SplitFold): add even/odd evaluation lemmas for splitNth#548
feat(SplitFold): add even/odd evaluation lemmas for splitNth#548klausnat wants to merge 2 commits into
Conversation
🤖 PR SummaryMathematical Formalization
Refactoring
Statistics
Lean Declarations ✏️ **Added:** 3 declaration(s)
📋 **Additional Analysis**Style and Naming Guidelines
📄 **Per-File Summaries**
Last updated: 2026-06-08 07:53 UTC. |
|
Is this in any way better than what was done here long ago (and was removed): ArkLib/ArkLib/Data/Polynomial/EvenAndOdd.lean Line 451 in 181ae87 |
And here: ArkLib/ArkLib/Data/Polynomial/EvenAndOdd.lean Line 407 in 181ae87 |
…VM#548) Our main already has splitNth_two_eval_add/_sub and foldNth_two_eval (issue #450), which strictly supersede PR Verified-zkEVM#548. This adds the one net-new reusable building block from that PR: the pointwise even/odd evaluation split f(y) = f0(y^2) + y * f1(y^2). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Thanks @ElijahVlasov But file In this PR I am adding eval-lemmas in also it was built on a different abstraction ( Also there were no in my PR they are in the FRI-ready form on the current |
|
These three even/odd lemmas are exactly what #450 needs. Two things that might help move it along: 1. Looks like it needs a rebase. The diff predates a recent change to this file — 2. The remaining #450 item ( lemma foldNth_two_eval (f : 𝔽[X]) (x β : 𝔽) (hx : x ≠ 0) (h2 : (2 : 𝔽) ≠ 0) :
(FoldingPolynomial.polyFold f 2 β).eval (x ^ 2) =
(f.eval x + f.eval (-x) + β * (f.eval x - f.eval (-x)) * x⁻¹) * (2 : 𝔽)⁻¹ := by
rw [polyFold_eq_sum_of_splitNth, eval_finsetSum, Fin.sum_univ_two]
simp only [Fin.val_zero, Fin.val_one, pow_zero, pow_one, eval_mul, eval_C, one_mul]
rw [splitNth_two_eval_add f x, splitNth_two_eval_sub f x]
field_simpHappy to send this as a follow-up PR once yours lands, or you're welcome to fold it in here — whichever you prefer. (Minor, optional: the module docstring lists |
Motivation
In this PR we add evaluation-level lemmas relating
splitNth, to connect the spec to FRI-style folding, where the even/odd split shows up as f(x) vs f(-x).Changes
Adds three lemmas (
n = 2specialization):splitNth_two_evalis reusable pointwise even/odd decomposition.splitNth_two_eval_addsplitNth_two_eval_subBuilt on the existing
splitNth_eval_comp_pow.Notes
As for fourth lemma from the issue #450,
foldNth_two_eval, we should first definefoldNth(mentioned in the module docstring, but not defined).
Solves partially #450