Stirling's formula
ProvedFamousTheorems.tendsto_stirlingSeq_sqrt_picombinatoricsmathlibreal-analysis
Stirling's approximation for the factorial.
Writing ,
which is the familiar
De Moivre established the form of the asymptotic with an unidentified constant; Stirling identified the constant as . The of the factorial is handled by comparing with , and the constant is pinned down by Wallis' product for — which is why appears in a statement about factorials at all.
It is the basic tool for asymptotics of binomial coefficients and hence for local limit theorems in probability and entropy estimates in combinatorics.
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
theorem tendsto_stirlingSeq_sqrt_pi :
Filter.Tendsto Stirling.stirlingSeq Filter.atTop (nhds (Real.sqrt Real.pi)) := by sorry
end FamousTheoremsSource
One of Freek Wiedijk's "100 theorems"; formalized in Mathlib. Proof here reduces to the corresponding Mathlib result.