## Termination of Isabelle functions via termination of rewriting (2011)

### Cached

### Download Links

Venue: | IN PROCEEDING OF THE SECOND INTERNATIONAL CONFERENCE ON INTERACTIVE THEOREM PROVING (ITP |

Citations: | 2 - 1 self |

### BibTeX

@INPROCEEDINGS{Krauss11terminationof,

author = {Alexander Krauss and Christian Sternagel and René Thiemann and Carsten Fuhs and Jürgen Giesl},

title = {Termination of Isabelle functions via termination of rewriting},

booktitle = {IN PROCEEDING OF THE SECOND INTERNATIONAL CONFERENCE ON INTERACTIVE THEOREM PROVING (ITP},

year = {2011},

publisher = {}

}

### OpenURL

### Abstract

We show how to automate termination proofs for recursive functions in (a first-order subset of) Isabelle/HOL by encoding them as term rewrite systems and invoking an external termination prover. Our link to the external prover includes full proof reconstruction, where all necessary properties are derived inside Isabelle/HOL without oracles. Apart from the certification of the imported proof, the main challenge is the formal reduction of the proof obligation produced by Isabelle/HOL to the termination of the corresponding term rewrite system. We automate this reduction via suitable tactics which we added to the IsaFoR library.

### Citations

774 |
Isabelle/HOL — A Proof Assistant for HigherOrder Logic
- Nipkow, Paulson, et al.
- 2002
(Show Context)
Citation Context ... term rewrite system. We automate this reduction via suitable tactics which we added to the IsaFoR library. 1 Introduction In a proof assistant based on higher-order logic (HOL), such as Isabelle/HOL =-=[15]-=-, recursive function definitions typically require a termination proof. To release the user from finding suitable termination arguments manually, it is desirable to automate these termination proofs a... |

543 |
Autoepistemic logic
- Moore
- 1988
(Show Context)
Citation Context ...termination of the related TRS is easily proved using standard techniques, eliminating the need for finding and proving the lemma. Example 6. The following function (originally due to Boyer and Moore =-=[4]-=-) normalizes conditional expressions consisting of atoms (AT ) and if-expressions (IF ). norm (AT a) = AT a norm (IF (AT a) y z) = IF (AT a) (norm y) (norm z) norm (IF (IF u v w) y z) = norm (IF u (IF... |

96 | Aprove 1.2: Automatic termination proofs in the dependency pair framework
- Giesl, Schneider-Kamp, et al.
- 2006
(Show Context)
Citation Context ...owever, these approaches do not cover all powerful techniques that have been developed in term rewriting, e.g., [7,20]. These techniques are implemented in a number of termination tools (e.g., AProVE =-=[9]-=-, T T T 2 [11] and many others) that can show termination of (first-order) term rewrite systems (TRSs) automatically. (In the remainder we use ‘termination tool’ exclusively to refer to such fully aut... |

88 | Termination of Term Rewriting by Semantic Labelling
- Zantema
- 1995
(Show Context)
Citation Context ...They indeed increase the degree of automation for termination proofs of HOL functions. However, these approaches do not cover all powerful techniques that have been developed in term rewriting, e.g., =-=[7,20]-=-. These techniques are implemented in a number of termination tools (e.g., AProVE [9], T T T 2 [11] and many others) that can show termination of (first-order) term rewrite systems (TRSs) automaticall... |

58 |
Matrix interpretations for proving termination of term rewriting
- Endrullis, Waldmann, et al.
- 2008
(Show Context)
Citation Context ...They indeed increase the degree of automation for termination proofs of HOL functions. However, these approaches do not cover all powerful techniques that have been developed in term rewriting, e.g., =-=[7,20]-=-. These techniques are implemented in a number of termination tools (e.g., AProVE [9], T T T 2 [11] and many others) that can show termination of (first-order) term rewrite systems (TRSs) automaticall... |

51 |
Term Rewriting and All That. Cambridge
- Baader, Nipkow
- 1998
(Show Context)
Citation Context .... (∀m. half n = Suc m =⇒ P (Suc m)) =⇒ P n) =⇒ ∀n. P n 2.4 IsaFoR - Term Rewriting Formalized in Isabelle/HOL In the following, we assume that the reader is familiar with the basics of term rewriting =-=[1]-=-. Many notions and facts from rewriting have been formalized in the Isabelle library IsaFoR [19]. Before we can give the reduction from termination of HOL functions to termination of corresponding TRS... |

25 | From LCF to HOL: a short history
- Gordon
- 2000
(Show Context)
Citation Context ...ften mentioned as future work when discussing certification of termination proofs [3,6]. However, this requires more than a communication interface between two programs. In LCF-style proof assistants =-=[10]-=- such as Isabelle, all proofs must be checked by a small trusted kernel. Thus, integrating external tools as unverified oracles is unsatisfactory: any error in the external tool or in ⋆ Supported by t... |

25 | Certification of termination proofs using CeTA
- Thiemann, Sternagel
(Show Context)
Citation Context ... R f and obtain a certificate. 4. Replay the certificate using a formally verified checker. While steps 1 and 3 are not hard, and the ground work for step 4 is already available in the IsaFoR library =-=[17,19]-=-, which formalizes term rewriting and several termination techniques, 1 this paper is concerned with the missing piece, the reduction of termination proof obligations for HOL functions to the terminat... |

21 | Logic programs as term rewriting systems
- Marchiori
- 1994
(Show Context)
Citation Context ...here Sf is the set of all functions that are used (directly or indirectly) by f. Our encoding is similar to the well known technique of unraveling which transforms conditional into unconditional TRSs =-=[14,16]-=-. 3 For example, R log is defined as follows and completely contains R half . half(0) → 0 half(Suc(0)) → 0 case0(0) → 0 half(Suc(Suc(n))) → Suc(half(n)) 3.2 Embedding Functions log(n) → case0(half(n))... |

19 | Certification of automated termination proofs
- Contejean, Courtieu, et al.
- 2007
(Show Context)
Citation Context ...cient implementations. Using termination tools inside proof assistants has been an open problem for some time and is often mentioned as future work when discussing certification of termination proofs =-=[3,6]-=-. However, this requires more than a communication interface between two programs. In LCF-style proof assistants [10] such as Isabelle, all proofs must be checked by a small trusted kernel. Thus, inte... |

17 | Finding lexicographic orders for termination proofs in isabelle/hol
- Bulwahn, Krauss, et al.
- 2007
(Show Context)
Citation Context ... automate these termination proofs as much as possible. There have already been successful approaches to port and adapt existing termination techniques from term rewriting and other areas to Isabelle =-=[5,12]-=-. They indeed increase the degree of automation for termination proofs of HOL functions. However, these approaches do not cover all powerful techniques that have been developed in term rewriting, e.g.... |

15 |
Termination of logic programs: Transformational methods revisited, Applicable Algebra
- Ohlebusch
(Show Context)
Citation Context ...here Sf is the set of all functions that are used (directly or indirectly) by f. Our encoding is similar to the well known technique of unraveling which transforms conditional into unconditional TRSs =-=[14,16]-=-. 3 For example, R log is defined as follows and completely contains R half . half(0) → 0 half(Suc(0)) → 0 case0(0) → 0 half(Suc(Suc(n))) → Suc(half(n)) 3.2 Embedding Functions log(n) → case0(half(n))... |

14 | Verification of Erlang processes by dependency pairs
- Giesl, Arts
(Show Context)
Citation Context ...lly automatically. For termination tools, the proof is a bit more challenging and requires techniques that are not yet formalized in IsaFoR (in particular, the technique of rewriting dependency pairs =-=[8]-=-). Thus, our connection to termination tools cannot handle msort yet. However, when this technique is added to IsaFoR in the future, no change will be required in our implementation to benefit from it... |

14 | Certified size-change termination
- Krauss
- 2007
(Show Context)
Citation Context ... automate these termination proofs as much as possible. There have already been successful approaches to port and adapt existing termination techniques from term rewriting and other areas to Isabelle =-=[5,12]-=-. They indeed increase the degree of automation for termination proofs of HOL functions. However, these approaches do not cover all powerful techniques that have been developed in term rewriting, e.g.... |

10 | CoLoR: a Coq library on well-founded rewrite relations and its application to the automated verification of termination certificates
- Blanqui, Koprowski
- 2011
(Show Context)
Citation Context ...cient implementations. Using termination tools inside proof assistants has been an open problem for some time and is often mentioned as future work when discussing certification of termination proofs =-=[3,6]-=-. However, this requires more than a communication interface between two programs. In LCF-style proof assistants [10] such as Isabelle, all proofs must be checked by a small trusted kernel. Thus, inte... |

9 |
Partial and nested recursive function definitions in higher-order logic
- Krauss
(Show Context)
Citation Context ...bool. By an add-on tool, HOL supports algebraic datatypes, which includes the types nat (with constructors 0 and Suc) and list (with constructors [ ] and #). Another add-on tool, the function package =-=[13]-=-, completes the functional programming layer by allowing recursive function definitions, which are not covered by the primitives of the logic. Since it internally employs a well-founded recursion prin... |

6 |
Tyrolean Termination Tool
- Korp, Sternagel, et al.
(Show Context)
Citation Context ... approaches do not cover all powerful techniques that have been developed in term rewriting, e.g., [7,20]. These techniques are implemented in a number of termination tools (e.g., AProVE [9], T T T 2 =-=[11]-=- and many others) that can show termination of (first-order) term rewrite systems (TRSs) automatically. (In the remainder we use ‘termination tool’ exclusively to refer to such fully automatic and ext... |

3 |
Automatic Certification of Termination Proofs
- Sternagel
- 2010
(Show Context)
Citation Context ... R f and obtain a certificate. 4. Replay the certificate using a formally verified checker. While steps 1 and 3 are not hard, and the ground work for step 4 is already available in the IsaFoR library =-=[17,19]-=-, which formalizes term rewriting and several termination techniques, 1 this paper is concerned with the missing piece, the reduction of termination proof obligations for HOL functions to the terminat... |

2 | Certified subterm criterion and certified usable rules
- Sternagel, Thiemann
- 2010
(Show Context)
Citation Context ...rm ⇒ int (possibly also depending on a variable assignment) which interprets terms as integers. However, 3 It would be possible to directly generate dependency pair problems. However, techniques like =-=[18]-=- and several termination tools rely on the notion of “minimal chains,” which is not ensured by our approach. 7in our setting, the result type of such a function is not fixed, as our terms represent H... |