[Merged by Bors] - feat: improve toAdditive.guessName#715
Closed
fpvandoorn wants to merge 3 commits intomasterfrom
Closed
[Merged by Bors] - feat: improve toAdditive.guessName#715fpvandoorn wants to merge 3 commits intomasterfrom
toAdditive.guessName#715fpvandoorn wants to merge 3 commits intomasterfrom
Conversation
Contributor
|
bors merge |
bors bot
pushed a commit
that referenced
this pull request
Nov 25, 2022
* The heuristic to split names did it wrong on a long sequence of capital letters. The new heuristic is to have a sequence of "white-listed" names that only consist of capital letters (currently `["LE", "LT", "WF"]`). This new heuristic correctly splits `ZeroLEHAdd` and `HSMul` * translate `[h]pow` to `[h]smul` (see #706). I believe Mathlib4 never used the previous automatic translation `pow -> nsmul` (I used regex `@\[to_additive\]\n?.*(_p|P| p)ow` to search). Since capitalization goes wrong in this case, add some cases in `fixAbbreviation` to fix it. * Fix all places where the capitalization `Smul` was used instead of `SMul`.
|
Pull request successfully merged into master. Build succeeded: |
toAdditive.guessNametoAdditive.guessName
bors bot
pushed a commit
that referenced
this pull request
Jan 24, 2023
* I tried translating it to `smul` in #715, but that was a bad decision * It is possible that some lemmas that want to be called `smul` now use `nsmul`. This doesn't raise an error unless they are aligned or explicitly used elsewhere. * Rename some lemmas from `smul` to `nsmul`. * [Zulip](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/to_additive.20translating.20pow.20to.20nsmul) Co-authored-by: Reid Barton <rwbarton@gmail.com>
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.
["LE", "LT", "WF"]). This new heuristic correctly splitsZeroLEHAddandHSMul[h]powto[h]smul(see [Merged by Bors] - fix(Algebra/Group/Defs): maketo_additiveplay nice withpowandsmul#706). I believe Mathlib4 never used the previous automatic translationpow -> nsmul(I used regex@\[to_additive\]\n?.*(_p|P| p)owto search). Since capitalization goes wrong in this case, add some cases infixAbbreviationto fix it.Smulwas used instead ofSMul.