Machine-Verifying Toom-Cook Multiplication with Integer Evaluation Points

๐Ÿ“… 2026-03-14
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
This study addresses the correctness and termination of the Toom-Cook fast multiplication algorithm under arbitrary integer evaluation points using formal methods. A formal model is constructed in Lean 4 leveraging the Mathlib library, with machine-assisted proofs carried out using the AI theorem prover Aristotle. The primary contribution lies in the first machine-verified proof of Toom-Cookโ€™s correctness for general integer evaluation points, along with the derivation of a base-case threshold function that depends solely on the operand size, evaluation points, and numeral base. This threshold guarantees algorithmic termination whenever the input size exceeds it. The work demonstrates the effectiveness and potential of humanโ€“AI collaboration in the automated formal verification of complex mathematical algorithms.

Technology Category

Application Category

๐Ÿ“ Abstract
We present a machine-verified proof of the correctness of Toom-Cook multiplication with generalized integer evaluation points. Toom-Cook is a class of fast multiplication algorithms parameterized by a triple $(k_x, k_y, \vec v)$ consisting of two positive integer split sizes $k_x, k_y$ and a vector $\vec v$ of distinct evaluation points. As part of our proof, we verify that for any selection of $k_x+k_y-1$ distinct integer evaluation points, we can compute a threshold function $ฮธ(k_x, k_y, \vec v)$ such that, if the algorithm's base-case problem size is set above this threshold, then the algorithm's termination is guaranteed regardless of the values of the operands. The threshold formula, which we derive by obtaining upper bounds on the subproblem sizes produced by the Toom-Cook recurrence, does not depend on the operands; it depends only on $k_x$, $k_y$, $\vec v$, and the base $b$ in which we operate. We write the proof in Lean 4, making use of the Mathlib library. We formalize the algorithm, our base case threshold formula, and our key lemma statements in Lean. We then use the AI theorem prover Aristotle to assist in completing the machine verification of the algorithm's correctness. This proof, through its synthesis of human input and AI assistance, demonstrates the considerable power of AI to automate the machine verification process.
Problem

Research questions and friction points this paper is trying to address.

Toom-Cook multiplication
machine verification
integer evaluation points
algorithm termination
formal proof
Innovation

Methods, ideas, or system contributions that make the work stand out.

Toom-Cook multiplication
machine verification
formal proof
termination threshold
AI-assisted theorem proving
๐Ÿ”Ž Similar Papers
No similar papers found.