Simplification Orders in Term Rewriting. Derivation Lengths
Total Page:16
File Type:pdf, Size:1020Kb
Ingo Lepper Simplification Orders in Term Rewriting Derivation Lengths, Order Types, and Computability 2001 Mathematische Logik Simplification Orders in Term Rewriting Derivation Lengths, Order Types, and Computability Inaugural-Dissertation zur Erlangung des Doktorgrades der Naturwissenschaften im Fachbereich Mathematik und Informatik der Mathematisch-Naturwissenschaftlichen Fakult¨at der Westf¨alischen Wilhelms-Universit¨at Munster¨ vorgelegt von Ingo Lepper aus Munster¨ – 2001 – Typeset with LATEX 2ε using the document class KOMA-Script, the packages babel, AMS-LATEX, amsthm, hyperref, graphicx, url, color, natbib, backref, booktabs, array, ragged2e, acronym, nomencl, thumbpdf, nicefrac, currvita, titletoc, epigraph, and paralist, and the additional font packages amssymb, aeguill, stmaryrd, and pifont. The home page of this text is http://wwwmath.uni-muenster.de/logik/publ/diss/9.html. If you want to contact the author, this is possible by electronic mail via either [email protected] (expiration date approx. 12/2004) or [email protected]. Dekan: Prof. Dr. W. Lange Erster Gutachter: Prof. Dr. A. Weiermann Zweiter Gutachter: Prof. Dr. W. Pohlers Tage der mundlichen¨ Prufungen:¨ ❖ Mathematische Logik: 04.12.2001 ❖ Reine Mathematik: 29.11.2001 ❖ Angewandte Mathematik: 03.12.2001 Tag der Promotion: 04.12.2001 Fur¨ Anke und meine Familie ❦ Foreword Appreciate true friendship, it is for free! I would like to mention the persons who have significantly contributed to my work. First of all I wish to express my sincere thanks to my thesis supervisor, Prof. Andreas Weiermann, for invaluable help and encouragement. He arouse my interest in term rewriting, he benevolently answered nearly all of my ques- tions from various fields of mathematics, and in turn he asked questions which led to new or improved results. Without his support, this text would not exist. A further direct scientific contributor is Dieter Hofbauer. Besides cofounding the research concerning derivation lengths, his constant interest has been a main influence on my work. In various discussions he helped me gain insight into Knuth–Bendix orders, and his comments on preliminary versions of some of my results led to a much improved presentation. Everyone familiar with the work of H´el`ene Touzet will recognize that I also owe a lot to her. Just in time, Prof. Andrei Voronkov provided a Theorem which spared myself technical trouble and caused significant improvements in both presentation and generality of a part of this thesis. My results concerning computability via Knuth–Bendix orders partially emerged from a discussion with Guillaume Bonfante. The Institut fur¨ mathematische Logik und Grundlagenforschung has been of fundamental importance to my work. Its directors Prof. Justus Diller and Prof. Wolfram Pohlers provided one major part of my mathematical education. Their kind guidance and the friendly atmosphere at the institute made my work a pleasure. Considering the amount of time I have spent there, work may have been even more pleasant than it ought to be. Related to this are also many former and present members of the institute. I’d like to explicitely men- tion my dear friend Benjamin Blankertz, who managed to combine hospitality with a constant cheerful urge concerning the completion of my thesis, Arnold Beckmann, Wolfgang Burr, and Michael M¨ollerfeld, whose knowledge appears to have grown exponentially during the last years. Our secretaries Hildegard Brunstering and Martina Pfeifer, who often succeeded in confronting us mathe- maticians with the real life, constitute the secret heart of the institute. Looking v Foreword at the students which are affiliated to the institute at the moment, I am con- vinced it will remain as peaceful and open-minded a place as it has been for the past decade. On the private side, I have to commend my friends who managed, partially against my reluctance, to distract me from my work. This always turned out to be fruitful – apart from the headaches. The squirrels (sciurus vulgaris, the shy red kind) from my balcony have been a second constant source of amusement. In death-defying expeditions, which sometimes reached my desk, they discovered vast deposits of nuts and managed to transport and hide away large amounts of them. I wish to express my wholehearted gratitude to all these people and animals. Finally, there are the persons whose confidence and loving support have made my work possible. I dedicate the thesis to my love Anke and to my family. vi Contents 1 Introduction 1 2 Preliminaries 13 2.1 Conventions . 13 2.2 Basic definitions . 14 2.3 Orders and Order types . 15 2.4 Subrecursive Hierarchies . 27 2.5 Complexity Classes . 38 3 Term Rewriting 41 3.1 Basic Definitions . 43 3.2 Abstract Orders on Terms . 48 3.3 Semantic Orders on Terms . 51 3.3.1 Interpretations. 52 3.3.2 Σ-algebras and the Termination Hierarchy . 54 3.4 Syntactic Orders on Terms . 62 3.4.1 Multiset Path Orders . 62 3.4.2 Lexicographic Path Orders . 63 3.4.3 Knuth–Bendix Orders . 64 3.5 Functions Computable by a TRS . 70 4 Order Types 73 4.1 Order Types of MPOs and LPOs . 74 4.2 Order Types of KBOs . 75 4.3 Order Types of Simplification Orders. 78 5 Derivation Lengths 79 5.1 ω-termination . 82 5.2 Termination via KBO . 84 5.3 Simple Termination is Complex. 93 5.3.1 The Fixed Point Free Veblen Function . 95 5.3.2 Fundamental Sequences and Hydrae below ∆k . 97 5.3.3 Encoding all Hydrae below ∆k . 99 5.3.4 Simulating all Hydra Battles below ∆k . 102 5.3.5 Proof of Total Termination . 108 vii Contents 5.4 A Digression: LPO-Controlled Derivations . 113 5.5 Another Digression: Ground Termination . 115 6 Computability 117 6.1 Computability via PT . 118 6.2 Computability via MPO and LPO . 119 6.3 Computability via KBO . 120 6.3.1 List Operations Compatible with KBO . 122 6.3.2 Simulating a Timebounded RM . 123 6.3.3 Long Linear Derivations. 124 6.3.4 Hard Computation via KBO . 129 6.4 Computability via Simple Termination . 132 7 Very Long Size-Controlled Derivations 135 7.1 Sequences of Iterated Logarithms. 139 7.2 Hydra Battles, Revisited . 144 7.3 Lengthened Derivations . 152 8 Conclusion 163 Bibliography 167 Glossary of Notation 177 Index 185 Curriculum Vitae 193 viii 1 Introduction A happy surprise is waiting for you. Concerning the future of proof theory and complexity in the 21st century, the following prediction has been made by Harvey Friedman (2000): “. there has recently been considerable work on the connections be- tween proof theory and term rewriting. This will also expand in the coming century.” This text is intended to be such a contribution. We approach complexity prob- lems of term rewriting theory using results and techniques from proof theory. The concept of term rewriting has been developed at the end of the 1960s. A term rewriting system (TRS) is a finite set R of directed equations of terms over some fixed signature Σ. The emerging rewrite relation →R is the closure of R under substitutions and contexts. TRSs provide a valuable tool in auto- mated deduction, and additionally they constitute an interesting paradigm for nondeterministic computation, importing the term notion for free. It should be mentioned that it is rather common to consider also infinite sets of rules, but for our purposes this makes not much sense. One major topic in term rewriting is termination.A TRS is said to terminate if all derivations induced by its rewrite relation are finite, i.e. if the rewrite relation does not admit infinite chains. Just as in computation theory, the problem of establishing termination of a given TRS is highly nontrivial. A vast variety of techniques for proving termination has evolved. Common to these approaches is the association of some well-founded order to the rewrite relation. Of particular importance in this field are the partial orders on terms whose well-foundedness is a consequence of Kruskal’s famous Tree Theorem. These orders are called simplification orders, and they are the key object of our studies. Prominent examples of such orders are the multiset path order (MPO) of Plaisted (1978), the lexicographic path order (LPO) of Kamin and L´evy (1980), and the Knuth–Bendix order (KBO) of Knuth and Bendix (1970). 1 1 Introduction A very convenient way of proving termination is by means of Σ-algebras. The basis of a Σ-algebra is a partial order (P, ≺). For any symbol of the signature, there is also a function on P of the appropriate arity. Roughly speaking, this corresponds to a Σ ∪ {<}-structure in first order logic. We call a Σ-algebra monotone if its interpreting functions are monotone. Termination of a TRS fol- lows from its compatibility with a monotone Σ-algebra whose underlying partial order is well-founded. Any TRS compatible with a monotone Σ-algebra which also satisfies the subterm property is called simply terminating. It turned out that a TRS is simply terminating if and only if its rewrite relation is contained in a simplification order. Thus simple termination implies termination. Zantema (1993, 1994) speaks of total termination if the monotone Σ-algebra is based on a well-order (being total by definition). This constitutes an im- portant (proper) subclass of simple termination. As any well-order is order- isomorphic to an ordinal, it is possible to classify totally terminating TRSs according to the ordinals α carrying compatible Σ-algebras. This leads to the notion of α-termination and unveils a rich structure of subhierarchies. Inside the collection of ω-terminating TRSs we can further differentiate according to the functions used for interpreting the function symbols of the Σ-algebra.