feat(AlgebraicGeometry/EllipticCurve): add notation and pretty printer for points#36334
feat(AlgebraicGeometry/EllipticCurve): add notation and pretty printer for points#36334Multramate wants to merge 1 commit intoleanprover-community:masterfrom
Conversation
PR summary bf66be1a70Import changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diffNo declarations were harmed in the making of this PR! 🐙 You can run this locally as follows## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for No changes to technical debt.You can run this locally as
|
|
The notation for affine points is pretty, but I don't have a good idea what to do for Jacobian/projective points. Ideally a point on |
CBirkbeck
left a comment
There was a problem hiding this comment.
I think this is something we definitely want, but reviewing the code is a bit above my pay grade. But it LGTM! if that helps
|
@erdOne can you have a look? About elliptic curves I usually trust @Multramate, but it's maybe a good idea to have a look by someone else. |
|
(You should definitely not trust me because I don't trust myself on this one!) |
|
Can you add a test file for this? Thanks. |
|
Frankly, this is the very first thing I did when I tried to work with elliptic curves in mathlib, though I never came around PRing it. So I totally agree that such a notation is the reasonable thing to do. |
| /-- The notation for a nonsingular affine point `(x, y)` on a Weierstrass curve `W` over a ring | ||
| whose numerical expressions can be normalised with `norm_num`. -/ | ||
| scoped notation:max W "⟮" x "," y "⟯" => | ||
| Point.some (W' := W) x y <| by norm_num [nonsingular_iff, equation_iff] |
There was a problem hiding this comment.
I wonder if we want notation like W⟮O⟯ for Point.zero or if we are happy with the inconsistence of notation.
There was a problem hiding this comment.
This is a good idea and I am happy to add it.
I can do this; the infoview don't show properly for #eval unfortunately --- any ideas? |
What do you mean by this? Does |
Yes: I feel like this is a solvable problem but I don't know how to solve it. |
Co-authored-by: Kenny Lau [email protected]