Prove remaining ToPoly eval and swap lemmas#122
Prove remaining ToPoly eval and swap lemmas#122eliasjudin wants to merge 3 commits intoVerified-zkEVM:masterfrom
Conversation
🤖 Gemini PR SummaryMathematical FormalizationCompletes the
Except for the updated typeclass requirement in Refactoring and Structural UpdatesStreamlines the codebase by removing deprecated components and optimizing dependencies:
ImpactResolving these lemmas provides a verified path for bivariate polynomial manipulation and evaluation. The removal of univariate quotient equivalences simplifies the dependency graph and focuses the library on standard Mathlib representations. Analysis of Changes
Lean Declarations ✏️ **Removed:** 3 declaration(s)
✏️ **Added:** 2 declaration(s)
✏️ **Affected:** 1 declaration(s) (line number changed)
✅ **Removed:** 3 `sorry`(s)
🎨 **Style Guide Adherence**The following lines violate the style guide:
📄 **Per-File Summaries**
Last updated: 2026-02-28 11:30 UTC. |
e90925f to
3e5d021
Compare
This discharges the remaining proof debt in CompPoly/Bivariate/ToPoly.lean by proving evalX_toPoly_coeff, swap_toPoly_coeff, and evalX_toPoly_eval with localized proof edits. The final theorem uses [CommRing R] for the eval-map bridge step; no other interface changes are introduced. Co-authored-by: Aristotle (Harmonic) <aristotle-harmonic@harmonic.fun>
586f2dd to
6386909
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 63869093f1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
dhsorens
left a comment
There was a problem hiding this comment.
Nice, thanks! Looks like the proof for evalX_toPoly_eval assumes a commutative ring (makes sense, makes the proof simpler). Ideally we would not have to assume that ..
Yeah, I'm double checking though, switching to draft. |
Add evalX_toPoly_eval_commute over rings with Commute a y, and keep evalX_toPoly_eval as the CommRing specialization. Co-authored-by: Aristotle (Harmonic) <aristotle-harmonic@harmonic.fun>
|
strengthened with @Aristotle-Harmonic but I still think I can do better |
Proves that if (evalX a f).eval y = (toPoly f).evalEval a y for all f, then Commute a y. This establishes the unrestricted Ring version is not valid in general without a commutation hypothesis. Co-authored-by: Aristotle (Harmonic) <aristotle-harmonic@harmonic.fun>
| The `Commute` hypothesis in `evalX_toPoly_eval_commute` is necessary: | ||
| if the identity holds for every bivariate polynomial then `a` and `y` commute. | ||
| -/ | ||
| theorem evalX_toPoly_eval_commute_converse |
There was a problem hiding this comment.
@dhsorens I doubt you want this here but this indicates evalX_toPoly_eval_commute is best we can do
let me know if I should make the change evalX_toPoly_eval_commute --> evalX_toPoly_eval and cleanup
This PR adds proofs autoformalised by @Aristotle-Harmonic.
It discharges the remaining proof debt in
CompPoly/Bivariate/ToPoly.leanby provingevalX_toPoly_coeff,swap_toPoly_coeff, andevalX_toPoly_eval.The final bridge step requires
[CommRing R]inevalX_toPoly_eval; edits are otherwise localized to theorem proof bodies.Co-authored-by: Aristotle (Harmonic) aristotle-harmonic@harmonic.fun