[Merged by Bors] - feat: to_additive raises linter errors; nested to_additive#1819
Closed
fpvandoorn wants to merge 7 commits intomasterfrom
Closed
[Merged by Bors] - feat: to_additive raises linter errors; nested to_additive#1819fpvandoorn wants to merge 7 commits intomasterfrom
fpvandoorn wants to merge 7 commits intomasterfrom
Conversation
Contributor
|
This PR/issue depends on:
|
Member
Author
|
note: please delegate - not merge - this PR. It likely raises errors when merging master |
2 tasks
bac985d to
1cef87d
Compare
no other changes
1cef87d to
a7792d7
Compare
gebner
reviewed
Feb 16, 2023
Member
gebner
left a comment
There was a problem hiding this comment.
bors d+
I'm not sure I'm a fan of using logLinter in functions that are not linters.
|
✌️ fpvandoorn can now approve this pull request. To approve and merge a pull request, simply reply with |
Member
Author
Co-authored-by: Gabriel Ebner <gebner@gebner.org>
Member
Member
Author
|
bors merge I'm happy to change this to something else in a future PR, if we reach a consensus. |
bors bot
pushed a commit
that referenced
this pull request
Feb 17, 2023
* Turn info messages of `to_additive` into linter errors * Allow `@[to_additive (attr := to_additive)]` to additivize the generated lemma. This is useful for `Pow -> SMul -> VAdd` lemmas. We can write e.g. `@[to_additive (attr := to_additive, simp)]` to add the `simp` attribute to all 3 generated lemmas, and we can provide other options to each `to_additive` call separately (specifying a name / reorder). * The previous point was needed to cleanly get rid of some linter warnings. It also required some additional changes (`addToAdditiveAttr` now returns a value, turn a few (meta) definitions into `mutual partial def`, reorder some definitions, generalize `additivizeLemmas` to lists of more than 2 elements) that should have no visible effects for the user.
|
Pull request successfully merged into master. Build succeeded:
|
mo271
pushed a commit
that referenced
this pull request
Feb 18, 2023
* Turn info messages of `to_additive` into linter errors * Allow `@[to_additive (attr := to_additive)]` to additivize the generated lemma. This is useful for `Pow -> SMul -> VAdd` lemmas. We can write e.g. `@[to_additive (attr := to_additive, simp)]` to add the `simp` attribute to all 3 generated lemmas, and we can provide other options to each `to_additive` call separately (specifying a name / reorder). * The previous point was needed to cleanly get rid of some linter warnings. It also required some additional changes (`addToAdditiveAttr` now returns a value, turn a few (meta) definitions into `mutual partial def`, reorder some definitions, generalize `additivizeLemmas` to lists of more than 2 elements) that should have no visible effects for the user.
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.
to_additiveinto linter errors@[to_additive (attr := to_additive)]to additivize the generated lemma. This is useful forPow -> SMul -> VAddlemmas. We can write e.g.@[to_additive (attr := to_additive, simp)]to add thesimpattribute to all 3 generated lemmas, and we can provide other options to eachto_additivecall separately (specifying a name / reorder).addToAdditiveAttrnow returns a value, turn a few (meta) definitions intomutual partial def, reorder some definitions, generalizeadditivizeLemmasto lists of more than 2 elements) that should have no visible effects for the user.