LeanBET: Formally-verified surface area calculations in Lean

📅 2026-05-15
📈 Citations: 0
Influential: 0
📄 PDF

career value

181K/year
🤖 AI Summary
This study addresses the lack of formal correctness guarantees in algorithms for BET specific surface area computation by presenting the first complete formalization of the BETSI workflow in Lean 4. The resulting executable and formally verified analysis pipeline unifies real-number theory with floating-point implementation, encompassing window enumeration, monotonicity checking, inflection point selection, and linear regression. Crucially, the BET linearization formula and key computational steps undergo rigorous algebraic verification within the proof assistant. Evaluation on 19 standard adsorption isotherm datasets demonstrates excellent agreement with the reference BETSI implementation—achieving exact matches in 18 cases and a negligible deviation of only 0.03% in the remaining one—thereby confirming the feasibility and reliability of integrating scientific computing with formal methods.
📝 Abstract
The Brunauer--Emmett--Teller (BET) method is a standard tool for estimating surface areas from adsorption isotherms, yet practical implementations involve multiple algorithmic steps whose correctness is rarely made explicit. In this work, we present a fully executable and formally verified BET analysis pipeline implemented in the Lean~4 theorem prover. Our formalization covers the complete BET Surface Identification (BETSI)-style workflow, including window enumeration, monotonicity checks, knee selection, and linear regression. We carry out computations in floating-point arithmetic and develop the corresponding correctness proofs over the real numbers, using a shared polymorphic implementation that supports both. On the proof side, we show that the regression coefficients returned by the algorithm agree with their specification-level definitions and minimize the least-squares error under the stated assumptions. We also formalize the algebraic derivation of the BET linearized expression and connect that result directly to the executable analysis pipeline. We further prove that the window enumeration is sound and complete, and that the admissibility checks and knee-based selection satisfy their formal specifications. We evaluate the implementation against the BETSI reference method on benchmark adsorption isotherms. Compared to BETSI, LeanBET agrees to machine precision for 18 of the 19 isotherms, with only a 0.03\% deviation for the UiO-66 dataset. This demonstrates that a scientific computing workflow can be built in Lean, yielding both formal verification guarantees and numerical agreement with an established Python reference implementation.
Problem

Research questions and friction points this paper is trying to address.

BET method
surface area calculation
formal verification
adsorption isotherms
algorithmic correctness
Innovation

Methods, ideas, or system contributions that make the work stand out.

formal verification
BET analysis
Lean 4
scientific computing
floating-point arithmetic
🔎 Similar Papers
2024-03-20Conference on Empirical Methods in Natural Language ProcessingCitations: 1
E
Ejike D. Ugwuanyi
Department of Chemical, Biochemical, and Environmental Engineering, University of Maryland, Baltimore County, Baltimore, MD, USA
C
Colin T. Jones
Department of Chemical, Biochemical, and Environmental Engineering, University of Maryland, Baltimore County, Baltimore, MD, USA
J
John Velkey
Department of Chemical, Biochemical, and Environmental Engineering, University of Maryland, Baltimore County, Baltimore, MD, USA
Tyler R. Josephson
Tyler R. Josephson
Assistant Professor, Chemical, Biochemical, and Environmental Engineering
AI & Theory-Oriented Molecular Science