Repository navigation
chore(AlgebraicGeometry/EllipticCurve/Projective): remove erw in Formula.lean - #45670
user202729 wants to merge 1 commit into
Conversation
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to Zulip and join the Lean community. |
PR summary bec15c3a23Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| Current number | Change | Type (strong) |
|---|---|---|
| 486 | -7 | erw |
Current commit bec15c3a23
Reference commit c1cc962aa0
This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
caf1992 to
bec15c3
Compare
erw in Formula.lean
|
FYI @Multramate has big plans for this part of the library. He might have thoughts on this. |
|
Thanks for this. You may have seen #25988 which was my attempt a long time ago to remove the If you're interested in helping out: here is the link to my refactor post in Zulip |
Multramate
left a comment
There was a problem hiding this comment.
If you insist to get this merged, I think it's largely fine, but I believe Jacobian may also have similar formulae, and it's in our best interest for them to mirror each other.
| rw [dblY, ← negDblXYZ, ← negDblXYZ_Z] | ||
| rw [negY_of_Z_ne_zero <| dblZ_ne_zero_of_Y_ne' hP hQ hPz hQz hx hy] | ||
| rw [negDblXYZ_X, negDblXYZ_Y, negDblXYZ_Z, dblX_of_Z_ne_zero hP hQ hPz hQz hx hy] | ||
| rw [negDblY_of_Z_ne_zero hP hQ hPz hQz hx hy] | ||
| rw [Affine.addY] |
There was a problem hiding this comment.
I guess these can be combined into one rw? It's still a long chain...
Reducing tech debt.
The main reason why
erwwas needed in this file instead ofrwis the following.P : Fin 3 → R, and there's local notationxbeing(0 : Fin 3), similar foryandz. SoP xis the first coordinate ofP. For a curveW'and a pointP,W'.dblXYZ Pis another point, its double i.e.2 • P.W.dblY Pcomputes theY-coordinate of2 • P. Of course, this can be equivalently written asW.dblXYZ P y.W.dblY PandW.dblXYZ P yare not definitionally equal at the default transparency level. Depends on which lemma we want to apply, we need to convert the goal to use one form or the other.Personally, I think it's a better idea to normalize on the
W.dblXYZ P yform, and keep theW.dblY Pform as strictly an implementation detail if needed. In this case, theXYZsuffix wouldn't be needed either, and the main definitions would be:etc. Thoughts? Note that
W.dbl P yis only 1 character longer thanW.dblY P.Most lemmas that we want to apply are already stated in term of the point (except that many use
W.negY Pinstead ofW.neg P y, though currentlyW.negdoesn't exist).Also, there are (very) long
rwchains. (#mathlib4 > Is long `rw` chain bad?) Ideas?Another idea: have a
array_indextactic that evaluates![a, b, c, d] 2tocwhen the index is a known constant, for example. Currently there issimp only [fin3_def_ext]which obviously only works on length-3 arrays.