Binary Relations and Permutation Groups Hajnal Andréka† Ivo Düntsch‡ István Németi Mathematical Institute Faculty of Informatics Mathematical Institute Academy of Sciences University of Ulster at Jordanstown Academy of Sciences Budapest 1363, Hungary Newtonabbey, BT 37 0QB, N.Ireland Budapest 1363, Hungary andreka@math-inst.hu I.Duentsch@ulst.ac.uk nemeti@math-inst.hu Abstract We discuss some new properties of the natural Galois connection among set relation algebras, permutation groups, and first order logic. In particular, we exhibit infinitely many permutational relation algebras without a Galois closed representation, and we also show that every relation algebra on a set with at most six elements is Galois closed and essentially unique. Thus, we obtain the surprising result that on such sets, logic with three variables is as powerful in expression as full first order logic. Key words: Relation algebras, Galois closure, clones of operations 0 Introduction and summary of results Logics with limited resources as well as questions of expressibility of relational properties- in particular on finite structures - have received considerable attention in areas like finite model theory, non - classical logics, and descriptive complexity. The interested reader is invited to consult [9], [11], [12], and [14] for more details. In this paper, we shall investigate problems relating to automorphisms (i.e. edge preserving permutations) of binary relations. Our approach will be algebraic using Tarski’s relation algebras. Roughly speaking, a relation algebra is a description of how various relations must interact among each other. More concretely, given a set Ri : i n of binary relations on a set U , we form the closure of this set under the Boolean operations, composition of relations, and converse, and add the identity as an extra constant; the result will be an algebra of binary relations (BRA). Since the operations used are first order definable, any automorphism of the first order structure U will preserve all the relations in as well. Such an automorphism will be called a base automorphism of the algebra (We use the qualified term to distinguish them from the automorphisms of the algebra). A fundamental result by Tarski states that contains exactly those binary Mathematical Logic Quarterly 41 (1995), 197–216 and Németi’s research sponsored by Hungarian National Foundation for Scientific Research Grants 1911 and T7255 ‡ Member of Institut für semantische Informationsverarbeitung, Universität Osnabrück, Germany † Andréka’s relations on U which are definable in U by first order formulas having at most three variables. Thus, the equational logic of relation algebras corresponds roughly to the three variable fragment of full first order logic. Conversely, given a representation of an abstract simple relation algebra (i.e. is a BRA isomorphic to ), the algebraic structure of will tell us something about the properties of and the connections among the relations in . We exhibit connections between the structure of BRAs and their groups of base automorphisms. The notion of Galois closure will play a major role: A BRA on a finite set U is Galois closed iff its atoms are the orbits of the action of its group of base automorphisms on U U . The Galois closure of a BRA on U is the smallest Galois closed algebra containing . It turns out that the nonempty subsets definable by formulas of first order logic in the model U R R are exactly the domains of the unions of those atoms of the Galois closure of which are below the identity - equivalently, the unions of orbits of the group of base automorphisms of . Furthermore, is shown to be Galois closed iff contains all relations definable in the model U R R , and that, whenever an edge a b of an atom R of has a first order property, then all edges of R have this property. We also show that the property of a BRA to be Galois closed is a general first order property for finite models, and that its negation is not. With regard to the question which properties of concrete relations can be prescribed by the structure of an abstract relation algebra, we exhibit a relation algebra which has a representation with a transitive group of base automorphisms, but no representation of is Galois closed. This seems a rather strong result: The algebraic structure of - which in general reflects only logic with three variables - tells us something about a property of all representations of which is not even general first order. Finally, we show that every BRA on a set with at most six elements is Galois closed and essentially unique. Thus, we obtain the surprising result that on such sets, logic with three variables is as powerful in expression as full first order logic. Computational results were obtained with the help of CAYLEY, ([7]), NAUTY ([18], and RELALG ([8]). 1 Definitions and notation Unless otherwise indicated, we shall suppose throughout that all structures under consideration are finite, and that U is a non empty finite set. U denotes the cardinality of U . We identify 0 n 1 with the ordinal n, and emphasize this by writing n. If no confusion is likely to arise, algebras are referred to by their respective carrier set. A relation algebra (RA) A 0 1 1! 1 0 1 is a Boolean algebra. is a structure of type 2 2 1 0 0 2 1 0 which satisfies 1. A 2 1! is an involuted monoid. 3. For all a b c " A the following conditions are equivalent: # a b$% c 0 # a c$& b 0 # c b $& a 0 # The full algebra of binary relations Rel U $' () *) + 0/ U 1! is a relation algebra, where # Rel U $ is the set of all binary relations on U , *) () are the usual set theoretic operations, and 0/ U are, respectively, the empty and the universal relation, is relational composition, rela, x y : y x " P ), and 1! is the identity relation on U . We shalltheusually tional inverse (i.e. P # use P Q R to denote binary relations on U . A subset A of Rel U $ which is closed under the # distinguished operations of Rel U $ and contains the distinguished constants is called an algebra of # # binary relations (BRA) on U . It is a subalgebra of Rel U $ , a fact which we denote by A - Rel U $ . If # # A - Rel U $ , then At A $ denotes the set of atoms of (the Boolean part of) A. A complete and atomic # A is completely determined by the relation composition table of At A $ . When writing such a table, # we usually omit column and row 1! , if 1! is an atom of A. If R R " Rel U $ , we denote the BRA generated by R R by R R . 1 2. A 1 1 2 1 2 1 1 0 0 k 0 k k A relation algebra A is called representable if it is isomorphic to a subalgebra of a product of full algebras of binary relations. " # $ . R is the set of all binary relations on U which . R by first order formulas using at most 3 vari# # A - Rel U $ is called essentially unique on U if for every B - Rel U $ which is isomorphic to A and # φ R φ for all every RA - isomorphism h : A / B there is a permutation φ of U such that h R $ # R " A. Consequently, if A is essentially unique on U and B - Rel U $ is isomorphic to A, then A and B are isomorphic as first order relational structures on U – usually a much stronger condition. # For P Q " A - Rel U $ and x y z " U we usually write xPy if x y " P, and xPyQz means xPy and yQz. We also set # x " U : There is some y " U such that xPy0 dom P $ # x " U : There is some y " U such that yPx0 ran P $ # y " U : yPx0 dom x $ # y " U : xPy0 ran x $ # # ran # x$1 for all x y " dom # P$ , then P is The set ran x $ is also called a row of P. If ran y $1 The following fundamental result is due to A. Tarski [20]: Proposition 1.1. If R0 Rk Rel U , then R0 are definable in the relational structure U R0 ables. k k 1 P P P called regular. " P " P - ! If A is any RA, then x A is called a functional element if x 1 x 1 . A is called integral if, for all x y A, x y 0 implies x 0 or y 0. A well known characterization of integral RAs [17] is given by 3 Lemma 1.2. Let A be a relation algebra. Then, the following statements are equivalent: 1. A is integral. ! 2. 1 is an atom of A. 3. x 1 " 1 for any non zero x " A. # $ ran # R$ U for some atom R of A. # 2 R " A : R 3 M becomes a relation algebra If M " A - Rel U $ is an equivalence relation, the set B under the operations () *) 0/ inherited from A, with greatest element M, identity element x x : # x " dom M $. , and complementation being relative to M. This algebra is called the relative algebra of U , B is not a subalgebra of A. A with respect to M. Unless M Suppose that the BRA A on U is not integral; then, there are atoms E i k, of A such that E 4 1! . # U U . We observe that U E U E , so that U " A. For i j k, set U dom E $ and U Since each U is an equivalence relation contained in A, we can consider the relative algebra of A with respect to U , which we denote by A . If R " A , then R is an atom of A if and only if R is an atom of 4. Every functional non zero x A is an atom of A. 5. If A is a BRA on a finite set U, then dom R 1 2 i i i i i ij j i ij 2 j ij ii ii i i i A. Consequently, each Ai is an integral relation algebra, and, in loose analogy to permutation groups, we call the algebra Ai an integral constituent of A and Ui its constituent set. The following technical lemma will be useful in the sequel: k. # # # 1. If P " At A $ and ran x $1 1 for some x " U , then this holds for all x " dom P $ . # # U ran # P$ U . 2. If P " At A $' P 3 U , then dom P $ 3. Suppose that i j k 5 U - 3 6 U 7 U 8 6 U is not a multiple of U i , and that every R " # # At A $ is regular. Then, U " At A $ . # 9 a , and assume that ran # y$1;: 2 for some y " U . Let φ # x$ be Proof. 1. Suppose that ran x $ the formula #=< y$ #?> z$A@ xPy B # xPz C y z$ED= # The truth set M of φ in the model U P is the set of all those elements of dom P $ whose P - range # consists of exactly one element. By our assumption we have 0/ 4 M 4 dom P $ , and by 1.1 the relation 1! * M is an element of P 3 A, since φ contains only three variables. This contradicts the fact that P is an atom of A. # 6G # 2. Assume that y " U F dom P $ ; then, y y " P P $H* E , contradicting that E is an atom of A. The other part is shown analogously. # G 3. Assume that for some i j there is some P " At A $ such that P 4 U , and set Q U F P. Let y " U ; if there is exactly one x " U with xPy, then P is a function by the fact that it is an atom Lemma 1.3. Let A have the integral constituents Ai i P ij i i j i j j j ij P P 2 1 i i i ij j 1 i 4 ij and 1. above. Thus, the P-ranges of elements of Ui partition U j , and from the condition on A j and 1.2 it follows that the classes of this partition have the same number of elements. This, however, contradicts that U j is not a multiple of Ui . Therefore, each y U j appears in at least two rows of P, and the same arguments apply to Q. Hence, for each y U j we have 2 d omP y Ui 2, which 3. contradicts Ui " # $1J-I J# We now turn to permutation groups. The symmetric group on U is denoted by Sym U $ . If G is a # # subgroup of Sym U $ - a fact which we describe by G - Sym U $ - , and if M 3 U , we denote by M # # # the set φ x $ : x " M φ " G ; for φ " Sym U $ , M is the set φ x $ : x " M . A fixed block of G is a non empty subset M of U such that M M ; a minimal fixed block is called an orbit of G. If G has M or M * M 0./ The only one orbit, it is called transitive. M 3 U is a set of imprimitivity, if M " -I G φ G G G empty set, the singletons and U itself are called trivial sets of imprimitivity. A transitive G is called primitive if it has no non trivial sets of imprimitivity. #$ #$ " " # # φ # x$' φ # y$ , and R 2 φ # x y $ : x y " R ; note If φ " Sym U $ and x y " U , then we set φ x y $ φ R φ. If R R, then φ is called a base automorphism of R. For A - Rel # U $ we set that R I φ " Sym # U $ : R R for all R " A0 A # It is not hard to see that A is a subgroup of Sym U $ , called the group of base automorphisms of A, and that φ " A if and only if φ commutes with every atom of A. # Conversely, if G is a subgroup of Sym U $ and x y " U , we set L φ # x y $ : φ " G0 GK and let G be the BRA on U generated by G K : x y " U . Observe that the sets G K are just the orbits of the action of G on U , and hence a partition of U . Indeed, each G K is an atom of G , and # every atom of G has this form. The assignments ρ and σ form a Galois connection, and A - Rel U $ A; similarly, H - Sym # U $ is Galois closed if H H (see [15]). is called Galois closed if A G is called semiregular if the identity is the only element of G that fixes a point, or, equivalently, if for all φ ψ G the fact that φ x ψ x for some x U implies that φ ψ . If G is semiregular and transitive it is called regular. φ φ φ 1 φ ρ ρ ρ xy σ xy xy 2 2 σ xy σ ρσ σρ 2 Groups and relation algebras - # $ It has been of some interest to investigate which properties of some G Sym U carry over in which form to the relation algebra Gσ and vice versa. As an example, we cite a result from [15]: - # $ # $ Proposition 2.1. If A Rel U , and every atom of A is functional, then A is Galois closed and Aρ is semiregular. Conversely, if G Sym U is semiregular, then G is Galois closed and every atom of Gσ is functional. The following connection has been known for some time: 5 1. If G is transitive, then Gσ is integral. Proposition 2.2. 2. If G is primitive, then Gσ does not contain a non trivial proper equivalence relation. Proof. The proof of 1. is straightforward, and a proof of 2. can be found in [21]. - Rel # 7$ such that A is not transitive. The corresponding statements for relation algebras are not true: ρ - #$ 3 ( # 7 F 3$ . S is the disjoint union of a K and a K , and generates an integral Proof. 1. Let S relation algebra A on U 7 with atoms S T 1! and the following composition table: M N N Proposition 2.3. 1. There is an integral A 2. There is an integral A Rel 8 which does not contain a non trivial proper equivalence relation, and for which A is not primitive. 2 2 3 S T S T T 4 T T T Since 0 is an even node, and 1 is an odd node, Aρ is not transitive. It will follow from a subsequent result that this example is the smallest possible for this situation. #$ ! " # $ ( ( 2. Let φ Sym 8 be the cycle 0 7 , and let S φ φ4 φ 1 . S generates an algebra A with the atoms S T 1 and the following composition table: M - Rel # 8$ N N O N O # # # # # # # A is generated by the permutations 17 $ 26 $ 35 $ and 01 $ 27 $ 36 $ 45 $ , and it has 16 elements. It is transitive and not primitive; a system of imprimitivity is given by 0 4 0 1 5 0 2 6 0 3 7 . S T S S 1 T 1 2U ρ - Rel # U $ . Then, The situation is described by Proposition 2.4. Let A 1. Aρ is transitive if and only if Aρσ is integral. 2. Suppose that Aρ is transitive. Then, Aρ is primitive if and only if Aρσ does not contain a non trivial proper equivalence relation. C " Proof. 1. " " is just 2.2.1. Thus, set G Aρ , and suppose that Gσ is integral. If x y U , then, by the integrality of Gσ , the atom Gx y of Gσ has all of U as its domain. Thus, there is some z U such that y z Gx y ; by the definition of Gx y there is some φ G with φ x y, and hence G is transitive. " K # " K " $ K 2. " C " is 2.2.2. Thus, let G A , and suppose that G does not contain a non trivial equivalence relation. Assume that there is a subset M of U such that 1 P M 09 U , and that M is minimal with M or M * M 0/ . Define a relation P on U by respect to the property that for all φ " G, either M xPy if and only if x y " M for some φ " G. Since the family M : φ " G is a partition of U , P is an ρ σ φ φ φ φ 6 " K K * G equivalence relation, and by our assumption on M, P is not trivial. Let xPy; then, Gx y P 0/ , and we can assume without loss of generality that x y M. If u v Gx y with φ G exhibiting this fact, then u φ x Mφ v φ y M, and thus uPv. It follows that Gx y P. Since U is finite, P is a ρσ union of atoms of A , and therefore P Aρσ . This contradicts our hypothesis. " # $Q" # $R" " # Call an integral A - Rel U $ c - permutational if A " K3 " ρ is transitive, i.e. for all u v U there is a base automorphism of A taking u to v. An integral abstract relation algebra is called permutational, if it has a c - permutational representation. Proposition 2.3.1 above gives an example of an integral BRA on 7 which is not c - permutational. A representation of A which is c - permutational is available on a six element set: Just let S be the disjoint union of two K3 ’s. In [2] we have exhibited an integral representable relation algebra which does not have a c - permutational representation. The algebra of Proposition 2.3.2 is an example of a permutational BRA A which is not Galois closed. However, this A, regarded as an abstract relation algebra, has a Galois closed representation on a ten element set: If G is the action of Sym 5 on the set of unordered pairs of 5, then G is the BRA generated by the Petersen graph ([6]) which is isomorphic to A. The remaining question whether there is a permutational relation algebra without a Galois closed representation is answered below. #$ Proposition 2.5. There is a permutational relation algebra which does not have a Galois closed representation. " Proof. Let S G #$ Sym 4 be defined by S " Rel # 4$ by # ran 0 $ # ran 0 $ G # 01$ # 23$' # 02$ # 13'$ # $ 0 20 ran # 2$ ran # 3$ 1 3 # $ 0 30 ran # 1$ ran # 3$ 1 2 n 4, and define For any positive natural number n we set U i j . i S # j$ S : i n j 4 s i j . i G # j$ ' : i n j 4 g i j . i 1 k : i n T j k " R r i j . i 2 k : i n T j k " B b and R B R B ranR 1 ranB 2 R R B R n " Here, as throughout this proof, addition is modulo n. Let An be the BRA generated by s g r and b. To facilitate notation, we denote x y by xy for x y An . # * # rb$ $ G U , and if n 5, then dom # rb * b $ G 2. If n : 7, then A is integral with the following n 9 atoms: U U U O U U U U U U U V U V U N U V U V V U V V U U UWEWWU V W 1. If n 7, then An is not integral: This is easy to check, e.g. if n 1 6, then dom rb 1 n s g sg 1 r rs b bs rb rbs r 1 sr 1 b 1 sb 7 1 b 1r 1 sb 1 r 1 r4 r5 rn 4 U. The proof is straightforward, if somewhat computational, and is left to the reader. 3. If n : 8, then An has no Galois closed representation: # ! " !$ ! / ! ! # From ss gg 1! and sg gs we obtain that rep e $ is an equivalence relation on U ! with each block containing exactly four elements. So we may suppose that U ! n! 4 for some n! , and that # i j . i S # j$ ' : i n! j 4 rep s $ # i j . i G # j$ : i n! j 4 rep g $ Let f r rs and set P i j . i 1 k : j k 4 L f e f f e and f 1! f G 1! for k n, we have n n! and also for i n. By f e f # i j . i 1 k : i n j k 40 rep f $ # s rep # g$ g rep s $ / and the same for r replaced by rs, we obtain Furthermore, from r sr rg r * rs r * gr 0, # # rep r $X* L r * L or rep r $* L rs * L # s we now have for all i n. By rep s $ # # I r * L rs * L 0 (*) rep r $X* L rep rs $* L We first show that, though An is not essentially unique on U , all its representations are on some n 4 element set, and that all representations are very much alike. Thus, let U be a set, A Rel U , and rep : An A be an RA - isomorphism; furthermore, set e s g sg 1 . i 1 k n i i i i i i i i Using a completely analogous argument, we similarly obtain ! # $X* L rep # bs$X* L I b * L bs * L 0 (**) rep b i i i i Thus, A is very similar to An . : ! . . . ! Assume that h h! h! are base automorphisms of A! fixing 0 0 , i.e. # h! # 0 0 $ h! # 0 0 $ 0 0 h 0 0 $ # e implies that h # 1 0 $ 1 j for Since base automorphisms preserve the elements of A! , h e $ # r h # rs$ rs show that j " 0 2 . As the same hold for h! and h! , some j 4; furthermore, h r $ # h! # 1 0 $ . we infer that two of h h! h! agree on 1 0 as well. Thus, let w.l.o.g. h 1 0 $ ! Assume that A is Galois closed. Since n 8, r4 is an atom of A ; hence, for each j 4 there is a base automorphism taking 0 0 4 0 to 0 0 4 j . It follows that there are at least four base automorphisms which fix 0 0 . However, we shall show that there are at most two such base automorphisms, and consequently, A cannot be Galois closed. 8 ! Next, we show that if two base automorphisms of A agree on 0 0 and 1 0 , then they are equal: Define two equivalence relations on 4 by γ χ and suppose that 0 2Y( 0 3Y( 2 2 2 2 1 30 1 20 # $ h! # 1 0 $ i j # 2 k h 2 0 $ 1 0 . 2 0. " rep # r$X* rep # rs$ h 10 Then, together with (*) and the fact that h preserves r and rs, imply that k is in the same γ - class as j. Similarily, 00 20 rep b rep bs . ' " # $X* # $ !# $ ! together with (**), and the fact that h preserves b and bs, imply that k is in the same χ - class as 0. ! Let h 2 0 2 k . By the same argument, k is in the same γ - class as j and in the same χ class as 0. It follows that k and k are in the same γ - class and in the same χ - class. Now, it can be easily checked that the intersection of any γ - class with any χ - class contains exactly one element, and therefore k k . A completely analogous argument establishes that in fact h i 0 h i0 for each i n. Again using that h h are base automorphisms – in particular that they preserve s and g – we obtain h h (Full details of this argument along with some combinatorial background can be found in [2]). This establishes that A’ is not Galois closed. ! ! ! # $ !# $ ! 4. If n is a multiple of 7, then An is permutational: This follows from the fact that the ”period” of the function we implicitly construct in the preceding paragraph is 7; more on this can be found in [2]. If e.g. n 14, then one can check by hand (or by CAYLEY) that the group H of base automorphisms of A14 has 112 elements and is transitive. Consequently, A is permutational. If we translate i j U14 into i 4 j, then H is generated by the permutations 4 6 5 7 8 11 9 10 12 15 13 14 16 17 18 19 φ 20 22 21 23 24 25 26 27 32 34 36 39 37 38 40 43 41 42 44 45 46 47 49 51 52 53 54 55 ψ " # $# $# $# $# $# $# $# # $# $# $# $# $# $# # $# $# $# $# $# $# # 0 52 48 44 40 36 32 28 24 20 16 12 8 4$ # 1 53 49 45 41 37 33 29 25 21 17 13 9 5$ # 2 54 50 46 42 38 34 30 26 22 18 14 10 6$ # 3 55 51 47 43 39 35 31 27 23 19 15 11 7$' This completes the proof. 9 $ $ $' Thus, A14 is the smallest example of a permutational BRA without Galois closed representation which can be obtained by this construction. It is unknown to us whether any smaller examples exist. It also may be interesting to note that A14 is not group representable in the sense of [19], since H does not contain a regular subgroup. A similar statement holds for all representations of A. Even though in the proof above we exhibited infinitely many permutational RAs without Galois closed representation, these algebras cannot be used to show that having a Galois closed representation cannot be expressed with one first order formula relative to the class of permutational RA’s. The reason for this is that any ultraproduct of these algebras is also permutational and does not have a Galois closed representation; this can be seen using the same arguments as in the proof of Proposition 2.5. However, by using the same kind of argument in a more sophisticated way, one can construct a sequence An n ω, of BRAs where each An is permutational without Galois closed representation, so that an ultraproduct of these remains permutational, but has a Galois closed representation: In the construction of 2.5, replace 4 by a prime p, s and g by suitable functions, and choose n p large enough so that An p has a ”big” atom and n p is divisible by the period of R and B. # $ # $ Z B, then A is # # R for each # Proof. Let h : A / B be an isomorphism, G A H B , and φ " Sym U $ with h R $ R for some R " A. Now, R " A. Furthermore, let ψ " G and P " B. Then, P h R $ [ V M V M \ M M [ V M V M \V ] [ V M V M \ M V M M M [ V M V M \V ] V M V M M M ] V M M ] U and hence φ G φ - H. Conversely, if ψ " H, then φ ψ φ " G, and thus ψ " φ G φ. The converse is not necessarily true: There are two BRAs A B on an 11 element set such that A Z B ^ 1! , and A (and hence B) is not essentially unique. We have, however, a partial converse B A which will be used later: # Proposition 2.7. Suppose that A B " Rel U $ are Galois closed, and that A and B are conjugate. # # R for Then, A Z B and for every isomorphism h : A / B there is some φ " Sym U $ such that h R $ any R " A. # Proof. Let G A H B , and H ψ G ψ for some ψ " Sym U $ . Recall that for each φ " # # Sym U $ , the assignment R / φ R φ is an automorphism of Rel U $ . Now, set # ψ G K ψ hGK $ # R for any Since B H , and H ψ G ψ , it is clear that the image of h is B, and that h R $ R " A. Essential uniqueness has the following not totally unexpected consequence: Proposition 2.6. If A conjugate to Bρ - Rel U is essentially unique, and if B ρ - ρ Rel U with A ρ φ φ φ ψ 1 1 φ P φ 1 ψ 1 φ 1 φ 1 ψ φ 1 φ 1 ψ φ 1 P φ 1 φ 1 R φ φ 1 ψ 1 φ 1 R ψ φ R 1 1 ρ 1 ρ ρ ρ φ ρ ρ 1 1 xy σ 1 xy ψ 1 10 # $ # $ - Z # $ Corollary 2.8. Suppose that all subalgebras of Rel U are Galois closed, and that for all Galois closed G H Sym U , Gσ H σ implies that G and H are conjugate. Then every subalgebra of Rel U is essentially unique. _ - Rel # U $ have the integral constituents A i We close this section with some observations regarding non integral BRAs: Proposition 2.9. Let A k, and set G i Aρ . Then, 1. Each Ui is a fixed block of G. 2. If M is a union of constituent sets, B is the relative algebra of A with respect to 2 M, and φ then the restriction ψ of φ to M is a base automorphism of B. " G, U F U , B is the relative algebra of A with respect to M, G (b) U is an atom of A for all j k j i, (c) φ " A ψ " B . Then, φ ( ψ " G. G 4. If each A is Galois closed and U is an atom of A for all i j k j i, then A is Galois closed. G Proof. 1. Suppose w.l.o.g. that k ` 1, and assume that there are i j k i j x " U y " U , and # a G some φ " G such that φ x $ y. Then, x x " E , but x x " φ E φ , contradicting that φ is a base automorphism of A. # # # 2. First, note that by 1., M is a fixed block of G, so that ψ " Sym M $ . If R " At B $ , then R " At A $ , and the conclusion follows from φ " A . # 3. Set χ φ ( ψ, and suppose that R " At A $ . If R " B or R " A , the conclusion follows at once from φ " A and ψ " B . # G Thus, let R U for some j k j i. Then, φ R R (since φ @ U D U by 1.), and ran x $ U for all x " U ; similarly, R ψ R. So, we have χ R φ R R R φ R χ H and H A for i k. Since each A is Galois closed and integral, each 4. Suppose that A # H is transitive. Let H " Sym U $ be defined by φ " H bcC φ " H , P be an atom of A, and x y " P. # ran # P$ U , and P is in fact an (a) x y " U : Since P is an atom of A, we have dom P $ H e P. atom of A . Since H d U G , we have H K G (b) x " U y " U i j: Then, P U U by the hypothesis. Let u v " P. Since H and # # u and ψ x$ v. Set χ φ ( ψ; H are transitive, there are φ " H ψ " H with φ x $ f u v , and it follows that P 3 H K . The converse follows from then, χ " H and x y P U U . 3. Suppose that (a) M 2 i ij ρ i ρ i ij i i j 1 i ρ i ρ i ρ ij j i i R i ρ i i σ i i i i i i i i i i i xy j j i ix y j i i j xy i i j 11 It now follows from (a) and (b) that H σ This finishes the proof. A. 3 Logic of Galois closed relation algebras - ! Throughout this section let A be a finite simple complete and atomic relation algebra with atoms ai i k, and a j 1 for j m k. The representation language LA of A is a first order language with equality and the binary relation symbols Ri i k; we sometimes omit the subscript if the context is clear. For any language L, we denote the set of all L - formulas with just one free variable by Lx ; the set of all Lx - formulas which contain at most n variables altogether is denoted by Lxn . The sets Lx y and xy Ln are defined analogously. The truth set def φ x y of φ Lx y in the model U A is the relation K # K $ " K a b " U : U A φ # a b$.0 # Similarly, we define def φ x $ for φ " L . We start with an observation on definable sets: # Proposition 3.1. Let A - Rel U $ and M 3 U be not empty. Then, M is definable in U A if and only if M is a union of orbits of A . # Proof. " C : Suppose that φ x $ is a first order formula in the language of A with one free variable # which defines M in the model U A , and that ψ is a base automorphism of A. Then, A φ a $ implies # # that A φ ψ a $$ , and hence M contains the orbit of each of its elements. " b ": Suppose that G A , M is an orbit of G, a " M b " U . It is shown in [1], 4.(i) together with # 1.4.2. of [16] that each element of A is definable by a formula ψ x y $ in the language of A. Now, G K is an atom of A with domain M, and hence, M is definable. 2 x ρ ρ ρσ ab ρσ Let us recall a few facts from [3]: Suppose that B is a representation of A on U with representation language L. #=< $ # g$ C ?# > $ # $ #=< x$ φ # x$aC #?> x$ φ # x$ for any φ " L . In this 2. B is c - permutational if and only if U B case, no proper and non empty subset of U is definable, and all x " U have the same first order properties with respect to the model U B . " 1. A is integral if and only if for any φ Lx3 , the sentence x φ x x φ x holds in U B . In other words, no proper and non empty subset of U is definable in the model U B by a formula with at most three variables. x Every integral Galois closed relation algebra is permutational, and we have shown above that the converse is not true. Hence, being Galois closed is stronger than permutational; below, we show the logical background of this phenomenon. #$ The representation theory of A, denoted by T h A , is the collection of the following LA -sentences: 12 #?> x$ #?> y$ # xR y hch xR y$ #?> #?> # G 2. x $ y $ xR y Cji xR y $ for i j k and i j 3. For all i j m m k and a a a k a l , #?> x$ #?> y$A@ #=< z$ # xR z B zR y$mbmC # xR y hch xR l y$ED # A is representable if and only if T h A $ has a model. It was remarked in [4] that a representation of A # is essentially unique on U if T h A $ is categorical on U . If ψ " L K and i k, then ψ denotes the sentence #=< x$ #=< y$ # xR y B ψ # x y$$nC #?> x$ #?> y$ # xR y C ψ # x y$$' 1. k 1 0 i j r 1 0 i j i xy m0 mr j 1 m0 mr 1 i i i Intuitively, ψi says that if ψ can be satisfied on some edge of the atom Si , then it can be satisfied on all edges of Si ; in other words, all edges of Si have the same first order properties. K # $;( # $o( K " Proposition 3.2. If A has a Galois closed representation on a finite set, then T h A ψi : ψ x x y y L and i k is consistent. Conversely, if U B is a model of T h A ψi : ψ L and i k and U is finite, then B is Galois closed. " # $C Proof. " ": Let B be a Galois closed representation of A on the finite set U ; then, U B is a model of T h A ; furthermore, suppose that Ri is interpreted by the atom Si of B, and let Gσ B. We first Lx y , and all base automorphisms φ of B, observe that for all u v U ψ x y " # $f" K U B ψ # u v$ if and only if U B ψ # φ # u$' φ # v$$' # Suppose that i k and u v " U such that U B uS v B ψ u v $ . Since S is an atom of B, we have G K . Now, if u! v! " G K , then there is some φ " G such that φ # u$ u! and φ # v$ v! . Since S U B ψ # u v$ , we also have U B ψ # u! v! $ by the observation above. Hence, U B ψ . # " b ": Conversely, suppose that U B is a model of T h A $%( ψ : ψ " L K and i k on the finite # # G / i. e. set U . Let ψ x y $R" L K , and set Q def ψ x y $ in the model U B . Suppose that S * Q 0, # that there are a b " U such that aS b and ψ a b $ is true in U B . Since U B ψ , we have S 3 Q. Therefore, Q is a union of atoms of B, and thus, B contains every binary relation definable over U B . i i uv i uv i xy i xy i i i i Since U is finite, B is Galois closed by [1] 4.(i). This implies that being Galois closed is a general first order property for finite models, while one can use techniques similar to those mentioned after 2.5 to show that its negation is not. 4 Clones of operations . " # $ # $ # $ #$ In this section we always suppose that the operations under consideration are finitary. Furthermore, n Rel U , and h is a function on Rel U , then we assume that h R is if e.g. R R0 Rn 1 defined componentwise; a similar convention holds for permutations. Furthermore, we shall usually write φ x y instead of φ x y . A set p of operations on a set M is called a clone on M if 13 p contains all projections, i.e. all operations pni : n M 1. for all n 2. p " ω and i M with # m $ m pni m0 n. n 1 "qp is closed under composition, i.e. if f operations, then the m-ary operation h with i is an n-ary operation and g0 g n 1 are m-ary # . a $ f # g # a . a $' g # a a $$ h a0 p / is an element of . m 1 0 0 m 1 n 1 0 m 1 p p 2r9ts : s is a clone on M and O 3 s 0 If O is a set of operations on M, then we say that O generates the clone , if # $ Let L be a first order language with equality whose predicate symbols are binary. If ψ " L K contains # exactly the predicate variables P P , then ψ defines an n-ary operation f on Rel U $ by # def ψ f R R $ , where P is interpreted by R for i n. The set of all the operations of in the model U R R # this form is also a clone on Rel U $ which we shall call the logical clone, and denote it by p . # # " Rel # U $ An n-ary operation f on Rel U $ is called invariant if for all φ " Sym U $ and all R R # f # R . R $ f R R $ # The set of all invariant operations on Rel U $ is also a clone, denoted by u . # Let R " U , and a b " U . Define an n-ary operation F K K on Rel U $ by # L x y " U : U R a b Z U S x y 0 F K K S$ # I φ a b : φ " Sym # U $ and R S . In other words, F K K S $ The following basic result on these clones can be found in [16]; there, U is not necessarily a finite set: p. Proposition 4.1. 1. If U is not empty, then p 3vp 3vp . If U is finite, then p F K K iff U R a b Z U S c d , otherwise, F K K * F K K 0./ 2. F K K 3. The n-ary operations in p form a complete and atomic Boolean algebra with atom set F K K : # R " Rel U $' a b " U . _ The classical clone p c is the clone generated by the basic operations and constants of Rel U . xy ψ 0 ψ n 1 0 n 1 0 n 1 i i l n 1 0 φ 0 φ n 1 0 n 1 φ i n Rab 2 Rab φ Rab c Rab l Scd i l Rab i Scd Rab i n 14 p G p It is well known that l i if U is infinite: Transitive closure is an example of an invariant operation which is not first order definable on an infinite set; consequently, there is no global definition of transitive closure in first order logic in the sense that there is no formula ψ of Lx y such that for any binary relation R on a finite set the transitive closure of R is def ψ, see for instance [16] for a proof. It is of considerable interest to find a logic not involving linear order in which exactly the polynomial time computable invariant operations are expressible, or to show that there is no such logic (see [11] and [13] for further discussion and references). # $ p K -v # $' wp p p 32p # $ Rel U means that A is a subalgebra of Rel U with Given a clone on Rel U , the notation A , then A is a relation algebra, and thus the concepts of base respect to the operations in . If c automorphism and Galois closure as defined above apply. # $ # xQ R R $ y m b C #=< z$ #=< u$ # xR zR y B # The situation that x y " Q R R $ is pictured below : z x y We also consider the quinary operation Q on Rel U which is defined by 4 0 $' R1 R yz x R2 3 R4 {"G p ;: B xR2 uR3 y zR4 u 1 4 0 0 1 x y R 0 u It is shown in [16] that Q 25, and it was asked in the draft version of [16] for which c if U U the operation Q is a member of the classical clone on U . To answer this question was, indeed, the starting point of this paper from which it has developed through numerous revisions (and several years) to its present form. "|p J- - Rel # 7$ introduced in 2.3.1 There, # 1! ( 3 4 5 60 Q S S S S S$ 7 0 1 20 M 7 3 4 S n 1 which is not an element of A. More generally, for n : 7, set M M ( M . Then, Q # S S S S S$ 1! ( M "G A. and let A be generated by S " b ": This will follow from the next two results. p ; it will turn out that the magic The rest of the paper will characterize those sets U , for which p number is 6. The proof will be done in two stages: We first give a condition for a clone p which contains p to be equal to p , and then we shall show that p fulfills this condition if and only if U }- 6. Proposition 4.2. Q Proof. " C c if and only if U 6. ": Consider the algebra A 2 0 2 0 2 1 c c 1 The 1 2 i 1 i c diagram was drawn using Paul Taylor’s Commutative Diagrams in TEX macro package. 15 As a preparation for the first part, we need one more concept: For a set D, the ternary discriminator is an operation τ on D which satisfies # ~ c τ a b c$ a if a b otherwise # $ @ # U # P QX$ U $ * PD (@ # U # P Q$ U $X* RD= where denotes symmetric difference. # Proposition 4.3. Let U be a finite set, and p be a clone on Rel U $ such that p 3Lp3Lp . If every # p. subalgebra of Rel U $' wp is Galois closed and essentially unique, then p Proof. By 4.1 it suffices to show that p contains the operations F K K for each n : 1, and all R " # Rel U $' a b " U . Since p 3,p , and p contains the ternary discriminator, so does p . In other words, p is quasi - primal in the terminology of [10], p. 403, and by the characterization of these clones given in [10], we need to prove that # # 1. Each F K K preserves subalgebras, i.e. whenever S " Rel U $ , then F K K S $ is contained in the # subalgebra of Rel U $' wp generated by S S . # 2. Each F K K preserves internal isomorphisms, i.e. whenever A B -2 Rel U $' wp and h : A / B is a p -isomorphism, then, for all S " A, ## # h # F K K # S$$' F K K h S $' h S $$ # / and 1. is trivially 1. If U R and U S are not isomorphic as first order structures, then F K K S $ 0, # S, and fulfilled. If, on the other hand, U R Z U S , then there is some φ " Sym U $ such that R by 4.1.2 we have # F K ?K # S$ I π # φ # a$$' πφ # b$ : π " S F K K S$ # # which is the atom of the Galois closure of S which contains φ a $' φ b $ . Since S is Galois closed # by the hypothesis it contains F K K S $ . # 2. Let A B -2 Rel U $' wp , and h : A / B be a p -isomorphism. Since A is essentially unique, there is # some ψ " Sym U $ such that # T ψ T ψ h T$ for all T " A. Let S " A. Now, # # F K K #S $ F K K h S $$ π a b : π " Sym # U $' R S ψψ π a b : π " Sym # U $' R l S ψδ a b : δ " Sym # U $' R S # F K K # S$$ h # F K K # S$$' The classical clone contains the ternary discriminator via τ PQ R 2 2 2 2 c i i Rab n c c n Rab 0 Rab n 1 Rab n Rab 0 n 1 Rab Rab φ σ Sφ a φ b Rab Rab ψ 1 n Rab ψ Rab π ψ πψ 1 δ Rab ψ Rab 16 1 This completes the proof of 4.3. p p We can now prove the main result of this section: Proposition 4.4. c i }- if and only if U 6. Remark: Before we embark on the long and sometimes tedious proof we comment on the logical consequences of this result. Let L be a first order language with equality and binary predicate symbols Pn 1 , and let U R0 Rn 1 be a model of L. Because of 1.1 above, a binary relation S is in P0 the image of an operator F c with arguments among the Ri if and only if S is definable by a formula of Lx y with at most three variables. On the other hand if we choose F i l , then the results will be the relations definable by any finite number of variables, and the resulting relations will, in fact, form the Galois closure of R0 Rn 1 . Thus, the proposition implies the surprising fact that on a set U with at most six elements, relation algebra logic (i.e. logic with three variables) is as powerful as first order logic. It would be interesting to know, whether this result carries over in some form to larger n, e.g. whether n 3 or even log2 n 1 variables suffice on an n-element set. "cp K "p p C # $Y # $ I ' Proof. " ": This follows from (the already proven part of) 4.2, since Q is first order definable. b - }- # The lattice of subgroups of Sym U $ has 56 conjugacy classes, and we have checked that whenever # Galois closed G H - Sym U $ are not conjugate, then G is not isomorphic to H . Thus, if all subal# gebras of Rel U $ are Galois closed, then they will be essentially unique by 2.8. # First, let A - Rel U $ be integral. There are several cases and subcases: # 1. A has six atoms: Then, each R " At A $ is a permutation by 1.3, and hence A is Galois closed by 6, every subalgebra of Rel U is Galois closed and " ": By 4.3 it suffices to show that for U essentially unique. For U 5 this was already obtained in [16]. Thus, let U 0 5 . σ σ 2.1. 2. A cannot have exactly five atoms: If A had five atoms, three of these would be semiregular permutations because A is integral. Any three semiregular permutations of U , however, generate an algebra with six atoms. # $ I 1! R S T ; at least one of these is a semiregular permuta # 024$ # 135$ . We see that R generates 3.1. R has order three: Then, R consists of two cycles, say, R A, and A has the following relative composition table: M O O N # # # # # # A. If G - Sym U $ is generated by the permutations 042$' 153$ , and 03 $ 12 $ 45 $ , then G 3. A has exactly four atoms: Let At A tion, say, R. R S T R S T S 1 T 1 R T T T T σ 17 # $1 # $1 " " 3.2. R has order two: Then, by 1.3.1 and the argument used in 2. above, we have ranS x ranT x 2 for all x U , and the same holds for the domains. Furthermore, for P ST , # R P$* P # R P$* R # P R$X* R 0/ since R R . It follows that S R S or S R T . # / and hence # T R$J* S 0./ It follows that T R T . Therefore, 3.2.1. S R S: Then, S R $}* T 0, the range of each x " U in S or T is a cycle of R. # E. Assume that S S , and Suppose that the cycles of R are D E F, and that x " D with ran x $ # D. Hence, if z " F and zRu, then u " F, contradicting let y " E. Then, ySx, and therefore ran y $ / Thus, S T , and the S-ranges of cycles of R are a cyclic permutation of these cycles. that R * S 0. # 01$ # 23$ # 45$ , and S be defined by Let w.l.o.g. R 0 1 / 2 4 2 3 / 4 5 0 1 4 5 / 1 1 s S 1 The algebra A generated by R and S has the relative composition table M R S T R S T 1 S T S T O O T O # # # # # A. If G " Sym U $ is generated by 025$ 134$ and 034$ 125$ , then G 3.2.2. S R T : Then, for any x " U the S-range of x intersects those two cycles of R which do not # 03$ # 12$ # 45$ , and ran # 0$ , 1 5 ; then, contain x, each in exactly one element. Let w.l.o.g. R # I 2 4 . ran 3 $ T . Then, we have the following partial matrix for S: Assume that S U U U U U U U U U UW 1 1 R R S σ S S 1 0 15 1 3 one of 4 5 2 0 one of 4 5 3 24 4 0 one of 1 2 5 3 one of 1 2 It is routine to check that none of these possibilities generates an algebra with exactly four atoms. 18 Thus, S and T are symmetric. We then have the following partial matrix for S: 0 1 2 3 4 5 U U U 15 U U 0 one of 4 5 U 3 one of 4 5 U U 24 U UW 3 one of 1 2 0 one of 1 2 - # $ Depending on whether 1S4 or 1S5, we obtain the two isomorphic algebras A1 and A2 , whose tables of relative multiplication are given by Table 1 and Table 2, respectively. If G Sym U is generated Table 1: A1 M R R S T 1 T S O 1 4 " S T O T M R R S T 1 T S O O S 1 T S R Table 2: A2 S R 1 T 1 5 " S Ow S T T 1 T S O S S R T 1 R S # $ # '$ # $ # $ # $ # $ # $ # $ # $# $ # $# $# $ # $# $ 4. A has exactly three atoms: There are two possible types, both of which are essentially unique (see # 012345$ . [4]). Let φ # 4.1. If A is generated by φ ( φ ( φ , then A G , where G is generated by φ and 02 $ . # # 4.2. If A is generated by φ , then A G , where G is generated by φ and 01 $ 34 $ . # This covers the case of the integral subalgebras of Rel U $ . # Now, suppose that A - Rel U $ is not integral with constituent sets U i k. By 2.9 we can suppose G that each constituent set of A has more than one element, and that some U i j is not an atom of A. 1. A has three constituent sets: Then, each constituent set has exactly two elements. Suppose that L 0 10 U L 2 30 U L 4 5 . If each atom of A is functional, then A is Galois closed by 2.1. U # # # Otherwise, let w.l.o.g. 0 2 . 1 3 0 U " At A $ . Then, A G , where G is generated by 01 $ 23 $ # and 45 $ . by 042 135 02 13 , and 01 23 45 , then, Gσ A1 . If H Sym U is generated by 01 23 and 03 14 25 , then H σ A2 . Observe that G and H are conjugate via 014 253 . 3 σ 5 σ 3 i ij 0 1 2 σ 02 19 , 0 , 2. A has two constituent sets: There are two possibilities. 2.1. U0 U1 3 U0 0 2 4 U1 1 3 5 : If A1 or A2 has three atoms, then – keeping in mind that U01 is not an atom by our hypothesis – all atoms of A are functional, and A is Galois closed by 2.1. / # $# $ # $ . . U 2 U L 0 1 2 30 U I 4 5 : Since U is split, A cannot have exactly two 2.2. U 4 f Otherwise, both A0 and A1 have two atoms, and A is generated by a bijection U0 0 3 2 1 4 5 . Then, A Gσ , where G is generated by 01 23 and 45 . 0 1 0 1 01 U1 , say, R 0 atoms; furthermore, U01 is split into exactly two atoms P and Q, each of which is functional. There are three possibilities for A0 , and each of them determines of U01 is split: # $ # $ #$ # $# $ # # 2.2.2. A is generated by two permutations of order two: Suppose w.l.o.g. that 02 $ 13 $ and # 01$ # 23$ generate A . Again, ran # 0$ ran # 1$ , and A G , where G is generated by # 01$ # 23$ # # # and 03 $ 12 $ 45 $ . # # # 2.2.3. A is generated by one permutation of order two: If A is generated by 01 $ 23 $ , then ran 0 $ # # # # ran 1 $ , and A G , where G is generated by 0213$ 45 $ and 23 $ . 2.2.1. A0 is generated by a cycle: Let w.l.o.g. 0123 generate A0 . Then, we must have ran p 0 ranP 1 , and we find that A Gσ , where G is generated by 0213 45 . 0 0 P σ P 0 P 0 σ P This concludes the proof of 4.4. We should like to close with the observation that two Galois closed algebras which are isomorphic as n m, where relation algebras on the same base set, need not be essentially unique: Consider U 3 n m, and n m. Let S be a disjoint union of n Km ’s, and T be the disjoint union of m Kn ’s. S and T generate isomorphic and Galois closed subalgebras A and B of Rel U , but they are clearly not isomorphic as first order structures; adding invariant operations to c will eventually destroy the isomorphism. It would be of interest to know whether there is a clone with c i such that all subalgebras of U are Galois closed and A is -isomorphic to B. - G wp p p p # $ p 3vp 4 p References [1] H Andréka and I Németi, On Jónsson’s clones of operations on binary relations, In Andréka et al. [5], pp. 431–442. [2] Hajnal Andréka, Ivo Düntsch, and István Németi, A non permutational integral relation algebra, Michigan Math. J. 39 (1992), 371–384. [3] , Expressibility of properties of relations, Journal of Symbolic Logic 60 (1995), no. 3, 970–991. [4] Hajnal Andréka and Roger Maddux, Representations for small relation algebras, Notre Dame Journal of Formal Logic 35 (1994), no. 4, 550–562. 20 [5] Hajnal Andréka, J. Donald Monk, and István Németi (eds.), Algebraic logic, Colloquia Mathematica Societatis János Bolyai, vol. 54, North Holland, Amsterdam, 1991. [6] N. L. Biggs and A. T. White, Permutation groups and combinatorial structures, LMS Lecture Note Series 33 (1979). [7] John Cannon, A language for group theory, Tech. report, University of Sidney, 1987. [8] Ivo Düntsch, A microcomputer based system for small relation algebras, J. Symb. Comput. 18 (1994), 83–86. [9] Ron Fagin, Finite model theory - a personal perspective, Springer Lecture Notes in Computer Science 470 (1987), 3–24. [10] George Grätzer, Universal algebra, 2 ed., Springer, Berlin, 1979. [11] Y. Gurevich, Toward a logic tailored for computational complexity, Computation and Proof Theory, Lecture Notes in Mathematics 1104 (M. M. Richter, ed.), Springer-Verlag, 1984, pp. 175– 216. [12] Neil Immerman, Upper and lower bounds for first order expressibility, Journal of Computer and System Sciences 25 (1982), 76–98. [13] , Languages that capture complexity classes, SIAM Journal of Computing 16 (1987), 760–778. [14] Neil Immerman and Dexter Kozen, Definability with a bounded number of variables, Information and Computation 83 (1989), 121–139. [15] Bjarni Jónsson, Maximal algebras of binary relations, Contemporary Mathematics 33 (1984), 299–307. [16] , The theory of binary relations, In Andréka et al. [5], pp. 245–292. [17] Bjarni Jónsson and Alfred Tarski, Boolean algebras with operators II, Amer. J. Math. 74 (1952), 127–162. [18] Brendan McKay, Nauty user guide, Tech. Report TR-CS-90-02, Australian National University, 1990. [19] Ralph McKenzie, Representations of integral relation algebras, Michigan Mathematical Journal 17 (1970), 279–287. [20] Alfred Tarski and Steven Givant, A formalization of set theory without variables, Colloquium Publications, vol. 41, Amer. Math. Soc., Providence, 1987. [21] H. Wielandt, Finite permutation groups, Academic Press, 1964. 21