Translating proofs from an impredicative type system to a predicative one

11/10/2022
by   Thiago Felicissimo, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/29/2023

Sharing proofs with predicative theories through universe polymorphic elaboration

As the development of formal proofs is a time-consuming task, it is impo...
research
10/29/2018

Formal Proofs of Tarjan's Algorithm in Why3, Coq, and Isabelle

Comparing provers on a formalization of the same problem is always a val...
research
09/02/2020

Check Your (Students') Proofs-With Holes

Cyp (Check Your Proofs) (Durner and Noschinski 2013; Traytel 2019) verif...
research
01/02/2021

Three Proofs that the Square Root of 2 Is Irrational

This short article gives three proofs that √ 2 is irrational. The articl...
research
02/28/2020

Automating the Generation of High School Geometry Proofs using Prolog in an Educational Context

When working on intelligent tutor systems designed for mathematics educa...
research
07/05/2018

Sharing a Library between Proof Assistants: Reaching out to the HOL Family

We observe today a large diversity of proof systems. This diversity has ...
research
10/20/2014

Certified Connection Tableaux Proofs for HOL Light and TPTP

In the recent years, the Metis prover based on ordered paramodulation an...

Please sign up or login with your details

Forgot password? Click here to reset