Skip to content
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(AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic): define division polynomials #6703

Closed
wants to merge 43 commits into from

Conversation

Multramate
Copy link
Collaborator

@Multramate Multramate commented Aug 21, 2023

@Multramate Multramate added WIP Work in progress t-number-theory Number theory (also use t-algebra or t-analysis to specialize) t-algebraic-geometry Algebraic geometry labels Aug 21, 2023
@bors bors bot changed the base branch from master to ScottCarnahan/BinomialRing2 September 17, 2023 03:26
@kim-em kim-em changed the base branch from ScottCarnahan/BinomialRing2 to master September 17, 2023 12:12
@Ruben-VandeVelde Ruben-VandeVelde added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 4, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 4, 2024
@Multramate Multramate requested a review from kbuzzard June 6, 2024 08:16
Copy link
Contributor

@alreadydone alreadydone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM, just a few comments


Furthermore, define the associated sequences $\phi_n, \omega_n \in R[X, Y]$ by
* $\phi_n := X\psi_n^2 - \psi_{n + 1}\psi_{n - 1}$, and
* $\omega_n := \tfrac{1}{2\psi_n} \cdot (\psi_{2n} - \psi_n^2(a_1\phi_n + a_3\psi_n^2)$.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better write this as $\tfrac{1}{2} \cdot (\psi_{2n}/\psi_n - \psi_n(a_1\phi_n + a_3\psi_n^2))$ (you're missing an ending )), and explain that how $\psi_{2n}/\psi_n$ is well-defined using preNormEDS (you can add a link to my complEDS).
Also explain that division by 2 is not possible in char 2, so either we need to divide in the universal ring over ℤ, or define $\omega$ another way (you can add a link to my definition).

I think it makes sense to merge the definition part of my DivisionPolynomial.lean with this PR, and maybe call the file DivisionPolynomial/Defs.lean, but then you'll need to wait for my #13057. The proof of the smul formula can be put in a standalone file called DivisionPolynomial/Group.lean (or ZSMul.lean ??). The degree computations can be another file Degree.lean.

Copy link
Collaborator Author

@Multramate Multramate Jun 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix the definition and add a short note explaining the issue with division by 2. I think it's a great idea to have multiple files since they're getting quite long. I'll propagate this to my downstream PRs.

I think we don't want to define $\omega$ in this PR (presumably that's what you mean by including #13057 since it's now broken to a few smaller PRs), because that is massive on its own.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a very short description of how to define $\omega$ mathematically at the module docstrings. The actual implementation details under Implementation Notes we can add when we actually PR the definition of $\omega$.

Copy link

github-actions bot commented Jun 8, 2024

PR summary

Import changes

No significant changes to the import graph


Declarations diff

+ C_Ψ₂Sq_eq
+ as
+ in
+ preΨ
+ preΨ'
+ preΨ'_even
+ preΨ'_four
+ preΨ'_odd
+ preΨ'_one
+ preΨ'_three
+ preΨ'_two
+ preΨ'_zero
+ preΨ_even
+ preΨ_four
+ preΨ_neg
+ preΨ_odd
+ preΨ_ofNat
+ preΨ_one
+ preΨ_three
+ preΨ_two
+ preΨ_zero
+ preΨ₄
+ Φ
+ Φ_four
+ Φ_neg
+ Φ_ofNat
+ Φ_one
+ Φ_three
+ Φ_two
+ Φ_zero
+ Ψ
+ ΨSq
+ ΨSq_even
+ ΨSq_four
+ ΨSq_neg
+ ΨSq_odd
+ ΨSq_ofNat
+ ΨSq_one
+ ΨSq_three
+ ΨSq_two
+ ΨSq_zero
+ Ψ_even
+ Ψ_four
+ Ψ_neg
+ Ψ_odd
+ Ψ_ofNat
+ Ψ_one
+ Ψ_three
+ Ψ_two
+ Ψ_zero
+ Ψ₂Sq
+ Ψ₂Sq_eq
+ Ψ₃
+ φ
+ φ_four
+ φ_neg
+ φ_one
+ φ_three
+ φ_two
+ φ_zero
+ ψ
+ ψ_even
+ ψ_four
+ ψ_neg
+ ψ_odd
+ ψ_one
+ ψ_three
+ ψ_two
+ ψ_zero
+ ψ₂

You can run this locally as follows
## summary with just the declaration names:
./scripts/no_lost_declarations.sh short <optional_commit>

## more verbose report:
./scripts/no_lost_declarations.sh <optional_commit>

@Multramate
Copy link
Collaborator Author

I only moved the files into a subdirectory in latest commit, while the changes reflecting the suggestions are in the previous commit. Note that there seems to be a weird bug with neg lemmas not recognising the negation in R[X][Y] in lines 429 and 430 without supplying the type.

Copy link
Contributor

@alreadydone alreadydone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice to include the proofs that the uppercase and lowercase $\phi$ and $\psi$ are congruent modulo W.polynomial. I think the useful statement is that there image under CoordinateRing.mk are equal. (Since evalEval at a point satisfying Equation factors through CoordinateRing.mk, the evalEval of these congruent polynomials are also equal.)

@Multramate
Copy link
Collaborator Author

Don't we need the map lemmas for that? I think I started #13399 pretty much immediately after I realised this. I suggest keeping the PR as it is and continue there.

@Multramate Multramate changed the title feat(AlgebraicGeometry/EllipticCurve/DivisionPolynomial): define division polynomials feat(AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic): define division polynomials Jun 8, 2024
Copy link
Contributor

@alreadydone alreadydone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🎉
maintainer merge

Copy link

github-actions bot commented Jun 9, 2024

🚀 Pull request has been placed on the maintainer queue by alreadydone.

@riccardobrasca
Copy link
Member

This is great, thanks!

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Jun 9, 2024
mathlib-bors bot pushed a commit that referenced this pull request Jun 9, 2024
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Jun 9, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic): define division polynomials [Merged by Bors] - feat(AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic): define division polynomials Jun 9, 2024
@mathlib-bors mathlib-bors bot closed this Jun 9, 2024
@mathlib-bors mathlib-bors bot deleted the division_polynomial branch June 9, 2024 22:38
Comment on lines +57 to +58
* $\Phi_n := X\Psi_n^{[2]} - \tilde{\Psi}_{n + 1}\tilde{\Psi}_{n - 1}$ if $n$ is even, and
* $\Phi_n := X\Psi_n^{[2]} - \tilde{\Psi}_{n + 1}\tilde{\Psi}_{n - 1}\Psi_2^{[2]}$ if $n$ is odd.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two lines are broken in the documentation and I'm not sure why.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it's an issue with _ being both part of markdown and LaTeX, see e.g. here.

AntoineChambert-Loir pushed a commit that referenced this pull request Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer-merge ready-to-merge This PR has been sent to bors. t-algebraic-geometry Algebraic geometry t-number-theory Number theory (also use t-algebra or t-analysis to specialize)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants