Topological Representation of Contact La
Topological Representation of Contact La
Topological Representation of Contact La
Editorial Board
David Hutchison
Lancaster University, UK
Takeo Kanade
Carnegie Mellon University, Pittsburgh, PA, USA
Josef Kittler
University of Surrey, Guildford, UK
Jon M. Kleinberg
Cornell University, Ithaca, NY, USA
Friedemann Mattern
ETH Zurich, Switzerland
John C. Mitchell
Stanford University, CA, USA
Moni Naor
Weizmann Institute of Science, Rehovot, Israel
Oscar Nierstrasz
University of Bern, Switzerland
C. Pandu Rangan
Indian Institute of Technology, Madras, India
Bernhard Steffen
University of Dortmund, Germany
Madhu Sudan
Massachusetts Institute of Technology, MA, USA
Demetri Terzopoulos
University of California, Los Angeles, CA, USA
Doug Tygar
University of California, Berkeley, CA, USA
Moshe Y. Vardi
Rice University, Houston, TX, USA
Gerhard Weikum
Max-Planck Institute of Computer Science, Saarbruecken, Germany
Renate A. Schmidt (Ed.)
Relations
and Kleene Algebra
in Computer Science
13
Volume Editor
Renate A. Schmidt
University of Manchester
School of Computer Science
Oxford Rd, Manchester M13 9PL, UK
E-mail: [email protected]
ISSN 0302-9743
ISBN-10 3-540-37873-1 Springer Berlin Heidelberg New York
ISBN-13 978-3-540-37873-0 Springer Berlin Heidelberg New York
This work is subject to copyright. All rights are reserved, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting,
reproduction on microfilms or in any other way, and storage in data banks. Duplication of this publication
or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965,
in its current version, and permission for use must always be obtained from Springer. Violations are liable
to prosecution under the German Copyright Law.
Springer is a part of Springer Science+Business Media
springer.com
© Springer-Verlag Berlin Heidelberg 2006
Printed in Germany
Typesetting: Camera-ready by author, data conversion by Scientific Publishing Services, Chennai, India
Printed on acid-free paper SPIN: 11828563 06/3142 543210
Preface
This volume contains the joint proceedings of the 9th International Conference
on Relational Methods in Computer Science (RelMiCS-9) and the 4th Interna-
tional Workshop on Applications of Kleene Algebra (AKA 2006). The joint event
was hosted by the School of Computer Science at the University of Manchester,
UK, from August 29 to September 2, 2006. RelMiCS/AKA is the main forum
for the relational calculus as a conceptual and methodological tool and for topics
related to Kleene algebras. Within this general theme, the conference series is de-
voted to the theory of relation algebras, Kleene algebras and related formalisms
as well as to their diverse applications in software engineering, databases and
artificial intelligence. This year, special focus was on formal methods, logics of
programs and links with neighboring disciplines. This diversity is reflected by
the contributions to this volume.
The Programme Committee selected 25 technical contributions out of 44 ini-
tial submissions from 14 countries. Each paper was refereed by at least three
reviewers on its originality, technical soundness, quality of presentation and rel-
evance to the conference. The programme included three invited lectures by
distinguished experts in the area: “Weak Kleene Algebra and Computation
Trees” by Ernie Cohen (Microsoft, USA), “Finite Symmetric Integral Relation
Algebras with no 3-Cycles” by Roger Maddux (Iowa State University, USA),
and “Computations and Relational Bundles” by Jeff Sanders (Oxford, UK). In
addition, for the first time, a PhD programme was co-organized by Georg Struth.
It included the invited tutorials “Foundations of Relation Algebra and Kleene
Algebra” by Peter Jipsen (Chapman University, USA), and “Relational Methods
for Program Refinement” by John Derrick (Sheffield University, UK).
As in previous years, the RelMiCS Conference and the AKA Workshop were
co-organized because of their considerable overlap. Previous RelMiCS meetings
were held in 1994 at Dagstuhl, Germany, in 1995 at Parati, Brazil, in 1997 at
Hammamet, Tunisia, in 1998 at Warsaw, Poland, in 1999 at Québec, Canada,
in 2001 at Oisterwijk, The Netherlands, in 2003 at Malente, Germany and in
2005 at St.Catharines, Canada. The AKA Workshop has been held jointly with
RelMiCS since 2003, after an initial Dagstuhl Seminar in 2001.
I would like to thank the many people without whom the meeting would
not have been possible. First, I would like to thank all authors who submitted
papers, all participants of the conference as well as the invited keynote speakers
and the invited tutorial speakers for their contributions. I am very grateful to
the members of the Programme Committee and the external referees for care-
fully reviewing and selecting the papers. I thank my colleagues on the Steering
Committee for their advice and the support for the changes introduced for this
year’s event. Special thanks go to the members of the local organization team
in the School of Computer Science at the University of Manchester for all their
VI Preface
help: the staff in the ACSO office, especially Bryony Quick and Iain Hart, the
staff of the finance office, and the technical staff, as well as Zhen Li and David
Robinson. Moreover, I am extremely grateful to Georg Struth for his tremen-
dous amount of effort—as Programme Chair he helped with every aspect of the
planning and organization of RelMiCS/AKA 2006 and the PhD Programme.
Finally, it is my pleasure to acknowledge the generous support by: the UK En-
gineering and Physical Sciences Research Council (grant EP/D079926/1), the
London Mathematical Society, the British Logic Colloquium, the University of
Manchester (President’s Fund), and the School of Computer Science, University
of Manchester.
Conference Chairs
Renate Schmidt (UK, General Chair)
Georg Struth (UK, Program Chair)
Steering Committee
Rudolf Berghammer (Germany, Chair) Gunther Schmidt (Germany)
Jules Desharnais (Canada) Renate Schmidt (UK)
Ali Jaoua (Qatar) Harrie de Swart (Netherlands)
Bernhard Möller (Germany) Michael Winter (Canada)
Ewa Orlowska (Poland)
Program Committee
Roland Backhouse (UK) Zhiming Liu (China)
Rudolf Berghammer (Germany) Bernhard Möller (Germany)
Stéphane Demri (France) Damian Niwinski (Poland)
Jules Desharnais (Canada) Ewa Orlowska (Poland)
Zoltán Ésik (Hungary, Spain) Alban Ponse (Netherlands)
Marcelo Frı́as (Argentina) Ingrid Rewitzky (South Africa)
Hitoshi Furusawa (Japan) Ildikó Sain (Hungary)
Stéphane Gaubert (France) Holger Schlingloff (Germany)
Steven Givant (USA) Gunther Schmidt (Germany)
Valentin Goranko (South Africa) Renate Schmidt (UK)
Martin Henson (UK) Giuseppe Scollo (Italy)
Ali Jaoua (Qatar) Georg Struth (UK)
Peter Jipsen (USA) Michael Winter (Canada)
Wolfram Kahl (Canada) Harrie de Swart (Netherlands)
Yasuo Kawahara (Japan)
External Referees
Balder ten Cate Wim Hesselink Zhao Liang
Alexander Fronk Peter Höfner Kamal Lodaya
Marian Gheorghe Britta Kehden Maarten Marx
VIII Organization
Local Organization
Renate Schmidt (Local Organization Chair)
Bryony Cook, Iain Hart (Registration, Secretarial Support)
Zhen Li (Webpages)
David Robinson (Local Organization)
Sponsoring Institutions
British Logic Colloquium
Engineering and Physical Sciences Research Council
London Mathematical Society
University of Manchester
Table of Contents
Ernie Cohen
Microsoft, US
[email protected]
Abstract. The Kleene algebra axioms are too strong for some program
models of interest (e.g. models that mix demonic choice with angelic or
probabilistic choice). This has led to proposals that weaken the right
distributivity axiom to monotonicity, and possibly weaken or eliminate
the right induction and left annihilation axioms (e.g. lazy Kleene algebra,
probabilistic Kleene algebra, monodic tree Kleene algebra, etc.). We’ll
address some of the basic metatheoretic properties of these theories using
rational trees modulo simulation equivalence.
Roger D. Maddux
Department of Mathematics
396 Carver Hall
Iowa State University
Ames, Iowa 50011
U.S.A.
[email protected]
Some questions raised in a preprint by Jipsen [1] are addressed in this paper.
Most of the results in this paper date from 1983, but some were found and
published independently by Comer [2], Jipsen [1], and Tuza [3]. The first four
sections contain background material.
R1 x + y = y + x, +-commutativity
R2 x + (y + z) = (x + y) + z, +-associativity
R3 x + y + x + y = x, Huntington’s axiom
R4 x;(y ;z) = (x;y);z, ;-associativity
R5 (x + y);z = x;z + y ;z, right ;-distributivity
,
R6 x;1 = x, right identity law
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 2–29, 2006.
c Springer-Verlag Berlin Heidelberg 2006
Finite Symmetric Integral Relation Algebras with No 3-Cycles 3
R7 ˘ = x,
x̆ ˘-involution
R8 (x + y)˘ = x̆ + y̆, ˘-distributivity
R9 (x;y)˘ = y̆ ; x̆, ˘-involutive distributivity
R10 x̆;x;y + y = y. Tarski/De Morgan axiom
RA is the class of relation algebras, and NA is the class of nonassociative
relation algebras, algebras of the form (1) which satisfy all the RA axioms
except ;-associativity. For every A ∈ NA, A, +, is a Boolean algebra by
axioms R1 –R3 (this fact is due to E. V. Huntington [4,5,6]). Because of this,
A, +, is called the Boolean part of A, and standard concepts from the
theory of Boolean algebras may be applied to nonassociative relation algebras
by referring to the Boolean part. BA is the class of Boolean algebras. For any
,
algebra A ∈ NA, the identity element of A is 1 , and other operations and
elements, which correspond to intersection, difference, empty relation, diversity
relation, and universal relation, are defined by
x · y := x + y, (2)
x − y := x + y, (3)
, ,
0 := 1 + 1 , (4)
, ,
0 := 1 , (5)
, ,
1 := 1 + 1 . (6)
,
The zero element is 0, the diversity element is 0 , and the unit element
is 1. Every algebra A ∈ NA satisfies the cycle law:
x̆;z · y = 0 iff x;y · z = 0 iff z ; y̆ · x = 0 (7)
iff y ; z̆ · x̆ = 0 iff y̆ ; x̆ · z̆ = 0 iff z̆ ;x · y̆ = 0
and many other laws, a few of which we gather here:
, , , ,
1̆ = 1 , 0̆ = 0 , (8)
,
1 ;x = x, (9)
0;x = x;0 = 0, (10)
1;1 = 1. (11)
An algebra A ∈ NA is symmetric if it satisfies the equation
x̆ = x. (12)
If A ∈ NA is symmetric then A is also commutative, i.e., it satisfies the equation
x;y = y ;x. (13)
WA is the class of weakly associative relation algebras, those algebras in
NA which satisfy the weak associative law
, ,
((x · 1 );1);1 = (x · 1 );(1;1). (14)
4 R.D. Maddux
Bl (U ) := Sb (U ) , ∪, ,
Every square relation algebra is an equivalence relation algebra, but not every
equivalence relation algebra is a square relation algebra (or even isomorphic to
one). In fact, Sb (E) is not isomorphic to a square relation algebra whenever
E is an equivalence relation with two or more equivalence classes. For example,
if U and V are nonempty disjoint sets and E = U 2 ∪ V 2 , then Sb (E) is an
equivalence relation algebra which is isomorphic to the direct product of the
two square relation algebras Re (U ) and Re (V ). The projection functions from
Sb (E) onto the two factor algebras are nontrivial homomorphisms since U and
V are not empty. However, nontrivial square relation algebras are simple and
have no nontrivial homomorphisms. Consequently Sb (E) is not isomorphic to
any square relation algebra.
We say A is a proper relation algebra if there is an equivalence relation E
such that A is a subalgebra of Sb (E). An algebra A is a representable relation
algebra if it is isomorphic to a proper relation algebra. RRA is the class of
representable relation algebras. We say that ρ is a representation of A
over E and that the field of E is the base set of ρ if E is an equivalence
relation and ρ is an embedding of A into Sb (E). Thus A ∈ RRA iff there
is a representation of A over some equivalence relation. We say that ρ is a
square representation of A on U (and that U is the base set of ρ) if ρ is a
representation of A over U 2 . Let fRRA be the class of finitely representable
relation algebras, those algebras in RRA which have a representation with a
finite base set.
It is easy to see that RRA is closed under the formation of subalgebras and
direct products. For subalgebras this is immediate from the relevant definitions.
As part of the proof for direct products, note that if E is an I-indexed system
of nonempty
pairwise disjoint equivalence relations then they also have disjoint
fields, i∈I Ei is an equivalence relation, and
Sb Ei
∼
= Sb (Ei )
i∈I
i∈I
via the isomorphism which sends each R ∈ Sb i∈I Ei to R ∩ Ei : i ∈ I. A
special case of this observation is that if E is a nonempty equivalence relation
then, letting F d (E)/E be the set of E-equivalence classes of elements in the
field F d (E) of E, we have
Sb (E) ∼= Re (U )
U∈F d(E)/E
via the isomorphism which sends each R ∈ Sb (E) to R ∩ U 2 : U ∈ F d (E)/E .
Suppose ρ is a square representation of A on a finite set U . Create a system
of pairwise disjoint sets Vi and bijections σi : U → Vi for every i ∈ ω. For every
a ∈ A, let
τ (a) := {σi (x), σi (y) : x, y ∈ ρ(a)},
i∈ω
and set E := i∈ω Vi × Vi . Then E is an equivalence relation and τ is a rep-
resentation of A over E. Since τ has an infinite base set, this shows that if a
6 R.D. Maddux
representable relation algebra has a square representation (or, in fact, any repre-
sentation) with a finite base set, then it also has a representation with an infinite
base set (but not necessarily a square representation with an infinite base set).
It is much harder to show that RRA is closed under the formation of homo-
morphic images. This was first proved by Tarski [9], and it has been reproved in
several different ways; see [8,10], Jónsson [11,12], and Hirsch-Hodkinson [13]. It
follows by Birkhoff’s HSP-Theorem [14] that RRA has an equational axiomatiza-
tion. However, Monk [15] proved that RRA does not have a finite equational (nor
even first-order) axiomatization, and Jónsson [12] proved that RRA does not have
an equational basis containing only finitely many variables (see [8, Th. 466–7]).
If ρ is a representation of A over an equivalence relation E, then, for all
a, b ∈ A, we have
The following equation (called (M) in [8]) is true in every RA5 . The notational
convention in this equation is that xij = (xji )˘.
Equation (28) is part of the axiom set in Jónsson [16] and it is an equational form
of a condition on atoms given by Lyndon [17]. For a relation algebra A ∈ RA,
failure of (28) is a simple test for nonrepresentability that implies something
stronger, namely, nonmembership in RA5 .
[x, y, z] := {x, y, z, x̆, z, y, y, z̆, x̆, y̆, x̆, z̆, z̆, x, y̆, z, y̆, x}. (29)
The set [x, y, z] of triples of atoms is called a cycle. By the cycle law (7), the cycle
structure of A is a disjoint union of cycles. We say that [x, y, z] is a forbidden
cycle of A if [x, y, z] ∩ Cy(A) = ∅, that [x, y, z] is a cycle of A if [x, y, z] ⊆
Cy(A), that [x, y, z] is an identity cycle if one (or, equivalently, all) of its
triples contains an identity atom, and that [x, y, z] is a diversity cycle if all of
the elements in its triples are diversity atoms. In case A is symmetric, we say
that [x, y, z] is a 3-cycle (or 2-cycle or 1-cycle) of A if [x, y, z] ⊆ Cy(A) and
,
|{x, y, z}| = 3 (or 2 or 1, respectively). In case A ∈ NA is symmetric and 1 is an
atom of A, we say that A has no 3-cycles if every 3-cycle is forbidden.
Suppose that T is a ternary relation and U is the field of T , i.e.,
X ;Y := {c : ∃x ∃y (x ∈ X, y ∈ Y, T xyc)}.
Note that S must be a symmetric relation because of the form of its definition.
Use S to define X̆ ⊆ U for every subset X ⊆ U by
X̆ := {b : ∃x (Sxb, x ∈ X)}.
The operations ; and ˘ along with the distinguished subset I are enough to
define, starting from the Boolean algebra of all subsets of U , an algebra called
the complex algebra of T , namely,
Cm (T ) := Sb (U ) , ∪, , ;, ˘, I .
∀a (a ∈ U =⇒ ∃b Sab), (33)
∀a (a ∈ U =⇒ ∃i (i ∈ I, T iaa)), (34)
∀x ∀y ∀z ∀a ∀b (T xyz, T zab =⇒ ∃c (T xcb, T yac)), (35)
∀x ∀y ∀z ∀a ∀b (T xyz, T zab =⇒ ∃c T xcb), (36)
∀x ∀y ∀z ∀a ∀b (T xyz, T zab, Ix =⇒ ∃c T xcb), (37)
∀x ∀z ∀a ∀b (T xzz, T zab, Ix =⇒ T xbb). (38)
Statement (33) says that every atom has a converse and statement (34) says that
every atom has a left identity element. Statement (35) expresses ;-associativity
for atoms (and has the same form as Pasch’s Axiom). Statement (36), which
expresses the semiassociative law applied to atoms, is a strict weakening of (35),
obtained by deleting one of the conclusions. Statements (37) and (38) are ob-
tained from (36) by weakening the hypotheses, and each of them expresses the
weak associative law applied to atoms.
The identity element of the complex algebra of T is an atom just in case
I = {e} for some e ∈ U . Whenever this is the case, (34) takes on the following
simpler form,
∀a (a ∈ U =⇒ T eaa).
Finite Symmetric Integral Relation Algebras with No 3-Cycles 9
σ(X) := {g, g ◦ x : g ∈ G, x ∈ X}
The following theorem includes some elementary facts about cycle structures
of finite symmetric integral relation algebras, noticed by those attempting to
enumerate small finite relation algebras, such as Lyndon [17, fn. 13], Backer [18],
McKenzie [19], Wostner [20], Maddux [7,21], Comer [22,23], Jipsen [24], Jipsen-
Lukács [25,26], and Andréka-Maddux [27], and explicitly mentioned in at least
Jipsen [1, Th. 1] and Tuza [3, Th. 2.1].
4. ⇔ is an equivalence relation,
5. [⇒] is a linear ordering of D.
Proof. For part 1, assume x → y, y → z, and x = z. Then x = y, x ≤ y ;y,
y = z, and y ≤ z ;z. Note that y · z = 0 because y and z are distinct atoms and
y ;z ≤ y + z because A has no 3-cycles. Hence
x ≤ y ;y x→y
≤ y ;(z ;z) y→z
= (y ;z);z R4
≤ (y + z);z
= y ;z + z ;z R5
= y + z + z ;z
a1 → a2 → a3 → · · · → an−2 → an−1 → an ,
,
[a1 ] ∪ · · · ∪ [an ] = AtA ∼{1 }.
For each i ∈ {1, . . . , n}, let si be the number of atoms in [ai ] that appear in a
1-cycle of A, and let ti be the number of atoms in [ai ] that do not appear in a
1-cycle of A, i.e.,
s1 · · · sn
Cp(A) := .
t1 · · · tn
Finite Symmetric Integral Relation Algebras with No 3-Cycles 11
n , , ,
Notice that i=1 ti is the number of 1-cycles other than [1 , 1 , 1 ], and the
n
number of diversity atoms
of A is i=1 (si + ti ). In case A has no diversity
0
atoms, we set Cp(A) := .
0
Two basic observations, included in the following theorem, are that the
isomorphism type of A is determined by Cp(A), and that (almost) any two
sequences of nonnegative integers with the same length determine a finite sym-
metric integral relation algebra with no 3-cycles.
Theorem 3.
1. If A and B are finite symmetric integral relation algebras with no 3-cycles
and Cp(A) = Cp(B) then A ∼ = B.
2. If n ∈ ω, s1 , . . . , sn ∈ ω, t1 , . . . , tn ∈ ω, and 0 < s1 + t1 , . . . , sn + tn , then
there is some finite symmetric integral relation algebra A with no 3-cycles
such that
s · · · sn
Cp(A) = 1 .
t1 · · · tn
(The name comes from the symmetric case, in which the cycles added to those
of A and B are all 2-cycles.) Comer [2] proved that A[B] ∈ RRA iff A, B ∈ RRA,
and A[B] ∈ GRA iff A, B ∈ GRA. This is proved below, but first we note the
connection between this operation and the cycle parameters introduced above.
, ,
Theorem 4. Assume A, B ∈ NA, A and B are finite, 1 ∈ AtA, 1 ∈ AtB,
, , ,
{1 } = AtA ∩ AtB, AtA ∼{1 } = ∅ = AtB ∼{1 }, and A[B] := Cm (T ) where T
is defined in (42). If A and B are symmetric, have no 3-cycles, and
s · · · sn s · · · sn
Cp(A) = 1 , Cp(B) = 1 ,
t1 · · · tn t1 · · · tn
s1 · · · sn s1 · · · sn
Cp(A[B]) = .
t1 · · · tn t1 · · · tn
Next is the part of Comer’s theorem that we need later.
12 R.D. Maddux
,
Theorem 5 (Comer [2]). Suppose A, B ∈ NA, A and B are finite, 1 ∈ AtA,
, , , ,
1 ∈ AtB, {1 } = AtA ∩ AtB, and AtA ∼{1 } = ∅ = AtB ∼{1 }.
1. If σ is a square representation of A on U and τ is a square representation
of B on V , then there is a square representation ϕ of A[B] on U × V such
, ,
that, for all a ∈ AtA ∼{1 } and all b ∈ AtB ∼{1 },
,
ϕ(1 ) = {u0 , v0 , u1 , v1 : u0 = u1 , v0 = v1 },
ϕ(a) = {u0 , v0 , u1 , v1 : u0 , u1 ∈ σ(a), v0 = v1 },
ϕ(b) = {u0 , v0 , u1 , v1 : v0 , v1 ∈ σ(b)}.
2. If G and H are groups with identity elements eG and eH , respectively, σ is
an embedding of A into Cm (G), and τ is an embedding of B into Cm (H),
then there is an embedding ϕ of A[B] into Cm (G × H) such that, for all
, ,
a ∈ AtA ∼{1 } and all b ∈ AtB ∼{1 },
,
ϕ(1 ) = {eG , eH },
ϕ(a) = σ(a) × {eH },
ϕ(b) = G × τ (b).
Proof. The statement of part 1 describes the action of ϕ on the atoms of A[B].
What remains is to extend ϕ to all elements of A[B] by setting
ϕ(x) = ϕ(c),
x≥c∈AtA[B]
and check that the extended ϕ really is a square representation as claimed. Part 2
is handled similarly.
The 2-cycle product can also be defined for linearly ordered sets of algebras.
Suppose that Ai ∈ NA and Ai is atomic for every i ∈ I, that there is a single
,
fixed element 1 which is the identity element and also an atom of Ai for every
i ∈ I, that the sets of diversity atoms of algebras in {Ai : i ∈ I} are pairwise
disjoint, and that < is a strict linear ordering of I. Let
T := Cy(Ai ) ∪
i∈I
, ,
[ai , aj , aj ] : i, j ∈ I, i < j, ai ∈ AtAi ∼{1 }, aj ∈ AtAj ∼{1 } .
α
7 Algebras with Parameters
0
1 2
The next theorem shows that A is group representable if Cp(A) is , ,
0 0
3 4
, , . . . . The proof shows that A can be embedded in the complex algebra
0 0
Finite Symmetric Integral Relation Algebras with No 3-Cycles 13
α
Theorem 6. Assume A ∈ RA, A is complete, atomic, and Cp(A) = for
0
some nonzero cardinal α > 0. Then A ∈ GRA.
Gκ ;{0} = {f + 0 : f ∈ Gκ } = Gκ ,
Gκ ;Gλ = Gκ ∪ Gλ , (43)
Gκ ;Gκ = G. (44)
Suppose f ∈ Gκ , g ∈ Gλ , L(f ) = a, κ, and L(g) = b, λ. Then L(f ) = L(g)
since κ = λ. If L(f ) <∗ L(g), then L(f ) = L(f + g), so f + g ∈ Gκ , and if
L(g) <∗ L(f ), then L(g) = L(f +g), so f +g ∈ Gλ . This shows Gκ ;Gλ ⊆ Gκ ∪Gλ .
To show Gκ ⊆ Gκ ;Gλ when κ = λ, suppose f ∈ Gκ and L(f ) = a, κ. Let g
be the function in G whose output is 0 at every value with one exception, namely
g(a+1, λ) = 1. Let h = f +g. Clearly g ∈ Gλ . Also, L(h) = L(f +g) = L(f ) since
L(f ) = a, κ <∗ a + 1, λ = L(g), so h ∈ Gλ . Finally, g + h = g + (f + g) = f .
Similarly, Gλ ⊆ Gκ ;Gλ . This completes the proof of (43).
To show G ⊆ Gκ ;Gκ , consider any g ∈ G with L(g) = a, λ. Let f be
the function in G whose output is 0 at every value with one exception, namely
f (a − 1, κ) = 1. Let h = g + f . Then f ∈ Gκ , L(h) = L(g + f ) = L(f ) since
a − 1, κ = L(f ) <∗ L(g) = a, λ, hence h ∈ Gκ , and g = f + h.
14 R.D. Maddux
There is exactly one relation algebra with a single atom. In the numbering system
,
of [8], this is the algebra 11 . Its sole atom is 1 . It has a single cycle, the identity
, , ,
cycle [1 , 1 , 1 ]. The cycle parameters of this algebra are
0
Cp(11 ) = .
0
11 ∼
= Cm (Z1 ).
The two relation algebras with two atoms are called 12 and 22 in the numbering
, , , , , ,
system of [8]. The cycles of 12 are just the identity cycles [1 , 1 , 1 ] and [1 , 0 , 0 ],
, , , , , ,
while the cycles of 22 are the identity cycles [1 , 1 , 1 ], [1 , 0 , 0 ], and also the
, , ,
diversity cycle [0 , 0 , 0 ]. The multiplication tables for the atoms of these two
algebras are
, , , ,
12 1 0 22 1 0
, , , , , ,
1 1 0 1 1 0
, , , , , , ,
0 0 1 0 0 10
The second table illustrates our notational convention of omitting + signs and
avoiding abbreviations by listing all the atoms in a given product, so that, for
, , , ,
example, we put “1 0 ” instead of “1 + 0 ” or simply “1”. This notational con-
vention is followed in the tables below. The cycle parameters of 12 and 22 are
0 1
Cp(12 ) = , Cp(22 ) = .
1 0
The algebras 12 and 22 are group representable. In fact, 12 is already the complex
algebra of a group since 12 ∼ = Cm (Z2 ). Thus 12 has a square representation
on a 2-element set, but it does not have a square representation on a set of
any other cardinality. Th. 6 applies to 22 , but we may also embed 22 into the
complex algebra of the cyclic group Zn of order n ≥ 3 (whose elements are
{0, 1, 2, . . . , n − 1} and whose operation is +n , addition modulo n) by mapping
, ,
1 to {0} and 0 to {1, 2, . . . , n − 1}. Thus, using “∼=|⊆” to mean, “is isomorphic
to a subalgebra of”, we have
22 ∼
=|⊆ Cm (Zn ) for all n ≥ 3.
, , , , ,
111 1 aa 1 bb aaa bbb abb baa
, , , , ,
17 111 1 aa 1 bb ··· ··· abb ···
, , , , ,
27 111 1 aa 1 bb aaa ··· abb ···
, , , , ,
37 111 1 aa 1 bb ··· bbb abb ···
, , , , ,
47 111 1 aa 1 bb aaa bbb abb ···
, , , , ,
57 111 1 aa 1 bb ··· ··· abb baa
, , , , ,
67 111 1 aa 1 bb aaa ··· abb baa
, , , , ,
77 111 1 aa 1 bb aaa bbb abb baa
Here are the multiplication tables for the atoms of the seven algebras 11 –17 .
, , , ,
17 1 a b 27 1 a b 37 1 a b 47 1 a b
, , , , , , , ,
1 1 a b 1 1 a b 1 1 a b 1 1 a b
, , , ,
a a 1 b a a 1a b a a 1 b a a 1a b
, , , ,
b b b 1a b b b 1a b b b 1 ab b b b 1 ab
, , ,
57 1 a b 67 1 a b 77 1 a b
, , , , , ,
1 1 a b 1 1 a b 1 1 a b
, , ,
a a 1 b ab a a 1 ab ab a a 1 ab ab
, , ,
b b ab 1 a b b ab 1 a b b ab 1 ab
The cycle parameters of algebras 11 –17 are
0 0 1 0 0 1 1 1
Cp(17 ) = , Cp(27 ) = , Cp(37 ) = , Cp(47 ) = ,
1 1 0 1 1 0 0 0
0 1 2
Cp(57 ) = , Cp(67 ) = , Cp(77 ) = .
2 1 0
From Th. 4 and Th. 5 we get
17 ∼
=|⊆ Cm Z22 ,
27 =|⊆ Cm (Z3 × Z2 ) ∼
∼ = Cm (Z6 ),
∼
37 =|⊆ Cm (Z2 × Z3 ) ∼
= Cm (Z6 ),
2
∼
47 =|⊆ Cm Z3 .
Next we show that 57 , 67 , and 77 can be embedded in the complex algebras of
the finite groups Z5 , Z8 , and Z23 , respectively. We have 57 ∼=|⊆ Cm (Z5 ) via ρ if
,
ρ(1 ) = {i, i : i ∈ 5},
ρ(a) = {i, i +5 j : i ∈ 5, j ∈ {1, 4}},
ρ(b) = {i, i +5 j : i ∈ 5, j ∈ {2, 3}},
67 ∼
=|⊆ Cm (Z8 ) via ρ if
,
ρ(1 ) = {i, i : i ∈ 8},
ρ(a) = {i, i +8 j : i ∈ 8, j ∈ {2, 3, 5, 6}},
ρ(b) = {i, i +8 j : i ∈ 8, j ∈ {1, 4, 7}},
16 R.D. Maddux
and 77 ∼
=|⊆ Cm Z23 via ρ if
,
ρ(1 ) = {i, j , i, j : i ∈ 3, j ∈ 3},
ρ(a) = {i, j , i +3 k, j : i, j ∈ 3, k ∈ {1, 2}}
∪ {i, j , i, j +3 k : i, j ∈ 3, k ∈ {1, 2}},
,
ρ(b) = 92 ∼ ρ(a) ∼ ρ(1 ).
All these representations of algebras 11 –77 have been known to many mathemati-
cians, beginning with Lyndon [17]. (However, the representations of 67 and 77
given in Tuza [3, p. 680] are incorrect.) We have supplemented Th. 6 by showing
that A is embeddable in
the complex
algebra
of a finite group whenever the cycle
0 1 2
parameters of A are , , or . On the other hand, Th. 7 below shows
0 0 0
that A has no square representation
(and no representation) on a finite set if
n
n ≥ 3 and Cp(A) = . This was first proved in [21, pp. 65–66] (see [8, Th. 453]
0
or Tuza [3, Th. 2.3]), and is generalized here to cover weak representations of a
larger class of (not necessarily atomic) algebras.
Theorem 7. Let A ∈ NA. Suppose there are distinct nonzero elements a, b, c ∈
A such that
, , ,
0 =a·1 =b·1 =c·1 , (45)
c;b · a;b ≤ b ≤ c;c̆, (46)
a;c · b;c ≤ c ≤ a;ă, (47)
b;a · c;a ≤ a ≤ b; b̆. (48)
Note that |V1 | = 1. Assume that we have constructed a set Vi ⊆ U such that
|Vi | = i ≥ 1 and that we have found distinct elements w, x ∈ U ∼ Vi such that
By repeating the argument once more, using assumptions a ≤ b; b̆, c;b · a;b ≤ b,
,
and a · 1 = 0, we conclude that there is some u ∈ U ∼ Vi+2 such that if Vi+3 =
Vi+2 ∪ {y} then z, u ∈ U ∼ Vi+3 , z = u, and
Vi+3 × {z} ⊆ ρ(a), (59)
(Vi+3 ∪ {z}) × {u} ⊆ ρ(b). (60)
We have now completed a cycle consisting of three similar steps and have used
all the assumptions. Starting from (51) and (52), we found that there are three
distinct y, z, u ∈ U ∼ Vi such that (59) and (60) hold with Vi+3 = Vi ∪ {y, z, u}
and |Vi+3 | = i + 3. This cycle may be repeated indefinitely, so it follows that U
must be infinite.
8 A Subvariety of RA
In this section we define a variety whose finite algebras are symmetric integral
relation algebras with no 3-cycles.
18 R.D. Maddux
Theorem 8. Let A ∈ NA. Then A satisfies all or none of the following condi-
tions.
x;(x · y) ≤ x + y, (61)
x;y ≤ x;(x · y) + x + y, (62)
x · y = 0 =⇒ x;y ≤ x + y. (63)
Proof. Assume A satisfies (61). We show that A also satisfies (62). By elementary
laws from the theory of Boolean algebras we have
x;y ≤ x;(x · y) + x + y,
as desired. Next we assume A satisfies (62) and show that A also satisfies (63).
Assume x · y = 0. Then
Finally, we assume A satisfies (62) and show that A satisfies (63). By Boolean
algebra we have x · x · y = 0, so from (63) we obtain
x;(x · y) ≤ x + x · y.
Many special cases of the associative law hold in every SA (see [29, Th. 25] or [8,
Th. 365]). Associativity may be freely applied to any relative product in which
one of the factors is 1. We therefore get
1 = 1;1
, ,
= (1;(x · 1 );1);(1;(y · 1 );1) (65)
, ,
= 1;((x · 1 );1;(y · 1 ));1 semiassociativity
, ,
= 1;((x · y · 1 );1;(x · y · 1 ));1 (64)
= 1;(0;1;0);1 x·y = 0
= 0,
Corollary 2. V has the following equational basis: R1 –R10 , (12), (62), (64).
x01 · (x02 · x03 ;x32 );(x21 · x24 ;x41 ) = c · (b · b;a);(c · a;a) = c · b;c = c.
By subadditivity we have
b;c · a;c ≤ (b + c) · (a + c) = c,
c;a · b;a ≤ (c + a) · (b + a) = a,
so
x03 ; (x30 ;x01 · x32 ;x21 );x14 · x32 ;x24 · x30 ;(x01 ;x14 · x02 ;x24 ) ;x41
= b; (b;c · a;c);a · a;a · b;(c;a · b;a) ;a
Finite Symmetric Integral Relation Algebras with No 3-Cycles 21
≤ b; c;a · a;a · b;a ;a
≤ b; a · a;a ;a
= b;0;a
= 0.
Thus the left side of (28) evaluates to c, while the right side is 0. But c ≤ 0, so
(28) fails. This shows that (e) implies (f).
(a). By Th. 4, A is the 2-cycle product of
Finally, we show that (f) implies
s
algebras Bi where Cp(Bi ) = i for 1 ≤ i ≤ n. By (f), Cp(Bi ) appears in the
ti
following list.
0 0 1 0 1 2 3 4
, , , , , , , ,··· (66)
0 1 0 2 1 0 0 0
From Th. 6 and the remarks that follow Th. 6 we know that Bi ∈ GRA for
1 ≤ i ≤ n. By Th. 5, we may conclude that A ∈ GRA.
For part 2, note that if Cp(Bi ) is one of the first six cases in (66), then Bi
can be embedded in the complex algebra of one of the finite groups Z1 , Z2 , Z3 ,
Z5 , Z8 , or Z23 , and hence Bi has a square representation on a set of cardinality
1, 2, 3, 5, 8, or 9. Since (h) rules out all but the first six cases of (66), it follows
that (h) implies (g) whenever (a)–(f) hold. Finally, if (a)–(g) hold then by Th. 7
Cp(Bi ) must be one of the first six cases in (66), i.e., (h) must also hold.
Each factor in (67) is integral by Th. 9 because it satisfies the equation (64), is
symmetric by (12), and is subadditive by (62). Therefore each factor in (67) has
no 3-cycles and it has a list of cycle parameters. Compute this list of parameters,
and proceed as follows.
1. Provisionally classify A as representable on a finite set:
A ∈ fRRA. (68)
In some order, check each column that appears in the list of cycle parameters
of a factor in (67). The are two things to check, and they can be done in
either order.
22 R.D. Maddux
and CONTINUE.
3. If the column indicates at least 3 atoms and at least one missing 1-cycle,
i.e., it is one of
2 3 4 1 2 3 0 1 2
, , ,··· , , , ,··· , , , ,··· ,
1 1 1 2 2 2 3 3 3
then the factor in (67) does not satisfy (28), and A is not in RA5 (nor in
RRA, GRA, or wRRA). Change the classification of A to
A ∈ SA ∼ RA5 , (70)
and STOP.
If no column summing to 3 or more is met, then (68) remains in force at the
end. The algorithm stops and the classification of A is changed to (70) if (28)
fails at some column. If that does not happen, then the ultimate classification
is one of two types of representability. (68) holds unless a column is found that
shifts the classification to (69).
Now we apply the algorithm to the symmetric integral relation algebras that
have no 3-cycles and either four or five atoms. (The data on finite algebras
in this paper and in [8] have been checked or obtained with [30].) There are 65
symmetric integral relation algebras that have four atoms. They are the algebras
,
165 –6565 in the numbering system of [8]. The atoms of these algebras are 1 , a,
b, and c. The algebras in this set of 65 which have no 3-cycles are 165 –2465 . Here
are their cycles.
Next are the multiplication tables for the atoms of algebras 165 –2465 . (By the
way, the table for the nonrepresentable relation algebra 2165 given in Tuza [3,
p. 683] is incorrect; it is instead the table for an algebra in SA ∼ RA.)
, , ,
165 1 a b c 265 1 a b c 365 1 a b c
, , , , , ,
1 1 a b c 1 1 a b c 1 1 a b c
, , ,
a a 1 b c a a 1a b c a a 1 b c
, , ,
b b b 1a c b b b 1a c b b b 1 ab c
, , ,
c c c c 1 ab c c c c 1 ab c c c c 1 ab
, , ,
465 1 a b c 565 1 a b c 665 1 a b c
, , , , , ,
1 1 a b c 1 1 a b c 1 1 a b c
, , ,
a a 1a b c a a 1 b c a a 1a b c
, , ,
b b b 1 ab c b b b 1a c b b b 1a c
, , ,
c c c c 1 ab c c c c 1 abc c c c c 1 abc
, , ,
765 1 a b c 865 1 a b c 965 1 a b c
, , , , , ,
1 1 a b c 1 1 a b c 1 1 a b c
, , ,
a a 1 b c a a 1a b c a a 1 b ab c
, , ,
b b b 1 ab c b b b 1 ab c b b ab 1 a c
, , ,
c c c c 1 abc c c c c 1 abc c c c c 1 ab
, , ,
1065 1 a b c 1165 1 a b c 1265 1 a b c
, , , , , ,
1 1 a b c 1 1 a b c 1 1 a b c
, , ,
a a 1 ab ab c a a 1 ab ab c a a 1 b ab c
, , ,
b b ab 1 a c b b ab 1 ab c b b ab 1 a c
, , ,
c c c c 1 ab c c c c 1 ab c c c c 1 abc
, , ,
1365 1 a b c 1465 1 a b c 1565 1 a b c
, , , , , ,
1 1 a b c 1 1 a b c 1 1 a b c
, , ,
a a 1 ab ab c a a 1 ab ab c a a 1 bc a ac
, , ,
b b ab 1 a c b b ab 1 ab c b b a 1 c
, , ,
c c c c 1 abc c c c c 1 abc c c ac c 1 ab
24 R.D. Maddux
, , ,
1665 1 a b c 1765 1 a b c 1865 1 a b c
, , , , , ,
1 1 a b c 1 1 a b c 1 1 a b c
, , ,
a a 1 abc a ac a a 1 bc a ac a a 1 abc a ac
, , ,
b b a 1 c b b a 1b c b b a 1b c
, , ,
c c ac c 1 ab c c ac c 1 ab c c ac c 1 ab
, , ,
1965 1 a b c 2065 1 a b c 2165 1 a b c
, , , , , ,
1 1 a b c 1 1 a b c 1 1 a b c
, , ,
a a 1 abc a ac a a 1 abc a ac a a 1 bc ab ac
, , ,
b b a 1 c b b a 1b c b b ab 1 ac bc
, , ,
c c ac c 1 abc c c ac c 1 abc c c ac bc 1 ab
, , ,
2265 1 a b c 2365 1 a b c 2465 1 a b c
, , , , , ,
1 1 a b c 1 1 a b c 1 1 a b c
, , ,
a a 1 abc ab ac a a 1 abc ab ac a a 1 abc ab ac
, , ,
b b ab 1 ac bc b b ab 1 abc bc b b ab 1 abc bc
, , ,
c c ac bc 1 ab c c ac bc 1 ab c c ac bc 1 abc
00 10 20 01
Cp(965 ) = Cp(1065 ) = Cp(1165 ) = Cp(1265 ) =
2 1
1
1 0
1 2 0
11 21 00 01
Cp(1365 ) = Cp(1465 ) = Cp(1565 ) = Cp(1665 ) =
1
0 0
0 1
2 1 1
10 11 02 12
Cp(1765 ) = Cp(1865 ) = Cp(1965 ) = Cp(2065 ) =
0
2 0
1 1
0 0
0
0 1 2 3
Cp(2165 ) = Cp(2265 ) = Cp(2365 ) = Cp(2465 ) =
3 2 1 0
Applying the algorithm of Th. 11 to algebras 165 –2465 produces the following
results.
1. Algebras 165 –2065 are group representable relation algebras that have square
representations on finite sets.
2. Algebras 2165 –2365 fail to satisfy equation (28), and hence are nonrepre-
sentable relation algebras that are also not in RA5 and are not weakly rep-
resentable.
3. The algebra 2465 is a representable relation algebra that has no square rep-
resentation on a finite set.
There are 3013 symmetric integral relation algebras that have five atoms.
They are the algebras 13013 –823013 in the numbering system of [8]. The atoms
,
of these algebras are 1 , a, b, c, and d. Among these algebras, the ones that have
no 3-cycles are 13013 –823013 . Their cycles and cycle parameters are given in the
following tables.
Finite Symmetric Integral Relation Algebras with No 3-Cycles 25
aaa bbb ccc ddd abb baa acc caa add daa bcc cbb bdd dbb cdd dcc
13013 ··· ··· ··· ··· abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
23013 aaa ··· ··· ··· abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
33013 ··· bbb ··· ··· abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
43013 aaa bbb ··· ··· abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
53013 ··· ··· ccc ··· abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
63013 aaa ··· ccc ··· abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
73013 ··· bbb ccc ··· abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
83013 aaa bbb ccc ··· abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
93013 ··· ··· ··· ddd abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
103013 aaa ··· ··· ddd abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
113013 ··· bbb ··· ddd abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
123013 aaa bbb ··· ddd abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
133013 ··· ··· ccc ddd abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
143013 aaa ··· ccc ddd abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
153013 ··· bbb ccc ddd abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
163013 aaa bbb ccc ddd abb ··· acc ··· add ··· bcc ··· bdd ··· cdd ···
173013 ··· ··· ··· ··· abb baa acc ··· add ··· bcc ··· bdd ··· cdd ···
183013 aaa ··· ··· ··· abb baa acc ··· add ··· bcc ··· bdd ··· cdd ···
193013 aaa bbb ··· ··· abb baa acc ··· add ··· bcc ··· bdd ··· cdd ···
203013 ··· ··· ccc ··· abb baa acc ··· add ··· bcc ··· bdd ··· cdd ···
213013 aaa ··· ccc ··· abb baa acc ··· add ··· bcc ··· bdd ··· cdd ···
223013 aaa bbb ccc ··· abb baa acc ··· add ··· bcc ··· bdd ··· cdd ···
233013 ··· ··· ··· ddd abb baa acc ··· add ··· bcc ··· bdd ··· cdd ···
243013 aaa ··· ··· ddd abb baa acc ··· add ··· bcc ··· bdd ··· cdd ···
253013 aaa bbb ··· ddd abb baa acc ··· add ··· bcc ··· bdd ··· cdd ···
263013 ··· ··· ccc ddd abb baa acc ··· add ··· bcc ··· bdd ··· cdd ···
273013 aaa ··· ccc ddd abb baa acc ··· add ··· bcc ··· bdd ··· cdd ···
283013 aaa bbb ccc ddd abb baa acc ··· add ··· bcc ··· bdd ··· cdd ···
293013 ··· ··· ··· ··· ··· baa acc caa add ··· bcc ··· bdd ··· cdd ···
303013 aaa ··· ··· ··· ··· baa acc caa add ··· bcc ··· bdd ··· cdd ···
313013 ··· bbb ··· ··· ··· baa acc caa add ··· bcc ··· bdd ··· cdd ···
323013 aaa bbb ··· ··· ··· baa acc caa add ··· bcc ··· bdd ··· cdd ···
333013 aaa ··· ccc ··· ··· baa acc caa add ··· bcc ··· bdd ··· cdd ···
343013 aaa bbb ccc ··· ··· baa acc caa add ··· bcc ··· bdd ··· cdd ···
353013 ··· ··· ··· ddd ··· baa acc caa add ··· bcc ··· bdd ··· cdd ···
363013 aaa ··· ··· ddd ··· baa acc caa add ··· bcc ··· bdd ··· cdd ···
373013 ··· bbb ··· ddd ··· baa acc caa add ··· bcc ··· bdd ··· cdd ···
383013 aaa bbb ··· ddd ··· baa acc caa add ··· bcc ··· bdd ··· cdd ···
393013 aaa ··· ccc ddd ··· baa acc caa add ··· bcc ··· bdd ··· cdd ···
403013 aaa bbb ccc ddd ··· baa acc caa add ··· bcc ··· bdd ··· cdd ···
413013 ··· ··· ··· ··· ··· baa ··· caa add daa bcc ··· bdd ··· cdd ···
423013 aaa ··· ··· ··· ··· baa ··· caa add daa bcc ··· bdd ··· cdd ···
433013 ··· bbb ··· ··· ··· baa ··· caa add daa bcc ··· bdd ··· cdd ···
443013 aaa bbb ··· ··· ··· baa ··· caa add daa bcc ··· bdd ··· cdd ···
26 R.D. Maddux
aaa bbb ccc ddd abb baa acc caa add daa bcc cbb bdd dbb cdd dcc
453013 ··· ··· ccc ··· ··· baa ··· caa add daa bcc ··· bdd ··· cdd ···
463013 aaa ··· ccc ··· ··· baa ··· caa add daa bcc ··· bdd ··· cdd ···
473013 ··· bbb ccc ··· ··· baa ··· caa add daa bcc ··· bdd ··· cdd ···
483013 aaa bbb ccc ··· ··· baa ··· caa add daa bcc ··· bdd ··· cdd ···
493013 aaa ··· ··· ddd ··· baa ··· caa add daa bcc ··· bdd ··· cdd ···
503013 aaa bbb ··· ddd ··· baa ··· caa add daa bcc ··· bdd ··· cdd ···
513013 aaa ··· ccc ddd ··· baa ··· caa add daa bcc ··· bdd ··· cdd ···
523013 aaa bbb ccc ddd ··· baa ··· caa add daa bcc ··· bdd ··· cdd ···
533013 ··· ··· ··· ··· abb baa acc caa add ··· bcc cbb bdd ··· cdd ···
543013 aaa ··· ··· ··· abb baa acc caa add ··· bcc cbb bdd ··· cdd ···
553013 aaa bbb ··· ··· abb baa acc caa add ··· bcc cbb bdd ··· cdd ···
563013 aaa bbb ccc ··· abb baa acc caa add ··· bcc cbb bdd ··· cdd ···
573013 ··· ··· ··· ddd abb baa acc caa add ··· bcc cbb bdd ··· cdd ···
583013 aaa ··· ··· ddd abb baa acc caa add ··· bcc cbb bdd ··· cdd ···
593013 aaa bbb ··· ddd abb baa acc caa add ··· bcc cbb bdd ··· cdd ···
603013 aaa bbb ccc ddd abb baa acc caa add ··· bcc cbb bdd ··· cdd ···
613013 ··· ··· ··· ··· ··· baa ··· caa add daa bcc cbb bdd ··· cdd ···
623013 aaa ··· ··· ··· ··· baa ··· caa add daa bcc cbb bdd ··· cdd ···
633013 ··· bbb ··· ··· ··· baa ··· caa add daa bcc cbb bdd ··· cdd ···
643013 aaa bbb ··· ··· ··· baa ··· caa add daa bcc cbb bdd ··· cdd ···
653013 ··· bbb ccc ··· ··· baa ··· caa add daa bcc cbb bdd ··· cdd ···
663013 aaa bbb ccc ··· ··· baa ··· caa add daa bcc cbb bdd ··· cdd ···
673013 aaa ··· ··· ddd ··· baa ··· caa add daa bcc cbb bdd ··· cdd ···
683013 aaa bbb ··· ddd ··· baa ··· caa add daa bcc cbb bdd ··· cdd ···
693013 aaa bbb ccc ddd ··· baa ··· caa add daa bcc cbb bdd ··· cdd ···
703013 ··· ··· ··· ··· abb baa ··· caa add daa ··· cbb bdd dbb cdd ···
713013 aaa ··· ··· ··· abb baa ··· caa add daa ··· cbb bdd dbb cdd ···
723013 aaa bbb ··· ··· abb baa ··· caa add daa ··· cbb bdd dbb cdd ···
733013 ··· ··· ccc ··· abb baa ··· caa add daa ··· cbb bdd dbb cdd ···
743013 aaa ··· ccc ··· abb baa ··· caa add daa ··· cbb bdd dbb cdd ···
753013 aaa bbb ccc ··· abb baa ··· caa add daa ··· cbb bdd dbb cdd ···
763013 aaa bbb ··· ddd abb baa ··· caa add daa ··· cbb bdd dbb cdd ···
773013 aaa bbb ccc ddd abb baa ··· caa add daa ··· cbb bdd dbb cdd ···
783013 ··· ··· ··· ··· abb baa acc caa add daa bcc cbb bdd dbb cdd dcc
793013 aaa ··· ··· ··· abb baa acc caa add daa bcc cbb bdd dbb cdd dcc
803013 aaa bbb ··· ··· abb baa acc caa add daa bcc cbb bdd dbb cdd dcc
813013 aaa bbb ccc ··· abb baa acc caa add daa bcc cbb bdd dbb cdd dcc
823013 aaa bbb ccc ddd abb baa acc caa add daa bcc cbb bdd dbb cdd dcc
0 0 0 0 1 0 0 0 0 1 0 0
Cp(13013 ) = Cp(23013 ) = Cp(33013 ) =
1 1 1 1
0 1 1 1
1 0 1 1
1 1 0 0 0 0 1 0 1 0 1 0
Cp(43013 ) = Cp(53013 ) = Cp(63013 ) =
0 0 1 1
1 1 0 1
0 1 0 1
0 1 1 0 1 1 1 0 0 0 0 1
Cp(73013 ) = Cp(83013 ) = Cp(93013 ) =
1 0 0 1 0 0 0 1 1 1 1 0
Finite Symmetric Integral Relation Algebras with No 3-Cycles 27
2 00 0 10 110
Cp(193013 ) = Cp(203013 ) = Cp(213013 ) =
0 1 1
2 0 1
1 0 1
2 10 0 01 101
Cp(223013 ) = Cp(233013 ) = Cp(243013 ) =
0 0 1
2 1 0
1 1 0
2 01 0 11 111
Cp(253013 ) = Cp(263013 ) = Cp(273013 ) =
0 1 0
2 0 0
1 0 0
2 11 0 00 010
Cp(283013 ) = Cp(293013 ) = Cp(303013 ) =
0 0 0
1 2 1
1 1 1
1 00 1 10 020
Cp(313013 ) = Cp(323013 ) = Cp(333013 ) =
0 2 1
0 1 1
1 0 1
1 20 0 01 011
Cp(343013 ) = Cp(353013 ) = Cp(363013 ) =
0 0 1
1 2 0
1 1 0
1 01 1 11 021
Cp(373013 ) = Cp(383013 ) = Cp(393013 ) =
0 2 0
0 1 0
1 0 0
1 21 0 00 001
Cp(403013 ) = Cp(413013 ) = Cp(423013 ) =
0 0 0
1 1 2
1 1 1
1 00 1 01 010
Cp(433013 ) = Cp(443013 ) = Cp(453013 ) =
0 1 2
0 1 1
1 0 2
0 11 1 10 111
Cp(463013 ) = Cp(473013 ) = Cp(483013 ) =
1 0 1
0 0 2
0 0 1
0 02 1 02 012
Cp(493013 ) = Cp(503013 ) = Cp(513013 ) =
1 1 0
0 1
0 1 0
0
1 12 0 0 10
Cp(523013 ) = Cp(533013 ) = Cp(543013 ) =
0 0
0 3 1
2 1
2 0 3 0 01
Cp(553013 ) = Cp(563013 ) = Cp(573013 ) =
1 1
0 1
3 0
1 1 2 1 31
Cp(583013 ) = Cp(593013 ) = Cp(603013 ) =
2 0
1 0
0 0
0 0 0 1 10
Cp(613013 ) = Cp(623013 ) = Cp(633013 ) =
2 2
2 1
1 2
1 1 2 0 21
Cp(643013 ) = Cp(653013 ) = Cp(663013 ) =
1 1
0 2
0 1
0 2 1 2 22
Cp(673013 ) = Cp(683013 ) = Cp(693013 ) =
2 0
1 0
0 0
0 0 0 1 02
Cp(703013 ) = Cp(713013 ) = Cp(723013 ) =
1 3
1 2
1 1
1 0 1 1 12
Cp(733013 ) = Cp(743013 ) = Cp(753013 ) =
0 3
0 2
0
1
0 3 1 3 0
Cp(763013 ) = Cp(773013 ) = Cp(783013 ) =
1 0 0 0 4
28 R.D. Maddux
1 2 3
Cp(793013 ) = Cp(803013 ) = Cp(813013 ) =
3
2 1
4
Cp(823013 ) =
0
Applying the algorithm of Th. 11 to algebras 13013 –823013 gives the following
results.
1. Algebras 13013 –523013 and 613013 –693013 are group representable relation al-
gebras that have square representations on finite sets.
2. Algebras 533013 –553013 , 573013 –593013 , 703013 –753013 , and 783013 –813013 fail
to satisfy equation (28), and hence are nonrepresentable relation algebras
that are also not in RA5 and are not weakly representable.
3. Algebras 563013 , 603013 , 763013 , 773013 , and 823013 are representable relation
algebras that have no square representation on a finite set.
References
1. Jipsen, P.: Varieties of symmetric subadditive relation algebras. Preprint, pp. 3
(1990)
2. Comer, S.D.: Extension of polygroups by polygroups and their representations us-
ing color schemes. In: Universal algebra and lattice theory (Puebla, 1982). Volume
1004 of Lecture Notes in Math. Springer, Berlin (1983) 91–103
3. Tuza, Z.: Representations of relation algebras and patterns of colored triplets. In:
Algebraic logic (Budapest, 1988). Volume 54 of Colloq. Math. Soc. János Bolyai.
North-Holland, Amsterdam (1991) 671–693
4. Huntington, E.V.: New sets of independent postulates for the algebra of logic, with
special reference to Whitehead and Russell’s Principia Mathematica. Trans. Amer.
Math. Soc. 35(1) (1933) 274–304
5. Huntington, E.V.: Boolean algebra. A correction to: “New sets of independent
postulates for the algebra of logic, with special reference to Whitehead and Rus-
sell’s Principia Mathematica” [Trans. Amer. Math. Soc. 35 (1933), no. 1, 274–304;
1501684]. Trans. Amer. Math. Soc. 35(2) (1933) 557–558
6. Huntington, E.V.: A second correction to: “New sets of independent postulates for
the algebra of logic, with special reference to Whitehead and Russell’s Principia
Mathematica” [Trans. Amer. Math. Soc. 35 (1933), no. 1, 274–304; 1501684]. Trans.
Amer. Math. Soc. 35(4) (1933) 971
7. Maddux, R.D.: Some varieties containing relation algebras. Trans. Amer. Math.
Soc. 272(2) (1982) 501–526
8. Maddux, R.D.: Relation Algebras. Volume 150 of Studies in Logic and the Foun-
dations of Mathematics. Elsevier, Amsterdam (2006)
9. Tarski, A.: Contributions to the theory of models. III. Nederl. Akad. Wetensch.
Proc. Ser. A. 58 (1955) 56–64 = Indagationes Math. 17, 56–64 (1955)
10. Maddux, R.D.: Some sufficient conditions for the representability of relation alge-
bras. Algebra Universalis 8(2) (1978) 162–172
11. Jónsson, B.: Varieties of relation algebras. Algebra Universalis 15(3) (1982) 273–
298
Finite Symmetric Integral Relation Algebras with No 3-Cycles 29
12. Jónsson, B.: The theory of binary relations. In Andréka, H., Monk, J.D., Németi,
I., eds.: Algebraic Logic (Budapest, 1988). Volume 54 of Colloquia Mathematica
Societatis János Bolyai. North-Holland, Amsterdam (1991) 245–292
13. Hirsch, R., Hodkinson, I.: Relation algebras by games. Volume 147 of Studies
in Logic and the Foundations of Mathematics. North-Holland Publishing Co.,
Amsterdam (2002). With a foreword by Wilfrid Hodges.
14. Birkhoff, G.: On the structure of abstract algebras. Proc. Cambridge Philos. Soc.
31 (1935) 433–454
15. Monk, J.D.: On representable relation algebras. Michigan Math. J. 11 (1964)
207–210
16. Jónsson, B.: Representation of modular lattices and of relation algebras. Trans.
Amer. Math. Soc. 92 (1959) 449–464
17. Lyndon, R.C.: The representation of relational algebras. Ann. of Math. (2) 51
(1950) 707–729
18. Backer, F.: Representable relation algebras. Report for a seminar on relation
algebras conducted by A. Tarski, mimeographed, University of California, Berkeley
(Spring, 1970)
19. McKenzie, R.N.: The representation of relation algebras. PhD thesis, University
of Colorado, Boulder (1966)
20. Wostner, U.: Finite relation algebras. Notices of the AMS 23 (1976) A–482
21. Maddux, R.D.: Topics in Relation Algebras. PhD thesis, University of California,
Berkeley (1978)
22. Comer, S.D.: Multivalued loops and their connection with algebraic logic (1979),
monograph, 173 pp.
23. Comer, S.D.: Multi-Valued Algebras and their Graphical Representation (July
1986), monograph, 103 pp.
24. Jipsen, P.: Computer-aided investigations of relation algebras. PhD thesis, Van-
derbilt University (1992)
25. Jipsen, P., Lukács, E.: Representability of finite simple relation algebras with many
identity atoms. In: Algebraic logic (Budapest, 1988). Volume 54 of Colloq. Math.
Soc. János Bolyai. North-Holland, Amsterdam (1991) 241–244
26. Jipsen, P., Lukács, E.: Minimal relation algebras. Algebra Universalis 32(2) (1994)
189–203
27. Andréka, H., Maddux, R.D.: Representations for small relation algebras. Notre
Dame J. Formal Logic 35(4) (1994) 550–562
28. Birkhoff, G.: Subdirect unions in universal algebra. Bull. Amer. Math. Soc. 50
(1944) 764–768
29. Maddux, R.D.: Pair-dense relation algebras. Trans. Amer. Math. Soc. 328(1)
(1991) 83–131
30. The GAP Group (http://www-gap.dcs.st-and.ac.uk/~gap) Aachen, St An-
drews: GAP – Groups, Algorithms, and Programming, Version 4.2. (1999)
Computations and Relational Bundles
J.W. Sanders
1 Introduction
The binary-relation and predicate-transformer models of (sequential) programs
have different flavours and different properties but each satisfies all the laws re-
quired of programs. Indeed consistency of the two models is maintained by the
wp-based Galois connection between them. But the extension from programs to
more general commands, specifications, or ‘computations’ as we shall call them,
includes arbitrary (not merely finite) demonic nondeterminism and its ‘dual’,
angelic nondeterminism. Thus whilst programs may not terminate, computa-
tions may (dually) not be enabled. In this extension the equivalence of the two
semantic models is lost: the Galois connection does not preserve angelic nonde-
terminism.
Differences in the way sequential composition interacts with the two forms
of nondeterminism (demonic and angelic) are, for arbitrary computations, sum-
marised in Fig. 1. Recall that in the relational model demonic nondeterminism
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 30–62, 2006.
c Springer-Verlag Berlin Heidelberg 2006
Computations and Relational Bundles 31
(∪ R) o9 S = ∪ {R o9 S | R ∈ R} (1)
S (∪ R)
o
9 = ∪ {S R | R ∈ R}
o
9 if R nonempty (2)
(∩ R) o9 S ⊆ ∩ {R o9 S | R ∈ R}, = if S is injective (3)
S o9 (∩ R) ⊆ ∩ {S o9 R | R ∈ R}, = if S is predeterministic (4)
(∧T ) ◦ u = ∧ {t ◦ u | t ∈ T } (5)
u ◦ (∧T ) ≤ ∧ {u ◦ t | t ∈ T }, = if u is positively conjunctive (6)
(∨T ) ◦ u = ∨ {t ◦ u | t ∈ T } (7)
u ◦ (∨T ) ≥ ∨ {u ◦ t | t ∈ T }, = if u is disjunctive. (8)
Fig. 1. Differences between the relational model—Laws (1) to (4)—and the transformer
model—Laws (5) to (8)—for arbitrary computations. In the former, demonic choice,
angelic choice and refinement are respectively ∪, ∩ and ⊇, whilst in the latter they are
∧, ∨ and ≤. Only the first Laws ((1) and (5)) and last ((4) and (8)) coincide.
( A) o9 B = {A o9 B | A ∈ A}.
B o9 ( A) {B o9 A | A ∈ A}.
Operationally, the demon has more choice the later it acts. Thus on the right,
where the choice is made initially, there are fewer choices and so fewer behaviours
than on the left. However the choices coincide if execution of B results in no
further choices for the demon: if B is free of angelic choice or, in other words,
forms a program (i.e. lies in the range of the Galois embedding wp and is thus
positively conjunctive as a transformer).
And secondly the two models agree, by Laws (4) and (8), on the refinement
in which sequential composition distributes final angelic nondeterminism
B o9 ( A)
{B o9 A | A ∈ A}.
32 J.W. Sanders
Operationally, angelic choice is dual to demonic choice: the angel resolving the
choice has prescience but not memory. Thus on the right the angel has an initial
choice, and hence the entire computation of B in which to make it; but on the
left it makes a choice after B , with fewer alternatives and so fewer resulting
behaviours. Equality holds if execution of B offers no further demonic choice by
which the angel might profit: from each initial state computation B is either un-
enabled, aborts or is deterministic (i.e. is predeterministic and is thus disjunctive
as a transformer).
Distribution of initial angelic choice is valid in the transformer model (Law
(7)) (operationally, the angel has the same choices on each side) but in the
relational model is valid in only one direction (Law (3)) unless computation B
terminates from distinct initial states in distinct final states.
For theoretical purposes, a richer model is better and for that reason most
semantic study has taken place inside the transformer model. For instance the
operational justification of the laws just outlined comes from the angel/demon
game interpretation supported by the transformer model [BvW98]. One vital
feature of that model has been its involution underlying the duality mentioned
above, which conflates the two simulation rules for data refinement which in the
relational model are distinct, with the result that one rule alone is complete in
the transformer model though two are required in the relational model.
But what of the system designer who is committed to formal methods only
to be confronted by an inconsistency in the laws satisfied by what he might
regard as the most intuitive model (binary relations) and the more studied model
(transformers)? The distinction may become apparent as soon as a refinement is
attempted from specification to code. Or what of the implementor who wishes to
document her clever implementation more abstractly for comparison with others;
does she allow demonic choice to ‘look ahead’ ? It would be perverse of specialists
in formal methods to confront practitioners of their subject with an inconsistent
array of techniques. And the laws of computations become important as soon as
derivation of code from specification is practiced. How should a software engineer
be expected to express a preference between the relational and transformer laws?
And what exactly are the consequences of that distinction, anyway?
One way to understand better the difference between those models of com-
putations more general than programs is to investigate stronger paradigms of
computation. For example inclusion of a binary combinator p ⊕ for probabilistic
choice leads to more subtle behaviours, even of the standard combinators, and
so to more detailed relational and transformer models. It provides, for example,
insight into memory and prescience of demon and angel.
But in this paper we take an alternative approach and characterise what it
means for a model of computation to ‘look relational’. By starting with the laws
satisfied by the binary-relation model we adopt a fibre-wise approach that en-
ables us to express a computation in terms of its fibres and hence to construct
an isomorphism—that preserves computational structure—between a model of
those laws and the relational model itself. A model that looks relational actu-
Computations and Relational Bundles 33
skip no op
abort divergent computation
x := e assignment
AbB binary conditional
A o9 B sequential composition
μF recursion
AB demonic choice
A B refinement: A B = A
Fig. 2. Syntax for the space (gcl .X , ) of programs over state space X
ally is relational; given a state space, the laws of relational computations are
categorical.
The underlying ingredient in our approach is the fibre-wise view of computa-
tions. To express it, we recall the definition of a (discrete) bundle from differential
geometry and topology, and consider the structure it offers for a theory of com-
putation. But first we need to recall the relational and transformer models of
computations and the Galois connection between them (Section 3); and before
that we must recall the notion of computation itself and the special case of
programs (Section 2).
Notation
This paper uses the following general notation.
If f is a function then f .x denotes its application to argument x . Function
application binds to the left.
For any set X , the set of all subsets of X is denoted P.X , the set of all finite
subsets of X is denoted F.X and the set of all predicates on X is denoted Pr.X .
The cardinality of a set E is denoted #E .
The set of all relations between sets X and Y is denoted X ↔ Y . If its field
is evident from the context we write id for the identity relation; when the field A
requires emphasis we write id .A. The converse of relation r is written r ∼ . The
image of set E by relation r is written r .(| E |). To express a relation r pointwise
we use infix notation: x r y.
A o9 (B o9 C ) = (A o9 B ) o9 C (11)
A skip
o
9 = A = skip A o
9 (12)
Fig. 3. Laws concerning order and sequential composition for the space gcl .X of (re-
lational) programs with state space X
A true B = A (16)
AbB = B ¬b A (17)
AbA = A (18)
(A b B ) c C = A b ∧c (B c C ) (19)
A b (B c C ) = (A b B ) c (A b C ) (20)
(A b B ) o9 C = (A o9 C ) b (B o9 C ) (21)
A (B b C ) = (A B ) b (A C ) (22)
x := x = skip (23)
(x := e) o9 (x := f ) = x := (e ; f ) (24)
(x := e) b (x := f ) = x := (e b f ) (25)
(x := e) o9 (A b B ) = (x := e) o9 A (26)
e;b
(x := e) o9 B
Fig. 5. Syntax for the space Gcl .X of (general) computations over state space X
The empty , the greatest element of Gcl .X , is called magic. The least
element of (Gcl .X , ) remains the least element, abort, of (gcl .X , ) ; it is
the empty . A computation is compact iff there is some finite set of states off
which it aborts (and on which—state by state—it is either unenabled or exhibits
arbitrary behaviour). Again, each computation is the of the directed set of its
compact approximations (cf. Law (28)). The difference between Laws (10) and
(28) is that the latter may display unenabled behaviour at some initial states.
The following shorthand is standard and convenient. For any subset E of state
space, x :∈ E denotes the demonic choice {x := e | e ∈ E }. If E is nonempty
and finite it is a program; otherwise it is just a computation, which if E is empty
is magic.
(Gcl .X ,
) is a complete lattice with min abort and max magic (27)
A = {A x ∈ F abort | F ∈ F .X } (28)
A (B b C ) = (A B ) b (A C ) (33)
( A) o9 B = {A o9 B | A ∈ A} (34)
B o9 ( A) = {B o9 A | A ∈ A} if A nonempty (35)
( A) o9 B {A o9 B | A ∈ A} , (36)
= {A o9 B | A ∈ A} if B is injective (37)
B o9 ( A) {B o9 A | A ∈ A} , (38)
= {B o9 A | A ∈ A} if B is predeterministic (39)
Fig. 6. Laws concerning order and sequential composition for the space Gcl .X of rela-
tional computations over X
(A x = x0 abort) = abort .
(A x = x0 magic) = magic .
That inequality is equivalent (in view of Laws (30) and (31)) to the identity
(A x = x0 magic) = magic
∧
∀ B : Gcl .X · (A x = x0 magic) B ⇒ B = magic .
For any predicate b on state space the coercion at b is the computation, coer .b ,
that skips at initial states satisfying b and otherwise is magic. In the transformer
model (see Sec. 3.2) assertions and coercions are dual. In the current context,
that duality manifests itself in the following analogue of the ‘assertions’ Lemma.
38 J.W. Sanders
Moreover the two are dually interdefinable using the laws above:
We must be careful not to allow such simply duality to raise our hopes concerning
the degree to which there is a transformer-like dual on the space of (relational)
computations.
3 Models
In this section we recall the relational and transformer models of computations
(and programs in particular) and the Galois connection between them. In the
remainder of the paper, our interest will be primarily relational. That is why
when, in the previous section, we have had to choose between laws satisfied by
the relational and transformer models, we have opted for the former.
[abort]R = ω⊥
[magic]R = { }⊥
[skip]R = id⊥
[x := e]R = {(x , e.x ) : X⊥ ×X⊥ | e.x terminates}⊥ e finitary
[A o9 B ]R = [A]R o9 [B ]R
[A b B ]R = {(x , y) | x [A]R y b.x x [B ]R y}
[A B ]R = [A]R ∪ [B ]R
[A B ]R = [A]R ∩ [B ]R
[μ F ]R = ∪{r : Rel .X | F .r = r } , F monotone on (Rel .X , ⊇)
A
B = [A]R ⊇ [B ]R
The fact that those really are computation structures, i.e. satisfy the appropriate
laws, seems largely to be folklore [H87]:
[abort]T = false
[magic]T = true
[skip]T = {(q, q) | q ∈ Pr.X }
[x := e]T .q.x = q.(e.x ) (= q[e/x ])
[A o9 B ]T = [A]T ◦ [B ]T
[A b B ]T = [A]T b [B ]T
[A B ]T = [A]T ∧ [B ]T
[A B ]T = [A]T ∨ [B ]T
[μ F ]T = ∧{t : T .X | F .t = t} , F monotone on T .X
A
B = [A]T ≤ [B ]T
The fact that T .X models the appropriate laws is of course standard and well
documented [D76, H92, N89]. The transformer semantics is given in Fig. 8. But
for implicit consistency with the relational semantics we prefer to deduce it—
as much as is possible—from the Galois connection between the relational and
transformer models (in the next section). For now, we record:
Perhaps the most important distinction between the relational and transformers
models is that the latter has a notion of dual, whilst the former does not.
u t ∗ = t u∗ (42)
∗ ∗ ∗
(t ◦ u) = t ◦u (43)
Computations and Relational Bundles 41
t ∗∗ = t (44)
[skip]∗T = [skip]T (45)
[abort]∗T = [magic]T (46)
∗
(t u) = t ∗ u∗ (47)
(t u)∗ = t ∗ u ∗ (48)
(t b u)∗ = t ∗ b u ∗ (49)
[ass.b]∗T = [coer .b]T (50)
It is easily shown that there is no dual on relations having those properties. For
example the best-behaved candidate, the translation of ∗ using the Galois con-
nection (see Sec. 3.3) between relations and transformers (i.e. r † = rp.((wp.r )∗ )),
satisfies (42), (43), (45), (46), (47), (49), (50) although it fails to be bijective and
satisfies merely r †† ⊇ r and (∩R)† ⊇ ∪R † .
∀ y : X⊥ · x r y ⇒ (y =⊥ ∧ q.y) .
wp.r .q.x =
With the relational and transformer interpretations already given, that says:
wp.r.q holds at just those states from which termination is ensured, and in a
state satisfying q.
Since wp is universally (∪, ≥)-junctive (i.e. from (Rel .X , ⊆) to (T .X , ≥)), it
has an adjoint which we call the relational projection, rp. For t : T .X , rp.t is the
binary relation on X⊥ defined to be strict and to satisfy, for x : X and y : X⊥ ,
so that the functions wp and rp form a Galois connection between the relational
and transformer spaces with their orders reversed: from (Rel .X , ⊆) to (T .X , ≥) .
Standard theory [O44] shows that the Galois connection preserves much of the
structure on the two semantics models, except for angelic nondeterminism. Gath-
ering the (elementary) properties we need:
The fact that inequality (59) may be strict indicates why the embedding wp
cannot be used to lift angelic nondeterminism from relations to transformers.
(For example, with r = [x := 0 x := 1]R and s = [x := 1 x := 2]R we
have wp.(r ∩ s) = [x := 1]R > (wp.r ) ∨ (wp.s), as can be seen by evaluating
each side at the postcondition x = 1.) Otherwise, the transformer semantics is
obtained from the relational semantics (Fig. 7) under the Galois embedding wp,
as summarised in Fig. 8:
[A]T = wp.[A]R .
Proof. To indicate the nature of the calculations involved, consider the cases
of skip and demonic choice. For the former, we reason with postcondition q and
(proper) state x : X ,
wp.[skip]R .q.x
≡ definition of wp
∀ y : X⊥ · x [skip]R y ⇒ (y =⊥ ∧ q.y)
≡ Fig. 7
∀ y : X⊥ · x = y ⇒ (y =⊥ ∧ q.y)
Computations and Relational Bundles 43
≡ calculus
q.x
≡ definition of id
id .(Pr.X ).q.x ,
as required by Fig. 8. 2
4 Fibre Bundles
In this section we adapt the standard concept of a ‘fibre bundle’ [S51] to the
context of computations. It enables us to consider a computation initial-state
by initial-state without the need for a homogeneous model in which initial and
final states have the same type.
π ∼ o9 π = id .X (68)
e (π o9 π ∼ ) e ≡ (π.e = π.e ) . (69)
s o9 π ⊆ id .X .
s -
x q π ......E
. . . . . . . . π ∼ .(| x |)
Fig. 9. The fibre bundle E over X with projection π and (relational) section s. The
fibre at base element x : X consists of the set of bundle elements π ∼ .(| x |).
4.2 Examples
Examples of bundles E are obtained by instantiating fibres π ∼ .(| x |) and imposing
healthiness conditions on sections s : X ↔ E as follows.
1. In the relational model (Sec. 3.1), the base and fibres both consist of the
extended state space X⊥ so that π ∼ .(| x |) = X⊥ . A section is interpreted as
taking an element of the base—an initial state—to an element of its fibre—a
final state; thus it is required to be strict and pointwise upclosed (unenabled
initial states lie outside its domain). This example is homogeneous; the sim-
pler nonhomogeneous alternative in which the base is simplified to just X is
not viable because initial ⊥ is required to ensure Law (29).
2. In the predicate-transformer model (Sec. 3.2), the base and fibres consist
of predicates over state space X so that π ∼ .(| x |) = Pr.X . A section is
interpreted as taking a postcondition [resp. precondition] to a weakest pre-
condition [resp. strongest postcondition]. Thus a section representing a com-
putation is required to be a monotone function, and a section representing a
program is required also to be strict, positively conjunctive and continuous.
This model is, like the relational model, homogeneous.
3. In the probabilistic relational model [HSM97, MM05], the base consists of
state space X but fibres are sets of sub-distributions (i.e. probability distri-
butions that sum to at most 1 over X ) so that
∀ x : X · π ∼ .(| x |) = {f : X → [0, 1] | X f ≤ 1}.
Computations and Relational Bundles 45
≤-upclosed:
f ∈ s.(| x |) ∧ f ≤ g ⇒ g ∈ s.(| x |) ;
Under its angelic refinement ordering, this model might be embedded in the
previous model, by identifying a subset Q of a finite state space with the
characteristic function of Q scaled by the number of states (which results in
a uniform demonic choice of final state in Q ). A Galois embedding ε is
{(#X )−1 ξQ | x R Q }
ε.R.x =
where x y =
(x −y) max 0 and c is the constant function λ x : X · c.
2
If X is finite this property follows automatically; indeed s.(| x |) is then the (closed)
convex hull of its (finitely many) extreme points.
46 J.W. Sanders
4.4 Examples
1. The special case of operational, or algorithmic, refinement in the relational
model—in which the state space is unaltered but each result of the concrete
computation is a result of the abstract—is captured by taking X = X ,
E = E , χ = id .X and ε = id .E so that inclusion (70) becomes:
s ⊆ s .
The same holds in the probabilistic relational model. In the predicate trans-
former model the rôles of s and s are reversed (so that at each postcondition
the refining computation has weaker precondition).
Computations and Relational Bundles 47
χ o9 s ⊆ s o9 π o9 χ o9 π ∼ or χ o9 s o9 π ⊆ s o9 π o9 χ
as expected.
5 Computations Fibrewise
Reasoning about computations is by tradition a curious blend of algebraic rea-
soning (using refinement laws) and semantic reasoning (using validity in a se-
mantic model). In this section we promote to the level of algebra the kind of
semantic reasoning that enables a computation to be investigated initial-state
by initial-state or, as we shall say, fibre-wise.
We introduce another interpretation of fibre bundles as computations, focus-
ing on the fibre as a collection of computations rather than a set of final states
(the view of Sec. 4.2). It is this interpretation that we use in the remainder of
the paper.
Fibres and co-fibres are distributed by the computation combinators. The proofs
follow directly from the laws of Gcl .
(A o9 B ) ∗ x0 = (A ∗ x0 ) o9 B (73)
(A B ) ∗ x0 = (A ∗ x0 ) (B ∗ x0 ) (74)
(A B ) ∗ x0 = (A ∗ x0 ) (B ∗ x0 ) (75)
(A ∗ x0 ) ∗ x1 = (A ∗ x0 ) x0 = x1 abort (76)
= (A ∗ x1 ) ∗ x0 . (77)
Proof.
Law (71):
magic ∗ x0
= definition of ∗
magic x = x0 magic
= Law (18)
magic.
Law (72):
(A b B ) ∗ x0
= definition of ∗
(A b B ) x = x0 magic
= Laws (17) and (20)
(A x = x0 magic) b (B x = x0 magic)
= definition of ∗
(A ∗ x0 ) b (B ∗ x0 ) .
Law (73):
(A o9 B ) ∗ x0
= definition of ∗
(A B ) x = x0 magic
o
9
= definition of ∗
(A ∗ x0 ) B .
o
9
Law (74):
(A B ) ∗ x0
= definition of ∗
(A B ) x = x0 magic
= Laws (21), (12) and (31)
(skip x = x0 magic) (A B ) o
9
Computations and Relational Bundles 49
= Law (15)
(skip x = x0 magic) A (skip x = x0 magic) B
o
9
o
9
Law (75):
(A B ) ∗ x0
= definition of ∗
(A B ) x = x0 magic
= Laws (21), (12) and (31)
(skip x = x0 magic) (A B )
o
9
= Law (39)
(skip x = x0 magic) A (skip x = x0 magic) B
o
9
o
9
Law (76):
(A ∗ x0 ) ∗ x1
= definition of ∗
(A x = x0 magic) x = x1 magic
= Law (19)
A x = x0 = x1 (magic x = x1 magic)
= Law (18)
A x = x0 = x1 magic
= Law (18)
A x = x0 = x1 (magic x0 = x1 magic)
= Law (19)
(A x = x0 magic) x0 = x1 magic
= definition of ∗
(A ∗ x0 ) x0 = x1 magic.
The means for constructing fibres and co-fibres from point fibres and point co-
fibres are established similarly:
A ∗ E = {A ∗ e | e ∈ E } (85)
A • E = {A • e | e ∈ E }. (86)
(A ∗ E )∗ = (A∗ ) • E . (87)
A = {A ∗ x0 | x0 ∈ X } (88)
= {A • x0 | x0 ∈ X } (89)
(in spite of the fact that the right-hand side of (89) does not form a directed set).
A B = ∀ x0 : X · A ∗ x0 B ∗ x0 (90)
= ∀ x0 : X · A • x0 B • x0 . (91)
(A B ) • x0 D ⇒ (A • x0 D ) ∨ (B • x0 D ). (92)
(x := 0 • x0 ) (x := 1 • x1 )
A= (x := 2 • x0 ) (x := 3 • x1 )
and B =
(x := 0 x := 1) • x0
A= (x := 1 x := 2) • x0
and B =
Proof. We forego a brief proof in the relational semantics (by explicit con-
struction for an arbitrary healthy relational) because we wish the form to hold
in any (relational) computation structure and to use the extra information pro-
vided by an algebraic proof by structural induction over computations. In each
case the required partial functions are defined as follows.
52 J.W. Sanders
abort {} (95)
magic λx : X · {} (96)
x := e λx : X · e (97)
AB λ x : dom .αA ∩ dom .αB · αA .x ∪ αB .x (98)
AB λ x : dom .αA ∪ dom .αB · αA .x ∩ αB .x (99)
A o9 B λ x : dom .αA ∩ dom .αB ·
{t : X | ∃ u : X · u ∈ α.x ∧ t ∈ β.u} (100)
2
6 Assertions Algebraically
In view of the importance placed on assertions and coercions by the fibre-wise
approach to computations, the purpose of this section is to characterise them
algebraically. But we wish to use this algebraic characterisation in any relational
computational structure, so we prove it using the relational laws of Gcl .X , since
a semantic proof would apply to just Rel .X . (For an elegant characterisation in
the context of Kleene Algebra see [vW04].)
∀ B : Gcl .X · B A ⇒ A o9 B = B . (102)
Proof. Suppose that for some predicate b on state space, A = ass.b , and that
B : Gcl .X . We begin by proving that if the antecedent of (102) holds then B
aborts off b.
B A
⇒ Law (81) (as monotonicity of − • b) and definition of A
B • ¬b (skip b abort) • ¬b
⇒ Laws (79), (19), (16), (17) and (18)
B • ¬b abort
⇒ Law (27)
B • ¬b = abort
⇒ Leibniz
(B • b B • ¬b) = (B • b abort)
⇒ Laws (40) and (27)
B b B = B •b
⇒ Law (18) and definition of •
B = B b abort .
So we reason
A o9 B
= definition of A
(skip b abort) B o
9
= Law (21)
(skip B ) b (abort B )
o
9
o
9
(A • x0 = skip • x0 ).
b.x0 =
To show that A is the assertion ass.b, however, we must show that if it does not
skip at a point then it aborts there:
∀ x0 : X · A • x0 = magic • x0 .
Proof.
true
= Implication (102) with B = abort, by Law (27)
A abort = abort
o
9
= Law (91)
∀ x0 : X · (A • x0 ) abort = abort • x0
o
9
= Law (78)
∀ x0 : X · (A • x0 ) abort = abort
o
9
The second lemma shows that there is some assignment which refines A at x0 .
Lemma (B). If A : Gcl .X satisfies both (102) and the antecendent of implica-
tion (103) then
∃ x1 : X \ {x0 } · A • x0 (x := x1 ) • x0 .
A = {(x :∈ E (x0 )) • x0 | x0 ∈ X } ,
we infer that the two cases of divergence and termination are, respectively,
abort • x0
A • x0 =
(x :∈ E (x0 )) • x0
Computations and Relational Bundles 55
where by assumption, { } = E (x0 ) = {x0 } . But in the first case the result holds
for any x1 = x0 whilst in the second it holds for any x1 ∈ E (x0 ) \ {x0 } , a choice
possible by the antecedent of (103). 2
abort ∗ x1
Y = ( = abort x = x1 magic) ,
whose use will become apparent in the final step of the proof. For the moment
we observe that Y does not abort at x0 :
Y • x0 = abort . (104)
Lemma (C).
(A • x0 ) o9 (A Y ) = abort . (105)
Proof. We reason
(A • x0 ) o9 (A Y )
Law (35) (as monotonicity of o
9− )
(A • x0 ) Y
o
9
(x := x1 ) • x0 o9 Y
= definition of Y
(x := x1 ) • x0 (abort x = x1 magic)
o
9
For the final step of the proof we recall that we are trying to establish the
A Y and observe that A Y A .
consequent of (103). To do so we set B =
Hence by (102)
A o9 (A Y ) = A Y . (106)
Thus
true
= Lemma C
(A (A Y )) • x0 = abort
o
9
⇒ by (106)
(A Y ) • x0 = abort
⇒ Law (35)
(A • x0 ) (Y • x0 ) = abort
⇒ Law (93)
(A • x0 ) = abort ∨ (Y • x0 ) = abort
⇒ Law (104)
A • x0 = abort
6.3 Coercions
The analogous result for coercions is this; we omit the proof, which mimics that
above.
∀ B : Gcl .X · C B ⇒ C o9 B = B . (107)
Unfortunately the discussion in Sec. 3.2 shows that a similar proof, using a
relational dual in place of ∗ , is not possible in the relational model.
Recall that the Galois embedding wp is not (∩,∨)-junctive (Law (59)) and so
wp does not preserve angelic choice (suprema). Indeed, in view of Fig. 1, the
relational and transformer models of computation are not isomorphic.
Evaluation of the trivial cases shows:
Proof. Suppose that the computation structure is R.X and define a putative
isomorphism T fibrewise
T : R.X → Rel .X
T .A.(| x0 |) =
{y : X | A • x0 x := y} ,
= definition of T
∀ x0 , y : X · A • x0 x := y ⇔ B • x0 x := y
= definition of co-fibre and Law (28)
∀ x0 : X · A • x0 = B • x0
= Law (91)
A = B.
∀ x0 : X · A • x0 =
(x :∈ Yx0 ) • x0 ,
= Law (73)
{y : X | (A • x0 ) B x := y}
o
9
= definition of T
{y : X | (A B ) • x0 x := y}
= Law (82)
{y : X | (A • x0 ) (B • x0 ) x := y}
= definition of supremum
{y : X | (A • x0 x := y) ∧ (B • x0 x := y)}
= set theory
{y : X | A • x0 x := y} ∩ {y : X | B • x0 x := y}
= semantics, Fig. 7
(T .A T .B ).(| x0 |) .
2
T .(ass.x0 ) = ass.y0 .
x0 t y0 = (111)
y := t .e
T .(x := e) =
where t maps expressions (recall our assignments are total and deterministic)
over X to expressions over Y by ‘translation’ (or trivial simulation):
8 Conclusion
By taking the slightly unusual view that computations are sections of fibre bun-
dles we have emphasised the fibre-wise nature of a computation. That has en-
abled us to treat assignment initial-state-by-initial state and to use powerful
refinement laws like Law (92) that fail more generally. The result has been the
fibre normal form for a (relational) computation and the isomorphism of any (re-
lational) computation structure with the binary-relation model of computation.
Although that isomorphism is based on the order and sequential composition
combinators of the structure, by characterising assertions and coercions in those
terms we have shown that the isomorphism also preserves them, and hence by
the ‘fibre normal form’ Theorem truly is an isomorphism of computations. The
laws of (relational) computation are categorical to within cardinality of state
space.
Further work consists of capturing the transformer model similarly and of
clarifying the extent to which, as remarked only in passing here, the transformer
dual may be lifted to relations via the Galois connection between relations and
transformers. It would also be of some interest to pursue the bundle approach
to refinement, particularly in the non-homogeneous setting.
Acknowledgements
The author is grateful to the organisers of RelMiCS 2006 for the opportunity
to explore, in this paper, the fibre-wise approach to computation and, at the
conference, its connections with other approaches. He is grateful to Georg Struth
and Renate Schmidt for super-editorial corrections and clarifications and for
bringing to his attention several references.
This exposition has benefitted from drafts of joint work with Annabelle McIver
and Carroll Morgan on the application of Galois connections to the study of
various relational and transformer models of computation. Some of the work re-
ported here, and some results mentioned in passing, have been supported by the
University of Stellenbosch and the South African National Research Foundation
under the auspices of Ingrid Rewitzky.
62 J.W. Sanders
References
[BvW98] R.-J. Back and J. von Wright. Refinement Calculus: A Systematic Introduc-
tion. Graduate Texts in Computer Science, Springer Verlag, 1998.
[D76] E. W. Dijsktra. A Discipline of Programming. Prentice-Hall International,
1976.
[HSM97] He, Jifeng, K. Seidel and A. K. McIver. Probabilistic models for the guarded
command language. Science of Computer Programming, 28:171–192, 1997.
[H92] W. H. Hesselink. Programs, Recursion and Unbounded Choice. Cambridge
University Press, 1992.
[H87] C. A. R. Hoare et al, The laws of programming. Communications of the
ACM, 30:672–686, 1987.
[HH98] C. A. R. Hoare and He, Jifeng. Unifying Theories of Programming. Prentice
Hall, 1998.
[MM05] A. K. McIver and C. C. Morgan. Abstraction, Refinement and Proof for
Probabilistic Systems. Springer Monographs in Computer Science, 2005.
[N89] G. Nelson. A generalisation of Dijkstra’s calculus. ACM ToPLAS,
11(4):517–561, 1989.
[O44] O. Ore, Galois connexions. Transactions of the American Mathematical So-
ciety, 55:494–513, 1944.
[R06] I. M. Rewitzky. Monotone predicate transformers as up-closed multirela-
tions. This volume, Relations and Kleene Algebra in Computer Science
(RelMics/AKA 2006) Springer-Verlag, LNCS, 2006.
[dRE98] W.-P. de Roever and K. Engelhardt, Data Refinement: Model-Oriented
Proof Methods and their Comparison. Cambridge Tracts in Theoretical
Computer Science, Cambridge University Press, 1998.
[SZ00] J. W. Sanders and P. Zuliani. Quantum Programming. Mathematics of
Program Construction, 2000, edited by J. N. Oliviera and R. Backhouse,
Springer-Verlag LNCS 1837:80–99, 2000.
[S51] N. Steenrod. The Topology of Fibre Bundles. Princeton University Press,
1951.
[vW04] J. von Wright. Towards a refinement algebra. Science of Computer Pro-
gramming, 51:23–45, 2004.
An Axiomatization of Arrays for
Kleene Algebra with Tests
Kamal Aboul-Hosn
1 Introduction
Much work has been done in reasoning about programs with arrays. Arrays re-
quire more complex modeling than regular variables because of issues of subscript
aliasing, where two array accesses can be to the same element, for example, A(x)
and A(y) when x = y. Proving equivalence of programs with arrays often in-
volves intricate read/write arguments based on program semantics or complex
program transformations.
Reasoning about arrays dates back to seminal work of More [1] and Downey
and Sethi [2]. Much research has also been based on early work by McCarthy on
an extensional theory of arrays based on read/write operators [3]. A standard
approach is to treat an array as a single variable that maps indices to values
[4,5,6]. When an array entry is updated, say A(i) := s, a subsequent access A(j)
is treated as the program if (i = j) then s else A(j). Several other approaches
of this nature are summarized in [7], where Bornat presents Hoare Logic rules
for reasoning about programs with aliasing considerations.
More recently, there have been many attempts to find good theories of ar-
rays in an effort to provide methods for the formal verification of programs
with arrays. Recent work, including that of Stump et al. [8], focuses on deci-
sion procedures and NP-completeness outside the context of any formal system.
Additionally, the theorem prover HOL has an applicable theory for finite maps
[9].
In this paper we augment the rules of Kleene algebra with tests (KAT) with
rules for the equational manipulation of arrays in the style of KAT. Introduced
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 63–77, 2006.
c Springer-Verlag Berlin Heidelberg 2006
64 K. Aboul-Hosn
2 Preliminary Definitions
2.1 Kleene Algebra with Tests
Kleene algebra (KA) is the algebra of regular expressions [18,19]. The axiom-
atization used here is from [20]. A Kleene algebra is an algebraic structure
(K, +, ·, ∗ , 0, 1) that satisfies the following axioms:
(p + q) + r = p + (q + r) (1) (pq)r = p(qr) (2)
p+q = q+p (3) p1 = 1p = p (4)
p+0 = p+p = p (5) 0p = p0 = 0 (6)
p(q + r) = pq + pr (7) (p + q)r = pr + qr (8)
1 + pp∗ ≤ p∗ (9) q + pr ≤ r → p∗ q ≤ r (10)
1 + p∗ p ≤ p∗ (11) q + rp ≤ r → qp∗ ≤ r (12)
Standard models include the family of regular sets over a finite alphabet, the
family of binary relations on a set, and the family of n × n matrices over another
Kleene algebra. Other more unusual interpretations include the min,+ algebra,
also known as the tropical semiring, used in shortest path algorithms, and models
consisting of convex polyhedra used in computational geometry.
A Kleene algebra with tests (KAT) [10] is a Kleene algebra with an embedded
Boolean subalgebra. That is, it is a two-sorted structure (K, B, +, ·, ∗ , , 0, 1)
such that
– (K, +, ·, ∗ , 0, 1) is a Kleene algebra,
– (B, +, ·, , 0, 1) is a Boolean algebra, and
– B ⊆ K.
Elements of B are called tests. The Boolean complementation operator is de-
fined only on tests.
The axioms of Boolean algebra are purely equational. In addition to the Kleene
algebra axioms above, tests satisfy the equations
BC = CB BB = B
B + CD = (B + C)(B + D) B+1 = 1
B+C = BC BC = B+C
B+B = 1 BB = 0
B = B
where x and y are distinct variables and F V (s) is the set of free variables occur-
ring in s in (13) and (14). The notation s[x/t] denotes the result of substituting
t for all occurrences of x in s. Here ϕ is an atomic first order formula. When x
is not a free variable in t or in ϕ, we get the commutativity conditions
x := s; y := t = y := t; x := s (y ∈ F V (s), x ∈ F V (t)) (17)
ϕ; x := t = x := t; ϕ (x ∈ F V (ϕ)) (18)
Using these axioms, one can also reason about imperative programs by trans-
lating them to propositional formulas [21]. One can translate program constructs
as follows:
x := s ≡ a
x=s≡A
if B then p else q ≡ Bp + Bq
while B do p ≡ (Bp)∗ B
3 Arrays in SKAT
Arrays have special properties that create problems when trying to reason about
program equivalence. The axioms (13)-(21) do not hold without some precondi-
tions. We want to identify the conditions under which we can apply these axioms
to assignments with arrays.
Consider the statement
With simple variables, this sort of equivalence holds. However, in (22), if A(2) =
2, the two sides are not equal. The left-hand side sets both A(2) and A(4) to
3, while the right-hand side sets A(2) to 3 and A(4) to 2. The problem is that
A(2) = A(A(2)).
One solution is to limit array indices to simple expressions that contain no
array symbols, the approach taken by Barth and Kozen [12]. Let i and j be
expressions containing no array symbols. For an expression e, let ex , ey , and exy
denote e[x/A(i)], e[y/A(j)], and e[x/A(i), y/A(j)], respectively. The following
axioms hold when expressions s and t contain no array symbols and i = j:
Barth and Kozen’s paper. These axioms allow no more than two array references
(in most cases, only one) in a sequence of two assignment statements, which
eliminates many simple program equivalences such as
Our goal is to generalize these rules so we can have more than one array reference
in a sequence of assignments and so we can allow nested array references.
In attempting to adapt (13) to arrays in a general way, we first note that an
array index contains an expression that must be evaluated, which could contain
another array variable. Therefore, we need to perform a substitution in that
subterm as well:
This rule poses several questions. First of all, what is meant by t[A(i)/s]? We
want this to mean “replace all occurrences of A(i) by s in the term t.” However,
this statement is somewhat ambiguous in a case such as
t = A(3) + A(2 + 1)
where i is 3. We could either replace A(i) (i) syntactically, only substituting s for
A(3) in t, or (ii) semantically, replacing both A(3) and A(2 + 1). Besides being
undecidable, (ii) is somewhat contrary to the sort of static analysis for which
we use SKAT. Moreover, implementing these sorts of rules in a system such
as KAT-ML [22] could be difficult and costly, requiring the system to perform
evaluation.
However, (i) is unsound. For example,
if i = j and:
n
∀k1 , . . . kn , A(k1 , . . . , kn ) ∈ Arr(s) ∪ Arr(ia ) ⇒ ∃.1 ≤ ≤ n ∧ j = k
a=1
n
∀k1 , . . . kn , A(k1 , . . . kn ) ∈ Arrs(ja ) ⇒ ∃.1 ≤ ≤ n ∧ k = i
a=1
4 Soundness of Axioms
We have proven soundness for all these rules using a technique similar to the one
used in [11]. We highlight the technique for the proof in this paper. For a more
complete proof, see [23]. We consider interpretations over special Kripke frames
called Tarskian, defined with respect to a first order structure D of signature
Σ. States are valuations, assigning values in D to variables, denoted with Greek
letters θ and η. For a valuation θ, θ[x/s] is the the state that agrees with θ
on all variables except possibly x, which takes the value s. An array variable is
interpreted as a map D → D, as defined in [12]. We use θ(A(i)) to represent
θ(A)(θ(i)).
First, we need to relate substitution in the valuation and substitution in a
term. This relation corresponds to the relation between the substitution model
70 K. Aboul-Hosn
of evaluation and the environment model of evaluation. For simple terms, this
is easy:
θ(t[x/s]) = θ[x/θ(s)](t)
which was shown in [11]. For arrays, we have the same difficulties of aliasing we
have in the definition of our rules. The corresponding lemma for array references
requires a precondition:
Lemma 1.
A(θ(i))
θ(t[A(i)/s]) = θ (t)
θ(s)
if
∀A(k) ∈ Arrs(t, A, i, s), i = k
A(i)
where θ s is the valuation that agrees with θ on all variables except possibly
the array variable A, where A(i) now maps to s. The proof is by induction on t.
With this lemma, we can prove the soundness of (29) - (36). We show the
proofs for (29) - (32), as (33) - (36) are just special cases of these. For example,
for the axiom, we prove
Theorem 1. A(i) := s; A(j) := t = A(j[A(i)/s]) := t[A(i)/s]; A(i) := s if
i = j (37)
∀k, A(k) ∈ Arr (s) ∪ Arr (i) ⇒ k = j[A(i)/s] (38)
∀k, A(k) ∈ Arrs(j, A, i, s) ∪ Arrs(t, A, i, s) ⇒ k = i (39)
= [A(j[A(i)/s]) := t[A(i)/s]]D ◦ [A(i) := s]D
A(θ(j[A(i)/s]))
A(η(i))
| θ ∈ V alD ◦ η, η | η ∈ V al
(i))
= θ, θ
D
θ(t[A(i)/s]) η(s)
A(θ(j[A(i)/s]))
A(θ
θ(t[A(i)/s]) θ (s)
A(θ(j[A(i)/s]))
θ(t[A(i)/s])
= θ, θ
A(θ(j[A(i)/s]))
θ(t[A(i)/s])
An Axiomatization of Arrays for Kleene Algebra with Tests 71
where θ ∈ V alD .
Therefore, it suffices to show for all θ ∈ V alD ,
A(θ(i)) A(θ (j))
A(θ (i))
(t) = θ A(θ(j[A(i)/s]))
(s)
A(θ(i)) A(θ(j[A(i)/s]))
θ(s) θ(t[A(i)/s])
θ
θ(s) θ A(θ(i)) θ(t[A(i)/s]) θ A(θ(j[A(i)/s]))
θ(s) θ(t[A(i)/s])
by (37)
A(θ(i)) A(θ(j[A(i)/s]))
=θ θ(s) θ(t[A(i)/s])
A(θ(i))
A(θ(i)) A(θ (j))
=θ θ(s)
by Lemma 1,
θ(s) A(θ)(i)
θ θ(s)
(t)
(39)
2
The program on the left uses a temporary variable to perform the swap while
the program on the right uses properties of xor and the domain of computation
to swap without a temporary variable. We set the variable t to 0 so that the two
programs end in the same state, though we could set t to any value at the end.
By (15), we know that the right-hand side is equivalent to
By (29), where we need the condition that x = y, commutativity of xor, and the
fact that x ⊕ x ⊕ y = y, this is equal to
We can prove heapsort on an array correct using these new axioms and the axioms
of SKAT to get some basic assumptions so that we can reason at the propositional
level of KAT. The proof is completely formal, relying only on the axioms of KAT
and some basic facts of number theory. Most proofs of this algorithm are somewhat
informal, appealing to a general examination of the code. An exception is a formal
proof of heapsort’s correctness in Coq [24]. In this section, we provide an outline
of the major steps of the proof. For the proof in its entirety, see [23].
We adapt the algorithm given in [25, Ch. 7]. Consider the function heapify(A,i),
which alters the array A such that the tree rooted at index i obeys the heap prop-
erty: for every node i other than the root,
A(par(i)) ≥ A(i)
where
par(i) = i/2
We have the following property for these operators
lt(i) = 2i
rt(i) = 2i + 1
The code for the function is as follows, where the letters to the left represent
the names given to the assignments and tests at the propositional level of KAT:
An Axiomatization of Arrays for Kleene Algebra with Tests 73
heapify(A,root)
{
a: i := root;
B: while(i != size(A) + 1)
{
b: l := lt(i);
c: r := rt(i);
C: if(l <= size(A) && A(l) > A(i))
d: lgst := l
else
e: lgst := i
D: if(r <= size(A) && A(r) > A(lgst))
f: lgst := r
E: if(lgst != i)
{
g: swap(A,i,lgst);
h: i := lgst
}
else
j: i := size(A) + 1
}
}
where
swap(A,i,j)
{
t := A[i];
A[i] := A[j];
A[j] := t
}
The variable size(A) denotes the size of the heap rooted at A(1) while length(A)
is the size of the entire array.
We wish to prove that the heapify function does in fact create the heap prop-
erty for the tree rooted at index r. First, we express the property that a tree
indexed at r is a heap, except for the trees under the node i and greater:
def
HA,r,i ⇔ 1≤r<i⇒
(lt(r) ≤ size(A) ⇒ (A(r) ≥ A(lt(r)) ∧ HA,lt(r),i ))∧
(rt(r) ≤ size(A) ⇒ (A(r) ≥ A(rt(r)) ∧ HA,rt(r),i ))
Now, we can easily define what it means to be a heap rooted at node r:
def
HA,r ⇔ HA,r,size(A)
We also define the test
def
PA,r,i ⇔ i ≥ 1 ⇒ lt(i) ≤ size(A) ⇒ A(par(i)) ≥ A(lt(i))∧
rt(i) ≤ size(A) ⇒ A(par(i)) ≥ A(rt(i))
74 K. Aboul-Hosn
root ≥ 1; HA,lt(root) ; HA,rt(root); heapify (A, root ) = heapify (A, root); HA,root
Proof. The proof proceeds by using commuting our invariants through the pro-
gram and citing distributivity and congruence. 2
Now, we can prove the original theorem.
Theorem 2.
(root ≥ 1); HA,lt(root) ; HA,rt(root) ; heapify (A, root) = heapify (A, root); HA,root
Proof. The proof proceeds by commuting our the tests through the heapify func-
tion. 2
Now that we have properties for the heapify function, we can show that the
function build-heap(A), which creates a heap from the array A, works correctly.
The program is
build-heap(A)
{
a: size(A) = length(A);
b: root := floor(size(A)/2);
B: while(root >= 1)
{
c: heapify(A,root);
d: root := root - 1
}
}
We show that the invariant of the loop (B; c; d)∗ is ∀j > root, HA,j . It suffices
to show that it is true for one iteration of the loop, i.e.
Lemma 3.
We then define our other properties in terms of this one and use Theorem 2,
Boolean algebra rules, and (16) to prove the lemma. 2
Theorem 3.
a; b; (B; c; d)∗ ; B = a; b; (B; c; d)∗ ; B; HA,1
Finally, we can prove that the function heapsort works. The function is defined
as:
heapsort(A)
{
a: build-heap(A);
B: while(size(A) != 1)
{
b: swap(A,1,size(A));
c: size(A) := size(A) - 1;
d: heapify(A,1);
}
}
Theorem 4.
Acknowledgments
This work was supported in part by NSF grant CCR-0105586 and ONR Grant
N00014-01-1-0968. The views and conclusions contained herein are those of the
authors and should not be interpreted as necessarily representing the official
policies or endorsements, either expressed or implied, of these organizations or
the US Government.
References
1. More, T.: Axioms and theorems for a theory of arrays. IBM J. Res. Dev. 17(2)
(1973) 135–175
2. Downey, P.J., Sethi, R.: Assignment commands with array references. J. ACM
25(4) (1978) 652–666
3. McCarthy, J.: Towards a mathematical science of computation. In: IFIP Congress.
(1962) 21–28
4. McCarthy, J., Painter, J.: Correctness of a compiler for arithmetic expressions.
In Schwartz, J.T., ed.: Proceedings Symposium in Applied Mathematics, Vol. 19,
Mathematical Aspects of Computer Science. American Mathematical Society,
Providence, RI (1967) 33–41
5. Hoare, C.A.R., Wirth, N.: An axiomatic definition of the programming language
PASCAL. Acta Informatica 2(4) (1973) 335–355
6. Power, A.J., Shkaravska, O.: From comodels to coalgebras: State and arrays. Electr.
Notes Theor. Comput. Sci. 106 (2004) 297–314
7. Bornat, R.: Proving pointer programs in Hoare logic. In: MPC ’00: Proceedings
of the 5th International Conference on Mathematics of Program Construction,
London, UK, Springer-Verlag (2000) 102–126
8. Stump, A., Barrett, C.W., Dill, D.L., Levitt, J.R.: A decision procedure for an
extensional theory of arrays. In: Logic in Computer Science. (2001) 29–37
9. Collins, G., Syme, D.: A theory of finite maps. In Schubert, E.T., Windley, P.J.,
Alves-Foss, J., eds.: Higher Order Logic Theorem Proving and Its Applications.
Springer, Berlin, (1995) 122–137
10. Kozen, D.: Kleene algebra with tests. Transactions on Programming Languages
and Systems 19(3) (1997) 427–443
11. Angus, A., Kozen, D.: Kleene algebra with tests and program schematology. Tech-
nical Report 2001-1844, Computer Science Department, Cornell University (2001)
12. Barth, A., Kozen, D.: Equational verification of cache blocking in LU decompo-
sition using Kleene algebra with tests. Technical Report 2002-1865, Computer
Science Department, Cornell University (2002)
An Axiomatization of Arrays for Kleene Algebra with Tests 77
1 Introduction
Reasoning about programs with local state is an important and difficult prob-
lem that has attracted much attention over the years. Most previous work in-
volves complex storage modeling with pointers and memory cells or complicated
categorical constructions to capture the intricacies of programming with state.
Reasoning about the equality of such programs typically involves the notion of
contextual or observable equivalence, where two programs are considered equiv-
alent if either can be put in the context of a larger program and yield the same
value. Pitts [1] explains that these notions are difficult to define formally, because
there is no clear agreement on the meaning of program context and observable
behavior. A common goal is to design a semantics that is fully abstract, where
observable equivalence implies semantic equivalence, although this notion makes
the most sense in a purely functional context (see for example [2,3]).
Seminal work by Meyer and Sieber [4] introduced a framework for proving
the equivalence of ALGOL procedures with no parameters. Much attention has
focused on the use of denotational semantics to model a set of storage locations
[5,6,7,8]. The inability to prove some simple program equivalences using tradi-
tional techniques led several researchers to take a categorical approach [9,10,11].
See [12] for more information regarding the history of these approaches.
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 78–90, 2006.
c Springer-Verlag Berlin Heidelberg 2006
Local Variable Scoping and Kleene Algebra with Tests 79
2 Relational Semantics
The domain of computation is a first-order structure A of some signature Σ. A
partial valuation is a partial map f : Var → |A|, where Var is a set of program
variables. The domain of f is denoted dom f . A stack of partial valuations is called
an environment. Let σ, τ, . . . denote environments. The notation f :: σ denotes an
environment with head f and tail σ; thus environments grow from right to left.
The empty environment is denoted ε. The shape of an environment f1 :: · · · ::
fn is dom f1 :: · · · :: dom fn . The domain of the environment f1 :: · · · :: fn is
n
i=1 dom fi . The shape of ε is ε and the domain of ε is ∅. The set of environments
is denoted Env. A state of the computation is an environment, and programs will
be interpreted as binary relations on environments.
In Dynamic Logic and KAT, programs are built inductively from atomic pro-
grams and tests using the regular program operators +, ;, and ∗ . In the first-order
versions of these languages, atomic programs are simple assignments x := t,
where x is a variable and t is a Σ-term. Atomic tests are atomic first-order
formulas R(t1 , . . . , tn ) over the signature Σ.
To accommodate local variable scoping, we also include let expressions in the
inductive definition of programs. A let expression is an expression
where p is a program, the xi are program variables, and the ti are terms.
Operationally, when entering the scope (2), a new partial valuation is cre-
ated and pushed onto the stack. The domain of this new partial valuation is
{x1 , . . . , xn }, and the initial values of x1 , . . . , xn are the values of t1 , . . . , tn ,
respectively, evaluated in the old environment. This partial valuation will be
popped when leaving the scope. The locals in this partial valuation shadow any
other occurrences of the same variables further down in the stack. When evaluat-
ing a variable in an environment, we search down through the stack for the first
occurrence of the variable and take that value. When modifying a variable, we
search down through the stack for the first occurrence of the variable and mod-
ify that occurrence. In reality, any attempt to evaluate or modify an undefined
variable (one that is not in the domain of the current environment) would result
in a runtime error. In the relational semantics, there would be no input-output
pair corresponding to this computation.
To capture this formally in relational semantics, we use a rebinding operator
[x/a] defined on partial valuations and environments, where x is a variable and
a is a value. For a partial valuation f : Var → |A|,
⎧
⎨ f (y), if y ∈ dom f and y = x,
f [x/a](y) = a, if y ∈ dom f and y = x,
⎩
undefined, if y ∈ dom f .
Local Variable Scoping and Kleene Algebra with Tests 81
For an environment σ,
⎧
⎨ f [x/a] :: τ, if σ = f :: τ and x ∈ dom f ,
σ[x/a] = f :: τ [x/a], if σ = f :: τ and x ∈ dom f ,
⎩
ε, if σ = ε.
Note that rebinding does not change the shape of the environment. In particular,
ε[x/a] = ε.
The value of a variable x in an environment σ is
⎧
⎨ f (x), if σ = f :: τ and x ∈ dom f ,
σ(x) = τ (x), if σ = f :: τ and x ∈ dom f ,
⎩
undefined, if σ = ε.
Note that both x and t must be defined by σ for there to exist an input-output
pair with first component σ.
The semantics of scoping is
[[let x1 = t1 , . . . , xn = tn in p end]]
= {(σ, tail(τ )) | σ(ti ) is defined, 1 ≤ i ≤ n, and (f :: σ, τ ) ∈ [[p]]}, (3)
[[R(t1 , . . . , tn )]]
= {(σ, σ) | σ(ti ) is defined, 1 ≤ i ≤ n, and A, σ R(t1 , . . . , tn )}.
where is satisfaction in the usual sense of first-order logic. The Boolean oper-
ator ! (weak negation) is defined on atomic formulas by
[[!R(t1 , . . . , tn )]]
= {(σ, σ) | σ(ti ) is defined, 1 ≤ i ≤ n, and A, σ ¬R(t1 , . . . , tn )}.
This is not the same as classical negation ¬, which we need in order to use
the axioms of Kleene algebra with tests. However, in the presence of !, classical
negation is tantamount to the ability to check whether a variable is undefined.
That is, we must have a test undefined(x) with semantics
Axioms
let x1 = t1 , . . . , xn = tn in p end
let y1 = t1 , . . . , yn = tn in p[xi /yi | 1 ≤ i ≤ n] end
C. If x does not occur in s, then the following two programs are equivalent:
let x1 = t1 , . . . , xn = tn in p end
let x1 = t1 in let x2 = t2 , . . . , xn = tn in p end end
G. If x does not occur in p and t is closed, then the following two programs are
equivalent:
where a is any closed term. The proviso that x not occur in t is necessary,
as the following counterexample shows. Take t = x and p the assignment
y := a. The program on the right contains the pair (y = b, y = a) for b = a,
whereas the program on the left does not, since x must be defined in the
environment in order for the starred program to be executed once.
I. If x does not occur in t and a is a closed term, then the following two
programs are equivalent:
J. If x does not occur in t, then the following two programs are equivalent:
let x = s in p end; x := t x := s; p; x := t
Theorem 2. Axioms A–J are sound with respect to the binary relation seman-
tics of Section 2.
Proof. Most of the arguments are straightforward relational reasoning. Perhaps
the least obvious is Axiom H, which we argue explicitly. Suppose that x does
not occur in t. Let a be any closed term. We wish to show that the following two
programs are equivalent:
(let x = t in p end)n+1
= (let x = t in p end)n ; let x = t in p end
= let x = a in (x := t; p)n end; let x = t in p end (4)
n
= let x = a in (x := t; p) ; x := t; p end (5)
= let x = a in (x := t; p)n+1 end
where (4) follows from the induction hypothesis and (5) follows from the identity
let x1 = t1 , . . . , xn = tn in p end
let xπ(1) = tπ(1) , . . . , xπ(n) = tπ(n) in p end.
(ii) If x does not occur in p, and if t is a closed term, then the following two
programs are equivalent:
p let x = t in p end.
The second part of Lemma 2 is similar to the first example of Meyer and Sieber
[4] in which a local variable unused in a procedure call can be eliminated.
4 Flattening
To prove equivalence of two programs p, q with scoping, we transform the pro-
grams so as to remove all scoping expressions, then prove the equivalence of the
two resulting programs. The transformed programs are equivalent to the origi-
nal ones except for the last step. The two transformed programs are equivalent
in the “flat” semantics iff the original ones were equivalent in the semantics of
Section 2. Thus the process is complete modulo the theory of programs without
scope. The transformations are applied in the following stages.
Step 2. Let x1 , . . . , xn be any list of variables containing all bound variables that
occur in either program after Step 1. Use the transformation rules of Axioms
A–J to convert the programs to the form let x1 = a, . . . , xn = a in p end and
let x1 = a, . . . , xn =a in q end, where p and q do not have any scoping expressions
and a is a closed term. The scoping expressions can be moved outward using
Axioms F–H. Adjacent scoping expressions can be combined using Axioms C
and D. Finally, all bindings can be put into the form x= a using Axiom I.
Step 3. Now for p, q with no scoping and a a closed term, the two programs
let x1 = a, . . . , xn = a in p end
let x1 = a, . . . , xn = a in q end
x1 := a; · · · ; xn := a; p; x1 := a; · · · ; xn := a
x1 := a; · · · ; xn := a; q; x1 := a; · · · ; xn := a
are equivalent with respect to the “flat” binary relation semantics in which states
are just partial valuations. We have shown
Theorem 3. Axioms A–J of Section 3 are sound and complete for program
equivalence relative to the underlying equational theory without local scoping.
5 Examples
We demonstrate the use of the axiom system through several examples. The
first example proves that two versions of a program to swap the values of two
variables are equivalent when the domain of computation is the integers.
let t = x x := x ⊕ y;
in x := y; y := x ⊕ y;
y := t x := x ⊕ y
end
where ⊕ is the bitwise xor operator. The first program uses a local variable to
store the value of x temporarily. The second program does not need a temporary
value; it uses xor to switch the bits in place. Without the ability to handle local
variables, it would be impossible to prove these two programs equivalent, because
the first program includes an additional variable t. In general, without specific
information about the domain of computation and without an operator like ⊕,
it would be impossible to prove the left-hand program equivalent to any let-free
program.
Local Variable Scoping and Kleene Algebra with Tests 87
let t = a
in x := x ⊕ y;
y := x ⊕ y;
x := x ⊕ y
end
where a is a closed term. Next, we apply Axiom I to the first program to get
let t = a
in t := x;
x := y;
y := t
end
From Theorem 3, it suffices to show the following programs are equivalent:
t := a; t := a;
t := x; x := x ⊕ y;
x := y; y := x ⊕ y;
y := t; x := x ⊕ y;
t := a t := a
We have reduced the problem to an equation between let-free programs. The
remainder of the argument is a straightforward application of the axioms of
schematic KAT [24] and the properties of the domain of computation. 2
The second example shows that a local variable in a loop need only be declared
once if the variable’s value is not changed by the body of the loop.
Example 3. If the final value of x after exectuing program p is always a, that is,
if p is equivalent to p; (x = a) for closed term a, then the following two programs
are equivalent:
Proof. First, we use Axiom H to convert the program on the left-hand side to
x := a; (x := a; p)∗ ; x := a x := a; p∗ ; x := a.
The equivalence follows from basic theorems of KAT and our assumption p =
p; (x = a). 2
The next example is important in path-sensitive analysis for compilers. It shows
that a program with multiple conditionals all guarded by the same test needs
only one local variable for operations in both branches of the conditionals.
88 K. Aboul-Hosn and D. Kozen
Proof. First we note that it follows purely from reasoning in KAT that (y = a); p
is equivalent to (y = a); p; (y = a) and that (y = a); p is equivalent to p; (y = a)
and also to (y = a); p; (y = a).
We use laws of distributivity and Boolean tests from KAT and our assumptions
to transform the first program into
let x = 0, w = 0
in (y = a; x := 1; p; y = a; y := x) + (y = a; w := 2; p; y = a; y := w)
end
Axiom D allows us to transform this program into
let x = 0
in let w = 0
in (y = a; x := 1; p; y = a; y := x) + (y = a; w := 2; p; y = a; y := w)
end
end
By two applications of Axiom G, we get
⎛ ⎞ ⎛ ⎞
let x = 0 let w = 0
⎝ in y = a; x := 1; p; y = a; y := x ⎠ + ⎝ in y = a; w := 2; p; y = a; y := w ⎠
end end
It is easy to see that this identity is true, as both p and q are executed in the
same state on both sides of the equation. It can also be justified axiomatically
using Axioms A, D, and G and a straightforward application of Theorem 3.
Finally, we use laws of distributivity and Booleans to get
let x = 0
in (if y = a then x := 1 else x := 2); p; y := x
end
6 Conclusion
We have presented a relational semantics for first-order programs with a let con-
struct for local variable scoping and a set of equational axioms for reasoning
about program equivalence in this language. The axiom system allows the let
construct to be systematically eliminated, thereby reducing the equivalence ar-
guments to the let -free case. This system admits algebraic equivalence proofs for
programs with local variables in the equational style of schematic KAT. We have
given several examples that illustrate that in many cases, it is possible to rea-
son purely axiomatically about programs with local variables without resorting
to semantic arguments involving heaps, pointers, or other complicated semantic
constructs.
Acknowledgments
We would like to thank Matthew Fluet, Riccardo Pucella, Sigmund Cherem, and
the anonymous referees for their valuable input.
References
1. Pitts, A.M.: Operational semantics and program equivalence. Technical report,
INRIA Sophia Antipolis (2000) Lectures at the International Summer School On
Applied Semantics, APPSEM 2000, Caminha, Minho, Portugal, September 2000.
2. Plotkin, G.: Full abstraction, totality and PCF (1997)
3. Cartwright, R., Felleisen, M.: Observable sequentiality and full abstraction. In:
Conference Record of the Nineteenth Annual ACM SIGPLAN-SIGACT Sympo-
sium on Principles of Programming Languages, Albequerque, New Mexico (1992)
328–342
4. Meyer, A.R., Sieber, K.: Towards fully abstract semantics for local variables. In:
Proc. 15th Symposium on Principles of Programming Languages (POPL’88), New
York, NY, USA, ACM Press (1988) 191–203
5. Milne, R., Strachey, C.: A Theory of Programming Language Semantics. Halsted
Press, New York, NY, USA (1977)
6. Scott, D.: Mathematical concepts in programmng language semantics. In: Proc. 1972
Spring Joint Computer Conferneces, Montvale, NJ, AFIPS Press (1972) 225–34
90 K. Aboul-Hosn and D. Kozen
Rudolf Berghammer
1 Introduction
A number of mathematical structures are generalizations of lattices. Especially
this holds for relation algebra [16,14], which additionally possesses operations
for forming complements, compositions, and transpositions. Its use in Computer
Science is mainly due to the fact that many structures/datatypes can be modeled
via relations, many problems on them can be specified naturally by relation-
algebraic expressions and formulae, and, therefore, many solutions reduce to
relation-algebraic reasoning and computations, respectively.
As demonstrated in [14], relation algebra is well suited for dealing with many
problems concerning order relations in a component-free (also called point-free)
manner. Taking ordered sets as a starting point for introducing lattices (instead
of algebras having two binary operations and ), lattices are nothing else
than partial order relations with the additional property that every pair x, y
of elements has a greatest lower bound x y and a least upper bound x y.
This suggests to apply the formal apparatus of relation algebra and tools for
its mechanization for lattice-theoretical problems, too. A first example for this
approach is [4], where relation algebra and the computer system RelView [1,3]
are combined for computing and visualizing cut completions and concept lattices.
The material presented in this paper is a continuation of [4]. We combine again
relation algebra and RelView to compute and visualize the lattices of subgroups
and normal subgroups of groups by means of appropriate algorithmic relation-
algebraic specifications. These lattices are a powerful tool in group theory since
many group theoretical properties are determined by the lattice of (normal)
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 91–105, 2006.
c Springer-Verlag Berlin Heidelberg 2006
92 R. Berghammer
subgroups and vice versa. As an example we mention that a finite group is cyclic
iff its subgroup lattice is distributive. A lot of further results in this vein can
be found in the monograph [15]. Fundamental for our approach is the modeling
of groups as relational systems. As a consequence, construction principles on
groups should be conducted within this framework, too, since frequently groups
are presented as compositions of other ones. In this paper we treat two important
principles, viz. the construction of direct products of groups and of quotient
groups modulo normal subgroups. Again this is done by developing appropriate
algorithmic relation-algebraic specifications.
2 Relational Preliminaries
We write R : X ↔ Y if R is a relation with domain X and range Y , i.e., a
subset of X × Y . If the sets X and Y of R’s type X ↔ Y are finite and of size
m and n, respectively, we may consider R as a Boolean matrix with m rows
and n columns. Since this Boolean matrix interpretation is well suited for many
purposes and also used by RelView to depict relations, in the following we
often use matrix terminology and matrix notation. Especially we speak about
the rows and columns of R and write Rx,y instead of x, y ∈ R or x R y.. We
assume the reader to be familiar with the basic operations on relations, viz. RT
(transposition), R (complementation), R ∪ S (union), R ∩ S (intersection), and
RS (composition), the predicate R ⊆ S (inclusion), and the special relations O
(empty relation), L (universal relation), and I (identity relation).
T
By syq(R, S) := RT S ∩ R S the symmetric quotient syq(R, S) : Y ↔ Z of
two relations R : X ↔ Y and S : X ↔ Z is defined.
We also will use the pairing (or fork ) [R, S] : Z ↔ X×Y of two relations
R : Z ↔ X and S : Z ↔ Y . Component-wisely it is defined by demanding for
all z ∈ Z and u = u1 , u2 ∈ X×Y that [R, S]z,u iff Rz,u1 and Sz,u2 . (Throughout
this paper pairs u are assumed to be of the form u1 , u2 .) Using identity and
universal relations of appropriate types, the pairing operation allows to define
the two projection relations π : X×Y ↔ X and ρ : X×Y ↔ Y of the direct
product X × Y as π := [I, L]T and ρ := [L, I]T . Then the above definition implies
for all u ∈ X × Y , x ∈ X, and y ∈ Y that πu,x iff u1 = x and ρu,y iff u2 = y. Also
the parallel composition (or product ) R ⊗ S : X×X ↔ Y ×Y of two relations
R : X ↔ Y and S : X ↔ Y , such that (R ⊗ S)u,v is equivalent to Ru1 ,v1 and
Su2 ,v2 for all u ∈ X × X and v ∈ Y × Y , can be defined by means of pairing. We
get the desired property if we define R ⊗ S := [πR, ρS], where π : X×X ↔ X
and ρ : X×X ↔ X are the projection relations on X × X .
There are some relational possibilities to model sets. Our first modeling uses
vectors, which are relations v with v = vL. Since for a vector the range is
irrelevant we consider in the following mostly vectors v : X ↔ 1 with a specific
singleton set 1 = {⊥} as range and omit in such cases the second subscript, i.e.,
write vx instead of vx,⊥ . Such a vector can be considered as a Boolean matrix
with exactly one column, i.e., as a Boolean column vector, and represents the
subset {x ∈ X | vx } of X. A non-empty vector v is said to be a point if vv T ⊆ I,
Computing and Visualizing Lattices of Subgroups 93
i.e., v is injective. This means that it represents a singleton subset of its domain
or an element from it if we identify a singleton set with the only element it
contains. In the Boolean matrix model a point v : X ↔ 1 is a Boolean column
vector in which exactly one component is true.
As a second way to model sets we will apply the relation-level equivalents of
the set-theoretic symbol ∈, i.e., membership-relations M : X ↔ 2X on X and its
powerset 2X . These specific relations are defined by demanding for all x ∈ X and
Y ∈ 2X that Mx,Y iff x ∈ Y . A Boolean matrix implementation of M requires
exponential space. However, in [12,5] an implementation of M using reduced
ordered binary decision diagrams (ROBDDs) is given, the number of nodes of
which is linear in the size of X.
Finally, we will use injective functions for modeling sets. Given an injective
function ı from Y to X, we may consider Y as a subset of X by identifying it
with its image under ı. If Y is actually a subset of X and ı is given as relation
of type Y ↔ X such that ıy,x iff y = x for all y ∈ Y and x ∈ X, then the
vector ıT L : X ↔ 1 represents Y as subset of X in the sense above. Clearly, the
transition in the other direction is also possible, i.e., the generation of a relation
inj (v) : Y ↔ X from the vector representation v : X ↔ 1 of Y ⊆ X such that
for all y ∈ Y and x ∈ X we have inj (v)y,x iff y = x.
A combination of such relations with membership-relations allows a column-
wise enumeration of sets of subsets. More specifically, if v : 2X ↔ 1 represents a
subset S of the powerset 2X in the sense defined above, then for all x ∈ X and
Y ∈ S we get the equivalence of (M inj (v)T )x,Y and x ∈ Y . This means that
S := M inj (v)T : X ↔ S is the relation-algebraic specification of membership
on S, or, using matrix terminology, the elements of S are represented precisely
by the columns of S. Furthermore, a little reflection shows for all Y, Z ∈ S the
equivalence of Y ⊆ Z and S T S Y,Z . Therefore, S T S : S ↔ S is the relation-
algebraic specification of set inclusion on S.
e = ρT (π ∩ R)L I = π T (ρ ∩ ReL)
Let G and G be two groups. Then the direct product G × G becomes a group
if we define the binary operation component-wisely. The inverse of a pair is the
pair of inverses and as neutral element we have the pair of neutral elements.
Now, suppose the relational systems (R, I, e) and (R , I , e ) to be relational
models of G and G , respectively, as introduced in Section 3.1. In the following
we develop a relational model of the direct product of G and G .
Due to the equations of Section 3.1 it suffices to develop a relation-algebraic
specification of the multiplication relation of G × G . To this end we assume that
Computing and Visualizing Lattices of Subgroups 95
w = u1 v1 , u2 v2
⇐⇒ w1 = u1 v1 ∧ w2 = u2 v2
⇐⇒ (∃ z : u1 = z1 ∧ v1 = z2 ∧ z1 z2 = w1 ) ∧
(∃ z : u2 = z1 ∧ v2 = z2 ∧ z1 z2 = w2 )
⇐⇒ (∃ z : πu,z1 ∧ πv,z2 ∧ Rz,w1 ) ∧ (∃ z : ρu,z1 ∧ ρv,z2 ∧ Rz,w 2
)
⇐⇒ (∃ z : (π ⊗ π)u,v,z ∧ Rz,w1 ) ∧ (∃ z : (ρ ⊗ ρ)u,v,z ∧ Rz,w2 )
⇐⇒ ((π ⊗ π)R)u,v,w1 ∧ ((ρ ⊗ ρ)R )u,v,w2
⇐⇒ [(π ⊗ π)R, (ρ ⊗ ρ)R ]u,v,w
If we remove the two subscripts u, v and w from the last expression of this cal-
culation following the definition of relational equality, we arrive at the following
relation-algebraic specification of the multiplication relation of G × G :
Likewise but more easily, we are able to develop the relation-algebraic specifi-
cation [πI, ρI ] : G×G ↔ G×G of the inversion relation of G × G from the fact
that v = u−1 iff v1 = u−1 −1
1 and v2 = u2 for all u, v ∈ G × G . Also the neutral
point of the product group G × G can be computed from the neutral points of
G and G , respectively. Here we arrive at πe ∩ ρe : G×G ↔ 1. Compared with
the computations of the inversion relation and the neutral point of G × G from
the multiplication relation of G × G as shown in Section 3.1, the computations
using [πI, ρI ] and πe ∩ ρe are much more efficient in that they use the projec-
tion relations π, ρ of the direct product G × G instead of the much larger direct
product (G×G ) × (G×G ) as the equations of Section 3.1 do.
xy −1 ∈ N ⇐⇒ ∃ u : u1 = x ∧ u2 = y −1 ∧ u1 u2 ∈ N
⇐⇒ ∃ u : πu,x ∧ (ρI T )u,y ∧ ∃ z : u1 u2 = z ∧ z ∈ N
⇐⇒ ∃ u : πu,x ∧ (ρI)u,y ∧ ∃ z : Ru,z ∧ nz as I = I T
⇐⇒ ∃ u : πx,u
T
∧ (ρI)u,y ∧ ∃ z : Ru,z ∧ (nL)z,y
⇐⇒ ∃ u : πx,u ∧ (ρI ∩ RnL)u,y
T
⇐⇒ (π T (ρI ∩ RnL))x,y
Now, we are almost done. Define C := Cepi (R.I, n). Then we have for all
equivalence classes a, b, c ∈ G/N the following property:
As in the case of direct products, also the inversion relation and the neutral
point of the quotient group G/N can be specified relation-algebraically using
the relational model (R, I, e) of the group G only. Doing so, we obtain C T IC :
G/N ↔ G/N for the inversion relation of G/N and C T e : G/N ↔ 1 for the
neutral point of G/N . However, contrary to direct products, now these “direct”
specifications are less efficient than the specifications based on the multiplication
relation of G/N . The reason is that the direct product (G/N ) × (G/N ) usually
is much smaller than the direct product G × G.
1
It should be mentioned that [2] also contains an efficient relational programm for
the column-wise enumeration of the equivalence classes, that avoids the use of a
membership-relation. We only use here M inj (syq(M, S)L)T to simplify presentation.
Computing and Visualizing Lattices of Subgroups 97
and the relation-algebraic specification of set inclusion on the set SG , i.e., the
partial order relation of the subgroup lattice (SG , ⊆), by
T
SgLat(R) = SgList (R) SgList (R) : SG ↔ SG
Y is a normal subgroup
⇐⇒ ∀ u : u2 ∈ Y → u1 u2 u−1
1 ∈ Y
⇐⇒ ∀ u : (ρM)u,Y → ∃ v : u1 u2 = v1 ∧ u−1
1 = v2 ∧ v1 v2 ∈ Y
⇐⇒ ∀ u : (ρM)u,Y → ∃ v : Ru,v1 ∧ (πI)u,v2 ∧ v1 v2 ∈ Y
⇐⇒ ∀ u : (ρM)u,Y → ∃ v : Ru,v1 ∧ (πI)u,v2 ∧ ∃ z : v1 v2 = z ∧ z ∈ Y
⇐⇒ ∀ u : (ρM)u,Y → ∃ v : Ru,v1 ∧ (πI)u,v2 ∧ ∃ z : Rv,z ∧ Mz,Y
⇐⇒ ∀ u : (ρM)u,Y → ∃ v : [R, πI]u,v ∧ (RM)v,Y
⇐⇒ ∀ u : (ρM)u,Y → ([R, πI]RM)u,Y
T T
⇐⇒ ¬∃ u : (ρM)Y,u ∧ [R, πI]RM Y,u
T
⇐⇒ ¬∃ u : (ρM ∩ [R, πI]RM )Y,u ∧ Lu
T
⇐⇒ (ρM ∩ [R, πI]RM ) L Y .
If we remove the subscript Y from the last expression, apply after that, as
in Section 4.1, some simple transformations to improve efficiency in view of
Computing and Visualizing Lattices of Subgroups 99
an implementation of relations via ROBDDs, and intersect the result with the
vector representation of the set of all subgroups of G, this leads to
T
NsgVect(R, I) = SgVect(R) ∩ LT (ρM ∩ [R, πI]RM ) : 2G ↔ 1
In the next step we transformed the above table into the relational model of
A4 . Loading the relations of this model (which are too large to be presented
here) from an ASCII-file into RelView we then computed the subgroups of
A4 and the partial order relation of the subgroup lattice. In the two pictures of
Fig. 2 the results of these computations are shown. The 12 × 10 Boolean matrix
on the left-hand side column-wisely enumerates the 10 subgroups of A4 and
the directed graph on the right-hand side depicts the inclusion order on them
by means of the Hasse diagram. Additionally we have labeled three columns
of the enumeration matrix, where the labels indicate the permutations forming
the respective subgroup, drawn the corresponding nodes of the graph as black
circles, and emphasized the subgraph generated by the black nodes and the nodes
1, 10 by boldface arrows. From the relationships drawn as boldface arrows we
immediately see that the subgraph lattice of A4 contains a “pentagon sublattice”
N5 . Hence, the so-called M3 -N5 -theorem [6] implies that it is not modular.
We also have used RelView to compute the three normal subgroups of A4 and
the corresponding lattice. The latter forms a chain of length two, with a normal
subgroup N isomorphic to the Kleinian group V4 as element in the middle. The
three pictures of Fig. 3 concern the quotient group of A4 modulo this specific
normal subgroup N , i.e., the quotient group A4 /V4 . On the left-hand side the
equivalence relation E of Section 3.3 is shown, the columns of the matrix in the
middle enumerate the set A4 /V4 , and the matrix on the right-hand side is the
multiplication relation of the quotient group A4 /V4 (which, obviously, coincides
with the multiplication relation of the cyclic group Z3 ).
6 Conclusion
Besides the examples of Section 5 we have applied the RelView-programs re-
sulting from the relational specifications of Section 4 to other groups. Most
of them have been constructed as products of small groups (using RelView-
programs obtained from the specifications of Section 3.2), like D3 × D3 (26 sub-
groups; 10 are normal subgroups) and V4 ×D3 ×Z2 (236 subgroups; 83 are normal
subgroups). Due to the use of membership-relations, for groups with |G| ≥ 50
the computations can take very long time or be complete unfeasible – despite of
the very efficient ROBDD-implementation of relations in RelView. Therefore,
we can not compete with algorithms specifically tailored to the problems we
have treated (cf. e.g., the times of [10] for computing all normal subgroups).
Nowadays, systematic experiments are accepted as a way for obtaining new
mathematical insights. Hence, tools for experimental computations and visual-
izations become increasingly important in many areas as one proceeds in the
investigation of new and more complex notions. We believe that the real attrac-
tion of RelView in respect thereof lies in its flexibility, its manifold visualization
possibilities, and the concise form of its programs. RelView proved to be an
ideal tool for experimenting while avoiding unnecessary overhead. Programs are
built very quickly and their correctness is guaranteed by the completely formal
T T
developments. For example, using Inf (R) = [R, R] ∩ [R, R] R : L×L ↔ L as
relation-algebraic specification of the lattice operation in terms of the lattice’s
partial order relation R : L ↔ L, the program SgVect of Section 5.1 immedi-
ately can be used for computing all sublattices of L. Thus, we have been able
to find out that, e.g., the 32-element Boolean lattice possesses exactly 12 084
sublattices, whereas only 52 of them are Boolean sublattices.
At this place, also the advantages of the system when using it in teaching
should be mentioned. We found it very attractive to use RelView for producing
good examples. These frequently have been proven for students to be the key
Computing and Visualizing Lattices of Subgroups 105
References
1. Behnke R., et al.: RelView – A system for calculation with relations and relational
programming. In: Astesiano E. (ed.): Proc. 1st Conf. Fundamental Approaches to
Software Engineering, LNCS 1382, Springer, 318-321 (1998).
2. Berghammer R., Hoffmann T.: Modelling sequences within the RelView system.
J. Universal Comput. Sci. 7, 107-13 (2001).
3. Berghammer R., Neumann F.: RelView– An OBDD-based Computer Algebra sys-
tem for relations. In: Gansha V.G. et al. (eds.): Proc. 8th Int. Workshop Computer
Algebra in Scientific Computing, LNCS 3718, Springer, 40-51 (2005)
4. Berghammer R.: Computation of cut completions and concept lattices using rela-
tional algebra and RelView. J. Rel. Meth. in Comput. Sci. 1, 50-72 (2004).
5. Berghammer R., Leoniuk B., Milanese U.: Implementation of relation algebra using
binary decision diagrams. In: de Swart H. (ed.): Proc. 6th Int. Workshop Relational
Methods in Computer Science, LNCS 2561, Springer, 241-257 (2002).
6. Davey B.A., Priestley H.A.: Introduction to lattices and order. Cambridge Univ.
Press (1990).
7. Freese R., Jezek J., Nation J.B.: Free lattices. Mathematical Surveys and Mono-
graphs, Vol. 42, American Math. Society (1995).
8. Ganter B., Wille R.: Formal concept analysis. Springer, (1999).
9. Hermes H.: Introduction to lattice theory (in German). Springer, 2nd ed. (1967).
10. Hulpke A.: Computing normal subgroups. In: Proc. Int. Symposium on Symbolic
and Algebraic Computation, ACM Press, 194-198 (1998).
11. Lang S.: Algebra. Springer, rev. 3rd ed. (2002).
12. Leoniuk B.: ROBDD-based implementation of relational algebra with applications
(in German). Ph.D. thesis, Inst. für Informatik und Prak. Math., Univ. Kiel (2001).
13. Milanese U.: On the implementation of a ROBDD-based tool for the manipulation
and visualization of relations (in German). Ph.D. thesis, Inst. für Informatik und
Prak. Math., Univ. Kiel (2003).
14. Schmidt G., Ströhlein T.: Relations and graphs. Springer (1993).
15. Schmidt R.: Subgroup lattices of groups, de Gruyter (1994).
16. Tarski A.: On the calculus of relations. J. Symb. Logic 6, 73-89 (1941).
On the Complexity of the Equational Theory of
Relational Action Algebras
Wojciech Buszkowski
1 Introduction
1 ∨ aa∗ ≤ a∗ , 1 ∨ a∗ a ≤ a∗ , (1)
ab ≤ b ⇒ a∗ b ≤ b , ba ≤ b ⇒ ba∗ ≤ b , (2)
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 106–119, 2006.
c Springer-Verlag Berlin Heidelberg 2006
On the Complexity of the Equational Theory 107
for all a, b, c ∈ A. Operations /, \ are called the left and right residual, respec-
tively, with respect to product. Pratt writes a → b for a\b and a ← b for a/b;
we use the slash notation of Lambek [18]. Pratt [22] proves that the class of
action algebras is a finitely based variety. Furthermore, in the language without
residuals, the equations true in all action algebras are the same as those true in
all Kleene algebras. Consequently, in the language with residuals, one obtains a
finite, equational axiomatization of the algebra of regular expressions.
On the other hand, the logic of action algebras differs in many essential aspects
from the logic of Kleene algebras. Although regular languages are (effectively)
closed under residuals, the Kozen completeness theorem is not true for terms
with residuals. For instance, since L(a) = {a}, then L(a/a) = {}, while a/a = 1
is not true in action algebras (one only gets 1 ≤ a/a). It is known that L(α) =
L(β) iff α = β is valid in relational algebras (α, β do not contain residuals).
Consequently, the equational theory of Kleene algebras equals the equational
theory of relational Kleene algebras. This is not true for action algebras (see
below).
A Kleene algebra is said to be *-continuous, if xa∗ y =sup{xan y : n ∈ ω}, for
all elements x, a, y. Relational algebras with operations defined in the standard
way and algebras of (regular) languages are *-continuous. The equational theory
of Kleene algebras equals the equational theory of *-continuous Kleene algebras.
Again, it is not the case for action algebras. The equational theory of all action
algebras is recursively enumerable (it is not known if it is decidable), while
the equational theory of *-continuous action algebras is Π10 −complete [9], and
consequently, it possesses no recursive axiomatization.
In this paper we study the complexity of relational action algebras and lat-
tices. An action lattice is an action algebra A supplied with meet ∧ such that
(A, ∨, ∧) is a lattice; Kleene lattices are defined in a similar way. If K is a class of
algebras, then Eq(K) denotes the equational theory of K, this means, the set of
all equations valid in K. KA, KL, ACTA, ACTL will denote the classes of Kleene
algebras, Kleene lattices, action algebras, and action lattices, respectively. KA*
denotes the class of *-continuous Kleene algebras, and similarly for the other
classes.
Let U be a set. P (U 2 ) (the powerset of U 2 ) is the set of all binary relations
on U . For R, S ⊆ U 2 , one defines: R ∨ S = R ∪ S, R ∧ S = R ∩ S, R · S= R ◦ S,
1 = IU = {(x, x) : x ∈ U }, 0 = ∅, R0 = IU , Rn+1 = Rn ◦ R, R∗ = n∈ω Rn ,
and:
Our results show that there exists no finitary dynamic logic (like PDL), com-
plete with respect to standard relational frames, which handles programs formed
by residuals and regular operations. Programs with residuals can express the
weakest prespecification and postspecification of a program and related condi-
tions; see Hoare and Jifeng [13].
2 Sequent Systems
To provide a cut-free axiom system for the logic of *-continuous action algebras
(lattices) it is expedient to consider sequents of the form Γ ⇒ α such that Γ is
a finite sequence of terms (of the first-order language of these algebras), and α
is a term. (Terms are often called formulas.) Given an algebra A, an assignment
is a homomorphism f from the term algebra to A; one defines f (Γ ) by setting:
f () = 1, f (α1 , . . . , αn ) = f (α1 ) · · · · · f (αn ). One says that Γ ⇒ α is true in
A under f , if f (Γ ) ≤ f (α). Clearly, f (α) = f (β) iff both f (α) ≤ f (β) and
f (β) ≤ f (α). A sequent is said to be true in A, if it is true in A under any
assignment, and valid in a class K, if it is true in all algebras from K. Since
Eq(K) and the set of sequents valid in K are simply interpretable in each other,
then the complexity of one of these sets equals the complexity of the other.
The sequents valid in ACTL* can be axiomatized by the following system.
The axioms are:
will be denoted (∨−L) and (∨−R), respectively. Rule (12) will be denoted (1-
L). Rule (*-L) is an infinitary rule (a kind of ω−rule); here αn stands for the
sequence of n copies of α. (*-R) denotes an infinite set of finitary rules: one for
any fixed n ∈ ω. For n = 0, (*-R) has the empty set of premises, so it is, actually,
an axiom ⇒ α∗ ; this yields 1 ⇒ α∗ , by (1-L).
Without * and rules (13), the system is known as Full Lambek Calculus (FL);
see Ono [19], Jipsen [14]. The rule (CUT):
Γ, α, Δ ⇒ β; Φ ⇒ α
(14)
Γ, Φ, Δ ⇒ β
is admissible in FL, this means: if both premises are provable in FL, then the
conclusion is provable in FL [19]. The (·, /, \)−fragment of FL is the Lambek
calculus L (admitting empty antecedents of sequents), introduced by Lambek [18]
(in a form not admitting empty antecedents) who has proved the cut-elimination
theorem for L.
A residuated lattice is an algebra A = (A, ∨, ∧, ·, /, \, 0, 1) such that (A, ∨, ∧)
is a lattice with the least element 0, (A, ·, 1) is a monoid, and /, \ are residuals
for product (they fulfill (3)). It is known that FL is complete with respect to
residuated lattices: a sequent is provable in FL iff it is valid in the class of
residuated lattices. A residuated monoid is a structure A = (A, ≤, ·, /, \, 1) such
that (A, ≤) is a poset, (A, ·, 1) is a monoid, and /, \ are residuals for product.
L is complete with respect to residuated monoids. These completeness theorems
can be proved in a standard way: soundness is obvious, and completeness can
be shown by the construction of a Lindenbaum algebra. Residuated monoids
and lattices are applied in different areas of logic and computer science; see e.g.
[19,20,6].
The following monotonicity conditions are true in all residuated monoids: if
a ≤ c and b ≤ d, then ab ≤ cd, a/d ≤ c/b, d\a ≤ b\c (in lattices also: a∨b ≤ c∨d,
a ∧ b ≤ c ∧ d, in action algebras also: a∗ ≤ c∗ ).
FL with * and rules (13) has been introduced in [9] and denoted by ACTω.
The set of provable sequents can be defined in the following way. For a set X, of
sequents, C(X) is defined as the set of all sequents derivable from sequents from
X by a single application of some inference rule (axioms are treated as inference
rules with the empty set of premises). Then, C(∅) is the set of all axioms. One
definesa transfinite chain Cζ , for ordinals ζ, by setting: C0 = ∅, Cζ+1 = C(Cζ ),
Cλ = ζ<λ Cζ . Since C is a monotone operator and C0 ⊆ C1 , then Cζ ⊆ Cζ+1 ,
for all ζ, and consequently, Cζ ⊆ Cη whenever ζ < η. The join of this chain
equals the set of sequents provable in ACTω. The rank of a provable sequent
equals the least ζ such that this sequent belongs to Cζ .
The cut-elimination theorem for ACTω is proved in [21] by a triple induction:
(1) on the complexity of formula α in (CUT), (2) on the rank of Γ, α, Δ ⇒ β,
(3) on the rank of Φ ⇒ α (following an analogous proof for L in [4]). Let us
show one case of induction (1): α = γ ∗ . Assume that Γ, α, Δ ⇒ β and Φ ⇒ α
are provable. We start induction (2). If the left premise is an axiom (I), then
the conclusion of (CUT) is the right premise. If the left premise is an axiom (0),
then the conclusion of (CUT) is also an axiom (0). Assume that the left premise
On the Complexity of the Equational Theory 111
gets its rank on the basis of an inference rule R; then, each premise of R is of
a smaller rank. If R is any rule, not introducing the designated occurrence of
α, then we directly apply the hypothesis of induction (2). If R introduces the
designated occurrence of α, then R is (*-L) with premises Γ, γ n , Δ ⇒ β, for all
n ∈ ω. We start induction (3). If Φ ⇒ α is an axiom (I), then the conclusion
of (CUT) is the left premise of (CUT). If Φ ⇒ α is an axiom (0), then the
conclusion of (CUT) is also an axiom (0). If Φ ⇒ α is a conclusion of (*-R), then
the premises are Φ1 ⇒ γ, . . ., Φn ⇒ γ, for some n ∈ ω. For n = 0, we get Φ = ,
and the conclusion of (CUT) is the premise of (*-L) for n = 0. For n > 0, one
of the premises of (*-L) is Γ, γ n , Δ ⇒ β, and we use n times the hypothesis of
induction (1). If Φ ⇒ α is a conclusion of a rule different from (*-R), then we
directly apply the hypothesis of induction (3).
Since the rule (CUT) is admissible in ACTω, then a standard argument yields
the completeness of ACTω with respect to *-continuous action lattices [21].
Soundness is obvious, and completeness can be shown by the construction of a
Lindenbaum algebra. Using (1-L),(*-L) and (*-R), one easily proves 1 ⇒ α∗ ,
α, α∗ ⇒ α∗ and, using (CUT), derives the following rules:
α, β ⇒ β β, α ⇒ β
, , (15)
α∗ , β ⇒ β β, α∗ ⇒ β
and consequently, the Lindenbaum algebra is an action lattice. By (*-L), it is
*-continuous.
Since ACTω is cut-free, then it possesses the subformula property: every prov-
able sequent admits a proof in which all sequents consist of subformulas of for-
mulas appearing in this sequent. In particular, ACTω is a conservative extension
of all its fragments, obtained by a restriction of the language, e.g. L, FL, the
∨−free fragment, the ∧−free fragment, and so on. All *-free fragments are fini-
tary cut-free systems, admitting a standard proof-search decision procedure. So,
they are decidable.
Now, we show that Eq(ACTA*)=Eq(RACTA). In relational algebras, for
R, S ⊆ IU , we have R ◦ S = R ∩ S. Fix a variable p. In L, from p ⇒ p, one
infers ⇒ p/p, by (/-R). Then, 1 ⇒ 1 yields 1/(p/p) ⇒ 1, by (/-L). So, the
sequent 1/(p/p) ⇒ (1/(p/p)) · (1/(p/p)) is valid in RACTA. It is not valid in
ACTA*, since it is not provable in L. (Use the proof-search procedure; notice
that ⇒ p, p/p ⇒ 1, ⇒ 1/(p/p) are not provable.) The same example shows
Eq(ACTL*)=Eq(RACTL) (another proof: the distribution of ∧ over ∨ is not
valid in ACTL*, since it is not provable in FL).
We define positive and negative occurrences of subterms in terms: α is positive
in α; if γ is positive (resp. negative) in α or β, then it is positive (resp. negative)
in α ∨ β, α ∧ β, α · β, α∗ ; if γ is positive (resp. negative) in β, then it is positive
(resp. negative) in β/α, α\β; if γ is positive (resp. negative) in α, then it is
negative (resp. positive) in β/α, α\β.
For n ∈ ω, let α≤n denote α0 ∨ . . . ∨ αn ; here αi stands for the product of i
copies of α and α0 is the constant 1. We define two term transformations Pn ,
Nn , for any n ∈ ω [9]. Roughly, Pn (γ) (resp. Nn (γ)) arises from γ by replacing
any positive (resp. negative) subterm of the form α∗ by α≤n .
112 W. Buszkowski
L(G) = {x ∈ Σ ∗ : s ⇒G x} . (24)
grammar G such that L(G ) = L(G) − {}, then also the following problem is
Π10 −complete: for any −free context-free grammar G, decide if L(G) = Σ + [9].
Types will be identified with (/)−terms of the language of ACTω, this means,
terms formed out of variables by means of / only. A Lambek categorial grammar
is a tuple G = (Σ, I, s) such that Σ is a finite alphabet, I is a finite relation
between symbols from Σ and types, and s is a designated variable. For a ∈ Σ,
I(a) denotes the set of all types α such that aIα. (The relation I is called the
initial type assignment of G.) For a string a1 . . . an ∈ Σ + , ai ∈ Σ, and a type
α, we write a1 . . . an →G α if there are α1 ∈ I(a1 ), . . ., αn ∈ I(an ) such that
α1 , . . . , αn ⇒ α is provable in L. We define the language of G as the set of all
x ∈ Σ + such that x →G s. (Notice that we omit commas between symbols in
strings on Σ, but we write them in sequences of terms appearing in sequents.) In
general, Lambek categorial grammars admit types containing ·, \ and, possibly,
other operations [6], but we do not employ such grammars in this paper.
It is well-known that, for any −free context-free grammar G, one can effec-
tively construct a Lambek categorial grammar G with the same alphabet Σ
and such that L(G) = L(G ); furthermore, the relation I of G employs very
restricted types only: of the form p, p/q, (p/q)/r, where p, q, r are variables.
This fact has been proved in [2] for classical categorial grammars and extended
to Lambek categorial grammars by several authors; see e.g. [4,9]. One uses the
fact that, for sequents Γ ⇒ s such that Γ is a finite sequence of types of the
above form and s is a variable, Γ reduces to s in the sense of classical categorial
grammars iff Γ ⇒ s is provable in L.
Consequently, the problem if L(G) = Σ + , for Lambek categorial grammars G,
is Π10 −complete. In [9] it is shown that this problem is reducible to the decision
problem for ACTω. Then, Eq(ACTL*) is Π10 −hard, and the same holds for
Eq(ACTA*). Below we show that this reduction also yields the Π10 −hardness of
Eq(RACTL) and Eq(RACTA).
Let G = (Σ, I, s) be a Lambek categorial grammar. We can assume IG (a) = ∅,
for any a ∈ Σ; otherwise L(G) = Σ + immediately. We can also assume that all
types involved in I are of one of the forms: p, p/q, (p/q)/r, where p, q, r are
variables. Fix Σ = {a1 , . . . , ak }, where ai = aj for i = j. Let αi1 , . . . , αini be all
distinct types α ∈ I(ai ). For any i = 1, . . . , k, we form a term βi = αi1 ∧ . . . ∧ αini .
We also define a term γ(G) = β1 ∨. . .∨βk . The following lemma has been proved
in [9].
Proof. For the sake of completeness, we sketch the proof. L(G) = Σ + iff, for
all n ≥ 1 and all sequences (i1 , . . . , in ) of integers from the set [k] = {1, . . . , k},
ai1 . . . ain →G s. The latter condition is equivalent to the following: for any
i
j = 1, . . . , n, there exists αljj ∈ I(aij ) such that αil11 , . . . , αilnn ⇒ s is provable in
L. The latter condition is equivalent to the following: βi1 , . . . , βin ⇒ s is provable
in FL. One uses the following fact: if Γ ⇒ α is a (∧, /)−sequent in which all
occurrences of ∧ are negative, and γ1 ∧γ2 occurs in this sequent (as a subterm of a
term), then Γ ⇒ α is provable in FL iff both Γ ⇒ α and Γ ⇒ α are provable
114 W. Buszkowski
Using the equation (a/b) ∧ (a/c) = a/(b ∨ c), valid in residuated lattices, we can
transform the above term into an equivalent (in FL) ∧−free term:
Let δ(G ) be the term arising from γ(G ) by transforming each constituent
(βi ) as above. Then, f (δ(G )) = f (γ(G )), for any assignment f .
We can also eliminate ∨ (preserving ∧). Using the equation (a ∨ b)∗ = (a∗ b)∗ a∗ ,
valid in all Kleene algebras, we can transform (γ(G))∗ into an equivalent (in
ACTω) term φ(G), containing ∗ , ∧, ·, / only. Then, (γ(G))∗ , γ(G) ⇒ s is valid
in RACTL iff φ(G), γ(G) ⇒ s is valid in RACTL iff φ(G) ⇒ s/γ(G) is valid in
RACTL, and s/γ(G) is equivalent to a ∨−free term (see the equation between
(25) and (26)). Since a ≤ b iff a ∧ b = a, then we can reduce L(G) = Σ + to a
∨−free equation.
We have found a lower bound for the complexity of Eq(RACTL): it is at least Π10 .
We did not succeed in determining the upper bound. Both 1 and ∨ cause troubles.
In section 2, we have shown a sequent with 1 which is valid in RACTL, but not
valid in ACTL*. According to the author’s knowledge, the precise complexity
of the equational theory of relational residuated lattices (upper semilattices) is
not known; it must be Σ10 , since valid equations can be faithfully interpreted as
valid formulas of first-order logic.
We can show some Π10 −complete fragments of Eq(RACTL). For instance, the
set of all sequents of the form α, γ ∗ , β ⇒ p, with α, β, γ being finite disjunctions
of (/, \, ∧)−terms, valid in RACTL is Π10 −complete. This sequent is valid iff,
116 W. Buszkowski
for all n ∈ ω, α, γ n , β ⇒ δ is valid, and the latter sequents are valid iff they are
provable in FL (see the proof of theorem 1). Consequently, this set of sequents is
0)
Π10 . It is Π1 −hard, again by the proof of theorem 1. This set can be extended
as follows.
A term is said to be good if it is formed out of (∧, /, \)−terms by · and *
only. A sequent Γ ⇒ α is said to be nice if it is a (∧, ·,∗ , /, \)−sequent, and any
negatively occurring term of the form β ∗ occurs in this sequent within a good
term γ, which appears either as an element of Γ , or in a context δ/γ or γ\δ.
Using the *-elimination theorem [21], one can prove that the set of nice sequents
valid in RACTL is Π10 −complete.
Proof. The ‘only if’ part is obvious. For the ‘if’ part, assume that Γ ⇒ α is
not provable. Let T be the set of all subterms appearing in this sequent. We
consider languages on the alphabet T . An assignment fn , n ∈ ω, is defined as
follows: for any variable p, fn (p) equals the set of all Δ ∈ T ∗ such that either
v(Δ) > n, or Δ ⇒ p is provable (v(Δ) denotes the total number of occurrences
of variables in Δ). As usual, fn is extended to a homomorphism from the term
algebra to P (T ∗ ). Since all languages fn (p) are co-finite, then all languages fn (β)
are regular. If Δ ∈ T ∗ , v(Δ) > n, then Δ ∈ fn (β), for all terms β (easy induction
on β).
By induction on β ∈ T , we prove: (i) if v(Δ) ≤ n − v(β) and Δ ∈ fn (β), then
Δ ⇒ β is provable, (ii) if v(β) ≤ v(Δ) and Δ ⇒ β is provable, then Δ ∈ fn (β).
For β = p, (i) and (ii) follow from the definition of fn .
Let β = γ/δ. Assume v(Δ) ≤ n − v(β) and Δ ∈ fn (β). Since v(δ) ≤ v(δ),
then δ ∈ fn (δ), by (I) and the induction hypothesis (use (ii)). So, (Δδ) ∈ fn (γ),
by the definition of residuals in P (T ∗ ). Since v(Δδ) ≤ n − v(γ), then Δ, δ ⇒ γ
is provable (use (i)). By (/−R), Δ ⇒ β is provable. Assume that v(β) ≤ v(Δ)
and Δ ⇒ β is provable. By the reversibility of (/−R), Δ, δ ⇒ γ is provable. Let
Φ ∈ fn (δ). Case 1: v(Φ) > n − v(δ). Then, v(ΔΦ) > n, whence (ΔΦ) ∈ fn (γ).
Case 2: v(Φ) ≤ n − v(δ). Then, Φ ⇒ δ is provable, by the induction hypothesis
(use (i)), and consequently, Δ, Φ ⇒ γ is provable, by (CUT). Since v(γ) ≤ v(ΔΦ),
then (ΔΦ) ∈ fn (γ), by the induction hypothesis (use (ii)). So, Δ ∈ fn (β). The
case β = δ\γ is dual.
Let β = γ ∧ δ. Assume v(Δ) ≤ n − v(β) and Δ ∈ fn (β). Then, v(Δ) ≤
n − v(γ) and Δ ∈ fn (γ). Also v(Δ) ≤ n − v(δ) and Δ ∈ fn (δ). By the induction
hypothesis, Δ ⇒ γ and Δ ⇒ δ are provable, and consequently, Δ ⇒ β is
provable, by (∧−R). Assume that v(β) ≤ v(Δ) and Δ ⇒ β is provable. Since
β ⇒ γ and β ⇒ δ are provable, by (I) and (∧−L), then Δ ⇒ γ and Δ ⇒ δ are
provable, by (CUT). We have v(γ) ≤ v(Δ) and v(δ) ≤ v(Δ), and consequently,
Δ ∈ fn (γ) and Δ ∈ fn (δ), by the induction hypothesis, which yields Δ ∈ fn (β).
Take n = v(Γ ⇒ α). Let Γ = α1 . . . αk . Since v(αi ) ≤ v(αi ), then αi ∈ fn (αi ),
by (I) and (ii). Consequently, Γ ∈ fn (Γ ). Since v(Γ ) = n−v(α), then Γ ∈ fn (α),
by the assumption and (i) (this also holds for Γ = ). Consequently, Γ ⇒ α is
not valid in REGLAN.
Proof. We know that this set is Π10 . We show that it is Π10 −hard. We return to
lemma 1 in section 3. We show that (γ(G))∗ , γ(G) ⇒ s is provable in ACTω
iff this sequent is valid in REGLAN. The implication (⇒) is obvious. To prove
118 W. Buszkowski
(⇐) assume that (γ(G))∗ , γ(G) ⇒ s is not provable in ACTω. As in the proof
of theorem 1, we show that there exists a sequence (i1 , . . . , in ) ∈ [k]n , n ≥ 1,
such that βi1 · · · · · βin ⇒ s is not provable in FL. By (·−L), βi1 , . . . , βin ⇒ s is
not provable in FL. By lemma 4, the latter sequent is not valid in REGLAN.
As in the proof of theorem 1, we show that (γ(G))∗ , γ(G) ⇒ s is not valid in
REGLAN. So, L(G) = Σ + iff (γ(G))∗ , γ(G) ⇒ s is valid in REGLAN.
We note that Eq(LAN) belongs to a higher complexity class. The Horn formulas
valid in LAN can be expressed by equations valid in LAN. Notice that α ≤
β is true iff 1 ≤ β/α is true. Also the conjunction of formulas 1 ≤ αi , i = 1, . . . , n,
is true iff 1 ≤ α1 ∧ · · · ∧ αn is true. Finally, the implication ‘if 1 ≤ α then 1 ≤
β’x is true iff 1 ∧ α ≤ β is true.
The Horn theory of LAN, restricted to (/, \)−terms, is Σ10 −complete [3]. The
proof of theorem 3 yields the Π10 −hardness of Eq(LAN); so, it is not Σ10 . If
it were Π10 , then this restricted Horn theory of LAN would be recursive. So,
Eq(LAN) is neither Π10 , nor Σ10 .
In [17,11] the Horn theory of KA* and the Horn theory of RKA are shown to
be Π11 −complete. This yields a lower bound for the complexity of Horn theories
of ACTA* and RACTA (every *-continuous Kleene algebra is embeddable into
a complete, whence *-continuous, action lattice [9]).
References
1. H. Andréka and S. Mikulaś, Lambek calculus and its relational semantics: complete-
ness and incompleteness, Journal of Logic, Language and Information 3 (1994),
1-37.
2. Y. Bar-Hillel, C. Gaifman and E. Shamir, On categorial and phrase structure gram-
mars, Bulletin Res. Council Israel F9 (1960), 155-166.
3. W. Buszkowski, Some decision problems in the theory of syntactic categories,
Zeitschrift f. math. Logik und Grundlagen der Mathematik 28 (1982), 539-548.
4. W. Buszkowski, The equivalence of unidirectional Lambek categorial grammars and
context-free grammars, Zeitschrift f. math. Logik und Grundlagen der Mathematik
31 (1985), 369-384.
5. W. Buszkowski, The finite model property for BCI and related systems, Studia
Logica 57 (1996), 303-323.
6. W. Buszkowski, Mathematical Linguistics and Proof Theory, in [24], 683-736.
7. W. Buszkowski, Finite models of some substructural logics, Mathematical Logic
Quarterly 48 (2002), 63-72.
8. W. Buszkowski, Relational models of Lambek logics, in: Theory and Applications of
Relational Structures as Knowledge Instruments, Lecture Notes in Comp. Science
2929, 2003, 196-213.
9. W. Buszkowski, On action logic: Equational theories of action algebras, to appear
in Journal of Logic and Computation.
10. W. Buszkowski and M. Kolowska-Gawiejnowicz, Representation of residuated semi-
groups in some algebras of relations. (The method of canonical models.), Funda-
menta Informaticae 31 (1997), 1-12.
11. C. Hardin and D. Kozen, On the complexity of the Horn theory of REL, manu-
script, 2003.
On the Complexity of the Equational Theory 119
12. J.E. Hopcroft and J.D. Ullman, Introduction to Automata Theory, Languages and
Computation, Addison-Wesley, Reading, 1979.
13. C. Hoare and H. Jifeng, The weakest prespecification, Fundamenta Informaticae 9
(1986), 51-84, 217-252.
14. P. Jipsen, From semirings to residuated Kleene algebras, Studia Logica 76 (2004),
291-303.
15. D. Kozen, On Kleene algebras and closed semirings, in: Proc. MFCS 1990, Lecture
Notes in Comp. Science 452, 1990, 26-47.
16. D. Kozen, A completeness theorem for Kleene algebras and the algebra of regular
events, Information and Computation 110:2 (1994), 366-390.
17. D. Kozen, On the complexity of reasoning in Kleene algebras, Information and
Computation 179 (2002), 152-162.
18. J. Lambek, The mathematics of sentence structure, American Mathematical
Monthly 65 (1958), 154-170.
19. H. Ono, Semantics for Substructural Logics, in: Substructural Logics, (P. Schroeder-
Heister and K. Dosen, eds.), Clarendon Press, Oxford, 1993, 259-291.
20. E. Orlowska and A.M. Radzikowska, Double residuated lattices and their applica-
tions, in: Relational Methods in Computer Science, Lecture Notes in Comp. Science
2561, 2002, 171-189.
21. E. Palka, An infinitary sequent system for the equational theory of *-continuous
action lattices, to appear in Fundamenta Informaticae.
22. V. Pratt, Action logic and pure induction, in: Logics in AI. Proc. JELIA’90, Lecture
Notes in Artif. Intelligence 478, 1990, 97-120.
23. V.N. Redko, On defining relations for the algebra of regular events, Ukrain. Mat.
Z. 16 (1964), 120-126. In Russian.
24. J. van Benthem and A. ter Meulen (eds.), Handbook of Logic and Language, Else-
vier, Amsterdam, The MIT Press, Cambridge Mass., 1997.
Demonic Algebra with Domain
1 Introduction
The basic operators of Kleene algebra (KA) or relation algebra (RA) can directly
be used to give an abstract angelic semantics of while programs. For instance,
a + b corresponds to an angelic non-deterministic choice between programs a
and b, and (t · b)∗ · ¬t is the angelic semantics of a loop with condition t and
body b. One way to express demonic semantics in KA or RA is to define demonic
operators in terms of the basic operators; these demonic operators can then be
used in the semantic definitions. In RA, this has been done frequently (see for
instance [1,2,6,7,16,19,23]); in KA, much less [11,12].
In the recent years, various algebras for program refinement have seen the
day [3,13,14,15,21,22,24]. The refinement algebra of von Wright is an abstraction
of predicate transformers, while the laws of programming of Hoare et al. have
an underlying relational model. Möller’s lazy Kleene algebra has weaker axioms
than von Wright’s and can handle systems in which infinite sequences of states
may occur.
Our goal is also to design a refinement algebra, that we call a Demonic algebra
(DA). Rather than designing it with a concrete model in mind, our first goal is
to come as close as possible to the kind of algebras that one gets by defining
demonic operators in KA with domain (KAD) [8,9,10], as is done in [11,12],
and then forgetting the basic angelic operators of KAD. Starting from KAD
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 120–134, 2006.
c Springer-Verlag Berlin Heidelberg 2006
Demonic Algebra with Domain 121
means that DA abstracts many concrete models, just like KA does. We hope
that the closeness to KA will eventually lead to decision procedures like those of
KA. A second longer term goal, not pursued here, is to precisely determine the
relationship of DA with the other refinement algebras; we will say a few words
about that in the conclusion.
In Section 2, we recall the definitions of Kleene algebra and its extensions,
Kleene algebra with tests (KAT) and Kleene algebra with domain (KAD). This
section also contains the definitions of demonic operators in terms of the KAD
operators. Section 3 presents the axiomatisation of DA and its extensions, DA
with tests (DAT) and DA with domain (DAD), as well as derived laws. It
turns out that the laws of DAT closely correspond to the laws of programming
of [13,14]. In Section 4, we begin to investigate the relationship between KAD
and DAD by first defining angelic operators in terms of the demonic operators
(call this transformation G). Then we investigate whether the angelic operators
thus defined by G induce a KAD. Not all answers are known there and we state
a conjecture that we believe holds and from which the conditions that force G to
induce a KAD can be determined. It is stated in Section 5 that the conjecture
holds in those DADs obtained from a KAD by defining demonic operators in
terms of the angelic operators (call this transformation F ). The good thing is
that F followed by G is the identity. Section 6 simply describes the main un-
solved problem. We conclude in Section 7 with a description of future research
and a quick comparison with other refinement algebras.
Due to restricted space, we cannot include proofs. They are published in a
research report available on the web [5].
In this section, we recall basic definitions about KA and its extensions, KAT
and KAD. Then we present the KAD-based definition of the demonic operators.
(x + y) + z = x + (y + z) (1)
x+y =y+x (2)
x+x=x (3)
0+x=x (4)
(x · y) · z = x · (y · z) (5)
0·x = x·0 =0 (6)
1·x = x·1 =x (7)
x · (y + z) = x · y + x · z (8)
(x + y) · z = x · z + y · z (9)
122 J.-L. De Carufel and J. Desharnais
x∗ = x · x∗ + 1 (10)
x∗ = x∗ · x + 1 (11)
x ≤ y ⇐⇒ x + y = y . (12)
z · x + y ≤ z =⇒ y · x∗ ≤ z (13)
∗
x · z + y ≤ z =⇒ x · y ≤ z (14)
In the sequel, we use the letters s, t, u, v for tests and w, x, y, z for programs.
x ≤ x · x , (15)
(t · x) ≤ t , (16)
(x · y) ≤ (x · y) . (17)
These axioms force the test algebra test(K) to be the maximal Boolean algebra
included in {x | x ≤ 1} [10]. Property (17) is called locality. There are many other
properties about KAT and KAD and we present some of the most important
ones concerning the domain operator. See [8,10,12] for proofs.
The following operator characterises the set of points from which no computation
as described by x may lead outside the domain of y.
We are now ready to introduce the demonic operators. Most of the proofs can
be found in [12].
Definition 6 (Demonic refinement). Let x and y be two elements of a KAD.
We say that x refines y, noted x A y, when y ≤ x and y · x ≤ y.
The subscript A in A indicates that the demonic refinement is defined with
the operators of the angelic world. An analogous notation will be introduced
when we define angelic operators in the demonic world. It is easy to show that
A is a partial order. Note that for all tests s and t, s A t ⇐⇒ t ≤ s. This
definition can be simply illustrated with relations. Let Q = {(1, 2), (2, 4)} and
R = {(1, 2), (1, 3)}. Then R = {(1, 1)} ⊆ {(1, 1), (2, 2)} = Q. Since in addition
R; Q = {(1, 2)} ⊆ R, we have Q A R (“;” is the usual relational composition).
Proposition 7 (Demonic upper semilattice).
1. The partial order A induces an upper semilattice with demonic join A :
x A y ⇐⇒ x A y = y.
2. Demonic join satisfies the following two properties.
x A y = x · y · (x + y)
(x A y) = x A y = x · y
Definition 8 (Demonic composition). The demonic composition of two el-
ements x and y of a KAD, written x 2A y, is defined by x 2A y = (x → y) · x · y.
Definition 9 (Demonic star). Let x ∈ K, where K is a KAD. The unary
iteration operator ×A is defined by x×A = x∗ 2A x.
Definition 10 (Conditional). For each t ∈ test(K) and x, y ∈ K, the t-
conditional is defined by x
At y = t · x + ¬t · y. The family of t-conditionals
corresponds to a single ternary operator
A• taking as arguments a test t and
two arbitrary elements x and y.
The demonic join operator A is used to give the semantics of demonic non-
deterministic choices and 2A is used for sequences. Among the interesting prop-
erties of 2A , we cite t 2A x = t · x, which says that composing a test t with
an arbitrary element x is the same in the angelic and demonic worlds, and
x 2A y = x · y if y = 1, which says that if the second element of a composition
is total, then again the angelic and demonic compositions coincide. The ternary
operator
A• is similar to the conditional choice operator of Hoare et
al. [13,14]. It corresponds to a guarded choice with disjoint alternatives. The it-
eration operator ×A rejects the finite computations that go through a state from
which it is possible to reach a state where no computation is defined (e.g., due
to blocking or abnormal termination).
As usual, unary operators have the highest precedence, and demonic compo-
sition 2A binds stronger than A and
A• , which have the same precedence.
Proposition 11 (KA-based demonic operators). The demonic operators
A , 2A ,
A• , ×A and satisfy the axioms of demonic algebra with domain presented
in Section 3 (Definitions 12, 13, 16).
124 J.-L. De Carufel and J. Desharnais
x (y z) = (x y) z (18)
x y =y x (19)
x x=x (20)
0 x=0 (21)
x (y 2 z) = (x 2 y) 2z
2 (22)
0 2x = x 2 0 = 0 (23)
1 2x = x 2 1 = x (24)
x 2 (y z) = x 2 y x 2 z (25)
(x y) 2 z = x 2 z y 2z (26)
x× = x 2 x× 1 (27)
x× = x× 2 x 1 (28)
x y ⇐⇒ x y = y . (29)
z 2x y z =⇒ y 2 x× z (30)
x 2 z y z =⇒ x× 2y z (31)
When comparing Definitions 1 and 12, one observes the obvious correspon-
dences + ↔ , · ↔ 2 , ∗ ↔ × , 0 ↔ 0, 1 ↔ 1. The only difference in the axioma-
tisation between KA and DA is that 0 is the left and right identity of addition
in KA (+), while it is a left and right zero of addition in DA ( ). However, this
minor difference has a rather important impact. While KAs and DAs are upper
semilattices with + as the join operator for KAs and for DAs, the element 0
is the bottom of the semilattice for KAs and the top of the semilattice for DAs.
Indeed, by (21) and (29), x 0 for all x ∈ AD .
Demonic Algebra with Domain 125
All operators are isotone with respect to the refinement ordering . That is,
for all x, y, z ∈ AD ,
x y =⇒ z x z y ∧ z 2x z 2y ∧ x 2 z y 2 z ∧ x× y × .
This can easily be derived from (19), (20), (24), (25), (26), (27), (29) and (31).
¬t = 0
t 1. (32)
x
t y = y
¬t x (33)
t 2 x
t y = x
t y (34)
x
t x = x (35)
x
t 0 = t 2 x (36)
(x
t y) 2 z = x 2 z
t y 2 z (37)
s 2 (x
t y) = (s 2 x)
t (s 2y) (38)
x
t (y z) = (x
t y) (x
t z) (39)
x (y
t z) = (x y)
t (x z) (40)
t ¬t = 0 (41)
¬(1
t s) = ¬t ¬s (42)
Proposition 14. The following properties are true for all s, t ∈ BD and all
x, x1 , x2 , y, y1 , y2 , z ∈ AD .
1. ¬¬t = t
2. x y =⇒ x
t z y
t z
3. 0
t x = ¬t 2 x
4. x
t ¬t 2 y = x
t y
5. t 2t = t
6. s t = s 2t
7. t 2 ¬t = 0
8. s 2t = t 2s
9. ¬1 = 0
10. ¬0 = 1
11. t 2 x x ⇐⇒ 0 ¬t 2 x
12. s t =⇒ ¬t ¬s
13. x y ⇐⇒ t 2 x t 2 y ∧ ¬t 2 x ¬t 2 y
14. x = y ⇐⇒ t 2x = t 2 y ∧ ¬t 2 x = ¬t 2 y
15. t 2 (x
t y) = t 2 x
16. x y
t z ⇐⇒ x t 2y ∧ x ¬t 2 z
17. x
t y z ⇐⇒ x t 2z ∧ y ¬t 2 z
18. (x1
s x2 )
t (y1
s y2 ) = (x1
t y1 )
s (x2
t y2 )
(x 2 t) 2 x = x 2 t (43)
(x y) = x y (44)
(x 2 y) = (x 2 y) (45)
Proposition 17. In a DAD, the demonic domain operator satisfies the follow-
ing properties. Take x, y ∈ AD and t ∈ BD .
1. x = max {t | t ∈ BD ∧ t 2x = x}
2. x 2 x = x
3. t (t 2 x)
4. t x ⇐⇒ t 2 x x
5. t x ⇐⇒ 0 ¬t 2 x
6. ¬x 2 x = 0
7. x y =⇒ x y
8. x (x 2 y)
9. t = t
10. (t 2 x) = t 2 x
128 J.-L. De Carufel and J. Desharnais
11. x = 0 ⇐⇒ x = 0
12. (x
t y) = x
t y
All the above laws except 12 are identical to laws of , after compensating for
the reverse ordering of the Boolean lattice (on tests, corresponds to ≥).
To simplify the notation when possible, we will use the abbreviation
x
y = x
x y . (46)
Under special conditions,
has easy to use properties, as shown by the next
corollary.
Corollary 18. Let x, y, z be arbitrary elements and s, t be tests of a DAD. Then
s
t is the meet of s and t in the Boolean lattice of tests. Furthermore, the
following properties hold.
x 2 y = y 2 x =⇒ x
y = y
x (47)
x 2 y = 0 =⇒ x 2 y = y 2 x (48)
0
x=x
0=x (49)
x
x=x (50)
t 2(x
y) = t 2x
t 2y (51)
(x
y)
z = x
(y
z) (52)
x (y
z) = (x y)
(x z) (53)
x
y x (54)
(x
y) = x
y (55)
The two most useful cases of the previous corollary are when
is used on tests
and when x 2 y = 0.
f : AD × AD → AD
(x, y) → (x y)
¬y 2x
¬x 2 y
1. For all x, 0 ≤D x.
2. For all x, y,
x ≤D y ⇐⇒ f (x, y) = y ,
where f is the function defined in Lemma 20.
3. ≤D is a partial order. Letting x +D y denote the supremum of x and y with
respect to ≤D , we have
x +D y = f (x, y) .
(x +D y) +D z = x +D (y +D z) (58)
x +D y = y +D x (59)
x +D x = x (60)
0 +D x = x (61)
We now turn to the definition of angelic composition. But things are not as
simple as for ≤D or +D . The difficulty is due to the asymmetry between left and
right caused by the difference between axioms (37) and (38), and by the absence
of a codomain operator for “testing” the right-hand side of elements as can be
done with the domain operator on the left. Consider the two relations
Q = {(0, 0), (0, 1), (1, 2), (2, 3)} and R = {(0, 0), (2, 2)} .
The angelic composition of Q and R is Q·R = {(0, 0), (1, 2)}, while their demonic
composition is Q 2 R = {(1, 2)}. There is no way to express Q · R only in terms of
Q 2R. What we could try to do is to decompose Q as follows using the demonic
meet
Q = Q 2R
Q 2¬R
(Q1 Q2 ) ,
where Q1 = {(0, 0)} and Q2 = {(0, 1)}. Note that Q 2R = {(1, 2)} and Q 2¬R =
{(2, 3)} so that the domains of the three operands of
are disjoint. The effect
130 J.-L. De Carufel and J. Desharnais
of
is then just union. With these relations, it is possible to express the angelic
composition as Q · R = Q 2 R
Q1 2R. Now, it is possible to extract Q1 Q2
from Q, since Q1 Q2 = ¬(Q 2 R) 2¬(Q 2¬R) 2 Q. The problem is that it is
not possible to extract Q1 from Q1 Q2 . On the one hand, Q1 and Q2 have the
same domain; on the other hand, there is no test t such that Q1 = (Q1 Q2 ) 2 t.
Note that Q1 2 R = Q1 and Q2 2R = ¬Q2 . This is what leads us to the following
definition.
Definition 22. Let t be a test. An element x of a DAD is said to be t-decom-
posable iff there are unique elements xt and x¬t such that
x = x 2 t
x 2 ¬t
(xt x¬t ) ,
xt = x¬t = ¬(x 2 t) 2 ¬(x 2 ¬t) 2 x ,
xt = xt 2t ,
x¬t = x¬t 2¬t .
And x is said to be decomposable iff it is t-decomposable for all tests t.
It is easy to see that all tests are decomposable. Indeed, the (unique) t-decom-
position of a test s is
s = s 2t
s 2 ¬t
(0 0) .
One may wonder whether there exists a DAD with non-decomposable ele-
ments. The answer is yes. The following nine relations constitute such a DAD,
with the operations given (they are the standard demonic operations on rela-
tions), omitting
• . The set of tests is {0, s, t, 1}.
0 0 1 0 0 0 1 0
0= s= t= 1=
0 0 0 0 0 1 0 1
1 0 1 1 1 1 1 1 0 0
a= b= c= d= e=
1 1 0 1 1 1 0 0 1 1
0s t 1abcde 2 0s t 1abcde × ¬
0 000000000 0 000000000 00 00 01
s 0s 0s s ddd0 s 0s 0s s ddd0 s s s s st
t 00t t et e0e t 00t t et e0e t t t t t s
1 0s t 1abcde 1 0s t 1abcde 11 11 10
a 0s eaaccde a 0s 0aaccd0 aa a1
b 0dt bcbcde b 00t bc bc0e bb b1
c 0dec cccde c 000cc cc 00 cc c1
d 0d0ddddd0 d 000dddd00 d0 ds
e 00eeeee0e e 000ee ee 00 e0 et
The elements a, b, c, d and e are not decomposable. For instance, to decompose
c with respect to s would require the existence of relations
1 0 0 1
and ,
1 0 0 1
which are not there.
Demonic Algebra with Domain 131
x ·D y = x 2 y
xy 2 y .
1. 1 ·D x = x ·D 1 = x,
2. 0 ·D x = x ·D 0 = 0,
3. (x ·D (y ·D z)) = ((x ·D y) ·D z).
We have not yet been able to show the associativity of ·D nor its distributivity
over +D .
The last angelic operator that we define here is the iteration operator that
corresponds to the Kleene star.
x∗D = (x
1)× 1 .
In this section, we introduce two transformations between the angelic and de-
monic worlds. The ultimate goal is to show how KAD and DAD are related one
to the other.
(K, test(K), A , 2A , ×A , 0, 1,
A• , ) ,
where A , 2A , ×A and
A• are the operators defined in Proposition 7 and Defini-
tions 8, 9 and 10, respectively.
132 J.-L. De Carufel and J. Desharnais
(AD , BD , +D , ·D , ∗D , 0, 1, ¬D , ) ,
Let D = (AD , BD , , 2 , × , 0, 1,
• , ) be a DAD. If AD has non-decomposable
elements, then D cannot be the image F (K) of a KAD K, by Theorem 28-2. The
question that is still not settled is whether the subalgebra Dd of decomposable
elements of D is the image F (K) of some KAD K. If Conjecture 26 holds, then
this is the case and the composition of transformations F ◦ G is the identity on
Dd . This problem will be the subject of our future research.
7 Conclusion
The work on demonic algebra presented in this paper is just a beginning. Many
avenues for future research are open. First and foremost, Conjecture 26 must
be solved. In relation to this conjecture, the properties of non-decomposable
elements are also intriguing. Are there concrete models useful for Computer
Science where these elements play a rôle?
Demonic Algebra with Domain 133
Another line of research is the precise relationship of DAD with the other
refinement algebras and most particularly those of [15,21,22,24]. DAD has
stronger axioms than these algebras, and thus these contain a DAD as a sub-
structure. Some basic comparisons can already be done. For instance, DADs
can be related to the command algebras of [15] as follows. Suppose a KAD
K = (K, test(K), +, ·, ∗ , 0, 1, ¬, ). A command on K is an ordered pair (x, s),
where x ∈ K and s ∈ test(K). The test s denotes the “domain of termina-
tion” of x. If s ≤ x, the command (x, s) is said to be feasible; otherwise, it is
miraculous. The set of non-miraculous commands of the form (x, x), with the
appropriate definition of the operators, is isomorphic to the KAD-based demonic
algebra D obtained from K. If K is the set of all relations over a set S, then
D is isomorphic to the non-miraculous conjunctive predicate transformers on S;
this establishes a relationship with the refinement algebras of [22,24], which have
predicate transformers as their main models. The algebras in [22,24] have two
kinds of tests, guards and assertions. Assertions correspond to the tests of DAD
and the termination operator τ of [22] corresponds to the domain operator of
DAD.
Finally, let us mention the problem of infinite iteration. In DAD, there is no
infinite iteration operator. One cannot be added by simply requiring it to be the
greatest fixed point of λ(z :: x 2A z A 1), since this greatest fixed point is always 0.
In [12], tests denoting the starting points of infinite iterations for an element x
are obtained by using the greatest fixed point (in a KAD) of λ(t :: (x · t)). We
intend to determine whether a similar technique can be used in DAD.
Acknowledgements
The authors thank Bernhard Möller and the anonymous referees for helpful
comments. This research was partially supported by NSERC (Natural Sciences
and Engineering Research Council of Canada) and FQRNT (Fond québécois de
la recherche sur la nature et les technologies).
References
1. Backhouse, R.C., van der Woude, J.: Demonic operators and monotype factors.
Mathematical Structures in Computer Science 3 (1993) 417–433
2. Berghammer, R., Zierer, H.: Relational algebraic semantics of deterministic and
nondeterministic programs. Theoretical Computer Science 43 (1986) 123–147
3. Cohen, E.: Separation and reduction. In: Mathematics of Program Construction.
Volume 1837 of Lecture Notes in Computer Science, Springer (2000) 45–59
4. Conway, J.: Regular Algebra and Finite Machines. Chapman and Hall, London
(1971)
5. De Carufel, J.L., Desharnais, J.: Demonic algebra with domain. Research re-
port DIUL-RR-0601, Département d’informatique et de génie logiciel, Université
Laval, Canada (2006). Available at http://www.ift.ulaval.ca/∼Desharnais/
Recherche/RR/DIUL-RR-0601.pdf
134 J.-L. De Carufel and J. Desharnais
6. Desharnais, J., Belkhiter, N., Sghaier, S., Tchier, F., Jaoua, A., Mili, A., Zaguia,
N.: Embedding a demonic semilattice in a relation algebra. Theoretical Computer
Science 149 (1995) 333–360
7. Desharnais, J., Mili, A., Nguyen, T.: Refinement and demonic semantics. In Brink,
C., Kahl, W., Schmidt, G., eds.: Relational Methods in Computer Science, Springer
(1997) 166–183
8. Desharnais, J., Möller, B., Struth, G.: Kleene algebra with domain. Technical
Report 2003-7, Institut für Informatik, Augsburg, Germany (2003)
9. Desharnais, J., Möller, B., Struth, G.: Modal Kleene algebra and applications — a
survey. JoRMiCS — Journal on Relational Methods in Computer Science 1 (2004)
93–131
10. Desharnais, J., Möller, B., Struth, G.: Kleene algebra with domain. To appear in
ACM Transactions on Computational Logic (2006)
11. Desharnais, J., Möller, B., Tchier, F.: Kleene under a demonic star. In: AMAST
2000. Volume 1816 of Lecture Notes in Computer Science, Springer (2000) 355–370
12. Desharnais, J., Möller, B., Tchier, F.: Kleene under a modal demonic star. Journal
of Logic and Algebraic Programming, Special issue on Relation Algebra and Kleene
Algebra 66 (2006) 127–160
13. Hoare, C.A.R., Hayes, I.J., Jifeng, H., Morgan, C.C., Roscoe, A.W., Sanders, J.W.,
Sorensen, I.H., Spivey, J.M., Sufrin, B.A.: Laws of programming. Communications
of the ACM 30 (1987) 672–686
14. Hoare, C.A.R., Jifeng, H.: Unifying Theories of Programming. International Series
in Computer Science. Prentice Hall (1998)
15. Höfner, P., Möller, B., Solin, K.: Omega algebra, demonic refinement algebra and
commands. These proceedings
16. Kahl, W.: Parallel composition and decomposition of specifications. Information
Sciences 139 (2001) 197–220
17. Kozen, D.: A completeness theorem for Kleene algebras and the algebra of regular
events. Information and Computation 110 (1994) 366–390
18. Kozen, D.: Kleene algebra with tests. ACM Transactions on Programming Lan-
guages and Systems 19 (1997) 427–443
19. Maddux, R.: Relation-algebraic semantics. Theoretical Computer Science 160
(1996) 1–85
20. McCarthy, J.: A basis for a mathematical theory of computation. In
Braffort, P., Hirschberg, D., eds.: Computer Programming and For-
mal Systems, North-Holland, Amsterdam (1963) 33–70. Available at
http://www-formal.stanford.edu/jmc/basis/basis.html
21. Möller, B.: Lazy Kleene algebra. In Kozen, D., Shankland, C., eds.: Mathematics
of Program Construction. Volume 3125 of Lecture Notes in Computer Science,
Springer (2004) 252–273
22. Solin, K., von Wright, J.: Refinement algebra with operators for enabledness and
termination. In: Mathematics of Program Construction. Lecture Note in Computer
Science, Springer-Verlag (2006). In press
23. Tchier, F., Desharnais, J.: Applying a generalisation of a theorem of Mills to gener-
alised looping structures. In: Colloquium on Science and Engineering for Software
Development, organised in the memory of Dr. Harlan D. Mills, and affiliated to the
21st International Conference on Software Engineering, Los Angeles (1999) 31–38
24. von Wright, J.: Towards a refinement algebra. Science of Computer Programming
51 (2004) 23–45
Topological Representation of Contact Lattices
Abstract. The theory of Boolean contact algebras has been used to rep-
resent a region based theory of space. Some of the primitives of Boolean
algebras are not well motivated in that context. One possible generaliza-
tion is to drop the notion of complement, thereby weakening the algebraic
structure from Boolean algebra to distributive lattice. The main goal of
this paper is to investigate the representation theory of that weaker no-
tion, i.e., whether it is still possible to represent each abstract algebra by
a substructure of the regular closed sets of a suitable topological space
with the standard Whiteheadean contact relation.
1 Introduction
In the classical approach to space the basic primitive is the notion of a point, and
geometric figures are considered to be sets of points. Contrary to this, the region-
based approach to space adopts as its primitives more realistic spatial notions.
In this theory, regions, as abstractions of “solid” spatial bodies, and several basic
relations and operations between regions are considered. Some of the relations
have their origin in mereology, e.g. “part-of” (x ≤ y), “overlap” (xOy), its
dual “underlap” (xU y) and others definable by them. A region based theory
of space extends classical mereology by considering some new relations between
The author gratefully acknowledges support from the Natural Sciences and Engi-
neering Research Council of Canada.
This author was supported by the project NIP-1510 by the Bulgarian Ministry of
Science and Education
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 135–147, 2006.
c Springer-Verlag Berlin Heidelberg 2006
136 I. Düntsch et al.
Let us note that ordinary sets can also be considered as regions in a topological
space endowed with the discrete topology, but such regions are “bad” regions in
the sense that they do not have nice topological properties such as a boundary,
a non-tangential part etc.
One of the main goals of this paper is to generalize the notion of contact
algebras by weakening the algebraic structure from Boolean algebras to distrib-
utive lattices, but to keep the intended semantics of regions to be regular sets in
topological spaces. In other words, we simply remove the operation of Boolean
complement ∗ . From a philosophical point of view, the complement of a region
is not well motivated. If the region a represents a solid body what is then rep-
resented by a∗ ? (One can formulate similar criticisms for (certain aspects) of
some of the other Boolean primitives, which are not discussed here.) Notice that
the definitions of the mereological relations part-of, overlap and underlap do
not depend on the existence of complements. Moreover, in all known definitions
and variations of Boolean contact algebras, the axioms for contact do not rely
on complements. So, studying a theory based on weaker assumptions will re-
veal more deeply the nature of the mereological and mereotopological relations.
The mereo-topological relations usually considered such as “non-tangential part”
x y ↔ aCb∗ and dual contact aČb ↔ a∗ Cb∗ are definable from contact using
complements. In the case of distributive lattices these relations must be primi-
tives. Using this approach a deeper insight into the separate roles of the different
mereological relations and their interactions may be achieved. For instance, in
the Boolean case a certain mereological relation may possess some properties,
which must be postulated separately for distributive lattices. An example is the
property, “U is extensional”, which implies that part-of is definable by U in the
sense that a ≤ b if and only if (∀c)(bU c → aU c). It turns out (Corollary 2) that
this property is exactly the necessary and sufficient property for representing
the contact structure in the strict sense. On the other hand, for Boolean contact
algebras such a representation is always possible, because in that case underlap
is extensional.
The paper is organized as follows. Section 2 introduces the algebraic notions
such as distributive lattices, overlap and underlap, distributive contact alge-
bras, filters and clans. Section 3 provides the topological background and a pure
topological theorem relating extensionality of underlap to the generation of the
topology by means of regular closed sets. It also shows the necessity of the dis-
tributivity of the lattice. In Section 4 we show how to represent U-extensional
distributive contact lattices in a lattice of regular closed sets of some topological
space. As a side result we obtain Cornish’s theorem [3] for U-extensional distrib-
utive lattices. Here we prove also that every distributive contact lattice can be
embedded in a lattice of regular closed sets, so that the image of the lattice gen-
erates the topology in a weaker sense. This is done in two steps. First we show
that every distributive contact lattice can be embedded into a U-extensional con-
tact lattice; then, we simply apply the representation theorem for U -extensional
contact lattices. The last section contains some conclusions and future work.
A standard reference for distributive lattices is [2] and for topology [10].
138 I. Düntsch et al.
Distributive Lattices
Throughout this paper, (D, 0, 1, +, ·) is a bounded distributive lattice; we usu-
ally denote algebras by their base set. The dual lattice Dop of D is the lattice
(D, 1, 0, ·, +) based on the reversed order of D. A sublattice D of D is called
dense (in D) iff for each element 0 = a ∈ D there is an element 0 = b ∈ D with
b ≤ a. A dually dense sublattice of D is a dense sublattice of Dop . We call an
embedding h : D → D dense iff the image h(D ) = {h(a) : a ∈ D } of D is
dense in D. Finally, an element d ∈ D is called meet(join)-irreducible if d = a · b
(d = a + b) implies d = a or d = b for all a, b ∈ D.
We define two relations on D, which are of importance in the sequel:
O is called extensional if
In [15] distributive lattices which satisfy (2.3) are called disjunctive lattices. If D
is a Boolean algebra, then, clearly, both O and U are extensional. Extensionality
of O and U has been considered earlier in the literature, and these results show
that such extensionalities can influence the underlying algebraic structure; in
particular, the following holds for a bounded distributive pseudocomplemented
lattice (i.e., a bounded distributive lattice equipped with an operation ∗ satisfy-
ing a ≤ b∗ iff a · b = 0):
Proof. 1. “⇒”: Suppose that O(a) ⊆ O(b). Then, O(b) = O(a) ∪ O(b) =
O(a + b). Extensionality of O implies that b = a + b, i.e. a ≤ b.
“⇐”: Let O(a) = O(b); then O(a) ⊆ O(b) and O(b) ⊆ O(a), and, by the
hypothesis, a ≤ b and b ≤ a, i.e., a = b.
2. is proved dually.
Later, we use extensionality in the equivalent form given by Lemma 2. If, for
instance, U is extensional then we will say that the lattice is U-extensional.
A subset F of a lattice D is called a filter if x, y ∈ F and z ∈ D implies
x · y ∈ F and x + z ∈ F . We call a filter F of D prime if x + y ∈ F implies x ∈ F
or y ∈ F . Prime(D) is the set of prime filters of D. For each x ∈ D we denote
by hPrime(x) = {F ∈ Prime(D) : x ∈ F }, the set of all prime filters containing
x. Stone’s well known representation theorem now states:
Theorem 3. [2,12]
For later use we observe that hPrime (a) is not necessarily regular closed.
140 I. Düntsch et al.
C0. (∀a)0(−C)a;
C1. (∀a)[a = 0 ⇒ aCa];
C2. (∀a)(∀b)[aCb ⇒ bCa];
C3. (∀a)(∀b)(∀c)[aCb and b ≤ c ⇒ aCc];
C4. (∀a)(∀b)(∀c)[aC(b + c) ⇒ (aCb or aCc)].
Proof. This was proved in [6] for Boolean contact lattices, and an analysis of the
proof shows that it also holds for distributive contact lattices.
Note that each proper prime filter is a clan. The set of all clans of D will be
denoted by Clan(D).
Proof. Suppose that aCb; by the previous Lemma, there are F, G ∈ Prime(D)
such that a ∈ F, b ∈ G, and F × G ⊆ C. Clearly, F ∪ G is a clan containing
both a and b. The converse follows from the definition of clan.
3 Topological Models
is a distributive lattice, called the lattice of closed sets of X: ∅ is the zero ele-
ment and X is the unit element of the lattice and the set inclusion is the lattice
ordering. Fixing C(X) we say that X is endowed with a topology. A subset
a ⊆ X is called open if it is the complement of a closed set. The family Op(X) of
open sets of X is also a lattice with respect to the same operations. A family of
closed sets B(X) is called a closed basis of the topology if every closed set can be
represented as an intersection of sets from B(X). Consequently, X ∈ B(X) and
B(X) is closed under finite unions; hence, (B(X), X, ∪) is an upper semi-lattice.
Finally, a family of closed sets B is called a (closed) sub-basis of the topology if
the set of finite unions of elements of B is a closed basis.
In every topological space one can define the following operations on subsets
a ⊆ X:
1. Cl(a) = {c ∈ C(X) : a ⊆ c} (the closure of a), i.e., the intersection of all
closed setscontaining a.
2. Int(a) = {o ∈ Op(X) : a ⊆ o} (the interior of a), i.e., the union of all open
sets contained in a.
Cl and Int are interdefinable, i.e. Cl(a) = −Int(−a) and Int(a) = −Cl(−a). If
B(X) is a closed base of X, then obviously:
Cl(a) = {b ∈ B(X) : a ⊆ b}.
The next two facts follow from above:
x ∈ Cl(a) iff (∀b ∈ B(X))(a ⊆ b → x ∈ b);
x ∈ Int(a) iff (∃b ∈ B(X))(a ⊆ b and x ∈ b).
A subset a of X is called regular closed if Cl(Int(a)) = a, and, dually, reg-
ular open if Int(Cl(a)) = a (in this paper we will mainly work with regular
closed sets). We denote by RC(X) the family of regular closed sets of X. It is a
well known fact that RC(X) is a Boolean algebra with respect to the following
operations and constants:
0 = ∅, 1 = X, a + b = a ∪ b and a · b = Cl(Int(a ∩ b)).
RC(X) naturally provides a contact relation C defined by aCb iff a ∩ b = ∅. C
is called the standard (or Whiteheadean) contact relation on RC(X).
A topological space is called semi-regular if it has a closed base of regular
closed sets.
Every topological space X can be made semi-regular by defining a new topol-
ogy taking the set RC(X) as a base. It is a well known fact that this new topology
generates the same set of regular closed sets.
The following topological theorem gives necessary and sufficient conditions
for a closed base of a topology to be semi-regular.
Theorem 4. [Characterization theorem for semi-regularity]
Let X be a topological space and B(X) be a closed base for X. Suppose that · is
a binary operation defined on the set B(X) so that (B(X), ∅, X, ∪, ·) is a lattice
(not necessarily distributive). Then we have:
142 I. Düntsch et al.
Proof. 1. (a) → (b). Let B(X) be U -extensional, i.e., for all a, b ∈ B(X) the
following holds:
(∀c ∈ B(X))(a ∪ c = X → b ∪ c = X) → a ⊆ b.
We must show that for every a ∈ B(X), a = Cl(Int(a)). This follows from
the following chain of equivalences:
x ∈ Cl(Int(a))
⇐⇒ (∀b ∈ B(X))(Int(a) ⊆ b → x ∈ b)
⇐⇒ (∀b ∈ B(X))((∀y)(y ∈ Int(a) → y ∈ b) → x ∈ a)
⇐⇒ (∀b ∈ B(X))((∀y)((∃c ∈ B(X))(a ∪ c = X ∧ y ∈ c) → y ∈ b) → x ∈ b)
⇐⇒ (∀b ∈ B(X))((∀y)(∀c ∈ B(X)(a ∪ c = X → y ∈ c ∨ y ∈ b)) → x ∈ b)
⇐⇒ (∀b ∈ B(X))((∀c ∈ B(X))(a ∪ c = X → (∀y)(y ∈ c ∨ y ∈ b) → x ∈ b))
⇐⇒ (∀b ∈ B(X))((∀c ∈ B(X))(a ∪ c = X → b ∪ c = X) → x ∈ b)
⇐⇒ (∀b ∈ B(X))(a ⊆ b → x ∈ b)
⇐⇒ x ∈ Cl(a) = a.
(b) → (a). Let B(X) ⊆ RC(X). In order to show that B(X) is U -extensional
let a, b ∈ B(X) with a ⊆ b and a ∪ c = X. We must show that b ∪ c = X.
The assumption (b) shows Cl(Int(a)) ⊆ b, which implies that there is an
x ∈ Cl(Int(a)) with x ∈ b. We obtain Int(a) ⊆ c implies x ∈ c for all
c ∈ B(X), and, hence, Int(a) ⊆ b. This implies the existence of a y ∈ X
such that y ∈ Int(a) and y ∈ b. Again, we obtain that there is c ∈ B(X)
such that a ∪ c = X and y ∈ c, and, hence, b ∪ c = X.
(b) → (c). Let B(X) ⊆ RC(X). Then for any a · b ∈ B(X) we have a · b =
Cl(Int(a · b)). Since · is a lattice meet we obtain that a · b ⊆ a, a · b ⊆ b,
and, hence, a · b ⊆ a ∩ b. We conclude a · b = Cl(Int(a · b)) ⊆ Cl(Int(a ∩ b)).
For the converse inclusion, we have Cl(Int(a ∩ b)) ⊆ Cl(Int(a)) = a and
Cl(Int(a ∩ b)) ⊆ Cl(Int(b)) = b, and, hence, Cl(Int(a ∩ b)) ⊆ a · b.
(c) → (b). Let Cl(Int(a ∩ b)) = a · b. Then a = a · a = Cl(Int(a ∩ a)) =
Cl(Int(a)), which shows that B(X) ⊆ RC(X).
(b) → (d). Since (b) implies (c) we conclude that (B(X), ∅, X, ∪, ·) is in fact
a sublattice of the Boolean algebra RC(X). In order to show that B(X) is
dually dense in RC(X), let a ∈ RC(X) where a = X. Since a = Cl(Int(a))
Topological Representation of Contact Lattices 143
and B(X) is a basis of the closed sets, there exists c ∈ B(X) such that
Int(a) ⊆ c. Furthermore, a = X implies that there is an x ∈ Cl(Int(a)), and,
hence, x ∈ c, which implies c = X. We conclude a = Cl(Int(a)) ⊆ Cl(c) = c,
which proves the assertion.
(d) → (b). Obvious.
2. This follows immediately since all properties in 1. are equivalent and imply
(a) and (b).
Proof. Let X = Clan(D) be the set of all clans of D and for a ∈ D, suppose
h(a) = {Γ ∈ X : a ∈ Γ }. Using the properties of clans one can easily check
that h(0) = ∅, h(1) = X and that h(a + b) = h(a) ∪ h(b). This shows that the
set B(X) = {h(a) : a ∈ D} is closed under finite unions and can be taken as a
closed basis for a topology of X.
144 I. Düntsch et al.
Notice that Theorem 5 generalizes Theorem 5.1 from [4] to the distributive case.
As a consequence of Theorem 5 we obtain the following corollary, which has
Theorem 2(2) as a special case. Recall that this theorem was already proved in
[3].
Proof. Since the overlap O is a contact relation on D the assertion follows im-
mediately from Theorem 5.
hPrime(x)ĈhPrime(y)
⇐⇒ (∃F, G ∈ Prime(D))[x ∈ F, y ∈ G, and F × G ⊆ C]
⇐⇒ xCy. Lemma 4
Now, we are ready to prove the second main result of this paper.
Proof. The proof can be realized in two steps. First, by Corollary 4, D can
be embedded into a (U -extensional) Boolean contact algebra B. Let e1 be
the corresponding embedding. In the second step, we apply Theorem 5. Con-
sequently, we get an embedding e2 from B into a semi-regular T0-space X.
Now, let h = e2 ◦ e1 , i.e. h(a) = e2 (e1 (a)) and k(a) = e2 (e1 (a)∗ ) (e1 (a)∗ is the
complement (in B) of embedding of a). Then h is as required. Since the set
{e1 (a) : a ∈ D} ∪ {e1 (a)∗ : a ∈ D} generates the Boolean algebra B we get the
last assertion.
Next, we want to discuss the two representation theorems proved in this paper
in more detail.
Discussion. 1. Notice that there is a difference in the usage of topologies in
the topological representation Theorems 5 and 7, and in the Stone topological
representation theorems for distributive lattices and Boolean algebras. In Stone’s
theorem, topology is used to describe the image of the representation up to
isomorphism. In our case, the topology is used to obtain good images of the
elements of the lattice as regions, e.g., they should have a boundary, etc. For
that reason Theorems 5 and 7 are just embedding theorems. In this respect they
146 I. Düntsch et al.
correspond much more to the embedding theorems for distributive lattices and
Boolean algebras in algebras of sets. In our case, sets are replaced by regular
closed sets.
2. If we consider contact structures as abstract “pointless” geometries, the
question is which notion of points is suitable. In distributive contact lattices we
may define two different kinds of points, i.e., prime filters and clans. Prime fil-
ters are in some sense “bad” points with respect to the contact structure. They
correspond to the lattice part of the structure and can provide a representation
by ordinary sets. It is possible to define a contact relation between those sets
by means of the contact relation between points. Such a representation is con-
structed, for instance, in Theorem 6. Clans are “good points” with respect to
the contact structure. They guarantee that the image h(a) of each element of
the lattice is a region, i.e., has a boundary, interior part, etc. The representation
constructed in the proof of Theorem 7 can be interpreted as follows. In a first
step we use “bad” points (prime filters) to represent the lattice as a lattice of
sets (“bad” regions) and lift the contact relation to that structure. As a positive
side-effect we end up with the property of U -extensionality. In the second step,
the “good points” (clans) and U -extensionality are used to construct a repre-
sentation with the intended topological properties. Since prime filters are clans
they are among the “good points” of the second step, but they just appear in
the interior part of the regions.
These informal explanations are reminiscent of considering prime filters and
clans as atoms and molecules – the real points of the real spatial bodies. Similar
ideas have been used in [5] for obtaining topological representation theorems for
discrete versions of region-based theories of space.
dual contact, Č. Last but not least, an open problem is the representation theory
of a further generalization to non-distributive contact structures. First results of
this direction can be found in [9]. Some non-topological representation theorems
for non-distributive lattices may be found in [11]. The main problem here is that
it is not obvious what kind of structure we want to consider as a standard model
of a non-distributive contact lattice. Obviously, this question has to be resolved
before the corresponding representation theory can be developed.
References
1. Allwein, G. and MacCaull, W. (2001). A Kripke semantics for the logic of Gelfand
quantales. Studia Logica, 61:1-56.
2. Balbes, R. and Dwinger, P. (1974). Distributive Lattices. University of Missouri
Press, Columbia.
3. Cornish, W. H. (1974). Crawley’s completion of a conditionally upper continuous
lattice. Pac J Math, 51(2):397-405.
4. Dimov, G. and Vakarelov, D. (2006). Contact algebras and region–based theory of
space: A proximity approach. Fundamenta Informaticae. To appear.
5. Dimov, G. and Vakarelov, D. (2006). Topological Representation of Precontact
algebras. In: W. MacCaull, M. Winter and I. Duentsch (Eds.), Relational Methods
in Computer Science, LNCS No 3929, To appear.
6. Düntsch, I. and Vakarelov, D. (2006). Region–based theory of discrete spaces: A
proximity approach. Discrete Applied Mathematics. To appear.
7. Düntsch, I. and Winter , M. (2005). Lattices of contact relations. Preprint.
8. Düntsch, I. and Winter, M. (2005). A representation theorem for Boolean contact
algebras. Theoretical Computer Science (B), 347:498-512.
9. Düntsch, I. and Winter, M. (2006). Weak contact structures. In: W. MacCaull, M.
Winter and I. Duentsch (Eds.), Relational Methods in Computer Science, LNCS
No 3929:73-82.
10. Engelking, R., General topology, PWN, 1977.
11. MacCaull, W. and Vakarelov, D. (2001). Lattice-based Paraconsistent Logic. In:
W. MacCaull, M. Winter and I. Duentsch (Eds.), Relational Methods in Computer
Science, LNCS No 3929:178-189.
12. Stone, M. (1937). Topological representations of distributive lattices and Brouw-
erian logics. Časopis Pěst. Mat., 67:1-25.
13. Vakarelov, D., Düntsch, I., and Bennett, B. (2001). A note on proximity spaces
and connection based mereology. In Welty, C. and Smith, B., editors, Proceedings
of the 2nd International Conference on Formal Ontology in Information Systems
(FOIS’01), pages 139-150. ACM.
14. Vakarelov, D., Dimov, G.,Düntsch, I. & Bennett, B. A proximity approach to some
region-based theory of space. Journal of applied non-classical logics, vol. 12, No3-4
(2002), 527-559
15. Wallman, H. (1938). Lattices and topological spaces. Math. Ann., 39:112-136.
Betweenness and Comparability Obtained
from Binary Relations
University of Toronto,
Toronto, Ontario, Canada, M5S 1A2
[email protected]
1 Introduction
The study of betweenness relations goes back to at least 1917, when Huntington and
Kline [10] published “Sets of independent postulates for betweenness.” The concept of
betweenness can have rather different meanings – we quote from [10]:
– K is the class of points on a line; AXB means that point X lies between the points
A and B.
– K is the class of natural numbers, AXB means that number X is the product of the
numbers A and B.
– K is the class of human beings; AXB means that X is a descendant of A and an
ancestor of B.
– K is the class of points on the circumference of a circle; AXB means that the arc
A − X − B is less than 180◦.
In the sequel they concentrate on the geometric case. Throughout, B is a ternary relation
on a suitable set, and B(x, y, z) is read as “y lies between x and z.” Quantifier free axioms
are assumed to be universally quantified. The notation #M means that all elements of
M are different.
Both authors gratefully acknowledge support from the Natural Sciences and Engineering Re-
search Council of Canada.
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 148–161, 2006.
c Springer-Verlag Berlin Heidelberg 2006
Betweenness and Comparability Obtained from Binary Relations 149
a+b b+c
a c
b
B(a,b,c)
ab bc
The main difference from the system of [9] is the omission of HK B, which is geared
to linear orders, and the introduction of “degenerate triples” which contain at most two
distinct variables. Thus, their basic system consists only of the symmetry axiom HK A,
and
150 I. Düntsch and A. Urquhart
PS β . B(a, b, c) ∧ B(a, c, b) ⇐⇒ b = c. .
They continue to explore various transitivity conditions and their connection to lattice
properties. For example,
Theorem 1. [14] A lattice L is modular if and only if its betweenness relation satisfies
HK 2
In a parallel development, Tarski proposed an axiom system for first order Euclidean
plane geometry based on two relations: equidistance and betweenness. An overview
of the system and its history can be found in [16], and axiom numbers below refer to
this exposition. His axioms for betweenness are of course very much tailored for the
purpose that he had in mind, and many of these are specific to the geometric context.
We mention those which are of a more general nature:
Ax 6. B(a, b, a) ⇒ a = b. (Identity)
Ax 12. B(a, b, b). (Reflexivity)
Ax 13. a = b ⇒ B(a, b, a). (Equality)
Ax 14. B(a, b, c) ⇒ B(c, b, a). (Symmetry)
Ax 15. B(a, b, c) and B(b, d, c) ⇒ B(a, b, d). (Inner transitivity)
Ax 16. B(a, b, c) and B(b, c, d) and b = c ⇒ B(a, b, d). (Outer transitivity)
Sho B. B(a, b, a) ⇐⇒ a = b.
Sho C. B(a, b, c) ∧ B(b, d, e) =⇒ B(c, b, d) ∨ B(e, b, a).
Altwegg’s work seems to have been largely forgotten – a notable exception being [3] –,
and a search on the Science Citation Index reveals only three citations since 1965. A
case in point is the widely studied area of comparability graphs that are closely con-
nected to betweenness relations; as far as we know, researchers in this area were not
aware of the earlier results. It is one of the aims of this paper to draw attention to
Altwegg’s work, and point out some connections between betweenness relations and
comparability graphs.
2 Notation
The universe of our relations is a non-empty set U. The identity relation on U is denoted
by 1U , or just 1 , if U is understood. For each n ∈ ω , n denotes the set of all k < n. For
M ⊆ U, we abbreviate by #M the statement that all elements of M are different.
A partial order ≤ is called connected if there is a path in ≤ ∪ ≥ from a to b for all
a, b ∈ U. A component of ≤ is a maximally connected subset of <.
Graphs are assumed to be undirected, without loops or multiple edges. In other
words, a graph is just a symmetric irreflexive binary relation on U. A cycle C in G of
length n is a sequence of elements a0 , . . . , an−1 of U such that a0 Ga1 . . . an−2 Gan−1Ga0 ;
repetitions are allowed. A cycle is sometimes called a closed path in G. A cycle is strict,
if #{a0, . . . , an−1 }, and we denote by Cn the strict cycle of length n. A triangular chord
of the cycle C is an edge {ai , ai+2 } of G; here, addition is modulo n. For example, the
graph of Figure 2 contains the cycle d, a, b, e, b, c, f , c, a, d of length 9, which has no
triangular chords [5].
c b
f e
3 Comparability Graphs
If P is a partial order on U, its comparability graph GP is the set of all comparable
proper pairs, i.e. GP = (P ∪ P˘) \ 1 ; here, P˘ is the relational converse of P. A graph G
152 I. Düntsch and A. Urquhart
is called a comparability graph, if G = GP for some partial order P. We denote the class
of comparability graphs by G≤ .
Two partial orders P, Q on the same set U are called equivalent if for all components
MP of P, P MP = Q MP or P MP = Q˘ MP .
P Q
G_P = G_Q
d a b d
b d
c
b c a c
a
Comparability graphs have been investigated since the early 1960s, and we invite the
reader to consult the overview by Kelly [11] for more information. A characterization
of comparability graphs is as follows:
Theorem 2. [4,5]
For example, the graph of Figure 2 is not a comparability graph. It is instructive, and
will be useful later on, to consider the strict partial orders < obtained from strict cycles
of even length n. As these cycles have no triangles, each path in < has length 2, and,
consequently, a0 < a1 > a2 < a3 , > . . . , an−2 < an−1 > a0 , or its converse. see Figure 4.
Conversely, each crown induces a cycle of even length.
In the sequel, let J be the set of all odd natural numbers greater than 3.
σn : (∀x0 , . . . , xn−1 )[x0 Gx1 G . . . Gxn−1 Gx0 =⇒ x0 Gx2 ∨ x1 Gx3 ∨ . . . ∨ xn−2 Gx0 ∨ xn−1 Gx1 ].
Proof. Assume that Σ is a set of sentences with altogether n variables which axioma-
tizes G≤ ; we can assume w.l.o.g. that n = 2r ≥ 4. Let U = n + 1, and G be the cycle on
U of length n + 1, say, 0, 1, 2, 3, . . .n, 0. Then, since G is an odd cycle without triangular
chord, it is not in G≤ .
Suppose that U ⊆ U with |U | = n, w.l.o.g. U = {0, 1, . . ., n − 1}, and H is the
restriction of G to U . Then, H = G \ { n − 1, n
, n, 0
}, and H is the comparability
graph of the crown of Figure 4 with a0 , an−1
removed.
Now, since the satisfaction in U, G
of sentences with at most n variables depends
only on its satisfaction in the n - generated substructures of U, G
, we have U, G
|= Σ .
This contradicts the fact that G ∈ G≤ .
4 Betweenness Relations
BT 0. B(a, a, a).
BT 1. B(a, b, c) ⇒ B(c, b, a).
BT 2. B(a, b, c) ⇒ B(a, a, b)
BT 3. B(a, b, c) and B(a, c, b) ⇒ b = c.
We denote the class of all betweenness relations by B. Observe that at this stage we do
not include any transitivity conditions. Since B is a universal Horn class, it is closed un-
der substructures, and thus, under unions of chains, and also under direct products; note
that for any set M of triples consistent with the axioms, there is a smallest betweenness
relation B containing M, and that B is finite just when M is finite.
With BT 1, BT 2, and BT 3 one can easily prove
Lemma 1. 1. B(a, b, c) implies B(a, b, b), B(b, b, c), and B(b, c, c).
2. B(a, b, a) ⇒ a = b.
154 I. Düntsch and A. Urquhart
e c a B(a,b,c) B(b,c,d)
B(c,d,e) B(d,e,a)
B(a,b,c)
e b
B(d,b,e)
b
a d d c
Fig. 5. A betweenness relation not induced by Fig. 6. A betweenness relation based on a pen-
a binary relation tagon
The construction R −→ BR , as defined in §4, produces a structure satisfying the ax-
ioms of a betweenness relation, defined on the same universe, if R is reflexive and
antisymmetric. The main idea of the present section is to show that there is an inverse
map B −→ RB ; however, the map is not unique, rather it depends on an arbitrary choice
of orientation for each component of the strict comparability graph CB+ . If we produce
a new relation R , from a reflexive, antisymmetric relation R by reversing the direc-
tion of all pairs in R within a fixed component of its comparability graph, then R and
R generate the same betweenness relation. However, if we regard two such relations
as equivalent if they differ from one another only with respect to an arbitrary choice
of orientation for a set of components, then the map B −→ RB determines a relation
that is unique up to equivalence. This notion generalizes the concept of equivalence for
partially ordered sets defined in §3.
We begin by recalling some terminology from Altwegg’s paper [1]. Suppose that B
is a betweenness relation on U. A sequence a0 , a1 , a2 , . . . , an−1 , an is called a C–path in
B, if a0CB a1CB . . .CB an , i.e. every two consecutive entries are comparable. It is called a
B–path, if B(ai , ai+1 , ai+2 ) for all i ≤ n − 2. Every C–path can be made into a B–path
by doubling ai for each 0 < i < n.
Having derived a B–path a0 , a1 , . . . , an from a C–path, it can be reduced in the fol-
lowing way:
1. If ai0 = ai1 = . . . = aik , then remove ai2 , . . . , aik .
2. If ai , ai+1 , ai+2 , ai+3 , ai+1 = ai+2 , and B(ai , ai+1 , ai+3 ), then remove ai+2 .
A completely reduced path is called a chain. Note that by the construction of a chain
a0 , a1 , . . . , an from a B–path, for 0 ≤ i, i + 1, i + 2, i + 3 ≤ n,
(5.1) #{ai , ai+1 , ai+2 } ⇒ B(ai , ai+1 , ai+2 ),
(5.2) ai+1 = ai+2 ⇒ ¬B(ai , ai+1 , ai+3 ).
A chain is called simple, if consecutive entries are different. We also call a, b a simple
chain, if a = b and B(a, a, b). Clearly, for each 0 ≤ k < m ≤ n, ak , ak+1 , . . . , am is again
a simple chain, and the inverse an , . . . , a0 of a (simple) chain a0 . . . , an is also a (simple)
chain.
Definition 1. We define the notion of a B-walk of size n by induction on n:
1. A simple chain is a B-walk of size 1;
2. If W = a, . . . , p, q is a B-walk of size n, and C = q, r . . . , z a simple chain where
¬B(p, q, r), then the sequence a, . . . , p, q, r, . . . , z obtained by identifying the last
element of W with the first element of C is a B-walk of size n + 1.
In other words, a B-walk consists of a sequence obtained by gluing together simple
chains; the gluing consists of identifying their endpoints. If W = a, b, . . . , c, d is a B-
walk, then we say that it is a B-walk from a, b to c, d. A B-walk is even or odd depending
on whether its size is even or odd. The length of a B-walk is its length, considered as a
sequence, so, for example, the B-walk a, b, a, b has length 4. Note that length and size
may differ; indeed, it is the definition of size in the various scenarios that causes GH, Z6 ,
and BT 4 below to look so similar. A B-cycle is a B-walk a0 , a1 . . . , an−1 , an , in which
the first and last two elements are the same (a0 = an ), and ¬B(an−1 , a0 , a1 ).
156 I. Düntsch and A. Urquhart
BT 0. B(a, a, a).
BT 1. B(a, b, c) ⇒ B(c, b, a).
BT 2. B(a, b, c) ⇒ B(a, a, b).
BT 3. B(a, b, c) and B(a, c, b) ⇒ b = c.
BT 4. There are no odd B-cycles.
The fact that BT 4 holds for a betweenness relation BR generated by a reflexive, anti-
symmetric relation R follows easily from Lemma 2. Note that Altwegg’s postulate Z6
is a special case of our BT 4. The more general formulation is needed here because
the transitivity axioms are not available. To illustrate the axiom BT 4, let us consider
two of the betweenness relations from the previous section. In Example 2, the sequence
a, b, e, b, d, b, a is an odd B-cycle. The five simple chains making up the cycle are
a, b | b, e | e, b, d | d, b | b, a.
In the next example (the pentagon of Figure 6), the sequence a, b, c, d, e, a is an odd B-
cycle. For any betweenness relation that is not generated by a reflexive, antisymmetric
relation, there is an odd B-cycle that is a witness to this fact.
Lemma 3. Let B be a betweenness relation satisfying the axiom BT 4 whose strict com-
parability graph CB+ is connected. If {a, b}, {c, d} are distinct edges in this strict graph,
then there is an odd B-walk from a, b to c, d or an odd B-walk from a, b to d, c, but not
both.
Proof. Since the strict comparability graph of B is connected, there is a C-path, and
hence a B-path joining the edges {a, b} and {c, d}. This path (or its inverse) must have
one of the four forms: a, b, . . . , c, d, b, a, . . . , c, d, b, a, . . . d, c or a, b, . . . d, c. By succes-
sive reductions, we can assume that this B-path is in fact a chain. Simplify this chain by
removing immediate repetitions from it. Then the result is a B-walk from a, b to c, d, or
from b, a to c, d, or from b, a to d, c, or from a, b to d, c.
For any e, f , g, h ∈ U, there is an even B-walk from e, f to g, h. if and only if there
is an odd B-walk from e, f to h, g, since if e, f , . . . , g, h is an even B-walk from e, f to
g, h, then e, f , . . . , g, h, g is an odd B-walk from e, f to h, g, and conversely. If the B-walk
Betweenness and Comparability Obtained from Binary Relations 157
joining the edges {a, b} and {c, d} starts with a, b, then we are through. If on the other
hand, it starts with b, a, then there is a B-walk of opposite parity starting with a, b, by
the same argument as above. Hence, there is an odd B-walk from a, b to c, d or an odd
B-walk from a, b to d, c.
It remains to be shown that there cannot be odd walks from a, b to both e, f and
f , e, for any distinct comparable elements e, f . Suppose that W1 = a, b, . . . , e, f and
W2 = a, b, . . . f , e are both odd B-walks. Then the inverse of W2 , W3 = e, f , . . . b, a is
odd. Let W4 be the walk a, b, . . . , e, f , . . . b, a resulting from the identification of the last
two elements of W1 and the first two elements of W3 . Then W4 is an odd B-cycle, con-
tradicting BT 4.
If U is a fixed universe, and R a reflexive, antisymmetric relation defined on U, then
we write B(R) = U, BR
for the betweenness relation defined from R. In the next
definition, we describe the inverse construction.
Definition 2. Let B be a betweenness relation defined on the set U, satisfying the axiom
BT 4, and whose strict comparability graph CB+ is connected. In addition, let {a, b} be
an edge in CB+ . Then R(B, a, b) is the relational structure U, R
defined on U as follows.
For c, d ∈ U, cRd holds if and only if c = d, or {c, d} is an edge in CB+ , and there is an
odd B-walk from a, b to c, d.
It follows from Lemma 3 that R(B, a, b) is reflexive and antisymmetric.
Theorem 5. Let R be a reflexive, antisymmetric relation on U, and let aRb, where a = b.
In addition, assume that the strict comparability graph of B(R) is connected. Then
R(B(R), a, b) = U, R
.
Proof. This follows from Lemmas 2 and 3.
Theorem 6. Let B be a betweenness relation defined on the set U, satisfying the axiom
BT 4, and whose strict comparability graph CB+ is connected. In addition, let {a, b} be
any edge in CB+ . Then B(R(B, a, b)) = U, B
Proof. Let R be the relation defined from B in R(B, a, b). We need to show for any
c, d, e in U, that B(c, d, e) holds if and only if BR (c, d, e).
First, let us assume that B(c, c, d), c = d. Then the edge {c, d} belongs to the com-
parability graph CB+ , so that cRd or dRc holds by Lemma 3, hence BR (c, c, d). Second,
assume that B(c, d, e) holds, where #{c, d, e}. Then {c, d} and {d, e} are edges in CB+ ,
and so cRd or dRc holds, and similarly dRe or eRd. Let us suppose that {c, d} and
{d, e} are not consistently oriented, so that (say) cRd, but eRd. By construction, there
are odd B-walks W1 = a, b, . . . , c, d and W2 = a, b, . . . , e, d. Now consider the B-walk
a, b, . . . , c, d, e, . . . , b, a obtained by identifying the last element of W1 with the first ele-
ment of the inverse of W2 . This walk is an odd B-cycle, contradicting BT 4. It follows
that BR (c, d, e).
For the converse, let us assume that BR (c, d, e), where #(c, d, e), but not B(c, d, e).
By construction, there are odd B-walks W1 = a, b, . . . , c, d and W2 = a, b, . . . , d, e, hence
there is an even B-walk W3 = a, b, . . . , e, d. The B-cycle a, b, . . . , c, d, e, . . . , b, a obtained
by identifying the last element of W1 with the first element of W3 is odd, contradicting
BT 4. Hence, B(c, d, e) must hold, completing the proof.
158 I. Düntsch and A. Urquhart
We can now use the previous results to prove the main theorem.
Proof of Theorem 4: We have already observed that Lemma 2 implies that betweenness
relations generated from reflexive, antisymmetric relations
satisfy BT 4. Conversely,
let B be a betweenness relation satisfying BT 4. Then B = i∈I Bi , where each Bi is the
restriction of B to one of the connected components Ci of CB+ . Each such Bi also satisfies
BT 4. If Ci contains no edges, then the universe Ui of this component is a unit set, and we
can set Ri to be the identity relation on Ui . If Ci contains at least one edge {ai , bi }, then
choose an orientation a i , bi for this edge. By Theorem 6, Bi (R(Bi , ai , bi )) = Ui , Bi
.
Hence, setting R(B) = i∈I R(Bi , ai , bi ), B(R(B)) = U, B
, showing that the class of
betweenness structures satisfying BT 4 is identical with those betweenness structures
arising from reflexive, antisymmetric relations.
Theorem 4 is quite powerful, and we can deduce results for restricted classes of relations
with its help. The next theorem is equivalent to Altwegg’s result of 1950; it shows that
it is sufficient to add the outer transitivity axiom to our basic set of postulates.
BT 0. B(a, a, a).
BT 1. B(a, b, c) ⇒ B(c, b, a).
BT 2. B(a, b, c) ⇒ B(a, a, b)
BT 3. B(a, b, a) ⇒ a = b.
BT 4. There are no odd B-cycles.
BT 5. B(a, b, c) and B(b, c, d) and b = c ⇒ B(a, b, d).
The following can be proved using basically the same construction as in Theorem 3:
Theorem 8. The theories B≤ and BR are not axiomatizable with a finite number of
variables.
Betweenness and Comparability Obtained from Binary Relations 159
6 Algorithmic Aspects
In this section, we give a brief sketch of the algorithmic aspects of betweenness re-
lations. In the case of comparability graphs arising from partially ordered sets, very
efficient algorithms are known for both the recognition problem and colouring prob-
lems. The reader is referred to the work of Golumbic [6,7,8] for descriptions of these
algorithms, and to the article by Möhring [13] for an informative survey of this area.
The characterization given in §5 rests on the fact that if we have assigned orientations
to some edges in the comparability graph of a betweenness relation, then other orien-
tations are forced by the betweenness structure. If we use the notation a → b, a ← b to
symbolize the fact that we have assigned the orientation (a, b) (respectively (b, a)) to
the unordered edge {a, b}, then the following implications hold:
Let us say that a set S of ordered pairs (a, b), a = b, where a, b belong to the universe
of a betweenness relation U, B
, is implicationally closed if it is closed under these
implications (interpreting “a → b" as “(a, b) ∈ S" and “a ← b" as “(b, a) ∈ S") and that
it is an implicational class of B if it is a minimal non-empty implicationally closed
subset of U. If A is an implicational class, then A˘ is the implicational class representing
the result of reversing the orientation of all edges in A. Using this terminology, we
can give an alternative characterization of betweenness relations arising from reflexive,
antisymmetric relations; this is the analogue of a corresponding theorem of Golumbic
for comparability graphs [6].
of generating all of the implicational classes generated by directed edges in the com-
parability graph of the relation, while checking to see whether any overlap ever occurs
between an implication class A and its converse A˘. If we succeed in generating all such
classes without an overlap, then they can be used to orient the edges appropriately, while
if an overlap occurs, then Theorem 9 tells us that the betweenness relation cannot be
generated by a reflexive, antisymmetric relation.
If U, B
is a betweenness relation, and b ∈ U, then the betweenness degree of b is
the number of proper triples (a, b, c) in B; the betweenness degree Δ (B) of the relation
B is the maximum betweenness degree of any element in U. The comparability degree
δ (B) of the relation B is the maximum degree of any vertex of the comparability graph
of B.
Proof. We provide only a brief sketch of this result. The basic ideas of the algorithm
are all to be found in the original paper of Golumbic [6], and the reader can consult this
paper for the details of the implementation.
We initialize the data structures for the algorithm by setting up two arrays of linked
lists, one for the proper triples in B, the other for the edges in the comparability graph.
This takes space O(|B|). Then we start from an arbitrarily selected edge {a, b} in the
comparability graph, and generate the smallest implicational class A containing (a, b),
simultaneously with its converse A˘. The time complexity of the algorithm can be esti-
mated through an upper bound on the time taken to look up the appropriate implication,
when extending the implication classes. Suppose that (a, b) belongs to our class, and
that we wish to see if there is an edge (b, c) or (c, b) that should be added because of
some implication. First, we search for such an edge in the array representing the compa-
rability graph; this takes time O(δ (B)). Second, if we have found such an edge, we look
for an appropriate proper triple with the middle element b; this takes time O(Δ (B)), as-
suming that we have indexed such triples by their middle elements. Consequently, the
entire procedure takes time O((Δ (B) + δ (B))|B|).
References
1. Martin Altwegg. Zur Axiomatik der teilweise geordneten Mengen. Commentarii Mathe-
matici Helvetici, 24:149–155, 1950.
2. Garrett Birkhoff. Lattice Theory. American Mathematical Society, 1948. Second revised
edition.
3. Nico Düvelmeyer and Walter Wenzel. A characterization of ordered sets and lattices via
betweenness relations. Resultate der Mathematik, 46:237–250, 2004.
4. Alain Ghouila-Houri. Caractérisation des graphes non orientés dont on peut orienter les
arêtes de manière à obtenir le graphe d’une relation d’ordre. C.R. Acad. Sci. Paris, pages
1370–1371, 1962.
5. Paul C. Gilmore and Alan J.Hoffman. A characterization of comparability graphs and of
interval graphs. Canadian Journal of Mathematics, 16:539–548, 1964.
6. Martin Charles Golumbic. Comparability graphs and a new matroid. Journal of Combinato-
rial Theory, 22:68–90, 1977.
7. Martin Charles Golumbic. The complexity of comparability graph recognition and coloring.
Computing, 18:199–208, 1977.
8. Martin Charles Golumbic. Algorithmic graph theory and perfect graphs. Academic Press,
New York, 1980.
9. Edward V. Huntington. A new set of postulates for betweenness, with proof of complete
independence. Trans Am Math Soc, 26:257–282, 1924.
10. Edward V. Huntington and J. Robert Kline. Set of independent postulates for betweenness.
Trans. Am. Math. Soc., 18:301–325, 1917.
11. David Kelly. Comparability graphs. In Ivan Rival, editor, Graphs and Order, pages 3–40. D.
Reidel Publishing Company, 1985.
12. Karl Menger. Untersuchungen über die allgemeine Metrik. Mathematische Annalen, 100:75–
163, 1928.
13. Rolf H. Möhring. Algorithmic aspects of comparability graphs and interval graphs. In Ivan
Rival, editor, Graphs and Order, pages 41–101. D. Reidel Publishing Company, 1985.
14. Everett Pitcher and M.F. Smiley. Transitivities of betweenness. Trans. Am. Math. Soc.,
52:95–114, 1942.
15. Marlow Sholander. Trees, lattices, order and betweenness. Proc. Am. Math. Soc., 3(3):369–
381, 1952.
16. Alfred Tarski and Steven Givant. Tarski’s system of geometry. The Bulletin of Symbolic
Logic, 5(2):175–214, 1998.
Relational Representation Theorems for General
Lattices with Negations
1 Introduction
A relational semantics for the class of lattices was developed by Urquhart in
[9]. These semantics were extended by Allwein and Dunn in [1] to include other
operations on lattices such as negation, fusion and implication. In particular,
they obtained a relational semantics for lattices with a De Morgan negation.
In this paper we shall develop relational semantics for lattices with other nega-
tions, namely, Heyting negation, pseudo-complement and ortho-negation. The
relational structures are extensions of Urquhart’s relational structures for lat-
tices, which are of the type X, 1 , 2 where 1 and 2 are quasi-orders on X
satisfying: x 1 y and x 2 y ⇒ x = y. The complex algebra of such a relational
structure is a bounded lattice with universe consisting of ‘-closed’ subsets of X
Supported by the NRF-funded bilateral Poland/RSA research project GUN 2068034:
Logical and Algebraic Methods in Formal Information Systems.
E.O. acknowledges a partial support from the INTAS project 04-77-7080 Algebraic
and Deduction Methods in Non-classical Logic and their Applications to Computer
Science.
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 162–176, 2006.
c Springer-Verlag Berlin Heidelberg 2006
Relational Representation Theorems for General Lattices with Negations 163
2 Negations
(N2) a ≤ ¬b ⇔ b ≤ ¬a (Quasi-minimal)
(N1) a ≤ b ⇒ ¬b ≤ ¬a (Preminimal)
164 W. Dzik, E. Orlowska, and C. van Alten
(N2’) a ≤ ¬¬a
(Int) a ≤ b and a ≤ ¬b ⇒ a ≤ x for all x (Intuitionistic)
(DeM) ¬¬a ≤ a (De Morgan).
Note that from (N2) one may derive (N2’) and (N1) as follows. From ¬a ≤ ¬a
we get a ≤ ¬¬a. If a ≤ b, then a ≤ ¬¬b hence ¬b ≤ ¬a. Conversely, (N2) is
derivable from (N1) and (N2’) as follows. If a ≤ ¬b, then ¬¬b ≤ ¬a hence b ≤ ¬a.
Thus, in any partially ordered set with ¬ the following implications hold:
(Int) a ∧ (¬a) = 0.
1) M denotes the variety of all De Morgan lattices, i.e., bounded lattices with
De Morgan negation, that is, negation satisfying (N2) and (DeM).
2) W denotes the variety of all weakly pseudo-complemented lattices, that is,
bounded lattices with Heyting negation, that is, satisfying (N1), (N2’) and
(Int) (weak intuitionistic negation). The quasi-identity
x ≤ ¬y ⇒ x ∧ y = 0
is satisfied but the converse is not; see the Example 2.3 below.
3) O denotes the variety of all ortholattices, i.e., bounded lattices with ortho-
negation, that is, negation satisfying (N2), (DeM) and (Int);
4) P denotes the class of all pseudo-complemented lattices, i.e., bounded lat-
tices with pseudo-complement (intuitionistic negation), that is, satisfying
the quasi-identities
x ∧ y = 0 ⇔ x ≤ ¬y.
Both (N2) and (Int) are derivable from the above quasi-identities. Thus, each of
the four classes we consider satisfies (N1), (N2), (N2’), ¬0 = 1 and ¬1 = 0.
(a) O⊂M
(b) O⊂W
(c) O = M ∩ W
= P
(d) P ⊂ W, P
⊂ M.
Relational Representation Theorems for General Lattices with Negations 165
The proper inclusions are shown by examples below. In each case, 1 is the top
element and 0 is the bottom element with ¬1 = 0 and ¬0 = 1.
Example 2.1. Let L 3 be a lattice of 3-valued L
ukasiewicz logic with 1, 0, a, where
3 is in M, but (Int) is false: ¬a ∧ a = a
= 0, so L
¬a = a. Then L 3 is neither in
W nor in P nor in O.
Example 2.2. Let N5 be the ”pentagon”, a lattice with 5 elements 1, 0, a, b, c,
where a < b and c is incomparable with a, b. Let ¬a = ¬b = c and ¬c = b. Then
N5 is in W and in P, but, since (DeM) is false: a < b = ¬¬a, it is neither in M
nor in O.
Example 2.3. Let M02 be a lattice with 6 elements 1, 0, a, b, c, d,, where a, b, c, d
are incomparable. Let ¬a = b, ¬b = a, ¬c = d and ¬d = c. Then M02 is in M,
in O and in W but not in P as the quasi-identity: x ∧ y = 0 ⇒ x ≤ ¬y fails.
This shows that a weakly pseudo-complemented lattice need not be pseudo-
complemented.
We shall need the following lemma. We use (X] to denote the downward closure
of a subset X of a lattice and [X) for the upward closure.
Lemma 2.1. Let W = W, ∧, ∨, ¬, 0, 1 be a lattice with negation satisfying
(N2) (equivalently, (N1) and (N2’)) and let F be a proper filter of W . Then
(a) (¬F ] is an ideal of W ,
(b) ¬a ∈ F iff a ∈ (¬F ], for all a ∈ W .
If, in addition, W satisfies (Int), then
(c) F ∩ (¬F ] = ∅.
Proof. (a) By definition, (¬F ] is downward closed. Suppose that a, b ∈ (¬F ].
Then a ≤ ¬c and b ≤ ¬d for some c, d ∈ F . Since F is a filter, c ∧ d ∈ F
so ¬(c ∧ d) ∈ ¬F . From (N1) one easily derives (¬c) ∨ (¬d) ≤ ¬(c ∧ d) hence
a ∨ b ≤ ¬(c ∧ d) so a ∨ b ∈ (¬F ]. Thus, (¬F ] is an ideal.
(b) If ¬a ∈ F then ¬¬a ∈ (¬F ] hence a ∈ (¬F ] by (N2’). If a ∈ (¬F ] then
a ≤ ¬b for some b ∈ F , so b ≤ ¬a by (N2) hence ¬a ∈ F .
(c) Suppose there is some a ∈ F ∩ (¬F ]. Then a ≤ ¬b for some b ∈ F , so
b ≤ ¬a. Thus, ¬a ∈ F hence 0 = a ∧ (¬a) ∈ F which is a contradiction.
3 Preliminaries
We give here the necessary background on the relational representation of non-
distributive lattices in the style of Urquhart [9]. (see also [4] and [8]). The rep-
resentations of non-distributive lattices with negations is built on top of this
framework following the methods of Allwein and Dunn [1].
Let X be a non-empty set and let 1 and 2 be two quasi-orders on X. The
structure X, 1 , 2 is called a doubly ordered set iff it satisfies:
(∀x, y)((x 1 y and x 2 y) ⇒ x = y). (1)
166 W. Dzik, E. Orlowska, and C. van Alten
(A) = {x ∈ X : (∀y ∈ X) x 1 y ⇒ y ∈
/ A} (2)
r(A) = {x ∈ X : (∀y ∈ X) x 2 y ⇒ y ∈
/ A}. (3)
Lemma 3.1. [4],[8] Let X, 1 , 2 be a doubly ordered set. Then, for A ⊆ X,
(a) l(A) is 1 –increasing and r(A) is 2 –increasing,
(b) if A is 1 –increasing, then A ⊆ l(r(A)),
(c) if A is 2 –increasing, then A ⊆ r(l(A)).
Lemma 3.2. [9] Let X, 1 , 2 be a doubly ordered set. Then the mappings l
and r form a Galois connection between the lattice of 1 –increasing subsets of
X and the lattice of 2 –increasing subsets of X. In particular, for every 1 –
increasing set A and 2 –increasing set B,
A ⊆ l(B) iff B ⊆ r(A).
A ∧C B = A ∩ B (4)
A ∨C B = l(r(A) ∩ r(B)) (5)
0C = ∅ (6)
1C = X. (7)
(x1 , x2 ) 1 (y1 , y2 ) iff x1 ⊆ y1
(x1 , x2 ) 2 (y1 , y2 ) iff x2 ⊆ y2
(x1 , x2 ) (y1 , y2 ) iff (x1 , x2 ) 1 (y1 , y2 ) and (x1 , x2 ) 2 (y1 , y2 ).
x 1 y iff x1 ⊆ y1 ,
x 2 y iff x2 ⊆ y2 ,
N (x) = (¬x2 , ¬x1 ), where ¬A = {¬a : a ∈ A} for any A ⊆ W .
Lemma 4.1. If W ∈ M then X(W ) ∈ RM .
Proof. We have already observed that X(W ), 1 , 2 is a doubly ordered set.
Condition (M1) follows from (DeM) and conditions (M2) and (M3) are imme-
diate. Thus, we need only show that N is a function from X(W ) to X(W ).
That is, if x = (x1 , x2 ) ∈ X(W ), we must show that N (x) = (¬x2 , ¬x1 ) is a
maximal disjoint filter-ideal pair. Let a1 , a2 ∈ x2 hence ¬a1 , ¬a2 ∈ ¬x2 . Then
(¬a1 ) ∧ (¬a2 ) = ¬(a1 ∨ a2 ) and a1 ∨ a2 ∈ x2 , hence ¬x2 is closed under ∧. If
¬a1 ≤ b then ¬b ≤ ¬¬a1 = a1 , so ¬b ∈ x2 . Then b = ¬¬b ∈ ¬x2 , so ¬x2 is
upward closed. Thus, ¬x2 is a filter. Similarly, ¬x1 is an ideal. Also, ¬x1 and ¬x2
can be shown disjoint using the implication: ¬b = ¬c ⇒ b = c and the fact that
x1 and x2 are disjoint. To show maximality, suppose y ∈ X(W ) and ¬x1 ⊆ y2
and ¬x2 ⊆ y1 . Then ¬¬x1 ⊆ ¬y2 , i.e., x1 ⊆ ¬y2 and also x2 ⊆ ¬y1 . Since
(¬y2 , ¬y1 ) is a disjoint filter-ideal pair, the maximality of x implies x1 = ¬y2
and x2 = ¬y1 . Thus, ¬x1 = y2 and ¬x2 = y1 so N (x) is maximal.
If X = X, 1 , 2 , N ∈ RM , then X, 1 , 2 is a doubly ordered set, so we
may consider its complex algebra L(X), ∧C , ∨C , 0C , 1C , where L(X) is the set
of -stable sets and the operations are as in (4–7). We extend this definition
to define the complex algebra of X as L(X) = L(X), ∧C , ∨C , ¬C , 0C , 1C ,
where for A ∈ L(X),
¬C A = {x ∈ X : N (x) ∈ r(A)}.
Lemma 4.2. If X ∈ RM then L(X) ∈ M.
Proof. We need to show that ¬C A is -stable, i.e., r(¬C A) = ¬C A, and that
L(X) satisfies (N2) and (DeM). Since and r form a Galois connection, by
Lemma 3.2, we have ¬C A ⊆ r(¬C A) iff r(¬C A) ⊆ r(¬C A). For the converse,
suppose that for every y, if x 1 y then y ∈
/ r(¬C A) and assume, to the contrary,
that x ∈/ ¬ A. Then N (x) ∈
C
/ r(A) and there is z such that N (x) 2 z and
z ∈ A. It follows by (M3) and (M1) that x 1 N (z) and hence, by the above
assumption, N (z) ∈ / r(¬C A). Thus, there is t such that N (z) 2 t and t ∈ ¬C A.
By application of N and (M3) and (M1), we have that z 1 N (t) and N (t) ∈
r(A), in particular N (t) ∈/ A. But z ∈ A and A is 1 –increasing, as A = r(A),
hence N (t) ∈ A, a contradiction.
To prove (N2), suppose that A ⊆ ¬C B. Then, for every x, if x ∈ A then
N (x) ∈ r(B). Suppose that x ∈ B and, to the contrary, that x ∈ / ¬C A, i.e.,
N (x) ∈
/ r(A), in which case N (x) 2 y and y ∈ A, for some y. By (M3) and (M1),
x 1 N (y) hence N (y) ∈ B since B = r(B) is 1 –increasing. But also y ∈ ¬C B,
by the assumption, and N (y) ∈ r(B), a contradiction since B ∩ r(B) = ∅.
To prove (DeM), let x ∈ ¬C ¬C A, hence N (x) ∈ r(¬C A). We show that
x ∈ (r(A)) which equals A since A is -closed. Let x ≤1 w. Then N (x) ≤2
N (w), by (M2), hence N (w) ∈ r(¬C A) since r(¬C A) is ≤2 –increasing. Thus,
N (w) ∈/ ¬C A, i.e., w = N (N (w)) ∈/ r(A). Thus, x ∈ (r(A)) = A.
Relational Representation Theorems for General Lattices with Negations 169
The above lemmas imply that if W ∈ M, then the complex algebra of the
canonical frame of W , namely L(X(W )), is in M as well.
h(a) = {x ∈ L(X(W )) : a ∈ x1 }
is an embedding of the lattice part of W into L(X(W )). We need only show
that h(¬a) = ¬C h(a) for all a ∈ W , where
h(¬a) = {x : ¬a ∈ x1 }
and
Recall that O denotes the variety of all ortholattices, which are bounded lattices
W = W, ∧, ∨, ¬, 0, 1 with a unary operation ¬ which satisfies (N2), (DeM)
and (Int) (hence also (N1) and (N2’)). That is, the negation in an ortholattice
is both De Morgan and Heyting. We extend the relational representation for De
Morgan lattices to ortholattices
We will denote by RO the class of all relational structures of type X = X, 1
, 2 , N , where X, 1 , 2 is a doubly ordered set and N : X → X is a function
such that (M1), (M2) and (M3) hold, as well as
x 1 y iff x1 ⊆ y1
x 2 y iff x2 ⊆ y2
N (x) = (¬x2 , ¬x1 ), where ¬A = {¬a : a ∈ A}.
170 W. Dzik, E. Orlowska, and C. van Alten
x 1 y iff x1 ⊆ y1
x 2 y iff x2 ⊆ y2
xCy iff (∀a)(¬a ∈ x1 ⇒ a ∈ y2 ).
Relational Representation Theorems for General Lattices with Negations 171
¬C A = {x ∈ X : ∀y(xCy ⇒ y ∈
/ A)}.
Let x ∈ r(¬C A) and suppose that xCy for some y. By (FC4), there exists s
such that
x 1 s and yCs.
Then, since x ∈ r(¬C A) and x 1 s, there exists t such that
s 2 t and (∀u)(tCu ⇒ u ∈
/ A)).
172 W. Dzik, E. Orlowska, and C. van Alten
Thus, (∀u)(z 2 u ⇒ u ∈
/ A)), so we have found the required z, so x ∈
¬C r(A) = ¬C A.
Proof. To see that (N1) holds, suppose A, B are -stable sets and A ⊆ B. Let
x ∈ ¬C B. Then, xCy implies y ∈/ B hence also y ∈
/ A, so x ∈ ¬C A.
To see that (N2’) holds, note that
Let x ∈ A and suppose that xCy for some y. By (FC4), there exists z such that
yCz and x 1 z. Since A is 1 –increasing and x ∈ A, we have z ∈ A. Thus, the
required z exists, showing that x ∈ ¬C ¬C A.
To see that (Int) holds, let A be an -stable set and suppose there exists
x ∈ A ∩ ¬C A. By (FC3), there exists a y such that xCy and x 1 y. Since
x ∈ ¬C A and xCy we have y ∈ / A. But x ∈ A and A is -stable, hence 1 –
increasing, so x 1 y implies y ∈ A, a contradiction.
h(a) = {x ∈ L(X(W )) : a ∈ x1 }
is an embedding of the lattice part of W into L(X(W )). We need only show
that h(¬a) = ¬C h(a) for all a ∈ W , where
h(¬a) = {x : ¬a ∈ x1 }
and
¬C h(a) = {x : xCy ⇒ a ∈
/ y1 }.
First, let x ∈ h(¬a) and suppose that xCy. Then, ¬a ∈ x1 so a ∈ y2 hence
a∈/ y1 , as required.
Next, let x ∈ ¬C h(a) and suppose that ¬a ∈ / x1 . Then a ∈ / (¬x1 ] (by
Lemma 2.1(b)) so [a), (¬x1 ] forms a disjoint filter-ideal pair which we can
extend to a maximal one, say y. If ¬c ∈ x1 then c ∈ (¬x1 ] so xCy hence a ∈
/ y1 ,
a contradiction since [a) ⊆ y1 .
Morgan lattices to include the condition (O) to deal with the identity (Int). How-
ever, since ortholattices may also be considered as extensions of weakly pseudo-
complemented lattices by the identity (DeM), one would expect a connection
between the two representations.
Let X = X, 1 , 2 , N be a relational structure in RO , i.e., X satisfies (M1),
(M2), (M3) and (O). We shall show that X is equivalent to a relational structure
X, 1 , 2 , C in RW . For this we need to define a relation C in terms of N , 1
and 2 . To find the connection, consider the canonical frame of an ortholattice
W . This is X(W ), 1 , 2 , N , where
x 1 y iff x1 ⊆ y1 ,
x 2 y iff x2 ⊆ y2 ,
N (x) = (¬x2 , ¬x1 ).
Since W is also a weakly pseudo-complemented lattice it also has a canonical
frame in RW , which is X(W ), 1 , 2 , C where 1 and 2 are as above and
xCy iff (∀a)(¬a ∈ x1 ⇒ a ∈ y2 ).
In the presence of both (Int) and (DeM) we claim that the following relationship
holds between N and C:
xCy ⇔ N (x) 2 y.
¬a ∈ ¬x1 ⇔ a ∈ x1 ⇔ ¬¬a ∈ x1 ⇒ ¬a ∈ y2 ,
xCy iff N (x) 2 y.
Then one may check that the conditions (FC1–FC5) all hold for this C. In
particular, (FC1) and (FC2) are straightforward and (FC3) is just (O). For
(FC4), take z = N (y) and, for (FC5), take z = N (t). Thus, X, 1 , 2 , N is
equivalent to a relational structure X, 1 , 2 , C ∈ RW . Moreover, the complex
algebra obtained from either of these relational structures is the same. To see
this we need only check that the two definitions of ¬C coincide:
{x ∈ X : N (x) ∈ r(A)}
= {x ∈ X : N (x) 2 y ⇒ y ∈/ A}
= {x ∈ X : xCy ⇒ y ∈ / A}.
Thus, the definition of ¬C in the De Morgan case coincides with the definition
of ¬C in the Heyting case.
174 W. Dzik, E. Orlowska, and C. van Alten
A natural question arising from the above remark is whether a relational se-
mantics for ortholattices can be obtained in the style of the relational structures
in RW . That is, what conditions should be added to (FC1–FC5) in order to
ensure that the complex algebra of such a structure also satisfies (DeM), i.e., so
that it’s an ortholattice.
7 Pseudo-complemented Lattices
Recall that the P denotes the class of all pseudo-complemented lattices, which
are bounded lattices W = W, ∧, ∨, ¬, 0, 1 with a unary operation ¬ satisfying:
a∧b=0 ⇔ a ≤ ¬b.
a ≤ ¬b ⇔ a ∧ b = 0 ⇔ b ∧ a = 0 ⇔ b ≤ ¬a.
Thus, (N1), (N2’) and ¬0 = 1 are also derivable and, from a ≤ ¬¬a, we get
a ∧ ¬a = 0, i.e., (Int) is derivable. So we also have ¬1 = 0. The class W of
weakly pseudo-complemented lattices is easily seen to satisfy the quasi-identity
a ≤ ¬b ⇒ a ∧ b = 0,
x 1 y iff x1 ⊆ y1
x 2 y iff x2 ⊆ y2
xCy iff (∀a)(¬a ∈ x1 ⇒ a ∈ y2 ).
Proof. We need only show that (FC6) holds. So, let x, y ∈ X(W ) such that
xCy. Consider the filter generated by x1 ∪ y1 , denoted F i(x1 ∪ y1 ). We claim
Relational Representation Theorems for General Lattices with Negations 175
A∩B = ∅ ⇒ A ⊆ ¬C B = {x ∈ X : xCy ⇒ y ∈
/ B}.
References
1. Allwein, G., Dunn, J.M.: Kripke models for linear logic. J. Symb. Logic 58 (1993)
514–545.
2. Dunn, J.M.: Star and Perp: Two Treatments of Negation. In J. Tomberlin (ed.),
Philosophical Perspectives (Philosophy of Language and Logic) 7 (1993) 331–357.
3. Dunn, J.M., Hardegree, G.M.: Algebraic Methods in Philosophical Logic. Clarendon
Press, Oxford (2001).
4. Düntsch, I., Orlowska, E., Radzikowska, A.M.: Lattice–based relation algebras and
their representability. In: de Swart, C.C.M. et al (eds), Theory and Applications
of Relational Structures as Knowledge Instruments, Lecture Notes in Computer
Science 2929 Springer–Verlag (2003) 234–258.
176 W. Dzik, E. Orlowska, and C. van Alten
5. Düntsch, I., Orlowska, E., Radzikowska, A.M., Vakarelov, D.: Relational represen-
tation theorems for some lattice-based structures. Journal of Relation Methods in
Computer Science JoRMiCS vol.1, Special Volume, ISSN 1439-2275 (2004) 132–160.
6. Orlowska, E., Radzikowska, A.M.: Information relations and operators based on
double residuated lattices. In de Swart, H.C.M. (ed), Proceedings of the 6th Seminar
on Relational Methods in Computer Science RelMiCS’2001 (2001) 185–199.
7. Orlowska, E., Radzikowska, A.M.: Double residuated lattices and their applications.
In: de Swart, H.C.M. (ed), Relational Methods in Computer Science, Lecture Notes
in Computer Science 2561 Springer–Verlag, Heidelberg (2002) 171–189.
8. Orlowska, E., Vakarelov, D. Lattice-based modal algebras and modal logics. In:
Hajek, P., Valdes, L., Westerstahl, D. (eds), Proceedings of the 12th International
Congress of Logic, Methodology and Philosophy of Science, Oviedo, August 2003,
Elsevier, King’s College London Publication (2005) 147–170.
9. Urquhart, A.: A topological representation theorem for lattices. Algebra Universalis
8 (1978) 45–58.
Monotonicity Analysis Can Speed Up
Verification
1 Introduction
The analysis of relational specifications has gained a lot of acceptance with the
growing interest on the Alloy specification language [6]. Alloy’s syntax and se-
mantics are based on a first-order relational logic. Due to the automatic analysis
capabilities offered by the Alloy tool [8], Alloy has become widely accepted by
the community interested in automatic software engineering. The Alloy Ana-
lyzer wisely transforms Alloy specifications in which domains are bounded to a
fix scope, into propositions that are later fed to SAT-solvers such as Berkmin [3],
MChaff [10], or Relsat [1]. A different approach was followed in the definition of
the language NP [4], where the supporting automatic analysis tool (Nitpick [4])
searched for relation instances for the variables that would violate a provided
assertion.
In this paper we depart from the SAT-solving techniques of Alloy, and go back
to generation of instances for the relational variables as in Nitpick. We show
in this paper that for a class of problems that frequently arise when writing
relational specifications, a strategy based on monotonicity analysis outperforms
the analysis performed by Alloy using SAT-solving. This shows that the SAT-
solvers employed in Alloy do not profit from monotonicity information after the
original model is transformed by Alloy to a SAT problem.
In order to show how well this strategy performs when compared to SAT-
solving in Alloy, we will introduce a relational specification language (called
REL) and present ReMo, a tool that implements the strategy. Nevertheless,
this paper is not about relational specification languages design, and it is quite
And CONICET.
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 177–191, 2006.
c Springer-Verlag Berlin Heidelberg 2006
178 M.F. Frias et al.
possible that a reader might have her own preferences about how to define such
language. Similarly, the paper is not about tool design, being ReMo a prototype
tool that implements the pruning strategy subject of this paper.
The paper is organized as follows. In Section 2 we give a brief description of
the Alloy language, as well as of REL, the relational language we will analyze.
In Section 3 we discuss the analysis strategy. In Section 4 we present ReMo,
the tool that implements our strategy, and compare ReMo’s performance with
that of Alloy. Finally, in Section 5 we present our conclusions and proposals for
further work.
The above described analysis has been implemented by the Alloy Analyzer
[8], a tool that incorporates state-of-the-art SAT solvers in order to search for
counterexamples of specifications.
Monotonicity Analysis Can Speed Up Verification 179
Operations for transitive closure and transposition are only defined for binary
relations.
expr ::=
iden (identity)
form ::=
| expr + expr (union)
expr in expr (inclusion)
| expr & expr (intersection)
|!form (neg)
| expr − expr (difference)
| form && form (conj)
|∼ expr (transpose)
| form || form (disj)
| expr.expr (composition)
| all v : type | form (univ)
| +expr (transitive closure)
| some v : type | form (exist)
| {v : t | form} (set former)
| V ar
The Alloy language provides, on top of the kernel, different idioms that greatly
simplify writing models. Let us consider, as a means to introduce notation, a
simple example based on memories. In order to specify a data type for memories,
data types for data and addresses are especially necessary. We can then start by
indicating the existence of disjoint sets (of atoms) for data and addresses, which
in Alloy are specified using signatures.
sig Addr { } sig Data { }
These are basic signatures. We do not assume any special properties regarding
the structure of data and addresses.
With data and addresses already defined, we can now specify what constitutes
a memory. A possible way of defining memories is by saying that a memory
consists of a partial mapping from addresses to data values:
sig Memory {
map: Addr -> lone Data }
The multiplicity marking lone in signature Memory establishes that for each
address a there must be zero or one data related.
Once data is defined, it is possible to define predicates and operations, or
constrain models adding facts (axioms), as follows.
pred NotFull (m : Memory) {
some a : Addr | no (a -> Data) }
In predicate NotFull, expression “no R” means that R is empty. Also, for
unary relations (sets) S1 and S2 , S1 ->S2 = { a, b : a ∈ S1 ∧ b ∈ S2 }.
180 M.F. Frias et al.
fact WriteTwice {
all m : Memory, a : Addr, d : Data |
Write(m,a,d) = Write(Write(m,a,d),a,d) }
Once the model is specified, assertions about the model can be written down
and then be analyzed with the Alloy tool. The following flawed assertion (flawed
in the sense that there exist counterexamples) asserts that writing twice in a
memory address does not modify the memory.
assert ClearVsTwice {
all m : Memory, a : Addr, d : Data |
m = Write(Write(m,a,d),a,d)
}
expr ::=
1t (universal with type t)
| idt (identity with type t)
form ::= | expr + expr (union)
expr <= expr (inclusion) | expr & expr (intersection)
| !form (neg) | [expr, expr] (fork)
| form && form (conj) | −expr (complement)
| form || form (disj) |∼ expr(transpose)
| expr · expr (composition)
| +expr (transitive closure)
| V ar (variable)
Notice that REL formulas are Boolean combinations of equations. In the forth-
coming sections, we will need the following result proved in [11, p. 26].
is a total ordering, called the lexicographic ordering. For the traversal from the
bottom, notice that any given relation R has, as immediate successors, relations
of the form R ∪ { a, b } (a ∈ A, b ∈ B), where for every a , b ∈ R, a, b >
a , b .
Once the successors of a given a relation are defined, if we are given two
different successors of R, namely R ∪ { a, b } and R ∪ { c, d }, an ordering
between them is induced by the ordering between a, b and c, d. Therefore,
in order to traverse the lattice, the successors of R will be visited according
to this ordering. Figure 3 shows an example. Each matrix represents a relation
contained in the set { 0, 1 } × { 0, 1 }. A dark square in position i, j means pair
i, j belongs to the relation modeled by the matrix. The number attached to
each matrix gives the traversal ordering.
In order to traverse the lattice in a descending order, we define the predecessors
of a relation R as the set { −P : P is a successor of − R }. Notice that since P
is a successor of −R, −R ⊆ P , and therefore, −P ⊆ R. Also, predecessors differ
from the parent relation in that the latter has one extra pair. The ordering in
which relations are visited in the descending traversal follows from the ordering
in the ascending traversal. Figure 3 shows an example of a descending traversal.
Let us consider now an equation of the form t(R) = 1 in which variable R
is negative in t. As a running example, consider the following equations stating
that R is a total (cf. (2)) functional (cf. (1)) relation. Notice that R is negative
in (1).
− ((∼ R) · R) + Id = 1 (1)
R·1=1 (2)
Monotonicity Analysis Can Speed Up Verification 183
2 10 14 16
4 6 8 12
3 7 9 11 13 15
3 7 9 11 13 15
4 6 8 12
2 10 14 16
After the \domains keyword, we list the domains in the specification, as well as
a range (lower and upper bound) for their size. After the \constants keyword,
we list the relational variables in the specification, as well as their type (in
Fig. 4 all the relational variables are to be interpreted as binary relations on
the corresponding domains). Under the \identities keyword, we list those
identity relations that will be required in the specification, together with their
type. Similarly, we declare empty and universal relations under the appropriate
keywords. Finally, the specification contains the axioms and the assertions to be
verified.
ReMo receives a specification as input and transforms, using the translation
defined by Thm. 1, each axiom and assertion to an equation of the form T = 1.
It then computes the monotonicity of each relational variable, and determines a
traversal order for each one. Values for the variables are then generated for the
variables according to the traversal order, and the pruning strategy is applied
whenever possible. ReMo deals with binary relations. These were implemented
using Reduced Ordered Binary Decision Diagrams (ROBDDs) [12].
In the remaining part of this section we present several problems for which
we provide Alloy and REL specifications. We then analyze running times for
different domain sizes. In order to obtain the running times we have used a
personal computer with an AMD 3200, 64 bits processor; 2GB, dual channel
memory, and Linux Mandriva 10.2, 64 bits. We compared ReMo with the Alloy
Analyzer, Version 3.0 Beta, March 5, 2005.
Notice that functions play an important role in specification. This is how Alloy,
for instance, provides idioms for declaring relations as being functional. Using
multiplicity idioms it is possible to define a relation as being a total injective
function (cf. (3)).
identity on all the domains (untyped). Therefore, the Alloy tool will look for
some total injective function. Similarly, the property we use in ReMo is also
false. While this looks as a simple problem, it is worthwhile to mention that
total injective functions lay somewhere in the middle of the lattice. That is,
they are neither close to the top of the lattice (those relations tend not to be
functional or injective) nor close to the bottom of the lattice (where relations
tend not to be total). Therefore, there is a real challenge in efficiently getting to
them.
Since in equations (4) and (5) F is negative, ReMo will traverse the lattice
from the bottom for this variable. In Table 1 we present the running times for
various scopes for ReMo, and for the same scopes for Alloy using the SAT-solvers
it provides.
Total orderings are frequently used in specifications. For instance, they come
within the library of standard modules for Alloy, and are commonly used when
specifying properties of executions of operations [9].
In this section we will deal with two different problems involving total order-
ings.
Finding a Total Ordering. Total orderings are binary relations O that are
reflexive (id ⊆ O), antisymmetric (O& ∼ O = id), transitive (O.O ⊆ O) and
total (O+ ∼ O = 1). This is an interesting problem because, as in the case for
functions, these orderings lay somewhere in the middle of the lattice (relations
near the top of the lattice are not antisymmetric, and those near the bottom
are not total). Given a total ordering, there is a relation next that relates each
element to its successor. Given a total order O, next (known as the Hasse–
diagram for O) is defined by the equation
Is it true that this relation is functional, injective and total? The answer, con-
firmed by both Alloy and ReMo, is “No”. While next is functional and injective,
it is not total. The last element in the ordering does not belong to the domain
of next.
The specifications in Alloy and ReMo are given in Figs. 6 and 7.
After applying the translation from Thm. 1 to the axioms not involving next
(because those involving next will always be undefined), we obtain the following
equations:
− id + O = 1 (7)
−(O&(∼ O)) + id = 1 (8)
−(O.O) + O = 1 (9)
O + (∼ O) = 1 (10)
Since O is positive in (7) and (10), negative in (8) and undefined in (9), a
descending traversal of the lattice is chosen for variable O.
In Table 2 we show that, for this problem, ReMo outperforms the Alloy An-
alyzer both in running time and memory consumption.
188 M.F. Frias et al.
module totalOrder
sig elem{ }
sig order {
O : elem -> elem,
next : elem -> elem
}{
elem<:iden in O
O&(∼O) in iden
O.O in O
O+(∼O) = elem->elem
next = (O - (elem<:iden)) -
((O - (elem<:iden)).(O - (elem<:iden)))
}
assert nextTotInjFun {
all o:order |
∼(o.next).(o.next) in elem<:iden &&
(o.next).∼(o.next) in elem<:iden &&
(o.next).(elem<:univ) = elem<:univ
}
\domains \axioms
elem[scope:scope] id <= O
O&(∼O) <= id
\constants O.O <= O
O < elem*elem O+(∼O) = 1
next < elem*elem next = O & (-id) & (-((O&(-id)).(O&(-id))))
\identities \properties
id elem*elem ∼next.next <= id
\universals next.∼next <= id
1 elem*elem next.1 = 1
Table 2. Running times and memory consumption for total orderings in Alloy and
ReMo
scope Berkmin MChaff RelSat ReMo
10 00:02 00:03 00:03 00:00
15 00:03 00:05 00:13 00:00
20 00:09 00:11 00:45 00:01
25 00:25 00:21 02:07 00:04
30 01:16 01:37 05:37 00:07
35 01:44 02:54 10:11 00:19
40 02:46 05:38 19:20 00:32
45 06:31 04:05 34:51 00:55
50 10:50 16:02 crashed 01:23
Memory 481.3 MB 231.4 MB 307.2 MB 81.9 MB
Testing a Valid Property. Since testing a valid property will not produce
any counterexamples, all total orderings will be visited. Notice that there are
n! different total orderings on a n elements set. Notice also that given a total
ordering O on the set elem, any other total ordering O can be obtained from O
via a permutation of elem. As an instance, for elem = { 1, 2, 3, 4, 5 }, let
Variable reqs appears positive in (11) and (12), and negative in (13) and (15).
Variable allocs appears positive in (11) and (12), and negative in (13), (14)
and (16). Therefore, variable allocs is assigned an ascending traversal. Since the
number of times reqs is positive (or negative) is greater than zero, it is reasonable
1
Even fork is invariant under permutations of the atomic domains. It is not invariant
under arbitrary permutations of the field of a fork algebra.
190 M.F. Frias et al.
to use one of the proposed traversals. Since in this case there is a tie between the
number of times reqs is positive and the number of times it is negative, ReMo
chooses (by default) an ascending traversal.
In Table 3 we present the running times and memory consumption for Alloy
and ReMo.
2. Since Alloy does not profit so far from monotonicity information as ReMo
does, it seems necessary to improve the analysis capabilities of Alloy in this
direction.
References
1. Bayardo Jr, R. J. and Schrag R. C., Using CSP look-back techniques to solve real
world SAT instances. In Proc. of the 14th National Conf. on Artificial Intelligence,
pp. 203–208, 1997.
2. Frias M. F., Lopez Pombo C. G., Baum G. A., Aguirre N. and Maibaum T. S. E.,
Reasoning About Static and Dynamic Properties in Alloy: A Purely Relational
Approach, to appear in ACM TOSEM, in press.
3. Goldberg E. and Novikov Y., BerkMin: a Fast and Robust SAT-Solver, in proceed-
ings of DATE-2002, 2002, pp. 142–149.
4. Jackson, D. Nitpick: A checkable specification language. In Proceedings of the Work-
shop on Formal Methods in Software Practice (San Diego, Calif., Jan. 1996).
5. Jackson D., Automating First-Order Relational Logic, in Proceedings of SIGSOFT
FSE 2000, pp. 130-139, Proc. ACM SIGSOFT Conf. Foundations of Software En-
gineering. San Diego, November 2000.
6. Jackson D., Alloy: A Lightweight Object Modelling Notation, ACM Transactions
on Software Engineering and Methodology (TOSEM), Volume 11, Issue 2 (April
2002), pp. 256-290.
7. Jackson D., Jha S. and Damon C. A., Isomorph-Free Model Enumeration: A New
Method for Checking Relational Specifications, ACM TOPLAS, Vol. 20, No. 2, 1998,
pp. 302–343.
8. Jackson D., Schechter I. and Shlyakhter I., Alcoa: the Alloy Constraint Analyzer,
Proceedings of the International Conference on Software Engineering, Limerick,
Ireland, June 2000.
9. Jackson, D., Shlyakhter, I., and Sridharan, M., A Micromodularity Mechanism.
Proc. ACM SIGSOFT Conf. Foundations of Software Engineering/European Soft-
ware Engineering Conference (FSE/ESEC ’01), Vienna, September 2001.
10. Moskewicz M., Madigan C., Zhao Y., Zhang L. and Malik S., Chaff: Engineering
an Efficient SAT Solver, 39th Design Automation Conference (DAC 2001), Las
Vegas, June 2001.
11. Tarski, A. and Givant, S.,A Formalization of Set Theory without Variables, A.M.S.
Coll. Pub., vol. 41, 1987.
12. Wegener I., Branching Programs and Binary Decision Diagrams, SIAM Discrete
Mathematics and Applications, SIAM, 2000.
Max-Plus Convex Geometry
1 Introduction
The max-plus semiring, Rmax , is the set R ∪ {−∞} equipped with the addition
(a, b) → max(a, b) and the multiplication (a, b) → a + b. To emphasize the
semiring structure, we write a ⊕ b := max(a, b), ab := a + b, ¼ := −∞ and ½ := 0.
Many classical notions have interesting max-plus analogues. In particular,
semimodules over the max-plus semiring can be defined essentially like linear
spaces over a field. The most basic examples consist of subsemimodules of func-
tions from a set X to Rmax , which are subsets V of RX max that are stable by
max-plus linear combinations, meaning that:
λu ⊕ μv ∈ V (1)
for all u, v ∈ V and for all λ, μ ∈ Rmax . Here, for all scalars λ and functions
u, λu denotes the function sending x to the max-plus product λu(x), and the
max-plus sum of two functions is defined entrywise. Max-plus semimodules have
many common features with convex cones. This analogy leads to define max-plus
convex subsets V of RX max by the requirement that (1) holds for all u, v ∈ V and
for all λ, μ ∈ Rmax such that λ ⊕ μ = ½. The finite dimensional case, in which
X = {1, . . . , n}, is already interesting.
Semimodules over the max-plus semiring have received much attention [1],
[2], [3], [4], [5]. They are of an intrinsic interest, due to their relation with lattice
and Boolean matrix theory, and also with abstract convex analysis [6]. They
arise in the geometric approach to discrete event systems [7], and in the study
of solutions of Hamilton-Jacobi equations associated with deterministic optimal
control problems [8,4,9,10]. Recently, relations with phylogenetic analysis have
been pointed out [11].
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 192–206, 2006.
c Springer-Verlag Berlin Heidelberg 2006
Max-Plus Convex Geometry 193
In this paper, we survey the basic properties of max-plus linear spaces, convex
sets, and polyhedra, emphasizing the analogies with classical convex geometry.
We shall present a synopsis of the results of [5,12], including separation theo-
rems, as well as new results, mostly taken from the recent works [13,14]. Some
motivations are sketched in the next section. The reader interested specifically
in applications to computer science might look at the work on fixed points prob-
lems in static analysis of programs by abstract interpretation [28], which is briefly
discussed at the end of Section 2.3.
2 Motivations
2.1 Preliminary Definitions
Before pointing out some motivations, we give preliminary definitions. We re-
fer the reader to [5] for background on semirings with an idempotent addition
(idempotent semirings) and semimodules over idempotent semirings. In partic-
ular, the standard notions concerning modules, like linear maps, are naturally
adapted to the setting of semimodules.
Although the results of [5] are developed in a more general setting, we shall
here only consider semimodules of functions. A semimodule of functions from a
set X to a semiring K is a subset V ⊂ K X satisfying (1), for all u, v ∈ V and
λ, μ ∈ K . When X = {1, . . . , n}, we write K n instead of K X , and we denote
by ui the i-th coordinate of a vector u ∈ K n .
We shall mostly restrict our attention to the case where K is the max-plus
semiring, Rmax , already defined in the introduction, or the completed max-plus
semiring, Rmax , which is obtained by adjoining to Rmax a +∞ element, with the
convention that (−∞) + (+∞) = −∞. Some of the results can be stated in a
simpler way in the completed max-plus semiring.
The semirings Rmax and Rmax are equipped with the usual order relation.
Semimodules of functions with values in one of these semirings are equipped
with the product order.
We say that a set of functions with values in Rmax is complete if the supremum
of an arbitrary family of elements of this set belongs to it. A convex subset V of
RXmax is defined like a convex subset of Rmax , by requiring that (1) holds for all
u, v ∈ V and λ, μ ∈ Rmax such that λ ⊕ μ = ½.
If X is a set of functions from X to Rmax , we define the semimodule that
it generates, span X , to be the set of max-plus linear combinations of a finite
number of functions of X . In other words, every function f of span X can be
written as
span X . Thus, every function of span X can be written in the form (2), if we
allow I to be infinite, with λi ∈ R ∪ {±∞}, and if replace the “max” by a “sup”.
Then, we say that f is an infinite linear combination of the functions gi .
Ax = λx ,
words “convex”, “linear”, “affine”, and “polyhedra”, and the notation “·” for
the scalar product of Rn , have their usual meaning.
Recall that the Legendre-Fenchel transform of a map f from Rn to R ∪ {±∞}
is the map f from Rn to R ∪ {±∞} defined by:
x → min aj + xj , (4)
1≤j≤n
where a1 , . . . , an are numbers in R ∪ {+∞} that are not all equal to +∞. Of
course, topical maps also include max-plus linear maps sending Rn to R, which
can be represented in a dual way. The following observation was made by Rubi-
nov and Singer [23], and, independently by Gunawardena and Sparrow (personal
communication).
PV ◦ PV = PV .
with the convention that (+∞) − (+∞) = (−∞) − (−∞) = +∞. Of course,
PV (u) = (u/v)v. More generally, we have the following elementary result.
Proposition 1 ([5]). If V is a complete subsemimodule of RX
max generated by
a subset X ⊂ RX
max , we have
δH (u, v) := ((u/v)(v/u))− ,
This property does not uniquely define PV (u), even up to an additive constant,
because the balls in Hilbert’s projective metric are not “strictly convex”.
Example 2. Consider
⎡ ⎤ ⎡ ⎤
0 0 0 −∞ 0.5 1
A = ⎣1 −2 0 0 1.5⎦ , u=⎣ 0 ⎦ . (5)
0 3 2 0 3 0.5
198 S. Gaubert and R. Katz
Since PV (u) < u, u does not belong to V . The vector u and its projection PV (u)
are represented in Figure 1 (right). The ball in Hilbert’s metric centered at point
u the boundary of which contains PV (u) is represented in light grey. The fact
that PV (u) is one of the points of V that are the closest to u (Theorem 1) is
clear from the figure.
e3 e3
p2
p3 p5
p4
PV (u)
u
p1
e1 e2 e1 e2
Fig. 1. A max-plus semimodule (left). A point u, its projection PV (u), and the corre-
sponding ball in Hilbert’s projective metric (right).
4 Separation Theorems
We first state separation theorems for complete subsemimodules and complete
convex subsets of RX max , since the results are simpler in this setting. Then, we
shall see how the completeness assumptions can be dispensed with.
Several max-plus separation theorems have appeared in the literature: the
first one is due to Zimmermann [2]. Other separation theorems appeared in [30],
Max-Plus Convex Geometry 199
in [5,12], and, in the polyhedral case, in [11,31]. We follow here the approach
of [5,12], in which the geometrical interpretation is apparent.
We call half-space of RXmax a set of the form
H = {v ∈ RX
max | a · v ≤ b · v} , (6)
where a, b ∈ RX
max and · denotes here the max-plus scalar product:
− −
H = {v ∈ RX
max | (PV (u)) · v ≤ u · v} (7)
(PV (u))− · v = u− · v
H = {v ∈ RX
max | a · v ⊕ c ≤ b · v ⊕ d} , (8)
where a, b ∈ RX
max and c, d ∈ Rmax . For any complete convex subset C of Rmax
X
e3
PV (u)
u
H
e1 e2
Fig. 2. Separating half-space
− − −
max | (QC (u)) · v ⊕ (νC (u)) ≤ u · v ⊕ ½}
H = {v ∈ RX (9)
to +∞, and the scalars c, d in (8) can be equal to +∞. However, we have the
following refinement of Theorem 2 in the case of closed cones of Rnmax , which is
slightly more precise than the result stated in [12], and can be proved along the
same lines.
Theorem 3. Let V be a closed cone of Rnmax and let u ∈ Rnmax \ V . Then, there
exist a ∈ Rnmax and disjoint subsets I and J of {1, . . . , n} such that the half-space
of Rnmax
H = {v ∈ Rnmax | ⊕i∈I ai vi ≤ ⊕j∈J aj vj } (10)
contains V and not u.
Further information on half-spaces can be found in [31].
Example 4. The restriction to R3max of the separating half-space constructed in
Example 3 can be rewritten as:
H = {v ∈ R3max | 1v1 ≤ v2 ⊕ (−0.5)v3 } ,
which is clearly of the form (10). To illustrate the technical difficulty concerning
supports, which is solved in [12] and in Theorem 3 above, let us separate the
point u = [−∞, 1, 0]T from the semimodule V of Example 2. We have PV (u) =
3
[−∞, 0, 0]T , and the half-space of Rmax defined in Theorem 2 is
3
{v ∈ Rmax | (+∞)v1 ⊕ v2 ⊕ v3 ≤ (+∞)v1 ⊕ (−1)v2 ⊕ v3 } .
Note that due to the presence of the +∞ coefficient, the restriction of this half-
space to R3max is not closed. The proof of [12] and of Theorem 3 introduces a
finite perturbation of u, for instance, w = [, 1, 0]T , where is a finite number
sufficiently close to −∞ (here, any < 0 will do), and shows that the restriction
n
to Rnmax of the half-space of Rmax constructed in the universal separation theorem
(Theorem 2), which is a half-space of Rnmax , separates u from V . For instance,
when = −1, we obtain PV (w) = [−1, 0, 0]T , which gives the half-space of R3max
H = {v ∈ R3max | 1v1 ⊕ v3 ≥ v2 }
containing V and not u.
Corollary 3. Let C ⊂ Rnmax be a closed convex set and let u ∈ Rnmax \ C . Then,
there exist a ∈ Rnmax , disjoint subsets I and J of {1, . . . , n} and c, d ∈ Rmax ,
with cd = ¼, such that the affine half-space of Rnmax
H = {v ∈ Rnmax | ⊕i∈I ai vi ⊕ c ≤ ⊕j∈J aj vj ⊕ d}
contains C and not u.
This is proved by applying the previous theorem to the point (u, ½) ∈ Rn+1
max and
to the following closed cone:
V := clo({(vλ, λ) | v ∈ C , λ ∈ Rmax }) ⊂ Rn+1
max .
v = λu ⊕ μw =⇒ v = u or v = w .
v = u ⊕ w, u, w ∈ V =⇒ v = u or v = w .
V = cone (ext-g (V )) .
If C is a closed convex subset of Rnmax , it can be checked that the recession cone
is independent of the choice of v ∈ C , and that it is closed.
C = co(ext(C )) ⊕ rec(C ) .
co(X ) ⊕ cone (Y )
Note that our notion of max-plus polyhedra is more general than the notion of
tropical polyhedra which is considered in [11]: tropical polyhedra can be identi-
fied with sets of the form cone (Y ) where Y is a finite set of vectors with only
finite entries.
Finally, we shall consider the max-plus analogues of simplicial convex cones,
which are related to the important notion of regular matrix. We need to work
again in the completed max-plus semiring, Rmax , rather than in Rmax . We say
n×p
that a matrix A ∈ Rmax is regular if it has a generalized inverse, meaning that
p×n
there exists a matrix X ∈ Rmax such that A = AXA. Regularity is equivalent
to the existence of a linear projector onto the cone generated by the columns (or
the rows) of A, see [34,35].
n
A finitely generated subsemimodule V of Rmax is a complete lattice, in which
n
the supremum coincides with the supremum in Rmax , and the infimum of any
subset of V is the greatest lower bound of this subset that belongs to V . The
following result extends a theorem proved by Zaretski [36] (see [37, Th. 2.1.29]
for a proof in English) in the case of the Boolean semiring.
n×p
Theorem 7 ([14]). A matrix A ∈ Rmax is regular if and only if the subsemi-
n
module of Rmax generated by its columns is a completely distributive lattice.
Of course, a dual statement holds for the rows of A. In fact, we know that the
semimodule generated by the rows of A is anti-isomorphic to the semimodule
generated by its columns [5].
As an illustration of Theorem 5, consider the closed convex set C ⊂ R2max
depicted in Figure 5. We have ext(C ) = {a, b, c, d, e}, where a = [5, 2]T , b =
204 S. Gaubert and R. Katz
x2
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
6 0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
e
5 1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
4 C
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
3 d 1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
2 1111111111111111111111111111111111
0000000000000000000000000000000000
c a
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
0000000000000000000000000000000000
1111111111111111111111111111111111
1 0000000000000000000000000000000000
b
1 2 3 4 5 6 x1
x2 x2
6 11111111111111111111111111111111111111
00000000000000000000000000000000000000
6
00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000000000000000000000
11111111111111111111111111111111111111
e 00000000000000000000000000000000000000
11111111111111111111111111111111111111
5
5 11111111111111111111
00000000000000000000 00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000
11111111111111111111
00000000000000000000
11111111111111111111 00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000
11111111111111111111 00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000000000000000000000
11111111111111111111111111111111111111
4 00000000000000000000
11111111111111111111 00000000000000000000000000000000000000
11111111111111111111111111111111111111
4
00000000000000000000
11111111111111111111
co(ext(C )) 00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000
11111111111111111111
00000000000000000000
11111111111111111111 00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000
11111111111111111111 00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000000000000000000000
11111111111111111111111111111111111111
3 00000000000000000000
11111111111111111111 00000000000000000000000000000000000000
11111111111111111111111111111111111111
3
d 11111111111111111111
00000000000000000000
00000000000000000000
11111111111111111111 Rec(C )
00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000
11111111111111111111 00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000
11111111111111111111
00000000000000000000
11111111111111111111 00000000000000000000000000000000000000
11111111111111111111111111111111111111
2 00000000000000000000
11111111111111111111
c a 00000000000000000000000000000000000000
11111111111111111111111111111111111111
2
00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000
11111111111111111111
00000000000000000000
11111111111111111111 00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000
11111111111111111111 00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000000000000000000000
11111111111111111111111111111111111111
1 00000000000000000000
11111111111111111111 00000000000000000000000000000000000000
11111111111111111111111111111111111111
1
00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000000000000000000000
11111111111111111111111111111111111111
b 00000000000000000000000000000000000000
11111111111111111111111111111111111111
x1 00000000000000000000000000000000000000
11111111111111111111111111111111111111
1 2 3 4 5 6 x1
1 2 3 4 5 6 00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000000000000000000000
11111111111111111111111111111111111111
00000000000000000000000000000000000000
11111111111111111111111111111111111111
000000000000000000000000000000000000000
111111111111111111111111111111111111111
000000000000000000000000000000000000000
111111111111111111111111111111111111111
Fig. 4. The sets co(ext(C )) and rec(C ) of Theorem 5 for the unbounded convex set
depicted in Figure 5
[4, 0]T , c = [3, 2]T , d = [1, 3]T , e = [2, 5]T , and rec(C ) = cone [0, 1]T , [2, 0]T .
Then,
C = co {a, b, c, d, e} ⊕ cone [0, 1]T , [2, 0]T
by Theorem 5. The sets co(ext(C )) and rec(C ) are depicted in Figure 4. The cone
rec(C ) is a distributive lattice, since the infimum and supremum laws coincide
2
with those of Rmax . Note that any n × 2 or 2 × n matrix is regular, in particular,
finitely generated cones which are not distributive lattices cannot be found in
dimension smaller than 3, see [34].
Acknowledgment. We thank the referees for their careful reading and for their
suggestions.
Max-Plus Convex Geometry 205
References
1. Korbut, A.A.: Extremal spaces. Dokl. Akad. Nauk SSSR 164 (1965) 1229–1231
2. Zimmermann, K.: A general separation theorem in extremal algebras. Ekonom.-
Mat. Obzor 13(2) (1977) 179–201
3. Maslov, V.P., Samborskiı̆, S.N.: Idempotent analysis. Volume 13 of Advances in
Soviet Mathematics. Amer. Math. Soc., Providence (1992)
4. Litvinov, G., Maslov, V., Shpiz, G.: Idempotent functional analysis: an algebraic
approach. Math. Notes 69(5) (2001) 696–729
5. Cohen, G., Gaubert, S., Quadrat, J.P.: Duality and separation theorems
in idempotent semimodules. Linear Algebra and Appl. 379 (2004) 395–422
arXiv:math.FA/0212294.
6. Rubinov, A.M.: Abstract convexity and global optimization. Kluwer (2000)
7. Cohen, G., Gaubert, S., Quadrat, J.: Max-plus algebra and system theory: where
we are and where to go now. Annual Reviews in Control 23 (1999) 207–219
8. Kolokoltsov, V.N., Maslov, V.P.: Idempotent analysis and applications. Kluwer
Acad. Publisher (1997)
9. Fathi, A.: Weak KAM theorem in Lagrangian dynamics. Lecture notes, preliminary
version (Cambridge University Press, to appear.) (2005)
10. Akian, M., Gaubert, S., Walsh, C.: The max-plus Martin boundary.
arXiv:math.MG/0412408 (2004)
11. Develin, M., Sturmfels, B.: Tropical convexity. Doc. Math. 9 (2004) 1–27 (Erratum
pp. 205–206).
12. Cohen, G., Gaubert, S., Quadrat, J., Singer, I.: Max-plus convex sets and functions.
In Litvinov, G.L., Maslov, V.P., eds.: Idempotent Mathematics and Mathematical
Physics. Contemporary Mathematics. American Mathematical Society (2005) 105–
129. Also ESI Preprint 1341, arXiv:math.FA/0308166.
13. Gaubert, S., Katz, R.: The Minkowski theorem for max-plus convex sets.
arXiv:math.GM/0605078 (2006)
14. Cohen, G., Gaubert, S., Quadrat, J.P.: Regular matrices in max-plus algebra.
Preprint (2006)
15. Katz, R.D.: Max-plus (A,B)-invariant spaces and control of timed discrete event
systems. (2005) E-print arXiv:math.OC/0503448, to appear in IEEE-TAC.
16. Akian, M., Gaubert, S., Walsh, C.: Discrete max-plus spectral theory. In Litvi-
nov, G.L., Maslov, V.P., eds.: Idempotent Mathematics and Mathematical Physics.
Contemporary Mathematics. American Mathematical Society (2005) 19–51. Also
ESI Preprint 1485, arXiv:math.SP/0405225.
17. Akian, M., Bapat, R., Gaubert, S.: Max-plus algebras. In Hogben, L., Brualdi, R.,
Greenbaum, A., Mathias, R., eds.: Handbook of Linear Algebra. Chapman & Hall
(2006)
18. Akian, M., Gaubert, S., Kolokoltsov, V.: Solutions of max-plus linear equations and
large deviations. In: Proceedings of the joint 44th IEEE Conference on Decision
and Control and European Control Conference ECC 2005 (CDC-ECC’05), Seville,
Espagne (2005) arXiv:math.PR/0509279.
19. Walsh, C.: The horofunction boundary of finite-dimensional normed spaces. To
appear in the Math. Proc. of the Cambridge. Phil. Soc., arXiv:math.GT/0510105
(2005)
20. Rockafellar, R.T.: Convex analysis. Princeton University Press Princeton, N.J.
(1970)
206 S. Gaubert and R. Katz
21. Akian, M., Gaubert, S., Kolokoltsov, V.N.: Set coverings and invertibility of func-
tional Galois connections. In Litvinov, G.L., Maslov, V.P., eds.: Idempotent Math-
ematics and Mathematical Physics. Contemporary Mathematics. American Math-
ematical Society (2005) 19–51 Also ESI Preprint 1447, arXiv:math.FA/0403441.
22. Gaubert, S., Gunawardena, J.: The Perron-Frobenius theorem for homogeneous,
monotone functions. Trans. of AMS 356(12) (2004) 4931–4950
23. Rubinov, A.M., Singer, I.: Topical and sub-topical functions, downward sets and
abstract convexity. Optimization 50(5-6) (2001) 307–351
24. Gunawardena, J.: From max-plus algebra to nonexpansive maps: a nonlinear theory
for discrete event systems. Theoretical Computer Science 293 (2003) 141–167
25. Dhingra, V., Gaubert, S., Gunawardena, J.: Policy iteration algorithm for large
scale deterministic games with mean payoff. Preprint (2006)
26. Cochet-Terrasson, J., Gaubert, S., Gunawardena, J.: A constructive fixed point
theorem for min-max functions. Dynamics and Stability of Systems 14(4) (1999)
407–433
27. Gaubert, S., Gunawardena, J.: The duality theorem for min-max functions. C. R.
Acad. Sci. Paris. 326, Série I (1998) 43–48
28. Costan, A., Gaubert, S., Goubault, E., Martel, M., Putot, S.: A policy iteration
algorithm for computing fixed points in static analysis of programs. In: Proceedings
of the 17th International Conference on Computer Aided Verification (CAV’05).
Number 3576 in LNCS, Edinburgh, Springer (2005) 462–475
29. Akian, M., Gaubert, S., Lakhoua, A.: The max-plus finite element method for
solving deterministic optimal control problems: basic properties and convergence
analysis. arXiv:math.OC/0603619 (2006)
30. Samborskiı̆, S.N., Shpiz, G.B.: Convex sets in the semimodule of bounded functions.
In: Idempotent analysis. Amer. Math. Soc., Providence, RI (1992) 135–137
31. Joswig, M.: Tropical halfspaces. In: Combinatorial and computational geometry.
Volume 52 of Math. Sci. Res. Inst. Publ. Cambridge Univ. Press, Cambridge (2005)
409–431
32. Butkovic, P., Schneider, H., Sergeev, S.: Generators, extremals and bases of max
cones. arXiv:math.RA/0604454 (2006)
33. Helbig, S.: On Caratheodory’s and Kreı̆n-Milman’s theorems in fully ordered
groups. Comment. Math. Univ. Carolin. 29(1) (1988) 157–167
34. Cohen, G., Gaubert, S., Quadrat, J.: Linear projectors in the max-plus algebra.
In: Proceedings of the IEEE Mediterranean Conference, Cyprus, IEEE (1997)
35. Cohen, G., Gaubert, S., Quadrat, J.P.: Projection and aggregation in maxplus
algebra. In Menini, L., Zaccarian, L., Abdallah, C.T., eds.: Current Trends in
Nonlinear Systems and Control, in Honor of Petar Kokotovic and Turi Nicosia.
Systems & Control: Foundations & Applications. Birkhauser (2006)
36. Zaretski, K.: Regular elements in the semigroup of binary relations. Uspeki Mat.
Nauk 17(3) (1962) 105–108
37. Kim, K.: Boolean Matrix Theory and Applications. Marcel Dekker, New York
(1982)
Lazy Semiring Neighbours and Some
Applications
1 Introduction
Chop-based interval temporal logics like ITL [5] and IL [3] are useful for spec-
ification and verification of safety properties of real-time systems. However, as
it is shown in [15], these logics cannot express all desired properties, like (un-
bounded) liveness properties. Hence Zhou and Hansen proposed Neighbourhood
Logic (NL) [14], a first-order interval logic with extra atomic formulas. In [7]
NL has been embedded and extended into the algebraic framework of semirings.
But neither NL nor the algebraic version handle intervals with infinite length.
Therefore we transfer the neighbour concept to lazy semirings [10]. This pro-
vides a combination of NL and interval logic with infinite intervals on a uniform
algebraic basis. Surprisingly, lazy semiring neighbours are not only useful for the
extension of NL; they occur in different situations and structures.
The paper is structured into two main parts. The first one presents the alge-
braic theory. Therefore we recapitulate the basic notions, like lazy semirings, in
Section 2. In Section 3 we define domain and codomain and give some important
properties. In the next section we introduce and discuss lazy semiring neighbours
and boundaries. That section contains the main contribution from a theoretical
point of view. The second part presents three different applications for the the-
ory. It starts by extending Neighbourhood Logic to intervals with infinite length
in Section 5. Afterwards, in Section 6, we show that in the algebraic character-
isation of the branching time temporal logic CTL∗ of [11], the existential and
universal path quantifiers E and A correspond to lazy semiring neighbours. The
last application is presented in Section 7 and shows how to transfer lazy semiring
neighbours to the algebraic model of hybrid systems presented in [8]; some of
them guarantee liveness, others non-reachability, i.e., a form of safety.
This research was supported by DFG (German Research Foundation).
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 207–221, 2006.
c Springer-Verlag Berlin Heidelberg 2006
208 P. Höfner and B. Möller
2 Algebraic Foundations
A lazy semiring (L-semiring or left semiring) is a quintuple (S, +, ·, 0, 1) where
(S, +, 0) is a commutative monoid and (S, ·, 1) is a monoid such that · is left-
distributive over + and left-strict , i.e., 0·a = 0. A lazy semiring structure is also
at the core of process algebra frameworks. The lazy semiring is idempotent if +
is idempotent and · is right-isotone, i.e., b ≤ c ⇒ a · b ≤ a · c, where the natural
order ≤ on S is given by a ≤ b ⇔df a + b = b. Left-isotony of · follows from its
left-distributivity. Moreover, 0 is the ≤-least element and a + b is the join of a
and b. Hence every idempotent L-semiring is a join semilattice. A semiring (for
clarity sometimes also called full semiring) is a lazy semiring in which · is also
right-distributive and right-strict. An L-semiring is Boolean if it is idempotent
and its underlying semilattice is a Boolean algebra. Every Boolean L-semiring
has a greatest element .
A lazy quantale is an idempotent L-semiring that is also a complete lattice
under the natural order with · being universally disjunctive in its left argument.
A quantale is a lazy quantale in which · is universally disjunctive also in its right
argument. Following [1], one might also call a quantale a standard Kleene algebra.
A lazy quantale is Boolean if it is right-distributive and a Boolean L-semiring.
An important lazy semiring (that is even a Boolean quantale) is REL, the
algebra of binary relations over a set under relational composition.
To model assertions in semirings we use the idea of tests as introduced into
Kleene algebras by Kozen [9]. In REL a set of elements can be modelled as a
subset of the identity relation; meet and join of such partial identities coincide
with their composition and union. Generalising this, one defines a test in a (left)
quantale to be an element p ≤ 1 that has a complement q relative to 1, i.e.,
p + q = 1 and p · q = 0 = q · p. The set of all tests of a quantale S is denoted
by test(S). It is not hard to show that test(S) is closed under + and · and has
0 and 1 as its least and greatest elements. Moreover, the complement ¬p of a
test p is uniquely determined by the definition. Hence test(S) forms a Boolean
algebra. If S itself is Boolean then test(S) coincides with the set of all elements
below 1. We will consistently write a, b, c . . . for arbitrary semiring elements and
p, q, r, . . . for tests.
With the above definition of tests we deviate slightly from [9], in that we do
not allow an arbitrary Boolean algebra of sub identities as test(S) but only the
maximal complemented one. The reason is that the axiomatisation of domain to
be presented below forces this maximality anyway (see [2]).
In the remainder we give another important example of an L-semiring (espe-
cially with regard to temporal logics like CTL∗ and hybrid systems). It is based
on trajectories (cf. e.g. [12]) that reflect the values of the variables over time and
was introduced in [8].
Let V be a set of values and D a set of durations (e.g. IN, Q, IR, . . .). We
assume a cancellative addition + on D and an element 0 ∈ D such that (D, +, 0)
is a commutative monoid and the relation x ≤ y ⇔df ∃ z . x + z = y is a linear
order on D. Then 0 is the least element and + is isotone w.r.t. ≤. Moreover, 0
is indivisible, i.e., x + y = 0 ⇔ x = y = 0. D may include the special value ∞.
Lazy Semiring Neighbours and Some Applications 209
(cd4) guarantees isotony of the codomain operator. As for domain, the conjunc-
tion of (cd1) and (cd2) is equivalent to
a ≤ p ⇔ a ≤ a · p , (lrp)
i.e., a is the least right preserver of a. However, due to lack of right-strictness ¬a
need not be the greatest right annihilator; we only have the weaker equivalence
a ≤ p ⇔ a · ¬p ≤ a · 0 . (wgra)
r l
(b) b l n r b = n
rb and b r n lb = n
l b,
(c) b l b l b = b lb and b r b rb = b r b,
(d) n l b l b = n b
l and n b b
r r = n b.
r
Proof. The proof of [7] can immediately be adopted, since it only uses the explicit
representations of neighbours and boundaries, which are identical for L-semirings
and full semirings. E.g., by definition (twice), p · = p and definition again,
n n b = n (b · ) = · (b · ) = · b = b b .
l r l r
Proof.
(a) By Boolean algebra and additivity of domain, 1 = = (a + a) = a + a,
and the first claim follows by shunting. The second inequality can be shown
symmetrically.
(b) By Boolean algebra we only have to show that ¬p · + p · = and
¬p · p · = 0. The first equation follows by left-distributivity, the
second one by Boolean algebra and the law [10]
(c) By left and right distributivity, Boolean algebra and N being a left zero,
F · ¬p + · p = F · ¬p + (F + N) · p = F · ¬p + F · p + N · p
= F · (¬p + p) + N = F + N = .
F · ¬p · p = F · ¬p (F + N) · p = F · ¬p (F · p + N · p)
= (F · ¬p F · p) + (F · ¬p N · p) .
The first summand is 0, since the law symmetric to (2) holds for finite a
and hence for F. The second summand is, by p, ¬p ≤ 1 and isotony, below
F N = 0 and thus 0, too.
From this definition, we get the following exchange rule for perfect neighbours.
a≤
n lb ⇔ b ≤
n ra . (3)
Lemma 4.6. Perfect neighbours and perfect boundaries have the following ex-
plicit forms:
n b = · ¬b ,
n b = ¬b · ,
b l b = ¬b · ,
b r b = · ¬b .
l r
l r
Proof. The claim follows by definition, shunting, Lemma 4.4(a), Boolean algebra
and definition again:
a≤ n b ⇔ a · b ≤ 0 ⇔ a ≤ ¬b ⇒ a ≤ b ⇔ a ≤ n b .
l l
Corollary 4.8.
(a)
n n
l rb = b rb and
n n
r lb =
b l b,
(b)
b ln b
r = n b
r and
brn b
l =
n b,
l
(c)
b lb lb = b lb and
brb rb =
b r b,
n
(d) l b lb = n b
l and
n
r b rb =
n b.
r
There are also cancellation rules for mixed diamond/box expressions, e.g.,
b l
b lb =
b lb and
bl b lb = b lb . (4)
n
rb =
n b and
n b = n
rb ,
r r
(5)
b b =
b lb and
b lb = b lb .
Proof. By de Morgan duality, Boolean algebra and the exchange rule (3)
n a≤ b ⇔ n a≤ b ⇔ b ≤ n a ⇔ a≤ n b .
r r r l
Since Galois connections are useful as theorem generators and dualities as theo-
rem transformers we get many properties of (perfect) neighbours and (perfect)
boundaries for free. For example we have
Corollary 4.10.
(a) n r , b l and
n , b r are isotone.
l
(b) r , l are disjunctive and
n b n ,
l b r are conjunctive.
(c) We also have cancellative laws:
n
r l a ≤ a ≤ l r a and b l
b ra ≤ a ≤
n n n b r b l a.
But, because of Lemma 4.4(c), we do not have the full semiring de Morgan
dualities of left neighbours and right boundaries, respectively. We only obtain
Lemma 4.11. Let S be right-distributive.
(a) n ≤
lb
n b and
n b≤ n
lb ,
l l
(b) b rb ≤
b rb and
b rb ≤ b ry .
Lazy Semiring Neighbours and Some Applications 215
l
l l
≤ F is false (if there is at least one infinite element a = 0). Also, the Galois
connections of [7] are not valid for left neighbours and right boundaries, but one
implication can still be proved.
Lemma 4.12. Let S be right-distributive, then
n
la ≤b ⇒ a≤
n b , b ra ≤b ⇒ a≤
b rb .
r
Proof. By Lemma 4.11(a), Boolean algebra and the exchange rule (3)
n la ≤ b ⇒ n la ≤ b ⇔ b ≤ n la ⇔ a ≤ n rb .
r
(b) If S is right-distributive, then n l , br are disjunctive and
n ,
b l are
r
conjunctive.
Proof.
(a) The claim follows directly by the explicit representation of (perfect) neigh-
bours and boundaries (Lemma 4.2 and Lemma 4.6).
(b) By Lemma 4.2, additivity of domain and right-distributivity we get
n (a + b) = · (a + b) = · (a + b) = · a + · b = n a + n b .
l l l
Until now, we have shown that most of the properties of [7] hold in L-semirings,
too. At some points, we need additional assumptions like right-distributivity.
Many more properties, like b ≤ n r b, can be shown. Most proofs use the explicit
forms for lazy semiring neighbours or the Galois connections (Lemma 4.9) and
Lemma 4.12. However, since L-semirings reflect some aspects of infinity, we get
some useful properties, which are different from all properties given in [7]. Some
are summarised in the following lemma.
Lemma 4.14.
(a) n l F = n r F = b l F = b r F = .
(b) b ≤ N ⇔ n r b ≤ 0 ⇔ b r b ≤ N .
(c) n N =
l b r N = N and n N =
r b lN = 0 .
(d) b ≤ N ⇔ F ≤ b ⇔ r b = ⇔
n b rb = .
Proof. First we note that by straightforward calculations using Lemma 3.2 and
3.4, we get
·p≤ ·q ⇔ p≤ q ⇔ p· ≤ q· . (6)
216 P. Höfner and B. Möller
l
(b) By Lemma 3.4, (6), left-strictness and definition of n l
b ≤ N ⇔ b ≤ 0 ⇔ b · ≤ 0 · ⇔ n r b ≤ 0 .
(c) By Lemma 4.6 and F = 1 we get
n N = · ¬N = · ¬F = · 0 = N.
l
(d)Similar to (b).
Note that (a) implies n l = n r = b l = b r = using isotony.
(c) shows again that the inequations of Lemma 4.11 cannot be strengthened to
equations.
Since the above theory concerning lazy semiring neighbours is based on lazy
semirings, it is obvious that one can use it also in the framework of lazy Kleene
algebra and lazy omega algebra [10]. The former one provides, next to the L-semi-
ring operators, an operator for finite iteration. The latter one has an additional
operator for infinite iteration.
lφ holds on [a, b] iff there exists δ ≥ 0 such that φ holds on [a − δ, a], (7)
c a b a b d
where c = a − δ where d = b + δ
With r ( l ) one can reach the left (right) neighbourhood of the beginning (end-
tervals of an interval [a, b], but also on intervals “outside”. In [14] it is shown
that the modalities of [6] and [13] as well as the chop operator can be expressed
by the neighbourhood modalities.
In [7] we present an embedding and extension of NL into the framework of
full semirings. There, (perfect) neighbours and boundaries are defined on full
semirings in the same way as we have done this for L-semirings in Section 4.
Consider the structure
where 1l =df {[a, a]} denotes the set of all intervals consisting of one single point
and Int is the set of all intervals [a, b] with a, b ∈ Time and Time is a totally
ordered poset, e.g. IR. Further we assume that there is an operation − on Time,
which gives us the duration of an interval [a, b] by b − a. By this operation 1l
consists of all 0-length intervals.
For the moment we exclude intervals with infinite duration. The symbol ;
denotes the pointwise lifted composition of intervals which is defined by
[a, d] if b = c
[a, b] ; [c, d] =df
undefined otherwise .
It can easily be checked that INT forms a full semiring. In [7] we have shown
where Iφ =df {i | i ∈ Int, φ holds on i}. This embedding gives us the possibility
to use the structure of a semiring to describe NL. Many simplifications of NL
and properties concerning the algebraic structure are given in [7].
2
The exact definition of the syntax of formulas can be found e.g. in [14].
218 P. Höfner and B. Möller
Again, it is easy to check that INTi forms an L-semiring, which even becomes
an ML-semiring by setting, for A ∈ P(Int),
Note that INTi is right-distributive, so that all Lemmas and Corollaries of Sec-
tion 4 hold in this model.
Thereby we have defined a new version NLi of NL which handles intervals with
infinite durations. NLi also subsumes the theory presented in [16]. In particular,
it builds a bridge between NL and a duration calculus for infinite intervals.
The branching time temporal logic CTL∗ (see e.g. [4]) is a well-known tool for
analysing and describing parallel as well as reactive and hybrid systems. In CTL∗
one distinguishes state formulas and path formulas, the former ones denoting sets
of states, the latter ones sets of computation traces.
The language Ψ of CT L∗ formulas over a set Φ of atomic propositions is
defined by the grammar
Ψ ::= ⊥ | Φ | Ψ → Ψ | X Ψ | Ψ U Ψ | EΨ ,
where X and U are the next-time and until operators and E is the existential
quantifier on paths. As usual,
set of paths satisfying formula ϕ. One fixes an element n (n standing for “next”)
as representing the transition system underlying the logic and sets
[[⊥]] = 0 ,
[[p]] = p · ,
[[ϕ → ψ]] = [[ϕ]] + [[ψ]] ,
[[X ϕ]] = n · [[ϕ]] ,
j k
[[ϕ U ψ]] = (n · [[ψ]] n · [[ϕ]]) ,
j≥0 k<j
[[Eϕ]] = [[ϕ]] · .
Using these definitions, it is straightforward to check that [[ϕ ∨ ψ]] = [[ϕ]] + [[ψ]],
[[ϕ ∧ ψ]] = [[ϕ]] [[ψ]] and [[¬ϕ]] = [[ϕ]].
By simple calculations we get the following result.
Lemma 6.1. [11] Let ϕ be a state formula of CTL∗ . Then
[[Aϕ]] = ¬([[ϕ]]) · .
Hence we see that [[Eϕ]] corresponds to a left boundary and [[Aϕ]] to a perfect
left boundary, i.e.,
[[Eϕ]] = b l [[ϕ]] and [[Aϕ]] =
b l [[ϕ]] .
With these equations we have connected lazy neighbours with CTL∗ . From
Lemma 4.3, Corollary 4.8 and equations (4) we obtain immediately
[[EEϕ]] = [[Eϕ]] , [[AAϕ]] = [[Aϕ]] ,
[[EAϕ]] = [[Aϕ]] , [[AEϕ]] = [[Eϕ]] .
The other two boundaries as well as all variants of (perfect) neighbours do not
occur in CTL∗ itself.
A connection to hybrid systems will be set up in the next section.
Hybrid systems and NL. In PRO the left/right neighbours describe a kind of
composability, i.e., for processes A, B,
A≤ n
lB iff ∀ a ∈ A : ∃ b ∈ B : a · b is defined, (9)
A≤ n
rB iff ∀ a ∈ A : ∃ b ∈ fin (B) : b · a is defined. (10)
These equivalences are closely related to (7) and (8), respectively. n r and n l
tees that there exists a process, and therefore a trajectory, that can continue
220 P. Höfner and B. Möller
the “running” one. If n r B = ∅, we know that the system will terminate if all
trajectories of the running process have finite durations. Note that in the above
characterisation of n l the composition a · b is defined if either f (d1 ) = g(0)
(assuming a = (d1 , f ) and b = (d2 , g)) or a has infinite duration, i.e., d = ∞.
The next paragraph will show that left and right boundaries of lazy semirings
are closely connected to temporal logics for hybrid systems. But, by Lemma 4.3,
they are also useful as operators that simplify nestings of semiring neighbours.
The situation for right/left perfect neighbours is more complicated. As shown
in [7],
n B is the set of those trajectories which can be reached only from B,
r
not from B. Hence it describes a situation of guaranteed non-reachability from
B. The situation with n is similar for finite processes, because of the symmetry
l
between left and right perfect neighbours.
Hybrid Systems and CTL∗ . Above we have shown how lazy semiring neigh-
bours are characterised in PRO. Although a next-time operator is not meaningful
in continuous time models, the other operators of CTL∗ still make sense. Since
PRO is a Boolean modal quantale, we simply re-use the above semantic equa-
tions (except those for X and U) and obtain a semantics of a fragment of CTL∗
for hybrid systems. In particular, the existential quantifier E is a left boundary
also in hybrid systems. The operators F, G and U can be realised as
[[Fϕ]] =df F · [[ϕ]]3 , Gϕ =df ¬F¬ϕ , [[ϕ U ψ]] =df (fin [[Gϕ]]) · [[ψ]] .
Of course all other kinds of left and right (perfect) neighbours and boundaries
have their own interpretation in PRO and in (the extended) CTL∗ , respectively.
A detailed discussion of all these interpretations is part of our future work (cf.
Section 8).
References
1. J. H. Conway: Regular Algebra and Finite State Machines. Chapman & Hall, 1971
2. J. Desharnais, B. Möller, G. Struth: Kleene Algebra with Domain. ACM Trans.
Computational Logic (to appear 2006). Preliminary version: Universität Augsburg,
Institut für Informatik, Report No. 2003-07, June 2003
3. B. Dutertre: Complete Proof Systems for First-Order Interval Temporal Logic.
In IEEE Press, editor, Tenth Annual IEEE Symb. on Logic in Computer Science,
1995, 36–43
4. E.A. Emerson: Temporal and Modal Logic. In J. van Leeuwen (ed.): Handbook
of Theoretical Computer Science. Vol. B: Formal Models and Semantics. Elsevier
1991, 995–1072
5. J.Y. Halpern, B. Moszkowski, Z. Manna: A Hardware Semantics Based on Tempo-
ral Intervals. In J. Diaz (ed.) Proc. ICALP’83. LNCS 154. Springer 1983, 278–291
6. J.Y. Halpern, Y. Shoham: A Propositional Modal Logic of Time Intervals. Pro-
ceedings of the First IEEE Symposium on Logic in Computer Science. IEEE Press,
Piscataway, NJ, 279–292.
7. P. Höfner: Semiring Neighbours — An Algebraic Embedding and Extension of
Neighbourhood Logic. In J. van de Pol, J. Romijn, G. Smith (eds.): IFM 2005
Doctoral Symposium on Integrated Formal Methods, 6–13, 2005. Extended version:
P. Höfner: Semiring Neighbours. Technical Report 2005-19, Universität Augsburg,
2005
8. P. Höfner, B. Möller: Towards an Algebra of Hybrid Systems. In W. MacCaull,
M. Winter and I. Düntsch (eds.): Relational Methods in Computer Science. LNCS
3929. Springer 2006, 121–133
9. D. Kozen: Kleene Algebra with Tests. ACM Trans. Programming Languages and
Systems 19(3), 427–443 (1997)
10. B. Möller: Kleene Getting Lazy. Science of Computer Programming, Special issue
on MPC 2004 (to appear). Previous version: B. Möller: Lazy Kleene algebra. In
D. Kozen (ed.): Mathematics of program construction. LNCS 3125. Springer 2004,
252–273
11. B. Möller, P. Höfner, G. Struth: Quantales and Temporal Logics. In M. Johnson,
V. Vene (eds.): AMAST 2006. LNCS 4019. Springer 2006, 263–277
12. M. Sintzoff: Iterative Synthesis of Control Guards Ensuring Invariance and In-
evitability in Discrete-Decision Games. In O. Owe, S. Krogdahl, T. Lyche (eds.):
From Object-Orientation to Formal Methods — Essays in Memory of Ole-Johan
Dahl. LNCS 2635. Springer 2004, 272–301
13. Y. Venema: A Modal Logic for Chopping Intervals. J. of Logic and Computation
1(4):453–476, 1990
14. C. Zhou, M.R. Hansen: An Adequate First Order Interval Logic. In W.-P. de
Roever, H. Langmaack, A. Pnueli (eds.): Compositionality: The Significant Differ-
ence: International Symposium, COMPOS’97. LNCS 1536. Springer 1998, 584–608
15. C. Zhou, M.R. Hansen: Duration Calculus – A Formal Approach to Real-Time
Systems. Monographs in Theoretical Computer Science. Springer 2004
16. C. Zhou, D. Van Hung, L. Xiaoshan: Duration Calculus with Infinite Intervals. In
H. Reichel (ed.): Fundamentals of Computation Theory. LNCS 965. Springer 1995,
16–41
Omega Algebra, Demonic Refinement Algebra
and Commands
1 Introduction
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 222–234, 2006.
c Springer-Verlag Berlin Heidelberg 2006
Omega Algebra, Demonic Refinement Algebra and Commands 223
that they form a weak Kleene and a weak omega algebra, respectively [14]. The
definitions of these operators use modal operators, defined from the domain
operator of Kleene algebra with domain [4]. To define a demonic refinement
algebra of commands, we need a strong iteration operator on commands [19].
We define this operator with the aid of the above-mentioned result. The demonic
refinement algebra of commands gives rise to a model that is not extensional,
thus showing that the axioms of demonic refinement algebra do not characterise
predicate-transformer models uniquely.
The definition of infinite iteration and strong iteration on commands both
utilise the convergence operator of [13], that is, the underlying structure is actu-
ally assumed to be a convergence algebra. The convergence operator is analogous
to the halting predicate of modal μ-calculus [8]. As the third result in this pa-
per, we show that the convergence operator can be explicitly defined in terms of
infinite iteration and domain if and only if domain coinduction for the infinite
iteration operator is assumed to hold in general.
The historic development of this paper has it starting point in Kozen’s axioma-
tisation of Kleene algebra and his injection of tests into the algebra [11], render-
ing reasoning about control structures possible. As mentioned earlier, Cohen [2]
conservatively extends Kleene algebra with an infinite iteration operator. Von
Wright’s demonic refinement algebra, introducing the strong iteration operator,
was the first algebra that was genuinely an algebra intended for total-correctness
reasoning about programs. Desharnais, Möller and Struth’s domain-operator ex-
tension [4] was the seminal work for modal operators in Kleene algebra. The
domain operator was investigated in the context of refinement algebra in [18].
Möller later weakened the axiomatisation to form left semirings and left Kleene
algebras [12]. The former is one of the most foundational structures found in
this paper.
The paper is organised as follows. We begin in Sect. 2 by the result concerning
the equivalence of top-left-strict weak omega algebra and demonic refinement
algebra, upon which in Sect. 3 we construct the demonic refinement algebra
of commands and relate it to the demonic algebras with domain of de Carufel
and Desharnais [3]. In Sect. 4 we give some remarks on refinement algebra in
the light of Sect. 3. Before concluding, we consider the explicit definition of the
convergence operator in Sect. 5.
to that order, 0 is the least element and multiplication as well as addition are
isotone. Moreover, a + b is the join of a and b.
A (weak) Kleene algebra is a structure (+, 0, ·, 1,∗ ) such that the reduct
(+, 0, ·, 1) is a (weak) semiring and the star ∗ satisfies the axioms
1 + aa∗ ≤ a∗ , 1 + a∗ a ≤ a∗ , (∗ unfold)
∗ ∗
b + ac ≤ c ⇒ a b ≤ c , b + ca ≤ c ⇒ ba ≤ c , (∗ induction)
for a, b and c in the carrier set of the structure. A (weak) omega algebra [14] is
a structure (+, 0, ·, 1,∗ ,ω ) such that the reduct (+, 0, ·, 1,∗ ) is a (weak) Kleene
algebra and the infinite iteration ω satisfies the axioms
aω = aaω , (ω unfold)
∗
c ≤ b + ac ⇒ c ≤ a + a b ,ω
(ω coinduction)
for a, b and c in the carrier set of the structure. In particular, aω is the greatest
fixpoint of the function f (x) = ax. The element 1ω is the greatest element and
we denote it by . Since, by the ω unfold law, aω is a fixpoint of f , we have
aω = aω for all a. We call a weak omega algebra top-left-strict iff the equation
a = holds for all a. In that case we get
aω b = aω b = aω = aω . (1)
In general omega algebra only the inequation aω b ≤ aω holds. The above deriva-
tion (1) strengthens it to an equation. In fact we have the following result.
Proposition 2.1. Top-left-strictness is equivalent to left ω annihilation, i.e.,
b = ⇔ (∀ a • aω ≤ aω b) .
Proof. The implication (⇒) follows from (1), whereas (⇐) can be calculated by
(∀ a • aω ≤ aω b)
⇒ {[ set a = 1 ]}
1 ≤ 1ω b
ω
⇔ {[ 1ω = ]}
≤ b .
The other inequation (b ≤ ) holds since is the greatest element.
A demonic refinement algebra [19] is a structure (+, 0, ·, 1,∗ ,ω ) such that the
reduct (+, 0, ·, 1,∗ ) is a weak Kleene algebra and the strong iteration operator ω
satisfies the axioms
aω = aaω + 1 , (ω unfold)
ω ∗ ω
a = a +x 0 , (ω isolation)
c ≤ ac + b ⇒ c ≤ a b , ω
(ω coinduction)
Omega Algebra, Demonic Refinement Algebra and Commands 225
for a, b and c in the carrier set of the structure. It is easily shown that 1ω is
the greatest element and satisfies 1ω a = 1ω for all a in the carrier set [20]. This
element is again denoted by .
In the remainder of this section we present one of our main contributions,
namely that top-left-strict weak omega algebra is equivalent to demonic refine-
ment algebra in the sense that they can be defined in terms of each other. This
is done in two steps: First we show that weak omega algebra subsumes demonic
refinement algebra, then we show the converse subsumption.
Proof. Given a top-left-strict weak omega algebra, the strong iteration is defined
by aω =df a∗ + aω . It is sufficient to show that this definition satisfies the
axioms of strong iteration; the other axioms of demonic refinement algebra are
immediate from the axioms of top-left-strict weak omega algebra.
1. ω unfold:
aω
= {[ definition ]}
∗
a + aω
= {[ ∗ and ω unfold ]}
∗
aa + 1 + aaω
= {[ commutativity ]}
aa∗ + aaω + 1
= {[ distributivity ]}
a(a∗ + aω ) + 1
= {[ definition ]}
ω
aa + 1
2. isolation:
aω
= {[ definition ]}
∗
a + aω
= {[ neutrality of 0 and (1) ]}
a∗ (1 + 0) + aω 0
= {[ right-distributivity ]}
a∗ + a∗ 0 + aω 0
= {[ left-distributivity ]}
a∗ + (a∗ + aω )0
= {[ definition ]}
∗
a + aω 0
226 P. Höfner, B. Möller, and K. Solin
3. ω coinduction:
c ≤ aω b
⇔ {[ definition ]}
c ≤ (a∗ + aω )b
⇔ {[ left-distributivity ]}
c ≤ a∗ b + aω b
⇔ {[ (1) ]}
c ≤ a∗ b + aω
⇐ {[ ω coinduction ]}
c ≤ ac + b
1. ω unfold:
aω
= {[ definition ]}
aω 0
= {[ ω unfold ]}
(aaω + 1)0
= {[ left-distributivity and neutrality of 1 ]}
aaω 0 + 0
= {[ neutrality of 0 ]}
aaω 0
= {[ definition ]}
aaω
2. top-left-strictness:
≤ a
⇔ {[ = 1ω ]}
≤ 1ω a
Omega Algebra, Demonic Refinement Algebra and Commands 227
⇐ {[ ω coinduction ]}
≤+a
⇔ {[ join ]}
true
a ≤ holds since is the greatest element.
3. ω coinduction:
c ≤ a∗ b + aω
⇔ {[ definition ]}
c ≤ a∗ b + aω 0
⇔ {[ annihilation ]}
c ≤ a∗ b + aω 0b
⇔ {[ distributivity ]}
c ≤ (a∗ + aω 0)b
⇔ {[ isolation ]}
c ≤ aω b
⇐ {[ ω coinduction ]}
c ≤ ac + b
The above lemmas directly yield the following theorem.
Theorem 2.4. Top-left-strict weak omega algebra and demonic refinement al-
gebra are equivalent in the sense that they can be defined in terms of each other.
p = p , (2)
(a + b) = a + b . (3)
This is the reason why we shall call a test semiring with a domain operator modal.
All the structures above extending a weak semiring are called modal when the
underlying weak semiring is modal.
Given a modal semiring S = (S, +, 0, ·, 1) we define the set of commands (over
S) as COM(S) =df S × test(S). Three basic non-iterative commands and two
basic operators on commands are defined by
As noted by Möller and Struth in [14] the structure (COM(S), [] , fail, ; , skip)
forms a weak semiring. The natural order on the command weak semiring is
given by (a, p) ≤ (b, q) ⇔ a ≤ b ∧ q ≤ p. We will discuss below how it connects
to the usual refinement relation.
If S is even a weak Kleene algebra, a star operator can be defined by
and then (COM(S), [] , fail, ; , skip,∗ ) forms a weak Kleene algebra [14].
Defining an omega operator over the set of commands does not work as
simply as for star. To do this, we also need to assume that the underlying modal
omega algebra (S, +, 0, ·, 1,∗ ,ω ) comes equipped with a convergence operator [14]
: S → test(S) satisfying
|a](a) ≤ a , ( unfold)
∗
q · |a]p ≤ p ⇒ a · |a ]q ≤ p . ( induction)
In [14] it is shown that a is the least (pre-)fixed point of |a]. The test a
characterises the states from which no infinite transition paths emanate. It cor-
responds to the halting predicate of the modal μ-calculus [8].
The infinite iteration operator on commands can then be defined by
k ≡ l ⇔df k l ∧ l k .
= {[ definition of [] ]}
(a∗ + aω , [a∗ ]p · a · [a∗ ]p)
= {[ definition of ω , commutativity and idempotence of tests ]}
(a , a · [a∗ ]p) .
ω
We conclude this section by relating the command algebra to the demonic al-
gebras (DA) of [3]. These are intended to capture the notion of total correctness
in an algebraic fashion. Since their axiomatisation is extensive, we do not want
to repeat it here. We only want to point out that a subalgebra of the command
230 P. Höfner, B. Möller, and K. Solin
algebra yields a model of DA. This is formed by the ≡-classes of feasible com-
mands which are pairs (a, p) with p ≤ a. So these model programs where no
miraculous termination can occur; they correspond to the feasible designs of [9].
In [7] it is shown that the set F(S) classes of feasible commands can isomor-
phically be represented by simple semiring elements. The mediating functions
are
E : F(S) → S , D : S → F(S) ,
E((a, p)) =df pa , D(a) =df (a, a) .
Then one has E(D(a)) = a and D(E(a, p)) ≡ (a, p). Moreover, the demonic
refinement ordering of [3] is induced on S by
a
b =df E(D(a) D(b)) = a · b · (a + b) ,
a 2 b =df E(D(a) ; D(b)) = |a]b · a · b .
Using pairs (p, p) as demonic tests in F(S) one even obtains a DA with domain.
Further details are left to a future publication.
and get
wp.fail.q = 1 and wp.chaos.q = 0 .
Hence fail can be interpreted as magic in the refinement calculus tradition and
chaos as abort. Indeed, chaos is refined by every command and every command
is refined by fail. Furthermore, we have the implications, for commands k, l,
However, the command model of demonic refinement algebra is, unlike predicate
transformer models as presented in [19,20], in general not extensional in that we
do not necessarily have the converse implications. In particular,
1. |a]¬aω ≤ ¬aω
⇔ {[ definition of | ] and Boolean algebra ]}
¬|aaω ≤ ¬aω
⇔ {[ shunting ]}
a ≤ aaω
ω
⇔ {[ definition of | ]}
aω ≤ (aaω )
⇔ {[ (d3) ]}
aω ≤ (aaω )
⇔ {[ ω unfold ]}
aω ≤ aω
⇔ {[ reflexivity ]}
true
Assume now that ω coinduction for the domain operator holds. By the above
calculations ¬aω then satisfies both unfold and induction. Since these
axioms impose uniqueness, we have that a = ¬aω . If, conversely, a = ¬aω
is assumed then the implication in the first line of the above calculation for 2.
is true by induction and hence ω coinduction for domain holds.
(a, p)ω =df (aω , ¬aω · [a∗ ]p) and (a, p)ω =df (aω , ¬aω · [a∗ ]p) ,
respectively.
We finally note that the special case q = 0 of the ω coinduction rule for domain
(Prop. 5.1) has been termed cycle rule and used as an additional postulate in
the computation calculus of R. Dijkstra [6].
6 Conclusion
References
1. R.J. Back, J. von Wright: Refinement calculus: a systematic introduction. Springer
1998
2. E. Cohen: Separation and reduction. In R. Backhouse, J. Oliveira (eds.): Mathe-
matics of Program Construction. LNCS 1837. Springer 2000, 45–59
234 P. Höfner, B. Möller, and K. Solin
Wolfram Kahl
1 Introduction
After a small demonstration of relation-algebraic programming in Haskell, we
give a quick overview over the programmer’s interface to our relation library
in Sect. 1.2. We then show in Sect. 1.3 how standard relation-algebraic theo-
ries are not an appropriate specification for this kind of relation library; as a
solution to these problems, we define in Sect. 2 an appropriate generalisation
of the relation-algebraic framework. In Sect. 3 we explain the options we offer
concerning support from the Haskell type system for relational programming;
we summarise our current implementation in Sect. 4.
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 235–250, 2006.
c Springer-Verlag Berlin Heidelberg 2006
236 W. Kahl
emacsagda
PluginTable Version
AgsyPlugin InfoPlugin
CompInterface Typechecking
Invariants ProofMonad
Generators ProofState
External Equal
ISyntax Gensym
UAbstract ISynEnv
Matrix Id Utilities
AgdaTrace AgdaPretty
PluginTable Version
StratAuto RefineIntro RefineCase StratInteractive RefineElim NoRec ClassEnv BasicOps CParser RemMetaVars
StratInterface SearchContext RefineHelpFcns CompGeneric PreludeDefs Unfold1 Compute Import LazyCompute Solve CPrinter RemMetaVarsThomas
Literal Id Utilities
AgdaPretty AgdaTrace
Only the second code block here is concerned with the calculation of the intran-
sitive part of the dependency graph; after seeing the mathematical formula for
this, it should be easy to follow the corresponding Haskell expressions.
Besides these, the data type constructor Rel exposes a relation-algebraic inter-
face, part of which is listed here (omitting the Ord constraints for readability).
(<==) :: Rel a b → Rel a b → Bool inclusion ⊆
(&&&) :: Rel a b → Rel a b → Rel a b meet (intersection)
(|||) :: Rel a b → Rel a b → Rel a b join (union)
(−=−) :: Rel a b → Rel a b → Rel a b difference
(∗∗∗) :: Rel a b → Rel b c → Rel a c composition ;
(/∗/) :: Rel a c → Rel b c → Rel a b restricted left residual
(\∗\) :: Rel a b → Rel a c → Rel b c restricted right residual
238 W. Kahl
Besides these, we also provide some point-level functions following the naming
and argument order conventions of Data.Set and Data.Map:
empty :: Rel a b
member :: a → b → Rel a b → Bool
insert :: a → b → Rel a b → Rel a b
A S - C A S - C
@ @
Q@ Q \S S /R@ R
R
@ R
@
B B
Residuals are important since they provide the standard means to translate
predicate logic formulae involving universal quantification into complement-free
relational formalisms:
(x , y) ∈ S /R iff ∀ z .(y, z ) ∈ R ⇒ (x , z ) ∈ S
(y, z ) ∈ Q \S iff ∀ x .(x , y) ∈ Q ⇒ (x , z ) ∈ S
Although to the newcomer to relational algebra, residuals may appear to be a
rather strange construction, the fact that they are the tool to translate universal
quantifications into relation-algebraic formulae frequently makes them indispens-
able for point-free formulations.
In the next section, we show how most relational formalisations can be adapted
into a generalised framework that avoids these problems.
2
I would have much preferred to use the name “semicategory”, but this is already
used for “categories with identities, but with only partial composition” [25], and the
name “semi-groupoid” seems to be reasonably well-established in the mathematical
literature.
240 W. Kahl
2 Relational Semigroupoids
Above, we showed how set difference can be defined in a point-free way, without
reference to the complement operation available only in the superstructure of
arbitrary sets, only in terms of the theory of finite sets. This way of directly
defining concepts that are better-known as derived in more general settings has
the advantage that it guarantees a certain “inherent conceptual coherence”.
In order to achieve this coherence also for the interface to our finite relation
library, we now step back from concrete finite relations and consider instead a
hierarchy of semigroupoid theories geared towards relational concepts in a similar
way as Freyd and Scedrov’s hierarchy of allegories [8] does this for category
theory. Our exposition will, however, be structured more as a generalisation of
the theory organisation of [13] from categories to semigroupoids.
This section serves simultaneously as formal specification for the point-free
aspects of our interface to the relation datatypes in Haskell, and as (rather
concise) introduction to reasoning using these tools.
As in semigroups, identities are unique where they exist, and whenever we write
IA without further comment, we imply the assumption that it exists.
Semigroupoid Interfaces for Relation-Algebraic Programming in Haskell 241
In contexts where the inclusion ordering is not primitive, but defined using
meet, the meet-subdistributivity of composition is usually listed as an axiom;
here it follows from monotonicity of composition:
2.4 Domain
Related to the introduction of “Kleene algebras with tests” [16], which allow
the study of pre- and postconditions in a Kleene algebra setting, domain (and
range) operators have been studied in the Kleene algebra setting [21, 6].3 Much
of the material there can be transferred into our much weaker setting of ordered
semigroupoids by replacing preservation of joins with monotonicity and using
our subidentity concept of Def. 2.2.2. The definition of “predomain” is given as
a special residual of composition with respect to the ordering :
3
It is important not to confuse these domain and range operations, which only make
sense in ordered semigroupoids, with the semigroupoid (or categorical) concepts of
source and target of a morphism!
Semigroupoid Interfaces for Relation-Algebraic Programming in Haskell 243
It is interesting to note that the only change from Kozen’s definition is the
omission of the join with the identity from the left-hand side of the recursive
definition; Kozen also states the induction laws with inclusions in the conclusion,
although for reflexive transitive closure, equality immediately ensues. This is
not the case here, so this definition of transitive closure is in some sense more
“satisfactory” than the the reflexive transitive variant.
While transitive closure of concrete relations does preserve finiteness, this
is not the case for language-based models, so the usefulness of Kleene semi-
groupoids as such may be limited.
2.6 Semi-allegories
In direct analogy with allegories and distributive allegories, we define:
244 W. Kahl
For concrete relations, we then have (using infix notation for relations):
y(Q \∗\S )x iff ∀ x . xQy ⇒ xSz and ∃ x . xQy
x (S /∗/R)y iff ∀ z . yRz ⇒ xSz and ∃ z . yRz
For finite relations between (potentially) infinite types, this definition chooses
the largest domain, respectively range, on which each residual is still guaranteed
to be finite if its arguments are both finite. Where residuals exist, the restricted
residuals can be defined using the unrestricted residuals:
Q \∗\S = ran Q ; (Q \S ) , S /∗/R = (S /R) ; dom R .
This “definedness restriction” essentially takes away from the standard residuals
only the “uninteresting part”, where the corresponding universally quantified
formula is trivially true, and therefore is still useful in relational formalisations in
essentially the same way as the “full” residuals. Therefore, we use these restricted
residuals now for division semi-allegories:
For product and sum types we have the problem that the natural access rela-
tions, namely the projection respectively injection mappings, will be infinite for
infinite types. Therefore, a formalisation that is useful in the context of finite
relations between infinite types has to work without projections and injections.
The natural starting point for such a formalisation are monoidal categories [19],
which easily generalise to monoidal semigroupoids.
Since the details are beyond the scope of this paper, we only shortly indicate
how we deal with product types. Since duplication and termination can again be
infinite, we axiomatise finiteness-preserving “usage patterns” of the potentially
infinite projection functions π : A × B → A and ρ : A × B → B
– The fork operation as introduced in the context of relation algebras by Hae-
berer et al. [10] can be defined by R∇S := R;π
S ;ρ.
– The “target projection” operations P π := P ; π and P ρ := P ;ρ also preserve
finiteness.
– These can be axiomatised without projections by (R∇S )π = (dom S ) ; R and
(R∇S )ρ = (dom R) ; S and (P ∇Q ) ; (R∇S ) = P ;R
Q ;S .
In Dedekind semigroupoid with the monoidal product bifunctor and these opera-
tions, most product-related relational programming can be adequately expressed.
Direct sums with injections and direct powers with element relations are dealt
with similarly; for the latter, the use of restricted residuals implies that set
comprehension is typically restricted to non-empty sets.
There are three ways to situate the objects of the relation semigroupoid un-
derlying a relation datatype with respect to the host language (Haskell) type
system:
“Types as objects” guarantees full type safety.
“Sets as objects” offers finer granularity at the expense of dynamic compati-
bility checks for relations on possibly different subsets of the same types.
“Elements as objects” uses elements of a single datatype as objects, with no
support from the type system for relation compatibility.
246 W. Kahl
Realising static morphism compatibility checking for this view would normally
involve dependent types. One could also use Haskell type system extensions as
implemented in GHC, the most popular compiler, to achieve most of this type
safety, but the interface would definitely become less intuitive.
Realising this “arbitrary sets as objects” view in Haskell naturally uses finite
subsets of types as objects; we provide this in the SetRel type constructor. This
still has to resort to dynamic relation compatibility checking. This forces pro-
grammers either to move all relational computations into an appropriate monad,
or to employ the common semigroupoid interface, where the operations provided
by the SetRel implementation become partial, with possible run-time failures in
the case of morphism incompatibility errors.
The “sets as objects” view has the advantage that the full relation algebra
interface becomes available, and, in the BDD-based implementations, an im-
plementation with partial operations can be realised with much lower overhead
than the total operations of the “types as objects” view.
4 Implementation
The main reason why previously no significant relation library existed for Haskell
is, in my opinion, that all “obvious” implementation choices inside the language
are unsatisfactory.
More space- and time-efficient representations that also can make use of cer-
tain regularities in the structure to achieve more compact representations are
based on binary decision diagrams (BDDs) [4]. Several BDD packages are freely
available, but the only known Haskell implementations are still rather inefficient
and incomplete. Even with a Haskell BDD library, or with a complete Haskell
binding to an external BDD library, there still would be considerable way to
go to implement relation algebraic operations; we are aware of two BDD-based
implementations of relational operations: gbdd [22] is a C++ library providing
relational operations using a choice of underlying BDD C libraries, and KURE
[20] is the BDD-based kernel library of the RelView system [1]; KURE is written
in C, and provides many special-purpose functions such as producing element
relations between sets and their powersets [18]. Since C++ is notoriously hard
to interface with Haskell, KURE remains as the natural choice for implementing
Data.Rel with reasonable effort.
However, it turned out that producing a Haskell binding KureRel to KURE
still was a non-trivial task, mainly because of heavily imperative APIs motivated
by the graphical user interaction with RelView. In addition, RelView and KURE
do not support relations where at least one dimension is zero; we take care of
this entirely on the Haskell side.
On top of KureRel, we have implemented instances for (the appropriate parts
of) the semigroupoid class hierarchy for three datatype constructors.
CRel is used for the relation algebra of finite relations between finite sets. For
this, all provided interfaces have been implemented. A CRel is implemented as a
triple consisting of two Carriers representing the source and target sets (together
with eventual sum, product, or powerset structure), and one KureRel with the
248 W. Kahl
dimensions of the two carriers. SetRel is a special case of this, where both source
and target are plain set carriers.
TypeRel is used for the Dedekind semigroupoid of finite relations between
Haskell types. Carriers provide support for choices of sum and product, and Rel
is the special case of TypeRel for unstructured carriers. The implementation of
TypeRel is just a wrapper around CRel, and the implementations of the relational
operations automatically generate adaptation injections as necessary.
NRel is used for finite relations between the sets n for n ∈ N, where 0 = ∅
and n + 1 = {0, . . . , n}. This gives rise to a relation algebra, but since no choice
of products or sums is injective, the product- and sum-related classes cannot be
implemented. NRel is a simple wrapper around KureRel that is necessary only
for typing reasons.
FinMap, finally, is a first example of an implementation that is not based on
KureRel; it is used for finite partial functions between Haskell types, which form
a lower semilattice semigroupoid with domain, range, zero-morphisms, pseudo-
complements, and a large part of the product and sum interface. FinMap uses
Data.Map.Map for its implementation; since it uses (, ) and Either as choice for
sum and product, some of the product and sum interfaces currently apparently
cannot be implemented in Haskell for constraint propagation reasons.
Our library can be used interactively from the Haskell interpreter GHCi, which
provides a very flexible environment for experimentation. For example, using
a small utility function classGraph written using the Haskell syntax datatypes
and parsing functions included with the GHC distribution, we can extract the
subclass relation for the semigroupid classes of our library by passing its the
relevant source file location, and then find out about the type of the produced
relation, its numbers of nodes and edges, and, just as an example, display those
edges that are the only incoming edges at their target and the only outgoing
edges at their source, once producing a RelView-style bit matrix drawing, and
once using dot to layout the produced subgraph; finally use a 3D graph layout
algorithm to present relation g1 in an OpenGL viewing window:
> cg <- classGraph ["Data/Rel/Classes.lhs"]
HasDifference
> :t cg
NESetCompr
> gl’ g1
Edge HasDifference NESetCompr
5 Conclusion
Starting from the insight that, with relations as data, the usual model is one of
finite relations between both finite and infinite types, we showed that a hierarchy
Semigroupoid Interfaces for Relation-Algebraic Programming in Haskell 249
References
[1] R. Berghammer, T. Hoffmann, B. Leoniuk, U. Milanese. Prototyping and
Programming with Relations. ENTCS 44(3) 3.1–3.24, 2003.
[2] R. Berghammer, U. Milanese. Relational Approach to Boolean Logic Prob-
lems. In I. Düntsch, W. McCaull, M. Winter, eds., 8th Intl. Conf. Relational
Methods in Computer Science, RelMiCS 8, LNCS 3929. Springer, 2006.
[3] C. Brink, W. Kahl, G. Schmidt, eds. Relational Methods in Computer Science.
Advances in Computing Science. Springer, Wien, New York, 1997.
[4] R. E. Bryant. Graph-Based Algorithms for Boolean Function Manipulation.
IEEE Transactions on Computers C-35(8) 677–691, 1986.
250 W. Kahl
Yasuo Kawahara
1 Introduction
The obvious relationship between relations and graphs has been recoginsed by
many researchers. Given a graph, the numbers of its nodes and edges, that is, the
cardinalities of the sets of nodes and edges respectively, are fundamental data to
analyse and characterise it. Since graphs are one of importnant data structure in
computer science, their formal or computational study from a relational point of
view is interesting for computer science. The book “Relations and Graphs” [4]
by Schmidt and Ströhlein is an excellent exposition for the subjects in computer
science and applied mathematics. Unfortunately, the cardinality of relations is
treated rather implicitly or intuitively treated in the book. The aim of this paper
is to find a law on the cardinality of relations, which enables us to solve problems
on graphs and algorithms by relational methods. To achieve the subject the
author recalls Dedekind formula (or the law of modularity [2]), namely the most
significant law of relations, and has found out that an inequality, which we will
call Dedekind inequality, effectively dominates the behaviors of cardinalities of
fuzzy relations as well as boolean (crisp) relations. The soundness of formulation
for cardinalities in the paper will be seen as characterisation Theorems 2 and 6.
The paper will be organised as follows. In Section 2 we prove the Dedekind in-
equality and some basic properties of the cardinality as consequences of Dedekind
inequality. Also a characterisation of the cardinality of relations between finite
sets will be given. In Section 3, Dedekind inequality will be applied to basic
graph theory. That is, Hall’s theorem and König’s theorem will be demonstrated
using the relational calculus. In Section 4 we recall some fundamantals on fuzzy
relations. In Section 5 the cardinality of fuzzy relations between finite sets will
be defined and a Dedekind inequality will be showed for fuzzy relations. Also we
will show a characterisation of the cardinality of fuzzy relations between finite
sets. In Section 6 we will try to give a relational framework for network flows.
Finally another proof of Hall’s thoerem is given as an application of relational
theory of network flows.
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 251–265, 2006.
c Springer-Verlag Berlin Heidelberg 2006
252 Y. Kawahara
φ : αβ γ → α γβ and ψ : αβ γ → α γ β
by φ(x, z) = (x, y) and ψ(x, z) = (y, z), respectively. It is clear that both of φ
and ψ are surjective, which shows the desired inequalites.
A relation α : X Y is called a matching (or partial bijection) if α α idY and
αα idX . Matchings are closed under composition and converse. Let I denote
On the Cardinality of Relations 253
the singleton set {∗}. It is readily seen that idI = ∇II and ∇XI ∇IX = ∇XX for
all sets X.
The Dedekind inequality is very fruitful as we will see below:
Corollary 1. Let α : X Y , β : Y Z and γ : X Z be relations. Then
the following holds:
(a) If α and β are univalent, then |αβ γ| = |α γβ |.
(b) If α is a matching, then |αβ γ| = |β α γ|.
(c) If α is univalent and β is a function, then |αβ| = |α|.
(d) If α is a matching, then |α αβ| = |αβ|.
(e) If α is a matching, then |∇IX α| = |α|.
(f) If u idX , then |∇IX u| = |u|. In particular |∇IX | = |idX | (= |X|).
(g) If β is an injection, then |α| = |αβ|.
(h) If α is an injection, then |∇IX | ≤ |∇IY |.
Proof. (a) Let α and β be univalent. Then we have
(c) Let α be univalent and β a function. It follows from the totality of β that
∇XZ β = ∇XY . Hence we have
which means |X × X| ≤ |X|. But it is obvious that the last inequality holds only
if X is the empty set, a singleton set or an infinite set. The example suggests
that the validity of a relational formula
3 Application to Graphs
Let α : X Y be a relation. A matching f : X Y is called a matching of α
if f α. The following proposition shows a simple inequality deduced from the
condition (c) in Theorem 2 and a fact that a matching is a partial bijection.
Proposition 2. Let α : X Y be a relation and f : X Y a matching of α.
Then an inequality |f | ≤ |∇IX | − (|ρ| − |ρα|) holds for all relations ρ : I X.
Proof. It follows from Dedekind formula that ρ ∇IY f = ρf f . Hence we have
and
|∇IY f | = |f | { Corollary 1(e) }
= |f |. { (i) }
Therefore we have an inequality
= |ρ| + |f | − |ρf |
≥ |ρ| + |f | − |ρα|. {f α}
Corollary 2. Let α : X Y be a relation. For all matchings f : X Y of α
an inequality
|f | ≤ |∇IX | − δ(α)
holds, where δ(α) = max{|ρ| − |ρα| | ρ : I X}.
The number δ(α) is an integer with 0 ≤ δ(α) ≤ |∇IX | (because, |ρ| − |ρα| = 0
when ρ = 0IX ). For example, δ(0XY ) = |∇IX | and if α is a matching then
δ(α) = 0.
256 Y. Kawahara
(Sufficiency) Few traditional graph theoretic proofs are known. However in the
paper we will give another proof using the existence of maximal flows at the end
of Section 6.
4 Fuzzy Relations
First we recall some binary operations on the unit interval that are useful for
defining opearations on fuzzy relations. The unit interval [0, 1] is a set whose
elements are all reals r with 0 ≤ r ≤ 1. We use four binary operations “ ∨ ”,
“ ∧ ”, “ ” and “ ⊕ ” on [0, 1] defined by a• = 0 if a = 0 and a• = 1 otherwise,
a∨b = max{a, b}, a∧b = min{a, b}, ab = max{0, a−b} and a⊕b = min{1, a+b}
for all a, b ∈ [0, 1]. A real a ∈ [0, 1] is called boolean if a = 0 or a = 1. It is easy
to see the following basic facts:
j
Let M be a natural number with M ≥ 2. The set { | j = 0, 1, · · · , M − 1}
M −1
with M elements will be denoted by BM . A fuzzy relation α : X Y is called
M -valued if α(x, y) ∈ BM for all x ∈ X and y ∈ Y . It is trivial that a fuzzy
relation is 2-valued iff it is boolean. The following proposition is immediate from
the definition of M -valued fuzzy relations.
Proposition 5. (a) M -valued fuzzy relations are closed under the join , the
meet , the composition and the converse of fuzzy relations.
(b) For all reals k ∈ BM and boolean relations ξ : X Y the semi-scalar
multiplication k · ξ is an M -valued fuzzy relation.
Proof. Let α be univalent. Then it follows from the univalency α α idY that
Hence for each x ∈ X there exists at most one y ∈ Y such that α(x, y) > 0, and
so we have
|αβ γ| = x∈X,z∈Z ∨y∈Y [α(x, y) ∧ β(y, z) ∧ γ(x, z)]
= x∈X,y∈Y,z∈Z [α(x, y) ∧ β(y, z) ∧ γ(x, z)].
On the Cardinality of Relations 259
Remark that the inequality |αβ γ| ≤ x∈X,y∈Y,z∈Z [α(x, y) ∧ β(y, z) ∧ γ(x, z)]
always holds. Therefore we have
|α γβ | ≤ x∈X,y∈Y,z∈Z [α(x, y) ∧ β(y, z) ∧ γ(x, z)]
= |αβ γ|,
and
|β α γ| ≤ x∈X,y∈Y,z∈Z [α(x, y) ∧ β(y, z) ∧ γ(x, z)]
= |αβ γ|.
It is immediate that Theorem 1 and Corollary 1 also hold for fuzzy relations.
Similarly we characterise the cardinality of fuzzy relations as follows.
Proof. It is trivial that the cardinality satisfies the above five conditions. Con-
versely assume that a family of mappings | · | satisfies the five conditions. Then
one easily understands that the family of mapppings | · | has all the properties
proved in Proposition 1 as well as Theorem 1 and Corollary 1. Hence for all
fuzzy relations α : X Y we have
|α| = x∈X y∈Y |xαy | { Proposition 1(e) }
= x∈X y∈Y |α(x, y) · idI | { Proposition 6(a) }
= x∈X y∈Y α(x, y). { (e) and (b) }
Proof. Assume X has n elements. Then the fundamental argument shows that
αn 0≤j≤n−1 αj and hence α∗ = 0≤j≤n−1 αj . Set k = |sα∗ t | = α∗ (s, t) (Cf.
Proposition 6(a)). Then there is a sequence s = v0 , v1 , · · · , vp = t of distinct
elements of X such that k = ∧pj=1 α(vj−1 , vj ). We now define a fuzzy relation
ξ : X X by ξ = k · (pj=1 vj−1
vj ). Then (b) is clear and (a) follows from a
computation:
k · (vj−1 vj ) α(vj−1 , vj ) · (vj−1 idI vj ) { k ≤ α(vj−1 , vj ) }
= vj−1 [α(vj−1 , vj ) · idI ]vj
= vj−1 vj−1 α vj vj
α.
6 Network Flows
Network flows are usually defined as directed graphs with edges labelled by reals
[1]. But their labels can be restricted to [0,1] without loss of generality. This
idea enables us to regard networks and flows as fuzzy relations, and to develop a
relational method for theory of network flows. It should be noticed that networks
treated here are just simple graphs.
The relation α is the capacity relation of N , s is the source of N , and t the exit
of N .
In the above definition the conditions sα = 0XI and tα = 0IX intuitively mean
that the network has no capacity into a source and from a target. On the other
hand the last condition α α = 0XX may look like too strong. However, for an
arbitrary relation α : X X we can construct a relation α̂ = α α satisfying
α̂ α̂ = 0XX and α = α̂ ⊕ (α α ). (Cf. Proposition 3 (a) and (c).) Flows of
the network are defined to be an assignment of amount of flow satisfying global
conservation within the capacity.
For a network N there exist finitely many cuts ρ : I X, because X is finite, and
consequently a minimal cut exists. The following lemma indicates a construction
of a new greater flow when ϕα contains a flow.
Lemma 2. Let N = (α : X X, s, t) be a network and ϕ a flow of N . If
ξ : X X is a fuzzy relation satisfying ξ ϕα , sξ = 0IX and |ξ ρ0 ∇IX | =
|ξ ρ0 ∇IX | for all boolean relations ρ0 : I X such that ρ0 (s t)− , then a
fuzzy relation
ψ = [ϕ (α ξ )] ⊕ (α ξ)
is a flow of N such that val(ψ) = val(ϕ) + |sξ|.
Proof. First note that
ξ α (α ϕ) α { ξ ϕα α ϕ }
= ϕ, { α α = 0XX }
and
ξ α [(α ϕ) ϕ ] α { ξ ϕα }
= α ϕ. { ϕ α α α = 0XX }
Thus, since ϕ α and ξ α α ϕ, it follows from Proposition 4(b) that
ψ ϕ ⊕ (ξ α) α.
Let ρ0 : I X be a boolean relation such that ρ0 (st)− and set ρ̂0 = ρ0 ∇IX .
Next we will see that |ψ ρ̂0 | = |ψ ρ̂0 |. As ρ̂0 is boolean, an equation
ψ ρ̂0 = [(ϕ ρ̂0 ) (α ξ ρ̂0 )] ⊕ (α ξ ρ̂0 )
holds by Proposition 4(c), and so
|ψ ρ̂0 | = |ϕ ρ̂0 | − |α ξ ρ̂0 | + |α ξ ρ̂0 |
applying Proposition 4(e), since ϕ (α ξ ) α, α ξ α [ϕ (α ξ )] and
α ξ ϕ. Hence by using ξ α α we have
|ψ ρ̂0 | − |ξ ρ̂0 | = |ϕ ρ̂0 | − |α ξ ρ̂0 | − |α ξ ρ̂0 |.
Dually |ψ ρ̂0 | − |ξ ρ̂0 | = |ϕ ρ̂0 | − |α ξ ρ̂0 | − |α ξ ρ̂0 | holds. Therefore
|ψ ρ̂0 | = |ψ ρ̂0 | follows from |ϕ ρ̂0 | = |ϕ ρ̂0 | and |ξ ρ̂0 | = |ξ ρ̂0 |.
Finally we obtain
val(ψ) = |sϕ| − |s(α ξ )| + |s(α ξ)| { val(ψ) = |sψ| }
= |sϕ| + |s(α ξ)| { sξ = 0IX }
= |sϕ| + |s[(α α ) ξ]| { sα = 0IX }
= val(ϕ) + |sξ|. { ξ α α }
The next theorem [1] essentially due to Ford and Fulkerson (1956) characterises
the maximality of network flows.
On the Cardinality of Relations 263
ψ = [ϕ (ξ α)] ⊕ (ξ α)
α̂ ρ ρ− = s ρ− −
1 i i (α ρ0 ρ1 )j j ρ1 t,
and so
|α̂ ρ ρ− | = |s ρ− −
0 i| + |i (α ρ0 ρ1 )j| + |j ρ1 t|
= |ρ− −
0 | + |α ρ0 ρ1 | + |ρ1 |
{ s, i, j, t : injections }
− −
≥ |ρ0 | + |ρ0 α ρ1 | + |ρ1 | { Dedekind inequality }
= |ρ−0 | + |(ρ 0 α ρ −
1 ) ρ 1 | { Theorem 6(c) }
≥ |ρ−0 | + |ρ 0 α| { (ρ0 α ρ− 1 ) ρ1 ρ0 α }
≥ |ρ−0 | + |ρ0 | { |ρ0 | ≤ |ρ0 α| }
= |∇IX |
= |∇IX i| { i : injection }
= |sα̂ s− | { ∇IX i = sα̂ s− }
= |α̂ s s− |. { s : injection }
7 Conclusion
This paper proposed Dedekind inequalities for the cardinality of boolean and
fuzzy relations, and illustrated applications to graphs and network flows. Also
we reviewed Tarski’s example for decision problem on relational formulas.
Future work is to study on proof mechanisms for the cardinality of relations
and to look for more applications in mathematics and computer science, for ex-
ample to greedoids and electrical circuits.
References
1. R. Diestel, Graph theory, Graduate texts in mathematics 173, Third Edition,
Springer, Berlin, 2005.
2. P. Freyd and A. Scedrov, Categories, allegories, North-Holland, Amsterdam, 1990.
3. Y. Kawahara and H. Furusawa, An algebraic formalization of fuzzy relations. Fuzzy
Sets and Systems 101 (1999), 125 - 135.
4. G. Schmidt and T. Ströhlein, Relations and graphs – Discrete Mathematics for
Computer Science – (Springer-Verlag, Berlin, 1993).
5. A. Tarski, Some metalogical results concerning the calculus of relations, Journal of
Symbolic Logic, 18 (2) (1953) 188–189.
Evaluating Sets of Search Points Using
Relational Algebra
Britta Kehden
1 Introduction
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 266–280, 2006.
c Springer-Verlag Berlin Heidelberg 2006
Evaluating Sets of Search Points Using Relational Algebra 267
2 Relation-Algebraic Preliminaries
In the sequel we introduce the basics of abstract and concrete relation algebra.
Starting with a definition of an abstract relation algebra, we state a selection
of relational properties and specify the classes of relations that are used in the
remainder of the paper. In the second part of this section we give a brief intro-
duction to the algebra of set-theoretic relations.
R = O ⇐⇒ LRL = L.
RS ⊆ Q ⇐⇒ R Q ⊆ S ⇐⇒ QS ⊆ R,
3 Predicates of Vectors
We define a set of vector predicates as a special set of mappings which can be
applied to vectors and return a boolean value represented by the relations L
and O of the type 1 ↔ 1. As a first step we introduce a more general set Φ of
mappings, that is a generalization of the set of relational functions that model
column-wise, described in [6]. The set of vector predicates we are interested in is
then a special subset of Φ. In detail, given a set X and a set of sets U, we define
a set of mappings
Φ⊆ [[X ↔ 1] → [Y ↔ 1]]
Y ∈U
so that for each element ϕ ∈ Φ of the type [X ↔ 1] → [Y ↔ 1] and every set
Z there exists a mapping ϕ : [X ↔ Z] → [Y ↔ Z] with the property, that for
every point p : Z ↔ 1 and every relation M : X ↔ Z the equation
ϕ(M p) = ϕ (M )p
holds. Assuming Z as the set of the first n numbers [1..n] we can regard the
relation M as a set of n vectors v (1) , . . . , v (n) (e.g. a population of an evolutionary
(i)
algorithm) of type X ↔ 1 so that vx if and only if Mxi for i ∈ [1..n] and
x ∈ X. Then the relation ϕ (M ) is of type Y ↔ Z and consists of the vectors
ϕ(v (1) ), . . . , ϕ(v (n) ) ∈ [Y ↔ 1].
First, we define the set Φ inductively and clarify how to construct a suitable ϕ
from a given ϕ. After that we prove the equation given above for every ϕ ∈ Φ. For
the definition of the set Φ we need the following two notations concerning certain
mappings. Given four sets X, Y, Z, W and a relation C : Z ↔ W we denote by
χC the constant mapping of type [X ↔ Y ] → [Z ↔ W ] with χC (R) = C for
every R : X ↔ Y . Furthermore, let id[X↔Y ] be the identity mapping of type
[X ↔ Y ] → [X ↔ Y ].
270 B. Kehden
1. Identity:
id[X↔1] := id[X↔Z]
μp μp
? ϕ ?
[X ↔ 1] - [Y ↔ 1]
Denoting the composition of mappings as ◦, the statement of Theorem 1 can
also be expressed by the equation
ϕ ◦ μp = μp ◦ ϕ .
In this work, we are especially interested in the subset of Φ that consists of the
mappings with range [1 ↔ 1]. We call
Ψ := Φ ∩ [[X ↔ 1] → [1 ↔ 1]]
the set of vector predicates. Considering the elements L and O of [1 ↔ 1] as the
boolean values ’true’ and ’false’, each ψ ∈ Ψ represents a property of vectors in
the following way. A vector v : X ↔ 1 has a certain property - modeled by ψ -
if and only if ψ(v) = L holds.
Given a ψ ∈ Ψ , the related mapping ψ has the type [X ↔ Z] → [1 ↔ Z].
Modeling a population of |Z| vectors as a relation M : X ↔ Z, the mapping
ψ determines the subset of individuals in the population fulfilling ψ, which
means that for every point p ⊆ ψ (M ) the vector M p satisfies the property
modeled by ψ. In other words, with Z = [1..n] and k ∈ Z we have the following
connection between ψ and ψ . The k th column of M fulfills the predicate ψ
if and only if ψ (M )
k holds. Hence, ψ is a kind of test mapping, testing the
columns of a relation M (representing the individuals in a population) whether
they satisfy the predicate ψ. As demonstrated in [3] and [4], the stated approach
can be applied to graph theoretical problems where the search points are sets
of vertices or edges, for example covering problems. In the next section we will
focus on the issue of relations as search points.
272 B. Kehden
Definition 3. For every two relations A and B there exist two direct products
(π1 , ρ1 ) and (π2 , ρ2 ), so that π1 Aπ2 ∩ ρ1 Bρ
2 is defined. In the following, let
A
B := π1 Aπ2 ∩ ρ1 Bρ
2
[A, B] := πA ∩ ρB
Proof. The first equation follows immediately from the definition of the parallel
composition. To show the second statement, we use the properties of direct
products stated in Section 2.1. With τ τ = I we achieve
for arbitrary relations Q and R. Now let R be total. Because ρ is also total and
σ τ = L, it follows
ρRσ τ = ρRL = ρL = L,
and therefore
πQ = L ∩ πQ
= ρRσ τ ∩ πQ
⊆ (ρRσ ∩ πQτ )(τ ∩ (ρRσ ) πQ) (Dedekind rule)
⊆ (Q
R)τ .
The remaining statement can be proven in the same way.
since the identity relations are total. Using these equations and Lemma 1, we
are able to prove multiplication formulas for parallel composition and tupling
for the special cases, where one of the relations in the parallel composition is the
identity relation. Later we will prove a formula for arbitrary relations.
Lemma 3. Let Q, R, (π, ρ) and (τ, σ) be as in Lemma 2 and S, T relations so
that τ S ∩ σT exists.
1. If ρσ exists, (Q
I)[S, T ] = [QS, T ] holds.
2. if πτ exists, (I
R)[S, T ] = [S, RT ] holds.
Proof. We only prove the first equation, because the second statement can be
shown in a similar way. The proof of the first inclusion basically uses Lemma 2:
274 B. Kehden
(Q
I)[S, T ] = (Q
I)(τ S ∩ σT )
⊆ (Q
I)τ S ∩ (Q
I)σT
⊆ πQS ∩ ρIT (Lemma 2)
= [QS, T ].
To show the second inclusion we use the fact, that
(∗) (Q I) ρT ⊆ σT
holds, which follows immediately from Lemma 2. With the inclusion (∗), we can
apply Lemma 1.
[QS, T ] = πQS ∩ ρT
= (Q
I)τ S ∩ ρT (Lemma 2)
⊆ (Q
I)(τ S ∩ σT ) (with (∗), Lemma 1 can be used)
= (Q
I)[S, T ].
(Q I)(I R) = (I R)(Q I) = (Q R)
(Q R)[S, T ] = [QS, RT ].
be the vector-representation of A.
Given a concrete relation A : X ↔ Y and the universal vector L : Y ↔ 1
the calculation of vec(A) transforms A into a vector a : X × Y ↔ 1, so that
a<x,y> ⇐⇒ Axy . In [5] it is shown that the mapping
rel : [X × Y ↔ 1] → [X ↔ Y ]
defined by
rel(a) = π (ρ ∩ sL)
is the inverse mapping of
vec : [X ↔ Y ] → [X × Y ↔ 1].
The properties of vec stated in the following lemma obviously hold in the concrete
relation algebra. Their proofs for the abstract relation algebra can be found
in [5].
Lemma 5. For relations A and B with B ∈ RA the following properties hold.
1. vec(A) = vec(A)
2. A ⊆ B ⇐⇒ vec(A) ⊆ vec(B)
3. vec(A ∩ B) = vec(A) ∩ vec(B)
4. vec(A ∪ B) = vec(A) ∪ vec(B)
5. vec(O) = O
6. vec(L) = L,
holds, if AB is defined.
The next theorem, which is the main result of this section, solves the following
problem. Given a vector s that is a vector-representation of a relation S, we want
to compute the vector-representation of the composition of S with other rela-
tions, for example vec(QS). Obviously, we can calculate vec(QS) = vec(Qrel(s))
but in this case, we have to do the transformations between vector- and relation-
representation. The formula stated in the following theorem enables us to
compute such expressions without calculating rel(s). The proof basically uses
Theorem 2.
276 B. Kehden
vec(QSR) = (Q R )vec(S).
In the case of concrete relations, we can visualize the formula stated above with
the following diagram. Therefore, let Q : Z ↔ X , R : Y ↔ W and νQ the
left-multiplication with Q.
νQ - μR -
[X ↔ Y ] [Z ↔ Y ] [Z ↔ W ]
vec vec
? νQR ?
[X × Y ↔ 1] - [Z × W ↔ 1]
are satisfied. This means that we search for relations with certain properties.
Timetable problems are typical applications for evolutionary algorithms. In each
step a population, which is a set of possible solutions, is created randomly and
then evaluated w.r.t. the desired properties. Modeling the possible solutions as
vectors enables us to represent a population as a relation, that can be evaluated
by applying a test mapping in the sense of Section 3. We apply Theorem 3
to formulate the desired properties of a timetable as a vector predicate. Hence
we can derive a test mapping that can be applied to populations in order to
determine, which of the individuals are suitable solutions for the given timetable
problem.
Definition 5. A timetable problem is a tuple
T = (M, P, H, A, P )
where
• M is a finite set of meetings,
• P is a finite set of participants,
• H is a finite set of hours,
• A : M ↔ H and
• P : M ↔ P are relations.
The relation A describes the availabilities of the meetings, i.e. Amh holds if the
meeting m can take place in time slot h. The relation P assigns participants
to meetings. The participant p takes part in meeting m, if Pmp holds. We say
that two different meetings m and m are in conflict if they have a common
participant, i.e. there is an participant p so that Pmp and Pm p holds, which
means, that p attends both meetings m and m . Defining the conflict relation
C:M↔M by C = P P ∩ I,
m and m are in conflict if and only if Cmm holds. Solving a timetable problem
means to assign a time slot to every meeting, so that the meeting is available
and two meetings that are in conflict don’t take place at the same time.
Definition 6. A timetable (a solution for the timetable problem T ) is a relation
S:M↔H
that satisfies the following four conditions.
1. ∀ m, h : Smh → Amh
2. ∀ m, m , h : (Cm m ∧ Smh ) → ¬Sm h
3. S is unique
4. S is total
The first property describes that each meeting is available in the time slot it is
assigned to, the second property ensures that no meetings in conflict are assigned
to the same time slot. The univalence and totality of S means that each meeting
takes place in exactly one time slot. Translated into relational expressions, S is
a timetable if and only if
278 B. Kehden
1. S⊆A
2. CS ⊆ S
3. SI ⊆ S
4. SL = L
A relation S fulfilling only the first three conditions is called a state or a partial
solution.
By assuming A to be the universal relation L : M ↔ H, we can ignore the first
condition. Then the problem to find a solution for T corresponds to the problem
of graph coloring in the following sense. With C being irreflexive and symmetric,
it can be interpreted as the adjacency relation of an undirected graph with the
vertex set M. Viewing H as a set of k = |H| colors, the task is to find a coloring
of the vertices with k colors, so that two vertices that are connected by an edge
don’t have the same color. This means we have to find a relation S : M ↔ H
with the properties (2) - (4) as given above. In [10] it is shown that the problem of
coloring a graph with k colors is NP-complete for k ≥ 3, therefore the timetable
problem is also NP-complete.
To simplify matters we call a vector s : M × H ↔ 1 a solution or a state of
a timetable problem T if and only if rel(s) is a solution or a state of T . In the
following, Theorem 3 will be used to translate the conditions 1 - 4 for a relation
S into conditions for the corresponding vector s = vec(S). Theorem 4 enables
us decide whether a vector s is a solution or state without computing rel(s).
Theorem 4. Let a := vec(A) and s := vec(S). Then s is a timetable if and
only if the following 4 conditions hold.
1. aa s ⊆ s
2. (C
I)s ⊆ s
3. (I
I)s ⊆ s
4. π s = L
If s fulfills the first three conditions, it is a state.
Proof. It is easy to show that the four conditions correspond to the four proper-
ties of Definition 6. The equivalence S ⊆ A ⇐⇒ aa s ⊆ s follows immediately
from Lemma 5 and the Schröder-rule. As a consequence of Theorem 3 we achieve
V := aa ∪ (C I) ∪ (I I)
s is a state ⇐⇒ V s ⊆ s.
Evaluating Sets of Search Points Using Relational Algebra 279
Note, that a similar result, but with a much more complicated proof, can be
found in [8].
The verification relation V enables us to model the timetable problem
T = (M, P, H, A, P ) as a 3-tuple (M, H, V ). For V being symmetric and ir-
reflexive, it can be regarded as a adjacency relation of an undirected graph G.
A vector s with V s ⊆ s then represents an independent set of G. Hence, the
problem to find a state of T with a maximum number of assigned meetings can
be transformed into the problem to find an independent set of a graph with a
maximum number of vertices.
It is quite simple to derive a vector predicate in the sense of Section 3 of the
inclusion stated above. It holds
V s ⊆ s ⇐⇒ L(V s ∩ s) = L,
where the first universal relation is of the type 1 ↔ M × H and the second one
of the type 1 ↔ 1. We obtain the vector predicate ψst : [M × H ↔ 1] → [1 ↔ 1]
defined by
ψst (s) = L(V s ∩ s)
to test, whether a vector s is a state of the timetable problem T . Following
Section 3, we derive for an arbitrary n ∈ N the corresponding test mapping
ψst : [M × H ↔ [1..n]] → [1 ↔ [1..n]] by
ψst (M ) = L(V M ∩ M ),
ψto (s) = Lπ s
that select all columns of M representing total relations. Hence we achieve the
predicate ψsol = ψst ∩ψto to decide, whether a vector is a solution of the timetable
problem T . According to Section 3, the test mapping ψsol = ψst ∩ ψto can be
used to select timetables of a set of possible solutions.
6 Conclusions
The combination of relational algebra and evolutionary algorithms is a promising
research direction. Sets of search points can be modeled and evaluated with
280 B. Kehden
References
1. Berghammer R.: A generic program for minimal subsets with applications. Leuschel
M., editor, “Logic-based Program Development and Transformation” (LOPSTR
’02) (proceedings), LNCS 2664, Springer, 144-157, 2003.
2. Berghammer R., Milanese U.: Relational approach to Boolean logic problems.
W.MacCaull, M.Winter and I.Duentsch: Relational Methods in Computer Science,
LNCS 3929, Springer, 2006
3. Kehden B., Neumann F., Berghammer R.: Relational implementation of simple
parallel evolutionary algorithms. W.MacCaull, M.Winter and I.Duentsch: Rela-
tional Methods in Computer Science, LNCS 3929, Springer, 2006
4. Kehden, B., Neumann F.: A Relation-Algebraic View on Evolutionary Algorithms
for Some Graph Problems. Gottlieb and Raidl (Eds.): 6th European Conference on
Evolutionary Computation in Combinatorial Optimization, LNCS 3906, Springer,
147 - 158, 2006.
5. Schmidt G., Ströhlein T.: Relations and graphs. Springer,1993.
6. Berghammer R.: Relational-algebraic computation of fixed points with applica-
tions. The Journal of Logic and Algebraic Programming 66, 112 - 126, 2006.
7. Berghammer R., Zierer H.: Relational algebraic semantics of deterministic and
nondeterministic programs. Theoretical Computer Science 43, 1986.
8. Schmidt, G. Ströhlein, T: Some aspects in the construction of timetables. Infor-
mation processing 74 , Proc. IFIP Congress, Stockholm, 516 - 520, 1074 North-
Holland, Amsterdam, 1974.
9. Schmidt G., Ströhlein, T.: A Boolean matrix iteration in timetable construction.
Linear Algebra and Appl. 15, no. 1, 27 - 51, 1976.
10. Wegener I.: Complexity Theory. Springer, 2005.
Algebraization of Hybrid Logic with Binders
Tadeusz Litak
1 Introduction
1.1 Motivation
The aim of this paper is to provide an algebraic semantics for hybrid logic with
binders H(↓, @). This formalism is, as was proven in the 1990’s [1], the modal
counterpart of the bounded fragment of first-order logic. Hence, an algebraiza-
tion of H(↓, @) provides also an algebraic insight into the nature of bounded
quantification, i.e., quantification of the form ∀x(tRx → φ) and ∃x(tRx ∧ φ),
where t is a term not containing x. The fragment of first-order logic obtained by
allowing only such quantifiers was investigated in the 1960’s by Feferman and
Kreisel [2], [3]. A discovery they made is that formulas in this fragment are ex-
actly those which are preserved by formation of generated submodels, as modal
logicians would say, or — to use Feferman’s term — outer extensions.
The aim of this paper is to present a class of algebras which are hybrid (or
bounded) equivalent of cylindric algebras for first-order logic. These algebras are
substitution-satisfaction algebras (SSA’s), boolean algebras equipped with three
kinds of operators: ↓k corresponding to binding of variable ik to the present state,
@k saying that a formula is satisfied in the state named by ik and standard
modal operator 3, corresponding to restricted quantification itself. The theory
of cylindric algebras proves to be an important source of insights and methods,
but not all techniques can be applied directly to SSA’s. For example, cylindric
algebras often happen to be simple. For locally finite dimensional ones, subdirect
irreducibility is equivalent to simplicity and in the finitely dimensional case, we
even have a discriminator term. SSA’s are not so well-behaved. Another example:
in cylindric algebras, the operation of substitution of one variable for another
is always definable in terms of quantifier operators. SSA’s do not allow such a
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 281–295, 2006.
c Springer-Verlag Berlin Heidelberg 2006
282 T. Litak
feat. And yet, it turns out that their representation theory is not much more
complicated than in the cylindric case.
Algebraic operators formalizing substitutions in first-order logic have been
studied since Halmos started working on polyadic algebras [4]. In particular,
they play a prominent role in formalisms developed by Pinter in the 1970’s, cf.,
e.g., [5]. Nevertheless, algebras studied in the present paper do not have full
substitution algebras as reducts — certain substitution operators are missing.
Besides, as Halmos himself observed, the most interesting thing about satisfac-
tion operators is their interplay with quantifiers — and bounded quantifiers do
not interact with substitution operators in the same way as standard quantifiers
do.
The structure of the present paper is as follows. In Section 1.2, we introduce
the bounded fragment and H(↓, @) as well as the truth preserving translation
that show they are expressively equivalent. In Section 2, we introduce concrete,
set-theoretical instantiation of SSA’s — our counterpart of cylindric set alge-
bras. In Section 3 we characterize SSA’s axiomatically. Also, we prove some
useful arithmetical facts and characterize basic algebraic notions, such as con-
gruence filters or subdirect irreducibility. Section 4 contains main results of the
paper. First, we identify Lindenbaum-Tarski algebras of hybrid theories as those
which are properly generated. It is a more restrictive notion than the notion of
local finiteness in the case of cylindric algebras. Then we show that every prop-
erly generated algebra of infinite (countable) dimension can be represented as a
subdirect product of set algebras. In other words, we provide a representation
theorem for SSA’s and thus an algebraic proof of completeness of H(↓, @). The
proof was inspired by a concise proof of representation theorem for cylindric
algebras by Andréka and Németi [6].
The author wishes to thank heartfully Ian Hodkinson for inspiration to begin
the present research and for invaluable suggestions how to tackle the issue. The
author can only hope that this advice was not entirely wasted. Thanks are also
due to Patrick Blackburn for his ability to seduce people into doing hybrid logic
and to the anonymous referee for suggestions and comments on the first version
of this paper.
2, ∨ and → are introduced as usual. Some papers introduced one more kind
of syntactic objects: nominal constants, which cannot be bound by ↓. They do
not increase the expressive power of the language and for our present goal the
Algebraization of Hybrid Logic with Binders 283
disadvantages of introducing such objects would outweigh the merits. They can
be replaced by free unquantified variables.
Hybrid formulas are interpreted in models. A model M := W, R, V consists
of an arbitrary non–empty set W , a binary accessibility relation R ⊆ W × W
and a (propositional) valuation V : pa → A ∈ P(W ) mapping propositional
variables to subsets of W . A (nominal) assignment in a model is any mapping
v : ik → w ∈ W of nominal variables to elements of W . For an assignment
v, k ∈ α+ and w ∈ W , define vw k
to be the same assignment as v except for
v(ik ) = w. The notion of satisfaction of formula at a point is defined inductively:
Fix any first order-language with a fixed binary relation constant R, unary
predicate constants {Pa }a∈P ROP and variables in V AR := {xk }k∈α+ ∪ {x, y}.
The bounded fragment is generated by the following grammar:
STx STy
ik x ≈ xk y ≈ xk
pa Pa (x) Pa (y)
ψ ∧ φ STx (ψ) ∧ STx (φ) STy (ψ) ∧ STy (φ)
¬ψ ¬STx (ψ) ¬STy (ψ)
3φ ∃y.(xRy ∧ STy (φ)) ∃x.(yRx ∧ STx (φ))
@ik φ ∃x.(x ≈ xk ∧ STx (φ)) ∃y.(y ≈ xk ∧ STy (φ))
↓ik .φ ∃xk .(x ≈ xk ∧ STx (φ)) ∃xk .(y ≈ xk ∧ STy (φ))
This mapping is known as the standard translation.
Proof: See, e.g., Section 3.1 of Areces et al. [1] or Section 9.1 of ten Cate [7].
The apparatus of binders and satisfaction operators makes also the reverse
translation possible. Let the supply of individual variables be {xk }k∈α+ ; no dis-
tinguished variables this time. Define
Proof: See Section 3.1 of Areces et al. [1] or Section 9.1 of ten Cate [7].
In short, H(↓, @) and the bounded fragment of first-order logic have the same
expressive power. There is a beautiful semantic characterization of first-order
formulas equivalent to those in the bounded fragment: these are exactly formulas
invariant for generated submodels. Unfortunately, we cannot enter into details
here: cf. Feferman [3] or Areces et al. [1].
2 Concrete Algebras
– di := {x | x0 = xi },
– @i X := {y | ∃x ∈ X.x0 = xi &∀j = 0.xj = yj },
– ↓i X := {y | ∃x ∈ X.x0 = xi &∀j = i.xj = yj },
– 3X := {y | ∃x ∈ X.y0 Rx0 }.
With every model M = W, R, V we can associate the structure SsM. Namely,
with every formula φ whose nominal variables are in {ik }k∈α+ we can associate
the set φM = {v ∈ W α | v0 M,v|α+ φ}; v|α+ is identified with the corresponding
assignment of nominal variables. Such sets form a field of sets closed under ↓k,
@k , 3R and all diagonals. This is exactly the algebra SsM ∈ cssaα . Let us
record the following basic
In order to characterize those cssaα ’s which are of the form SsM for some
M, let us introduce the notion of a dimension set Δa := {i ∈ α+ |↓k a = a}.
An element a is zero-dimensional if Δa = 0. The family of all zero-dimensional
elements of A is denoted by A[0] . The algebra generated (as cssaα ; of course, all
constant elements are also treated as generators) from A[0] is denoted as [A0 ]. A
is called properly generated 1 if A = [A0 ]. A is called locally finitely dimensional
if #Δa < ω for every a. Finally, A ∈ cssaα with base W, R is called 0-regular
if for every a ∈ A, every v, w ∈ W α , v ∈ a and v0 = w0 implies w ∈ a.
Theorem 3. A ∈ cssaα based on W, R is of the form SsM for some hybrid
model M with the same base iff it is properly generated and regular.
1
We avoid the notion zero-generated as it could be misleading: algebraists usually call
this way the smallest subalgebra, i.e., the algebra generated from constants.
286 T. Litak
Proof: The left-to-right direction has already been proven. For the converse, let
A ∈ fssaα be a properly generated and regular algebra based on F = W, R .
For any a ∈ A[0] , let V (pa ) = {w ∈ W | ∃v ∈ a.w = v0 }. Let M = F, V . We
want to show A = SsM. The bases of both algebras and hence the fundamental
operations on the intersection of both universes coincide. Thus, in order to show
the ⊆-direction, it is enough to show that for every a ∈ A[0] , a = pM a . For
every v ∈ W α , v ∈ pM a iff v0 ∈ V (pa ) iff v0 = w0 for some w ∈ a iff (by 0-
regularity) v ∈ a. For the reverse inclusion, observe that the atomic formulas in
the language of M are always of the form pa or ik . The proof proceeds then by
standard induction on the complexity of formulas.
3 Abstract Approach
Proof: Follows from Lemma 7 and The Rasiowa-Sikorski Lemma: cf. Koppel-
berg [9, Theorem 2.21] . We briefly sketch the proof here to make the paper
more self-contained. Let b0 , b1 , b2 . . . be an enumeration of all elements of the
form @j 3p for some j ∈ α+ and p ∈ A: here is where we use the fact that
universe of A is countable. Define a0 := a. If an is defined, let an+1 := an if
an ∧ bn = ⊥. Otherwise, assume bn = @j 3p. Lemma 7 implies there is k ∈ α+
s.t. an+1 := an ∧ @j 3dk ∧ @k p = ⊥. In this way we obtain an infinite descending
chain of nonzero points. Any ultrafilter containing {an }n∈ω is elegant.
This section proves the main result of the paper. We identify those SSA’s which
correspond to Lindenbaum-Tarski algebras of H(↓, @)-theories and prove a rep-
resentation theorem for them.
Algebraization of Hybrid Logic with Binders 289
In case of locally finite algebras of infinite dimension, we can restrict our at-
tention only to retractions, i.e., products of replacements: this will be justified
further on. A similar observation for locally finite polyadic algebras was made
by Halmos [4]. Finally, a bit of notation. For τ a transformation, τkl be the sub-
stitution defined as τkl (j) = τ (j) for j = l and τkl (l) = k. Also, let τ − l be the
transformation which is the same as τ except that it leaves l unchanged. Thus,
τkl is the composition of τ − l and (l/k).
We present an axiom system for H(↓, @) taken from Blackburn and ten Cate [8],
[7]. A nominal variable ik is called bound in a formula φ if it occurs within the
scope of some ↓ik and free otherwise.
with τ for terms is defined in the same way as for hybrid formulas with dk , ↓k and
@k replacing, respectively, ik , ↓ik and @ik . Define TA := {φ ∈ F orm | Φ = }.
First, we show this is a H(↓, @)-theory. The only part which is not immediate is
showing that all instances of H9 belong to T .
Lemma 11. Ψ (l/k) =↓l Ψ (l/k) for l = k.
Proof: The only relevant information for the basic inductive step is that pa ’s
correspond to a ∈ A[0] . The inductive steps are trivial for booleans and use Ax7,
Ax6a and Ax5c for modal, satisfaction and substitution operators.
@l dk ≤ Ψ ↔ Ψ (l/k) . (2)
For then we get that dk ≤↓l Ψ ↔↓l Ψ (l/k) . By Lemma 11, it is equivalent to
dk ≤↓l Ψ ↔ Ψ (l/k) . By laws of boolean algebras, it is equivalent to dk ∧ ↓l Ψ =
dk ∧ Ψ (l/k) . But then
We have proven that T is indeed a H(↓, @)-theory, but before proceeding with
the proof that A is isomorphic to F orm/TA let us record two useful consequences
of the Lemma just proven.
Corollary 4. If Ψ = , then for arbitrary retraction τ and arbitrary k in the
range of τ , @k Ψ τ = .
We can also justify the observation made before: that in locally finite algebras
of infinite dimension, the only kind of transformations which are relevant are
retractions, i.e., products of replacements. In view of Lemma 10, it is enough to
show the following.
Corollary 5. For arbitrary transposition (k, l) and for every Φ, there exists a
retraction τ s.t. Φ(k,l) = Φτ .
Proof: Choose any m ∈ ΔΦ ∪ {k, l} (here is where we use the fact that A
is locally finite and of infinite dimension). Define τ = (m/k)(k/l)(l/m). The
only argument where τ can possibly differ from (k, l) is m, for τ (m) = k and
(k, l)(m) = m. But then Ψ τ =↓m Ψ τ =↓m @m ↓m Ψ τ =↓m @m Ψ (k,l) =↓m Ψ (k,l) =
Ψ (k,l) .
292 T. Litak
Proof: That ∼F is a congruence relation follows from Ax3c, Ar4 and Ar5.
Correctness of the definition of RF follows from Ar4 and Ar7.
Proof: Just like in Section 4.3, associate with elements of A formulas of the
language whose propositional variables are {pa | a ∈ A[0] }, so that every formula
ψ corresponds to a term Ψ in the extended language and every element a ∈ A is
named by such a term. Define a valuation VH of propositional variables in FH
by
VH (pa ) := {[k] | @k a ∈ H}.
Let M = FH , VH . We are going to show that A is isomorphic to SsM. By
Corollary 5, we can restrict our attention only to those τ ’s which are retractions.
Thus, by Lemma 10 it is enough to formulate all claims and proofs only for
replacements. For a mapping τ : α → α+ , let τ + := τ |α+ . For arbitrary term Ψ ,
define auxiliary mapping g as
+
g (Ψ ) := {τ : α → α+ | @τ (0) Ψ τ ∈ H},
and then
Claim 2: v(l/k)(ψ) = v(ψ (l/k) ). Thus, for every σ, v σ (ψ) = v(ψ σ ) and
l
v σ (l/k)(ψ) = v(ψ σk ).
of Ax3d and the fact that H is elegant, if @k (Ψa ∧ ¬Ψb ) = @k 1 2 (Ψa ∧ ¬Ψb )
for some 1 consisting only of diamonds and satisfaction operators, then for
some l ∈ α+ , @l 2 (Ψa ∧ ¬Ψb ) ∈ H. In other words, we can get rid of initial
diamonds and satisfaction operators. @l ↓m (2 (Ψa ∧¬Ψb )) ∈ H can be rewritten
as @l (2 (Ψa ∧ ¬Ψb ))(m/l) ∈ H. Proceeding in this way, we finally obtain that for
some j and some σ, @j (Ψaσ ∧ ¬Ψbσ ) ∈ H. Reasoning the same way as in the proof
that f is correctly defined, we finally obtain that Ψa → Ψb = , i.e., a ≤ b.
f is in fact an isomorphism onto SsM, cf. the proof of Theorem 3.
Proof: For countable algebras, this already follows from Theorem 6. For un-
countable A, we can prove it very similarly to Lemma 3 in [6]. Namely, let
{Bl }l∈β be a directed system
of s.i. algebras in I(cssaα ) sharing a common
opremum element. Then Bl ∈ I(cssaα ). Lack of space (i.e., LNCS 15 pages
l∈β
limit) prevents us from proving the theorem in detail.
SSA’s — for example, in terms of databases where the user is allowed to ask
questions concerning only accessible entries?
References
1. Areces, C., Blackburn, P., Marx, M.: Hybrid logic is the bounded fragment of first
order logic. In de Queiroz, R., Carnielli, W., eds.: Proceedings of 6th Workshop
on Logic, Language , Information and Computation, WOLLIC99, Rio de Janeiro,
Brazil (1999) 33–50
2. Feferman, S., Kreisel, G.: Persistent and invariant formulas relative to theories of
higher order. Bulletin of the American Mathematical Society 72 (1966) 480–485
Research Announcement.
3. Feferman, S.: Persistent and invariant formulas for outer extensions. Compositio
Mathematica 20 (1968) 29–52
4. Halmos, P.: Algebraic Logic. Chelsea Publishing Company (1962)
5. Pinter, C.: A simple algebra of first order logic. Notre Dame Journal of Formal
Logic 1 (1973) 361–366
6. Andréka, H., Németi, I.: A simple, purely algebraic proof of the completeness of
some first order logics. Algebra Universalis 5 (1975) 8–15
7. ten Cate, B.: Model theory for extended modal languages. PhD thesis, University
of Amsterdam (2005) ILLC Dissertation Series DS-2005-01.
8. Blackburn, P., Cate, B.: Pure extensions, proof rules, and hybrid axiomatics. In
Schmidt, R., Pratt-Hartmann, I., Reynolds, M., Wansing, H., eds.: Preliminary
proceedings of Advances in Modal Logic (AiML 2004), Manchester (2004)
9. Koppelberg, S.: Handbook of boolean algebras. Volume I. Elsevier, North-Holland
(1989)
10. Tarski, A.: A simplified formalization of predicate logic with identity. Archiv für
Mathematische Logik und Grundlagenforschung 7 (1965)
11. Henkin, L., Monk, J., Tarski, A.: Cylindric algebras, Part II. North Holland,
Amsterdam (1985)
12. Andréka, H., Givant, S., Mikulás, S., Németi, I., Simon, A.: Notions of density
that imply representability in algebraic logic. Annals of Pure and Applied Logic
91 (1998) 93–190
13. Monk, D.: An introduction to cylindric set algebras (with an appendix by H.
Andréka). Logic Journal of the IGPL 8 (2000) 451–506
14. Van den Bussche, J.: Applications of Alfred Tarski’s ideas in database theory.
Lecture Notes in Computer Science 2142 (2001) 20–37
Using Probabilistic Kleene Algebra
for Protocol Verification
1 Introduction
The verification of probabilistic systems creates significant challenges for formal
proof techniques. The challenge is particularly severe in the distributed context
where quantitative system-wide effects must be assembled from a collection of
disparate localised behaviours. Here carefully prepared probabilities may become
inadvertently skewed by the interaction of so-called adversarial scheduling, the
well-known abstraction of unpredictable execution order.
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 296–310, 2006.
c Springer-Verlag Berlin Heidelberg 2006
Using Probabilistic Kleene Algebra for Protocol Verification 297
One approach is probabilistic model checking, but it may quickly become over-
whelmed by state-space explosion, and so verification is often possible only for
small problem instances. On the other hand quantitative proof-based approaches
[10,4], though in principle independent of state-space issues, may similarly fail
due to the difficulties of calculating complicated probabilities, effectively “by
hand”.
In this paper we propose a third way, in which we apply proof as a “pre-
processing” stage that simplifies a distributed architecture without the need to
do any numerical calculations whatsoever, bringing the problem within range
of quantitative model-based analysis after all. It uses reduction, the well-known
technique allowing simplification of distributed algorithms, but applied in the
probabilistic context.
We describe a program algebra pKA introduced elsewhere [8] in which stan-
dard Kleene algebra [5] has been adapted to reflect the interaction of proba-
bilistic assignments with nondeterminism, a typical phenomenon in distributed
algorithms. Standard (i.e. non-probabilistic) Kleene algebra his been used ef-
fectively to verify some non-trivial distributed protocols [1], and we will argue
that the benefits carry over to the probabilistic setting as well. The main dif-
ference between pKA and standard Kleene Algebra is that pKA prevents cer-
tain distributions of nondeterminism +, just in those cases where whether that
nondeterminism can “see” probabilistic choices is important [16,3,10]. That dis-
tribution failure however removes some conventional axioms on which familiar
techniques depend: and so we must replace those axioms with adjusted (weaker)
probabilistic versions.
Our case study is inspired by Rabin’s solution to the mutual exclusion problem
with bounded waiting [14,6], whose original formulation was found to contain
some subtle flaws [15] due precisely to the combination of adversarial and prob-
abilistic choice we address. Later it became clear that the assumptions required
for the correctness of Rabin’s probabilistic protocol — that the outcome of some
probabilistic choices are invisible to the adversary — cannot be supported by
the usual model for probabilistic systems. We investigate the implications on the
model and algebra of adopting those assumptions which, we argue, have wider
applications for secrecy and probabilities.
Our specific contributions are as follows.
1. A summary of pKA’s characteristics (Sec. 2), including a generalisation of
Cohen’s work on separation [1] for probabilistic distributed systems using
pKA (Sec. 4);
2. Application of the general separation results to Rabin’s solution to distrib-
uted mutual exclusion with bounded waiting (Sec. 5);
3. Introduction of a model which supports the algebraic characterisation of
secrecy in a context of probability (Sec. 6).
The notational conventions used are as follows. Function application is repre-
sented by a dot, as in f.x. If K is a set then K is the set of discrete probability
distributions over K, that is the normalised functions from K into the real in-
terval [0, 1]. A point distribution centered at a point k is denoted by δk . The
298 A.K. McIver, E. Cohen, and C.C. Morgan
flip =
ˆ s := 0 1/2 ⊕ s := 1 . (1)
In contrast a program that simulates a possible bias favouring 0 of at most
2/3 is modelled by a nondeterministic choice delimiting a range of behaviours:
biasFlip =
ˆ s := 0 1/2 ⊕ s := 1 s := 0 2/3 ⊕ s := 1 , (2)
and in the semantics (given below) its result set is represented by the set of
distributions defined by the two specified probabilistic choices at (2).
In setting out the details, we follow Morgan et al. [12] and take a domain the-
oretical approach, restricting the result sets of the semantic functions according
to an underlying order on the state space. We take a flat domain (S , ), where
S is S ∪ {} (in which is a special state used to model miraculous behav-
iour) and the order is constructed so that dominates all (proper) states in
S, which are otherwise unrelated.
Probabilistic programs are now modelled as the set of functions from initial
state in S to sets of final distributions over S , where the result sets are
restricted by so-called healthiness conditions characterising viable probabilistic
Using Probabilistic Kleene Algebra for Protocol Verification 299
Skip skip.s =
ˆ {δs } ,
Miracle magic .s =
ˆ {δ } ,
Chaos
Composition
chaosK .s
(Prog; Prog ).s
=
ˆ
=
ˆ
PK
{ u : S (d.u)×du | d ∈ Prog.s; du ∈ Prog .u} ,
Choice (if B then Prog else Prog ).s =
ˆ if B.s, then Prog.s, otherwise Prog .s
Probability (Prog p ⊕ Prog ).s =
ˆ {d p ⊕ d | d ∈ r.s; d ∈ r .s} ,
Nondeterminism (Prog
Prog ).s =
ˆ {d | d ∈ (Prog.s ∪ Prog .s)} ,
Iteration Prog∗ =
ˆ (νX · Prog; X
1) .
In the above definitions s is a state in S and K is the smallest up-, convex- and Cauchy-closed
subset of distributions containing K. Programs are denoted by Prog and Prog , and the expression
(νX · f.X) denotes the greatest fixed point of the function f — in the case of iteration the function is
the monotone -program-to-program function λX · (Prog; X
1). All programs map to {δ }.
where flip was defined at (1). It is easy to see that the iteration halfFlip∗ cor-
responds to a transition system which can (but does not have to) flip the state
from s = 0 an arbitrary number of times. Thus after n iterations of halfFlip,
the result set contains the distribution δ0 /2n + (1−1/2n )δ1 . Cauchy Closure im-
plies the result distribution must contain δ1 as well, because δ0 /2n + (1−1/2n)δ1
converges to that point distribution as n approaches infinity.
We shall repeatedly make use of tests, defined as follows. Given a predicate
B over the state s, we write [B] for the test
viz. the program which skips if the initial state satisfies B, and behaves like a
miracle otherwise. We use [¬B] for the complement of [B]. Tests are standard
(non-probabilistic) programs which satisfy the following properties.
Now we have introduced a model for general probabilistic contexts, our next
task is to investigate its program algebra. That is the topic of the next section.
Using Probabilistic Kleene Algebra for Protocol Verification 301
Definition 3. Assume that for all simple variables x, the denotation |[x]| ∈ LS
as a program (including tests) is given explicitly. We interpret the Kleene oper-
ators over terms as follows:
We use ≥ for the order in pKA, which we identify with from Def. 2; the
next result shows that Def. 3 is a valid interpretation for the rules in 1, in that
theorems in pKA apply in general to probabilistic programs.
Theorem 1. ([8]) Let |[·]| be an interpretation as set out at Def. 3. The rules
at Fig.2 are all satisfied, namely if a ≤ b is a theorem of pKA set out at Fig.2,
then |[b]| |[a]|.
To see why we cannot have equality at (†) in Fig.2, consider the expressions
a(b + c) and ab + ac, and an interpretation where a is flip at (1), and b is skip
and c is s := 1−s. In this case in the interpretation of a(b + c), the demon (at +)
is free to make his selection after the probabilistic choice in a has been resolved,
and for example could arrange to set the final state to s = 0 with probability
1, since if a sets it to 0 then the demon chooses to execute b, and if a sets it
to 1, the demon may reverse it by executing c. On the other hand, in ab + ac,
the demon must choose which of ab or ac to execute before the probability in a
has been resolved, and either way there is a chance of at least 1/2 that the final
state is 1. (The fact that distribution fails says that there is more information
available to the demon after execution of a than before.)
Similarly the rule at Fig.2 (‡) is not the usual one for Kleene-algebra. Normally
this induction rule only requires a weaker hypothesis, but that rule, ab ≤ a ⇒
ab∗ = a, is unsound for the interpretation in LS, again due to the interaction
of probability and nondeterminism. Consider, for example, the interpretation
where each of a, b and c represent the flip defined at (1) above. We may prove
302 A.K. McIver, E. Cohen, and C.C. Morgan
directly that flip ; flip∗ = s := 0 s := 1, i.e. flip ; flip∗ = flip in spite of the
fact that flip ; flip = flip. To see why, we note that from Def. 3 the Kleene-star
is interpreted as an iteration which may stop at any time. In this case, if a result
s = 1 is required, then flip executes for as long as necessary (probability theory
ensures that s = 1 will eventually be satisfied). On the other hand if s = 0 is
required then that result too may be guaranteed eventually by executing flip
long enough. To prevent an incorrect conclusion in this case, we use instead the
sound rule (‡) (for which the antecedent fails). Indeed the effect of the (1 + ·)
in rule (‡) is to capture explicitly the action of the demon, and the hypothesis
is satisfied only if the demon cannot skew the probabilistic results in the way
illustrated above.
pKA purposefully treats probabilistic choice implicitly, and it is only the fail-
ure of the equality at (†) which suggests that the interpretation may include
probability: in fact it is this property that characterises probabilistic-like mod-
els, separating them from those which contain only pure demonic nondetermin-
ism. Note in the case that the interpretation is standard — where probabilities
are not present in a — then the distribution goes through as usual. The use
of implicit probabilities fits in well with our applications, where probability is
usually confined to code residing at individual processors within a distributed
protocol and nondeterminism refers to the arbitrary sequencing of actions that
is controlled by a so-called adversarial scheduler [16]. For example, if a and b
correspond to atomic program fragments (containing probability), then the ex-
pression (a + b)∗ means that either a or b (possibly containing probability) is
executed an arbitrary number of times (according to the scheduler), and in any
order — in other words it corresponds to the concurrent execution of a and b.
Typically a two-stage verification of a probabilistic distributed protocol might
involve first the transformation a distributed implementation architecture, such
as (a + b)∗ , to a simple, separated specification architecture, such as a∗ b∗ (first
a executes for an arbitrary number of times, and then b does), using general
hypotheses, such as ab = ba (program fragments a and b commute). The second
stage would then involve a model-based analysis in which the hypotheses pos-
tulated to make the separation go through would be individually validated by
examining the semantics in LS of the precise code for each. We do not deal with
Using Probabilistic Kleene Algebra for Protocol Verification 303
that stage here: indeed our purpose is precisely to make that stage a separate
concern, not further complicated by the algorithm under study.
In the following sections we introduce our case study and illustrate how pKA
may be used to simplify the overall analysis.
In this section we describe the mutual exclusion protocol, and discuss how to
apply the algebraic approach to it.
These events occur in a single round of the protocol; the verifier of the protocol must
ensure that when these program fragments are implemented, they satisfy the algebraic
properties set out at Fig.4.
Fig. 3. The key events in a single round of the mutual exclusion protocol
Lemma 1.
Proof. The proof of (5) is set out elsewhere [8]. For (6) we have the following
inequalities, justified by the hypothesis and monotonicity.
Now applying (xiii), we deduce that a∗ cb∗ = cb∗ , and the result now follows since
a∗ c ≤ a∗ cb∗ .
Using Probabilistic Kleene Algebra for Protocol Verification 305
The calculation above is based on the assumption that P is eligible to vote when
it is first scheduled in a round. The mechanism for testing eligibility uses a round
number as part of the shared variable, and after a process votes, it sets a local
variable to the same value as the round number recorded by the shared variable.
By this means the process is prevented from voting more than once in any round.
In the case that the round number is unbounded, P will indeed be eligible to
vote the first time it is scheduled. However one of Rabin’s intentions was to
restrict the size of the shared variable, and in particular the round number. His
observation was that round numbers may be reused provided they are chosen
randomly at the start of the round, and that the scheduler cannot see the result
when it decides which process to schedule. In the next section we discuss the
implications of this assumption on L and pKA.
The problem is that the interpretation in LS assumes that the value chosen by R
is observable by all, in particular by the adversarial scheduler, that latter imply-
ing that the scheduler can use the value during voting to determine whether to
schedule P . In a multi-round scenario, that would in turn allow the policy that P
is scheduled only when its just-selected round variable is (accidentally) the same
as the current global round: while satisfying fairness (since that equality happens
infinitely often with probability one), it would nevertheless allow P to be sched-
uled only when it cannot possibly win (in fact will not even be allowed to vote).
Clearly that strategy must be prevented (if the algorithm is to be correct!) —
and it is prevented provided the scheduler cannot see the value set by R. Thus
we need a model to support algebraic characterisations for “cannot see”.
The following (sketched) description of a model QS [9, Key QMSRM] —
necessarily more detailed than QS — is able to model cases where probabilistic
outcomes cannot be seen by subsequent demonic choice. The idea (based on
“non-interference” in security) is to separate the state into visible and hidden
parts, the latter not accessible directly by demonic choice. The state s is now a
pair (v, h) where v, like s, is given some conventional type but h now has type
distribution over some conventional type. The QS model is effectively the LS
model built over this more detailed foundation.3
For example, if a sets the hidden h probabilistically to 0 or 1 then (for some
p) in the QS model a denotes
a
Hidden resolution of probability. (v, h) → { (v, (0 p ⊕ 1) ) } .4
3
Thus we have “distributions over values-and-distributions” so that the type of a
program in QS is (V × H) → P (V × H) , that is LS where S = V × H.
4
Strictly speaking we should write δ0 p ⊕ δ1 .
308 A.K. McIver, E. Cohen, and C.C. Morgan
a(c + d) = ac + ad
but in general b(c + d) = bc + bd ,
because in the a case the nondeterminism between c and d “cannot see” the
probability hidden in h. In the b case, the probability (in v) is not hidden.
A second effect of hidden probability is that tests are no longer necessarily
“read-only”. For example if t denotes the test [h = 0] then we would have (after
a say)
t
(v, (0 p ⊕ 1) ) → {(v, 0) p ⊕ magic }
where the test, by its access to h, has revealed the probability that was formerly
hidden and, in doing so, has changed the state (in what could be called a par-
ticularly subtle way — which is precisely the problem when dealing with these
issues informally!)
In fact this state-changing property gives us an algebraic characterisation of
observability.
Definition 4. Observability; resolution.
For any program a and test t we say that “t is known after a” just when
which, now back in the model we can compute easily to be magic 1/2 ⊕ chaos,
deducing that the chance that the scheduler may guess the round number is at
most 1/2, and not 1 at all.
References
6
Here we are abusing notation, by using program syntax directly in algebraic expres-
sions.
310 A.K. McIver, E. Cohen, and C.C. Morgan
a∗ a∗ = a∗ (9)
∗ ∗ ∗ ∗
a (b + c) = a (a b + a c) (10)
Monotone Predicate Transformers
as Up-Closed Multirelations
1 Introduction
Until recently it was commonly accepted that if programs and specifications are
to be modelled in a single framework then a predicate transformer semantics
could be defined in terms of monotone predicate transformers but there is no
traditional relational model. However, game theoretic descriptions [16,3] of a
specification computation with both angelic and demonic nondeterminism have
suggested that there is indeed a relational representation in terms of binary
multirelations as introduced in [24]. The basic idea is that binary multirelations,
being relations from states to sets of states, specify computations at the level
of properties that an atomic step has to satisfy, while binary relations, being
relations between states, specify computations at the level of states that an
atomic step may reach.
Within the multirelational model we may still define the traditional relational
model capturing angelic- or demonic nondeterminism. But in addition multirela-
tions can model two kinds of nondeterminism: demonic nondeterminism in terms
of states at the level of the computations specified, and angelic nondeterminism
in terms of properties at the level of the specifications. This multirelational
model is more than just an empty generalisation of the traditional relational
model. It in fact corresponds, in the precise sense of a Jónsson/Tarski [17] du-
ality, to monotone predicate transformer semantics. This and lattice-theoretic
properties of families of multirelations have been studied in [24]. A subsequent
paper [18] demonstrates how multirelations can be used for the specification of
multi-agent systems involving human-information interactions including resource
sharing protocols and games.
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 311–327, 2006.
c Springer-Verlag Berlin Heidelberg 2006
312 I. Rewitzky and C. Brink
In standard relational models for programs a binary relation specifies the input-
output behaviour of a program in terms of the states it may reach from a given
state. Lifting this description from the level of states to the level of properties,
and using an idea that goes back to Hoare’s [15] seminal paper of 1969, the
behaviour of a program α may be specified in terms of the postconditions (or
the properties) that it has to satisfy, that is, if α has demonic choice then
captures the angelic choices available to the user (or angel). If this set includes
the empty set then it is a winning strategy for the angel. While for each Q with
sRα Q, the set
{t | t ∈ Q}
captures the choices available to the machine (or demon). Therefore, a specifica-
tion computation α may be represented as a relation Rα , the idea being that α,
when started in state s is guaranteed to achieve postcondition Q for some angelic
choice regardless of the demonic choices. We may formalise this representation
of a specification computation α in terms of a binary multirelation Rα relating
states and postconditions.
Definition 1. Let X and Y be sets. A binary multirelation is a subset of the
Cartesian product X × P(Y ), that is, a set of ordered pairs (x, Q) where x ∈ X
and Q ⊆ Y . The image under a multirelation R of any x ∈ X is denoted R(x)
and defined to be the set {Q ⊆ Y | xRQ}. Mostly we will deal with the case of
X = Y = S.
For any binary multirelations R, T ⊆ S ×P(S), their composition may be defined
as follows:
So, given input value s, the angel can only guarantee that R 9◦ T will achieve
postcondition Q if s/he can ensure that R will establish some intermediate post-
condition Q and if s/he can also guarantee that T will establish Q given any
value in Q .
Multirelations model two kinds of nondeterminism: angelic nondeterminism
captured in terms of sets {Q | sRQ} of properties or postconditions at the level
of the specifications, and demonic nondeterminism in terms of sets {t | t ∈ Q} of
states at the level of the computations specified. So there are two levels at which
multirelations may be compared. At the level of specifications a comparison of
multirelations may be based on the number of sets Q each relates to a given
state s. That is, for multirelations R, T ⊆ S × P(S),
with the intuition that T is ‘better’ from the demon’s perspective than R if T
has less angelic choice (and possible more demonic choice) than R. This provides
a notion of angelic refinement of R by T since the angelic nondeterminism is re-
duced. At the level of computations a comparison of multirelations may be based
on the size of the sets Q related to a given state s. That is, for multirelations
R, T ⊆ S × P(S),
with the intuition that T is ‘better’ from the angel’s perspective than R if T has
less demonic choice (and possible more angelic choice) than R. This provides a
314 I. Rewitzky and C. Brink
+ a R and R d + ,
that is, + has the most angelic choice and the least demonic choice (since sR∅,
for each s ∈ S). Dually, for all multirelations R ⊆ S × P(S),
R a ⊥+ and ⊥+ d R,
that is, ⊥+ has the least angelic choice (since sR∅, for each s ∈ S) and the most
demonic choice .
With respect to the refinement orderings a and d , notions of lub and glb
may be defined: a and a are defined in terms of intersection and union of
subsets of P(S) respectively, and hence at the level of the specifications; while
d and d are defined as union or intersection of subsets of S respectively, and
hence at the level of the computations specified.
Definition 3.
No op Rskip = {(s, Q) | s ∈ S and s ∈ Q}
divergence Rabort = ⊥+
miracle Rmagic = +
sequential composition Rα;β = Rα ◦9 Rβ
angelic choice Rαβ = Rα a Rβ
demonic choice Rαβ = Rα d Rβ .
Binary multirelations have many interesting and useful properties. Here are some
of them.
Monotone Predicate Transformers as Up-Closed Multirelations 315
sR(∩Q) iff ∀Q ∈ Q, sRQ.
(e) R is additive if, for each s ∈ S and any non-empty set Q of subsets of S
sR(∪Q) iff ∃Q ∈ Q, sRQ.
For the remainder of the paper we will consider only up-closed multirelations
since these are the multirelations that are, in the sense of the duality of Sec-
tion 3, monotone predicate transformers. As shown in [24], the family of up-
closed binary multirelations over S has a very rich lattice-theoretic structure
inherited from the lattice of up-closed sets of the powerset Boolean algebra
P(S) = (P(S), ∪, ∩,− , ∅, P(S)). Formally,
The bottom element is ⊥+ and the top element is + . The finite elements
are the finite joins of proper multiplicative multirelations. The completely join-
irreducible elements are the proper multiplicative multirelations and the com-
pletely meet-irreducible elements are the total additive multirelations.
It is easy to check that Rrd is a demonic multirelation and Rra an angelic mul-
tirelation. To each demonic multirelation R ⊆ S × P(S) there corresponds some
binary relation rR ⊆ S × S given by rR (s) = {Q | Q ∈ R(s)} for s ∈ S. Dually,
if R is an angelic multirelation
then the corresponding binary relation rR ⊆ S ×S
is given by rR (s) = {Q | Q ∈ R(s)} for s ∈ S. It is easy to check that for any
demonic multirelation R over S, R = RrdR ; for any angelic multirelation R over
S, R = RraR ; and for any binary relation r over S, r = rRar = rRdr .
Next we show that any Boolean algebra with monotone predicate transformers in
turn gives rise to a binary multirelational structure by invoking the basic Stone
representation [25]. That is, we represent the elements of the Boolean algebra as
subsets of some universal set, namely the set of all prime filters, and then define
binary multirelations over this universe.
Let B = (B, ∨, ∧,− , 0, 1, {gi | i ∈ I}) be a Boolean algebra with monotone
predicate transformers, and let F (B) be the set of all prime filters in B considered
as a Boolean algebra. For each monotone operator g : B → B, we may define a
mapping g σ over P(F (B)), called the canonical extension [13,14] of g, by
σ
g σ (Y) = {g (NY ) | NY ⊆ Y}, for Y ⊆ F(B),
where NY = {F ∈ F(B) | Y ⊆ F },
for Y ⊆ B
g σ (NY ) = {g σ (Ny ) | y ∈ Y }, for Y ⊆ B
g σ (Ny ) = {F ∈ F(B) | g(y) ∈ F } for y ∈ B.
318 I. Rewitzky and C. Brink
Consider any binary multirelational structure S = (S, {Ri | i ∈ I}). The power-
set P(S) of S endowed with the mappings gR yields the Boolean algebra with
monotone predicate transformers P(S) = (P(S), ∪, ∩,− , ∅, S, {gRi | i ∈ I}).
Forming the prime filter structure of this yields a binary multirelational struc-
ture which contains an isomorphic copy of the original binary multirelational
structure. Each of the original up-closed binary multirelations R over S gives rise
to a monotone predicate transformer gR : P(S) → P(S), which in turn gives rise
to an up-closed binary multirelation RgR over F (P(S)). There is a bijective cor-
respondence between the elements of S and certain prime filters in P(S), namely
the principal prime filters under the mapping a → k(a) = {A ⊆ S | a ∈ A}. An
extension of this mapping provides a bijective correspondence between subsets
of S and principal filters, namely Y → k(Y ) = {A ⊆ S | Y ⊆ A}. We need to
show that this mapping preserves structure.
k(x)RgR Nk(Y )
iff k(Y ) ⊆ (gR )−1 (k(x))
by special case of definition on page 318 of RgR from gR
iff {Z ⊆ S | Y ⊆ Z} ⊆ (gR )−1 (k(x))
by definition of k(Y )
iff (∀Z ⊆ S)[Y ⊆ Z ⇒ gR (Z) ∈ k(x)]
320 I. Rewitzky and C. Brink
by definition of ⊆
iff (∀Z ⊆ S)[Y ⊆ Z ⇒ x ∈ gR (Z)]
by definition of k(x)
iff (∀Z ⊆ S)[Y ⊆ Z ⇒ xRZ]
by definition on page 316 of gR from R
iff xRY
since R(x) is up−closed
It may also be shown (as in [24] p269) that sequential composition of up-closed
multirelations corresponds to composition of monotone predicate transformers.
Up-closed multirelations R ⊆ S × P(S) satisfy the property that for any state
s ∈ S and postcondition Q ⊆ S,
This result may be seen as the multirelational analogue of a result in [6] showing
that relations of a differentiated and compact general relational structure are
point closed, i.e. the image set of each point is closed.
It turns out that if a general multirelational structure (S, {Ri | i ∈ I}, A) is
(a) differentiated (i.e., w = v iff ∀A ∈ A, (w ∈ A ⇔ v ∈ A))
(b) compact (i.e., ∀A ⊆ A, A = ∅ if A has the finite intersection property)
then the topology ΩS is the Stone topology on S with A as clopen basis.
In this context, we obtain alternative characterisations of the binary mul-
tirelation Rg defined from a monotone operator g : B → B. For this we note
that given a Boolean algebra with monotone predicate transformers (B, {gi }i∈I ),
the set F (B) of prime filters has a natural topology called the Stone topology
generated by a subbasis of sets of form
Na = {F ∈ F(B) | a ∈ F } for a ∈ B.
OA = {F ∈ F(B) | A ∩ F = ∅} for A ⊆ B
322 I. Rewitzky and C. Brink
5 Angelic/Demonic Factorisation
It is known that the standard epi/monic factorisation [1] can be obtained uniquely
for meet- and join operators but for monotone operators in general there is no
unique such factorisation. However, in the case of monotone operators over a power
set Boolean algebra (as shown in [12]) we have a meet/join factorisation which was
used in [11] for proving the completeness of Morgan’s [20] refinement laws. In this
section we give a factorisation for up-closed multirelations and for monotone oper-
ators over a (not necessarily power set) Boolean algebra. The multirelational fac-
torisation will be used to justify the intuition of Section 2 that multirelations can
model both angelic and demonic nondeterminism; the monotone predicate trans-
former factorisation will be used to refine the notion of winning strategy for the
game theoretic interpretation of specifications with angelic and demonic nonde-
terminism.
First we recall a well-known fact from category theory used in [4] for a cat-
egorical description of the power construction [7] lifting structure from states
(or individuals) to postconditions (or sets of individuals). Namely, the power set
functor P induces a monad (P, η, μ) on the category SET of sets, where P(S) is
the set of all subsets of S, η : idSET → P is given by ηS : S → P(S) defined by
ηS (s) = {s} (for s ∈ S) and μ : P ◦ P → P is given by μS : P(P(S)) → P(S) de-
fined by μA (X) = ∪X (for X ⊂ P(S)). Any monotone map g : P(S) → P(S) gives
rise to a monotone map g + : P(P(S)) → P(P(S)) by g + (Q) = {g(Q) | Q ∈ Q}
(for Q ⊆ P(S)).
Given an up-closed multirelation R ⊆ S × P(S) it may be viewed as a
monotone map R : S → P(P(S)). Then, it is easy to show that
R = μP(S) ◦ R+ ◦ ηS .
Monotone Predicate Transformers as Up-Closed Multirelations 323
and
R = AR 9◦ DR ,
6 Conclusion
The aim of this paper has been to stimulate interest in multirelations as a model
for simultaneously reasoning about angelic and demonic nondeterminism, and
in duality as a tool for unifying semantic models.
Multirelations were introduced in [24] as an alternative to monotone predicate
transformers, and their expressivity for modelling nondeterminism has been ex-
plored in [18]. In the book [8], the classical dualities of Stone [25], Jónsson/Tarski
[17] and Priestley [22] are invoked to compare semantic models, notwithstand-
ing their differences in formulation, and provide a surprisingly uniform picture
of program semantics.
This paper builds on the earlier work in a number of ways. First, the fac-
torisation of up-closed multirelations is new and reveals the two levels at which
multirelations capture angelic and demonic nondeterminism. Second, the topo-
logical perspective of multirelations introduced here provides a natural char-
acterisation of strongest postconditions as closed sets. Third, the translation
between monotone predicate transformers and up-closed multirelations formu-
lated in terms of canonical extensions is equivalent to that in [24], but is more
useful since it suggests a natural interpretation of monotone predicate transform-
ers in terms of angelic/demonic joint strategies for effectively achieving given
326 I. Rewitzky and C. Brink
postconditions. Fourth, the framework of [23,8] for program semantics has been
extended and applied to semantic models for specification computations.
A number of challenges remain. For example: to develop an approach based
on binary multirelations for deriving strategies of games, to extend the relational
calculus for program derivation of [5], and to use multirelations for proving com-
pleteness of data refinement in the relational model. Perhaps further questions
will occur to the reader.
References
1. Adámek, J., Herrlich, H., Strecker, G.E.: Abstract and Concrete Categories. John
Wiley and Sons, Inc (1991).
2. Back, R.J.R., von Wright, J.: Combining angels, demons and miracles in program
specifications. Theoretical Computer Science 100 (1992) 365–383.
3. Back, R.J.R., J. von Wright, J.:. Refinement Calclulus: A Systematic Introduction.
Graduate Texts in Computer Science. Springer-Verlag, New York (1998).
4. Bargenda, H.W., Brink, C., Vajner, V.: Categorical aspects of power algebras.
Quaestiones Mathematica 16 (1993) 133–147.
5. Bird, R., de Moor, O.: Algebra of Programming. Prentice Hall (1997).
6. Blackburn, P., De Rijke, M., Venema, Y.: Modal Logic. Cambridge Tracts in The-
oretical Computer Science 53. Cambridge University Press, Cambridge (2001).
7. Brink, C.: Power structures. Algebra Universalis 30 (1993) 177–216.
8. Brink, C., Rewitzky, I.: A Paradigm for Program Semantics: Power Structures and
Duality. CSLI Publications, Stanford (2001).
9. Dijkstra, E.W.: Guarded commands, nondeterminacy and formal derivation of pro-
grams. Communications of the ACM 18 (8) (1975) 453–458.
10. Dijkstra, E.W.: A Discipline of Programming. Englewood Cliffs, New Jersey:
Prentice-Hall (1976).
11. Gardiner, P.H., Morgan, C.C.: Data refinement of predicate transformers. Theo-
retical Computer Science 87 (1) (1991) 143–162.
12. Gardiner, P.H., Martin, C.E., de Moor, O.: An algebraic construction of predicate
transformers. Science of Computer Programming 22 (1-2) (1994) 21–44.
13. Gehrke, M., Jónsson, B.: Bounded distributive lattices with operators. Mathemat-
ica Japonica 40 (2) (1994) 207–215.
14. Gehrke, M., Jónsson, B.: Monotone bounded distributive lattice expansions. Math-
ematica Japonica 52 (2) (2000) 197–213.
15. Hoare, C.A.R.: An axiomatic basis for computer programming. Communications
of the ACM 12(10) (1969) 576–583.
16. Hoare, C.A.R.: An algebra of games of choice. Unpublished manuscript, 4 pages
(1996).
17. Jónsson, B., Tarski, A.: Boolean algebras with operators I. American Journal of
Mathematics 73 (1951) 891–939.
18. Martin, C., Curtis, S., Rewitzky, I.: Modelling nondeterminism. In Proceedings
of the 7th International Conference on Mathematics of Program Construction.
Lecture Notes in Computer Science Vol 3125. Spinger-Verlag, Berlin Heidelberg
New York (2004) 228–251.
19. Morgan, C.C.: The specification statement. Transactions of Programming Lan-
guage Systems 10 (3) (1998) 403–491.
Monotone Predicate Transformers as Up-Closed Multirelations 327
20. Morgan, C.C., Robertson, K.A.: Specification statements and refinement. IBM
Journal of Research and Development 31 (5) (1987) 546–555.
21. Nelson, G.: A generalisation of Dijkstra’s calculus. ACM Transactions on Program-
ming Languages and Systems 11 (4) (1989) 517–562.
22. Priestley, H.A.: Representation of distributive lattices by means of ordered Stone
spaces. Bulletin of the London Mathematical Society 2 (1970) 186–190.
23. Rewitzky, I., Brink, C.: Predicate transformers as power operations. Formal As-
pects of Computing 7 (1995) 169–182.
24. Rewitzky, I.: Binary multirelations. In Theory and Application of Relational Struc-
tures as Knowledge Instruments. (eds: H de Swart, E Orlowska, G Schmidt, M
Roubens). Lecture Notes in Computer Science Vol 2929. Spinger-Verlag, Berlin
Heidelberg New York (2003) 259–274.
25. Stone, M.H.: Topological representations of distributive lattices and Brouwerian
logics. Casopis Pro Potovánı́ Mathematiky 67 (1937) 1–25.
Homomorphism and Isomorphism Theorems
Generalized from a Relational Perspective
Gunther Schmidt
1 Introduction
Relation algebra has received increasing interest during the last years. Many
areas have been reconsidered from the relational point of view, which often pro-
vided additional insight. Here, the classical homomorphism and isomorphism
theorems (see [1], e.g.) are reviewed from a relational perspective, thereby sim-
plifying and slightly generalizing them.
The paper is organized as follows. First we recall the notion of a heterogeneous
relation algebra and some of the very basic rules governing work with relations.
With these, function and equivalence properties may be formulated concisely.
The relational concept of homomorphism is defined as well as the concept of a
congruence which is related with the concept of a multi-covering, which have
connections with topology, complex analysis, and with the equivalence problem
for flow-chart programs. We deal with the relationship between mappings and
equivalence relations. The topics include the so-called substitution property and
the forming of quotients.
Homomorphisms may be used to give universal characterizations of domain
constructions. Starting from sets, further sets may be obtained by construc-
tion, as pair sets (direct product), as variant sets (direct sum), as power sets
(direct power), or as the quotient of a set modulo some equivalence. Another
Cooperation and communication around this research was partly sponsored by the
European Cost Action 274: Tarski (Theory and Applications of Relational Struc-
tures as Knowledge Instruments), which is gratefully acknowledged.
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 328–342, 2006.
c Springer-Verlag Berlin Heidelberg 2006
Homomorphism and Isomorphism Theorems 329
2.1 Proposition.
i) ; R = R; = ;
ii) R ⊆ S =⇒ Q; R ⊆ Q; S, R; Q ⊆ S ; Q;
iii) Q; (R ∩ S) ⊆ Q; R ∩ Q; S, (R ∩ S); Q ⊆ R; Q ∩ S ; Q
Q; (R ∪ S) = Q; R ∪ Q; S, (R ∪ S); Q = R; Q ∪ S ; Q
iv) (RT )T = R;
v) (R; S)T = S T ;RT ;
vi) R ⊆ S ⇐⇒ RT ⊆ S T;
T
vii) R = R ; T
viii) (R ∪ S)T = RT ∪ S T;
(R ∩ S)T = RT ∩ S T;
ix) Q; R ∩ S ⊆ (Q ∩ S ; RT ); (R ∩ QT ; S). (Dedekind rule)
2.2 Proposition (Row and column masks). The following formulae hold for
arbitrary relations P : V −→ W, Q : U −→ V, R : U −→ W, S : V −→ W ,
provided the constructs are defined.
i) (Q ∩ R; W V ); S = Q; S ∩ R; W W ;
ii) (Q ∩ (P ; W U )T ); S = Q; (S ∩ P ; W W ).
We now recall a rule which is useful for calculations involving equivalence rela-
tions; it deals with the effect of composition with an equivalence relation with
regard to intersection. For a proof see [4,5].
3 Homomorphisms
We recall the concept of homomorphism for relational structures with Fig. 3.1.
Structure and mappings shall commute, however, not as an equality but just as
containment.
Ψ
R S
3.1 Definition. Given two relations R, S, we call the pair (Φ, Ψ ) of relations a
homomorphism from R to S, if Φ, Ψ are mappings satisfying
R; Ψ ⊆ Φ; S.
Homomorphism and Isomorphism Theorems 331
Proof . S ; Ψ T = ΦT ; Φ; S ; Ψ T = ΦT ; R; Ψ ; Ψ T = ΦT ; R.
4 Universal Characterizations
Given a mathematical structure, one is immediately interested in homomor-
phisms, substructures, and congruences. When handling these, there is a char-
acteristic difference between algebraic and relational structures.
Algebraic structures are defined by composition laws such as a binary mul-
tiplication mult: A × A −→ A or the unary operation of forming the inverse
inv: A −→ A. These operations can, of course, be interpreted as relations. The
first example furnishes a “ternary” relation Rmult : (A × A) −→ A, the second,
a binary relation Rinv : A −→ A, and both are univalent and total.
Relational structures are also defined by certain relations, but these need no
longer be univalent or total. Purely relational structures are orders, strictorders,
equivalences, and graphs. Typically, however, mixed structures with both, alge-
braic and relational, features occur, such as ordered fields, for example.
The direct sum resembling variant set forming (disjoint union) is given via
two generic relations ι, κ, the left and the right injection, satisfying
ι; ιT = , κ ; κT = , ιT ; ι ∪ κT ; κ = , ι ; κT =
Whenever a second pair ι1 , κ1 of relations with these properties should be pre-
sented, one may construct the isomorphism Φ := ιT;ι1 ∪ κT;κ1 , thus showing that
the direct sum is defined uniquely up to isomorphism.
The direct power resembling powerset construction is given via a generic re-
lation ε, the membership relation, satisfying
syq (ε, ε) ⊆ and that syq (ε, X) is surjective for every relation X
Should a second membership relation ε1 with these properties be presented, one
may construct the isomorphism Φ := syq (ε, ε1 ), thus showing that the direct
power is defined uniquely up to isomorphism. These constructions are by now
standard; proofs may be found in [4,5].
In addition to these, other domain constructions are possible which are usually
not handled as such. Although relatively simple, they need a bit of care. Known
as dependent types they do not just start with a domain or two, but with an
additional construct, namely an equivalence or a subset.
Looking at this setting, the only way to relate VΞ with WΞ is to define Φ := η T;η1
and proceed showing
ΦT ; Φ = (η1T ; η); (η T ; η1 ) by definition of Φ
= η1T ; (η ; η T ); η1 associative
= η1T ; Ξ ; η1 as Ξ = η ; η T
= η1T ; (η1 ; η1T ); η1 as Ξ = η1 ; η1T
= (η1T ; η1 ); (η1T ; η1 ) associative
= WΞ ; WΞ since η1T ; η1 = WΞ
= WΞ since WΞ ; WΞ = WΞ
Not least when working on a computer, one is interested in such quotients as the
quotient set is usually smaller and may be handled more efficiently. The same
reason leads us to consider subset extrusion in a very formal way.
A subset is assumed to exist relatively to some other set so that it is not a
first-class citizen in our realm of domains. With a bit of formalism, however, it
can be managed to convert a subset so as to have it as a set of its own right, a
process which one might call a subset extrusion.
4.2 Proposition (Extruded subset ). Given a subset U of some set V , one may
generically define the extruded set DU together with the natural injection χ :
DU −→ V postulating both to satisfy
χ; χT = DU , χT ; χ = V ∩ U ; V,V .
The natural injection χ is uniquely determined up to isomorphism: should a
second natural injection χ1 be presented, the isomorphism is (χ; χT1 , ).
χ χ1
Proof . We have DU −→ V ←−D with the corresponding properties:
χ1 ; χT1 ⊆ D , χT1 ; χ1 = V ∩ U ; V,V
and show
ΦT ; Φ = χ1 ; χT ; χ; χT1 = χ1 ; ( V ∩ U ; ); χT1 = χ1 ; χT1 ; χ1 ; χT1 = D ; D = D
and analogously also Φ ; ΦT = DU . Furthermore, (Φ, ) satisfies the property of
an isomorphism between χ and χ1 using Lemma 3.3:
χ; V = χ = DU ; χ = χ; χT ; χ = χ; ( V ∩ U ; ) = χ; χT1 ; χ1 = Φ; χ1
= π T ; (π ∩ (π ; R ∩ ρ); ρT ; π)
= ∩ π T ; (π ; R ∩ ρ); ρT ; π
= ∩ (R ∩ π T ; ρ); ρT ; π = ∩ R; Y X
QT ; Q is handled analogously
P ; P T ∩ Q; QT = χ; π ; π T ; χT ∩ χ; ρ; ρT ; χT = χ; (π ; π T ∩ ρ; ρT ); χT = χ; ; χT =
The relationship between congruences and multi-coverings is close and seems not
to have been pointed out yet.
5.3 Theorem.
i) If (Φ, Ψ ) is a multi-covering from B to B , then (Ξ, Θ) := (Φ; ΦT , Ψ ; Ψ T ) is a
B-congruence.
ii) If the pair (Ξ, Θ) is a B-congruence, then there exists up to isomorphism at
most one multi-covering (Φ, Ψ ) satisfying Ξ = Φ; ΦT and Θ = Ψ ; Ψ T .
The multi-covering (Φ, Ψ ) for some given congruences Ξ, Θ need not exist in
the given relation algebra. It may, however, be constructed by setting Φ, Ψ to
be the quotient mappings according to the two equivalences Ξ, Θ together with
R := ΦT ; R; Ψ .
A multi-covering between relational structures most closely resembles a homo-
morphism on algebraic structures:
5.4 Proposition. A homomorphism between algebraic structures is necessarily
a multi-covering.
Now we study the homomorphism and isomorphism theorems (see [1], e.g.) tra-
ditionally offered in a course on group theory or on universal algebra from the
relational point of view. In the courses mentioned, R, S are often n-ary mappings
such as addition and multiplication. In Fig. 6.1, we are more general allowing
them to be relations, i.e., not necessarily mappings. The algebraic laws they
satisfy in the algebra are completely irrelevant.
Θ1
ϕ1
Ξ1
R
S
ϕ2
Θ2 Ξ2
Θ1 ϕ1
Ξ1
R
S
η1 δ1
ϕ2
Ξ2
Θ2
ψ1
η2 δ2
R S
ψ2
Fig. 6.2. Natural projections added to Fig. 6.1
One should bear in mind that this proposition was in several respects slightly
more general than the classical homomorphism theorem: R, S need not be map-
pings, nor need they be homogeneous relations, Ξ was not confined to be the
identity congruence, and not least does relation algebra admit non-standard
models.
R Ξ
X
ι λ
ΞY
ΞZ
Y Z
η δ
S ϕ T
ι λ
η δ
It will have become clear, that these proofs completely rely on generic con-
structions and their algebraic laws. When elaborated they seem lengthy. With a
supporting system, however, they reduce considerably to a sequence of rules to
be applied.
ΞY ψ
Y V
ΘV
R
S
ηY δV
ΞX ϕ ΘU
X U
β
ηX δU
R S
8 Concluding Remark
We have reworked mathematical basics from a relational perspective. First the
step from an algebraic to a relational structure has been made. This is so serious
a generalization, that one would not expect much of the idea of homomorphism
and isomorphism theorems to survive. With the concept of a multi-covering, how-
ever, a new and adequate concept seems to have been found. Prop. 5.4 shows that
it reduces completely to homomorphisms when going back to the algebraic case.
For relational structures, a multi-covering behaves nicely with respect to quotient
forming. This relates to earlier papers (see [2,3,8]) where semantics of programs
(partial correctness, total correctness, and flow equivalence, even for systems of
recursive procedures) has first been given a componentfree relational form.
References
1. Grätzer, G.: Universal Algebra, 2nd Ed. Springer-Verlag (1978)
2. Schmidt, G.: Programme als partielle Graphen. Habil. Thesis 1977 und Bericht
7813, Fachbereich Mathematik der Techn. Univ. München (1977) English as [3,8].
3. Schmidt, G.: Programs as partial graphs I: Flow equivalence and correctness. The-
oret. Comput. Sci. 15 (1981) 1–25
4. Schmidt, G., Ströhlein, T.: Relationen und Graphen. Mathematik für Informatiker.
Springer-Verlag (1989) ISBN 3-540-50304-8, ISBN 0-387-50304-8.
5. Schmidt, G., Ströhlein, T.: Relations and Graphs — Discrete Mathematics for Com-
puter Scientists. EATCS Monographs on Theoretical Computer Science. Springer-
Verlag (1993) ISBN 3-540-56254-0, ISBN 0-387-56254-0.
6. Freyd, P.J., Scedrov, A.: Categories, Allegories. Volume 39 of North-Holland Math-
ematical Library. North-Holland, Amsterdam (1990)
7. Kahl, W.: A Relation-Algebraic Approach to Graph Structure Transformation.
Technical Report 2002/03, Fakultät für Informatik, Universität der Bundeswehr
München (2002) http://ist.unibw-muenchen.de/Publications/TR/2002-03/.
8. Schmidt, G.: Programs as partial graphs II: Recursion. Theoret. Comput. Sci. 15
(1981) 159–179
Relational Measures and Integration
Gunther Schmidt
Abstract. Work in fuzzy modeling has recently made its way from the
interval [0, 1] ⊆ IR to the ordinal or even to the qualitative level. We pro-
ceed further and introduce relational measures and relational integration.
First ideas of this kind, but for the real-valued linear orderings stem from
Choquet (1950s) and Sugeno (1970s). We generalize to not necessarily
linear order and handle it algebraically and in a componentfree manner.
We thus open this area of research for treatment with theorem provers
which would be extremely difficult for the classical presentation of Cho-
quet and Sugeno integrals.
1 Introduction
Mankind has developed a multitude of concepts to reason about something that
is better than or is more attractive than something else or similar to something
else. Such concepts lead to an enormous bulk of formulae and interdependencies.
We start from the concept of an order and a strictorder, defined as a transitive,
antisymmetric, reflexive relation or as a transitive and asymmetric, respectively.
In earlier times it was not at all clear that orderings need not be linear order-
ings. But since the development of lattice theory in the 1930s it became more
and more evident that most of our reasoning with orderings was also possible
when they failed to be linear ones. So the people studied fuzziness mainly along
the linear order of IR and began only later to generalize to the ordinal level:
Numbers indicate the relative position of items, but no longer the magnitude of
difference. Then they moved to the interval level: Numbers indicate the magni-
tude of difference between items, but there is no absolute zero point. Examples
are attitude scales and opinion scales. We proceed even further and introduce
relational measures with values in a lattice. Measures traditionally provide a
basis for integration. Astonishingly, this holds true for these relational measures
so that it becomes possible to introduce a concept of relational integration.
Cooperation and communication around this research was partly sponsored by the
European Cost Action 274: Tarski (Theory and Applications of Relational Struc-
tures as Knowledge Instruments), which is gratefully acknowledged.
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 343–357, 2006.
c Springer-Verlag Berlin Heidelberg 2006
344 G. Schmidt
2 Modelling Preferences
Who is about to make severe decisions will usually base these on carefully se-
lected basic information and clean lines of reasoning. It is in general not too
difficult to apply just one criterion and to operate according to this criterion.
If several criteria must be taken into consideration, one has also to consider the
all too often occurring situation that these provide contradictory information:
“This car looks nicer, but it is much more expensive”. Social and economical
sciences have developed techniques to model what takes place when decisions
are to be made in an environment with a multitude of diverging criteria. Prefer-
ence is assumed to represent the degree to which one alternative is preferred to
another. Often it takes the form of expressing that alternative A is considered
being “not worse than” alternative B. Sometimes a linear ranking of the set of
alternatives is assumed, which we avoid.
So finding decisions became abstracted to a scientific task. We may observe
two lines of development. The Anglo-Saxon countries, in particular, formulated
utility theory, in which numerical values shall indicate the intensity of some
preference. Mainly in continental Europe, on the other hand side, binary relations
were used to model pairwise preference; see [1], e.g. While the former idea allows
to easily relate to statistics, the latter is based on evidence via direct comparison.
In earlier years indeed, basic information was quite often statistical in nature
and expressed in real numbers. Today we have more often fuzzy, vague, rough,
etc. forms of qualification.
3 Introductory Example
We first give an example of relational integration deciding for a car to be bought
out of several offers. We intend to follow a set C of three criteria, namely color,
price, and speed. They are, of course, not of equal importance for us; price will
most certainly outweigh the color of the car, e.g. Nevertheless let the valuation
with these criteria be given on an ordinal scale L with 5 linearly ordered values
as indicated on the left side of (1). (Here for simplicity, the ordering is linear,
but it need not.) We name these values 1,2,3,4,5, but do not combine this with
any arithmetic; i.e., value 4 is not intended to mean two times as good as value
2. Rather they might be described with linguistic variables as bad, not totally
bad, medium, outstanding, absolutely outstanding; purposefully these example
qualifications have not been chosen “equidistant”.
color 0 0 0 1 0 4 = lub glb (4v(color) , 4μ{c,p} ),
price 0 0 0 1 0 glb (4v(price) , 4μ{c,p} ), (1)
speed 0 1 0 0 0 glb (2v(speed) , 5μ{c,p,s} )
First we concentrate on the left side of (1). The task is to arrive at one overall
valuation of the car out of these three. In a simple-minded approach, we might
Relational Measures and Integration 345
color 0 0 0 1 0 3 = lub glb (4v(color) , 3μ{c,s} ),
price 0 1 0 0 0 glb (2v(price) , 5μ{c,p,s}), (2)
speed 0 0 0 1 0 glb (4v(speed) , 3μ{c,s} )
{} 1 0 0 0 0
{color} 1 0 0 0 0
{price} 0 0 1 0 0
{color,price} 0 0 0 1 0
μ=
{speed} 0 1 0 0 0
{color,speed} 0 0 1 0 0
{price,speed} 0 0 1 0 0
{color,price,speed} 0 0 0 0 1
For gauging purposes we demand that the empty criteria set gets assigned the
least value in L and the full criteria set the greatest. A point to stress is that we
assume the criteria themselves as well as the measuring of subsets of criteria as
commensurable.
The relational measure μ should obviously be monotonic with respect to the
ordering Ω on the powerset of C and the ordering E on L. We do not demand con-
tinuity (additivity), however. The price alone is ranked of medium importance 3,
higher than speed alone, while color alone is considered completely unimportant
and ranks 1. However, color and price together are ranked 4, i.e., higher than
the supremum of ranks for color alone and for price alone, etc.
As now the valuations according to the criteria as well as the valuation ac-
cording to the relative measuring of the criteria are given, we may proceed as
visualized on the right sides of (1) and (2). We run through the criteria and al-
ways look for two items: their corresponding value and in addition for the value
of that subset of criteria assigning equal or higher values. Then we determine
the greatest lower bound for the two values. From the list thus obtained, the
least upper bound is taken. The two examples above show how by simple evalu-
ation along this concept, one will arrive at the overall values 4 or 3, respectively.
This results from the fact that in the second case only such rather unimportant
criteria as color and speed assign the higher values.
The effect is counterrunning: Low values of criteria as for s in (1) are intersected
with rather high μ’s as many criteria give higher scores and μ is monotonic. Highest
346 G. Schmidt
values of criteria as for color or speed in (2) are intersected with the μ of a small or
even one-element criteria set; i.e., with a rather small one. In total we find that here
are two operations applied in a way we already know from matrix multiplication:
a “sum” operator, lub or ∨, following application a “product” operator, glb or ∧.
This example gave a first idea of how relational integration works and how
it may be useful. Introducing a relational measure and using it for integration
serves an important purpose: Concerns are now separated. One may design the
criteria and the measure in a design phase prior to polling. Only then shall the
questionnaire be filled, or the voters be polled. The procedure of coming to an
overall valuation is now just computation and should no longer lead to quarrels.
4 Order-Theoretic Functionals
Given the page limit, we cannot present all the prerequisites on relation algebra
and give [2,3] as a general reference for handling relations as boolean matrices
and subsets of a set as boolean vectors. Let an order relation E be given on a
set V . An element e is called an upper bound (also: majorant ) of the subset of
V characterized by the vector u of V provided ∀x ∈ u : Exe . From the predicate
T
logic version, we easily derive a relation-algebraic formulation as e ⊆ E ; u, so
T
that we introduce the order-theoretic functional ubd E (u) := E ; u to return the
possibly empty vector of all upper bounds. Analogously, we have the set of lower
bounds lbd E (u) := E ; u.
Starting herefrom, also the other traditional functionals may be obtained, as
the least upper bound u, (also: supremum), the at most 1-element set of least
elements among the set of all upper bounds of u
lub E (u) = ubd E (u) ∩ lbd E (ubd E (u))
In contrast to our expectation that a least upper bound may exist or not, it will
here always exist as a vector; it may, however be the null vector resembling that
there is none.
As a tradition, a vector is often a column vector. In many cases, however, a row
vector would be more convenient. We decided to introduce a variant denotation
for order-theoretic functionals working on row vectors:
lubR E (X) := [lub E (X T )]T , etc.
We are here concerned with lattice orderings E only. For convenience we intro-
duce notation for least and greatest elements as
0E = glb E ( ), 1E = lub E ( )
5 Relational Measures
Assume the following basic setting with a set C of so-called criteria and a mea-
suring lattice L. Depending on the application envisaged, the set C may also be
interpreted as one of players in a cooperative game, of attributes, of experts,
or of voters in an opinion polling problem. This includes the setting with L
Relational Measures and Integration 347
P(C)
μ
ε M E
C m, X L
The relation ε is the membership relation between C and its powerset P(C).
The measures envisaged will be called μ, other relations will be denoted as M .
Valuations according to the criteria will be X or m depending on the context.
For a running example assume the task to assess persons of the staff according
to their intellectual abilities as well as according to the workload they achieve
to master.
(medium,bulldozer)
(high,bulldozer)
(medium,good)
(low,bulldozer)
(medium,lazy)
(medium,fair)
(high,good)
(high,lazy)
(low,good)
(high,fair)
(low,lazy)
(low,fair)
(low,lazy) 1 1 1 1 1 1 1 1 1 1 1 1
(medium,lazy) 0 1 0 1 1 0 1 1 0 1 1 1
(low,fair) 0 0 1 0 1 1 1 1 1 1 1 1
(high,lazy) 0 0 0 1 0 0 1 0 0 1 0 1
(medium,fair) 0 0 0 0 1 0 1 1 0 1 1 1
(low,good) 0 0 0 0 0 1 0 1 1 1 1 1
bulldozer
E=
(high,fair) 0 0 0 0 0 0 1 0 0 1 0 1
(medium,good) 0 0 0 0 0 0 0 1 0 1 1 1
high good
(low,bulldozer) 0 0 0 0 0 0 0 0 1 0 1 1
(high,good) 0 0 0 0 0 0 0 0 0 1 0 1
medium fair
(medium,bulldozer) 0 0 0 0 0 0 0 0 0 0 1 1
low lazy
(high,bulldozer) 0 0 0 0 0 0 0 0 0 0 0 1
Fig. 5.2. Value lattice L ordered with E
A (relational) measure for s ∈ P(C), i.e., μ(s) when written as a mapping or μT; s
when written in relation form, may be interpreted as the weight of importance
we attribute to the combination s of criteria. It should not be mixed up with a
probability. The latter would require the setting L = [0, 1] ⊆ IR and in addition
that μ be continuous.
Many ideas of this type have been collected by Glenn Shafer under the heading
theory of evidence, calling μ a belief function. Using it, he explained a basis of
rational behaviour. We attribute certain weights to evidence, but do not explain
in which way. These weights shall in our case be lattice-ordered. This alone
gives us reason to rationally decide this or that way. Real-valued belief functions
have numerous applications in artificial intelligence, expert systems, approximate
reasoning, knowledge extraction from data, and Bayesian Networks.
Concerning additivity, the example of Glenn Shafer [4] is when one is won-
dering whether a Ming vase is a genuine one or a fake. We have to put the full
amount of our belief on the disjunction “genuine or fake” as one of the alterna-
tives will certainly be the case. But the amount of trust we are willing to put on
the alternatives may in both cases be very small as we have only tiny hints for
being genuine, but also very tiny hints for being a fake.
With the idea of probability, we could not so easily cope with the ignorance
just mentioned. Probability does not allow one to withhold belief from a propo-
sition without according the withheld amount of belief to the negation. When
thinking on the Ming vase in terms of probability we would have to attribute p
to genuine and 1 − p to fake.
In the extreme case, we have complete ignorance expressed by the so-called
vacuous belief mapping
0E if C =
/s
μ0 (s) =
1E if C = s
On the other side, we may completely overspoil our trust expressed by what we
may call a light-minded belief mapping
0E if 0Ω = s
μ1 (s) =
1E otherwise
To an arbitrary non-empty set of criteria, the light-minded belief mapping at-
tributes all the components of trust or belief.
Relational Measures and Integration 349
Combining measures
Dempster [5] found for the real-valued case a way of combining measures in
a form closely related to conditional probability. It shows a way of adjusting
opinion in the light of new evidence. We have re-modeled this for the relational
case. One should be aware of how a measure behaves on upper and lower cones:
μ = lubR E (Ω T ; μ) μ = glbR E (Ω ; μ)
When one has in addition to μ got further evidence from a second measure μ ,
one will intersect the upper cones resulting in a possibly smaller cone positioned
higher up and take its greatest lower bound:
μ ⊕ μ := glbR E (μ; E ∩ μ ; E)
One might, however, also look where μ and μ agree, and thus intersect the
lower bound cones resulting in a possibly smaller cone positioned deeper down
and take its least upper bound:
μ ⊗ μ := lubR E (μ; E T ∩ μ ; E T )
Proof : The least element must be sent to the least element. This result is
prepared observing that 0Ω is a transposed mapping, in
lbd E ([μ; E ∩ μ ; E]T ); 0Ω
= E ; [μ; E ∩ μ ; E]T ; 0Ω
= E ; [μ; E ∩ μ ; E]T ; 0Ω a mapping may slip under a negation from the left
350 G. Schmidt
= E ; [E T ; μT ∩ E T ; μ T ]; 0Ω
= E ; [E T ; μT ; 0Ω ∩ E T ; μ T ; 0Ω ] multiplying an injective relation from the right
= E ; [E T ; 0E ∩ E T ; 0E ] definition of measure
= E ; E T ; 0E
= E ; in the complete lattice E
= lbd ( ) = 0E in the complete lattice E
Now
(μ ⊕ μ )T ; 0Ω = glb E ([μ; E ∩ μ ; E]T ); 0Ω
= lbd E ([μ; E ∩ μ ; E]T ) ∩ ubd (lbd E ([μ; E ∩ μ ; E]T ) ; 0Ω
= lbd E ([μ; E ∩ μ ; E]T ); 0Ω ∩ E ; lbd E ([μ; E ∩ μ ; E]T ); 0Ω
T
T
= 0E ∩ E ; lbd E ([μ; E ∩ μ ; E]T ); 0Ω
T
= 0E ∩ E ; 0E
= 0E ∩ ubd (0E )
= 0E ∩ = 0E
For reasons of space, the other parts of the proof are left to the reader.
6 Relational Integration
Assume now that for all the criteria C a valuation has taken place resulting in a
mapping X : C −→ L. The question is how to arrive at an overall valuation by
rational means, for which μ shall be the guideline.
As already mentioned, we apply a sum operator lub after applying the product
operator glb . When values are assigned with X, we look with E for those greater
or equal, then with X T for the criteria so valuated. Now comes a technically
difficult step, namely proceeding to the union of the resulting sets with the
symmetric quotient syq and the membership relation ε. The μ-score of this set
is then taken.
The tables in Fig. 6.1 show a measure, a valuation and then the relational
integral computed with the TituRel system.
We are now in a position to understand why gauging μT; 1Ω = 1E is necessary
for μ, or “greatest element is sent to greatest element”. Consider, e.g., the special
case of an X with all criteria assigning the same value. We certainly expect the
relational integral to precisely deliver this value regardless of the measure chosen.
But this might not be the case if a measure should assign too small a value to
the full set.
Relational Measures and Integration 351
(medium,bulldozer)
(high,bulldozer)
(medium,good)
(low,bulldozer)
(medium,lazy)
(medium,fair)
(high,good)
(high,lazy)
(low,good)
(high,fair)
(low,lazy)
(low,fair)
{} ⎛ 1 0 0 0 0 0 0 0 0 0 0 0⎞
{Abe} ⎜ 0 0 0 1 0 0 0 0 0 0 0 0⎟
{Bob} ⎜ ⎜0 0 0 0 1 0 0 0 0 0 0 0⎟⎟
{Abe,Bob} ⎜ 0 0 0 0 0 0 0 0 0 1 0 0⎟
⎜ ⎟
{Carl} ⎜ 0 0 1 0 0 0 0 0 0 0 0 0⎟
{Abe,Carl} ⎜⎜0 0 0 0 0 0 0 0 0 1 0 0⎟⎟
{Bob,Carl} ⎜⎜0 0 0 0 0 0 0 1 0 0 0 0⎟⎟
{Abe,Bob,Carl} ⎜⎜0 0 0 0 0 0 0 0 0 1 0 0⎟⎟
μ=
{Don} ⎜ ⎜0 1 0 0 0 0 0 0 0 0 0 0⎟⎟
{Abe,Don} ⎜ 0 0 0 0 0 0 1 0 0 0 0 0⎟
⎜ ⎟
{Bob,Don} ⎜ 0 0 0 0 0 0 1 0 0 0 0 0⎟
{Abe,Bob,Don} ⎜ ⎜0 0 0 0 0 0 0 0 0 1 0 0⎟⎟
{Carl,Don} ⎜⎜0 0 0 0 1 0 0 0 0 0 0 0⎟⎟
{Abe,Carl,Don} ⎜ ⎝0 0 0 0 0 0 0 0 0 1 0 0⎟⎠
{Bob,Carl,Don} 0 0 0 0 0 0 0 0 0 1 0 0
{Abe,Bob,Carl,Don} 0 0 0 0 0 0 0 0 0 0 0 1
⎛ ⎞
Abe 0 0 0 1 0 0 0 0 0 0 0 0
Bob ⎜ 0 0 0 0 0 0 1 0 0 0 0 0⎟
Carl ⎝ 0 0⎠
X=
1 0 0 0 0 0 0 0 0 0
Don 0 0 0 0 1 0 0 0 0 0 0 0
(R) X ◦ μ = (0 0 0 0 0 0 1 0 0 0 0 0)
The concept of Choquet integral was first introduced for a real-valued context
in [6] and later used by Michio Sugeno [7]. This integral has nice properties for
352 G. Schmidt
Addition of the vacuous belief mapping μ0 is again necessary for gauging pur-
poses. In case m is a mapping, the situation becomes even nicer. From
T
π(σ(m; E T )) = π(σ(m)) = ε; εT ; m; E ; E
T
= m; E ; E as it can be shown that in general ε; εT ; X = X for all X
T
= m; E ; E as m was assumed to be a mapping
T
= m; E ; E
T
= m; E
we see that this is an adjunction on cones. The lower cones m ; E T in turn are
1 : 1 represented by their least upper bounds lubR E (m; E).
The following proposition exhibits that a Bayesian measure is a rather special
case, namely more or less directly determined as a possibility measure for a direct
Relational Measures and Integration 353
valuation via a mapping m. Fig. 7.1 shows an example. One may proceed from
m to the measure according to Prop. 7.1 or vice versa according to Prop. 7.2.
(medium,bulldozer)
(high,bulldozer)
(medium,good)
(low,bulldozer)
(medium,lazy)
(medium,fair)
(high,good)
(high,lazy)
(low,good)
(high,fair)
(low,lazy)
(low,fair)
{} 1 0 0 0 0 0 0 0 0 0 0 0
{Abe} 0 0 0 0 1 0 0 0 0 0 0 0
{Bob} 0 0 0 0 0 0 1 0 0 0 0 0
{Abe,Bob} 0 0 0 0 0 0 1 0 0 0 0 0
{Carl} 0 0 1 0 0 0 0 0 0 0 0 0
{Abe,Carl} 0 0 0 0 1 0 0 0 0 0 0 0
{Bob,Carl} 0 0 0 0 0 0 1 0 0 0 0 0
{Abe,Bob,Carl} 0 0 0 0 0 0 1 0 0 0 0 0
μB =
{Don} 0 0 0 0 0 1 0 0 0 0 0 0
{Abe,Don} 0 0 0 0 0 0 0 1 0 0 0 0
{Bob,Don} 0 0 0 0 0 0 0 0 0 1 0 0
{Abe,Bob,Don} 0 0 0 0 0 0 0 0 0 1 0 0
{Carl,Don} 0 0 0 0 0 1 0 0 0 0 0 0
{Abe,Carl,Don} 0 0 0 0 0 0 0 1 0 0 0 0
{Bob,Carl,Don} 0 0 0 0 0 0 0 0 0 1 0 0
{Abe,Bob,Carl,Don} 0 0 0 0 0 0 0 0 0 0 0 1
Abe 0 0 0 0 1 0 0 0 0 0 0 0
mμB =
Bob 0 0 0 0 0 0 1 0 0 0 0 0
Carl 0 0 1 0 0 0 0 0 0 0 0 0
Don 0 0 0 0 0 1 0 0 0 0 0 0
Fig. 7.1. Direct valuation with corresponding Bayesian measure
With this method just a few of the many relational measures will be found. By
construction they are all continuous (or additive).
(medium,bulldozer)
(high,bulldozer)
(medium,good)
(low,bulldozer)
(medium,lazy)
(medium,fair)
(high,good)
(high,lazy)
(low,good)
(high,fair)
(low,lazy)
(low,fair)
{} 0 0 0 0 0 0 0 0 0 0 0 0
{Abe} 0 0 0 0 0 0 0 0 0 0 0 0
{Bob} 0 0 1 0 0 0 0 0 0 0 0 0
{Abe,Bob} 0 0 0 0 0 0 0 0 0 0 0 0
{Carl} 0 0 0 0 0 0 0 0 0 0 0 0
{Abe,Carl} 0 0 0 0 0 0 0 0 0 0 0 0
{Bob,Carl} 0 0 0 0 0 0 0 0 0 0 0 0
{Abe,Bob,Carl} 0 0 0 0 0 0 0 0 0 0 0 0
M :=
{Don} 0 0 0 0 0 0 0 0 0 0 0 0
{Abe,Don} 0 0 0 0 0 0 0 0 0 0 0 0
{Bob,Don} 0 0 0 0 0 0 0 0 0 0 0 0
{Abe,Bob,Don} 0 0 0 0 1 0 0 0 0 0 0 0
{Carl,Don} 0 0 0 0 0 0 0 0 0 0 0 0
{Abe,Carl,Don} 0 0 0 0 0 0 0 0 1 0 0 0
{Bob,Carl,Don} 0 0 0 0 0 0 0 0 0 0 0 0
{Abe,Bob,Carl,Don} 0 0 0 0 0 0 0 0 0 0 0 0
Fig. 7.2. A body of evidence
σ (M ) := Ω T ; M ; E π (μ) := Ω ; μ; E ,
T
(4)
which again satisfies the Galois correspondence requirement
M ⊆ π (μ) ⇐⇒ μ ⊆ σ (M ).
Obviously σ (M ; E T ) = σ (M ) and π (μ ; E) = π (μ), so that in principle only
upper (E) and lower (E T ), respectively, cones are set into relation. But again
applying W ; E = W ; E ; E T , we get
Relational Measures and Integration 355
σ (M ); E = Ω T ; M ; E ; E = Ω T ; M ; E ; E T ; E = Ω T ; M ; E = σ (M ),
so that images of σ are always upper cones — and thus best described by their
greatest lower bound glbR E (σ (M )).
7.4 Proposition. Should some body of evidence M be given, there exist two
relational measures closely resembling M ,
(medium,bulldozer)
(medium,bulldozer)
(high,bulldozer)
(high,bulldozer)
(medium,good)
(medium,good)
(low,bulldozer)
(low,bulldozer)
(medium,lazy)
(medium,lazy)
(medium,fair)
(medium,fair)
(high,good)
(high,good)
(high,lazy)
(high,lazy)
(low,good)
(low,good)
(high,fair)
(high,fair)
(low,lazy)
(low,lazy)
(low,fair)
(low,fair)
{} 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
{Abe}
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
{Bob}
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
{Abe,Bob}
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
{Carl}
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
{Abe,Carl}
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
{Bob,Carl}
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
{A,B,C}
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
{Don}
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
{Abe,Don}
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
{Bob,Don}
0 0 1 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 1 0
{A,B,D}
0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0
{Carl,Don}
1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0
{A,C,D}
0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0
{B,C,D} 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
{A,B,C,D} 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1
μbelief (M ) μplausibility (M )
Fig. 7.3. Belief measure and plausibility measure for M of Fig. 7.2
The belief measure adds information to the extent that all evidence of subsets
with an evidence attached is incorporated. Another idea is followed by the plau-
sibility measure. One asks which sets have a non-empty intersection with some
set with an evidence attached and determines the least upper bound of all these.
The plausibility measure collects those pieces of evidence that do not indicate
trust against occurrence of the event or non-void parts of it. The belief as well
as the plausibility measure more or less precisely determine their original body
of evidence.
356 G. Schmidt
One should compare this result with the former one assuming m to be a mapping
putting m := ε; M . One may also try to go in reverse direction, namely from a
measure back to a body of evidence.
7.6 Definition. Let some measure μ be given and define strict subset contain-
ment C := ∩ Ω. We introduce two basic probability assignments, namely
i) Aμ := lubR E (C T ; μ), its purely additive part,
ii) Jμ := μ1 ⊗ (μ ∩ lubR E (C T ; μ)), its jump part.
As an example, the purely additive part Aμ of the μ of Fig. 6.1 would assign
in line {Abe,Bob} the value {high,fair} only as μ({Abe}) = {high,lazy} and
μ({Bob}) = {medium,fair}. In excess to this, μ assigns {high,good}, and is,
thus, not additive or Bayesian. We have for Aμ taken only what could have been
computed already by summing up the values attached to strictly smaller subsets.
In Jμ the excess of μ to Aμ is collected. In the procedure for Jμ all the values
attached to atoms of the lattice will be saved as from an atom only one step
down according to C is possible. The value for the least element is, however, the
least element of L. Multiplication with μ1 serves the purpose that rows full of
0 ’s be converted to rows with the least element 0E attached as a value.
Now some arithmetic on these parts is possible, not least providing the insight
that a measure decomposes into an additive part and a jump part.
In the real-valued case, this result is not surprising at all as one may always
decompose into a part continuous from the left and a jump part.
In view of these results it seems promising to investigate in which way also
concepts such as commonality, consonance, necessity measures, focal sets, and
cores may be found in the relational approach. This seems particularly inter-
esting as also the concepts of De Morgan triples have been transferred to the
componentfree relational side. We leave this to future research.
Relational Measures and Integration 357
8 Concluding Remark
References
1. Fodor, J., Roubens, M.: Fuzzy Preference Modelling and Multicriteria Decision
Support. Volume 14 of Theory and Decision Library, Series D: System Theory,
Knowledge Engineering and Problem Solving. Kluwer Academic Publishers (1994)
2. Schmidt, G., Ströhlein, T.: Relationen und Graphen. Mathematik für Informatiker.
Springer-Verlag (1989) ISBN 3-540-50304-8, ISBN 0-387-50304-8.
3. Schmidt, G., Ströhlein, T.: Relations and Graphs — Discrete Mathematics for Com-
puter Scientists. EATCS Monographs on Theoretical Computer Science. Springer-
Verlag (1993) ISBN 3-540-56254-0, ISBN 0-387-56254-0.
4. Shafer, G.: A Mathematical Theory of Evidence. Princeton University Press (1976)
5. Dempster, A.P.: Upper and lower probabilities induced by a multivalued mapping.
Annals of Math. Statistics 38 (1967) 325–339
6. Choquet, G.: Theory of capacities. Annales de l’Institut Fourier 5 (1953) 131–295
7. Sugeno, M., ed.: Industrial Applications fo Fuzzy Control. North-Holland (1985)
8. Schmidt, G.: Relational Language. Technical Report 2003-05, Fakultät für Infor-
matik, Universität der Bundeswehr München (2003) 101 pages, http://homepage.
mac.com/titurel/Papers/LanguageProposal.html.
9. Schmidt, G.: The Relational Language TituRel: Revised Version (2005) In prepa-
ration; see http://homepage.mac.com/titurel/TituRel/LanguageProposal2.pdf.
A Relational View of Recurrence and Attractors
in State Transition Dynamics
1 Introduction
Analyses of dynamical systems represent the main application of mathematical
sciences to the study of natural phenomena. Three constituents are essential in
a dynamical system: space, collecting all the possible states of the system; time,
collecting the different instants at which the system is considered; and dynamics,
which associates, to each instant, the system state at that instant. The various
kinds of dynamical systems are essentially determined by the structure of the
space, by the nature of the time, and the way dynamics is characterized [5,9].
The classical approach to study dynamical systems is focused on differential
equations, that impose local (infinitesimal) relations on quantity variations, from
which, under suitable hypotheses, one can analytically reconstruct the global
dynamical behaviour of the system. Recent developments of discrete models to
analyse biological processes motivate the revisitation of typical concepts of clas-
sical dynamics in a completely discrete context. A couple of discrete models
already applied with remarkable success are cellular automata [16], having the
Lindenmayer systems as a special case, and Kauffman networks [7]. In these sys-
tems, viewed as dynamical systems, typical properties that are relevant in com-
putation models, such as termination, confluence, and reducibility, are replaced
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 358–372, 2006.
c Springer-Verlag Berlin Heidelberg 2006
A Relational View of Recurrence and Attractors 359
2 Notational Preliminaries
Let us designate the universal and identity binary relations on an arbitrary set
S, with 1S and 1S , respectively. We shall omit the subscript whenever it is clear
from the context. Let q, r be binary relations on S. Boolean difference is defined
by q\r = q·r−1 , with standard notation for the Boolean product and complement
operations, while 0 denotes the empty binary relation in any relation algebra.
The standard Boolean ordering ≤ is defined in any relation algebra just like in
its Boolean algebra reduct. This reduct is actually a complete Boolean algebra,
hence the binary Boolean sum operation is extended to summation over arbitrary
sets of binary relations.
Let r˘ denote the relation-algebraic converse of r. Consistently, we let f ˘
denote the inverse of an invertible function f , as well as the inverse image relation
of any function f . The binary relation q ; r is the relation-algebraic composition
of binary relations q and r. That is, x q ; r y if and only if there exists an element
z (in S) such that both x q z and z r y.
If q i denotes the i-fold iterated composition of q with itself, then the reflexive-
transitive closure of q, the transitive closure of q, and the at least n-fold iterated
composition of q with itself, are respectively defined as follows.
q ∗ = i∈N q i
q + = i>0 q i
q ≥n = i≥n q i
img(x ; q ≥n )≤ y .
(n)
x ≤q y iff
Then we define when a monotype is eventually below another one, under the
iterated composition with a binary relation q, by a simple summation in the
higher-order relation algebra on such monotypes, as follows:
(n)
≤q = ≤q .
n∈N
Two useful operations will allow us to lift binary relations to (atomic) mono-
types of a higher-order relation algebra and, conversely, to flatten higher-order
monotypes to lower-order binary relations. These operations are respectively
defined as follows.
A Relational View of Recurrence and Attractors 361
p ↑r q ⇔ p = q = r.
Clearly, the binary relation ↑r on 2S×S has only one element, that is (r, r).
If x ≤ 12S×S , that is x is a higher-order monotype, then ↓x is the lower-order
binary relation, ↓x ≤ 1S , defined by:
↓x = r.
rxr
x ≤ 1 , 1 ; x ; 1 = 1, and y ≤ x ∧ 1 ; y ; 1 = 1 ⇒ y = x .
This should be sufficient to see the correctness of the formalization of the concept
of unavoidable attracting set. Unlike this, a potential attracting set may be
infinitely often escaped from by orbits starting inside the basin; however, it
can never be definitely escaped from, since it is always reachable (in a finite
number of steps) from every individual state in the basin, and furthermore the
basin is closed under q transitions. It should not be difficult to recognize such
a “persistent q ∗ -reachability of unavoidable eventual inclusion” character in the
formalization proposed in Def. 7.(ii), where the composition with q ∗ makes the
essential difference with the preceding definition of unavoidable attracting set.
The two notions of attracting set may be expressed as binary relations on
monotypes, in the relation algebra on 2S×S , where they are designated by
-attracts, ♦-attracts. That is, given a q-dynamics on S, for any monotypes
a, b in the relation algebra on S we define:
• a -attracts b if b is a basin and a is an unavoidable attracting set of b;
• a ♦-attracts b if b is a basin and a is a potential attracting set of b.
For a given basin, the search for minimal attracting sets is supported by
the following definition, which has to do with removability of states from an
attracting set while preserving its attractiveness, in either form.
Definition 8. (Removable states). Let b be a basin in the q-dynamics.
(i) x b -removable from a (read: x is “must-removable” from a w.r.t. b) if
x≤a, a -attracts b and a\x -attracts b ;
(ii) x ♦b -removable from a (read: x is “may-removable” from a w.r.t. b) if
x≤a, a ♦-attracts b and a\x ♦-attracts b .
Minimal attracting sets are called attractors. This is formalized as follows.
Definition 9. (Attractors). Let b be a basin in the q-dynamics.
(i) An unavoidable attractor of b is an unavoidable attracting set a of b that
is minimal in the standard Boolean ordering, viz. no nonempty subset of a
is must-removable from a w.r.t. b :
a -attractor of b if a -attracts b and x b -removable from a ⇒ x = 0 .
(ii) A potential attractor of b is a potential attracting set a of b that is
minimal in the standard Boolean ordering, viz. no nonempty subset of a is
may-removable from a w.r.t. b :
a ♦-attractor of b if a ♦-attracts b and x ♦b -removable from a ⇒ x = 0 .
364 G. Scollo, G. Franco, and V. Manca
Definition 11. (Recurrence sets). Let b be a basin in the q-dynamics, then with
respect to b, r♦ and r are defined by the following equations:
r♦ = x, r = x.
x ♦-rec b x -rec b
Flights affect not only the aforementioned duality but also the existence of at-
tractors, of either kind. As shown in [9], in the presence of certain kinds of
flights in a basin, it may happen that a♦ = 0 while a = 0, as well as that a♦ = 0
while a = 0. The examples presented there reveal that the presence of a flight
in the basin may, but need not, hamper the validity of either or both of the
dual equations a♦ = r and a = img(r♦ ; q ∗ ). Purpose of the rest of this section
is to establish necessary and sufficient conditions for the validity of each of these
equations, thereby characterizing both the existence and the extent of attractors
of either kind. The following definitions prove purposeful.
A few preliminary lemmas will shorten part of the proof of the subsequent the-
orem. The first one relates to existence of nonrecurrent flights in a basin.
Proof. Let’s arrange the x-orbit in a tree, with the root labeled by x and where
the children of node labeled by individual state y are labeled by the individual
A Relational View of Recurrence and Attractors 367
states in img(y ; q). In this tree, which is finitely branching since the q-dynamics
is finitary, if a node is labeled by some individual state in b\img(r♦ ; q ∗ ), then
so are all nodes in the path leading from the root to that node—otherwise one
would get a nonempty intersection of disjoint monotypes, which is clearly absurd.
Now, let’s prune the tree by removing those nodes that are labeled by individual
states in img(r♦ ; q ∗ ), so all remaining nodes are labeled by individual states
in b\img(r♦ ; q ∗ ). It is fairly immediate to see that the hypothesis on x entails
that the pruned tree is infinite, but since it is the outcome of pruning a finitely
branching tree, it is finitely branching as well, therefore it must have an infinite
path, by König’s Lemma. Since all nodes in this path are labelled by states in
b\img(r♦ ; q ∗ ), none of these is recurrent, hence each of them occurs only once
in the path, thus the path corresponds to an x-flight in b, indeed a nonrecurrent
one, since no state in the path may ever be found in img(r♦ ; q ∗ ).
Remark 1. The hypothesis that the q-dynamics is finitary is fairly essential. This
is apparent in the use of König’s Lemma in the proof, and is further corroborated
by the following counterexample to validity of the statement in a case where that
hypothesis does not hold.
Let the q-dynamics consist of antiflight ξ, with ξ 0 the only fixed point in basin
b, and an additional individual state x≤ b with img(x ; q) = ξ N . Clearly, this dy-
namics is not finitary. However, state x does fulfil the condition required by
Lemma 1, since the x-orbit is eventually periodic, with transient x and period
ξ N , whereas r♦ = img(r♦ ; q ∗ ) = ξ 0 . Nonetheless, there’s no x-flight in b, a fortiori
no nonrecurrent x-flight.
The next lemma provides a sufficient condition for nonexistence of the unavoid-
able attractor.
Our final lemma provides a sufficient condition for the existence of flights in the
basin of any q-dynamics. It tells something more, viz. in the absence of eternal
recurrence, flights start everywhere in the basin.
Proof. Since no state is eternally recurrent, by Def. 10(ii) one gets immediately
nonemptiness of img(x ; q + ) \ img(x ; q˘∗ ) for every x≤ b. Furthermore, one may
always find an individual state x in this set such that there exists a finite
sequence of n+2 individual states (ξi | 0 ≤ i ≤ n + 1), for some n ≥ 0, that satisfies
the following requirements:
Satisfiability of the third requirement comes from the simple observation that,
if there is a path that links a given pair of distinct source and target nodes,
through a set of nodes in a directed graph, then there is a cycle-free path which
links the given pair through the same set of nodes.
The construction of an x-flight takes place by iterating the procedure specified
above to x , then to x , and so on. More precisely, the mapping ξ : N → img(x ; q ∗ )
is defined as follows. Let x0 = x, xk+1 = xk , nk the (possibly 0) number of in-
termediate states in the chosen finite sequence (xk j | 0 ≤ j ≤ nk +1) linking the
source state xk = xk0 to the target state xknk+1 = xk+1 . By convening that sum-
mation is 0-valued when the upper bound index is negative, we define for all
k∈N, 0 ≤ j ≤ nk :
k−1
ξ :j+k+ nh → xkj .
h=0
It is easy to see that the mapping ξ is indeed defined for all n∈N. To see that
it is injective, it is enough to observe that
A Relational View of Recurrence and Attractors 369
To this purpose, it suffices to show that for every x≤ b the eventual inclusion
x ≤q img(r♦ ; q ∗ ) holds, i.e., ∃n∈N : img(x ; q ≥n ) ≤ img(r♦ ; q ∗ ). By contradiction,
let’s assume the existence of x≤ b such that for no n∈N img(x ; q ≥n ) ≤ img(r♦ ; q ∗ ).
Since the q-dynamics is finitary, by Lemma 1 a nonrecurrent x-flight exists in b,
against the hypothesis that all flights in b are recurrent.
Putting together what is proven so far, we get that, in finitary q-dynamics,
a = img(r♦ ; q ∗ ) if r♦ =0 and every flight in b is recurrent. For the case r♦ = 0,
370 G. Scollo, G. Franco, and V. Manca
the condition that every flight in b be recurrent would only be met if there were
no flights in b, since there are no recurrent states. However, the assumption of
eternal dynamics (made throughout this paper) entails that all trajectories in the
basin are nonrecurrent flights, whereby the second part of statement (i) applies.
The first part of statement (i) is thus proven, while its second part is Lemma 2.
Proof of (ii).
By Prop. 6, the only ♦-nonremovable individual states are the eternally recurrent
ones, viz. those in r . So, whenever all sets consisting of ♦-removable individ-
ual states are ♦-removable themselves, then a♦ = r holds. This is immediate
for r = 0, while the case r = 0 deserves special treatment. In such a case, all
individual states in the basin are ♦-removable, but the basin itself cannot be
so (since no attracting set may be empty), and the basin must be infinite (by
a corollary of Lemma 3), hence the attractor does not exist, or a♦ = 0, in this
case—formally, a♦ = r holds in this case, too. We shall thus prove two facts:
1. y ≤ ♦-removable ⇒ y ♦b -removable from b if every flight is eternally recurrent.
2. If there is a flight that is not eternally recurrent, then a♦ = 0 .
We prove fact 1 by contraposition. Assume y ♦b -removable from b does not
hold, while for every x≤ y x ♦b -removable from b holds, that is y ≤ ♦-removable,
we then show the existence of a flight that is not eternally recurrent.
First, y ≤ ♦-removable by Prop. 6 entails y ≤ b\r (†).
Second, for all individual states z≤ b we have img(z ; q ∗ ) · y = 0 ⇒ z≤ b\r ,
by Prop. 5(ii), therefore img(y ; q˘∗ ) ≤ b\r (‡).
Now, the first assumption just means that b\y is not an attracting set. We
have two cases where this may happen:
• y = b, thus r = 0. By Lemma 3 there exist flights in the basin; none of them
is eternally recurrent, since there is no eternally recurrent state in the basin.
• b\y = 0, actually r = 0 and r ≤ b\y , by (†) above. Since b\y is not an at-
tracting set, by Def. 7(ii) there is an x≤ b such that for all z≤ img(x ; q ∗ ) one has
img(z ; q ∗ ) · 1 \(b\y) = 0 , and since basin b is closed under transitions, this is
equivalent to img(z ; q ∗ ) · y = 0 for every z≤ img(x ; q ∗ ) . For such an x it must
hold that img(x ; q ∗ ) · r = 0, by (‡) above. If we can show the existence of an
x-flight, this surely would not be eternally recurrent, according to Def. 13(ii),
since x≤ b\img(r ; q˘∗ ), by the previously inferred equation. The existence of
such a flight is a consequence of the absence of eternally recurrent states in
img(x ; q ∗ ), according to Lemma 3, since img(x ; q ∗ ) is a basin.
Finally, here is a proof of fact 2 stated above. Suppose ξ is a flight such
that for some k∈N img(ξ k ; q ∗ ) · r = 0 . Then img(ξ n ; q ∗ ) · r = 0 ∀ n ≥ k, so
for the ξ k -flight ξ defined by ξi = ξ k+i we have img(ξN ; q ∗ ) · r = 0 , thus by
Prop. 6 img(ξN ; q ∗ ) ≤ ♦-removable . We now have to show that there exists an
infinite subset of img(ξN ; q ∗ ) that is not ♦b -removable from b. This may well
be img(ξN ; q ∗ ) itself. This set is infinite, since ξ is a flight, and furthermore
img(ξN ; q ∗ ) ♦b -removable from b does not hold because img(ξN ; q ∗ ) is closed under
transitions; to see this, consider that b\img(ξN ; q ∗ ) cannot be an attracting set
of b since, ∀ x≤ img(ξN ; q ∗ ) ≤ b , y≤ img(x ; q ∗ ) ⇒ img(y ; q ∗ ) · (b\img(ξN ; q ∗ )) = 0,
therefore y ≤q b\img(ξN ; q ∗ ) cannot hold, by Def. 7(ii) and Prop. 2.
A Relational View of Recurrence and Attractors 371
Remark 2. Finitarity assumptions are only needed for the characterization of the
unavoidable attractor. The modal difference between the two forms of attractor,
and of recurrence alike, obviously disappears in deterministic dynamics, yet it is
not easy to translate the content of Theorem 1 in terms of classical dynamical
systems, not even those of symbolic dynamics [8]. These are deterministic sys-
tems but rely on a metric structure of the state space, enabling seriously different
concepts of attraction and recurrence, that are based on approximate transition
through states, i.e. transition at arbitrarily small distance from the given state.
While no easy translation of our theorem can be given in so different a setting, a
certain analogy with Poincaré Recurrence Theorem surfaces, with boundedness
and invariance replaced by finitarity and flight recurrence hypotheses.
just be that those specific molecules interact eventually, given that they stay
‘close enough’, no matter when and how exactly [6].
We aim at continuing the relational formulation and analysis undertaken in
the present paper on other dynamical concepts of actual biological interest, such
as “creods”, “centers”, “focuses”, “saddles”, and of “weak” forms of chaos, which
could be defined by combining some of the features defined here.
We think that the work outlined above could suggest definitions of other forms
of attractors, more directly connected to the relational formulation of state tran-
sition dynamics, in that suitable concepts of stability, control, and randomness
could be analyzed by associating information sources to relational dynamical
systems. In this perspective, informational and entropic concepts could point
out interesting characterizations of fundamental dynamical concepts for com-
plex biological dynamics.
References
1. W.R. Ashby, An Introduction to Cybernetics, Chapman and Hall (1956)
2. R. Backhouse and J. van der Woude, Demonic Operators and Monotype Factors,
Mathematical Structures in Computer Science, 3:4 (1993) 417–433
3. C. Bonanno and V. Manca, Discrete dynamics in biological models, Gh. Păun, C.
Calude (Eds.), Romanian Journal of Information Science and Technology, 1-2:5
(2002) 45–67
4. L. Bianco, F. Fontana, G. Franco and V. Manca, P Systems for Biological Dynam-
ics, G. Ciobanu, Gh. Păun, M. J. Perez-Jimenez (Eds.), Applications of Membrane
Computing, Natural Computing Series, Springer (2006) 81–126
5. R.L. Devaney, Introduction to chaotic dynamical systems, Addison-Wesley (1989)
6. G. Franco, Biomolecular Computing — Combinatorial Algorithms and Laboratory
Experiments, PhD thesis, University of Verona, Italy (2006)
7. S. Kauffman, Investigations, Oxford University Press (2000)
o
8. P. Kurka, Topological and Symbolic Dynamics, Cours Spécialisés 11, Société
Mathématique de France (2003)
9. V. Manca, G. Franco and G. Scollo, State transition dynamics: basic concepts and
molecular computing perspectives, M. Gheorghe (Ed.), Molecular Computational
Models: Unconventional Approaches, Idea Group, Hershey, PA, USA (2005) 32–55
10. V. Manca and L. Bianco, Biological Networks in Metabolic P Systems, (2006)
submitted.
11. V. Manca, L. Bianco and F. Fontana, Evolutions and oscillations of P systems:
Theoretical considerations and applications to biochemical phenomena, G. Mauri,
Gh. Păun, M.J. Pérez-Jiménez, G. Rozenberg, A. Salomaa (Eds.), Membrane
Computing, LNCS 3365, Springer (2005) 63–84
12. Gh. Păun, Computing with membranes, J. Comput. System Sci., 61:1 (2000)
108–143
13. Gh. Păun, Membrane Computing. An Introduction, Springer (2002)
14. G. Schmidt, Th. Ströhlein, Relations and Graphs, Springer (1993)
15. A. Tarski, On the calculus of relations, Journal of Symbolic Logic, 6 (1941) 73–89
16. S. Wolfram Theory and Application of Cellular Automata, Addison-Wesley (1986)
17. A. Wuensche, Basins of Attraction in Network Dynamics: A Conceptual Frame-
work for Biomolecular Networks, G. Schlosser, G.P. Wagner (Eds.), Modularity in
Development and Evolution, Chicago University Press (2002)
On Two Dually Nondeterministic Refinement
Algebras
Kim Solin
1 Introduction
Refinement algebras are abstract algebras for reasoning about program refine-
ment [18,21,22,20]. Axiomatic reasoning can, in a certain sense, provide a sim-
pler reasoning tool than the classical set and order-theoretic frameworks [1,5,16].
Different classes of predicate transformers over a fixed state space form the mo-
tivating models, but should not be seen as exclusive.
The first papers on refinement algebras, in our sense of the term, were von
Wright’s initial paper [21], followed by [22], which builds on the aforementioned.
In these papers von Wright outlines an axiomatisation with the set of isotone
predicate transformers as an intended model. He also proposes the introduction
of angelic choice as a separate operator in the algebra.
This paper proposes a refinement algebra that extends the original framework
with three operators: the angelic choice (as suggested by von Wright), strong
angelic iteration and a negation operator. Looking at the predicate-transformer
models, the negation operator demands that the set of all predicate transformers
be a model, whereas the iteration operator demands that the predicate trans-
formers be isotone (as a consequence of needing to establish the existence of fix-
points via the Knaster-Tarski theorem). To solve this conflict, we let the carrier
set be the set of all predicate transformers over a fixed state space and impose
isotony conditions on elements of axioms involving iteration. Taking one step
further, we also add ways of imposing conjunctivity and disjunctivity conditions
Currently visiting Institut für Informatik, Universität Augsburg.
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 373–387, 2006.
c Springer-Verlag Berlin Heidelberg 2006
374 K. Solin
on elements. Thus one could say that the algebra we propose is an algebra in-
tended for reasoning about isotone predicate transformers, but having the whole
class of predicate transformers as a model.
In the earlier frameworks, assertions were always defined in terms of guards. In
the framework we propose here, guards can also be defined in terms of assertions.
The guards and the assertions thus have equal status. Together with von Wright
we have investigated an enabledness and a termination operator in refinement
algebra [20]. The enabledness operator applied to a program denotes those states
from which the program is enabled, that is those states from which the program
will not terminate miraculously. The termination operator, on the other hand,
yields those states from which the program is guaranteed to terminate in some
state, that is, the program will not abort. In this paper, these operators are
defined in terms of the other operators as opposed to our earlier work where
they were introduced with an implicit axiomatisation. Thus, the framework of
this paper subsumes the one of [20].
Action systems comprise a formalism for reasoning about parallel programs
[2,4]. The intuition is that an action system is an iteration of a fixed number
of demonic choices that terminates when none of the conjunctive actions are
enabled any longer. In the refinement algebra, an action system can be expressed
using the enabledness operator. An action system can be decomposed so that
the order of execution is clearly expressed; this has been shown by Back and von
Wright using predicate transformer reasoning [6]. In the axiomatisation of [20]
we were able to prove one direction of action system decomposition, but the
other direction seems to be harder. Using the framework we present here, both
directions can be derived quite easily.
When the negation operator is left out we obtain a dually nondeterminis-
tic refinement algebra for which the isotone predicate transformers constitute
a model. This means that no special conditions need to be imposed on the el-
ements to guarantee the existence of fixpoints. Also in this framework guards
and assertions can be defined in terms of each other. On the other hand, explicit
definitions of the enabledness and termination operators, upon which the proof
of action-system decomposition relies, seem not to be possible.
The following work can be traced in the history of this paper. Kozen’s ax-
iomatisation of Kleene algebra and his introduction of tests into the algebra has
been a very significant inspiration for us [12,14]. Von Wright’s non-conservative
extension of Kleene algebra with tests was the first abstract algebra that was gen-
uinely an algebra for total correctness (it drops right-annihilation) [21]. It rests
upon previous work on algebraic program reasoning by Back and von Wright [6].
Desharnais, Möller, and Struth extended Kleene algebra with a domain opera-
tor [8], upon which Möller relaxed Kleene algebra by giving up right-annihilation
(as in [21]) and right-distributivity of composition. These two papers laid a firm
ground to the the developments in [20], where the enabledness and termination
operators were introduced. Angelic nondeterminism takes off in the theory of
nondeterministic automata and Floyd’s nondeterministic programs [10]. In the
context of program refinement, Broy and Nelson [15,7], Back and von Wright [3],
On Two Dually Nondeterministic Refinement Algebras 375
and Gardiner and Morgan [11] are early names. The present paper extends an
earlier workshop version [19].
The paper is set up as follows. First the abstract algebra is proposed and a
program intuition is given. Then a predicate-transformer model for the algebra
is provided, which serves as a program-semantical justification. After the model,
basic properties of the algebra are discussed. The third section extends the alge-
bra by guards and assertions. After this the termination and enabledness opera-
tors are introduced. Action systems are considered under the abstract-algebraic
view in Section 4. The final section before the concluding one, remarks on a
dually nondetereministic refinement algebra without the negation operator.
The purpose of this paper is not to provide more grandiose applications nor to
give a complete algebraic treatment; the purpose is to lay down the first strokes
of the brush, the purpose is to get started.
2.1 Axiomatisation
A dually nondeterministic refinement algebra with negation (dndRAn) is a struc-
ture over the signature (, , ¬, ; ,ω ,† , ⊥, , 1) such that (, , ¬, ⊥, ) is a
Boolean algebra, (; , 1) is a monoid, and the following equations hold (; left
implicit, x y ⇔ x y = x):
def
¬xy = ¬(xy),
x = , ⊥x = ⊥,
(x y)z = xz yz and (x y)z = xz yz.
be left out, since they can be derived as theorems. For clarity, we choose to have
the more spelled-out axiomatisation.
As a rough intuition, the elements of the carrier set can be seen as program
statements. The operators should be understood so that is demonic choice (a
choice we cannot affect), is angelic choice (a choice we can affect), ; is sequen-
tial composition, ¬x terminates in any state where x would not terminate and the
other way around, ω , the strong (demonic) iteration, is an iteration that either
terminates or goes on infinitely, in which case it aborts; and † , the strong angelic
iteration, is an iteration that terminates or goes on infinitely, in which case a
miracle occurs. If y establishes anything that x does and possibly more, then
x is refined by y: x y. The constant ⊥ is abort, an always aborting program
statement; is magic, a program statement that establishes any postcondition;
and 1 is skip. A conjunctive element can be seen as facilitating demonic non-
determinism, but not angelic, whereas a disjunctive element can have angelic
nondeterminism, but not demonic. An isotone element permits both kinds of
nondeterminism.
2.2 A Model
A predicate transformer S is a function S : ℘(Σ) → ℘(Σ), where Σ is any set.
Programs can be modelled by predicate transformers according to a weakest
precondition semantics [9,5]: S.q denotes those sets of states from which the
execution of S is bound to terminate in q.
If p, q ∈ ℘(Σ) and S satisfies
p ⊆ q ⇒ S.p ⊆ S.q then S is isotone.
If
S for any set I satisfies S.( i∈I pi ) = i∈I S.pi and S.( i∈I pi ) = i∈I S.pi
it is conjunctive and disjunctive, respectively. There are three named predicate
transformers abort = (λq • ∅), magic = (λq • Σ), and skip = (λq • q). A predicate
transformer S is refined by T , written S T , if (∀q ∈ ℘(Σ) • S.q ⊆ T.q). This
paper deals with six operations on predicate transformers defined by
(S T ).q = S.q ∩ T.q,
(S T ).q = S.q ∪ T.q,
¬S.q = (S.q)C ,
(S; T ).q = S.(T.q),
S ω = μ.(λX • S; X skip) and
S † = ν.(λX • S; X skip),
where is set complement, μ denotes the least fixpoint with respect to , and
C
With the aid of the above lemma and the Knaster-Tarski theorem, it is easily
verified that the set of all predicate transformers forms a model for the dndRAn
with the interpretation of the operators given as above.
Proposition 1. Let PtranΣ be the set of all predicate transformers over a set
Σ. Then
(PtranΣ , ¬, , , ; ,ω ,† , magic, abort, skip)
is a dndRAn, when the interpretation of the operators is given according to the
above.
(1g) g is functional,
(2g) g has a complement ḡ satisfying
gḡ = and g ḡ = 1, and
(3g) for any g also satisfying (1g) and (2g) it holds that
gg = g g .
Assertions are similar to guards, but instead of performing a miracle when the
predicate does not hold, they abort. That is to say, an assertion that is executed
in a state where the predicate does not hold establishes no postcondition.
(1a) p is functional,
(2a) p has a complement p̄ satisfying
pp̄ = ⊥ and p p̄ = 1, and
(3a) for any p also satisfying (1a) and (2a) it holds that
pp = p p .
It is easily established that the guards and the assertions form Boolean algebras,
since guards and assertions are closed under the operators , , and ;.
Proposition 2. Let G be the set of guards and let A be the set of assertions of
a dndRAn. Then
(G, , ; ,¯, 1, ) and (A, ; , ,¯, ⊥, 1)
are Boolean algebras.
From this we get the following useful fact, by verifying that g⊥ 1 is the unique
complement of ḡ in the sense of (2g).
Lemma 2. For any x in the carrier set of an dndRAn it holds that x⊥ and x
are functional.
On Two Dually Nondeterministic Refinement Algebras 379
With the aid of the previous lemma, the guard and assertion conditions yielding
the following proposition are easily verified.
Proposition 3. Let g be a guard and let p be an assertion in a dndRAn. Then
ḡ⊥ 1 is an assertion with the complement g⊥ 1, and
This means that the set of guards and the set of assertions can be defined in
terms of each other.
(g3) also hold when the guards are interpreted in the predicate-transformer sense
above. This means that guards in the predicate-transformer sense constitute a
model for the guards in the abstract-algebraic sense. A similar argumentation
shows that assertions in the predicate-transformer sense are a model for asser-
tions in the abstract-algebraic sense.
4.1 Definitions
The enabledness operator is an operator that maps any program to a guard
that skips in those states in which the program is enabled, that is, in those states
from which the program will not terminate miraculously. It binds stronger than
all the other operators and is a mapping from the set of isotone elements to the
set of guards defined by
x = x⊥ 1. (3)
To see that the operator is well-defined, note that x⊥ 1 can be shown to be a
guard with
¬x⊥ 1 (4)
as the complement.
In [20] the enabledness operator was defined implicitly similarly to the domain
operator of Kleene algebra with domain (KAD) [8]. The next theorem shows that,
in this framework, the implicit definition found in [20] is equivalent to the explicit
definition above (in fact, as shown below only the two first axioms of the implicit
axiomatisation are needed). Note that a similar move could not be done in KAD,
since the explicit definition (3) relies on the lack of the right annihilation axiom
for .
Theorem 2. For any guard g and any isotone x in the carrier set of an dndRAn,
x satisfies
xx = x and (5)
g (gx) (6)
if and only if
x = x⊥ 1. (7)
This can proved by reusing the proofs from [8]. Uniqueness of x then follows
from the principle of indirect equality and (8). Then it suffices to show that the
right hand side of the explicit definition satisfies (5–6). This is verified by
(x⊥ 1)x x
⇔ {axiom}
x⊥x x x
⇔ {axioms}
x⊥ x x1 x
⇐ {isotony}
⊥1
⇔ {⊥ bottom element}
True
and
g gx⊥ 1
⇔ {Corollary 1}
g⊥ 1 gx⊥ 1
⇔ {axiom}
g⊥⊥ 1 gx⊥ 1
⇐ {isotony}
⊥x
⇔ {⊥ bottom element and left annihilator}
True
which proves the proposition.
to the miracle guard and the abortion guard of [5], respectively, but lifted to
predicate-transformer level. That the interpretation is sound is seen by the fact
that [¬S.∅] = S; abort 1 and {S.Σ} = S; magic 1.
The following is a slight digression. What we did above was to turn the miracle
and abortion guards into a guard and an assertion (in the predicate-transformer
and the abstract-algebraic sense), respectively, since predicate transformers make
up our concrete carrier set in this model. There is, however, another way of lifting
the miracle and the abortion guard to the predicate-transformer level which is
closer to their original definition. This is done by setting the miracle guard
to be ¬S⊥ and the termination guard to be S. This interpretation does not,
however, satisfy the the respective axioms of enabledness and termination, so the
connection to KAD is lost. Nonetheless, in certain applications the possibility to
work with miracle and abortion guard without turning them into a guard and
an assertion could prove useful.
Action-system decomposition has been shown by Back and von Wright using
predicate transformer reasoning [6]. We now prove this axiomatically. We begin
by an outer derivation, collecting assumptions as needed:
(x y)ω x y
= {(2)}
y ω (xy ω )ω x y
= {assumption}
y ω (yxy ω )ω x y
= {guards Boolean algebra}
y ω (yxy ω )ω y x
= {leapfrog, conjunctivity}
y ω y(xy ω y)ω x
= {collect: if x = (xy ω y)}
y ω y(xy ω y)ω (xy ω y).
x (xz)
⇔ {definitions}
x⊥ 1 xz⊥ 1
⇐ {isotony}
⊥ z⊥
⇔ {⊥ bottom element}
True
(xy ω y) x
⇔ {definition}
xy ω y⊥ 1 x⊥ 1
⇐ {isotony}
y ω y⊥ ⊥
⇐ {induction}
y⊥ y⊥ ⊥
⇔ {definition and (4)}
y⊥ (¬y⊥ 1)⊥ ⊥
⇔ {axioms}
y⊥ (¬y⊥ ⊥) ⊥
⇔ {⊥ bottom element}
y⊥ ¬y⊥ ⊥
⇔ {axiom}
(y ¬y)⊥ ⊥
⇔ {axioms}
True.
On Two Dually Nondeterministic Refinement Algebras 385
Using the implicit definition without the negation operator, the first refinement
of the assumption can also easily be proved [20], but the second refinement seems
to require some additional axioms for the enabledness operator (see below).
x (y z) = (x y) z x (y z) = (x y) z
xy =yx xy = yx
x=x x⊥ = x
xx=x xx =x
x (y z) = (x y) (x z) x (y z) = (x y) (x z)
x(yz) = (xy)z
1x = x
x1 = x
x =
⊥x = ⊥
x(y z) xy xz x(y z) xy xz
(x y)z = xz yz (x y)z = xz yz
xω = xxω 1 x† = xx† 1
xz y z ⇒ xω y z z xz y ⇒ z x† y
Since the isotone predicate transformers are closed under union, they constitute
a predicate-transfomer model for the algebra under the interpretation given in
Section 2.2.
By examining the proofs of Section 3, it is clear that the results regarding
guards and assertions can be re-proved without the negation operator. On the
other hand, it seems to us that the enabledness operator cannot be cast in
the explicit form, since we cannot express the complement ¬x⊥ 1 of x⊥ 1
and this is needed for showing that x⊥ 1 actually is a guard. Analogously,
the termination operator cannot be given an explicit definition either. Thus,
the operators have to be axiomatised along the lines of [20]. The termination
operator is axiomatized by
x = τ xx, (18)
◦ ◦
τ (g x) g , (19)
386 K. Solin
7 Concluding Remarks
We have proposed a dually nondeterministic refinement algebra with a negation
operator for reasoning about program refinement and applied it to proving a
rather humble property of action systems. The negation operator facilitates use-
ful explicit definitions of the enabledness and the termination operators and it
is a powerful technical tool. It is, however, antitone, which perhaps makes the
reasoning a bit more subtle. When dropping the negation operator, but keeping
the angelic choice, guards and assertions can still be defined in terms of each
other, whereas the enabledness and termination operators no longer can be given
explicit definitions.
Finding more application areas of this refinement algebra is one of our intents.
Applications that genuinely include angelic nondeterminism (here it only comes
into play indirectly via the definition of enabledness) is a field where the algebra
could be put to use. The strong angelic iteration and the termination operator
beg for application. A systematic investigation striving towards a collection of
calculational rules is yet to be done.
References
1. R.-J. Back. Correctness Preserving Program Refinements: Proof Theory and Ap-
plications, volume 131 of Mathematical Centre Tracts. Mathematical Centre, Am-
sterdam, 1980.
2. R.-J. Back and R. Kurki-Suonio. Decentralization of Process Nets with Central-
ized Control. In 2nd ACM SIGACT-SIGOPS Symp. on Principles of Distributed
Computing, ACM, Montreal, Quebec, Canada, 1983.
3. R.-J. Back and J. von Wright. Duality in specification languages: A lattice theo-
retical approach. Acta Informatica, 27(7), 1990.
4. R.-J. Back and K. Sere. Stepwise refinement of action systems. Structured Pro-
gramming, 12, 1991.
5. R.-J. Back and J. von Wright. Refinement Calculus: A Systematic Introduction.
Springer-Verlag, 1998.
6. R.-J. Back and J. von Wright. Reasoning algebraically about loops. Acta Infor-
matica, 36, 1999.
7. M. Broy and G. Nelson. Adding Fair Choice to Dijkstra’s Calculus. ACM Trans-
actions on Programming Languages and Systems, Vol 16, NO 3, 1994.
8. J. Desharnais, B. Möller and G. Struth. Kleene algebra with domain. Technical
Report 2003-7, Universität Augsburg, Institut für Informatik, 2003.
9. E.W. Dijkstra. A Discipline of Programming. Prentice-Hall International, 1976.
10. R.W. Floyd. Nondeterministic algorithms. Journal of the ACM, 14(4), 1967.
11. P.H. Gardiner and C.C. Morgan. Data refinement of predicate transformers. The-
oretical Computer Science, 87(1), 1991.
12. D. Kozen. A Completeness Theorem for Kleene Algebras and the Algebra of
Regular Events. Inf. Comput. 110(2), 1994.
13. D. Kozen. Automata and Computability. Springer-Verlag, 1997.
14. D. Kozen. Kleene algebra with tests. ACM Transactions on Programming Lan-
guages and Systems, 19(3), 1997.
15. G. Nelson. A Generalization of Dijkstra’s Calculus. ACM Transactions on Pro-
gramming Languages and Systems, 11(4), 1989.
16. C.C. Morgan. Programming from Specifications (2nd edition). Prentice-Hall, 1994.
17. B. Möller. Lazy Kleene algebra. In D. Kozen (ed.): Mathematics of Program
Construction, LNCS 3125, Springer, 2004.
18. Sampaio, A.C.A. An Algebraic Approach To Compiler Design. World Scientific,
1997.
19. K. Solin. An Outline of a Dually Nondeterministic Refinement Algebra with Nega-
tion. In Peter Mosses, John Power, and Monika Seisenberger (eds.): CALCO Young
Researchers Workshop 2005, Selected Papers. Univ. of Wales, Swansea, Technical
Report CSR 18-2005, 2005.
20. K. Solin and J. von Wright. Refinement Algebra with Operators for Enabledness
and Termination. Accepted to MPC 2006.
21. J. von Wright. From Kleene algebra to refinement algebra. In E.A. Boiten and
B. Möller (eds.): Mathematics of Program Construction, volume 2386 of Lecture
Notes in Computer Science, Germany, Springer-Verlag, 2002.
22. J. von Wright. Towards a refinement algebra. Science of Computer Programming,
51, 2004.
On the Fixpoint Theory of Equality and Its
Applications
Abstract. In the current paper we first show that the fixpoint theory of equality
is decidable. The motivation behind considering this theory is that second-order
quantifier elimination techniques based on a theorem given in [16], when success-
ful, often result in such formulas. This opens many applications, including auto-
mated theorem proving, static verification of integrity constraints in databases as
well as reasoning with weakest sufficient and strongest necessary conditions.
1 Introduction
In this paper we investigate the fixpoint theory of equality, F EQ, i.e., the classical first-
order theory with equality as the only relation symbol, extended by allowing least and
greatest fixpoints. We show that F EQ is decidable.
The motivation behind considering this theory follows from important applications
naturally appearing in artificial intelligence and databases. Namely, we propose a tech-
nique, which basically depends on expressing some interesting properties as second-
order formulas with all relation symbols appearing in the scope of second-order quanti-
fiers, then on eliminating second-order quantifiers, if possible, and obtaining formulas
expressed in the theory F EQ and finally, on reasoning in F EQ.
Second-order formalisms are frequent in knowledge representation. On the other
hand, second-order logic is too complex1 to be directly applied in practical reasoning.
The proposed technique allows one to reduce second-order reasoning to fixpoint calcu-
lus for a large class of formulas and then to apply the decision procedure for F EQ.
To achieve our goal we first introduce a logic with simultaneous least fixpoints (Sec-
tion 2) and then define the theory F EQ, prove its decidability and estimate complexity
of reasoning (see Section 3). Next, in Section 4, we recall the fixpoint theorem of [16].
Then we discuss some applications of the proposed technique in automated theorem
proving (Section 5.1), static verification of integrity constraints in deductive databases
Supported in part by the grants 3 T11C 023 29 and 4 T11C 042 25 of the Polish Ministry of
Science and Information Society Technologies.
1
It is totally undecidable over arbitrary models and PS PACE-complete over finite models.
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 388–401, 2006.
c Springer-Verlag Berlin Heidelberg 2006
On the Fixpoint Theory of Equality and Its Applications 389
(Section 5.2) and reasoning with weakest sufficient and strongest necessary conditions
as considered in [12,7] (Section 5.3).
To our best knowledge, the method proposed in Section 5.1 is original. The method
discussed in Section 5.2 substantially extends the method of [9] by allowing recursive
rules in addition to relational databases considered in [9]. The method presented in
Section 5.3 shows a uniform approach to various forms of reasoning important in many
artificial intelligence applications.
2 Fixpoint Logic
In this paper we deal with classical first-order logic (FOL) and the simultaneous least
fixpoint logic (SLFP) with equality as a logical symbol, i.e., whenever we refer to the
empty signature, we still allow the equality symbol within formulas.
We assume that the reader is familiar with FOL and define below syntax and seman-
tics of SLFP.
Many of the notions of interest for us are syntax independent, so the choice of a syn-
tactical representation of a particular semantics of fixpoints is immaterial. In this se-
mantical sense the logic we consider has been introduced by Chandra and Harel in
[5,4]. However, here we use a different syntax. A number of different definitions of
SLFP, though of the same expressive power, can be found in the literature. All of them
allow iterating a FOL formula up to a fixpoint. The difference is in the form of iteration.
Definition 2.2. Let ϕi (R1 , . . . , R , x̄i , ȳi ), for i = 1, . . . , , be FOL formulas, where
x̄i and ȳi are all free first-order variables of ϕi , | x̄i | = ki , none of the x’s is among
the y’s and where, for i = 1, . . . , , Ri are ki -argument relation symbols, all of whose
occurrences in ϕ1 , . . . , ϕ are positive. Then the formula
S LFP [R1 (x̄1 ) ≡ ϕ1(R1 , . . . , R , x̄1 , ȳ1 ), . . . , R (x̄ ) ≡ ϕ (R1 , . . . , R , x̄ , ȳ )]
is called a simultaneous fixpoint formula (with variables x̄1 , . . . , x̄ , ȳ1 . . . , ȳ free). In
the rest of the paper we often abbreviate the above formula by S LFP [R̄ ≡ ϕ̄].
Let σ be a signature. Then the set of SLFP formulas over σ is inductively defined as
the least set containing formulas of FOL over σ, closed under the usual syntax rules of
first-order logic and applications of simultaneous least fixpoints.
Note that according to the above rules, the fixpoint operators cannot be nested in SLFP,
however, it is permitted to use boolean combinations of fixpoints, as well as to quantify
variables outside of them.
2
It is assumed here that all implications of the form p → q are substituted by ¬p ∨ q and all
equivalences of the form p ≡ q are substituted by (¬p ∨ q) ∧ (¬q ∨ p).
390 A. Szałas and J. Tyszkiewicz
FOLk and SLFPk stand for the sets of those formulas in FOL and SLFP, respec-
tively, in which only at most k distinct first-order variable symbols occur.
For a structure A, by A we denote the domain of A. By Ak we denote the cartesian
product A × . . . × A. By ω we denote the set of natural numbers.
k−times
We assume the standard semantics of FOL. For SLFP we need a semantical rule
concerning the semantics of the formula S LFP [R̄ ≡ ϕ̄].
Further on x̄ : ā, R1 : Φ1 , . . . , R : Φ denotes a valuation assigning ā to x̄ and Φi to
Ri , for i = 1, . . . , . The values of the remaining variables play the rôle of parameters
and are not reflected in the notation.
Given a structure A, we define the sequence (Φ̄α ) = (Φα 1 , . . . , Φ ) indexed by
α
α β
Φi = Φi for i = 1, . . . , , when α is a limit ordinal.
β<α
Since each ϕi is positive in all the Rj ’s, a simple transfinite induction shows that the
sequence (Φ̄α ) is ascending in each of the coordinates.
Let Φ̄∞ = Φ∞ ∞
def
1 , . . . , Φ = Φα1,..., Φα . Then we define
α α
Another fact that we will need is a characterization of the expressive power of FOLk
in terms of an infinitary Ehrenfeucht-Fraı̈ssé-style pebble game. This game character-
izes the expressive power of the logic we have introduced in the sense formulated in
Theorem 3.3 of [3,8,17].
On the Fixpoint Theory of Equality and Its Applications 391
Players, board and pebbles. The game is played by two players, Spoiler and Dupli-
cator, on two σ-structures A, A with two distinguished tuples ā ∈ Ak and ā ∈ A .
There are k pairs of pebbles: (1, 1 ), . . . , (k, k ). Pebbles without primes are in-
tended to be placed on elements of A, while those with primes on elements of A .
Initial position. Initially, the pebbles are located as follows: pebble i is located on ai ,
and pebble i is located on ai , for i = 1, . . . , k.
Moves. In each of the moves of the game, Spoiler is allowed to choose one of the
structures and one of the pebbles placed on an element of that structure and move
it onto some other element of the same structure. Duplicator must place the other
pebble from that pair on some element in the other structure so that the partial
function from A to A mapping x ∈ A on which pebble i is placed onto the element
x ∈ A on which pebble i is placed and constants in A onto the corresponding
constants in A , is a partial isomorphism. Spoiler is allowed to alternate between
the structures as often as he likes, when choosing elements.
Who wins? Spoiler wins if Duplicator does not have any move preserving the isomor-
phism. We say that Duplicator has a winning strategy if he can play forever despite
of the moves of Spoiler, preventing him from winning.
Theorem 3.3. Let A, B be any two structures of a common signature. Then Duplicator
has a winning strategy in the game on A, ā and B, b̄ iff A, ā ≡k B, b̄.
Henceforth we restrict our attention to the theory and models of pure equality. Let for
a cardinal number m the symbol Em stand for the only (up to isomorphism) model of
pure equality of cardinality m.
The following theorem can easily be proved using Theorem 3.3.
Theorem 3.4. Let k ∈ ω. Then for any cardinal numbers m, n ≥ k and any two tuples
ā, b̄ of length k over Em and En , respectively, Em , ā ≡k En , b̄ if and only if for every
i, j ≤ k the equivalence ai = aj ≡ bi = bj holds.
Proof. By theorem 3.3 it suffices to prove that the Duplicator has a winning strategy in
the game iff for every i, j ≤ k, ai = aj ≡ bi = bj .
If the equivalence does not hold, then certainly the Duplicator lost already at the
beginning. In turn, if it does, than the initial position has the required isomorphism,
and this can be preserved by the Duplicator, since the structures have at least as many
elements as the number of pebbles, so the Duplicator can mimic any move of the
Spoiler.
Theorem 3.6. Let 0 < n ∈ ω and let all the first-order formulas ϕi in an SLFP
formula S LFP [R̄ ≡ ϕ̄] have at most k free variables and be of quantifier rank at most
d. Then, over the empty signature,3 each component Φni is definable by a first-order
formula with at most k variables and of quantifier rank at most dn, i.e., for any 0 < n ∈ ω
there are formulas ϕn1 , . . . , ϕn of FOLk of quantifier rank ≤ dn such that for any
structure A over the empty signature, Φni = {ā ∈ Aki | A, x̄i : ā |= ϕ(x̄i )}.
Next, an application of Theorem 3.4 and the previous results, yields the following con-
sequence.
Corollary 3.7. Let 0 < k ∈ ω. If A is a model of pure equality of cardinality at least
k, ā ∈ Ak , and ϕ(x̄) ∈ SLFPk, then A |= ϕ[ā] iff Ek |= ϕ[ā ], where ā ≡k ā.
Proof. First, we claim that every subformula of ϕ of the form S LFP [R̄ ≡ ϕ̄] can be
substituted by an FOLk formula, equivalent to the former both in A and Ek .
Indeed, in Ek the sequence of stages (Φ̄α ) = (Φα
1 , . . . , Φ ) reaches a fixpoint in
α
∞ K
a finite number of iterations, say K, i.e., Φ̄ = Φ̄ . The reason is that this sequence
is ascending in each of the coordinates, and each coordinate for each α is a subset of
a fixed, finite set. Therefore
Ek |= ∀x̄ ϕK
i (x̄) ≡ ϕi
K+1
(x̄) ,
i=1
This sentence asserts that the iteration of S LFP [R̄ ≡ ϕ̄] stops in A after at most K
steps, too. It is now routine to use the FOLk formulas ϕK i (x̄) to replace S LFP [R̄ ≡ ϕ̄]
in ϕ.
Our claim has been proven. So let ϕ ∈ FOLk be equivalent to ϕ in both A and Ek ,
and obtained by the substitution of all fixpoints of ϕ by their FOLk -equivalents.
Now by Theorem 3.4 it follows that A |= ϕ [ā] iff Ek |= ϕ [ā ], where ā ≡k ā, and
this carries over to the formula ϕ, as desired.
Proof. Indeed, any structure over the empty signature is isomorphic to one of the form
Em , and since Em ≡k Ek , the equivalence follows.
This suggests the following algorithm for testing satisfiability of fixpoint formulas over
the empty signature: for a given formula ϕ(x̄) ∈ SLFPk we test if it is satisfied by
A, ā, where A ranges over all (pure equality) structures of cardinality at most k, and
ā ranges over all equality types of vectors of length |x̄| of elements from A.
Concerning the complexity of this procedure, the number of structures to be tested is
linear in k. The number of iterations of any fixpoint in SLFPk is bounded by O(B(k) ),
where B(n) is the n-th Bell number and the maximal number of formulas whose
simultaneous fixed point is used. Indeed, B(k) is the number of ≡k -equivalence classes.
Thus computing the fixpoints literally, according to the definition, takes time bounded
by a polynomial of B(k) , and computing the first-order constructs increases this by
only a polynomial factor.
Therefore the algorithm we obtained is of exponential complexity.
Further on we deal with the first- and the second-order classical logic with equality.
Below we recall the theorem for elimination of second-order quantifiers, proved
in [16]. This theorem, combined with the decidability result given in Section 3.2, pro-
vides us with a powerful tool for deciding many interesting properties, as shown in
Section 5. For an overview of the related techniques see [15].
Let B(X) be a second-order formula, where X is a k-argument relational variable
and let C(x̄) be a first-order formula with free variables x̄ = x1 , . . . , xk . Then by
B[X(t̄) := C(x̄)] we mean the formula obtained from B(X) by substituting each
occurrence of X of the form X(t̄) in B(X) by C(t̄), renaming the bound variables in
C(x̄) with fresh variables.
Example 4.1. Let B(X) ≡ ∀z[X(y, z) ∨ X(f (y), g(x, z))], where X is a relational
variable and let C(x, y) ≡ ∃zR(x, y, z). Then B[X(t1 , t2 ) := C(x, y)] is defined by
∀z[ ∃z R(y, z, z ) ∨ ∃z R(f (y), g(x, z), z ) ],
C (y,z) C (f (y),g(x,z))
where C (x, y) is obtained from C(x, y) by renaming the bound variable z with z .
Remark 4.3. Observe that, whenever formula A in Theorem 4.2 does not contain X,
the resulting formula is easily reducible to a first-order formula, as in this case both
L FP X(ȳ).A and G FP X(ȳ).A are equivalent to A. Thus the Ackermann’s lemma (see,
e.g., [2,15,18]) is subsumed by Theorem 4.2).
5 Applications
It can easily be observed that, whenever the elimination of all predicate variables in
a formula is possible by applications of Theorem 4.2, the resulting formula is a fixpoint
formula over the signature containing equality only. Thus the method applied in the
next sections depends on first eliminating all relations appearing in respective formulas
and then to apply reasoning in the fixpoint theory of equality.
The Method. Let A(R1 , . . . , Rn ) be a first-order formula. It is assumed that all re-
lation symbols appearing in this formula are R1 , . . . , Rn , =. In order to prove that
A(R1 , . . . , Rn ) is a tautology, |= A(R1 , . . . , Rn ), we prove instead that the follow-
ing second-order formula
∀R1 . . . ∀Rn A(R1 , . . . , Rn ) (5)
is a tautology. Of course, A(R1 , . . . , Rn ) is a tautology iff (5) is a tautology. In gen-
eral this problem is totally undecidable. However, to prove (5) we negate formula (5),
eliminate second-order quantifiers ∃R1 . . . ∃Rn applying Theorem 4.2 and, if this is
successful, apply the decision procedure of Section 3.2. The result is FALSE iff the
original formula is equivalent to T RUE .
It should be emphasized that whenever A(R1 , . . . , Rn ) itself is second-order, we can
first try to eliminate second-order quantifiers from A(R1 , . . . , Rn ) and then apply the
proposed method to the resulting formula. So, in fact, we have a decision procedure for
a fragment of the second-order logic, too. This is important in many AI applications,
e.g., in reasoning based on various forms of circumscription (see, e.g., [14,11,6]).
To see that the last formula is FALSE, meaning that the formula (6) is T RUE, we unfold
the greatest fixpoint and obtain that
G FP R(x, y).(R(y, x) ∧ x = a) ≡ (y = a ∧ x = a).
Thus the resulting formula is equivalent to ∃z (y = a ∧ x = a)[a, z] , i.e., to
∃z (z = a ∧ a = a) , being equivalent to FALSE. This proves the validity of
formula (6).
The Method. In the method of [9] it is assumed that the database can be modified
only by well-defined procedures, called transactions, supplied by database designers.
In such a case the task of verification of integrity constraints reduces to the following
two steps:
1. verify that the initial contents of the database satisfies the defined constraints
2. verify that all transactions preserve the constraints.
If both above conditions hold, a simple induction, where the first point is the base step
and the second point is the induction step, shows that all possible instances of the data-
base preserve the considered integrity constraints. Of course, the first step can be com-
puted in time polynomial w.r.t. the size of the initial database. In what follows we then
concentrate on the second step.
Consider a transaction, which modifies relations R1 , . . . , Rn giving as a result re-
lations R1 , . . . , Rn . The second of the steps mentioned earlier reduces to verification
whether the following second-order formula is a tautology:
The method of [9] depends on the application of the Ackermann’s lemma of [2], which
itself is subsumed by Theorem 4.2 (see Remark 4.3). If the Ackermann’s lemma is
successful, the resulting formula is expressed in the classical theory of equality, but
the requirement is that formulas involved in integrity constraints are, among others,
nonrecursive. Therefore [9] considers relational databases rather that deductive ones,
which usually require recursion (see, e.g., [1]).
Formula (8) is a tautology iff the following second-order formula is a tautology, too:
In order to eliminate quantifiers ∀R1 . . . ∀Rk we first negate (9), as done in Section 5.1:
then try to transform formula (10) into the form suitable for application of Theorem 4.2.
This transformation can be based on those given in [6,18] and considered in Section 5.1.
If the decision procedure of Section 3.2, applied to (10) results in FALSE, then the
formula (9) and, consequently (8), are equivalent to T RUE.
Example. Let R(x) stand for “x is rich”, C(y, x) stand for “y is a child of x”, j stand
for “John” and m for “Mary”. Consider the constraint
We first eliminate ∃C which, according to Remark 4.3, results in the following formula
without fixpoints
∃u, v∃R ∀x, y{[R(x) ∧ y = v ∧ x = u ∧ (v = j ∨ u = m)] → R(y)}∧
[¬R(v) ∨ v = m] ∧ R(u) ,
398 A. Szałas and J. Tyszkiewicz
equivalent to
∃u, v∃R
∀y{[∃x[R(x) ∧ y
= v ∧ x = u ∧ (v = j ∨ u = m)] ∨ y = u] → R(y)}∧
[¬R(v) ∨ v = m] .
Applying the decision procedure of Section 3.2 shows that formula (14) is equivalent
to FALSE, which proves correctness of the considered transaction.
The Method. The following are definitions for necessary and sufficient conditions of
a formula A relativized to a subset P̄ of relation symbols under a theory T , as introduced
in [12].
Thus, reasoning with weakest sufficient and strongest necessary conditions can again,
in many cases, be reduced to F EQ. Namely, one can first try to eliminate second-
order quantifiers from second-order formulas appearing in characterizations provided
in Lemma 5.4 and then to apply the method of Section 5.1.
The method is best visible in
the case when we are interested
in formulas of the
target language implied by S NC A; T ; P̄ and implying W SC A; T ; P̄ . In these cases
we deal with formulas of the form ∀R̄{∃X̄[T ∧ A] → B} and ∀R̄{B → ∀X̄[T →
A]}, where R̄ consists of all relation symbols appearing free in the respective formulas
and B contains no relation symbols of X̄. Of course, these forms are equivalent to
∀R̄∀X̄{[T ∧ A] → B} and ∀R̄∀X̄{B → [T → A]}. Thus the proposed method
applies here in an obvious manner.
6 Conclusions
In the current paper we have investigated the fixpoint theory of equality and have shown
its applications in automatizing various forms of reasoning in theorem proving, deduc-
tive databases and artificial intelligence.
Since many non-classical logics can be translated into the classical logic, the method
is applicable to non-classical logics, too.
References
1. S. Abiteboul, R. Hull, and V. Vianu. Foundations of Databases. Addison-Wesley Pub. Co.,
1996.
2. W. Ackermann. Untersuchungen über das eliminationsproblem der mathematischen logik.
Mathematische Annalen, 110:390–413, 1935.
3. J. Barwise. On Moschovakis closure ordinals. Journal of Symbolic Logic, 42:292–296,
1977.
4. A. Chandra and D. Harel. Computable queries for relational databases. Journal of Computer
and System Sciences, 21:156–178, 1980.
5. A. Chandra and D. Harel. Structure and complexity of relational queries. Journal of Com-
puter and System Sciences, 25:99–128, 1982.
6. P. Doherty, W. Łukaszewicz, and A. Szałas. Computing circumscription revisited. Journal
of Automated Reasoning, 18(3):297–336, 1997.
7. P. Doherty, W. Łukaszewicz, and A. Szałas. Computing strongest necessary and weakest suf-
ficient conditions of first-order formulas. International Joint Conference on AI (IJCAI’2001),
pages 145 – 151, 2000.
8. N. Immerman. Upper and lower bounds for first-order expressibility. Journal of Computer
and System Sciences, 25:76–98, 1982.
9. J. Kachniarz and A. Szałas. On a static approach to verification of integrity constraints in
relational databases. In E. Orłowska and A. Szałas, editors, Relational Methods for Computer
Science Applications, pages 97–109. Springer Physica-Verlag, 2001.
10. Phokion Kolaitis and Moshe Vardi. Ph. kolaitis and m. vardi. on the expressive power of
variable-confined logics. In Proc. IEEE Conf. Logic in Computer Science, pages 348–359,
1996.
11. V. Lifschitz. Circumscription. In D. M. Gabbay, C. J. Hogger, and J. A. Robinson, edi-
tors, Handbook of Artificial Intelligence and Logic Programming, volume 3, pages 297–352.
Oxford University Press, 1991.
12. F. Lin. On strongest necessary and weakest sufficient conditions. In A.G. Cohn,
F. Giunchiglia, and B. Selman, editors, Proc. 7th International Conf. on Principles of Knowl-
edge Representation and Reasoning, KR2000, pages 167–175. Morgan Kaufmann Pub., Inc.,
2000.
13. M. Magnusson. D LS*. http://www.ida.liu.se/labs/kplab/projects/dlsstar/, 2005.
14. J. McCarthy. Circumscription: A form of non-monotonic reasoning. Artificial Intelligence
Journal, 13:27–39, 1980.
15. A. Nonnengart, H.J. Ohlbach, and A. Szałas. Elimination of predicate quantifiers. In H.J.
Ohlbach and U. Reyle, editors, Logic, Language and Reasoning. Essays in Honor of Dov
Gabbay, Part I, pages 159–181. Kluwer, 1999.
On the Fixpoint Theory of Equality and Its Applications 401
1 Introduction
A tree language is a set of first-order terms and a tree automaton is a natural
extension of a finite automaton. Instead of strings, inputs of a tree automaton are
first-order terms[1]. The class of regular tree languages, which are recognized by
tree automata, inherits some desirable properties including complexity of some
decision problems and closeness under boolean operations. The goal of our study
is to make clear the algebraic structure of regular tree expressions.
In 1998, Ésik[2] proposed a complete axiomatization of regular tree languages
based on terms with μ-operators. A μ-operator is the same one in the μ-calculus
and it is not first-order. Our interest is to find a first-order axiomatization of
regular tree languages. In the last year, the authors proposed essentially algebraic
structure of a certain subclass of tree languages[3]. But the subclass and the class
of regular tree languages are incomparable.
Although regular tree expressions and Kleene theorem for trees have been
proposed[1,4], they are rarely used in practice because the structure is too com-
plicated. Generally, regular tree expressions have two or more multiplication,
Kleene stars, and place holders. In this paper, we propose a subclass of regu-
lar tree expressions, called monodic regular tree expressions, and also propose a
complete first-order axiomatization, called a monodic tree Kleene algebra, of the
subclass of regular tree languages corresponding to monodic regular tree expres-
sions. A monodic regular tree expression has at most one kind of multiplications,
Kleene stars, and place holders. The subclass corresponds to tree automata in
which only one kind of states occurs in the left-hand side of each transition rule.
A monodic tree Kleene algebra is a similar to a Kleene algebra by Kozen[5,6]
and a Kleene algebra is always a monodic tree Kleene algebra. The essential dif-
ference is the lack of the right-distributivity of the multiplication over addition
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 402–416, 2006.
c Springer-Verlag Berlin Heidelberg 2006
Monodic Tree Kleene Algebra 403
2 Preliminaries
We review some notions of the language theory on trees. After defining the syntax
of regular tree expressions, we give some functions on tree languages. Using the
functions, we give an interpretation function of regular tree expressions.
For a signature Σ, we denote the set of all first-order terms without variables
constructed from Σ by TΣ . A tree language is a set of terms. For a signature
Σ and a set Γ of substitution constants, the set RegExp(Σ, Γ ) of regular tree
expressions is inductively defined as follows. A substitution constant is a constant
not included in the signature.
Let P(S) denote the power set of a set S. We define binary function ◦ and
unary function on P(TΣ∪Γ ) for any ∈ Γ and define tree substitutions. A
tree substitution is given by a finite set of pairs of a substitution constant and a
tree language. For a tree substitution θ = {(1 , L1 ), . . . , (n , Ln )} and a term
t ∈ TΣ∪Γ , define θ(t) as follows.
L0, = {}
Ln+1, = Ln, ∪ L ◦ Ln,
404 T. Takai and H. Furusawa
[[ ]] : RegExp(Σ, Γ ) → P(TΣ∪Γ )
The image of the interpretation function above coincides with the class of regular
tree languages[1]. Let Reg(Σ, Γ ) be the set of regular tree languages on signature
Σ and set Γ of substitution constants. The definition of can be changed into
L = j≥0 Lj, where
L0, = {}
L n+1,
= Ln, ◦ (L ∪ {})
a + (b + c) = (a + b) + c (1)
a+b=b+a (2)
a+0=a (3)
a+a =a (4)
a(bc) = (ab)c (5)
1a = a (6)
Monodic Tree Kleene Algebra 405
a1 = a (7)
ac + bc = (a + b)c (8)
ab + ac ≤ a(b + c) (9)
0a = 0 (10)
1 + aa∗ ≤ a∗ (11)
1 + a∗ (a + 1) ≤ a∗ (12)
b + ax ≤ x → a∗ b ≤ x (13)
b + x(a + 1) ≤ x → ba∗ ≤ x (14)
ax ≤ x → a∗ x ≤ x (15)
x(a + 1) ≤ x → xa∗ ≤ x (16)
The equivalence between (13) and (15) can be shown in the same way of Kleene
algebras. From (14) to (16), for showing xa∗ ≤ x, it is sufficient to hold that
x + x(a + 1) ≤ x, which can be shown by the assumption. From (16) to (14),
we assume b + x(a + 1) ≤ x. From the assumption, b ≤ x, x(a + 1) ≤ x and
xa∗ ≤ x hold. ba∗ ≤ x is from b ≤ x. Remark that if x is either 0 or 1, we have
the right-induction law b + ax ≤ x → ba∗ ≤ x of Kleene algebras.
We compare to the original Kleene algebras. The proof will be shown later.
Proposition 2. The right-unfold law 1 + a∗ a ≤ a∗ of Kleene algebras is a the-
orem of monodic tree Kleene algebras but the right-induction law b + xa ≤ x →
ba∗ ≤ x of Kleene algebras is not a theorem.
The theorems below are used in the proof of the completeness theorem.
406 T. Takai and H. Furusawa
(a + 1)∗ = a∗ (17)
(a∗ )∗ = a∗ (18)
1 + aa∗ = a∗ (19)
1 + a∗ (a + 1) = a∗ (20)
(a + b)∗ = a∗ (ba∗ )∗ (21)
(ab)∗ a ≤ a(ba)∗ (22)
α=S∪T ◦α (23)
Monodic Tree Kleene Algebra 407
T i+1 ◦ S = (T ∪ T ◦ T i ) ◦ S
= T ◦ S ∪ (T ◦ T i ) ◦ S
S ◦ T i+1 = S ◦ (T i ◦ (T ∪ {}))
= (S ◦ T i ) ◦ (T ∪ {})
For tree language {f (, )}, {f (, )} consists of complete binary trees and
we have {} ∪ {f (, )} ◦ {f (, )} ⊆ {f (, )}, which corresponds to the
408 T. Takai and H. Furusawa
X(A + B) = XA + XB (29)
XA ≤ X → XA∗ ≤ X (30)
B + XA ≤ X → BA∗ ≤ X (31)
AX = XB → A∗ X = XB ∗ (32)
X(AX)∗ = (XA)∗ X (33)
(P T AP )∗ = P T A∗ P (34)
410 T. Takai and H. Furusawa
Proof. Since in this proof, the axiom (14) is only used for the base case and for
the inductive step, (31) can be used as an inductive hypothesis. Hence, we give
only the base n = 2. The first one is obvious. Let E and X be the matrices in
(25). To prove (30), we show the following statement.
x(a + 1) + yc ≤ x
xb + y(d + 1) ≤ y
z(a + 1) + wc ≤ z
zb + w(d + 1) ≤ w
yd∗ ≤ y (y(d + 1) ≤ y)
∗
yd c ≤ x (yd∗ ≤ y and yc ≤ x)
xbd∗ c ≤ x (yd∗ c ≤ x and xb ≤ y)
x(a + bd∗ c + 1) ≤ x (xbd∗ c ≤ x and x(a + 1) ≤ x)
x(a + bd∗ c)∗ ≤ x (x(a + bd∗ c + 1) ≤ x)
The last step is by the axiom (14) for the base case or by the inductive hypothesis
of for the induction step. Finally, we can see that EX ≤ X implies E(X +I) ≤ X
and the lemma holds.
The Horn clause (31) is directly obtained from (30).
The simulation law (32) can be shown in the same way of the original proof
by Kozen[5], since as we have shown that the Kleene algebra axioms (Lemma 5
and (31)) hold in our setting if X is restricted to a 0-1 matrix.
The shift law for specific case (33), i.e. X(AX)∗ = (XA)∗ X, is obtained from
(32) by replacing A with XA and B with AX, respectively.
To prove (34), we show A∗ P = P (P T AP )∗ . Multiplying P T from left and
the facts that P T P = I and P P T = I, we obtain (P T AP )∗ = P T A∗ P . By
Lemma 6, we obtain (P P T A)∗ P ≤ P (P T AP )∗ . Since P is a 0-1 matrix, by (31)
in this lemma, to show P (P T AP )∗ ≤ (P P T A)∗ P , it is sufficient to show that
P + (P P T B)∗ (P P T B)P ≤ (P P T B)∗ P .
Monodic Tree Kleene Algebra 411
In this section, we give subclass of regular tree expressions, called monodic reg-
ular tree expressions.
Definition 2. Let Σ be a signature and be a substitution constant. The set
RegExp(Σ, ) of monodic regular tree expressions is defined as follows.
The set of monodic regular tree expressions is a subclass of regular tree expres-
sions when the multiplication · and the Kleene star ∗ are regarded as · and ∗ ,
respectively. The interpretation of monodic regular tree expressions is given by
functions ∪, ◦ and on tree languages.
Definition 3. A tree language L which can be expressed by a monodic regular
tree expressions is called monodic regular.
We denote the set of all monodic regular tree languages by Reg(Σ, ).
Proposition 4. (i) The set Reg(Σ, ) of monodic regular tree language is closed
under functions ∪, ◦ and . (ii) (Reg(Σ, ), ∪, ◦ , , ∅, {}) is a monodic
tree Kleene algebra.
Let v be a n + 1 vector in which the n + 1-th row is and the others are 0 and
u be a n + 1 vector in which for each q ∈ Qfinal , the q-th row is and the others
are 0. The triple (v, MA , u) is called a matrix representation of A where v and
u are vectors and MA is a matrix on the free monodic tree Kleene algebra over
Σ and , i.e. the quotient of monodic regular tree expressions modulo provable
equivalence. We call the vector u the final vector and v the initial vector.
Example 2. Let A0 be a tree automaton in which Δ consists of the following
transition rules
f (1, 1) → 1 g(1, 1) → 2 a → 1 b → 1 b → 2
and the final state is just 2. Then the matrix representation is as follows.
⎛⎛ ⎞ ⎛ ⎞ ⎛ ⎞⎞
0 f (, ) 0 a + b 0
⎝⎝ 0 ⎠ , ⎝ g(, ) 0 b ⎠ , ⎝ ⎠⎠
0 0 0 0
X1 = s1,1 + · · · + sm1 ,1
···
Xp = s1,p + · · · + smp ,p
L1 = θ(s1,1 ) ∪ · · · ∪ θ(sm1 ,1 )
···
Lp = θ(s1,p ) ∪ · · · ∪ θ(smp ,p )
where θ is a tree substitution {(X1 , L1 ), . . . , (Xp , Lp )}. For regular tree equation
system S, we define Ŝ : P(TΣ )p → P(TΣ )p as λ(L1 , . . . , Lp ). (L1 , . . . , Lp ) where
Theorem 2 ([1]). For any regular tree equations, the least solution is a regular
tree language. Conversely, for any regular tree language, there exists a regular
tree equations representing the regular tree language.
In the proof of the above theorem, tree automaton A = (Σ, Q, Qfinal , Δ) with
Q = {1, . . . , n} is translated into regular tree equation system SA consisting of
i= {l | l → i ∈ Δ} (1 ≤ i ≤ n)
where states are regarded as variables. For instance, a tree automaton consisting
of
f (1, 2) → 1 g(2, 1) → 2 a → 1 b → 1 b → 2
corresponds to the following regular tree equation system.
1 = f (1, 2) + a + b
2 = g(2, 1) + b
where
X = (P + I + C)X = (P + I)X + C
where , . . . , Xn )T , C = (C1 , . . . , Cn )T ,
I is the identity matrix of size n, X = (X1
Ci = {c | c → i ∈ Δ, c ∈ Σ0 } and Pi,j = {f (, . . . , ) | f (j, . . . , j) →
i ∈ Δ, f ∈ Σ}. The matrix P + I corresponds to the fixed-point operator. The
least solution is given by the least-fixed point and thus we have (P + I)∗ C =
P ∗ C. This is the language represented by the tree automaton A. More precisely,
the sequence of languages represented by each state of A. Although A can be
represented by matrices C and P and final 0-1 vector U , for the discussions
below initial vectors also have to be given by 0-1 vectors. Henceforth, we give
an initial vector, a final vector and a matrix MA as follows.
0 P C U
, ,
1 0 0 0
414 T. Takai and H. Furusawa
Finally, by the final vector, we can retrieve the language represented by the tree
automaton.
In the following, we also deal with languages including substitution constants.
This means that we also consider tree automata in which a initial vector may
not only be of the form (1, 0)T but also any 0-1 vectors.
Lemma 9. For a tree automaton A and its matrix representation (v, MA , u),
the language accepted by A is [uT MA∗ v].
Proof. (sketch) We regard the tree automaton as a regular tree equation system,
then the lemma holds because of Lemmas 3 and 8 and the discussion after
Theorem 2.
Example 3. Let A0 be the tree automaton considered in Example 2. Then the
corresponding expression can be obtained as follows.
⎛ ⎞∗
f (, ) 0 a + b
MA∗ 0 = ⎝ g(, ) 0 b ⎠
0 0 0
(A + BD∗ C)∗ (A + BD∗ C)∗ BD∗
= ∗ ∗ ∗
(D∗ +∗CA B) CA (D + CA∗ B)∗
A A B
=
⎛0 0 ⎞
f (, )∗ f (, )∗ f (, )∗ · (a + b) + f (, )∗ · b
= ⎝ g(, ) · f (, )∗ g(, ) · f (, )∗ · (a + b) + b ⎠
0 0 0
The proof of the following theorem follows the original one by Kozen[5] as follows.
1. First, we construct tree automata for given two regular tree expressions.
2. Second, we translate the tree automata for deterministic ones.
3. Then, we minimamize the tree automata.
Theorem 3. Let α and β be monodic regular tree expressions such that [α] = [β]
and [α] ⊆ TΣ . Then α = β is a theorem of monodic tree Kleene algebras.
In this paper, we have not yet considered the independence of the axioms in
Definition 1. Since for defining the class of regular tree languages, only one func-
tion in the statement of Lemma 3 is needed, the axiom (14) may be redundant.
Moreover, the axiom (14) is used in the proof of completeness theorem only in
the case that x is a 0-1 matrix. However, the argument of the independence does
not affect the soundness and the completeness theorems (Theorems 1 and 3).
After submitting the paper, we learned that almost the same system has
been proposed by McIver and Weber, called a probabilistic Kleene algebra[8], for
analyzing probabilistic distributed systems. In this conference, McIver, Cohen
and Morgan show that probabilistic Kleene algebras can be used for protocol
verification[9]. A probabilistic Kleene algebra has the same axioms except for it
includes the left annihilation law, i.e. a0 = 0.
The class of monodic regular tree languages is given by monodic regular tree
expressions, i.e. the number of kinds of place-holders is restricted to one. We
conjecture that the expressive power of the class coincides with the subclass
of regular tree expressions defined below. Let Σ be a signature and a set Γ of
substitution constants. The set of essentially monodic regular tree expressions is
defined as follows.
For dealing with the whole class of regular tree expressions, there may be two
directions. The first one is to use modal Kleene algebras[10]. A tree can be
encoded with two modalities in a modal Kleene algebra. Another direction is
to consider products of two monodic tree Kleene algebras. The whole class of
regular tree expressions seems a many-sorted monodic tree Kleene algebra.
416 T. Takai and H. Furusawa
Acknowledgments
The authors appreciate Georg Struth, who visited us with the grant from the
International Information Science Foundation (IISF), for a lot of his valuable
comments to this study. We also thank to Yasuo Kawahara and Yoshihiro Mi-
zoguchi for fruitful discussions on this study. This research was supported by
Core Research for Evolutional Science and Technology (CREST) Program “New
High-performance Information Processing Technology Supporting Information-
oriented Society” of Japan Science and Technology Agency (JST).
References
1. Comon, H., Dauchet, M., Gilleron, R., Jacquemard, F., Lugiez, D., Tison, S., Tom-
masi, M.: Tree automata techniques and applications. Available on: http://www.
grappa.univ-lille3.fr/tata/ (1997)
2. Ésik, Z.: Axiomatizing the equational theory of regular tree languages (extended
anstract). In Morvan, M., Meinel, C., Krob, D., eds.: STACS. Volume 1373 of
Lecture Notes in Computer Science., Springer (1998) 455–465
3. Takai, T., Furusawa, H., Kahl, W.: Reasoning about term rewriting in Kleene
categories with converse. In Düntsch, I., Winter, M., eds.: Proceedings of the 3rd
Workshop on Applications of Kleene algebera. (2005) 259–266
4. Gécseg, F., Steinby, M.: Tree languages. In: Handbook of formal languages, 3:
beyond words. Springer (1997) 1–68
5. Kozen, D.: A completeness theorem for Kleene algebras and the algebra of regular
events. In Kahn, G., ed.: Proceedings of the Sixth Annual IEEE Symp. on Logic
in Computer Science, LICS 1991, IEEE Computer Society Press (1991) 214–225
6. Kozen, D.: A completeness theorem for Kleene algebras and the algebra of regular
events. Information and Computation 110(2) (1994) 366–390
7. Möller, B.: Lazy Kleene algebra. In Kozen, D., Shankland, C., eds.: MPC. Volume
3125 of Lecture Notes in Computer Science., Springer (2004) 252–273
8. McIver, A., Weber, T.: Towards automated proof support for probabilistic distrib-
uted systems. In Sutcliffe, G., Voronkov, A., eds.: LPAR. Volume 3835 of Lecture
Notes in Computer Science., Springer (2005) 534–548
9. McIver, A., Cohen, E., Morgan, C.: Using probabilistic Kleene algebra for protocol
verification. In: Relations and Kleene Algebra in Computer Science. Volume 4136
of Lecture Notes in Computer Science. (2006)
10. Möller, B., Struth, G.: Modal Kleene algebra and partial correctness. In Rattray,
C., Maharaj, S., Shankland, C., eds.: AMAST. Volume 3116 of Lecture Notes in
Computer Science., Springer (2004) 379–393
Weak Relational Products
Michael Winter
1 Introduction
The relational product of two objects A and B in a category of relations is an
abstract version of the cartesian product of two sets. It is characterized by an
object A × B together with two projections π and ρ from A × B to A and B,
respectively. A category of relations may provide a relational product for every
pair of objects. In this case, it can be shown that the category is representable,
i.e. there is an embedding into the category Rel of sets and relations. On the
other hand, not every reasonable category of relations is representable. This
indicates, that one cannot always embed the given structure into a category that
provides relational products. This is a major disadvantage of this construction
since products are usually needed to model certain concepts by relations such as
programming languages and most kinds of logics. Other constructions usually
required such as sums and powers, i.e. the counterparts of disjoint unions and
powersets, can always be created.
In this paper we propose a canonical weakening of the concept of a relational
product, the weak relational product. This will be done within the theory of
allegories - a categorical model of relations. We will investigate certain properties
of the new construction and compare them to those of relational products. In
particular, we are interested in the following list of properties. Notice, that those
properties are not necessarily independent.
R.A. Schmidt (Ed.): RelMiCS /AKA 2006, LNCS 4136, pp. 417–431, 2006.
c Springer-Verlag Berlin Heidelberg 2006
418 M. Winter
∗ can be defined by equations in division allegories where all partial identities split
2 Relational Preliminaries
Throughout this paper, we use the following notation. To indicate that a mor-
phism R of a category R has source A and target B we write R : A → B. The
collection of all morphisms R : A → B is denoted by R[A, B] and the compo-
sition of a morphism R : A → B followed by a morphism S : B → C by R; S.
Last but not least, the identity morphism on A is denoted by IA .
We recall briefly some fundamentals on allegories [5] and relational construc-
tions within them. For further details we refer to [5,9,10]. Furthermore, we as-
sume that the reader is familiar with the basic notions from category theory
such as products and co-products. For unexplained material we refer to [1].
Weak Relational Products 419
1. Q; (Q\R) R,
2. f ; syq(Q, R) = syq(Q; f , R),
3. syq(Q, R) = syq(R, Q),
4. syq(Q, R); syq(R, S) syq(Q, S),
5. if syq(Q, R) is total then equality holds in 4.,
6. if syq(Q, R) is surjective then Q; syq(Q, R) = R.
1. Q; (R S) = Q; R Q; S,
2. (T ; Q U ); Q = T U ; Q,
AA (Q P ) Q = Q P .
3.
ιi ; ι
i = IAi , ιi ; ι
j =⊥
⊥Ai Aj ,
(ι
i ; ιi ) = I
A .
i
i∈I
i∈I
R has (binary) relational sums iff for every (pair) set of objects the relational
sum does exist.
The relational sum is a categorical product and co-product, and hence, unique
up to isomorphism. In Rel the relational sum is given by the disjoint union of
sets and the corresponding injection functions.
Weak Relational Products 421
for all relation R : B → A. If the relational power does exist for any object then
R is called a power allegory.
Notice, that syq(ε, ε) = IP(A) , and that syq(R, ε) is, in fact, a mapping. In Rel
the relation eA := syq(IA , ε) : A → P(A) maps each element to the singleton set
containing that element. This relation is always (in all allegories) an injective
mapping (cf. [10]).
Definition 6. An allegory is called systemic complete iff it is a power allegory
that has relational sums, and in which all symmetric idempotent relations split.
The univalent part unp(R) of a relation R was introduced in [9] in the con-
text of (heterogeneous) relation algebras, i.e. division allegories where the order
structure is a complete atomic Boolean algebra.
2. The inclusion ’’ is obvious, and unp(R) ; (R \IB ) R ; (R \IB ) IB
implies (R \IB ) (unp(R) \IB ) and hence
unp(R) = unp(R) (R \IB ) unp(R) (unp(R) \IB ) = unp(unp(R)).
(P1) π ; π IA ,
(P2) ρ ; ρ IB ,
(P3) π; π ρ; ρ = IA×B ,
(P4) f ; g π ; ρ for all mappings f : C → A and g : C → B.
R is called a weak pairing allegory iff a weak relational product for each pair of
objects exists.
Example 1. Consider the concrete allegory with one object A = {0, 1} and the
⊥A := ∅, IA , IA := {(0, 1), (1, 0)} and
four relations ⊥ A := A × A. It is easy to
verify that this structure establishes indeed an allegory with exactly two map-
pings IA and IA . It is well-known that the matrices with entries of a (complete)
allegory form an allegory. Mappings in our example are matrices with exactly
one entry IA or IA in each row and ⊥ ⊥A otherwise. The pair
⎛ ⎞ ⎛ ⎞
IA ⊥ ⊥A IA ⊥
⊥A
⎜ IA ⊥ ⊥A ⎟ ⎜⊥⊥A IA ⎟
π := ⎜⎝⊥
⎟
⎠ ρ := ⎜
⎝
⎟
⊥A IA ⊥A ⎠
IA ⊥
⊥
⊥A IA ⊥
⊥A IA
The weak version still establishes a categorical product in MAP(R), and is,
therefore, unique (up to isomorphism).
Theorem 1. Let R be an allegory. Then a weak relational product (A × B, π, ρ)
is a categorical product of A and B in MAP(R).
Proof. Let (A × B, π, ρ) be a weak relational product. By P1, P2 and P3 the
relations π and ρ are mappings, and hence in MAP(R). Let f : C → A and
g : C → B be mappings. Then we have
(f ; π g; ρ ); ρ = f ; π ; ρ g Lemma 2(2)
=g
g f ; f ; g f is total,
f; π ; ρ Axiom P4.
f ; π g; ρ = h; π; π h; ρ; ρ
= h; (π; π ρ; ρ ) Lemma 2(1)
=h Axiom P3
g = h; ρ
h; (π; π ρ; ρ ); ρ inclusion of P3
h; π; π ; ρ
= f ; π ; ρ,
We have not been able to find an example showing that the full converse does
not hold. Constructing such an example is a non-trivial problem since the next
lemma indicates that the remaining inclusion is not hard to fulfill. In particular,
we prove that inclusion in the case the allegory provides a suitable splitting.
In order to show that (C, π̃, ρ̃) is a weak relational product we derive Axiom P1
from
π̃ ; π̃ = π ; R ; R; π
= π ; (π; π ρ; ρ ); π
= IA π ; ρ; ρ ; π Lemma 2(2)
IA ,
we have shown Axiom P3. Last but not least, the computation
π̃ ; ρ̃ = π ; R ; R; ρ
= π ; (π; π ρ; ρ ); ρ
= π ; ρ π ; ρ Lemma 2(2)
= π ;ρ
Proof. The implication ⇒ is trivial since unp(f ) = f for all mappings by Lemma
3 (3). For the converse implication assume P1-P4 and let R : C → A and S : C →
B be arbitrary relations. Now, let i := IC unp(R); unp(R) unp(S); unp(S)
and s : D → C be its splitting. Then s; unp(R) is univalent since s and R
are. Furthermore, this relation is total because ID = s; s ; s; s = s; i; s
sunp(R); unp(R) ; s . Analogously, we get that s; unp(S) is a mapping. Notice,
that we have Q = (IA Q; Q ); Q for arbitrary relations Q : A → B and
i; j = i j for partial identities i, j : A → A. Proofs of those properties can be
found in [5,9,10]. We conclude
unp(R) ; unp(S)
= unp(R) ; (ID unp(R); unp(R) ); (ID unp(S); unp(S) ); unp(S)
= unp(R) ; (ID unp(R); unp(R) ID unp(S); unp(S) ); unp(S)
= unp(R) ; i; unp(S)
= unp(R) ; s ; s; unp(S)
= (s; unp(R)) ; s; unp(S)
π ; ρ.
(IA ; π
AB ; ρ ); (π;
AB ρ; IB ) = (π
A(A×B) ); (
(A×B)B ρ)
= π ; ρ
= AB
= IA ;
AB
AB ; IB .
One important property of relational products is that one can transform any
relation into the abstract counterpart of a set of pairs, i.e. by a vector or a left
ideal element AA ; v = v. We want to investigate whether this is also possible
for weak relational products. Consider the two operations
AA ; (π R; ρ )
τ (R) := and AA ; v π ); ρ.
σ(v) := (
1. R; π (Q; π S); ρ; ρ = Q; π S,
2. τ (σ(v)) = v,
3. σ(τ (R)) R with ’=’ if R π ; ρ.
Proof. 1.-2. These properties were shown in [9,10,11] for relational products.
The proofs provided there also apply to weak relational products without
modifications.
3. Consider the computation
σ(τ (R)) = ( AA ; (π R; ρ ) π ); ρ
AA ;
AA ; (π R; ρ ) π ); ρ
= (
= (π R; ρ ); ρ Lemma 2(3)
= π ;ρ R Lemma 2(2)
R.
The main proposition of this section (Corollary 1) states that any (small) allegory
can be embedded into a weak pairing allegory. This theorem is based on the fact
that the cartesian product of two power sets can be constructed by the power
set of the disjoint union of the sets. An abstract version of this proposition is
given in the next lemma and summarized by the following diagram.
P(A) gO P(B)
O OOO
OOsyq oooo7 O
OOO
(ι;ε,ε)
o
OO ooo
ooo syq(κ;ε,ε)
P(A + B)
O
ε ε ε
A + B hP
nnn7 PPP
ι n
n n PPκP
nnn PPP
n PPP
nnn
A B
Notice, that the constructed weak relational product is not necessarily a re-
lational product [10].
= eA ; π ; s ; s; π; e
A
= eA ; π ; π; e
A s is total and injective
eA ; e
A Axiom P1
= IA , eA is total and injective
430 M. Winter
= s; (π; e
A ; eA ; π ρ; eB ; eB ; ρ ); s
Lemma 2(1)
= s; i; s
= s; s ; s; s
= IC
π̃ ; ρ̃ = eA ; π ; s ; s; ρ; e
B
= eA ; π ; i; ρ; e
B s splits i
= eA ; π ; (π; e
A ; eA ; π ρ; eB ; eB ; ρ ); ρ; eB
= eA ; (e
A ; eA ; π ; ρ π ; ρ; eB ; eB ); eB Lemma 2(2)
= eA ; e
A ; eA ; π ; ρ; eB eA ; π ; ρ; eB ; eB ; eB Lemma 2(2)
= eA ; π ; ρ; e
B eA ; π ; ρ; eB eA , eB total and injective
= eA ; π ; ρ; e
B.
f ; g = eA ; e
A ; f ; g; eB ; eB eA , eB total and injective
eA ; π ; ρ; e
B
= π̃ ; ρ̃,
Since the systemic completion of a small allegory is systemic complete ([5] 2.221
and 2.434) we have shown the main result of this section.
This corollary also shows that there are indeed weak pairing allegories in which
the weak relational product is not always a relational product. For example,
consider the allegory induced by the non-representable McKenzie relation alge-
bra. According to Corollary 1 this allegory can be embedded into a weak pairing
allegory. This allegory can not have all relational products since then it would
be representable [5], which is a contradiction.
Weak Relational Products 431
References
1. Asperti A., Longo G.: Categories, Types and Structures. The MIT Press, Cam-
bridge, Massachusetts, London, England (1991)
2. Berghammer R., Haeberer A., Schmidt G., Veloso P.A.S.: Comparing two different
approaches to products in abstract relation algebra. Algebraic Methodology and
Software Technology, Proc. 3rd Int’l Conf. Algebraic Methodology and Software
Technology (AMAST’93), Springer (1994), 167-176.
3. Desharnais, J.: Monomorphic Characterization of n-ary Direct Products. Informa-
tion Sciences, 119 (3-4) (1999), 275-288
4. Furusawa H., Kahl W.: A Study on Symmetric Quotients. Technical Report 1998-
06, University of the Federal Armed Forces Munich (1998)
5. Freyd P., Scedrov A.: Categories, Allegories. North-Holland (1990).
6. Maddux, R.D.: On the Derivation of Identities involving Projection Functions.
Logic Colloquium’92, ed. Csirmaz, Gabbay, de Rijke, Center for the Study of Lan-
guage and Information Publications, Stanford (1995), 145-163.
7. Olivier J.P., Serrato D.: Catégories de Dedekind. Morphismes dans les Catégories
de Schröder. C.R. Acad. Sci. Paris 290 (1980), 939-941.
8. Olivier J.P., Serrato D.: Squares and Rectangles in Relational Categories - Three
Cases: Semilattice, Distributive lattice and Boolean Non-unitary. Fuzzy sets and
systems 72 (1995), 167-178.
9. Schmidt G., Ströhlein T.: Relationen und Graphen. Springer (1989); English ver-
sion: Relations and Graphs. Discrete Mathematics for Computer Scientists, EATCS
Monographs on Theoret. Comput. Sci., Springer (1993).
10. Winter M.: Strukturtheorie heterogener Relationenalgebren mit Anwendung auf
Nichtdetermismus in Programmiersprachen. Dissertationsverlag NG Kopierladen
GmbH, München (1998)
11. Zierer H.: Relation algebraic domain constructions. TCS 87 (1991), 163-188
Author Index