Commit 2023-02-17 17:10 37ae5972
View on Github →feat: to_additive raises linter errors; nested to_additive (#1819)
- Turn info messages of
to_additiveinto linter errors - Allow
@[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). - The previous point was needed to cleanly get rid of some linter warnings. It also required some additional changes (
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.