theorem
Commute.list_sum_right
{R : Type u_8}
[NonUnitalNonAssocSemiring R]
(a : R)
(l : List R)
(h : ∀ (b : R), b ∈ l → Commute a b)
:
theorem
Commute.list_sum_left
{R : Type u_8}
[NonUnitalNonAssocSemiring R]
(b : R)
(l : List R)
(h : ∀ (a : R), a ∈ l → Commute a b)
:
theorem
List.card_nsmul_le_sum
{M : Type u_3}
[AddMonoid M]
[Preorder M]
[CovariantClass M M (Function.swap fun (x x_1 : M) => x + x_1) fun (x x_1 : M) => x ≤ x_1]
[CovariantClass M M (fun (x x_1 : M) => x + x_1) fun (x x_1 : M) => x ≤ x_1]
(l : List M)
(n : M)
(h : ∀ (x : M), x ∈ l → n ≤ x)
:
List.length l • n ≤ List.sum l
theorem
List.pow_card_le_prod
{M : Type u_3}
[Monoid M]
[Preorder M]
[CovariantClass M M (Function.swap fun (x x_1 : M) => x * x_1) fun (x x_1 : M) => x ≤ x_1]
[CovariantClass M M (fun (x x_1 : M) => x * x_1) fun (x x_1 : M) => x ≤ x_1]
(l : List M)
(n : M)
(h : ∀ (x : M), x ∈ l → n ≤ x)
:
n ^ List.length l ≤ List.prod l
theorem
List.length_le_sum_of_one_le
(L : List ℕ)
(h : ∀ (i : ℕ), i ∈ L → 1 ≤ i)
:
List.length L ≤ List.sum L
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_sum
{R : Type u_8}
[NonUnitalSemiring R]
{a : R}
{l : List R}
(h : ∀ (x : R), x ∈ l → a ∣ x)
:
theorem
List.alternatingSum_append
{α : Type u_2}
[AddCommGroup α]
(l₁ : List α)
(l₂ : List α)
:
List.alternatingSum (l₁ ++ l₂) = List.alternatingSum l₁ + (-1) ^ List.length l₁ • List.alternatingSum l₂
theorem
List.alternatingProd_append
{α : Type u_2}
[CommGroup α]
(l₁ : List α)
(l₂ : List α)
:
List.alternatingProd (l₁ ++ l₂) = List.alternatingProd l₁ * List.alternatingProd l₂ ^ (-1) ^ List.length l₁
theorem
List.alternatingSum_reverse
{α : Type u_2}
[AddCommGroup α]
(l : List α)
:
List.alternatingSum (List.reverse l) = (-1) ^ (List.length l + 1) • List.alternatingSum l
theorem
List.alternatingProd_reverse
{α : Type u_2}
[CommGroup α]
(l : List α)
:
List.alternatingProd (List.reverse l) = List.alternatingProd l ^ (-1) ^ (List.length l + 1)
theorem
MulOpposite.op_list_prod
{M : Type u_3}
[Monoid M]
(l : List M)
:
MulOpposite.op (List.prod l) = List.prod (List.reverse (List.map MulOpposite.op l))
theorem
MulOpposite.unop_list_prod
{M : Type u_3}
[Monoid M]
(l : List Mᵐᵒᵖ)
:
MulOpposite.unop (List.prod l) = List.prod (List.reverse (List.map MulOpposite.unop l))
theorem
unop_map_list_prod
{M : Type u_3}
{N : Type u_4}
[Monoid M]
[Monoid N]
{F : Type u_9}
[FunLike F M Nᵐᵒᵖ]
[MonoidHomClass F M Nᵐᵒᵖ]
(f : F)
(l : List M)
:
MulOpposite.unop (f (List.prod l)) = List.prod (List.reverse (List.map (MulOpposite.unop ∘ ⇑f) l))
A morphism into the opposite monoid acts on the product by acting on the reversed elements.
@[deprecated unop_map_list_prod]
theorem
MonoidHom.unop_map_list_prod
{M : Type u_3}
{N : Type u_4}
[Monoid M]
[Monoid N]
(f : M →* Nᵐᵒᵖ)
(l : List M)
:
MulOpposite.unop (f (List.prod l)) = List.prod (List.reverse (List.map (MulOpposite.unop ∘ ⇑f) l))
A morphism into the opposite monoid acts on the product by acting on the reversed elements.