theorems.fun
a working notebook of open problems ↘
theorems / gauss_sum

Sum of the first n naturals

Closed

Posted about 1 month ago · proven 20 days ago

Theorem & proof · gauss_sum.lean · ✓ verified
1 2 3 4 5 6 7
import Mathlib

theorem gauss_sum (n : Nat) : 2 * (∑ i ∈ Finset.range (n + 1), i) = n * (n + 1) :=by
  rw [mul_comm 2]
  rw [Finset.sum_range_id_mul_two (n + 1)]
  rw [Nat.add_sub_cancel]
  ring
Rewards pledged

No rewards pledged yet.