mathlib3 documentation

data.list.big_operators.lemmas

Lemmas about list.sum and list.prod requiring extra algebra imports #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

theorem commute.list_sum_right {R : Type u_8} [non_unital_non_assoc_semiring R] (a : R) (l : list R) (h : (b : R), b l commute a b) :
theorem commute.list_sum_left {R : Type u_8} [non_unital_non_assoc_semiring R] (b : R) (l : list R) (h : (a : R), a l commute a b) :
theorem list.pow_card_le_prod {M : Type u_3} [monoid M] [preorder M] [covariant_class M M (function.swap has_mul.mul) has_le.le] [covariant_class M M has_mul.mul has_le.le] (l : list M) (n : M) (h : (x : M), x l n x) :
theorem list.card_nsmul_le_sum {M : Type u_3} [add_monoid M] [preorder M] [covariant_class M M (function.swap has_add.add) has_le.le] [covariant_class M M has_add.add has_le.le] (l : list M) (n : M) (h : (x : M), x l n x) :
theorem list.sum_eq_zero_iff {M : Type u_3} [canonically_ordered_add_monoid M] (l : list M) :
l.sum = 0 (x : M), x l x = 0
theorem list.prod_eq_one_iff {M : Type u_3} [canonically_ordered_monoid M] (l : list M) :
l.prod = 1 (x : M), x l x = 1
theorem list.neg_one_mem_of_prod_eq_neg_one {l : list } (h : l.prod = -1) :
-1 l

If a product of integers is -1, then at least one factor must be -1.

theorem list.length_le_sum_of_one_le (L : list ) (h : (i : ), i L 1 i) :

If all elements in a list are bounded below by 1, then the length of the list is bounded by the sum of the elements.

theorem list.dvd_prod {M : Type u_3} [comm_monoid M] {a : M} {l : list M} (ha : a l) :
a l.prod
theorem list.dvd_sum {R : Type u_8} [semiring R] {a : R} {l : list R} (h : (x : R), x l a x) :
a l.sum
theorem list.alternating_prod_append {α : Type u_2} [comm_group α] (l₁ l₂ : list α) :
(l₁ ++ l₂).alternating_prod = l₁.alternating_prod * l₂.alternating_prod ^ (-1) ^ l₁.length
theorem list.alternating_sum_append {α : Type u_2} [add_comm_group α] (l₁ l₂ : list α) :
(l₁ ++ l₂).alternating_sum = l₁.alternating_sum + (-1) ^ l₁.length l₂.alternating_sum
theorem list.sum_map_mul_left {ι : Type u_1} {R : Type u_8} [non_unital_non_assoc_semiring R] (L : list ι) (f : ι R) (r : R) :
(list.map (λ (b : ι), r * f b) L).sum = r * (list.map f L).sum
theorem list.sum_map_mul_right {ι : Type u_1} {R : Type u_8} [non_unital_non_assoc_semiring R] (L : list ι) (f : ι R) (r : R) :
(list.map (λ (b : ι), f b * r) L).sum = (list.map f L).sum * r
theorem unop_map_list_prod {M : Type u_3} {N : Type u_4} [monoid M] [monoid N] {F : Type u_1} [monoid_hom_class F M Nᵐᵒᵖ] (f : F) (l : list M) :

A morphism into the opposite monoid acts on the product by acting on the reversed elements.

@[protected]

A morphism into the opposite monoid acts on the product by acting on the reversed elements.

Deprecated, use _root_.unop_map_list_prod instead.