The areas / V03. Sets, finite structures and big operators
Mathlib.Algebra.BigOperators.Group.List.Defs
14 declarations and 2 deprecated aliases. Mathlib docs · Source
def List.alternatingSum E1 #
{G : Type u_4} → [Zero G] → [Add G] → [Neg G] → List G → G
The alternating sum of a list.
def List.alternatingProd E1 #
{G : Type u_4} → [One G] → [Mul G] → [Inv G] → List G → G
The alternating product of a list.
theorem List.prod_induction E1 #
∀ {M : Type u_2} [inst : Mul M] [inst_1 : One M] {l : List M} (p : M → Prop),
(∀ (a b : M), p a → p b → p (a * b)) → p 1 → (∀ x ∈ l, p x) → p l.prod
theorem List.sum_induction E1 #
∀ {M : Type u_2} [inst : Add M] [inst_1 : Zero M] {l : List M} (p : M → Prop),
(∀ (a b : M), p a → p b → p (a + b)) → p 0 → (∀ x ∈ l, p x) → p l.sum
theorem List.sum_map_zero E1 #
∀ {ι : Type u_1} {M : Type u_2} [inst : AddZeroClass M] {l : List ι}, (List.map (fun x ↦ 0) l).sum = 0
theorem List.prod_map_one E1 #
∀ {ι : Type u_1} {M : Type u_2} [inst : MulOneClass M] {l : List ι}, (List.map (fun x ↦ 1) l).prod = 1
theorem List.sum_induction_nonempty E1 #
∀ {M : Type u_2} [inst : AddZeroClass M] {l : List M} (p : M → Prop),
(∀ (a b : M), p a → p b → p (a + b)) → l ≠ [] → (∀ x ∈ l, p x) → p l.sum
theorem List.prod_induction_nonempty E1 #
∀ {M : Type u_2} [inst : MulOneClass M] {l : List M} (p : M → Prop),
(∀ (a b : M), p a → p b → p (a * b)) → l ≠ [] → (∀ x ∈ l, p x) → p l.prod
theorem List.sum_replicate E0 #
∀ {M : Type u_2} [inst : AddMonoid M] (n : ℕ) (a : M), (List.replicate n a).sum = n • a
theorem List.prod_replicate E0 #
∀ {M : Type u_2} [inst : Monoid M] (n : ℕ) (a : M), (List.replicate n a).prod = a ^ n
theorem List.sum_eq_length_nsmul E1 #
∀ {M : Type u_2} [inst : AddMonoid M] (l : List M) (m : M), (∀ x ∈ l, x = m) → l.sum = l.length • m
theorem List.prod_eq_pow_length E1 #
∀ {M : Type u_2} [inst : Monoid M] (l : List M) (m : M), (∀ x ∈ l, x = m) → l.prod = m ^ l.length
theorem List.sum_hom_rel E1 #
∀ {ι : Type u_1} {M : Type u_2} {N : Type u_3} [inst : AddMonoid M] [inst_1 : AddMonoid N] (l : List ι)
{r : M → N → Prop} {f : ι → M} {g : ι → N},
r 0 0 → (∀ ⦃i : ι⦄ ⦃a : M⦄ ⦃b : N⦄, r a b → r (f i + a) (g i + b)) → r (List.map f l).sum (List.map g l).sum
theorem List.prod_hom_rel E1 #
∀ {ι : Type u_1} {M : Type u_2} {N : Type u_3} [inst : Monoid M] [inst_1 : Monoid N] (l : List ι) {r : M → N → Prop}
{f : ι → M} {g : ι → N},
r 1 1 → (∀ ⦃i : ι⦄ ⦃a : M⦄ ⦃b : N⦄, r a b → r (f i * a) (g i * b)) → r (List.map f l).prod (List.map g l).prod
Deprecated aliases
| Name | New name | Since |
|---|---|---|
List.prod_eq_pow_card | List.prod_eq_pow_length | 2026-08-26 |
List.sum_eq_card_nsmul | List.sum_eq_length_nsmul | 2026-08-26 |