Commit 2024-04-05 23:45 f7519d5e
View on Github →chore(Algebra/BigOperators/List): Use Std lemmas (#11725)
- Make
Algebra.BigOperators.List.Basic
,Data.List.Chain
not depend onData.Nat.Order.Basic
by usingNat
-specific Std lemmas rather than general mathlib ones. I leave theData.Nat.Basic
import sinceAlgebra.BigOperators.List.Basic
is algebra territory. - Make
Algebra.BigOperators.List.Basic
not 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
MonoidWithZero
lemmas fromAlgebra.BigOperators.List.Basic
toAlgebra.BigOperators.List.Lemmas
. - Move the content of
Algebra.BigOperators.List.Defs
toAlgebra.BigOperators.List.Basic
since 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.Zip
not depend onAlgebra.BigOperators.List.Basic
. - As a consequence, move the big operators lemmas that were in there to
Algebra.BigOperators.List.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
.