Pure and Applied Fixed-Point Logics - Mathematical Foundations of ...

9 downloads 0 Views 1MB Size Report
In the second part of this thesis, we study fixed-point extensions of modal logic. ...... seen that on every word structure Ww := (W,
Pure and Applied Fixed-Point Logics

Von der Fakult¨at f¨ ur Mathematik, Informatik und Naturwissenschaften der Rheinisch-Westf¨alischen Technischen Hochschule Aachen zur Erlangung des akademischen Grades eines Doktors der Naturwissenschaften genehmigte Dissertation

vorgelegt von Diplom-Informatiker

Stephan Kreutzer aus Aachen, Deutschland

Berichter: Universit¨atsprofessor Dr. Erich Gr¨adel Universit¨atsprofessor Dr. Wolfgang Thomas Tag der m¨ undlichen Pr¨ ufung: 17.12.2002

Diese Dissertation ist auf den Internetseiten der Hochschulbibliothek online verf¨ ugbar.

2

3

Abstract Fixed-point logics are logics with an explicit operator for forming fixed points of definable mappings. They are particularly well suited for modelling recursion in logical languages and consequently they have found applications in various areas of theoretical computer science such as database theory, finite model theory, and computer-aided verification. The topic of this thesis is the study of fixed-point logics with respect to their expressive power. Of particular interest are logics based on inflationary fixed points and their comparison to least fixed-point logics. The first part focuses on fixed-point extensions of first-order logic. In the main result we show that inflationary and least fixed-point logic – the extensions of first-order logic by least and inflationary fixed points – have the same expressive power on all structures, i.e. LFP = IFP. In the second part of this thesis, we study fixed-point extensions of modal logic. Such logics are widely used in the field of computer-aided verification. Again, the least fixed-point extension of modal logic, the modal µ-calculus, is of particular interest and is among the best studied logics in this area. The main contribution of the second part is the introduction and study of the corresponding inflationary fixed-point logic. Contrary to the case of first-order logic mentioned above, where least and inflationary fixed points lead to equivalent logics, it is shown that in the context of modal logic, inflationary fixed points are far more expressive than least fixed points. On the other hand, they are algorithmically far more complex. Besides the two main results, we study a variety of different fixed-point logics and develop methods to compare their expressive power. Finally, in the third part, we study fixed-point logics as query languages for constraint databases. It is shown that already relatively simple logics such as the transitive closure logic lead to undecidable query languages on constraint databases. Therefore we consider suitable restrictions of fixedpoint logics to obtain tractable query languages, i.e. languages with polynomial time evaluation. A detailed overview of the results presented in this thesis can be found in the second part of the introduction.

Zusammenfassung Die vorliegende Dissertation besch¨aftigt sich mit der Untersuchung von Fixpunktlogiken hinsichtlich ihrer Ausdrucksst¨arke. Der Schwerpunkt liegt dabei auf inflation¨aren Fixpunktlogiken und ihrer Abgrenzung von Logiken, die auf kleinsten Fixpunkten basieren. Im ersten Teil der Arbeit werden dazu die seit langem bekannten Fixpunkterweiterungen der Pr¨adikatenlogik untersucht. Das Hauptergebnis ist der Beweis, daß die Logiken LFP und

4 IFP, also die Erweiterung der Pr¨ adikatenlogik um kleinste und inflation¨are Fixpunkte, die gleiche Ausdrucksst¨arke haben. Es gilt also LFP = IFP.

Im zweiten Teil der Arbeit stehen dann Fixpunkterweiterungen der Modallogik im Vordergrund, wie sie intensiv im Bereich der automatischen Verifikation studiert werden. W¨ahrend der modale µ-Kalk¨ ul (Lµ ), die Erweiterung der Modallogik um kleinste Fixpunkte, schon seit Anfang der 80er Jahre eingehend untersucht wird, wird hier zum ersten Mal die entsprechende inflation¨are Logik, der modale Iterationskalk¨ ul (MIC), betrachtet. Es zeigt sich, daß, im Gegensatz zum Fall der Pr¨adikatenlogik, inflation¨are Fixpunkte im modallogischen Kontext eine sehr viel gr¨oßere Ausdrucksst¨arke bieten als kleinste. MIC ist also sehr viel ausdrucksst¨arker als Lµ , allerdings im Hinblick auf algorithmische Probleme auch erheblich komplexer. Neben diesen beiden Hauptergebnissen werden in den ersten beiden Teilen der Arbeit noch weitere Arten von Fixpunktlogiken studiert und Methoden zum Vergleich ihrer Ausdrucksst¨arke entwickelt. Im dritten und letzten Teil der Dissertation stehen sogenannte constraint Datenbanken im Zentrum der Betrachtungen. Hierbei handelt es sich um ein relativ neues Datenbankmodell, das sich besonders zur Speicherung geome¨ trischer Daten eignet. Ahnlich wie bei relationalen Datenbanken k¨onnen auch hier Fixpunktlogiken als Grundlage von Abfragesprachen dienen. In Teil III wird gezeigt, daß in diesem Bereich allerdings schon relativ einfache Fixpunktlogiken, wie die transitive H¨ ullenlogik, unentscheidbare Sprachen liefern. Anhand zweier auf kleinsten Fixpunkten basierenden Logiken wird jedoch demonstriert, daß durch geeignete Definition der Logiken auch im constraint Datenbankbereich algorithmisch handhabbare Abfragesprachen mit Hilfe von Fixpunktlogiken definiert werden k¨onnen. Eine ausf¨ uhrlichere Darstellung der in dieser Dissertation pr¨asentierten Ergebnisse findet sich im zweiten Teil der Einleitung.

5

Acknowledgements I have many people to thank and acknowledge. First of all, I want to thank my advisor, Erich Gr¨adel, for all his support and encouragement during the last four years. I am grateful to Anuj Dawar for the very enjoyable collaboration on several parts of this thesis and in particular for his patience during the discussions about the equivalence of least and inflationary fixed-point logic. Many thanks also to my colleagues, in particular Achim Blumensath and Dietmar Berwanger. Often enough they had the misfortune of being in their office – Achim mostly before anyone else arrived and Dietmar primarily after everybody else left – when I needed someone to bother with questions. Further, I want to thank the database group in Limburg, in particular Jan Van den Bussche and Floris Geerts for the pleasant discussions we had on constraint databases. Very special thanks go to Jan Van den Bussche for attracting my attention to the expressive power of stratified fixed-point logic and transitive-closure logic on constraint databases. Unknowingly, his questions raised at an AFM-seminar in Aachen gave me the impulse to study fixed-point logics on infinite structures and in this sense made the results reported in the first part of this thesis possible. Finally, I want to thank all the other people who contributed to this thesis in some way, in particular Colin Hirsch and David Richerby for proofreading parts of the manuscript.

6

Contents 1 Introduction

11

2 Preliminaries

27

I

29

Fixed-Point Extensions of First-Order Logic

3 Least and Inflationary Fixed-Point Logic 3.1 Definitions by Monotone Inductions . . . . . . . . . . . . . 3.2 Elementary Inductive Definitions . . . . . . . . . . . . . . . 3.3 Least and Monotone Fixed-Point Logic . . . . . . . . . . . . 3.3.1 Simultaneous Inductions . . . . . . . . . . . . . . . . 3.3.2 Alternation and Nesting in Least Fixed-Point Logic 3.3.3 Comparing the Stages . . . . . . . . . . . . . . . . . 3.4 Inflationary Fixed-Point Logic . . . . . . . . . . . . . . . . . 3.5 Inductive Fixed Points and Second-Order Logic . . . . . . .

. . . . . . . .

31 31 33 37 39 41 43 44 50

4 Other Fixed-Point Logics 4.1 Fragments of Least Fixed-Point Logic . . . . . . . 4.1.1 Transitive Closure Logics . . . . . . . . . . 4.1.2 Existential and Stratified Fixed-Point Logic 4.2 Partial Fixed-Point Logic . . . . . . . . . . . . . .

. . . .

53 53 53 54 56

. . . .

. . . .

. . . .

. . . .

. . . .

5 Descriptive Complexity 59 5.1 Evaluation Complexity of Fixed-Point Formulae . . . . . . . . 61 5.2 Logics Capturing Complexity Classes . . . . . . . . . . . . . . 62 6 Fixed-Point Logics with Choice 6.1 Choice Fixed-Point Logic . . . . . . . . . . . . . . . . . . 6.1.1 Simplifying the First-Order Quantifier Structure . 6.1.2 Choice Fixed-Point and Second-Order Logic . . . . 6.1.3 Arity-Restricted CFP and Transitive-Closure Logic 6.2 Fixed-Point Logics with Alternating Choice . . . . . . . . 7

. . . . .

. . . . .

65 66 69 71 73 75

8

CONTENTS

7 A General Semantics for Partial Fixed-Point Logic 77 7.1 An Alternative Semantics for Partial Fixed-Point Logic . . . 79 7.2 Separating Partial and Inflationary Fixed-Point Logic . . . . 85 7.2.1 Acceptable Structures, Coding, and Diagonalisation . 85 7.2.2 Separating Partial and Inflationary Fixed-Point Logic 87 8 Equivalence of Least and Inflationary Fixed-Point Logic 91 8.1 Equivalence on Finite Structures . . . . . . . . . . . . . . . . 91 8.2 Equivalence in the General Case . . . . . . . . . . . . . . . . 94 8.3 Open Problems . . . . . . . . . . . . . . . . . . . . . . . . . . 100

II

Modal Fixed-Point Logics

101

9 Modal Logics and Bisimulation 103 9.1 Transition Systems . . . . . . . . . . . . . . . . . . . . . . . . 104 9.2 Bisimulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 9.3 Modal Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 10 The Modal µ-Calculus

111

11 The 11.1 11.2 11.3 11.4

115 118 122 124 126 126 130 138 141

Modal Iteration Calculus The Satisfiability Problem for MIC . . . . . . . . . . . . . . . The Model Checking Problem for MIC . . . . . . . . . . . . . Languages and MIC . . . . . . . . . . . . . . . . . . . . . . . Simple Inductions . . . . . . . . . . . . . . . . . . . . . . . . 11.4.1 Simple vs. Simultaneous Inductions . . . . . . . . . . . 11.4.2 Infinity Axioms and the Satisfiability Problem . . . . 11.5 Comparison of Least and Inflationary Fixed-Point Inductions 11.6 Perspectives and Open Problems . . . . . . . . . . . . . . . .

12 The Modal Partial Iteration Calculus 143 12.1 Semantics for Modal Partial Fixed-Point Inductions . . . . . 143 12.2 Expressive Power and Complexity . . . . . . . . . . . . . . . 148 13 Labelling Indices on Acyclic Transition Systems 13.1 The Rank of Trees . . . . . . . . . . . . . . . . . . 13.2 Labelling Systems . . . . . . . . . . . . . . . . . . 13.3 Labelling Indices of Modal Logics . . . . . . . . . . 13.3.1 Modal Logic and the Modal µ-Calculus . . 13.3.2 The Modal Iteration Calculus . . . . . . . . 13.3.3 Higher Dimensional µ-Calculus . . . . . . . 13.4 Monadic Inflationary Fixed-Point Logic . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

151 . 153 . 154 . 157 . 157 . 158 . 161 . 162

9

CONTENTS 14 Labelling Indices on Arbitrary Transition 14.1 The Rank of Arbitrary Structures . . . . 14.2 The Labelling Index of Modal Logics . . . 14.3 The Modal µ-Calculus . . . . . . . . . . . 14.4 Labelling Index and Complexity . . . . . 14.5 The Trace-Equivalence Problem . . . . . .

III

Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

Constraint Databases

165 165 168 169 174 177

181

15 Constraint Databases 183 15.1 The Constraint Database Model . . . . . . . . . . . . . . . . 183 15.2 Constraint Queries . . . . . . . . . . . . . . . . . . . . . . . . 186 16 The Linear Constraint Database Model 16.1 Linear Constraint Databases . . . . . . . . . . . . . . . 16.2 Semi-Linear Sets . . . . . . . . . . . . . . . . . . . . . . 16.2.1 Structural Properties . . . . . . . . . . . . . . . . 16.2.2 Arrangements . . . . . . . . . . . . . . . . . . . . 16.3 First-Order Logic as Linear Constraint Query Language 16.3.1 Extending First-Order Logic by Convex Hulls . . 16.3.2 Extending First-Order Logic by Multiplication . 16.3.3 Finite Representations of Semi-Linear Sets . . . 17 Complete Query Languages 17.1 Operational Semantics for Fixed-Point Logics . . . . 17.2 Expressive Completeness of Transitive Closure Logic 17.3 Completeness of SFP and LFP . . . . . . . . . . . . 17.4 Existential Fixed-Point Logic . . . . . . . . . . . . . 17.5 Dense Linear Orders . . . . . . . . . . . . . . . . . .

. . . . .

. . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . .

191 192 193 193 194 197 199 201 201

. . . . .

203 204 206 211 212 212

18 Tractable Query Languages 215 18.1 The Logic RegLFP(conv) . . . . . . . . . . . . . . . . . . . . 215 18.2 Finitary Fixed-Point Logic . . . . . . . . . . . . . . . . . . . . 220 Bibliography

223

Symbols

233

Index

235

10

CONTENTS

Chapter 1

Introduction Formal logics have played a crucial role in the development of theoretical computer science. A feature that is pervasive to many diverse areas such as database theory, computer-aided verification, or computational and descriptive complexity theory are definitions by recursion or iteration. Formalising recursive definitions in a logical language usually involves some kind of fixed-point construction. This can be incorporated into the logic in various ways. In second-order logic, recursion is modelled by quantifying over the individual stages of the iteration process, whereas in infinitary logics, the same is simulated by infinitary disjunctions defining arbitrary recursion depths. Another way of modelling recursive definitions is to incorporate an explicit operator for forming fixed points. Logics following this approach are called fixed-point logics. In the various areas of computer science where fixed-point logics have been deployed, a huge variety of such logics has evolved. Regardless of how great the differences are elsewhere, the fixed-point part of most logics is formed according to the same common principle. Consider a first-order formula ϕ(R, x) with a free second-order variable R of arity k, and k free first-order variables x. On any structure A, such a formula induces an operator Fϕ taking a set P ⊆ Ak to the set {a : (A, P ) |= ϕ[a]}. Recursive definitions are now modelled by considering the various kinds of fixed points such an operator may possess. Among these, least fixed points play a fundamental role. Least fixed points are usually incorporated into a logic as follows. If ϕ is positive in R, the operator Fϕ is monotone – meaning that X ⊆ Y implies Fϕ (X) ⊆ TFϕ (Y ). Monotone operators always have a least fixed point lfp(Fϕ ) := {X : Fϕ (X) = X} and therefore, on any structure A, a first-order formula ϕ(R, x) positive in R naturally induces a set lfp(F ϕ ). This forms the basis of least fixed-point logic (LFP), an extension of firstorder logic (FO) equipped with an explicit construct [lfp R,x ϕ(R, x)], for ϕ positive in R, defining the least fixed point of ϕ. 11

12

Chapter 1: Introduction

Least fixed-point definitions are numerous in mathematics. Typical examples include the definition of regular expressions over an alphabet, formed by inductively closing the set of letters under concatenation, union, and the star operation, but also the inductive definition of primitive recursive functions, the syntax of first-order logic, or the definition of sub-groups generated by a set of elements. A different type of fixed points can be obtained by an explicit induction process. Here, the formula ϕ(R, x) is used to build up the following sequence (Rα )α∈Ord of sets, indexed by ordinals α. R0 := ∅ Rα+1 := Rα ∪ {a : (A, Rα ) |= ϕ(a)} [ Rλ := Rξ for limit ordinals λ. ξ