Map calculus: Initial application scenarios and experiments based on Otter

22

Transcript of Map calculus: Initial application scenarios and experiments based on Otter

F. Aureli, E. Omodeo, M. TemperiniMap calculus: Initial application scenariosand experiments based on OtterR. 499 May 1998Fabiola Aureli, Eugenio Omodeo- Universit�a di L'Aquila, Dipartimento di Matematica Pura ed Applicata,L'Aquila, Italia.Marco Temperini- Dipartimento di Informatica e Sistemistica, Universit�a di Roma \LaSapienza", Via Salaria, 113, I-00198, Roma, Italia- Istituto di Analisi dei Sistemi ed Informatica, CNR, Viale Manzoni, 30,I-00185, Roma, Italia.Work partially supported by the C.N.R. of Italy, coordinated project SETA,and by MURST 40%, \Tecniche speciali per la speci�ca, l'analisi, la veri�ca,la sintesi e la trasformazione di programmi."This is a Tech.Rep. published by Istituto di Analisi dei Sistemi ed Infor-matica, IASI-CNR, Viale Manzoni, 30, I-00185, Roma, Italia.

Abstract Properties of a few familiar structures (natural numbers, nestedlists, lattices) are formally speci�ed in Tarski-Givant's map calculus, withthe aim of bringing to light new translation techniques that may bridge thegap between �rst-order predicate calculus and the map calculus. It is alsohighlighted to what extent a state-of-the-art theorem-prover for �rst-orderlogic, namely Otter, can be exploited not only to emulate, but also to reasonabout, map calculus.

31 IntroductionEverybody remembers that Boole's Laws of thought (1854), Frege's Begri�s-schrift (1879), and the Whitehead-Russell's Principia Mathematica (1910)have been three major milestones in the development of contemporary logic (cf.[3, 8, 15, 4]). Only a few people are aware that very important pre-Principiamilestones were laid down by C.S. Peirce and E. Schr�oder and culminated inthe monumental work [11, 12] on the Algebra der Logik .The \rather capricious line of historical development" of the algebraic formof logic |the map calculus, as we will call it| that Peirce and Schr�oderhad contributed to create and which short after the appearance of the Prin-cipia fell into general oblivion, was already signaled as an anomaly by Tarskiin 1941 (cf. [13]). Even more anomalous it should be considered today, sincethe subsequent work of Tarski and others (cf. [14]) made it clear that mapcalculus had no inner weaknesses preventing it from becoming the frame foran omnicomprehensive deductive system such as set theory. The rehabilita-tion of map calculus from its disrepute (whose historical causes are skilfullyinvestigated in [2]) has reopened the opportunity, dismissed for many decades,to put together complementary virtues of the map calculus and of �rst-orderpredicate logic.This paper gives a contribution in this direction. A few scenarios of use ofTarski-Givant's map calculus are developed. Properties of familiar structures(natural numbers, nested lists, lattices) endowed with operations and relationsare formally speci�ed. Exercise of this nature, based on paper and pencil forthe time being, is aimed at bringing to light translation techniques that maye�ectively bridge the gap between �rst-order predicate calculus and the mapcalculus.It is also discussed in what way a state-of-the-art theorem-prover for �rst-order logic can be exploited to emulate, and reason about, map calculus|atleast on a temporary basis, until tools speci�cally designed for the latter comeinto existence. The speci�cation of lattice theory that will be proposed below,far from being a straightforward adaptation of any of its preexisting �rst-order formulations, will reveal particularly challenging due to limited expres-sive power of the map calculus. As is well-known, in fact, the latter languagehas the same strength (and weakness) as a �rst-order language involving threeindividual variables altogether.

42 Syntactic and semantic backgroundL� is a ground equational language where one can state properties of binaryrelations over an unspeci�ed, yet �xed, domain U of discourse. The basicingredients of this language are:� three constants: �, 1l, �;� in�nitely many map letters: p1; p2; p3; : : : (whose typographic form canwidely vary);� binary constructs \, 4, � of map intersection, map symmetric dif-ference, and map composition;� the unary construct �1 of map inversion.Map expressions are obtained through repeated use of \, 4, �, and �1,starting from the map letters pi, which can be freely interpreted as binaryrelations over U , and from the mentioned constants. Map equalities havethe form Q=R, where Q and R are map expressions.Once a nonempty U has been �xed and subsets p=1 ; p=2 ; p=3 ; : : : of U � Uhave been put in correspondence with the pis , each map expression P comesto designate a speci�c map P=, on the basis of the following evaluation rules:�= =Def ;, 1l= =Def U � U , �= =Def f[a; a] : a in Ug;(Q \R)= =Def f [a; b] 2 Q= : [a; b] 2 R= g;(Q4R)= =Def f [a; b] 2 U2 : [a; b] 2 Q= i� [a; b] =2 R= g;(Q �R)= =Def f [a; b] 2 U2 : 9 c in U for which [a; c] 2 Q= and [c; b] 2 R= g;(Q�1)= =Def f [b; a] : [a; b] 2 Q= g.Accordingly, an equality Q=R turns out to be either true or false in eachinterpretation =. One often strives to specify the collection C of interpretationsthat are of interest in some application through a set of equalities that mustbe true in every = of C. Requiring, for instance, that �=1l leads in essenceto propositional logic, because it forces U to be singleton, and hence makes ;and U2 the only possible values for each map expression P . Figures 1 and 3,to be commented later on, show more sophisticated examples.L+ is a variant version of a �rst-order dyadic predicate language: an atomicformula of L+ has either the form xQy or the form Q=R, where x; y stand forindividual variables (ranging over U) and Q;R stand for map expressions ofL�. Here propositional connectives, and existential/universal quanti�ers areemployed as usual.It is shown in [14] that in L+ the map constructs �; 1l;\;4; �;�1 ;= canbe made to dissolve into connectives and quanti�ers: this elimination (whosefeasibility was already clear in [15]) leads to a (today) far more conventional�rst-order language, where � generally takes the typographic form =. A re-

5Axioms> �Def<�1 � �Def<4 �Const( zero ) TotFun( suc )<�1l � zero 1l � zero�1l � suc< � suc�1= � � 4>= 1l< \ �=� < �<�<Lemmas<� 6> suc�<�\ 6<=� 6<=(<4 � )�1<=suc �< � suc�1 suc � zero=�Fun( suc�1 ) suc �suc � � � � suc| {z }n times ��Figure 1: Theory of natural numbers with successor function and order-ing relationsmarkable fact about the elimination technique is the following: when one ap-plies it to a sentence � of L+ involving no more than three distinct individualvariables, the resulting sentence � will also involve three or fewer variables.This is what happens, e.g., when � is an equality Q=R of L�.

63 Basic extensions of the map languageTo enrich L� and improve the readability of its map expressions, we can useseveral pieces of shorthand notation, such as:P �Def 6P �Def P 4 1l,P yQ �Def P �Q,P nQ �Def P \Q,P [Q �Def (P 4Q )4 (P \Q ),3P �Def 1l � P � 1l.Through similar rewriting rules we can extend L� in order to emulatefamiliar constructs such as inclusion and the propositional connectives :, ^,_: P�Q �Def P nQ = �,:P=Q �Def P 6=Q �Def 3 (P 4Q ) = 1l,P=Q ^ R=S �Def (P 4Q ) [ (R4 S ) = �,P=Q _ R=S �Def (P 4Q ) �1l� (R4 S ) = �.It is also possible to overcome the limitation of not having constants orfunction symbols available in L�, because these can be represented by mapsymbols P subject to the respective conditions thatP= = f[e; e]g for some e 2 U ,and thatfor all a 2 U , there is exactly one b 2 U for which [a; b] 2 P=.In the map language, these two conditions can be rendered as follows:Const(P ) �Def P � 1l � P�� ^ P 6=�,TotFun(P ) �Def P�1 � P�� ^ P � 1l=1l.This explains the �rst few axioms of Figure 1. An abbreviation of the same avor, namely Fun(P ) �Def P�1 � P��,which characterizes partial functions, is exploited in Figure 3.

74 A raw deductive apparatus for map rea-soningWe will now slightly adjust the derivability notion for L� formalized in [14]to our context. Admittedly, there will be map equalities P = 1l not deriv-able from an empty set of premisses but nonetheless valid, in the sense thatP==U2 is true in every interpretation U ;= of L�. This is due to an intrinsiclimitation: there is no way out of this lack of semantic completeness of thederivability notion for L�.We start with recording onto the following list of schemes an in�nite col-lection �� of valid map equalities, to be regarded as the logical axioms ofL�: P 4 P = Q4QP 4 (Q4 P ) = Q(R \Q )4 (R\ P ) = (P 4Q ) \RP \ P = P1l \ P = P( ? 2 f4;\; �g) (P ? Q ) ? R = P ? (Q ?R )� � P = P(P [ Q ) �R = (Q �R ) [ (P �R )P�1�1 = P(? 2 f\; �g) (P ? Q )�1 = Q�1 ? P�1(P�1 � (R \ ( (P �Q )4R ) )) \ Q = �Given a collection E of map equalities, we will denote as ��(E) the smallestcollection of map equalities which both ful�lls the inclusion�� [ E [ fP=P : P is a map expression g � ��(E)and enjoys the following closure property: When P=Q and R=S both belongto ��(E), and R occurs in Q, in P , or in both of them, then any equalityobtainable from P=Q by replacement of some occurrence of R by an occurrenceof S belongs to ��(E) too.The notation E `� Q=R is employed to indicate that Q=R belongs to��(E). We take an analogous (but semantically complete!) de�nition of `+for granted.1Notice that we have been using P;Q;R, and S, as metavariables rangingover map expressions. What would be implied by us changing perspective andregarding P;Q;R; S as individual variables (ruled by understood 8-quanti�ers1Any derivability notion for �rst-order logic can be exploited for L+, cf. e.g. [14].

8in all logical axiom schemes)? Then each scheme in �� would be regarded asa single �rst-order equality, and we would be dealing with an equational ax-iomatic �rst-order theory �RA instead of with an alternative formalism. Themodels of �RA are the structures traditionally known as relation algebras,on which [14], p.48, states: Every equation which is shown to be identicallysatis�ed in every relation algebra yields a schema of which all the particu-lar instances (obtained by substituting predicates for variables) are sentenceslogically provable in L�.This indicates that we can use an automated deduction tool conceivedfor �rst-order logic, Otter to be speci�c (cf. [10]), to experiment with L�.Although Otter cannot directly produce derivations of L�, once the equalitiesthat form �� are loaded into Otter, whatever chain of inference steps can bedrawn from them witnesses the existence of corresponding lines of reasoningin L�.One can moreover load into Otter, along with ��, a set E of map equalities,e.g. those on the left of Figure 1 (cf. [6], p.184 fol.), and derive theorems of��(E), such as those on the right of the same �gure.The very shape of the equalities in �� is the result of us having carriedout a number of experiments of this nature. Other formulations of the logicalaxioms of L� would possibly drive Otter better; anyway, the one we haveadopted above is the outcome of a series of ameliorations carried out on aninitial version, until we succeeded in getting an automatic proof of variouspropositions of [14], pp.49-50, that we had chosen as our benchmarks (cf.Figure 2).

9a. P � �=P right unit for �b. (P 4 1l )4 1l=P double complementation lawc. P 4 P=� periodicity of 4d. P 4Q=Q4 P commutativity of 4e.1. (P 4Q )4Q=Pe.2. :(P�Q ^ Q�R )_P�Rf.1. P [ Q=Q [ Pf.2. (P [Q )[ R=P [ (Q [ R )f.3. P [ Q=P \Qg. P \ Q \ P \Q=P dual of Robbins' lawh.1. (P \ Q )4 (P \ Q )=P variants of Robbins' lawh.2. (P \ (Q4R ) )4 (P \Q )=P \Ri.1. (P \Q )[ (Q \ P )=Q Huntington's lawsi.2. (P [Q )\ (Q [ P )=Qj. � � P=� ^ P � �=� ^ P 4 �=P ^ P \ �=�k. ( (P �Q )\R )=� ! ( (P�1 �R ) \Q )=� cycle lawl. ( (P�1 �R ) \Q )=� ! ( (P �Q )\R )=� cycle lawm. (P \ � )=P ! (P�1 \ � )=P ^ P�1=Pn. P�P � 1l � P:Const(P )_P��o. (8x; u; v )( (x \ u )4 v=� !(8x; u; v )( v \ (u4 1l )=� ^^9y x=v4 ( y \ ( y4 1l )) ) key for Boolean uni�cationFigure 2: Some benchmark theses, with Otter serving L� and L+

10a.1. Const( nl )a.2. at \ nl=�b.1. Fun( hd )b.2. Fun( tl )c.1. hd � 1l=tl � 1lc.2. at4 ( nl � 1l )=tl � 1ld.1. at�tl�1 � hdd.2. ( hd � hd�1 ) \ ( tl � tl�1 )��e.1. 1l � ( at n ocl )=1le.2. ocl=( ( � [ ocl ) � hd�1 ) [ ( ocl � tl�1 )f.1. ( tl [ ocl )\ �=�f.2. 3( ( at [ ( nl � 1l ) [ ( ( hd � P ) \ ( tl � P ) ) ) n P ) y P=1lFigure 3: Axioms on nested lists5 A theory of lists, within map calculusAs will be explained below, the axioms in Figure 3 describe a somewhat morechallenging scenario than the ones in Figure 1. Intuitively speaking, here thedomain U of discourse consists of entities of three separate kinds: an in�nityof atoms, nested lists constructed out of them, and an individual NL. We arenow beginning to experiment with axioms of this kind in Otter.The `nil' predicate, according to a., represents the distinguished individualNL, not to be counted among atoms. By b. and c., the `head' and `tail'predicates are partial functions de�ned for the same entities (to be regardedas the `lists') of U : the complement of their common domain consists of allatoms together with NL. Notice that, by c.2, the `is atom' predicate does nottruly depend on its second argument.The axiom d.1 states that for any given pair a; b in U with b a list orb = NL, one can �nd a list whose head is a and whose tail is b; moreover,by d.2, lists that di�er from one another cannot have the same head and thesame tail. By axiom e., for any given c in U there is an atom that does notoccur in c (as a consequence, the number of atoms will turn out to be in�niteas desired). In this connection a recursive characterization of the `occurs in'predicate applies: it can be read as \an entity occurs in a list b i� it eitherco��ncides with, or occurs in, the head of b, or it occurs in the tail of b". Bythe acyclicity requirement f.1, a c in U can neither occur within itself nor beits own tail.Last comes the somewhat intriguing axiom f.2, which is an induction prin-

11ciple for lists. When its outer map-constructs get eliminated in L+, it becomes(8 x; y )( x at y_x = NL_(9 v(x hd v ^ v P y )^ 9w(x tl w ^ wP y ) )!xP y )�! ( 8 x; y )xP y ;where P can be any map expression. One could likewise express in map-theoretic terms the induction principle of Peano arithmetic:(P [ ( suc�1 � 1l ) )\ (P [ ( suc � P ) ) 6=1l_P=1l,where the intended meaning of suc is the same as in Figure 1.6 A tough exercise in map speci�cation:lattice theoryLet us recall a de�nition from [14], p.62:De�nition. A sentence � of L+ is said to be expressible in L� if thereis a map equality � of L� for which � =j j=+ �, i.e., �= = �= in everyinterpretation U ;=.Among sentences expressible in this sense, one �nds all sentences in threevariables, de�ned as follows:De�nition. A sentence � of L+ is said to be in k variables (k a naturalnumber) if no subformula ' of � involves more than k distinct free variables.As for expressibility, [9] and [14] classify many sentences as shown below:(1) (8x; y )9w 8v( v 2 w$v = x_v = y ) Y(1a) (8x; y )(9u (x 2 u ^ y 2 u )!9w 8v( v 2 w$v = x_v = y )) N(1b) (8x; y )(9u x 2 u ^ 9 v y 2 v!9w 8v( v 2 w$v = x_v = y )) N(1c) (8x; y )( 9u x 2 u ^ 9v y 2 v!9w (8v( v 2 w$v = x_v = y ) ^ 9u w 2 u )) Y(2) (8x; y )9u 8v( v 2 u$v 2 x_v 2 y ) N(2a) (8x; y )9u 8v( v 2 u$v 2 x_v 2 y )^ 8x 9y 8v( v 2 y$v = x ) Y(3) (8x; y )9w 8u(u 2 w$u = x_u 2 y ) N (?)(3a) (8x; y )9w 8u(u 2 w$u = x_u 2 y ) ^ 9 z8x :x 2 z Y(4) (8x; y )9v 8u(x � u ^ y � u$v � u ) N(5) (8x; y )9v 8u(u � x ^ u � y$u � v ) N(4a) (8x; y )9 v(x � v ^ y � v ^ 8u(x � u ^ y � u!v � u )) N(5a) (8x; y )9 v( v � x ^ v � y ^ 8u(u � x^ u � y!u � v )) N(6) (4)^ (5)^ 8x x � x^ (8x; y; z )(x � y ^ y � z!x � z )^(8x; y )(x � y ^ y � x!x = y )^ 9x 8y x � y ^ 9 y 8x x � y NOf these, the ones in the �rst group are provable in the most varied theoriesof sets; those in the second group can be interpreted in lattice theory(which deals with the ordering relations where every �nite nonempty set ofthe domain has inf[imum] and sup[remum]). In contrast with [9], which claims

12that (3) is inexpressible, [14] says that it is not known whether or not (3) isexpressible in L�.The collection of all sentences expressible in L� was shown to be undecid-able (!) in [9].It often turns out that a sentence �, even though inexpressible when takenin isolation, becomes expressible within the context of a theory. This is to say,when one adopts a decidable collection T of sentences as axioms, it may wellbe the case that T `+ �$�, where � is in three variables (or, which amountsto the same thing, � belongs to L�).2This new, more generous, meaning of the word \expressibility", trivializesthe entire question of expressibility in strong theories, such as are numberteories (e.g. the Peano arithmetic or the additive-multiplicative theory of realnumbers) and set theories (Zermelo-Fraenkel, G�odel-Bernays, etc.). We arereferring to theories where by a sentence in three variables one can state thattwo speci�c relations |let us denote them here as ` (for \left") and r (for\right")| are conjugated quasi-projections, in the sense that� ` and r are functions (at least partial) on the domain U of discourse,� for any pair a; b of entities in U there is a c in U such that `(c) = a andr(c) = b.Indeed, there is a general technique that enables one to reduce to three thenumber of variables in any sentence � of the language of a strong theory,by suitably exploiting the map expressions that describe conjugated quasi-projections. A simple illustration of this can be found in [5], which providesas an example an L�-speci�cation of sum and product over natural numbers.We conjecture that by this technique one can formulate in L�, among others,a theory particularly relevant to computer science, namely the one of regularlanguages (already regarded as `classical' by J. H. Conway in 1971, cfr. [1]).What shall we do if a theory is not strong? Succeeding in expressing in L�its axioms, if nothing else, would itself be a grati�cation; however, the axiomsof lattice theory (cf. sentences (4a), (5a), (6) above) appear to be alreadybeyond the expressive boundaries of L�.Our goal, in the next four sections, is to encode in L� a satisfactory sur-rogate of lattice theory by resorting to a device of a semantic, rather than ofa syntactic, nature. This device consists in enlarging the domain of discourse.2[7] makes the following example: resorting to four variables may seem essentialto express the existence of four distinct entities in the domain U of discourse, butin the theory of strict total orderings <, the circumstance can be stated as follows:( 9x; y )(x < y ^ 9x( y < x ^ 9 y x < y ) ).

13The idea is simply to avoid referring to the domain D, partially ordered andequipped with in�mum and supremum operations; this will be superseded bythe domain f;g [ ffa; bg : a; b in D g, whose singletons fag can be identi�edwith the entities a in the original domain D.3 Unordered pairs are in a senseextraneous to the structure D;�; inf; sup in which we are truly interested, verymuch like singletons are replacements for the true entities of discourse; nev-ertheless, the formal properties to be stated in the following will enable oneto reason, by `metaphor', on the usual lattices. The operations inf e sup shallbe treated as unary operations, hence binary relations, over the (enlarged)domain of discourse: an essential condition, this, for their properties to beformalizable in the map calculus.The characterization of lattices will be carried out so as to get along theway weak but useful deductive contexts. The technique to be exploited can beadapted to any context where each (n + 1)-ary operation ? (like inf and sup)meets the condition?(x0; : : : ; xn) = ?(x�0 ; : : : ; x�n) for any permutation �.7 Inclusion theory, within map calculusCan one instruct a theory of inclusion which does not presuppose a morefundamental theory of membership? By performing this task, one shouldrediscover something strictly akin to Aristotle's assertory syllogistic.Let us recall, to start with, that the inclusion relation � is a partial or-dering relation: � � � � �, � \ � =�.Clearly, the former of these condition expresses the transitivity law while thelatter combines the re exivity law �� � and the antisymmetry law � \ � ��.Preliminary to introducing a counterfeit membership relation (which will,in fact, be a subrelation of inclusion), we now introduce new forms of abbreviations.4By putting5 void �Def � y�, i.e. V void �Def 8 x V � x,and snglORvoid �Def ( �[ 6� ) y void, sngl �Def void \ snglORvoid,3A domain of sets richer than this, for example the family P(D) of all subsets ofD, would also do the job. This is an idea to which we might resort in the future, inorder to cope with the theories of complete lattices, and of Boolean algebras.4Forms of abbreviation understood in what precedes have been � �Def ��1 andxPyQz �Def xPy ^ yQz.5Following Prolog, we represent by a variable that occurs only once.

14i.e. S sngl �Def :S void ^ 8 x (x � S!x = S_x void ),one easily veri�es in L� thatvoid � 1l=void y �, sngl � 1l=sngl y �;these state that the predicates `is empty' and `is singleton' do not depend ontheir second argument. The existence of a sole void is easily proved alongthe following line: if V and W are void, then either of them is included inthe other, hence the two are equal, thanks to antisymmetry. (Of course thisargument cannot be mimicked directly in L� where variables for V;W aremissing.)Here follows the de�nition of 2 that we set up:2 �Def sngl\ �, i.e. S 2 X �Def S sngl ^ S � X .The addition of the following extensionality axiom appears to be manda-tory: � y =2 � �, i.e. 8w(w 2 X!w � Y )!X � Y .One easily sees (at least in �rst-order logic) that if the entities belonging toX and to Y are the same (i.e. 8w (w 2 X$w 2 Y )), then X and Y are,by antisymmetry, equal; analogously, if X and Y include the same entities(i.e. 8w (w � X$w � Y )), then extensionality and antisymmetry, takentogether, force them to be equal.It seems convenient to end by postulating the existence of void:void 6= �, i.e. 9 v 8 y v � y.Analogously we could |but we refrain from this| add postulates like� y� 6= � (i.e. 9 t 8 y y � t);however this assumption that an omnicomprehensive set exists, or similar ones(e.g., assuming that the family of sets to be dealt with enjoys particular closureproperties), would be out of scale w.r.t. the limited goals of the present work.68 Selectors and choice functions, within mapcalculusWe say that � is a selector if it enjoys the following properties:�� � \ snglORvoid, i.e. X�Y!X � Y ^ (8 v � X )( v = X_v void ).We then say that a selector is global whenvoid���1 � 1l and moreover void \ ��void�1,6On the other hand, something like the following union postulate might turn outuseful in order to move from lattice theory to the theory of complete lattices:� � � =1l, i.e. 9u(X � u ^ Y � u).

15�i � 2 [( void \ void�1 ) ; i.e.,Y �iX ! Y 2 X_(Y void ^X void ) ;�i � ��1i � � ; i.e.,Y �iX ^ Z�iX ! Z = Y ;� � ��1i � �i ; i.e.,9 x x�iY ;1l � ( �i \ �i+1 ) = � y ( =2 [�1 [ � � � [ �i ) ; i.e.,9 y( y�iX ^ y�i+1X ) $ 8 y( y =2 X_y�1X_ � � �_y�iX ) :Figure 4: Properties of global choice functions �1; �2; �3; : : :i.e. :Y void !9 x x�Y ^ (8 x�Y ):x void :An example of global selector is membership. In a sense this is the great-est of all global selectors �, each one of which is in fact bound to ful�ll thecondition �� 2 [( void \ void�1 ).To switch to the opposite extreme, let us consider the global selectors that arein a sense minimal: these are the so-called global choice functions. Anysuch � is characterized by� being a global selector;� being a function in its second argument, and, as such� being total (for this, it su�ces to require that void \ void�1��).One easily sees what is the task of � (cf. Figure 4), namely to extract fromany nonempty set one and only one singleton contained in it|furthermore,for the sake of de�niteness, we want that � associates to the empty set theempty set itself.In order to base a lattice theory on L�, we need two global choice func-tions, �1 and �2, (for our purposes what really counts is that they be de�nedfor all sets with one or two members; however, while singletons have been char-acterized already, pairs will be de�ned just through �1 and �2). In additionto being global choice functions, �1 and �2 shall disagree whenever possible.Disagreement postulate:�1 \ �2��, i.e. Y �1X ^ Y �2X!X = Y .If we were to treat more than two global choice functions |which wouldbe useless here, as we need to consider sets with two members at most|, thedisagreement postulate would take the form shown at the bottom of Figure 4.

169 Unordered pair theory, within map cal-culusWith the conceptual devices made ready so far, we can instruct a theory ofunordered pairs. To the postulates on inclusion we add the following pairingpostulate: sngl \ sngl�1��1 � ��12 [ �2 � ��11 ,i.e. X sngl ^ Y sngl !9w( (X �1 w ^ Y �2 w )_(X �2 w ^ Y �1 w ) ).(With this, ��11 and ��12 come close to being conjugated quasi-projections,relative to the subdomain of U made of all singletons.)A set devoid of members, or with only one or two, can be characterized asfollows in the theory of inclusion enriched with the axioms already seen about�1 and �2: dbl �Def ( 6� [� ) y ( void [ �1 [ �2 )i.e. W dblX �Def 8 z( z � W 6= z!z void _z �1X_z �2X ).At this point we add a weak postulate of union, which regards singletons:�1 \ void� � � ( ( � � �2 ) \ dbl ),i.e. L �1X ^ :L void !(9w; u )(L � w dblX ^ w � u �2 X ).

1710 Lattice theory: an inexpressible out- ankedIn sight of a theory of lattices, we introduce now the predicate letters inf andsup, for which we demand in the �rst place that� they be (partial) functions in their second argument:inf � inf�1��, sup � sup�1��;� they have in their domain all singletons and pairs:dbl n void�( inf�1sup�1 ) � 1l, i.e. :X void ^X dbl !9 y y( infsup )X ;� every image of theirs be a singleton:inf [ sup�sngl, i.e. Y inf X_Y sup X!Y sngl ;� they disagree with each other: inf \ sup��.Nothing very engaging so far: we could take inf and sup to be �1n void and�2 n void. However, here we arrive at the partial ordering relation of a lattice:��Def ( 2 \ inf ) � ( 2 \ sup )�1,i.e. X � Y �Def 9 u (X 2 u 3 Y ^X inf u sup�1 Y ).We impose on this relation the partial ordering laws, which we state in thefollowing form: � � � � �, � \ � =sngl \ �.(Therefore X sngl !X � X , whence, by exploiting the de�nition of � andthe disagreement between inf and sup, we will obtain thatX sngl !X inf X supX ,to wit that sngl \ ��inf \ sup,i.e.: \every singleton is a �xpoint of both inf and sup".)We conclude with more intricate conditions on inf and sup, which are theones of monotonicity and of min-/max-imality. Let us begin with theformer two:X � Y ^ L inf X ^M inf Y ^ L 6= M!(8w; u )(w dbl u ^ L 2 w 3M!M inf w ),which is to say� \ ( inf � � � inf�1 )�( =2 [ inf ) y ( ( dbl y � )[ 63 ),and an analogous condition on sup. From these one gets that the inf of a set isa lower bound for its members (inf � 3 � �), while its sup is an upper bound.As for the latter two conditions, one is:( � y =2 ) � inf�1� �, i.e. Y inf W ^ ( 8 z 2 W )X � z!X � Y .

18 8./1. � �Def ��1� �Def ��12. 6� �Def �6� �Def �3. void �Def � y�snglORvoid �Def ( �[ 6� ) y void4. sngl �Def snglORvoid n void5. 2 �Def sngl\ �3 �Def 2�16. =2 �Def 263 �Def 37. dbl �Def ( 6� [� ) y ( void [ �1 [ �2 )� �Def ( 2 \ inf ) � ( 2 \ sup )�1Figure 5: derived map letters.This states that when the operation inf is applied to a pair or singleton W ,or when it anyway associates a result to W , it produces the greatest lowerbound of the members of W as it should. Analogously one characterizes theminimality of the upper bound produced by sup.Let us now put together the various pieces of lattice theory developed sofar. The map letters that we are regarding as primitive are �, �1, �2, inf ,sup; the derived ones are introduced via the abbreviations of Figure 5.In Figure 6 we show the axioms, through which we have meant to char-acterize the lattice structure. In the �gure, � stands in turn for �1 and for�2.11 ConclusionsFirst-order predicate logic undoubtedly deserves the primacy, with respect tothe map calculus, of user-friendliness and expressive manageability. There are,however, good reasons to expect that the map calculus may perform better inthe role of basic machine-reasoning layer. This expectation deserves, in ouropinion, a serious and twofold experimentation e�ort. On the one hand, itcalls for

19a. � � � � �� \ � = �b. 63 y � � �void 6= �c. � � � \ snglORvoidd. void � ��1 � 1lvoid \ � � void�1e. � � ��1 � �void \ void�1 � �f. �1 \ �2 � �g. sngl \ sngl�1 � �1 � ��12 [ �2 � ��11� �( ( � ��2 ) \ dbl ) � �1 \ voidh. inf � inf�1 � �sup � sup�1 � �i. dbl n void � inf�1 � 1ldbl n void � sup�1 � 1lj. inf [ sup � snglinf \ sup � �k. � � � � �� \ � = sngl \ �l. � \ ( inf � � � inf�1 ) � ( =2 [ inf ) y ( ( dbl y � )[ 63 )� \ ( sup � � � sup�1 ) � ( =2 [ sup ) y ( ( dbl y � )[ 63 )m. ( � y =2 ) � inf�1 � �sup � ( 63 y � ) � �Figure 6: lattice theory

20� development of e�ective theorem-proving techniques directly rooted on themap calculus; on the other hand, it requires� sophisticated techniques for translating sentences |or even entire sets ofaxioms| from �rst-order logic into the map language.In essence the latter techniques (of which an example can be found in [5]) areto translate formal speci�cations, phrased in �rst-order logic as is nowadaysmore common, into a specialized area of algebra. How complex this translationtask can be in a concrete situation, can be fully grasped through the latticescenario|and to a lesser extent also through the other examples in this paper.It is a stimulating fact of mathematics that one cannot decide the preciseextent to which this translation of logic into algebra is possible (cf. [9]); as aconsequence, this is an issue to be tackled pragmatically and conservatively.Powerful ideas have emerged from a protracted stream of research initiatedin the fourties and �nally blossomed in the Tarski-Givant monograph, whichindicates how any theory regarding either sets or arithmetics can be phrasedin map-theoretic terms. We aim at converting these ideas into tools inside aplatform for computational logic.Evidently, a good �rst-order theorem prover such as Otter, or simply a the-orem prover for pure equational logic, provides adequate support to symbolicmanipulations in the map calculus. Even more importantly, the �rst-orderpredicate formalism o�ers a basis for schematizing meta-theorems of the mapcalculus, as well as for proving them. In some cases, it enables one to compressinto a single quanti�ed sentence an in�nite axiom scheme of a theory basedon map calculus (to stress this fact, we have printed in boldface an inductionprinciple referring to lists in Figure 3). Even though we are eagerly followingthis approach in order to play, and experiment with, speci�cations written inthe map language, we have in mind to invert the approach in the long run.We believe that the map calculus deserves |and sorely lacks, to date| an au-tonomous and e�ective instrumentation, to be put to the service of �rst-orderreasoning, and of automated reasoning in general.AcknowledgementsWe are indebted to IASI (Istituto di Analisi dei Sistemi ed Informatica, CNR)for promoting exchanges of ideas between authors, to Vuokko-Helena Caseirofor careful revision of the manuscript, to Paul Broome for �rst bringing [14] toour attention during the ICLP conference held in Budapest in 1993, to EmidioSilvestri for paving the way to this research with a Prolog implementation of alogic-to-mapalgebra translator, to Domenico Cantone and Alessandra Cavarra

21for very pleasant summer conversations which led to discoveries on how toimprove the translator.References[1] L. Aceto, W. J. Fokkink, and A. Ing�olfsd�ottir. On a question of A.Salomaa: The equational theory of regular expressions over a singletonalphabet is not �nitely based. Technical Report BRICS report series,Dept. of Computer Science, University of Aarhus, Denmark, 1996.[2] I. H. Anellis and N. R. Houser. Nineteenth century roots of algebraiclogic and universal algebra. In H. Andr�eka, J. D. Monk, and I. N�emeti,editors, Algebraic Logic, volume 54 of Colloquia Mathematica societatisJ�anos Bolyai, pages 1{36. North-Holland Publishing Co., 1991.[3] I. M. Boche�nski. A history of formal logic. Chelsea, 1970. Thomas, I.editor and translator.[4] G. Boole. An investigation of the laws of thought on which are foundedthe mathematical theories of logic and probabilities. Dover books inAdvanced Mathematics. 1854.[5] D. Cantone, A. Cavarra, and E. G. Omodeo. On existentially quan-ti�ed conjunctions of atomic formulae of L+. In M. P. Bonacina andU. Furbach, editors, Proceedings of the FTP97 International workshopon �rst-order theorem proving, pages 45{52, 1997. RISC-Linz ReportSeries No.97-50.[6] H. B. Enderton. A Mathematical Introduction to Logic. Academic Press,New York and London, 1972.[7] E. Gr�adel, Ph. G. Kolaitis, and M. Y. Vardi. On the decision problemfor two-variable �rst-order logic. Technical report, 1997.[8] J. van Heijenoort. From Frege to G�odel - A source book in mathematicallogic, 1879{1931. Source books in the history of the sciences. HarvardUniversity Press, 3rd printing edition, 1977.[9] M. K. Kwatinetz. Problems of expressibility in �nite languages. PhDthesis, University of California, Berkeley, 1981.

22[10] W. W. McCune. Otter 3.0 Reference manual and guide. Technical Re-port ANL-94/6, Argonne National Laboratory, 1994. (Revision A, august1995).[11] E. Schr�oder. Vorlesungen �uber die Algebra der Logik (exakte Logik), vol-ume 2, part 1. B. Teubner, Leipzig, 1891. [Reprinted by Chelsea Pub-lishing Co., New York, 1966.].[12] E. Schr�oder. Vorlesungen �uber die Algebra der Logik (exakte Logik), vol-ume 3, Algebra und Logik der Relative, part 1. B. Teubner, Leipzig,1895. [Reprinted by Chelsea Publishing Co., New York, 1966.].[13] A. Tarski. On the calculus of relations. Journal of Symbolic Logic,6(3):73{89, 1941.[14] A. Tarski and S. Givant. A formalization of Set Theory without variables,volume 41 of Colloquium Publications. American Mathematical Society,1987.[15] A. N. Whitehead and B. Russell. Principia Mathematica. CambridgeUniversity Press, 1910. Reprinted 1980.