论文标题

将证据从不可思议的类型系统转换为谓语

Translating proofs from an impredicative type system to a predicative one

论文作者

Felicissimo, Thiago, Blanqui, Frédéric, Barnawal, Ashish Kumar

论文摘要

由于形式证明的发展是一项耗时的任务,因此,设计方法来共享已经书面的证据以防止浪费时间重做它们,这一点很重要。该领域的挑战之一是翻译基于不可思议的逻辑(例如Coq,Matita和Hol家族)编写的证明证明者,以根据AGDA(例如AGDA)(如不可能使用不可能的方式使用iNDECTIVITITY)来证明助手。在本文中,我们提出了一种算法,可以在核心不可思议的类型系统与核心谓语之间进行这种翻译,从而使Prenex Universe多态性(如AGDA)进行。它包括试图将潜在的不可思议的术语转变为尽可能一般的宇宙多态术语。宇宙多态性的使用是合理的:在大多数情况下,将不可思议的宇宙映射到固定的谓词是不够的。在算法期间,我们需要解决统一问题在宇宙水平上模拟最大成员代数。但是,在这个代数中,没有大多数通用解决方案的可解决问题。但是,我们提供了一种不完整的算法,其解决方案在成功时是最通用的算法。拟议的翻译当然是部分的,但实际上允许人们翻译许多不使用基本方法的证据。确实,它是在工具中实现的,然后用来将半自动的多个非平凡的发展从Matita的算术库转换为AGDA,包括Bertrand的假设和Fermat的Little Therorem,这些定理在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, such as Coq, Matita and the HOL family, to proof assistants based on predicative logics like Agda, whenever impredicativity is not used in an essential way. In this paper we present an algorithm to do such a translation between a core impredicative type system and a core predicative one allowing prenex universe polymorphism like in Agda. It consists in trying to turn a potentially impredicative term into a universe polymorphic term as general as possible. The use of universe polymorphism is justified by the fact that mapping an impredicative universe to a fixed predicative one is not sufficient in most cases. During the algorithm, we need to solve unification problems modulo the max-successor algebra on universe levels. But, in this algebra, there are solvable problems having no most general solution. We however provide an incomplete algorithm whose solutions, when it succeeds, are most general ones. 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 arithmetic library to Agda, including Bertrand's Postulate and Fermat's Little Theorem, which were not available in Agda yet.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源