All Exercises
#40 Sum of Squares Formula
live.lean-lang.org
Pure Lean 4 · No Mathlib
HardInduction

40. Sum of Squares Formula

Prove the closed-form sum of squares identity `6 * (1² + 2² + … + n²) = n * (n + 1) * (2n + 1)` using induction and pure Lean 4 `Nat` algebra (no `ring` tactic or Mathlib required). Keep the definition of `sumSq` unchanged.

Target Theorem
theorem sum_squares_formula (n : Nat) : 6 * sumSq n = n * (n + 1) * (2 * n + 1)
Hints (0/3)

Stuck? Reveal hints one step at a time without spoiling the full proof.

Symbols:
Initializing Lean 4 editor…
Infoview & Diagnosticsline 1idle
Write your proof above and click Submit Proof (or open in live.lean-lang.org).