Sharing proofs with predicative theories through universe polymorphic elaboration

08/29/2023
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 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 (like in Agda). 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 an algorithm which uses a constraint-postponement strategy 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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/10/2022

Translating proofs from an impredicative type system to a predicative one

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
04/25/2021

Isabelle's Metalogic: Formalization and Proof Checker

Isabelle is a generic theorem prover with a fragment of higher-order log...
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
10/02/2020

Proof Repair Across Type Equivalences

We describe a new approach to automatically repairing broken proofs in t...
research
04/27/2022

FindFacts: A Scalable Theorem Search

The Isabelle Archive of Formal Proofs (AFP) has grown to over 500 articl...
research
04/04/2023

Introduction to Pylog

PyLog is a minimal experimental proof assistant based on linearised natu...

Please sign up or login with your details

Forgot password? Click here to reset