用机器验证Toom-Cook乘法与整数评估点
Machine-Verifying Toom-Cook Multiplication with Integer Evaluation Points
AI总结:
本文通过机器验证证明了Toom-Cook乘法在一般整数评估点下的正确性,提出了一种基于阈值函数的终止保证方法,并利用Lean 4和AI工具Aristotle完成形式化证明。
摘要:
我们提出了一个机器验证的Toom-Cook乘法正确性证明,使用一般整数评估点。Toom-Cook是一种参数化于三元组$(k_x, k_y, \vec v)$的快速乘法算法,包含两个正整数分割大小$k_x, k_y$和一个不同评估点的向量$\vec v$。作为证明的一部分,我们验证了对于任何选择的$k_x+k_y-1$个不同的整数评估点,可以计算一个阈值函数$θ(k_x, k_y, \vec v)$,使得当算法的基案例问题大小超过此阈值时,无论操作数的值如何,算法的终止都得到保证。阈值公式通过获得Toom-Cook递归产生的子问题大小的上界来推导,不依赖于操作数;它仅依赖于$k_x$、$k_y$、$\vec v$和操作的基数$b$。我们用Lean 4编写证明,利用Mathlib库。我们形式化了算法、基案例阈值公式和关键引理陈述。然后使用AI定理证明器Aristotle协助完成算法正确性的机器验证。这个证明通过人类输入和AI协助的合成,展示了AI在自动化机器验证过程中的强大能力。
英文摘要:
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 obtain a formula for a base case threshold $θ(k_x, k_y, \vec v)$ sufficient to ensure termination 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 continuing capability of AI to automate the machine verification process.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。