mathlib4
mathlib4 copied to clipboard
chore(Data/List/BigOperators): Use Std lemmas
trafficstars
- Make
Data.List.BigOperators.Basic,Data.List.Chainnot depend onData.Nat.Order.Basicby usingNat-specific Std lemmas rather than general mathlib ones. I leave theData.Nat.Basicimport sinceData.List.BigOperators.Basicis algebra territory. - As a consequence, move the order lemmas from
Data.List.BigOperators.Basicto a newly created fileData.List.BigOperators.Order. Crediting Yakov for https://github.com/leanprover-community/mathlib/pull/8543. - Also move the order lemmas from
Data.List.BigOperators.LemmastoData.List.BigOperators.Order - Also move the order lemmas from
Algebra.BigOperators.Multiset.LemmastoAlgebra.BigOperators.Multiset.Order - Make
Data.List.BigOperators.Basicnot depend onAlgebra.Divisibility.Basic. I'm not too sure about that one since they already are algebra. My motivation is that they involve ring-like objects while big operators are about group-like objects, but this is in some sense a second order refactor. - As a consequence, move the divisibility and
MonoidWithZerolemmas fromData.List.BigOperators.BasictoData.List.BigOperators.Lemmas. - Move the content of
Data.List.BigOperators.DefstoMathlib.Data.List.BigOperators.Basicsince no file imported the former without the latter and their imports are becoming very close after this PR. - Make
Data.List.Count,Data.List.Dedup,Data.List.ProdSigma,Data.List.Zipnot depend onData.List.BigOperators.Basic. - As a consequence, move the big operators lemmas that were in there to
Data.List.BigOperators.Basic. For the lemmas that wereNat-specific, keep a version of them stated usingNat.sum. - To help with this, add
Nat.sum_eq_listSum (l : List Nat) : Nat.sum l = l.sum.
Before
After
- [ ] depends on: #11741