The binomial theorem
ProvedFamousTheorems.add_powcombinatoricsmathlib
The binomial theorem.
Expanding the product of factors, each term chooses from of them and from the rest, and there are such choices — so the theorem is a counting statement, which is why it holds over any commutative semiring.
Known in special cases to Euclid and in general to al-Karaji and Pascal; Newton's extension to non-integer exponents as an infinite series opened the way to power-series analysis. Setting gives , and gives the alternating sum .
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
theorem add_pow : ∀ {R : Type*} [CommSemiring R] (x y : R) (n : ℕ),
(x + y) ^ n = ∑ k ∈ Finset.range (n + 1), x ^ k * y ^ (n - k) * (n.choose k) := by sorry
end FamousTheoremsSource
One of Freek Wiedijk's "100 theorems"; formalized in Mathlib. Proof here reduces to the corresponding Mathlib result.