All Exercises
#37 Sum of the First n Odd Numbers
live.lean-lang.org
Pure Lean 4 · No Mathlib
MediumInduction

37. Sum of the First n Odd Numbers

Prove that the sum of the first `n` odd natural numbers `1 + 3 + 5 + … + (2n - 1)` equals `n * n` using induction and core `Nat` arithmetic. Keep the definition of `sumOdd` unchanged.

Target Theorem
theorem sum_odd_eq_sq (n : Nat) : sumOdd n = n * n
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).