Skip to content

[Merged by Bors] - feat: improve toAdditive.guessName - #715

Closed
fpvandoorn wants to merge 3 commits into
masterfrom
toAdditiveTranslate
Closed

fpvandoorn wants to merge 3 commits into
masterfrom
toAdditiveTranslate

Conversation

@fpvandoorn

@fpvandoorn fpvandoorn commented Nov 24, 2022 •

Copy link
Copy Markdown
Member
  • 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 [Merged by Bors] - fix(Algebra/Group/Defs): make to_additive play nice with pow and smul #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.

@kim-em

kim-em commented Nov 25, 2022

Copy link
Copy Markdown
Contributor

bors merge

@github-actions github-actions Bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Nov 25, 2022
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`.
@bors

bors Bot commented Nov 25, 2022

Copy link
Copy Markdown

Pull request successfully merged into master.

Build succeeded:

@bors bors Bot changed the title feat: improve toAdditive.guessName [Merged by Bors] - feat: improve toAdditive.guessName Nov 25, 2022
@bors bors Bot closed this Nov 25, 2022
@bors
bors Bot deleted the toAdditiveTranslate branch November 25, 2022 16:37
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants