Formalization of Amicable Numbers Theory
Zhipeng Chen, Haolun Tang, Jingyi Zhan

TL;DR
This paper formalizes the theory of amicable numbers in Lean 4, proving classical theorems, verifying famous pairs, and formalizing advanced concepts like sociable and betrothed numbers with extensive automated proof techniques.
Contribution
It provides the first complete formal proof of Th ext={a}bit's formula, Euler's rule, and the Borho-Hoffmann breeding method in Lean 4, advancing formal number theory verification.
Findings
Formal proof of Th ext={a}bit's formula and rule
Verification of famous amicable pairs and cycles
Complete formalization of breeding method and extensions
Abstract
This paper presents a formalization of the theory of amicable numbers in the Lean~4 proof assistant. Two positive integers and are called an amicable pair if the sum of proper divisors of equals and the sum of proper divisors of equals . Our formalization introduces the proper divisor sum function , defines the concepts of amicable pairs and amicable numbers, and computationally verifies historically famous amicable pairs. Furthermore, we formalize basic structural theorems, including symmetry, non-triviality, and connections to abundant/deficient numbers. A key contribution is the complete formal proof of the classical Th\={a}bit formula (9th century), using index-shifting and the \texttt{zify} tactic. Additionally, we provide complete formal proofs of both Th\={a}bit's rule and Euler's generalized rule (1747), two fundamental…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Polynomial and algebraic computation · Computability, Logic, AI Algorithms
