New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat(linear_algebra/lagrange): Refactor lagrange interpolation and add extended proofs. #15036
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's tons of untapped simp
potential.
I stripped out all the simps from the original file when refactoring - this adds a chunk of them back in (though they have not been linted). Co-authored-by: Violeta Hernández <vi.hdz.p@gmail.com>
I have pushed a number of extensive reworks to this, including adding new, genuinely mathematical interesting (I think!) lemmas. https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/Lagrange.20interpolants |
I have an ongoing question about a) whether the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good. Scanning the proof no golfs jump out at me. I'll make some other reviews with style comments.
I'd like to hold off on special spellings for now, until I see them in action a bit more. Unfortunately adding new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went through again especially focussed on the names this time, I think one more round of reviews and we're there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few general remarks.
@Vierkantor what do you reckon now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good with just some minor remarks, thanks!
bors d+
✌️ linesthatinterlace can now approve this pull request. To approve and merge a pull request, simply reply with |
Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
bors r+ |
…d extended proofs. (#15036) The current formulation of Lagrange interpolants phrases things in terms of a finset of nodes, and functions interpolated at those nodes. This changes things in order to allow for indexed nodes and weights. It also extends various functionalities of the lagrange interpolation. Co-authored-by: Wrenna Robson <34025592+linesthatinterlace@users.noreply.github.com>
Build failed (retrying...): |
…d extended proofs. (#15036) The current formulation of Lagrange interpolants phrases things in terms of a finset of nodes, and functions interpolated at those nodes. This changes things in order to allow for indexed nodes and weights. It also extends various functionalities of the lagrange interpolation. Co-authored-by: Wrenna Robson <34025592+linesthatinterlace@users.noreply.github.com>
This PR was included in a batch that was canceled, it will be automatically retried |
…d extended proofs. (#15036) The current formulation of Lagrange interpolants phrases things in terms of a finset of nodes, and functions interpolated at those nodes. This changes things in order to allow for indexed nodes and weights. It also extends various functionalities of the lagrange interpolation. Co-authored-by: Wrenna Robson <34025592+linesthatinterlace@users.noreply.github.com>
Pull request successfully merged into master. Build succeeded: |
The current formulation of Lagrange interpolants phrases things in terms of a finset of nodes, and functions interpolated at those nodes. This changes things in order to allow for indexed nodes and weights. It also extends various functionalities of the lagrange interpolation.
It is more standard - and in many ways more natural - to think in terms of nodes and weights (that is, evaluations) at those nodes. This corresponds to a reformulation in terms of injective functions from fintypes. This commit implements the necessary changes to do this, and attempts to introduce API to fill the gaps left behind.
I am looking for feedback on this in terms of overall approach as well as details - I should point out that this isn't for the sake of it: in the real context of the theory of binary Goppa codes, I was encountering issues with the previous formulation as it is very natural to want to index your weights by the same thing that one indexes your nodes: and, again, it's natural for these to be tuples.
This new approach seems to give tighter and neater proofs, which seems a good sign.