Skip to content

Commit 8d26c83

Browse files
Paul-Lezxgenereux
andcommitted
feat(Data/List/Basic): lemma about sums of lists (leanprover-community#37407)
Co-authored-by: Xavier Genereux <xaviergenereux@hotmail.com>
1 parent c228d44 commit 8d26c83

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Mathlib/Algebra/BigOperators/Group/List/Basic.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ theorem mul_prod_eraseIdx {i} (hlen : i < l.length) (hcomm : ∀ a' ∈ l.take i
216216
hcomm a' (by rwa [take_eraseIdx_eq_take_of_le l i i (Nat.le_refl i)] at a'_mem)),
217217
insertIdx_eraseIdx_getElem hlen]
218218

219+
@[to_additive (attr := simp)]
220+
theorem prod_filter_bne_one [BEq M] [LawfulBEq M] (l : List M) :
221+
(l.filter (· != 1)).prod = l.prod := by
222+
classical induction l <;> grind
223+
219224
end Monoid
220225

221226
section CommMonoid

0 commit comments

Comments
 (0)