Summation by parts (Abel summation) for natural-number sequences #
Pure-ℕ summation by parts (Abel summation) for a non-increasing sequence b : ℕ → ℕ, avoiding
cast round-trips through ℤ.
Main results #
Nat.sum_mul_eq_sum_prefix_sub: ifb (i + 1) ≤ b ifor alli < m, then∑ i ∈ Finset.range (m + 1), a i * b iequals(∑ i ∈ Finset.range m, (∑ j ∈ Finset.range (i + 1), a j) * (b i - b (i + 1))) +(∑ j ∈ Finset.range (m + 1), a j) * b m.
theorem Nat.sum_mul_eq_sum_prefix_sub (a b : ℕ → ℕ) (m : ℕ) :
(∀ i < m, b (i + 1) ≤ b i) →
∑ i ∈ Finset.range (m + 1), a i * b i = ∑ i ∈ Finset.range m, (∑ j ∈ Finset.range (i + 1), a j) * (b i - b (i + 1)) + (∑ j ∈ Finset.range (m + 1), a j) * b m
Pure-ℕ summation by parts (Abel summation) for a non-increasing sequence b.