formal methods in mathematics

Formally certifying number field invariants

arXiv:2607.26230

summary

The paper presents a Lean 4 formalization that certifies key invariants of number fields—such as discriminant, signature, unit groups modulo p‑th powers, and class groups—and uses it to verify many entries in the LMFDB database.

Abstract

Number fields, which generalize the rational numbers, are fundamental objects in number theory. Many of their key arithmetic properties are captured by invariants whose computation is among the central tasks of computational algebraic number theory and a focus of several computer algebra systems and databases. In this paper, we describe a Lean 4 formalization for certifying several of these number field invariants. Building on previous work on certifying rings of integers, we extend this certification approach to further invariants including the signature, the unit group modulo -th powers, and, ultimately, the class group. We also improve discriminant certification, allowing verifications for higher-degree number fields infeasible in previous work. We introduce structures based on representations of algebraic objects suited to computation, including reusable ones for certifying ideal arithmetic. Along the way, we formalize several underlying mathematical results, for instance on real closed fields and pseudo-remainder sequences, which are of independent interest. We apply our framework to verify hundreds of entries of the (LMFDB) concerning the discriminant, signature, class number, and class group structure of various number fields. To this end, we wrote a SageMath script that computes the certificates and outputs Lean proofs of the corresponding statements.

39 pages, 2 figures. Source code available at https://github.com/alainchmt/CertifyingInvariantsNF/tree/v1

Topics & keywords

#number fields#invariant certification#lean theorem prover#class group#discriminant#lmfdb verificationLean 4certifying invariantsdiscriminant certificationsignatureunit group modulo p-th powersclass groupSageMath scriptpseudo-remainder sequences
Formally certifying number field invariants · wovepaper