[Merged by Bors] - feat: improve ToAdditive.guessName to work with capitalisation#579
[Merged by Bors] - feat: improve ToAdditive.guessName to work with capitalisation#579joneugster wants to merge 21 commits intomasterfrom
ToAdditive.guessName to work with capitalisation#579Conversation
to_additive to new naming convention.ToAdditive.guessName to guess capitalisation
ToAdditive.guessName to guess capitalisationToAdditive.guessName to work with capitalisation
ToAdditive.guessName to work with capitalisationToAdditive.guessName to work with capitalisation
|
Can you add test cases to the test file? Regarding performance, I can't imagine there is anything you can do here which would have unacceptable performance. It is only run once per declaration and it's a tiny input so it shouldn't be a problem. |
|
Done that :) |
|
I made a few further changes. If you happy, please go ahead and merge. bors d+ |
|
✌️ joneugster can now approve this pull request. To approve and merge a pull request, simply reply with |
Co-authored-by: Scott Morrison <scott@tqft.net>
Co-authored-by: Scott Morrison <scott@tqft.net>
|
Thanks @semorrison ! I made a few more minor changes, all fixes to the test cases. |
|
bors r+ |
|
bors ping |
|
pong |
|
bors r+ |
This is a suggestion for `to_additive` to parse names in the new naming conventions. It does keep capitalised abbreviations like "LE" together but it would not split a single capitalised char off. E.g. "OneCommMonoidLEHMul_one_lt_Conj₂Pow" becomes "ZeroAddCommMonoidLEHAdd_pos_Conj₂Nsmul" Co-authored-by: Jon Eugster <Jon.Eugster@hhu.de> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Jon Eugster <eugster.jon@gmail.com>
Co-authored-by: Mario Carneiro <di.gama@gmail.com>
|
Canceled. |
|
I hope it's okay if I merge now with your comments integrated @digama0 . Please cancel if not! bors r+ |
This is a suggestion for `to_additive` to parse names in the new naming conventions. It does keep capitalised abbreviations like "LE" together but it would not split a single capitalised char off. E.g. "OneCommMonoidLEHMul_one_lt_Conj₂Pow" becomes "ZeroAddCommMonoidLEHAdd_pos_Conj₂Nsmul" Co-authored-by: Jon Eugster <Jon.Eugster@hhu.de> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Jon Eugster <eugster.jon@gmail.com>
|
Pull request successfully merged into master. Build succeeded: |
ToAdditive.guessName to work with capitalisationToAdditive.guessName to work with capitalisation
- [x] depends on: #579 Mathlib SHA: 17a9f8f7a4ef32ee65d418103367cf30e84e631d Done with the reviews. This should hopefully now be ready to merge. Co-authored-by: Jon <jon.eugster@gmx.ch> Co-authored-by: Jon Eugster <eugster.jon@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net>
This is a suggestion for
to_additiveto parse names in the new naming conventions.It does keep capitalised abbreviations like "LE" together but it would not split a single capitalised char off.
E.g. "OneCommMonoidLEHMul_one_lt_Conj₂Pow" becomes "ZeroAddCommMonoidLEHAdd_pos_Conj₂Nsmul"