feat(Interpolation): prove eq_of_degreeOf_lt_card_of_eval_eq, schwartz_zippel#338
Open
pitmonticone wants to merge 2 commits intoVerified-zkEVM:mainfrom
Open
feat(Interpolation): prove eq_of_degreeOf_lt_card_of_eval_eq, schwartz_zippel#338pitmonticone wants to merge 2 commits intoVerified-zkEVM:mainfrom
eq_of_degreeOf_lt_card_of_eval_eq, schwartz_zippel#338pitmonticone wants to merge 2 commits intoVerified-zkEVM:mainfrom
Conversation
Co-authored-by: Aristotle (Harmonic) <aristotle-harmonic@harmonic.fun>
🤖 Gemini PR SummaryThis Pull Request significantly expands the library’s mathematical foundations, coding theory implementations, and proof system frameworks. The primary highlight is the formalization of key algebraic lemmas (Schwartz-Zippel) and the introduction of various data structures designed for computational efficiency and definitional equality in Lean. Features
Fixes
Refactoring
Documentation
Analysis of Changes
Lean Declarations ❌ **Added:** 201 declaration(s)
✅ **Removed:** 2 `sorry`(s)
❌ **Added:** 14 `sorry`(s)
🎨 **Style Guide Adherence**
📄 **Per-File Summaries**
Last updated: 2026-02-25 00:10 UTC. |
eq_of_degreeOf_lt_card_of_eval_eq, schwartz_zippel
quangvdao
reviewed
Feb 25, 2026
Comment on lines
+198
to
+203
| -- This theorem is false as stated: it only bounds `degreeOf` of `p`, not `q`. | ||
| -- A counterexample: `p = 0`, `q = X 0 * (X 0 - 1)`, `S 0 = {0, 1}`. Then `p` has degree 0 < 2 | ||
| -- and `eval x p = eval x q` for all `x` in the product set, but `p ≠ q`. | ||
| -- theorem eq_of_degreeOf_lt_card_of_eval_eq {p q : R[X σ]} (S : σ → Finset R) | ||
| -- (hDegree : ∀ i, p.degreeOf i < #(S i)) | ||
| -- (hEval : ∀ x ∈ piFinset fun i ↦ S i, eval x p = eval x q) : p = q := by sorry |
Collaborator
There was a problem hiding this comment.
Can you remove this version and just keep the corrected theorem?
…Of_lt_card_of_eval_eq (per review Verified-zkEVM#338)
quangvdao
requested changes
Feb 25, 2026
| (f : (x : α) → (x ∈ s) → β) : α → β := | ||
| fun x ↦ if hx : x ∈ s then f x hx else 0 | ||
|
|
||
| set_option maxHeartbeats 1600000 in |
Collaborator
There was a problem hiding this comment.
I would prefer if this proof does not need to set max heartbeat to be 8x the default. Could you ask Aristotle to identify the bottleneck and refactor the proof?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds proofs autoformalised by @Aristotle-Harmonic.
Co-authored-by: Aristotle (Harmonic) aristotle-harmonic@harmonic.fun