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

Similar documents
From Semirings to Residuated Kleene Lattices

Algebraic Gentzen systems and ordered structures. Peter Jipsen, Chapman University, California

From Residuated Lattices to Boolean Algebras with Operators

Axioms of Kleene Algebra

Introduction to Kleene Algebras

Axiomatizability of Algebras of Binary Relations

THE EQUATIONAL THEORIES OF REPRESENTABLE RESIDUATED SEMIGROUPS

Kleene Algebra and Arden s Theorem. Anshul Kumar Inzemamul Haque

REPRESENTATION THEOREMS FOR IMPLICATION STRUCTURES

Periodic lattice-ordered pregroups are distributive

Using Gentzen system techniques with existing automated theorem provers and rewriting tools

RESIDUATED FRAMES WITH APPLICATIONS TO DECIDABILITY

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

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

Research Statement Christopher Hardin

Characterizing the Equational Theory

Embedding theorems for normal divisible residuated lattices

An Algebraic Proof of the Disjunction Property

Equational Logic. Chapter Syntax Terms and Term Algebras

RELATION ALGEBRAS AS EXPANDED FL-ALGEBRAS

Distributive residuated frames and generalized bunched implication algebras

The Equational Theory of Kleene Lattices

Equational Theory of Kleene Algebra

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

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

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

GENERATING SETS AND DECOMPOSITIONS FOR IDEMPOTENT TREE LANGUAGES

Universal Algebra for Logics

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

The Blok-Ferreirim theorem for normal GBL-algebras and its application

Halting and Equivalence of Schemes over Recursive Theories

A Weak Bisimulation for Weighted Automata

Completeness of Star-Continuity

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

Towards Kleene Algebra with Recursion

Semantics: Residuated Frames

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

languages by semifilter-congruences

Algebras with finite descriptions

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

Kleene Algebra with Tests: A Tutorial

When does a semiring become a residuated lattice?

Boolean Algebra CHAPTER 15

Course 311: Michaelmas Term 2005 Part III: Topics in Commutative Algebra

Kleene modules and linear languages

Solving weakly linear inequalities for matrices over max-plus semiring and applications to automata theory

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

Coalgebra, lecture 10: Algebra and Coalgebra for Regular Expressions

Congruence Boolean Lifting Property

SYNTACTIC SEMIGROUP PROBLEM FOR THE SEMIGROUP REDUCTS OF AFFINE NEAR-SEMIRINGS OVER BRANDT SEMIGROUPS

Regular Languages. Problem Characterize those Languages recognized by Finite Automata.

Closure operators on sets and algebraic lattices

CHAPTER 1. Relations. 1. Relations and Their Properties. Discussion

Propositional Logic Language

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

RESIDUALLY FINITE VARIETIES OF NONASSOCIATIVE ALGEBRAS

NOTES ON AUTOMATA. Date: April 29,

Topos Theory. Lectures 17-20: The interpretation of logic in categories. Olivia Caramello. Topos Theory. Olivia Caramello.

Algebraic Notions of Nontermination: Omega and Divergence in Idempotent Semirings

MATH 433 Applied Algebra Lecture 22: Semigroups. Rings.

1. Propositional Calculus

How and when axioms can be transformed into good structural rules

TR : Binding Modalities

On Fixed Point Equations over Commutative Semirings

Subdirectly irreducible commutative idempotent semirings

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories

A CHARACTERIZATION OF LOCALLY FINITE VARIETIES THAT SATISFY A NONTRIVIAL CONGRUENCE IDENTITY

Groups and Symmetries

Polynomial closure and unambiguous product

Substructural Logics and Residuated Lattices an Introduction

A GENTZEN SYSTEM EQUIVALENT TO THE BCK-LOGIC

SUBLATTICES OF LATTICES OF ORDER-CONVEX SETS, III. THE CASE OF TOTALLY ORDERED SETS

Introduction to Intuitionistic Logic

hal , version 1-21 Oct 2009

An Abstract Approach to Consequence Relations

ERRATA: MODES, ROMANOWSKA & SMITH

On Urquhart s C Logic

Π 0 1-presentations of algebras

Propositional and Predicate Logic - VII

Duality and Automata Theory

X-MA2C01-1: Partial Worked Solutions

Informal Statement Calculus

MaanavaN.Com MA1256 DISCRETE MATHEMATICS. DEPARTMENT OF MATHEMATICS QUESTION BANK Subject & Code : MA1256 DISCRETE MATHEMATICS

Subdirectly Irreducible Modes

A Discrete Duality Between Nonmonotonic Consequence Relations and Convex Geometries

Aperiodic languages and generalizations

Introduction to Restriction Categories

3515ICT: Theory of Computation. Regular languages

arxiv: v2 [math.ra] 4 Mar 2016

Monoidal Categories, Bialgebras, and Automata

Semantics of intuitionistic propositional logic

Invertible Matrices over Idempotent Semirings

Kleene Algebras and Algebraic Path Problems

Multiplicative Conjunction and an Algebraic. Meaning of Contraction and Weakening. A. Avron. School of Mathematical Sciences

JOIN-COMPLETIONS OF ORDERED ALGEBRAS

KLEENE algebra is an algebraic structure that captures

Algebras of Relations and Relevance Logic

Relational semantics for a fragment of linear logic

Discrete Mathematics. CS204: Spring, Jong C. Park Computer Science Department KAIST

Disjunction Property and Complexity of Substructural Logics

Transcription:

An Overview of Residuated Kleene Algebras and Lattices Peter Jipsen Chapman University, California 1. Residuated Lattices with iteration 2. Background: Semirings and Kleene algebras 3. A Gentzen system for Residuated Kleene Lattices and some reducts 4. Interpreting Kleene algebras with tests 1. Residuated Lattices with iteration This talk is mostly about Residuated Kleene Lattices, which are defined as noncommutative residuated 0,1-lattices expanded with a unary operation that satisfies x (x y) ( is order preserving) e x x x = x (x\x) = x\x The element x is intended to represent the reflexive transitive closure of x, also called the Kleene- of x. Other well-known residuated 0,1-lattices with additional unary operations: Residuated Boolean monoids = Residuated 0,1-lattices with Boolean negation Sequential algebras Relation algebras Intuitionistic Linear Logic = Commutative residuated 0,1-lattices with storage For a good perspective on residuated Kleene lattices, we need to back up a bit. 2. Background: Semirings and Kleene algebras An algebra (A,, 0,, e) is a semiring if (A,, e) is a monoid (i.e. is associative, with identity e), (A,, 0) is a commutative monoid and x(y z) = xy xz, (y z)x = yx zx, and x0 = 0 = 0x. Here we are writing x y as xy, and consider this operation to have priority over. Semirings are common generalizations of rings (where (A,, 0) is an abelian group) and bounded distributive lattices (where is commutative, and x(x y) = x = x xy). 1

A semiring is called idempotent if x x = x. In this case (A,, 0) is a lowerbounded semilattice, and as usual one defines a partial order x y by x y = y. It follows from the distributivity that is order preserving. We will consider expanding idempotent semirings with one of the following: 1. a meet operation, giving multiplicative lattices (ML) (A,,, 0,, e) 2. residuals \, /, giving residuated idempotent semirings (RISR) (A,, 0,, e, \, /) 3. Kleene-, giving Kleene algebras (KA) (A,, 0,, e, ) that satisfy ( 0) ( 1) ( 2) e x x x = x xy y = x y = y yx y = yx = y MR and RISR are varieties, while KA is only a quasivariety. 2

KA and many related classes were studied by Kleene, Conway, Kozen and others, since it is an algebraic framework for regular languages (sets of strings accepted by automata) and for sequential programs: for programs p, q, pq means running p followed by q, p q means running p or q, p means running p repeatedly 0 or more times. RKAs and RKLs have also been called action algebras (Pratt [1991]) and action lattices (Kozen[1992]) respectively, and they are the algebraic version of action logic. In this context, elements represent actions. Pratt illustrates this as follows: let p be the action you bet on a horse, let q be the horse wins, and r you get rich. Then pq r represents the statement if you bet on a horse and it then wins, you get rich which by residuation is equivalent to if you bet on a horse you get rich if the horse then wins (p r/q) and if a horse wins then had you bet on it, you would be rich (q p\r) Examples of RKLs: Any join-complete residuated lattice can be expanded to a residuated Kleene lattice: define x 0 = e x n = xx n 1 x = n ω x n Also, the collection of regular sets on an alphabet Σ is a residuated Kleene lattice under the natural interpretation of the operations. Let s recall the axioms of KA = idempotent semirings + ( 0) ( 1) ( 2) e x x x = x xy y = x y = y yx y = yx = y Now ( 0) says that x is reflexive ( e x ), transitive ( x x x ) and x x. Suppose y has the same properties: e x yy = y. Then x y = xy yy y ( 1) = x y y = x x e x y y. 3

Therefore x is the smallest reflexive transitive element above x, i.e. the reflexive transitive closure of x. Motivation for adding the residuals to KA: Conway s leap. Let Σ be the free monoid on a set Σ, and consider the powerset algebra ( (Σ ),,,, {λ}, ), where X Y = {xy x X, y Y } and X = X n. n ω Define A = {0, e, a, 1} and h : (Σ ) A by h( ) = 0, h({λ}) = e, h(x) = a for any finite set X, and h(x) = 1 otherwise. Then A is a homomorphic image of (Σ ), but ( 1) fails in A: aa a, since a a = 1a = 1 a. (I.e. a leaps to 1 even though a is transitive and reflexive.) Conclusion: KA is not closed under homomorphic images, hence not a variety. However, h does not preserve residuals: X/X = {λ} for any finite set X, but a/a = a in A. Theorem (Pratt 1991): RKA is a variety defined by the identities for residuated semirings together with e x x x = x, x (x y) and (y/y) y/y. Proof: ( 1) iff x y/y = x y/y, which implies (y/y) y/y. Conversely, suppose (y/y) y/y holds. Then x (y/y) = x (y/y) y/y, so xy y = x y y. Even better, with residuals we have that ( 1) and ( 2) are equivalent. We have already seen that ( 1) implies the quasiequation e x yy y = x y, so it suffices to show that this quasiequation implies ( 2): yx y = yx = y. We always have e y\y and (y\y)(y\y) y\y, so if yx y then also x y\y. Hence by the quasiequation we conclude that x y\y, i.e. yx y. Motivation for adding meet to RKA: Matrix algebras For a semiring A, consider the set A n n of all n n matrices. Let M n (A) = (A n n,, 0 n,, e n ) be the semiring of matrices, where 0 n is the zero matrix, e n is the identity matrix, [x ij ] [y ij ] = [x ij y ij ] and [x ij ] [y ij ] = [ n x ik y kj ] i.e. or are the usual matrix addition and multiplication. If A is idempotent, then so is M n (A). k=1 4

Furthermore, if A has a Kleene- defined on it, this induces a Kleene- on M n (A): [ ] [ ] S T If X = let W = S T V U V U and define X W = W T V V UW V V UW T V Kozen has used this construction to prove several fundamental results about Kleene algebra. In a 1993 paper on action algebras he also proves the following lemma: Lemma: Let A be a residuated idempotent semiring. Then M n (A) is residuated if and only if A has finite meets. [ n ] [ n In fact, [x ij ]\[y ij ] = x ki \y kj and [x ij ]/[y ij ] = x ik /y jk ]. k=1 k=1 On the other hand, if M 2 (A) is residuated and a, b A, then there exist largest elements x, y, z, w such that [ x y x y ] = [ e 0 e 0 ] [ x y z w ] [ a a b b ] i.e. x is the largest element such that x a and x b, hence x = a b. Theorem (Kozen 1993): If A is a residuated (Kleene) lattice then M n (A) is also a residuated (Kleene) lattice. Kozen also gives an example to show that there are residuated Kleene algebras that do not have a meet operation. This matrix semiring construction deserves to be studied closely for residuated lattices and RKL. Problem 1: What varieties of residuated lattices are closed under the construction of matrix algebras? A Gentzen system for Residuated Kleene Lattices and some reducts Gentzen systems are usually defined for logics, and use pairs of sequences of formulas (called sequents) to specify the deduction rules of the logic. Here we take an algebraic approach. An algebraic Gentzen system is a set G of quasi-inequalities of the form s 1 t 1 &... & s n t n = s 0 t 0, where s i, t i are terms. These implications are usually referred to as Gentzen rules and are written in the form s1 t1... sn tn s 0 t 0. 5

For example, here is a Gentzen system for idempotent semirings: u x v y x x u0v w uv xy u x u x y u y u x y uxv w uyv w u(x y)v w (Rather than using sequences of terms, we are assuming here that is associative, and we identify xe and ex with x.) For residuals and meet we add the rules: uy x u x/y x y uzv w u(z/y)xv w xu y u x\y x y uzv w ux(y\z)xv w u x u y u x y uxv w u(x y)v w uyv w u(x y)v w Note that all the rules above are valid quasi-inequalities for residuated lattices. A proof-tree for the Gentzen system G is a finite rooted tree in which each element is an inequality, and if s 1 t 1,..., s n t n are the covers of s 0 t 0 then the corresponding quasi-inequality is a substitution instance of a member of G. An inequality s t is Gentzen provable if there exists a proof-tree with s t as the root. Theorem (Ono and Komori 1985): s t holds in all residuated lattices if and only if s t is Gentzen provable from the rules above. Since the premises of each of these rules are determined by the conclusion (i.e. they have the subterm property), it is decidable whether an inequality is Gentzen provable. Corollary: The equational theory of residuated lattices is decidable. To obtain a Gentzen system for (residuated) Kleene algebras (lattices) we add the rules: u e u x u x u x v x u x uv x u y xy y x u y u y yx y ux y x u u y x y 6

The first three rules are equivalent to ( 0), and the next two are equivalent to ( 1) and ( 2). However the last rule is the cut rule which lacks the subterm property, so the decidability of the equational theory of KA, RKA and RKL does not follow. Problem 2: Can the cut rule be eliminated? Kozen has shown by different methods that the equational theory of KA is decidable (in fact PSPACE complete). Problem 3: Is the equational theory of RKA or RKL decidable? For RKL, this should be compared to the result that the equational theory of intuitionistic linear logic algebras (ILL = residuated lattices + storage) is undeciable (Lincoln et al 1991). Interpreting Kleene algebras with tests To use Kleene algebras for the analysis of sequential programs, one wants to translate the standard programming constructs into Kleene algebra terms. In the relational semantics for programs one uses relations on a set of states to model the input-output relation of a program. Let S be the set of states that occur during a computation. E.g. a state could be a vector of the current values for the variables that are used in the program. A program p is modeled by a set of pairs of states. s 1, s 2 p means that running program p when in state s 1 may produce the state s 2. Programs are allowed to be nondeterministic, so there can be more than one output state for a given input state. An atomic program is a single statement like a := a + 1, which corresponds to the relation with pairs of state vectors s 1, s 2, that differ only in the value for the variable a, with this value being one greater in s 2. The program e is the identity relation on S, and running it has no effect on the state. The program 0 is the empty relation, and it corresponds to aborting the computation. A boolean test is a program b that contains pairs s, s for every state s in which the test is true. E.g. the test a > 3 contains s, s whenever s is a state in which variable a is greater than 3. 7

The negation b of a boolean test is the relation { s, s : s, s / b}. The standard compound statements of sequential programs are pq which is already a Kleene algebra term if b then p else q which is translated as bp ( b)q and while b do p which is translated as (bp) ( b). Kozen defines Kleene algebras with tests to be two-sorted algebras (K, B,,,, 0, e, ) where B K and is a unary operation only defined on B such that (K,,,, 0, e) is a Kleene algebra and (B,,,, 0, e) is a Boolean algebra (with e as largest element). These algebras are used in several papers to give equational proofs of correctness of program transformations, compiler optimizations and secure code certification. Let us observe that with the help of residuals and meet we can instead work in a one-sorted algebra: Define x = ((x e)\0) e and consider the identities x = x e and (x e)(y e) = x y e. The variety of residuated lattices that satisfy these identities is refered to as residuated lattices with tests. If we also include the operation, we obtain the variety RKLT of residuated Kleene lattices with tests. Proposition: Let A be in RKLT, and let B = {x A : x e}. Then (A, B,,,, 0, e, ) is a Kleene algebra with test. Moreover, the standard model for relational semantics is in RKLT. While much of the analysis of residuated lattices has focused on the integral case or concerns the negative cones of residuated lattices, members of RKLT are at the opposite end of the spectrum since they have Boolean negative cones. Problem 4: Is the variety of residuated lattices with tests or the variety RKLT decidable? The standard relational model also satisfies the distributive law since it is a subalgebra of (a reduct of) a relation algebra. Let R be the class of all algebras isomorphic to ones whose elements are binary relations and whose operations are union, intersection and composition. Andreka [1991] proved that R is not a variety, but it generates the finitely based variety of distributive lattice-ordered semigroups. Can this result be extended 8

to show that the positive reducts of relation algebras generate the variety of all distributive residuated lattices with tests? Summary of classes considered: additive inverses SR = semirings = rings (, 0,, e) without ISR = idempotent semirings = SR + is idempotent ML = multiplicative 0-lattices = ISR + meet RISR = residuated idempotent semirings = ISR + residuals \, / KA = Kleene algebras = ISR + Kleene- RL = residuated 0,1-lattices = ML + residuals KL = Kleene lattices = KA + meet RKA = residuated Kleene algebras = KA + residuals RKL = residuated Kleene lattices = RL + Kleene- RLT = residuated 0,1-lattices with tests = RL + below e is a Boolean algebra RKLT = residuated Kleene lattices with test = RLT + Kleene- The following table is still very incomplete, but it contains most of the wellknown results. IS ISR ML RISR KA RL KL RKA RKL RLT RKLT Congruence permutable Congruence e-permutable Congruence e-regular Congruence distributive Decidable Equational Theory Finite Embedding Property References Dexter Kozen. On action algebras. In J. van Eijck and A. Visser, editors, Logic and Information Flow, pages 78-88. MIT Press, 1994. http://www.cs.cornell.edu/kozen/papers/act.ps Vaughan Pratt. Action Logic and Pure Induction, Logics in AI: European Workshop JELIA 90, ed. J. van Eijck, LNCS 478, 97-120, Springer-Verlag, Amsterdam, NL, Sep, 1990. http://boole.stanford.edu/pub/jelia.ps.gz 9