Introduction to Kleene Algebra Lecture 15 CS786 Spring 2004 March 15 & 29, 2004

Similar documents
Introduction to Kleene Algebra Lecture 13 CS786 Spring 2004 March 15, 2004

Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories

Halting and Equivalence of Schemes over Recursive Theories

Research Statement Christopher Hardin

Kleene Algebra with Tests: A Tutorial

Equational Theory of Kleene Algebra

Completeness of Star-Continuity

Combining Propositional Dynamic Logic with Formal Concept Analysis

An Overview of Residuated Kleene Algebras and Lattices Peter Jipsen Chapman University, California. 2. Background: Semirings and Kleene algebras

Kleene Algebra with Tests and Program Schematology

Automata on Guarded Strings and Applications

Kleene Algebra with Tests

Kleene Algebra and Arden s Theorem. Anshul Kumar Inzemamul Haque

On Modal Logics of Partial Recursive Functions

Characterizing the Equational Theory

Theoretical Foundations of the UML

Universität Augsburg. Institut für Informatik. Separability in Domain Semirings. D Augsburg. Report Dezember 2004

ON INDUCTION VS. *-CONTINUITY. Dexter Kozen. IBM Thomas L Watson Research Center Yorktown Heights, New York 10598

Decision Methods for Concurrent Kleene Algebra with Tests : Based on Derivative

Axioms of Kleene Algebra

Propositional Dynamic Logic

Structural Induction

Formale Systeme II: Theorie

CS 486: Lecture 2, Thursday, Jan 22, 2009

Automata Theory and Formal Grammars: Lecture 1

2 D. Kozen (PCAs) of the form fbg p fcg and a deductive apparatus consisting of a system of specialized rules of inference. Under certain conditions,

Theorem Proving in the Propositional Algebra. Geoff Phillips **************

Kleene Algebra with Equations

Kleene Algebra with Tests and the Static Analysis of Programs

CS 455/555: Finite automata

Propositional Dynamic Logic

Equational Logic: Part 2. Roland Backhouse March 6, 2001

KLEENE algebra is an algebraic structure that captures

Subclasses of Quantied Boolean Formulas. Andreas Flogel. University of Duisburg Duisburg 1. Marek Karpinski. University of Bonn.

Terminating Tableaux for Mini-PDL

An Independence Relation for Sets of Secrets

NetKAT: Semantic Foundations for Networks. Nate Foster. Cornell University. Cornell University Computing and Information Science October 5, 2013

Lecture 2: Connecting the Three Models

KLEENE algebra is an algebraic structure that captures

Parikh s Theorem in Commutative Kleene Algebra

Introduction to Kleene Algebra Lecture 9 CS786 Spring 2004 February 23, 2004

Bounded Stacks, Bags and Queues

On Action Algebras. Dexter Kozen Computer Science Department University of Aarhus DK-8000 Aarhus C, Denmark. January 2, 1992.

Reasoning About Common Knowledge with Infinitely Many Agents

Propositional Logic Language

CVO103: Programming Languages. Lecture 2 Inductive Definitions (2)

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Propositional Logic. Spring Propositional Logic Spring / 32

The Equational Theory of Kleene Lattices

PDL and its relation to PDL

Propositional Resolution

From Semirings to Residuated Kleene Lattices

A Complete Proof of the Robbins Conjecture

On the Complexity of Reasoning in Kleene Algebra

Math 267a - Propositional Proof Complexity. Lecture #1: 14 January 2002

A Propositional Dynamic Logic for Instantial Neighborhood Semantics

Functions Definable by Arithmetic Circuits

Introduction to Kleene Algebras

Guarded resolution for Answer Set Programming

2 Dexter Kozen 1994 Krob 1991 Kuich and Salomaa 1986 Pratt 1990 Redko 1964 Sakarovitch 1987 Salomaa 1966]. In semantics and logics of programs, Kleene

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Non-elementary Lower Bound for Propositional Duration. Calculus. A. Rabinovich. Department of Computer Science. Tel Aviv University

The Cook-Levin Theorem

KAT + B! Niels Bjørn Bugge Grathwohl. Abstract. 1. Introduction. University of Copenhagen

ACKNOWLEDGEMENT: The work of the second author was supported in part by NSF grant MCS G.

A Lower Bound for Boolean Satisfiability on Turing Machines

Towards Kleene Algebra with Recursion

Propositional Logic: Models and Proofs

Propositional logic (revision) & semantic entailment. p. 1/34

Some Results on (Synchronous) Kleene Algebra with Tests

On the Equivalence of Automata for KAT-expressions

Chapter 15 On the Coalgebraic Theory of Kleene Algebra with Tests

The quantifier complexity of polynomial-size iterated definitions in first-order logic

Finite Automata and Regular languages

COMP4141 Theory of Computation

A Stochastic Lambda-Calculus for Probabilistic Programming

A New 3-CNF Transformation by Parallel-Serial Graphs 1

Subsumption of concepts in FL 0 for (cyclic) terminologies with respect to descriptive semantics is PSPACE-complete.

Informal Statement Calculus

TR : Binding Modalities

Finite Automata and Languages

Kleene algebra to compute with invariant sets of dynamical

Characterizing the NP-PSPACE Gap in the Satisfiability Problem for Modal Logic

Least Common Subsumers and Most Specific Concepts in a Description Logic with Existential Restrictions and Terminological Cycles*

Shamir s Theorem. Johannes Mittmann. Technische Universität München (TUM)

A Coalgebraic Decision Procedure for NetKAT

Monodic fragments of first-order temporal logics

Nested Epistemic Logic Programs

02 Propositional Logic

CS 226: Digital Logic Design

CSE 20. Lecture 4: Introduction to Boolean algebra. CSE 20: Lecture4

CMPSCI 250: Introduction to Computation. Lecture #29: Proving Regular Language Identities David Mix Barrington 6 April 2012

On Fixed Point Equations over Commutative Semirings

Harvard CS 121 and CSCI E-207 Lecture 6: Regular Languages and Countability

Logics with Counting. Ian Pratt-Hartmann School of Computer Science University of Manchester Manchester M13 9PL, UK

Part II. Logic and Set Theory. Year

Boolean circuits. Lecture Definitions

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

Lecture Notes on Combinatory Modal Logic

Transcription:

Introduction to Kleene Algebra Lecture 15 CS786 Spring 2004 March 15 & 29, 2004 Completeness of KAT In this lecture we show that the equational theories of the Kleene algebras with tests and the star-continuous Kleene algebras with tests coincide. Combined with the results of the previous lecture, this says that KAT is complete for the equational theory of relational models and Reg P,B forms the free KAT on generators P and B. This result is analogous to the completeness result of Lecture??, which states that the regular sets over a finite alphabet P form the free Kleene algebra on generators P. The results of this lecture are from [5]. Theorem 15.1 Let REL denote the class of all relational Kleene algebras with tests. Let p, q RExp P,B. The following are equivalent: (i) (ii) (iii) KAT p = q KAT p = q G(p) = G(q) (iv) REL p = q. The statements (ii) (iv) were shown to be equivalent in Theorem?? of Lecture??. Here we have added (i) to the list. Thus, for the purpose of deriving identities, the infinitary starcontinuity condition provides no extra power over the finitary axiomatization KAT. However, it does entail more Horn formulas (equational implications). One possible approach might be to modify the completeness proof of Lecture?? for KA to handle tests. We take a different approach here, showing that every term p can be transformed into a KAT-equivalent term p such that G( p), the set of guarded strings represented by p, is the same as R( p), the set of strings represented by p under the ordinary interpretation of regular expressions. The Boolean algebra axioms are not needed in equivalence proofs involving such terms, so we can apply the completeness result of Lecture?? directly. This idea is ultimately due to Kaplan [3]. Consider the set B = {b b B}, the set of negated atomic tests. We can view B as a separate set of primitive symbols disjoint from B and P. Using the DeMorgan laws and the law b = b of Boolean algebra, every term p can be transformed to a KAT-equivalent term 1

p in which is applied only to primitive test symbols, thus we can view p as a regular expression over the alphabet P B B. As such, it represents a set of strings R(p ) (P B B) under the standard interpretation R of regular expressions as regular sets. In general, the sets R(p ) and G(p ) may differ. For example, R(q) = {q} for primitive action q, but G(q) = {αqβ α, β Atoms B }. Our main task will be to show how to further transform p to another KAT-equivalent string p such that all elements of R( p) are guarded strings and R( p) = G( p). We can then use the completeness result of [4], since p and q will be KAT-equivalent iff p and q are equivalent as regular expressions over P B B; that is, if they can be proved equivalent in pure Kleene algebra. Example 15.2 Consider the two terms p = (q + b + b) br p = (bq + bq) br(b + b), where P = {q, r} and B = {b}. There are certainly strings in R(p), qqbbbqbr for example, that are not guarded strings. However, p and p represent the same set of guarded strings under the interpretation G, and all strings in R( p) are guarded strings; that is, G(p) = G( p) = R( p). In our inductive proof, it will be helpful to maintain terms in the following special form. Call a term externally guarded if it is of the form α or αqβ, where α and β are atoms of B. For an externally guarded term αqβ, ine first p = α and last p = β. For an externally guarded term α, ine first p = last p = α. Define a special multiplication operation on externally guarded terms as follows: rα βs = { rαs, if α = β, 0, if α β. This is much like fusion product on guarded strings as ined in Lecture??, except that for incompatible pairs of guarded strings, fusion product is unined, whereas is ined and has value 0. For any two externally guarded terms q and r, q r is externally guarded, and q r = qr is a theorem of KAT; in particular, G(q r) = G(q) G(r). 2

If i q i and j r j are sums of zero or more externally guarded terms, ine ( i q i ) ( j r j ) = i,j q i r j. As above, for any two sums q and r of externally guarded terms, q r = qr is a theorem of KAT; in particular, G(q r) = G(q) G(r), and q r is a sum of externally guarded terms. Lemma 15.3 For every term p, there is a term p such that (i) (ii) (iii) KAT = p = p R( p) = G( p) p is a sum of zero or more externally guarded terms. Proof. As argued above, we can assume without loss of generality that all occurrences of in p are applied to primitive tests only, thus we may view p as a term over the alphabet P B B. We ine p by induction on the structure of p. For the basis, take p b = α,β Atoms B αpβ, p P 1 = α Atoms B α = α b α, b B B 0 = 0. In each of these cases, it is straightforward to verify (i), (ii), and (iii). For the induction step, suppose we have terms p and q satisfying (ii) and (iii). We take p + q = p + q pq = p q. These constructions are easily shown to satisfy (i), (ii), and (iii). It remains to construct p. We proceed by induction on the number of externally guarded terms in the sum p. For the basis, we ine 0 α (αqβ) (αqα) = 1 = 1 = 1 + αqβ, α β (15.1) = 1 + αq(αq) α. (15.2) 3

For the induction step, let p = q +r, where r is an externally guarded term and q is a sum of externally guarded terms, one fewer in number than in p. By the induction hypothesis, we can construct q = q with the desired properties. Suppose the initial atom of the externally guarded term r is α. Then KAT = r = αr. Moreover, the expression (rq α) is KATequivalent to (r q α), which by distributivity can be put into a form in which (15.1) or (15.2) applies, yielding a term q satisfying (ii) and (iii). Reasoning in KAT, p = (q + r) = q (rq ) by the denesting rule = q (rq ) = q + q rq (rq ) by unwinding and distributivity = q + q rq (αrq ) = q + q (rq α) rq by the sliding rule = q + q q rq = q + q q r q, which is of the desired form. Theorem 15.4 KAT = p = q G(p) = G(q). In other words, the equational theories of the Kleene algebras with tests and the star-continuous Kleene algebras with tests coincide. Proof. The forward implication is immediate, since Reg P,B is a Kleene algebra with tests. For the reverse implication, suppose G(p) = G(q). By Lemma 15.3(i) and Theorem?? of Lecture??, G( p) = G( q). By Lemma 15.3(ii), R( p) = R( q). By the completeness of KA (Lecture??), KA = p = q. Combining this with Lemma 15.3(i), we have KAT = p = q. Since we have shown that the equational theories of the Kleene algebras with tests and the star-continuous Kleene algebras with tests coincide, we can henceforth write = p = q unambiguously in place of KAT = p = q or KAT = p = q. Decidability Once we have Theorem 15.1, the decidability of the equational theory of Kleene algebra with tests follows almost immediately from a simple reduction to Propositional Dynamic Logic 4

(PDL). Any term in the language of KAT is a program of PDL (after replacing Boolean terms b with PDL tests b?), and it is known that two such terms p and q represent the same binary relation in all relational structures iff PDL = <p>c <q>c, where c is a new primitive proposition symbol [1] (see [2]). By Theorems 15.1 and 15.4, this is tantamount to deciding KAT-equivalence. PDL is known to be exponential time complete [1, 6], thus the equational theory of KAT is decidable in no more than exponential time. It is at least PSPACE-hard, since the equational theory of Kleene algebra is [7]. We will show in Lecture?? by different methods that the equational theory of KAT is PSPACE-complete. References [1] Michael J. Fischer and Richard E. Ladner. Propositional dynamic logic of regular programs. J. Comput. Syst. Sci., 18(2):194 211, 1979. [2] David Harel, Dexter Kozen, and Jerzy Tiuryn. Dynamic Logic. MIT Press, Cambridge, MA, 2000. [3] Donald M. Kaplan. Regular expressions and the equivalence of programs. J. Comput. Syst. Sci., 3:361 386, 1969. [4] Dexter Kozen. A completeness theorem for Kleene algebras and the algebra of regular events. Infor. and Comput., 110(2):366 390, May 1994. [5] Dexter Kozen and Frederick Smith. Kleene algebra with tests: Completeness and decidability. In D. van Dalen and M. Bezem, editors, Proc. 10th Int. Workshop Computer Science Logic (CSL 96), volume 1258 of Lecture Notes in Computer Science, pages 244 259, Utrecht, The Netherlands, September 1996. Springer-Verlag. [6] V. R. Pratt. Models of program logics. In Proc. 20th Symp. Found. Comput. Sci., pages 115 122. IEEE, 1979. [7] L. J. Stockmeyer and A. R. Meyer. Word problems requiring exponential time. In Proc. 5th Symp. Theory of Computing, pages 1 9, New York, 1973. ACM. 5