Mathlib v3 is deprecated. Go to Mathlib v4

Commit 2021-10-18 23:50 442382db

View on Github →

feat(tactic/to_additive): Improvements to to_additive (#5487) Change a couple of things in to_additive:

  • First add a tactic.copy_attribute' intended for user attributes with parameters very similar to tactic.copy_attribute that just copies the parameter over when setting the attribute. This allows to_additive after many other attributes to transfer those attributes properly (e.g. norm_cast)
  • Have to additive register generated equation lemmas as such, this necessitates a bit of restructuring, first all declarations must be generated (including equational lemmas), then the equational lemmas need their attributes, then they are registered as equation lemmas, finally the attributes are added to the main declaration.
  • I also fixup the library in many places to account for these changes simplifying the source files, only one new lemma was added, in src/analysis/normed/group/quotient.lean quotient_norm_mk_le' to replace the unprimed version in the proof of norm_normed_mk_le as simp got better thanks to the new simp lemmas introduced by this PR. Probably many more handwritten additive versions can now be deleted in a future PR, especially defs and instances.
  • All other library changes are just simplifications by using to additive for some hand generated declarations, and many more attributes on the generated lemmas.
  • The attribute mono is trickier as it contains for its parameter not actual exprs containing names but exprs making names from strings, so I don't see how to handle it right now. We now warn the user about this, and fix the library in a couple of places.

Estimated changes

modified theorem left_coset_assoc
modified theorem one_left_coset
modified theorem right_coset_assoc
modified theorem right_coset_one
deleted def foo0
deleted def foo1
deleted def foo2
deleted def foo3
deleted theorem foo4_test
deleted def foo5
deleted def foo6
deleted def foo7
deleted def foo_mul
deleted def nat_pi_has_one
deleted def pi_nat_has_one
deleted def some_def
added def test.foo0
added def test.foo1
added def test.foo2
added def test.foo3
added theorem test.foo4_test
added def test.foo5
added def test.foo6
added def test.foo7
added def test.foo_mul
added def test.some_def
added def test.{a
deleted def {a