You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lean4game/server/adam/Adam/Options/ArithSum.lean

15 lines
313 B
Plaintext

2 years ago
import Mathlib.Tactic.Ring
import Mathlib.Algebra.BigOperators.Fin
open BigOperators
lemma arithmetic_sum (n : ) : 2 * (∑ i : Fin (n + 1), ↑i) = n * (n + 1) := by
induction' n with n hn
simp
rw [Fin.sum_univ_castSucc]
rw [mul_add]
simp
rw [mul_add, hn]
simp_rw [Nat.succ_eq_one_add]
ring