English

Formal verification of Zagier's one-sentence proof

Logic in Computer Science 2021-04-27 v2 Number Theory

Abstract

We comment on two formal proofs of Fermat's sum of two squares theorem, written using the Mathematical Components libraries of the Coq proof assistant. The first one follows Zagier's celebrated one-sentence proof; the second follows David Christopher's more recent proof relying on partition-theoretic arguments. Both formal proofs rely on a general property of involutions of finite sets, of independent interest. The proof technique consists for the most part of automating recurrent tasks (such as case distinctions and computations on natural numbers) via ad hoc tactics. With the same method, we also provide a formal proof of another classical result on primes of the form a2+2b2a^2 + 2 b^2.

Keywords

Cite

@article{arxiv.2103.11389,
  title  = {Formal verification of Zagier's one-sentence proof},
  author = {Guillaume Dubach and Fabian Muehlboeck},
  journal= {arXiv preprint arXiv:2103.11389},
  year   = {2021}
}

Comments

13 pages, 6 figures