Formalizing dimensional analysis using the Lean theorem prover

dc.contributor.authorBobbin, Maxwell P.
dc.contributor.authorJones, Colin
dc.contributor.authorVelkey, John
dc.contributor.authorJosephson, Tyler R.
dc.date.accessioned2025-10-22T19:57:49Z
dc.date.issued2025-09-16
dc.description.abstractDimensional analysis is fundamental to the formulation and validation of physical laws, ensuring that equations are dimensionally homogeneous and scientifically meaningful. In this work, we use Lean 4 to formalize the mathematics of dimensional analysis. We define physical dimensions as mappings from base dimensions to exponents, prove that they form an Abelian group under multiplication, and implement derived dimensions and dimensional homogeneity theorems. Building on this foundation, we introduce a definition of physical variables that combines numeric values with dimensions, extend the framework to incorporate SI base units and fundamental constants, and implement the Buckingham Pi Theorem. Finally, we demonstrate the approach on an example: the Lennard-Jones potential, where our framework enforces dimensional consistency and enables formal proofs of physical properties such as zero-energy separation and the force law. This work establishes a reusable, formally verified framework for dimensional analysis in Lean, providing a foundation for future libraries in formalized science and a pathway toward scientific computing environments with built-in guarantees of dimensional correctness.
dc.description.sponsorshipWe are grateful to the Lean prover community and contributors of Mathlib on whose work this project is built. We especially acknowledge the work of Joseph Tooby-Smith and Alfredo Moriera-Rosa, who created independent formulations of physical variables in varying states of implementation. These can be found here and here, respectively. Alfredo Moriera-Rosa and Terence Tao provided inspiration and advice in formulating the cast function and tactic to make the graded structure work for physical variables. This material is based on work supported by the National Science Foundation (NSF) CAREER Award #2236769
dc.description.urihttp://arxiv.org/abs/2509.13142
dc.format.extent19 pages
dc.genrejournal articles
dc.genrepreprints
dc.identifierdoi:10.13016/m2cov8-qyt9
dc.identifier.urihttps://doi.org/10.48550/arXiv.2509.13142
dc.identifier.urihttp://hdl.handle.net/11603/40502
dc.language.isoen
dc.relation.isAvailableAtThe University of Maryland, Baltimore County (UMBC)
dc.relation.ispartofUMBC Student Collection
dc.relation.ispartofUMBC Chemical, Biochemical & Environmental Engineering Department
dc.relation.ispartofUMBC Faculty Collection
dc.rightsAttribution-NonCommercial-ShareAlike 4.0 International
dc.rights.urihttps://creativecommons.org/licenses/by-nc-sa/4.0/
dc.subjectUMBC ATOMS Lab
dc.subjectPhysics - Chemical Physics
dc.titleFormalizing dimensional analysis using the Lean theorem prover
dc.typeText
dcterms.creatorhttps://orcid.org/0000-0002-0100-0227

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
2509.13142v1.pdf
Size:
742.72 KB
Format:
Adobe Portable Document Format