Commit 2026-06-25 19:06 5c985547
View on Github →feat(Algebra/Order/Antidiag/Prod): add HasMulAntidiagonal (#38623)
We add a multiplicative version of Finset.HasAntidiagonal, called Finset.HasMulAntidiagonal. This requires some naming changes (since otherwise, for instance, there would be a clash between Finset.swap_mem_mulAntidiagonal and the corresponding lemma in Mathlib.Algebra.Order.Antidiag.Prod).
We made the following naming choices:
- Since the additive version will be much more commonly used, we still keep
Finset.HasAntidiagonalfor the additive version, and translatemulAntidiagonaltoantidiagonalrather than toaddAntidiagonal. Note that in particular this affects the API in Mathlib.Data.Finset.MulAntidiagonal, which usedaddAntidiagonal. - We move most of the results in
Mathlib.Algebra.Order.Antidiag.Prodinto theHas(Mul)Antidiagonalnamespace, so that e.g.Finset.swap_mem_antidiagonalandFinset.HasAntidiagonal.mem_antidiagonalcan co-exist. Note that some deprecation tags (e.g., for Finset.antidiagonal, Finset.antidiagonal.fst_le, ...) are intentionally missing. The reason is thatantidiagonaland related lemmas are normally used inside an openFinsetnamespace, and since these declarations have moved intoFinset.HasAntidiagonal, the deprecation causes errors which would require to explicitly addHasAntidiagonalin many places. An easier solution is just to openFinset.HasAntidiagonal, after which the preexisting code works. Co-authored-by : @xgenereux