feat(multilinear): add fast/spec equivalence bridge#189
Open
eliasjudin wants to merge 2 commits intoVerified-zkEVM:masterfrom
Open
feat(multilinear): add fast/spec equivalence bridge#189eliasjudin wants to merge 2 commits intoVerified-zkEVM:masterfrom
eliasjudin wants to merge 2 commits intoVerified-zkEVM:masterfrom
Conversation
Add CompPoly.Multilinear.FastSpecEquiv, proving that the existing butterfly Möbius transform agrees with lagrangeToMonoSpec, exporting the new multilinear regression surface, and documenting the new bridge in the repo wiki. Co-authored-by: Aristotle (Harmonic) <aristotle-harmonic@harmonic.fun>
🤖 Gemini PR SummaryMathematical Formalization
Infrastructure and Refactoring
Testing and Documentation
Statistics
Lean Declarations ✏️ **Removed:** 5 declaration(s)
✏️ **Added:** 1 declaration(s)
🎨 **Style Guide Adherence**The following violations of the style guide were identified:
📄 **Per-File Summaries**
Last updated: 2026-04-08 12:22 UTC. |
Replace deprecated tactic syntax, tighten helper docstrings and lambda notation, and normalize proof formatting in the fast/spec equivalence module so the PR satisfies the repo and mathlib-style review guidance.
dhsorens
reviewed
Apr 15, 2026
Collaborator
dhsorens
left a comment
There was a problem hiding this comment.
hey @eliasjudin , thanks for this PR! I believe this was recently merged with #193 , but I don't think we have the test suite, so we can merge this if you refactor the tests to reflect the merged changes?
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.
Summary
Add
CompPoly.Multilinear.FastSpecEquiv, introducing:CMlPolynomial.partialMobiusSpec, a theorem-local fast/spec intermediate for the Boolean-lattice Möbius transform;CMlPolynomial.lagrangeToMono_eq_lagrangeToMonoSpec, identifying the existing butterfly transform with the closed-form specification;This PR adds proofs autoformalised by @Aristotle-Harmonic.
Motivation
lagrangeToMonowas already the fast inverse transform used by the multilinear layer, but the repo still lacked a proof-backed theorem identifying it with the closed-form Möbius specificationlagrangeToMonoSpec.Mathematical content
For
v : Vector R (2 ^ n)over an additive commutative group, the new module proveslagrangeToMono n v = lagrangeToMonoSpec v.The proof factors the butterfly algorithm through a partial Möbius specification that records the state after processing the higher levels of the Boolean cube. The step theorem shows that one butterfly level exactly updates this partial specification, and the base/final theorems identify the endpoints with the identity vector and
lagrangeToMonoSpecrespectively.The resulting public theorem
lagrangeToMono_eq_lagrangeToMonoSpecturns the existing fast transform into a proof-backed surface while preserving the existing round-trip relationship withmonoToLagrange.Testing
./scripts/update-lib.sh./scripts/check-imports.sh./scripts/lint-style.sh CompPoly/Multilinear/FastSpecEquiv.lean tests/CompPolyTests/Multilinear/FastSpecEquiv.lean tests/CompPolyTests.leanpython3 ./scripts/check-docs-integrity.pylake buildlake testrg -n "sorry|admit|axiom|unsafe" CompPoly.lean CompPoly/**/*.lean tests/**/*.leanRefs #185
Co-authored-by: Aristotle (Harmonic) aristotle-harmonic@harmonic.fun