arXiv · 2612.05731
A Mechanical Proof of Stirling's Approximation in ACL2(r)
Abstract
Stirling's approximation to the factorial function is used extensively in science, appearing, for example, in thermal physics, where it is used to calculate entropy. It is also relevant to computer science, where it can be used to estimate the log of the factorial function, resulting in the familiar O(n log n) bound for sorting. This paper describes a formalization in ACL2(r) of Stirling's approximation to the factorial function and its logarithm. Following the original mathematical derivation, the proofs proceed by first showing that Stirling's formula is correct up to a constant factor, then showing what the value of the constant must be. Along the way, an important equation due to Wallis is needed. This equation is especially significant to the ACL2 community, since its proof relies heavily on induction. The proof of Stirling's theorem and Wallis's formula also rely on the calculation of many integrals and the principle of integration by parts. As such, this formal proof serves both to validate ACL2(r)'s theory of integration, and to suggest some possible improvements.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Ruben Gamboa. 2026-12-03. A Mechanical Proof of Stirling's Approximation in ACL2(r). https://doi.org/10.4204/eptcs.459.1. https://searcharxiv.org/abs/2612.05731
Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.