Sums and products from lists #
This file provides further results about List.prod, List.sum,
which calculate the product and sum of elements of a list
and List.alternatingProd, List.alternatingSum, their alternating counterparts.
theorem
List.drop_take_succ_flatten_eq_getElem
{α : Type u_2}
(L : List (List α))
(i : ℕ)
(h : i < L.length)
:
In a flatten of sublists, taking the slice between the indices A and B - 1 gives back the
original sublist of index i if A is the sum of the lengths of sublists of index < i, and
B is the sum of the lengths of sublists of index ≤ i.
theorem
List.Sublist.prod_dvd_prod
{M : Type u_4}
[CommMonoid M]
{l₁ l₂ : List M}
(h : l₁.Sublist l₂)
: