Axioms of Kleene Algebra

Similar documents
Introduction to Kleene Algebras

Characterizing the Equational Theory

Equational Theory of Kleene Algebra

Completeness of Star-Continuity

Kleene Algebra and Arden s Theorem. Anshul Kumar Inzemamul Haque

Theory of Computation

MATH 433 Applied Algebra Lecture 22: Semigroups. Rings.

Homework 1/Solutions. Graded Exercises

A Weak Bisimulation for Weighted Automata

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

Kleene Algebras and Algebraic Path Problems

Equational Logic. Chapter Syntax Terms and Term Algebras

Introduction to Finite-State Automata

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

Section Summary. Relations and Functions Properties of Relations. Combining Relations

Universal Algebra for Logics

Boolean Algebras. Chapter 2

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

Handout #6 INTRODUCTION TO ALGEBRAIC STRUCTURES: Prof. Moseley AN ALGEBRAIC FIELD

An Algebraic Approach to Energy Problems I -Continuous Kleene ω-algebras

We define the multi-step transition function T : S Σ S as follows. 1. For any s S, T (s,λ) = s. 2. For any s S, x Σ and a Σ,

Chapter 1. Sets and Mappings

0 Sets and Induction. Sets

On Fixed Point Equations over Commutative Semirings

Herbrand Theorem, Equality, and Compactness

Fuzzy Sets. Mirko Navara navara/fl/fset printe.pdf February 28, 2019

Chapter 2. Vectors and Vector Spaces

From Sequential Algebra to Kleene Algebra: Interval Modalities and Duration Calculus. Peter Höfner. Report Juli 2005

Spring Based on Partee, ter Meulen, & Wall (1993), Mathematical Methods in Linguistics

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2017

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

Notes on Monoids and Automata

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways:

CS21 Decidability and Tractability

CHAPTER 2 BOOLEAN ALGEBRA

Mathematical Preliminaries. Sipser pages 1-28

INTRODUCTION TO SEMIGROUPS AND MONOIDS

2. Introduction to commutative rings (continued)

3515ICT: Theory of Computation. Regular languages

What we have done so far

Tree sets. Reinhard Diestel

ClC (X ) : X ω X } C. (11)

COMP4141 Theory of Computation

Monoidal Categories, Bialgebras, and Automata

Chapter 1. Logic and Proof

MATH 422, CSUSM. SPRING AITKEN

Lecture 1.6: The formal definion of a group

GENERALIZED DIFFERENCE POSETS AND ORTHOALGEBRAS. 0. Introduction

Automata and Languages

Kleene modules and linear languages

EQUIVALENCE RELATIONS (NOTES FOR STUDENTS) 1. RELATIONS

Advanced Automata Theory 9 Automatic Structures in General

Axioms for the Real Number System

Lecture Notes on Inductive Definitions

Lecture 3: Nondeterministic Finite Automata

Lecture Notes on Inductive Definitions

Groups. 3.1 Definition of a Group. Introduction. Definition 3.1 Group

Boolean Algebra CHAPTER 15

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

GROUPS. Chapter-1 EXAMPLES 1.1. INTRODUCTION 1.2. BINARY OPERATION

LATTICE AND BOOLEAN ALGEBRA

Context-free grammars and languages

1. Prove: A full m- ary tree with i internal vertices contains n = mi + 1 vertices.

Mathematical Reasoning & Proofs

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

Regular Expressions and Language Properties

Lecture Notes: Selected Topics in Discrete Structures. Ulf Nilsson

Properties of the Integers

Advanced Automata Theory 10 Transducers and Rational Relations

Fooling Sets and. Lecture 5

Introduction to Finite Automaton

From Semirings to Residuated Kleene Lattices

Functions on languages:

Duality in Logic. Duality in Logic. Lecture 2. Mai Gehrke. Université Paris 7 and CNRS. {ε} A ((ab) (ba) ) (ab) + (ba) +

chapter 11 ALGEBRAIC SYSTEMS GOALS

Regular expressions and Kleene s theorem

Notes. Relations. Introduction. Notes. Relations. Notes. Definition. Example. Slides by Christopher M. Bourke Instructor: Berthe Y.

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

Axiomatic set theory. Chapter Why axiomatic set theory?

Coalgebra, lecture 10: Algebra and Coalgebra for Regular Expressions

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata

MODEL ANSWERS TO HWK #7. 1. Suppose that F is a field and that a and b are in F. Suppose that. Thus a = 0. It follows that F is an integral domain.

Relations Graphical View

Outline. We will now investigate the structure of this important set.

Chapter 1. Sets and Numbers

MAT 570 REAL ANALYSIS LECTURE NOTES. Contents. 1. Sets Functions Countability Axiom of choice Equivalence relations 9

CS286.2 Lecture 8: A variant of QPCP for multiplayer entangled games

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

MATH 145 LECTURE NOTES. Zhongwei Zhao. My Lecture Notes for MATH Fall

MODEL ANSWERS TO THE FIRST HOMEWORK

Applications of Regular Algebra to Language Theory Problems. Roland Backhouse February 2001

On finite congruence-simple semirings

CS 455/555: Finite automata

CS21 Decidability and Tractability

Automata on linear orderings

Towards Kleene Algebra with Recursion

3 Boolean Algebra 3.1 BOOLEAN ALGEBRA

CS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa

Lecture 2: Connecting the Three Models

Transcription:

Introduction to Kleene Algebra Lecture 2 CS786 Spring 2004 January 28, 2004 Axioms of Kleene Algebra In this lecture we give the formal definition of a Kleene algebra and derive some basic consequences. Semigroups and Monoids A semigroup is an algebraic structure (S, ), where S is a set and is an associative binary operation on S, which means that x (y z) = (x y) z for all x, y, z S. This allows us to write x y z without ambiguity. A monoid is an algebraic structure (M,, 1) where (M, ) is a semigroup and 1 is a distinguished element of M that is both a left and right identity for in the sense that 1 x = x 1 = x for all x M. For semigroups and monoids written multiplicatively, we often omit the operator in expressions, writing xy for x y. Example 2.1 The following are common examples of monoids: 1. (Σ,, ε), where Σ is the set of finite-length strings over an alphabet Σ, is concatenation of strings, and ε is the null string; 2. (2 Σ,, {ε}), where is set concatenation as described in the last lecture; 3. (2 Σ,, ), where 2 Σ is the powerset or set of all subsets of Σ, is set union, and is the empty set; 4. (N, +, 0), where N is the set of natural numbers {0, 1, 2,...}; 5. (N,, 1); 6. (N n, +, 0), where N n is the Cartesian product of n copies of N, + is vector addition, and 0 is the zero vector; 7. (R + { }, min, ), where R + denotes the set of nonnegative real numbers, is a special infinite element greater than all real numbers, and min gives the minimum of two elements; 1

8. (R n n,, I), where R n n denotes the set of n n matrices over a ring R, is ordinary matrix multiplication, and I is the identity matrix; 9. (X X,, ι), where X X denotes the set of all functions from a set X to itself, is function composition, and ι is the identity function. Examples 3 7 are commutative monoids, which means that xy = yx for all x, y. Example 8 is never commutative for any nontrivial ring R and n 2. Example 9 is never commutative for any X with at least 2 elements. Idempotent Semirings A semiring is an algebraic structure (S, +,, 0, 1) such that (S, +, 0) is a commutative monoid, (S,, 1) is a monoid, distributes over + on both the left and right in the sense that x(y + z) = xy + xz and (x + y)z = xz + yz, 0 is an annihilator for in the sense that 0 x = x 0 = 0 for all x. A semiring is idempotent if x + x = x for all x. We often abbreviate x y to xy, and avoid parentheses by taking to be higher precedence than +. Collecting these axioms, we define an idempotent semiring to be any structure (S, +,, 0, 1) satisfying the following identities for all x, y, z S: x + (y + z) = (x + y) + z x + 0 = x x(yz) = (xy)z x(y + z) = xy + xz 0x = x0 = 0. x + y = y + x x + x = x 1x = x1 = x (x + y)z = xz + yz A ring is a semiring in which the additive monoid forms a group; that is, in which additive inverses exist. We cannot have additive inverses in an idempotent semiring unless the semiring is trivial, since 0 = x + x = x + x + x = 0 + x = x. 2

Order Recall that a partial order is a binary relation on a set that is reflexive: for all x, x x, antisymmetric: for all x, y, if x y and y x, then x = y, and transitive: for all x, y, z, if x y and y z, then x z. Any idempotent semiring has a naturally-defined partial order associated with it: x y def x + y = y. (1) The order relation is so central to the theory that one might take it as primitive, but we will consider it an abbreviation for the equation on the right-hand side of (1). In the language-theoretic and relational models of the last lecture, is set inclusion. But beware: in the min, + algebra, is the reverse of the natural order on R extended to R + { }. By (1), x y iff min x, y = y, but this occurs iff x is greater than or equal to y in the natural order on R. (Note that we are carefully avoiding the use of the notation for the natural order on R!) That is a partial order follow easily from the definition (1) and the axioms of idempotent semirings. Reflexivity is just the idempotence axiom x + x = x. Antisymmetry follows from commutativity of +: if x y and y x, then y = x+y = y +x = x. Finally, for transitivity, if x y and y z, then therefore x z. x + z = x + (y + z) since y + z = z = (x + y) + z associativity of + = y + z since x + y = y = z again since y + z = z, In any idempotent semiring, the operators + and are monotone with respect to in the sense that for all x, y, z S, x y x + z y + z x y z + x z + y x y xz yz x y zx zy. (Monotonicity will also hold for the operator of Kleene algebra, that is, x y x y, when we get around to discussing it.) These properties follow easily from the axioms. 3

In any idempotent semiring, the operator + gives the least upper bound or supremum of any pair of elements with respect to the natural order, and 0 is the least element of the semiring with respect to. To say that x + y is the least upper bound of x and y says that x x + y and y x + y (x + y is an upper bound for x and y); if z is any other upper bound, that is, if x z and y z, then x + y z (x + y is the least upper bound). The proof that x + y is an upper bound uses associativity and idempotence: x + (x + y) = (x + x) + y = x + y, and similarly for y x + y. The proof that it is the least upper bound uses only associativity: if x z and y z, then (x + y) + z = x + (y + z) = x + z = z. One observation that is not difficult to check is that the n n matrices over a semiring again form a semiring under the natural definitions of the matrix operations. Moreover, if the underlying semiring is idempotent, then so is the matrix semiring (Exercise??). The Operator Now we turn to the operator. This is the most interesting part of Kleene algebra, because it captures the notion of iteration. Because of this, it may seem that is inherently infinitary. Indeed, there are several infinitary axiomatizations that we will consider. However, it is possible to derive most of the interesting parts of the theory in a purely finitary way. The operator is a unary operator written in postfix. Intuitively, x represents zero or more iterations of x. In relational models, this is reflexive transitive closure; in language models, the Kleene asterate. There are several different competing axiomatizations of, and in part our study will be to understand the relationships among them. For now, we shall pick a particular one as our official definition for the purposes of this course. Thus we define a Kleene algebra to be a structure (K, +,,, 0, 1) that is an idempotent semiring under +,, 0, 1 satisfying the properties (2) (5) below. We assign precedence > > + to the operators to avoid unnecessary parentheses. The axioms for consist of two equations and two equational implications or Horn formulas. (Note that up to now, the axioms have been purely equational.) The two equational axioms for are and the two equational implications are 1 + xx x (2) 1 + x x x (3) b + ax x a b x (4) b + xa x ba x. (5) 4

Of course, these are all considered to be implicitly universally quantified, so that (4) and (5) are assumed to hold for all a, b, and x in any Kleene algebra. The significance of (2) (5) concerns the solution of linear inequalities. As we shall see, much of the theory of Kleene algebra is concerned with the solution of finite systems of linear inequalities. For example, a finite automaton is essentially such a system. Axioms (2) and (4) provide for the existence of a unique least solution to a certain single linear inequality in a single variable, namely b + ax X, (6) where X is a variable ranging over elements of the Kleene algebra. Axioms (2) and (4) together essentially say that a b is a solution to (6), and moreover, it is the unique least solution among all solutions in the Kleene algebra. First, (2) says that a b is a solution, since by monotonicity of multiplication and distributivity, 1 + aa a (1 + aa )b a b b + a(a b) a b ; and (4) says exactly that a b is less than or equal to any other solution, therefore it is the unique least solution. Dually, the axioms (3) and (5) say that ba is the unique least solution to b + Xa X. Let us illustrate the use of (4) and (5) to show that (2) and (3) can be strengthened to equalities. We show this for (2); the result for (3) is symmetric. We already have that 1 + xx x, so by antisymmetry, it suffices to show the reverse inequality; equivalently, x 1 1 + xx. This is the right-hand side of (4) with 1 substituted for b, x substituted for a, and 1 + xx substituted for x, so it suffices to show that the left-hand side of (4) holds under the same substitution, or 1 + x(1 + xx ) 1 + xx. But this is immediate from (2) and monotonicity. Recall from the last lecture that in relational models, R was defined to be the reflexive transitive closure of the relation R. To be reflexive means that ι R, where ι is the identity relation; to be transitive means that R R R ; and to contain R means that R R. Abstractly, these properties are expressed by the inequalities 1 x (7) x x x (8) x x, (9) 5

respectively. Equivalently, 1 + x x + x x. (10) We might interpret this inequality as saying that x is a reflexive and transitive element dominating x. It does not, however, say that it is the reflexive transitive closure of x; for that we need the equational implication 1 + yy + x y x y, (11) which says that x is the least reflexive and transitive element dominating x. Now in the presence of the other axioms, (10) is equivalent to (2) (and, by symmetry, to (3) as well). To prove that (2) implies (10), it suffices to show that (2) implies (7) (9). The inequality (7) is immediate from (2). Also, multiplying (7) on the left by x, by monotonicity we have x xx ; then (9) is immediate from this and (2). The last inequality (8) is left as an exercise (Homework 1, Exercise 1(a)). This argument requires either (4) or (5). Conversely, to show that (10) implies (2), assume (10). Then 1 x from (7). Also, by (8), (9), and monotonicity we have xx x x x. Since 1 + xx is the least upper bound of 1 and xx, we have (2). Each of (4) and (5) alone implies (11). The converse does not hold: later, we will construct a left-handed Kleene algebra that is not right-handed (one satisfying (4) but not (5)). To show that (4) implies (11), suppose that (4) holds for all a, b, and x, and assume the left-hand side of (11). To show the right-hand side of (11) holds, by (4) it suffices to show that 1 + xy y. But this follows easily from the left-hand side of (11): we have x y, and by monotonicity, 1 + xy 1 + yy y. In the presence of the other axioms, the implications (4) or (5) are equivalent to ax x a x x (12) xa x xa x, (13) respectively. These alternative forms are quite useful in some contexts. The proofs of equivalence are left as an exercise (Exercise??). Finally, as promised, we show that is monotone. Suppose x y. We wish to show that x y. By (4), it suffices to show that 1 + xy y. But since x y, by monotonicity and (2) we have 1 + xy 1 + yy y. Next time we will look at some alternative axiomatizations of. 6