Ildik´oSain Istv´anN´emeti

FORK IN USUAL AND IN NON-WELL-FOUNDED SET THEORIES1 PART I

Due to their high expressive power and applicability in computer sci- ence, fork algebras have intensively been studied lately. In particular, they have been fruitfully applied e.g. in the theory of programming (specifica- tion, semantics etc.). The literature of fork algebras has been alive and active for at least five years by now. Some references are: [34], [35], [18], [36], [10], [11], [14], [8], [9], [15], [16] and [17]. Analogously to the situation with Boolean algebras, groups, semi- groups, polyadic algebras etc., it is considered desirable to develop a rep- resentation theory for fork algebras, too (cf. e.g. [14, [10]). This would consist of • defining a “concrete” class of, say, “set (or proper) fork algebras” (analogously to Boolean set algebras, transformation semigroups, polyadic set algebras), and • an axiomatic class FA, defined by finitely many equations (or perhaps quasi-equations), of “abstract fork algebras”; and then • a “representation” theorem stating that every member of FA is iso- morphic to a set fork . Here, among others, we look at various possible choices for the con- crete class that could play the rˆoleof set or proper fork algebras in such a representation theorem. Some of the candidate classes for this rˆolewere investigated in [26], [29], [23]. In [26], [29] and [23], the following results were proved in usual (ZFC). The equational theory Eq(TPA) of True Pairing Algebras (TPA’s) and the equational theory Eq(SFA) of Proper (or Set) Fork Alge- 1 bras (SFA’s) are not recursively enumerable, moreover, they both are Π1- hard. The Axiom of Foundation was mentioned in the proofs. Therefore,

1Research supported by Hungarian National Foundation for scientific research grants No’s T16448, T7567, F17452.

158 the question comes up that, perhaps, in some of the currently investigated non-well-founded set theories, these classes of algebras might show a better behaviour. We will look into this question below. Most of the theorems below are true in usual set theory as well as in most of the set theories without the Axiom of Foundation proposed so far in the literature.2 Throughout, ZF denotes the usual Zermelo-Fraenkel set theory, ZFC denotes ZF plus the Axiom of Choice. ZFC− denotes the set theory ob- tained from ZFC by dropping the Axiom of Foundation. We use the nota- tion ZF− analogously. To unify the various non-well-founded set theories, Aczel [1, section 4 “Variants. . . ”, p.41] introduces the flexible axiom AFA∼, where the equivalence ∼ is a parameter of the axiom. For various choices of ∼, we obtain different set theories, e.g., Scott’s non-well-founded set theory, the basic variant AFA of [1] etc. For all choices of ∼ per- mitted in [1], our theorems labelled by “without Foundation” remain true for ZFC−+AFA∼ (and also for ZFC). Summing up, we use the following convention. Convention 0.1. Our theorems below marked as “ (without Founda- tion)” (after the number of the theorem) are true in both usual set theory (ZFC) and in the non-well-founded set theories found in [7] or in [1, section 1–4]. We will also attempt a thorough search for the right choice of the notion of concrete (or proper) fork algebra (such that it could support a convincing representation theory). In sections 3, 4 we will compare and study the various candidates, with an emphasis on the competing ones available in the literature.

1. Proper Fork Algebras On binary relations, say R and S, there are the well known set theoretic operations, e.g. R ∪ S, R ∩ S,..., R ◦ S (relation composition), R−1 (converse or inverse), Id (the identity relation). From the above mentioned five-year old literature of Fork Algebras, in Definition 1.2 (ii) below, we recall a new binary set theoretic operation 5 , called “fork”, defined on binary relations. So, R 5 S is a new derived from R and S.

2In passing we note that, by Andr´eka-Kurucz-N´emeti[5], Birkhoff’s celebrated char- acterization of equational hulls depends on the Axiom of Foundation.

159 Notation 1.1. hx, yi is the usual set theoretic of x and y. That is, hx, yi = {{x}, {x, y}}. For any set X, P(X) denotes the powerset (set of all subsets) of X. 2 Definition 1.2. (i) By a Set Relation Algebra (SRA for short) we understand an algebra A = hA, ∪, ∩, −, ∅,U × U, ◦, −1, Idi, where U is a set, A ⊆ P(U × U), hA, ∪, ∩, −, ∅,U × Ui is a Boolean set algebra with greatest element U × U, Id = {ha, ai : a ∈ U}, and ◦, −1 are the usual set theoretic operations of composition and converse (or inverse) of relations. (R ◦ S = {hx, yi : xRz & zRy for some z ∈ U}, R−1 = {hx, yi : hy, xi ∈ R} for any R,S ⊆ U × U.) The constant symbols 0, 1 denote the elements ∅ and U × U, respec- tively. (ii) Let R and S be binary relations. Then R 5 S is a new binary relation defined as follows. def R 5 S = {hx, hy, zii : xRy & xSz}. We call 5 the fork operation. (iii) A is called a Set (or Proper) Fork Algebra (an SFA) iff A = hB, 5 i, where B is an SRA closed under 5 , and the operation 5 of A is as defined in (ii) above. 2

Throughout, RA abbreviates the expression “relation algebra” and FA abbreviates “fork algebra”. (So we might write “A is a set RA” or “set FA” etc.) For a class K of algebras, I K, S K, P K and H K denote, respectively, isomorphic copies, subalgebras, isomorphic copies of direct products and homomorphic images of members of K. Remark 1.3. There are two ways of defining set RA’s. In one of the cases we require the greatest element 1A of a set RA A to be a square U × U, while in the other case, 1A is required to be an E ⊆ U × U only. Let us call the second class (with 1A = E) the class of generalized set RA’s (GSRA’s). 2 Theorem 1.3.1. (Tarski) (i) GSRA’s form an equational class, while SRA’s are the subdirectly irreducible members of this class. Therefore (by Birkhoff’s theorem): (ii) I GSRA = SP SRA.

160 The definition of GSFA is obtained from that of SFA in a completely analogous way (that is, requiring only 1A = E etc.). Proposition 1.3.2. I GSFA = SP SFA. For various reasons, it is GSRA and GSFA that we are interested in, cf. e.g. [19]. In particular, the classes RRA of representable RA’s and def RFA of representable fork algebras are defined by RRA = I GSRA and def RFA = I GSFA . Instead of introducing GSRA and GSFA directly (and then investigat- ing them), we introduced here SRA and SFA, and will investigate SP SRA and SP SFA. By Proposition 1.3.2 and Theorem 1.3.1 above, this will have the same effect (as if we introduced the “GS-versions” and investigated them). Remark 1.4. Some of the fork algebra papers (e.g. [10]) use free grupoids in defining SFA (instead of explicitly using set theoretic pairing). This makes no difference because of the following. It is known from algebra that every free grupoid G is isomorphic to a free grupoid U = hU, +i such that U × U ⊆ U and (∀x, y ∈ U)(x + y) = hx, yi, cf. e.g. [19, Part I, pp. 129– 131] or [22, p.226, p.228, p.231]. Therefore the two definitions of SFA are equivalent (in usual set theories3 ). We will discuss these grupoid versions of SFA in section 3. Instead of free grupoids, some other papers (e.g. [35]) use free semigroups for defining 5 . We will discuss this version of SFA’s in section 4. 2 In Theorems 1.7–1.10 below we will see that the class I SFA of alge- bras isomorphic to SFA’s is not axiomatizable; that the equational theory Eq(SFA) of SFA’s is not finitely axiomatizable; and that there are further negative results in this line. Proposition 1.5. Assume ZF set theory is consistent. Then (i)–(iv) below hold. (i) In ZFC−, or in ZFC, it is not provable that Eq(SFA) would be re- cursively enumerable, hence no decidable (in particular, no finite) axiomatization can be proved complete (and sound) for Eq(SFA).

3 In non-well-founded set theories the groupoid version gives us a smaller class SFAG ⊂ SFA which is even less axiomatizable than SFA. E.g., all our negative theorems proved in ZFC about SFA carry over trivially to SFAG in all set theories in which G¨odel’s Incompleteness Theorem holds (e.g. in ZF−), cf. section 3.

161 (ii) Statement (i) remains true for the quasi-equational theory as well as for the first order theory of SFA. (iii) In ZFC−, or in ZFC, it is not provable that I SFA would be axiomatiz- able (or even pseudo-axiomatizable) by any set of first order formulas.

Proof. This is an easy consequence of results in [29] or [23]. Remark 1.6. The concepts of finiteness, computability and recursive enumerability admit satisfactory definitions in ZF−. We are using these definitions in the present paper. 2 Let us investigate whether Proposition 1.5 above forces us to give up all hope for obtaining positive results using the idea of permitting non- well-founded sets outlined in the introduction. To obtain positive results, perhaps it is not enough to throw away the Axiom of Foundation. Perhaps we have to add new axioms to ZFC− designed for helping us in working with non-well-founded sets. Fortunately, there is an extensive literature of set theories based on such axioms (cf. e.g. [1], [7]). Below we will use Convention 0.1 to formulate our theorems in the frameworks of these non- well-founded set theories. Theorem 1.7. (without Foundation) The class I SFA of isomorphic copies of Proper Fork Algebras is not axiomatizable by any set of first order sentences. Remark 1.8. Theorem 1.7 above remains true in the set theory denoted − by (ZF +AFA2) in [1]. We do not even need the Collection Principle as an axiom of ZF−(which is used as an axiom of ZF in [1] but not in Kuhnen’s, Levy’s or Jech’s books on set theory). 2 Theorem 1.9. (without Foundation) (i) The quasi-equational theory of the class SFA is not finitely axiomati- zable. (ii) The equational theory Eq(SFA) of the class SFA is not finitely axiom- atizable. (iii) The set of universally quantified formulas valid in the class SFA is not finitely axiomatizable either.

Theorem 1.10. Theorems 1.7 and 1.9 remain true in ZF set theory.

162 We note that, by Convention 0.1, Theorems 1.7, 1.9 already stated the ZFC-versions of Theorem 1.10 (what is new in the latter is that ZF is enough).

Our next theorem expresses that the equational theory of SFA is very far from being computable. Recall from Recursion Theory that the computational complexity of 1 1 a Π1-complete class is the same as that of the set of all Π1-formulas valid 1 in the standard model of arithmetic. Thus a Π1-complete class cannot be described by constructive tools.

Theorem 1.11. ([23, Thm. 1], [29, Thm. 0]; in ZFC) The equational 1 theory Eq(SFA) of SFA is Π1-complete. Corollary 1.12. ([26, Thm. 25.1]; in ZFC) Eq(SFA) is not recursively enumerable.

Motivated by [33], next we define a class SPA of algebras whose RA- reduct is a subclass of the class QRA4 investigated in [33]. Our SPA’s are those QRA’s whose projection functions p, q are the standard set theoretic ones. SPA’s were called “strongly quasi-projective RA’s” and also “standard projection models” in [24, Def. 16, pp.74–75]; they were called RRA’s with standard projections in [4, p. 426]; cf. also “conjugated projections over ordered pairs” in [33, above 4.1 (iv) p. 96]. In [33, p. 96], SPA’s (in different form) are mentioned as a familiar example for QRA’s.

Definition 1.13. A is called a Set Projection Algebra (an SPA) iff A = hB, p, qi where B is an SRA with greatest element U × U, and def def p = {hhx, yi, xi : x, y ∈ U} and q = {hhx, yi, yi : x, y ∈ U} are distinguished constants of A. (The constants p and q are the standard projections.) 2

Theorem 1.14. (in ZF−, hence also without Foundation) SFA and SPA are term-definitionally equivalent.

Proof. By the definitions of 5 , p, q, we have R 5 S = (R ◦ p−1) ∩ (S ◦ q−1) . Further, it is easy to see that p = (Id 5 1)−1 and q = (1 5 Id)−1 .

4Quasi-projective Relation Algebras.

163 Corollary 1.15. Theorems 1.7–1.11 and Corollary 1.12 above are true for SPA’s in place of SFA’s. Theorem 1.16. (without Foundation, and even in ZFC−) Let K ⊆ SFA or K ⊆ SPA. Assume hP(U × U), ...i ∈ K for some set U with |U| > 1. Then Theorems 1.7, 1.9 are true for K in place of SFA. We will return to SFA’s, SPA’s and related classes investigated in the literature after section 2 below. Theorem 1.17. (i) It is independent of ZF− set theory whether the equational theory of SFA’s is axiomatizable by a recursively enumerable set of axioms. (ii) It is independent of ZF− whether I SFA is a finitely axiomatizable variety.

2. Nonstandard Fork Algebras

Definition 2.1. (i) A is called a Nonstandard Fork Algebra (NFA)5 iff there are a set U and an injective f : U × U >−→ U such that A = hB, 5f i, where B is an SRA with greatest element U ×U, and for any R,S ∈ B, R 5f S = {hx, f(y, z)i : xRy & xSz} is also in B. (ii) The structure hU, fi is called the pairing structure of A. 2

Fact 2.2. (i) The RA-reduct of any NFA is a QRA (in the sense of Tarski-Givant [33]). (ii) The QRA’s which are reducts of NFA’s can be axiomatized by adding the equation (p; p−1) ∩ (q; q−1) ≤ Id to the axioms defining QRA in [33].

The fact that I NFA is finitely axiomatizable was essentially proved by Tarski. Namely, this fact is an immediate corollary of one of the central results of obtained by Tarski around 1950, cf. [17]. Tarski’s

5The use of the expression “Nonstandard Fork Algebra” for this kind of algebras was suggested during the Fork Algebra Discussion evening at the Dagstuhl seminar [13].

164 just mentioned result and the theory built on it are among the main topics of the book [33]. Corollary 2.3. [Tarski 1953] (i) The class I NFA of the isomorphic copies of NFA is a finitely axiom- atizable class. (ii) SP NFA is a finitely axiomatizable variety.

[17] contains a carefully detailed documentation of the situation. Here we only refer to Theorem 1.14 above, [33, items (i)–(iii) of section 8.4 on p.242], [31, p. 604, Theorem (VII)] and [4, section 7 and Lemma 8.1]. NFA is thoroughly investigated in [33], in a term-definitionally equivalent form. This equivalence can be proved completely the same way as our Theorem 1.14. All this is explained in great detail in [17]. We note that, as it is recalled and discussed in [33], a streamlined, purely algebraic proof for Corollary 2.3 was given in [20]. There is a certain property of NFA’s that is sometimes called “express- ibility of first order logic (FOL) in the equational theory Eq(NFA) of NFA”. This property was essentially proved to hold by Tarski around 1950, see e.g. [33, footnote on p. 242] and [31] (namely, he proved it for QRA, and the RA-reduct of every NFA is obviously a QRA).6 As indicated by Theorem 1.14, Corollary 2.3, the arguments both below Corollary 2.3 and in [17], and Theorems 2.10 and 2.11 in Part II, there is a great wealth of material in [33] (and related works) from which research on NFA (and its applications) could benefit greatly. We note that the theory developed and carefully presented in [33] was continued e.g. [4], [21] and [24].

6Here we do not want to commit ourselves on the question whether calling this property “expressibility of FOL” is justified. L. Henkin and others expressed certain reservations and problems in this connection, cf. e.g. [26] and [30]. Certainly, Tarski proved this property, but he or Tarski-Givant [33] did not call it “expressibility of FOL”. Instead, they spoke about expressibility of certain strong enough first order theories (cf. e.g. [33], [32]).

165 References

[1] P. Aczel, Non-well-founded Sets, CSLI Lecture Notes 14, 1988. [2] H. Andr´eka, S. Givant and I. N´emeti, Decision Problems for Equa- tional Theories of Relation Algebras, Bulletin of the Section of Logic 23/2, (1994), pp. 47–52. [3] H. Andr´eka, S. Givant and I. N´emeti, Decision Problems for Va- rieties of Relation Algebras, (1994), submitted. [4] H. Andr´eka, B. J´onssonand I. N´emeti, Free Algebras in Discrim- inator Varieties, Algebra Universalis 28 (1991), pp. 401–447. [5] H. Andr´eka, A.´ Kurucz and I. N´emeti, Connections between ax- ioms of set theory and basic theorems of universal algebra, Journal of Symbolic Logic 59/3 (1994), pp. 912–922. [6] H. Andr´eka, J. D. Monk and I. N´emeti(editors), Algebraic Logic (Proc. Conf. Budapest 1988), Colloq. Math. Soc. J. Bolyai 54 (1991), North–Holland, Amsterdam, [7] J. Barwise and J. Etchemendy, The Liar, Oxford University Press (1989). [8] G. A. Baum, M. F. Fr´ıas,A. M. Haeberer and P. E. M. L´opez, From Specifications to Programs: a Fork Algebraic Approach to Bridge the Gap, Pontif´ıciaUniversidade Cat´olicodo Rio de Janeiro, 1994. [9] G. A. Baum, M. F. Fr´ıas,A. M. Haeberer, A. M. and P. E. M. L´opez, From specifications to programs: a fork algebraic approach to bridge the gap, Document 731-HKO-4, 47th Meeting of the IFIP Working 2.1 “Algorithmic Languages and Calculi”; Hong Kong, January 1995. [10] G. A. Baum, A. M. Haeberer and P. A. S. Veloso, On the Rep- resentability of the 5-Abstract , IGPL Newsletter 1/3 (1992), European Foundation of Logic, Language and Information, Interest Group on Programming Logic, pp. 3–4. [11] R. Berghammer, A. M. Haeberer, A. M. Schmidt and P. A. S. Veloso, Comparing Two Different Approaches to Products in Abstract Relation Algebras, Algebraic Methodology and Software Technology (AMAST’93), Springer–Verlag, London, Workshops in Computing, 1993. [12] B. Bir´o, Non-finite-axiomatizability results in algebraic logic, J. of Symbolic Logic, 75/2 (1992), pp. 832–843. [13] C. Brink and G. Schmidt (organizers), Relational Methods in Computer Science, Dagstuhl Seminar 9403, Jan. 17–21, 1994.

166 [14] M. Fr´ıas,G. A. Baum, A. M. Haeberer and P. Veloso, A Repre- sentation Theorem for Fork Algebras, Universidad de Buenos Aires, Dept. de Compuyaci´on,(1993). [15] M. F. Fr´ıasand N. G. Aguayo, Natural specifications vs. abstract specifications. A relational approach, Proceedings of SOFSEM’94, Milovy, Czech Republic, Nov. 1994. [16] M. F. Fr´ıas,N. G. Aguayo and B. Novak, Development of graph algorithms with fork algebras, Proceedings of the XIX Latinamerican Conference on Informatics, (1993), pp. 529–554. [17] V. Gyuris, A Short Proof for Representability of Fork Algebras, Bulletin of IGPL (1995). To appear. [18] A. M. Haeberer and P. A. S. Veloso, Partial Relations for Pro- gram Derivation: Adequacy, Inevitability and Expressiveness, Construct- ing programs from specifications, Proc. of the IFIP TC2 Working Conference on Constructing Programs from Specifications, N.H., IFIP WG 2.1, Bernhard M¨oller(1991), pp. 319–371. [19] L. Henkin, J. D. Monk and A. Tarski, Cylindric Algebras Parts I and II, North-Holland, Amsterdam, 1971 and 1985. [20] R. D. Maddux, Sufficient conditions for representability of rela- tion algebras, Algebra Universalis 8 (1978), pp. 162–172. [21] R. D. Maddux, Finitary Algebraic Logic Part II, Quarterly 39 (1993), pp. 566–569. [22] R. N. McKenzie, G. F. McNulty and W. F. Taylor, Algebras, Lattices, Varieties, Vol I, The Wadsworth and Brooks/Cole Mathemat- ics Series, Monterey, California, 1987. [23] Sz. Mikul´as,I. Sain and A. Simon, Complexity of Equational Theory of Relational Algebras with Projection Elements, Bulletin of the Section of Logic 21/3 (1992), pp. 103–111. [24] I. N´emeti, Free Algebras and Decidability in Algebraic Logic, Dissertation for D.Sc. with Hung. Academy of Sciences, Budapest, 1986, In Hungarian. [25] I. N´emeti, Algebraization of quantifier logics, an introductory overview, Studia Logica 50, No 3/4 (1991), pp. 485–570. [26] I. Sain, On the Search for a Finitizable Algebraization of First Order Logic (Shortened Version A), Math. Inst. Hungar. Acad. Sci., 1988. [27] I. Sain, On the Problem of Finitizing First Order Logic and its Algebraic Counterpart (A Survey of Results and Methods), Logic Collo-

167 quium’92 (Proc. Veszpr´em,Hungary, 1992), CSLI Publications, 1995. To appear. [28] I. Sain and V. Gyuris, Finite Schematizable Algebraic Logic, Math. Inst. Hungar. Acad. Sci., 1995. [29] I. Sain and A. Simon, The Complexity of Equational The- ory of Relational Algebras with Projection Elements, Math. Inst. Hungar. Acad. Sci., 1991. [30] A. Simon, What the finitization problem is not, Algebraic Meth- ods in Logic and in Computer Science (Proceedings of the ’91 Banach Semester, Banach Center), Polish Academic Publishers, Banach Center Publications, Volume 28, Warsaw, 1993”, pp. 95–116. [31] A. Tarski, Some Metalogical Results Concerning the Calculus of Relations, Originally appeared in The Journal of Symbolic Logic 18 (1953), pp. 188–189, pp. 603–604. [32] A. Tarski, Collected Papers 1–4. Editors: Steven R. Givant and Ralph N. McKenzie, Birkh¨auser(Basel–Boston–Stuttgart), 1986. [33] A. Tarski and S. Givant, A Formalization of Set Theory Without Variables, AMS Colloquium Publications, 41, Providence, Rhode Island, 1987. [34] P. A. S. Veloso and A. M. Haeberer, A Finitary Relational Algebra for Classical First-order Logic, Bulletin of the Section of Logic 20/2 (1991), pp. 52–62. [35] P. A. S. Veloso and A. M. Haeberer, A New Algebra of First- order Logic, Methodology and Philosophy of Science, 1991, 9th In- ternational Congress on Logic, Upsala, Sweden. [36] P. A. S. Veloso, A. M. Haeberer and G. A. Baum, Formal Program Construction within an Extended Calculus of Binary Relations, MCC, 19, 1992, submitted to Journal of Symbolic Computation.

Mathematical Institute of the Hungarian Academy of Sciences Budapest, Pf. 127 H–1364, Hungary e-mail: [email protected], [email protected]

168