一句话:从构造性证明中提取经形式验证的精确实数极限计算算法,并在 Minlog 与 Haskell 中实现。
本文研究二进制带符号数字(binary signed digit, BSD)表示下实数极限的构造性与形式化计算。作者将实数表示为 BSD 流,在 Minlog 证明系统中形式化“实数对极限封闭”的构造性证明,并通过程序抽取获得经验证的算法:输入收敛的 BSD 流序列及收敛模数,输出其极限的 BSD 表示。文章比较两种证明路径:直接证明,以及借助有理数 Cauchy 序列表示、两种表示间转换和 Cauchy 实数完备性的简短证明。抽取项进一步翻译为 Haskell。应用包括用 Heron 方法计算平方根,以及证明 BSD 表示对乘法封闭。正确性由程序抽取的可靠性定理保证。
We extract verified algorithms for exact real number computation from constructive proofs. To this end we use a coinductive representation of reals as streams of binary signed digits. The main objective of this paper is the formalisation of a constructive proof that real numbers are closed with respect to limits. All the proofs of the main theorem and the first application are implemented in the Minlog proof system and the extracted terms are further translated into Haskell. We compare two approaches. The first approach is a direct proof. In the second approach we make use of the representation of reals by a Cauchy-sequence of rationals. Utilizing translations between the two represenation and using the completeness of the Cauchy-reals, the proof is very short. In both cases we use Minlog's program extraction mechanism to automatically extract a formally verified program that transforms a converging sequence of reals, i.e.~a sequence of streams of binary signed digits together with a modulus of convergence, into the binary signed digit representation of its limit. The correctness of the extracted terms follows directly from the soundness theorem of program extraction. As a first application we use the extracted algorithms together with Heron's method to construct an algorithm that computes square roots with respect to the binary signed digit representation. In a second application we use the convergence theorem to show that the signed digit representation of real numbers is closed under multiplication.
@article{paperbot1663,
title = {Limits of real numbers in the binary signed digit representation},
author = {Franziskus Wiesnet and Nils Köpp},
journal = {Logical Methods in Computer Science},
volume = {Volume 18, Issue 3},
year = {2022},
doi = {10.46298/lmcs-18(3:24)2022}
}