CoLoR: a Coq library on well-founded rewrite relations and its application to the automated verification of termination certificates

Frédéric Blanqui,Adam Koprowski
DOI: https://doi.org/10.1017/S0960129511000120
2012-02-29
Abstract:Termination is an important property of programs; notably required for programs formulated in proof assistants. It is a very active subject of research in the Turing-complete formalism of term rewriting systems, where many methods and tools have been developed over the years to address this problem. Ensuring reliability of those tools is therefore an important issue. In this paper we present a library formalizing important results of the theory of well-founded (rewrite) relations in the proof assistant Coq. We also present its application to the automated verification of termination certificates, as produced by termination tools.
Logic in Computer Science
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is to ensure the reliability of program termination proofs, especially when using automated tools to generate termination proofs. Specifically, the author focuses on: 1. **Verifying the correctness of termination certificates generated by automated termination provers**: With the development of automated termination proof techniques, more and more complex techniques and external tools (such as SAT solvers) are used for termination proofs. This has led to the issue of trust in the results of these tools. Therefore, it has become very important to provide a method for automatically verifying the correctness of termination certificates. 2. **Allowing the definition of functions with non - structural recursive calls in proof assistants (such as Coq) and using external automated termination provers to check the termination of these functions**: In some cases, function definitions may contain non - structural recursive calls, which makes termination checking more complex. By introducing a library to handle these problems, the functionality of the proof assistant can be extended. 3. **Providing a widely - used dependent - type library**: This library not only contributes to current research but can also serve as a benchmark for evaluating the feasibility and ease - of - use of dependent types. To achieve these goals, the author has developed a Coq library named CoLoR, which formalizes important theoretical results regarding well - founded rewrite relations and is applied to automate the verification of termination certificates. In addition, they have also developed a program named Rainbow, which can generate Coq scripts from termination certificates to verify the termination of rewrite systems. ### Formulas and Markdown Format When describing the above content, some of the concepts and formulas involved are as follows: - **Rewrite relation**: Let \( R \) be a rewrite relation. Then \( R \) is terminating (strongly normalizing, well - founded, Noetherian) if there is no infinite rewrite sequence starting from some term. \[ \text{Termination} \iff \nexists t_0, t_1, t_2, \ldots : t_0 R t_1 R t_2 R \ldots \] - **Multiset path ordering (MPO)**: For a given well - founded quasi - order \( \geq \) on symbols, if the left - hand side term of each rule is strictly greater than the right - hand side term, then termination can be proven by multiset path ordering. \[ l >_{\text{MPO}} r \iff \forall i, \text{left - hand side } l_i \geq \text{right - hand side } r_i \land \exists j, l_j > r_j \] Through these methods, the author aims to improve the reliability and verifiability of automated termination proofs, thereby enhancing the capabilities of proof assistants.