-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support and improve notation_class in simps (#2883)
* If you write `@[simps]` for the definition of an `AddGroup`, it will now generate the correct lemmas for `0`, `+`, `nsmul` and `zsmul` using `OfNat` and heterogenous operations. This is needed for #2609. * This is a lot more flexible than the Lean 3 implementation, in order to handle `nsmul`, `zsmul` and numerals. * It doesn't handle the `zpow` and `npow` projections, since their argument order is different than that of `HPow.pow` (that was likely done for the sake of `to_additive`, but we can consider to revisit that choice). * Also fixes the `nvMonoid` bug encountered in #2609 * There was an issue where the wrong projection was chosen, since `toDiv` is a prefix of `toDivInvMonoid` * Before we were checking if `_toDiv` is a prefix of your projection with `_` prepended (e.g. `_toDivInvMonoid`), now we are checking whether `toDiv_` is a prefix of your projection with `_` appended (which doesn't match `toDivInvMonoid_`).
- Loading branch information
1 parent
accbdce
commit 1b8e1c6
Showing
6 changed files
with
287 additions
and
140 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.