The sum of an arithmetic series
ProvedFamousTheorems.sum_range_idcalculusmathlibreal-analysis
The sum of the first natural numbers.
Pairing the first and last terms, the second and second-to-last, and so on gives pairs each summing to — the argument attributed to the schoolboy Gauss.
It is the case of the arithmetic series formula and the first of the power sums , whose general form involves Bernoulli numbers.
Formalization note. The sum runs over Finset.range n , and the division
is natural-number division, exact here since is always even.
Preamble
import Mathlib
Formal statement
namespace FamousTheorems theorem sum_range_id : ∀ n : ℕ, ∑ i ∈ Finset.range n, i = n * (n - 1) / 2 := by sorry end FamousTheorems
Source
One of Freek Wiedijk's "100 theorems"; formalized in Mathlib. Proof here reduces to the corresponding Mathlib result.