从构造性类型论中的证明提取高效精确实数计算
Extracting efficient exact real number computation from proofs in constructive type theory
AI总结:
本文提出在依赖类型论中对实数进行新公理化,使构造性证明可提取为基于 AERN 的高效精确实数计算程序,并在 Coq 中实现验证。
摘要:
精确实数计算是浮点运算的一种替代方案,其中对实数的运算被精确执行,不会引入舍入误差。在证明实现的正确性时,人们可以只关注问题的数学性质,而不必考虑表示实数的细微之处。我们提出了一种在依赖类型论中对实数的新公理化,目标是从构造性证明中提取经过认证的精确实数计算程序。我们的形式化与类似方法的不同之处在于,我们以概念上类似于一些成熟的精确实数计算实现的方式来形式化实数。实数上的原始运算可以直接提取为这种实现中相应的运算,从而产生更高效的程序。我们特别关注部分计算和非确定性计算的形式化,这在精确实数计算中是必不可少的。我们证明了我们的形式化相对于可计算分析中标准可实现性解释的可靠性,并展示了如何将我们的理论与实数的经典形式化联系起来。我们通过在 Coq 证明助手中实现该理论并给出若干自然示例来证明其可行性。从这些示例中,我们自动提取了使用精确实数计算框架 AERN 的 Haskell 程序,以高效地对实数执行精确运算。在实验中,提取出的程序在运行时间和内存使用方面表现与 AERN 中的原生实现相似。
英文摘要:
Exact real computation is an alternative to floating-point arithmetic where operations on real numbers are performed exactly, without the introduction of rounding errors. When proving the correctness of an implementation, one can focus solely on the mathematical properties of the problem without thinking about the subtleties of representing real numbers. We propose a new axiomatization of the real numbers in a dependent type theory with the goal of extracting certified exact real computation programs from constructive proofs. Our formalization differs from similar approaches, in that we formalize the reals in a conceptually similar way as some mature implementations of exact real computation. Primitive operations on reals can be extracted directly to the corresponding operations in such an implementation, producing more efficient programs. We particularly focus on the formalization of partial and nondeterministic computation, which is essential in exact real computation. We prove the soundness of our formalization with regards of the standard realizability interpretation from computable analysis and show how to relate our theory to a classical formalization of the reals. We demonstrate the feasibility of our theory by implementing it in the Coq proof assistant and present several natural examples. From the examples we have automatically extracted Haskell programs that use the exact real computation framework AERN for efficiently performing exact operations on real numbers. In experiments, the extracted programs behave similarly to native implementations in AERN in terms of running time and memory usage.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。