Zulip Chat Archive
Stream: Is there code for X?
Topic: telescoping sum
Rémy Degenne (Jan 05 2021 at 08:31):
Is there code for the following lemma:
lemma telescoping_sum {α} [add_comm_group α] (f : ℕ → α) (n : ℕ) :
f (n+1) = f 0 + ∑ i in finset.range (n+1), (f (i+1) - f i) :=
sorry
Thanks!
Bryan Gin-ge Chen (Jan 05 2021 at 08:33):
Rémy Degenne (Jan 05 2021 at 08:34):
Great! Thank you!
Yakov Pechersky (Jan 05 2021 at 08:36):
Brute force:
import algebra.big_operators
import tactic.ring
open_locale big_operators
lemma telescoping_sum {α} [add_comm_group α] (f : ℕ → α) (n : ℕ) :
f (n+1) = f 0 + ∑ i in finset.range (n+1), (f (i+1) - f i) :=
begin
induction n with n hn,
{ simp },
{ rw [finset.sum_range_succ, hn],
abel,
simp },
end
Yakov Pechersky (Jan 05 2021 at 08:37):
Ah, there are nice induction principles for it. Oh well!
Last updated: Dec 20 2023 at 11:08 UTC