vix.ing · top · new · best · stats · spec

Formal verification of Zagier's one-sentence proof

2021/03/21 by Guillaume Dubach, Dubach, Guillaume, Fabian Muehlboeck +1
Computer Science · Mathematics · #11P81 (Secondary) #68V15 (Primary) 68V20 #Computability, Logic, AI Algorithms #FOS: Computer and information sciences #FOS: Mathematics #History and Theory of Mathematics #Logic in Computer Science (cs.LO) #Logic, programming, and type systems #Number Theory (math.NT)

paper · pdf · doi:10.48550/arxiv.2103.11389

openalex publication_date 2021/03/21 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

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 + 2 b2.

Related