/-- Each row of Pascal's triangle adds up to `2ⁿ`.
Hint: `Lumenary.Combinatorics.binomial_one_add (1 : ℕ) n` says
`(1 + 1) ^ n = ∑ k ∈ range (n + 1), (n.choose k : ℕ) * 1 ^ k`; `simpa` can tidy it up. -/
theorem row_sum (n : ℕ) : ∑ k ∈ range (n + 1), n.choose k = 2 ^ n := by
sorryShow the compiled solution
/-- **Each row of Pascal's triangle adds up to a power of two:** `Σₖ C(n, k) = 2ⁿ`.
Put `x = 1` in `binomial_one_add`. (Counting proof: both sides count all subsets of an
`n`-element set.) -/
theorem row_sum (n : ℕ) : ∑ k ∈ range (n + 1), n.choose k = 2 ^ n := by
have h := binomial_one_add (1 : ℕ) n
simpa [one_add_one_eq_two] using h.symmAxioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Combinatorics.leanTry it in the Lean web editor