arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.15465cs.LO
收藏

通过宇宙多态精化与直谓理论共享证明

Sharing proofs with predicative theories through universe-polymorphic elaboration

Thiago Felicissimo, Frédéric Blanqui

AI总结:

本文提出基于前束式宇宙多态精化的部分证明翻译方法,刻画宇宙层级方程的最一般合一,并在 Predicativize 中实现,将 Matita 证明半自动迁移至 Agda。

摘要:

由于形式化证明的开发是一项耗时的工作,因此有必要设计共享已有证明的方法,以避免浪费时间重复工作。该领域的挑战之一是:当非直谓性没有以本质方式被使用时,将基于非直谓逻辑的证明助手所编写的证明翻译到基于直谓逻辑的证明助手。本文提出一种变换,用于与一个支持前束式宇宙多态的核心直谓系统共享证明。该变换包括尝试将每个项精化为尽可能一般的直谓式宇宙多态项。使用宇宙多态的理由在于,在大多数情况下,将每个宇宙映射到目标理论中的某个固定宇宙并不充分。在精化过程中,我们需要求解宇宙层级等式理论中的合一问题。为此,我们完整刻画了单个方程何时存在最一般合一子。随后,该刻画被用于一个部分算法中;该算法采用约束延迟策略,以尝试求解合一问题。所提出的翻译当然是部分的,但在实践中能够翻译许多并未以本质方式使用非直谓性的证明。事实上,该方法已在工具 Predicativize 中实现,并随后用于将 Matita 库中许多非平凡的开发半自动地翻译到 Agda,包括 Bertrand 公设和 Fermat 小定理的证明;据我们所知,这些证明此前在 Agda 中尚不可用。

英文摘要:

As the development of formal proofs is a time-consuming task, it is important to devise ways of sharing the already written proofs to prevent wasting time redoing them. One of the challenges in this domain is to translate proofs written in proof assistants based on impredicative logics to proof assistants based on predicative logics, whenever impredicativity is not used in an essential way. In this paper we present a transformation for sharing proofs with a core predicative system supporting prenex universe polymorphism. It consists in trying to elaborate each term into a predicative universe-polymorphic term as general as possible. The use of universe polymorphism is justified by the fact that mapping each universe to a fixed one in the target theory is not sufficient in most cases. During the elaboration, we need to solve unification problems in the equational theory of universe levels. In order to do this, we give a complete characterization of when a single equation admits a most general unifier. This characterization is then employed in a partial algorithm which uses a constraint-postponement strategy for trying to solve unification problems. The proposed translation is of course partial, but in practice allows one to translate many proofs that do not use impredicativity in an essential way. Indeed, it was implemented in the tool Predicativize and then used to translate semi-automatically many non-trivial developments from Matita's library to Agda, including proofs of Bertrand's Postulate and Fermat's Little Theorem, which (as far as we know) were not available in Agda yet.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑