Rewriting Solving Proving

Rewriting Solving Proving

REWRITING SOLVING PROVING January 28, 2006 Claude Kirchner and H´el`ene Kirchner 2 REWRITING SOLVING PROVING This is a preliminary version We begin writing this book in the early 90. By lack of time, we did not really finish it, but since we were asked by several colleagues who wanted to use some of its contents, we make it available as it is. All comments on any part of this work are very welcome. Authors: Claude Kirchner and H´el`ene Kirchner LORIA, INRIA & CNRS Campus scientifique 615, rue du Jardin Botanique BP 101 54602 Villers-l`es-Nancy CEDEX FRANCE E-mail: [email protected] Web: http://www.loria.fr/~ckirchne Web: http://www.loria.fr/~hkirchne Copyright c 1994–2006, Claude Kirchner and H´el`ene Kirchner Permission is granted to make and distribute verbatim copies of this book provided the copyright notice and this permission are preserved on all copies. January 28, 2006 rewriting solving proving 3 Acknowledgments This document is still under development. It has been used, generaly in part, as a support for D.E.A. and Master lectures in Nancy and several other national or international schools. Several parts of the document are based on joined works of the authors with other persons: especially with Jean-Pierre Jouannaud and Christophe Ringeissen for some chapters on unification, and with Jean-Luc R´emy for the part on parameterization. We would like to warmly thank all our colleagues and students for their remarks and constructive criti- cisms. All remaining flaws remain of course ours. January 28, 2006 rewriting solving proving 4 January 28, 2006 rewriting solving proving Contents 1 Introduction 15 I Terms, Logics and Algebras 17 2 First order logic and equational logic 19 2.1 Deductionsystems ................................ .......... 19 2.2 First-orderterms ................................ ........... 20 2.2.1 Termsasstrings ................................ ....... 20 2.2.2 Termsastrees .................................. ...... 20 2.2.3 Termsasmappings............................... ....... 20 2.2.4 Termsasfunctions .............................. ........ 21 2.2.5 Infiniteterms.................................. ....... 21 2.2.6 Sortedterms ................................... ...... 21 2.3 Substitutions ................................... .......... 21 2.3.1 Definitions and elementary properties . .............. 21 2.3.2 Termsubsumption ............................... ....... 23 2.3.3 Substitution subsumption . ........... 24 2.4 Equationallogic ................................. .......... 24 2.4.1 Syntax........................................ ..... 24 2.4.2 Deductionsystem ............................... ....... 24 2.4.3 Models ........................................ .... 25 2.4.4 The subsumption ordering modulo . ........... 27 2.4.5 Satisfiability ................................. ........ 28 2.4.6 Wordproblem ................................... ..... 29 2.4.7 Atheorydirectory .............................. ........ 29 2.4.8 A morphologicalclassification of theories . ................ 31 2.5 Sortedequationallogic. ............. 33 2.5.1 Syntax........................................ ..... 33 2.5.2 Deductionsystem ............................... ....... 33 2.5.3 Models ........................................ .... 33 2.6 Conditionallogic ................................ ........... 34 2.6.1 Syntax........................................ ..... 34 2.6.2 Deductionsystem ............................... ....... 34 2.6.3 Algebraicsemanticsandmodels. ............ 34 2.6.4 Herbrandinterpretations . ........... 35 2.6.5 Anexample..................................... ..... 36 3 Computations in the term algebra 37 3.1 Thelatticeofterms ............................... .......... 37 3.1.1 Renaming...................................... ..... 37 3.1.2 Matching ...................................... ..... 38 3.1.3 Lowersemi-lattice . .. .. .. .. .. .. .. .. .. .. .. .. ......... 39 3.1.4 Leastgeneralization . .......... 39 3.1.5 Syntactic unification and least upper bound . ............... 40 3.2 Syntacticunification . .. .. .. .. .. .. .. .. .. .. .. .. ............ 41 3.2.1 Definitions .................................... ...... 41 January 28, 2006 rewriting solving proving 6 CONTENTS 3.2.2 Treesolvedforms............................... ........ 42 3.2.3 Dagsolvedform ................................. ...... 43 3.2.4 Complete sets of rules for syntactic unification . ................. 44 3.2.5 Complexity of Syntactic Unification . ............. 47 3.3 Unification in infinite rational terms . ................ 49 3.4 FurtherReadings................................. .......... 49 II Rewriting 51 4 Abstract reduction systems 53 4.1 Introduction.................................... .......... 53 4.2 Quasiorderings.................................. .......... 53 4.2.1 Basicdefinitions ............................... ........ 53 4.2.2 Well-foundedorderings. ........... 54 4.2.3 Well-quasiorderings . .......... 56 4.3 Abstractreductionsystems . ............. 58 4.4 Normalizingabstractreduction systems . ................. 58 4.5 Well-founded ordering and termination . ................. 58 4.6 Abstract Church-Rosser property and confluence . .................. 59 4.6.1 Localconfluence ................................ ....... 59 4.6.2 Confluencewithouttermination. ............ 61 4.6.3 Confluence for weakly normalizing systems . .............. 61 5 Definition and properties of rewrite systems 63 5.1 Introduction.................................... .......... 63 5.2 Rewritesystems .................................. ......... 64 5.3 Arewritinglogic ................................. .......... 65 5.4 Church-Rosserproperty . ............ 67 5.5 Reducedsystems .................................. ......... 67 5.6 Orthogonalsystems ............................... .......... 68 5.7 Decidabilityresults. ............. 68 6 Termination of rewrite systems 69 6.1 Introduction.................................... .......... 69 6.2 Termination..................................... ......... 69 6.3 Reductionorderings .............................. ........... 70 6.3.1 Definition ..................................... ...... 70 6.3.2 Building reduction orderings using interpretations .................... 71 6.4 Simplificationorderings . ............. 73 6.4.1 Well-quasi-ordering and general embedding . ................ 73 6.4.2 Basicdefinitionsandproperties . ............. 73 6.4.3 Pathorderings ................................. ....... 74 6.5 Conclusion ...................................... ........ 76 7 Generalizations of rewriting 77 7.1 Introduction.................................... .......... 77 7.2 Orderedrewriting................................ ........... 77 7.2.1 Orderedrewritesystems . .......... 78 7.2.2 Church-Rosser property for ordered rewriting . ................. 78 7.3 Classrewriting .................................. .......... 79 7.3.1 Classrewritesystems . ......... 79 7.3.2 Church-Rosserresults . .......... 81 7.3.3 Termination................................... ....... 85 7.4 Orderedclassrewriting. ............. 89 7.5 Conditionalrewriting. ............. 90 7.5.1 Conditionalrewritesystems . ............ 90 7.5.2 Decidabilityresults. ........... 93 7.5.3 Orderedconditionalsystems. ............ 94 7.5.4 Horn clauses versus conditional rewrite rules . ................. 95 January 28, 2006 rewriting solving proving CONTENTS 7 7.6 Constrainedrewriting . ............ 96 7.6.1 Constraints ................................... ....... 97 7.6.2 Constrained equalities and rewrite rules . ................ 98 7.6.3 Rewritingwithconstraints . ........... 99 7.6.4 Comparison with conditional rewriting . ...............100 7.6.5 Aconstrainedrewritinglogic . ............ 100 7.7 Conclusion ...................................... ........ 101 8 Modular properties of rewrite systems 103 8.1 Introduction.................................... .......... 103 8.2 Modularity ...................................... ........ 103 8.3 Disjointsystems ................................. .......... 103 8.3.1 Confluenceandlocalconfluence. ........... 104 8.3.2 Termination................................... ....... 104 8.3.3 Simpletermination. .. .. .. .. .. .. .. .. .. .. .. .. ......... 105 8.3.4 Normalformandconvergence. .......... 105 8.4 Constructorsystems .............................. ........... 105 8.5 Non-disjoint systems with commutation properties . ....................108 8.5.1 Confluence ..................................... ..... 108 8.5.2 Termination................................... ....... 108 8.6 Conclusion ...................................... ........ 109 9 Implementing rewriting 111 9.1 Compilingrewriting .............................. ........... 111 9.1.1 Sequentiality ................................. ........ 111 9.1.2 Compilation into a functional language . .............. 111 9.2 Concurrentrewriting. ............ 111 III Solving 113 10 Unification of equational problems 117 10.1 Solutionsandunifiers . ............ 117 10.2Generatingsets ................................. ........... 120 10.2.1 Completesetsofunifiers. ........... 120 10.2.2 Abstract properties of generating sets . ................122 10.2.3 Application to minimal complete sets of unifiers . .................124 10.3 (Un)-Decidability of unification . .................125 10.4 A Classification of Theories with Respect to Unification .....................126 10.5 Transformingequationalproblems . ................128 10.5.1 A Rule-BasedApproachto Unification . ............. 128 10.5.2 Solved forms for Unification

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    362 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us