Add computable versions of div and mod#127
Add computable versions of div and mod#127tomaz1502 wants to merge 7 commits intoVerified-zkEVM:masterfrom
Conversation
Co-authored-by: Aristotle (Harmonic) <aristotle-harmonic@harmonic.fun>
🤖 Gemini PR SummaryMathematical Formalization
Structural and API Changes
Statistics
Lean Declarations ✏️ **Removed:** 5 declaration(s)
✏️ **Added:** 34 declaration(s)
✏️ **Affected:** 3 declaration(s) (line number changed)
🎨 **Style Guide Adherence**There are 29 violations of the style guide in this diff. They are grouped by rule below:
📄 **Per-File Summaries**
Last updated: 2026-04-08 17:54 UTC. |
dhsorens
left a comment
There was a problem hiding this comment.
@tomaz1502 this is a good pull request, apologies for the delay as we have had some travel for conferences. I think it's a good idea to have DivMod.lean as you have it, and I like how the relevant operations are proved correct wrt the Mathlib specs
There has been a refactor of the Univariate directory so this needs to be refactored, but I'm happy with it since it preserves all the operations already there, and builds off of them. Are you okay doing the refactor? we can then look at merging it.
Reviewed for:
- correctness
- style
- backwards compatibility
Ok! I will take a look in the next few days. |
This PR replaces the old version of
CPolynomial.divandCPolynomial.modby one that is closer to the one defined in mathlib. It also proves their termination and that they are equivalent toPolynomial.divandPolynomial.modwith respect toCPolynomial.toPoly.Note that it was necessary to prove some
toPolyequivalence lemmas aboutCPolynomial.Raw. Maybe these could be incorporated in the fileCompPoly/Univariate/ToPoly.lean.Solves #115.
Co-authored-by: Aristotle (Harmonic) aristotle-harmonic@harmonic.fun