中文

Lean 4 中 Ramanujan--Nagell 定理的形式化证明

数论 2026-04-14 v1 计算机科学中的逻辑

摘要

我们在 Lean interactive theorem prover 以及 Mathlib library 中,对 Ramanujan--Nagell 定理进行了完整的 formalization:该定理指出,Diophantine 方程 x2+7=2nx^2 + 7 = 2^n 的唯一整数解为 (n,x){(3,±1),(4,±3),(5,±5),(7,±11),(15,±181)}(n,x) \in \{(3,\pm1),(4,\pm3),(5,\pm5),(7,\pm11),(15,\pm181)\}。该 formalization 包括所有依赖项,尤其是计算二次域 Q(7)\mathbb{Q}(\sqrt{-7}) 的整数环、其 class number 和 unit group。我们描述了 proof strategy、formalization 的 architecture,以及在桥接 textbook proofs 与 machine-checked 版本之间的挑战,特别关注所需的 algebraic number theory 基础设施。

关键词

引用

@article{arxiv.2604.09808,
  title  = {A formal proof of the Ramanujan--Nagell theorem in Lean 4},
  author = {Barinder S. Banwait},
  journal= {arXiv preprint arXiv:2604.09808},
  year   = {2026}
}

备注

15 pages, 1 figure, comments welcome