Physics as Code: From Scans to Theorems with ITP APIs in $SU(5)$ Model Building
This provides a correctness-first, reusable workflow for theoretical physicists to handle combinatorially difficult model-building problems with theorem-backed guarantees, though it is incremental as it builds on existing ITP methods in a specific domain.
The paper tackles the challenge of making reliable global statements about large model spaces in theoretical physics by formalizing model-building problems inside an interactive theorem prover (Lean), resulting in a formally verified classification of bounded charge spectra in an SU(5) case study that shows every viable spectrum arises from finitely many minimal top-Yukawa witnesses with controlled completions.
A recurring challenge in theoretical physics is to make reliable global statements about bounded but combinatorially large model spaces. Exhaustive scans quickly become opaque or impractical, while statistical exploration does not by itself provide theorem-backed guarantees. This motivates workflows in which the model-building problem itself is formalized inside an interactive theorem prover (ITP). In this paper we develop an API-based methodology for formalizing such bounded model-building questions inside Lean, an interactive theorem prover. The central step is to represent the relevant charge spectra, predicates, and reduction moves as reusable ITP definitions, and then to derive the classification from proved reduction theorems rather than from an ad hoc scan. We demonstrate the strategy in a concrete $SU(5)$ case study motivated by F-theory model building with additional Abelian symmetries. At the charge-spectrum layer, we classify bounded spectra that admit a top-quark Yukawa coupling, avoid a selected set of dangerous operators, and satisfy a minimal charge-spectrum completeness condition. Our main result shows that every such spectrum in the bounded search space arises from finitely many minimal top-Yukawa witnesses together with controlled completions and certified closure steps. This classification represents a formally verified description of the full viable class in the charge-spectrum setting studied here. The development is implemented inside PhysLib as reusable infrastructure rather than as a one-off verification script. It provides a proof of principle for how interactive theorem provers can turn combinatorially difficult model-building problems into correctness-first, reusable workflows, and we discuss how the resulting certified classification can serve as reliable input for downstream analyses.