Zulip Chat Archive
Stream: new members
Topic: Separating the left-most term in a sum of Finset.range
spamegg (Mar 03 2025 at 12:58):
import Mathlib
example (p : ℕ) : ∑ i ∈ Finset.range p, i = 0 + ∑ i ∈ Finset.Icc 1 (p-1), i := by
sorry
Ruben Van de Velde (Mar 03 2025 at 13:01):
docs#Finset.sum_range_succ' is close
Zhang Qinchuan (Mar 04 2025 at 02:04):
If p=0,1
then your statement is correct by accident.
import Mathlib
example (p : ℕ) : ∑ i ∈ Finset.range p, i = 0 + ∑ i ∈ Finset.Icc 1 (p - 1), i := by
match p with
| 0 => norm_num
| 1 => norm_num
| p + 2 =>
rw [show p + 2 = (p + 2 - 1) + 1 by omega, Finset.sum_range_succ', add_zero, zero_add]
calc
_ = ∑ i ∈ Finset.Ico 1 (p + 2), i := by
rw [Finset.sum_Ico_eq_sum_range]
apply Finset.sum_congr
. congr
. intros; rw [add_comm]
_ = ∑ i ∈ Finset.Icc 1 (p + 1), i := by congr
_ = _ := by congr
Last updated: May 02 2025 at 03:31 UTC