EXPRESSIVE COMPLETENESS OF TEMPORAL LOGIC OF TREES

Report 35 Downloads 153 Views
Journal of Applied Non{Classical Logics Vol. 2 { no 2, pp.157 { 180, Hermes, Paris (1992)

EXPRESSIVE COMPLETENESS OF TEMPORAL LOGIC OF TREES BERND{HOLGER SCHLINGLOFF Institut fur Informatik der Technischen Universitat Munchen Orleansstr. 34, D|81667 Munchen, Germany Many temporal and modal logic languages can be regarded as subsets of rst order logic, i.e. the semantics of a temporal logic formula is given as a rst order condition on points of the underlying models (Kripke structures). Often the set of possible models is restricted to models which are trees. A temporal logic language is ( rst order) expressively complete, if for every rst order condition for a node of a tree there exists an equivalent temporal formula which expresses the same condition. In this paper expressive completeness of the temporal logic language with the set of operators U (until), S (since), and Xk (k{next) is proved, and the result is extended to various other tree{like structures.

Keywords : Temporal logic, modal logic, expressive completeness, branching time logic, trees

0 Introduction During the past decade temporal logic has turned out to be an adequate tool for expressing properties which depend on the ow of time. The variable{free operator formalism mostly is more convenient than the usual rst or second order logic notation as a means of formalization. However, depending on the structure of time, not all rst order logic statements may be expressible in temporal logic. Kamp[1] proved that for continuous linear ow of time every rst order formula with exactly one free variable can be translated into the temporal logic language with the operators U (until) and S (since) . Gabbay[2] showed that for arbitrary branching time no nite set of operators exists to express every rst order property. Kozen and Immerman[3] gave a semantical proof that for b{bounded branching trees (b nite) there must exist a set of (b +1){dimensional expressively complete operators. Hafer and Thomas[4] showed that for binary trees (b = 2) every variable free second order formula (with second order quanti cation restricted to path quanti ers) can be translated into the temporal logic CTL*. In this paper we combine and extend the above used methods and results to show that for b{bounded branching time rst order logic is expressively equivalent to temporal logic with S ; U and special \nexttime"{operators X1 ; : : :; Xb. These operators allow to count the number of di erent successors of a node with the same label. This result can be extended to ordered trees and to trees with b distinguished successor relations. The proof proceeds via a so{called two dimensional temporal logic with the operators S ; U ; Xk and U !. Though two dimensional formulae can be syntactically transformed into the one dimensional logic with S ; U and Xk , the two dimensional logic seems to be of some interest of its own, since it allows the convenient speci cation of \interval properties". 1

This paper is organized as follows: In section 1, basic de nitions and lemmas are given. In section 2, expressive completeness of the two dimensional logic is proved. In section 3, a syntactical transformation of two dimensional to one dimensional formulae is given. In section 4, extensions and limitations of our methods are discussed.

1 De nitions

De nition 1.1 Let b < ! be a nite number. A b{ary tree hN ; Si is a set of nodes N together with a successor relation S  N  N such that  for every node x there are at most b successor nodes, i.e. nodes y with xSy  for every node x there is at most one predecessor node, i.e. a node y with ySx  there is a root node r without predecessor, such that every node can be reached in nitely many S {steps from r.

Let S + be the transitive and S  be the re exive and transitive closure of S . De nition 1.2 Let = = fx0 ; : : :; xk g be a set of individual variables nand P = fp1; : : :; pm g be a set of (monadic) predicate symbols. The language PL (P ; =) of rst order predicate logic wich uses at most the predicate symbols P , free variables = and has at most quanti er depth n is de ned as follows:  xS  y 2 PLn (P ; = [ fx; yg) for every n; P ; =.  p x 2 PLn(P [ fpg; = [ fxg) for every n; P ; =.  ? 2 PLn (P ; =) for every n; P ; =.  If A 2 PLn (P1; =1); B 2 PLn (P2 ; =2), then (A ! B ) 2 PLmax(n ;n ) (P1 [ P2; =1 [ =2 )  If A 2 PLn(P ; =) and x 2 =, then 9x(A) 2 PLn+1 (P ; = n fxg) S Let PL(P ; =) = n2! PLn(P ; =). We write PLn (P ; x0; x1; :::) for PLn(P ; fx0; x1; :::g). The free variables x0; x1; : : : of a formula are also called its parameters. V W Additional junctors >; :; ^; _; $ ; ; ; 8 are introduced as abbreviations as usual. Super uous brackets are usually omitted. De nition 1.3 Let A 2 PL(P ; =). A model (also called (Kripke{)structure) $ = hB; ;  i for A consists of a tree B = hN ; S i, an interpretation  : P ! 2N for the predicate symbols and an interpretation  : = ! N for the free individual variables. The forcing relation j= between models and formulae is de ned as usual such that the relation symbol S  is interpreted as the re exive and transitive closure of the successor relation S . Additional relations =; 6=; S + ; S are introduced as abbreviations via x = y if xS  y ^ yS  x, x 6= y if :x = y, xS + y if xS  y ^ x 6= y, xSy if xS + y ^ :9z (xS + z ^ zS + y). We write hB; ; a0; a1; :::i j= ' x0; x1; ::: , if = = fx0; x1; :::g and  (x0 ) = a0 ;  (x1 ) = a1 ; ::: . Often we name nodes with the same letters x; y;... as variables and let  be the identity function. (

)

1

2

1

(

2

)

Languages on a nite signature (P ; =) with nite quanti er depth are essentially nite: 2

Lemma 1.4 Fornevery n; P ; = there is a nite set   PLn(P ; =) such that every formula from PL (P ; =) is equivalent to a formula from . The proof of this lemma is standard and can e.g. be found in [3].

De nition 1.5 Let O = fO1(i ); : : :; On(in )g be a set of operators Oj with arities ij and P = fp1 ; : : :; pmg be a set of propositional variables. The language TL(O; P ) 1

of temporal logic is de ned by  If p 2 P , then p 2 TL(O; P )  ? 2 TL(O; P )  If A; B 2 TL(O; P ), then (A ! B ) 2 TL(O; P )

 If Oj(i) 2 O and A1 ; : : :; Ai 2 TL(O; P ), then Oj (A1 ; : : :; Ai) 2 TL(O; P ). The semantics of TL(O; P ) is given by the semantics of the operators: De nition 1.6 Let for every i{ary Operator O 2 O a formula 'O 2 PL(P ; x0) (its table) be given. Then a translation  : TL(O; P ) ! PL(P ; x0) can be de ned by

   

(pj ) = pj x0 (?) = ? (A ! B ) = (A) ! (B ) ?  (Oj (A1 ; : : :; Ai )) = 'O p1 y =(A1) (x0 =y); : : :; pi y =(Ai) (x0 =y) Here pk y =(Ak ) (x0 =y ) means that every occurrence of pk with parameter y is replaced by the formula (Ak ) , where the parameter y of pk is substituted for the free variable x0 of (Ak ) . When substituting inside the scope of a quanti cation bound variables may have to be renamed. Note that ?(x0 =y)  ?. (

)

( )

( )

( )

Example 1.7 Let the operators U (until), S (since), and Xk (k{next) be de ned by the following tables:   'U = 9y x0S + y ^ p1 y ^ 8z (x0 S + z ^ zS + y ! p2 z )   'S = 9y yS + x0 ^ p1 y ^ 8z (yS + z ^ zS + x0 ! p2 z )  V  V 'Xk = 9y1 ; : : :; yk i x0Syi ^ p1 yi ^ j 6=i(yi 6= yj ) ( )

( )

( )

( )

(

)

The table of Xk de nes an operator for every k between 1 and b; whenever we write TL(:::; Xk) we mean that all operators X1 ; : : :; Xb are present. The Xk {operators allow to count the number of di erent successors of x0 with the same label; e.g. h i ? ?  p ^ S (X2 p; ?)   p x0 ^ 9y yS + x0 ^ (X2 p) (x0 =y) ^ 8z yS + z ^ zS + x0 ! ?(x0 =z)  p x0 ^ 9yySx0 ^ 9y1 ; y2 (ySy1 ^ ySy2 ^ y1 6= y2 ^ p y1 ^ p y2 )   $ p x0 ^ 9y; y1 ySx0 ^ ySy1 ^ y1 6= x0 ^ p y1 (

)

(

)

(

)

(

(

3

)

)

(

)

means that besides x0 there is another successor of x0 's predecessor which sati es p. Similarly ?  S (X1p; ?) ^ p ! S (X2p; ?) means that there is another successor of x0's predecessor which satis es p. Note that X1(A) can be de ned as U (A; ?). Similarly we write Y (A) for S (A; ?). Let F 2 TL(O; P ) and $ = hB; ; ai. Validity of F in $ is de ned by $ j= F if $ j= F  . F 2 TL(O; P ) is equivalent to ' 2 PL(P ; x0) if for every $ = hB; ; ai it holds that $ j= F i $ j= '. So by de nition, for every formula F 2 TL(O; P ) there exists an equivalent formula 'F 2 PL(P ; x0). Expressive completeness means the existence of a translation in

the opposite direction: De nition 1.8 A set of operators O is expressively (or functional) complete, if for every formula ' 2 PL(P ; x0) there exists a formula F' 2 TL(O; P ) equivalent to '. A famous result in this context is Kamps Theorem[1]: Theorem 1.9 If b = 1, then fU ; Sg is expressively complete. Gabbay[2] sharpened this result by proving: Theorem 1.10 If b = 1, then for every formula of TL(U ; S ; P ) there exists an equivalent boolean combination of formulae from TL(U ; P ) and TL(S ; P ). Hence for b = 1, fUg is expressively complete, if we restrict all quanti ers 9y to nodes y with x0S  y. The above de nition of  throws every temporal formula onto a predicate logic formula with monadic predicate symbols P and one free variable x0. A two dimensional temporal logic is de ned by operator tables using P as dyadic predicate symbols and two free variables x0 ; x1. The appropriate translation function for two dimensional operators is de ned by  ? (Oj (A1 ; : : :; Ai )) = 'O p1 y0 ; y1 =(A1 ) (x0 ; x1 =y0 ; y1 ); : : :; pi y0 ; y1 =(Ai) (x0 ; x1 =y0 ; y1 ) . In the following example a two dimensional rede nition of the operators U ; S and Xk is given and a new operator U ! is de ned: (

(

)

)

Example 1.11   'U ! = 9y x0S + y ^ (x1 S  y _ yS + x1) ^ p1 y; x1 ^ 8z (x0 S + z ^ zS + y ! p2 z; x1 )   'U = 9y x0S + y ^ p1 y; y ^ 8z (x0S + z ^ zS + y ! p2 z; y )   'S = 9y yS + x0 ^ p1 y; x1 ^ 8z (yS + z ^ zS + x0 ! p2 z; x1 )  V  V 'Xk = 9y1 ; : : :; yk i x0Syi ^ j 6=i (yi = 6 yj ) ^ p1 yi ; yi ) ?  So e.g. the translation of U p; q ! U !(r; s) becomes: h  i ? 

? U p; q ! U !(r; s)   9y x0S + y ^ p y; y ^ 8z x0S + z ^ zS + y ! q z; y ! U !(r; s) (x0 ; x1 =z;y) h  9y x0S + y ^ p y; y ^ 8z x0S + z ^ zS + y ^ q z; y !   i ! 9y0 zS + y0 ^ (yS  y0 _ y0 S + y) ^ r y0 ; y ^ 8z 0 (zS + z 0 ^ z 0 S + y0 ! s z 0 ; y ) (

(

(

)

(

(

)

)

)

(

)

(

(

)

(

)

)

(

(

(

4

)

)

)

(

)

)

De nition 1.12 Let O be a set of two dimensional operators. The projection F  of a TL(O; P ){formula F is the PL(P ; x0){formula obtained by replacing in F  every dyadic predicate p y1 ; y2 by p y1 , and every occurrence of the free variable x1 by x0. A TL(O; P ){formula F is valid in a model $ = hB; ; ai if its projection F  is valid in $. Again F is equivalent to F 0 if F and F 0 are valid in the same (

)

(

)

models. ?  So the meaning of the above formula U p; q ! U !(r; s) is: There is a p{labelled node y such that on the path from x0 to y for every q{labelled node z there is an r{labelled node y0 on this path to y or beyond y such that between z and y0 the predicate s holds. ?  The di erence to the one dimensional formula U p; q ! U (r; s) can be graphically illustrated as in gure 1.

U (p; q ! U (r; s))

U (p; q ! U !(r; s))

H@@?HHH   HHH q?  @@s ?@?q @ r @ s ??@@ r @@ p ??

@@HHH H  ? H  q?  @@s r HH ? ? @@ q s? r? @@ p ??

r

r

r

r

r

r

r

r

r

r

r

r

Figure 1: The di erence between U { and U !{operator Hence the operator U ! can be seen as a kind of \path operator" which looks only in a given direction. The de nitions of all of the other operators from example 1.11 are tailored to this intended meaning: A U de nes a new direction, S leaves the given direction unchanged, while Xk eliminates the direction without de ning a new one. The reader may ask why in de nition 1.11 the same operator symbols were chosen as in example 1.7. The reason can be found in the following lemma: Lemma 1.13 For F 2 TL(U !; S ; U ; Xk; P ) de ne F onedim 2 TL(S ; U ; Xk ; P ) as the result of eliminating every exclamation mark from F . If in F every occurrence of a U !{operator inside the scope of a U { or S {operator O is in the scope of an Xk {operator which is also inside the scope of O, then F is equivalent to F onedim. Especially formulae without U !{operators inside of U { or S {operators and formulae with no U ! at all are equivalent to their one dimensional counterparts. Proof: If there are no U !{operators in F , the proof is immediate from the de nition. If a U !{operator in F satis es the above condition, then either the rst and second parameter are the same variable (if U ! is inside of Xk ), or the second parameter is constantly x1 (if U ! is nested inside of U !). Since in the one dimensional interpretation x1 is identi ed with x0, the additional condition x1 S  y _ yS  x1 in the de nition of U ! is in both cases satis ed whenever an appropriate y can be found. So U ! is equivalent to U . 2 5

2 Two dimensional expressive completeness

The following proof is close to the proof by Hafer and Thomas[4]. Let P be xed for this section, and n = f 1 x0 ; : : :; k x0 g be the nite set of formulae of PLn(P ; x0) guaranteed by lemma 1.4. Let T n = fp11; : : :; p1k; p21; : : :; pbkg be b  k new predicate symbols not in P , and P n = P [ T n . De nition 2.1 Let B = hN ; Si be a tree and  : P ! 2N be an interpretation for P . Then the n{augmentation n is the extension of  to domain P n , which satis es the following condition for all pij 2 T n and all a 2 N : (

)

(

)

hB; n; ai j= pij x0 i hB; ; ai j= 9y1 ; : : :; yi (

)

^ 

6=

x0Sy ^ (y 6= y ) ^

j (y )



This means that pij 2 T n is true in a node a if j 2 n is true in at least i successors of a. If $ = hB; ;  i is a model for PL(P ; =), then the n{augmented model $n = hB; n;  i is a model for PL(P n ; =). De nition 2.2 Let $n = hB; n; a0 ; : : :; aki be an n{augmented model. The bough free n{augmented model is ^$^^n^ = h^B^^; ^^^n^; a0; : : :; aki. Here ^B^^ consists only of those nodes a of B for which aS  ai for some ai 2 fa0; : : :; ak g, the successor relation S on nodes is restricted appropriately, and ^^^n^ is n with appropriately restricted range. For $n = hB; n ; x; yi, ^B^^ must have one of the three forms indicated in gure 2. s

r

s

r

s

y

s

x

s

z

z0

JJz1

J Jy

x s

s

x

s

r

y

s

s

s

s

Figure 2: Three possible cases of bough free models for formulae with two parameters The bough free n{augmented model contains all the information of the original model: Lemma 2.3 Let = = fx0; : : :; xk g. For every formula '1 x0 ; : : :; xk 2 PLn (P ; =) n there is a formula '2 x0 ; : : :; xk 2 PL (P n ; =) such that for every model $ it holds that $ j= '1 i ^$^^n^ j= '2 . The proof can be found in [6]. It is obtained by an appropriate version of the so{called Ehrenfeucht{Fraisse{game. De nition 2.4 Let the restriction '[x ;x ] of a formula ' 2 PL(P n; x0; x1) to [x0; x1] be the formula obtained by replacing every quanti er 9y(:::) in ' by 9y(x0 S + y^ yS + x1 ^ :::). The relevant nodes a0; : : :; ak with respect to nodes b0; : : :; bl of a bough free model are b0; : : :; bl as well as the root and all branching nodes (with more than one successor). Let fa0 ; : : :; akg be the relevant nodes of a bough free model. Then there are exactly k tuples T = ft1; : : :; tk g such that tj = [aj ; aj ] and aj S + aj )

(

(

)

0

1

1

6

2

1

2

and no other relevant node lies in between aj and aj . Note that the set of nodes between aj and aj is linearly ordered by S  . 2

1

2

1

The following lemma is an extension of theorem 1 (p. 48) from Kamp[1] for the non linear case. A similar lemma can be found in Gabbay, Pnueli, Shelah, Stavi[5]. It shows that formulae of rst order logic, speaking about bough free models, can be mapped onto formulae speaking about the points and linear parts which constitute this model. n(P n ; =) there is Lemma 2.5 Let = = fx0; : : :; xkg. For every formula ' 2 PL [ x ;x 0 a quanti er free formula 2 PL (P n ; =) and k formulae 1 ] ; : : :; k[x ;x ] 2 PLn(P n; x0; x1) such that for all bough free models ^$^^n^ = h^B^^; ^^^n^; a0; : : :; aki with relevant nodes fa0; : : :; ak g it holds that h^B^^; ^^^n^; a0; : : :; ak i j= ' i h^B^^; ^^^n^; a0; : : :; ak i j= and for all tj = [aj ; aj ] 2 T . h^B^^; ^^^n^; aj ; aj i j= j[x ;x ] The proof of this lemma can be found in [6]. It is again done by the Ehrenfeucht{ Fraisse{game. Note that lemma 2.5 depends on the fact that the underlying structures are trees; the argument is not valid for general structures. 0

0

1

0

1

0

1

1

0

For the proof of the following theorem we only need a special case of the above lemma. Theorem 2.6 fU !; S ; U ; Xkg is expressively complete. Proof: We show by induction on n: for every ' 2 PLn (P ; x) there is a formula F' 2 TL(U !; S ; U ; Xk; P ) such that for every $, $ j= ' i $ j= F'. Case n = 0 is trivial (p x becomes p, ? becomes ?, ! becomes !). Since both languages are closed under boolean combinations, it suces in the inductive step to consider '  9y x; y with 2 PLn (P ; x; y). ' is equivalent to the disjunction '1 _ '2 _ '3 , where '1  9y9r(root r ^ rS  y ^ yS  x ^ x; y ) '2  9y9r(root r ^ rS  x ^ xS  y ^ x; y ) '3  9y9rzz0 z1(root r ^ rS  z ^ zSz0 ^ zSz1 ^ z1 6= z2 ^ z0 S  x ^ z1 S  y ^ x; y ) Here root r means :9y(yS + r). These cases correspond to the three cases of gure 2. For '1 , using lemma 2.3 and lemma 2.5, we can nd formulae x; y; r  x x ^ y y ^ r r , [r;y] r; y , and [y;x] y; x , such that for every model $ = hB; ; x; y; ri and corresponding bough free n{augmented model ^$^^n^ = h^B^^; ^^^n^; x; y; ri, hB; ; x; y; ri j= root r ^ rS  y ^ yS  x ^ x; y i h^B^^; ^^^n^; x; y; ri j= root r ^ rS  y ^ yS  x ^ x x ^ y y ^ r r and h^B^^; ^^^n^; r; yi j= [r;y] r; y and h^B^^; ^^^n^; y; xi j= [y;x] y; x . This in turn means that there are formulae ^ '^^^11^^ y  9r(root r ^ rS  y ^ y y ^ r r ^ [r;y] r; y ) and ^ '^^^12^^ x  9y(yS  x ^ x x ^ ^'^^^11^^ y ^ [y;x] y; x ), such that for every $ = hB; ; x; y; ri $ j= root r ^ rS  y ^ yS  x ^ x; y i h^B^^; ^^^n^; yi j= ^'^^^11^^ y and h^B^^; ^^^n^; xi j= ^'^^^12^^ x (

(

)

)

( )

(

)

( )

(

)

( )

(

( )

(

(

( )

( )

(

)

)

( )

(

(

)

(

)

)

(

(

( )

)

(

)

( ) (

(

( )

( )

( )

( )

( )

)

)

(

(

)

(

( )

)

7

)

)

( )

)

(

)

)

1

Hence, for every $ = hB; ; xi, $ j= '1 x i ^$^^n^ j= ^'^^^12^^ x . The formula ^'^^^11^^ y is by Kamp's theorem and Gabbay's extension translatable into ^ F^^^'^^^^ 2 TL(S ; P n), since it is interpreted on a linear structure. The same argument holds for ^'^^^12^^ x , with ^'^^^11^^ y replaced by a new predicate symbol q y . Now in ^F^^^'^^^^ every occurrence of the new propositional variable q has to be replaced by ^F^^^'^^^^. Call the result of this replacement ^F^^'^^^ x . Then for every $ = hB; ; xi it holds that $ j= '1 x i ^$^^n^ j= ^F^^'^^^. Let Fj be the translation of 'j x0 2 PLn(P ; x0), whose existence is guaranteed according to the induction hypothesis. If we replace in ^F^^'^^^ every occurrence of an augmenting variable pij 2 T n by XiFj , and call the result F' then clearly we have ^$^^n^ j= ^F^^'^^^ i $ j= F' . Hence $ j= '1 i $ j= F' for every model $. The same considerations yield that '2 can be split such that hB; ; x; y; ri j= root r ^ rS  x ^ xS + y ^ x; y i h^B^^; ^^^n^; xi j= 9r(root r ^ rS  x ^ x x ^ r r ^ [r;x] r; x ) and h^B^^; ^^^n^; xi j= 9y(xS + y ^ y y ^ [x;y] x; y ). The rst of these formulae can be translated into F21 2 TL(S ; P n ) as above. The second one can be translated into ^F^^^22^^ 2 TL(U ; P n ) according to Kamp's and Gabbay's theorems. But now, in ^F^^^22^^ every U {operator inside the scope of another U {operator has to be replaced by a U !{operator. This is necessary because we want to interpret the resulting formula not in ^$^ but in $, to make all U {operators \point in the same direction". Finally the augmenting variables have to be replaced as before to yield the formulae F21 and F22. If F2 stands for (F21 ^ F22), then again we obtain $ j= '2 i $ j= F2. A similar argument reduces '3 with hB; ; x; y; r; z; z0; z1i j= root r ^ rS  z ^ zSz0 ^ zSz1 ^ z0 6= z1 ^ z0S  x ^ z1S  y ^ x; y to '31{'34, where h^B^^; ^^^n^; z i j= 9r(root r ^ rS  z ^ r r ^ z z ^ [r;z] r; z ) = ^'^^^31^^ z ^^^ z1 h^B^^; ^^^n^; z1 i j= 9y(z1 S  y ^ 1 z1 ^ y y ^ [z ;y] z1 ; y ) = ^'^^32 [ z ;x ] n  ^ ^ ^ ^ ^ ^ ^ z0 ; x ^ ^'^^^33^^ z0 ) = ^'^^^34^^ x , hB;  ; xi j= 9z0 (z0 S x ^ 2 z0 ^ X x ^ with ^'^^^33^^ = 9zz1 (zSz0 ^ zSz1 ^ z0 6= z1 ^ ^'^^^31^^ z ^ ^'^^^32^^ z1 ) For '31 z there exists a translation ^F^^^31^^ as above, for ^'^^^32^^ z1 as in the case of '22 ^^^. We can translate ^ a translation ^F^^32 '^^^34^^ x by replacing ^'^^^33^^ z0 by a new predicate ^ ^ ^ ^ ^ ^ symbol q z0 and get a formula F34. Now we have to replace every inner U by U ! in ^ F^^^32^^, as well as the augmenting variables in ^F^^^31^^, ^F^^^32^^ and ^F^^^34^^. The resulting formulae F31, F32 and F34 can be combined to yield the intended formula F3 as follows: Every occurrence of q in F34 is replaced by Y F31 ^ YX1F32 ^ (F32 ! YX2F32). (Compare this formula with the one after example 1.7!) Summarizing the achieved translations we have for every model $: $ j= ' i $ j= '1 _ '2 _ '3 i $ j= F1 _ F2 _ F3 2 (

(

)

)

( )

11

(

( )

)

( )

12

11

1

(

)

(

)

)

(

1

1

1

1

1

1

( )

(

(

( )

(

( )

)

(

( )

)

)

)

( )

(

)

(

(

1

( )

)

(

)

(

0

)

( )

(

)

( )

)

(

)

(

(

(

)

)

)

(

)

)

)

(

( )

(

(

( )

( )

( )

(

)

)

3 One dimensional expressive completeness

Though the operator U ! is rather easy to understand, from a theoretical viewpoint it seems not satisfying to have only a two dimensional expressively complete logic. 8

In this section we therefore show how to eliminate the U !{operator from formulae by syntactical transformations. ?  ?  Lemma 3.1 Let F  B1 ^ U !(C; D) _ B2 ^ :U !(C; D) , and h?



?



End1  B1 ^ :B2 ^ U B1 ^ B2 ^ C ^ U (A; B1 ^ B2 ) _ A ^ hC _ D ^ U (C; D)i ; B1 ^ B2 ^ D h?



End2  :B1 ^ B2 ^ U B1 ^ B2 ^ :C ^ :D ^ U (A; B1 ^ B2 ) _ i ?  _ A ^ :C ^ h:D _ :U (C; D)i ; B1 ^ B2 ^ :C ?  In1  B1 ^ C _ D _ S (B2 ^ C; B2) ?  At2  :B1 ^ B2 ^ C _ S (B2 ^ C; B2) ?  In2  B2 ^ :C _ S (B1 ^ :C ^ :D; B1 ) ?  At1  B1 ^ :B2 ^ :C ^ :D _ S (B1 ^ :C ^ :D; B1 ) Then we have: j= U (A; F ) $ U (A_ End1 _ End2h_  ?

? _ B1 ^ :B2 ^ U In1 ^ End1 _ At2 ^ End2 _ 

i

_U [(At1 ^ End1 ) _ (At2 ^ End2 ); In1 _ At2 _ In2 _ At1 ] ; In1 _ 

h?



?



_ :B1 ^ B2 ^ U In2 ^ End2 _ At1 ^ End1 _ i  _U [(At1 ^ End1 ) _ (At2 ^ End2 ); In1 _ At2 _ In2 _ At1 ] ; In2 ; B1 ^ B2 )

Proof: Consider the following abbreviations: F1  U (A; B1 ^ B2 ) F21 U (End1; B1 ^ B2 ) F22 U (End2; B1 ^ B2 )  ? F31 U B1 ^ :B2 ^ U [In1 ^ End1 ; In1 ]; B1 ^ B2 ?  F32 U :B1 ^ B2 ^ U [In2 ^ End2 ; In2 ]; B1 ^ B2  ? F41 U B1 ^ :B2 ^ U [At2 ^ End2 ; In1 ]; B1 ^ B2 ?  F42 U :B1 ^ B2 ^ U [At1 ^ End1 ; In2 ]; B1 ^ B2   F51 U B1 ^ :B2 ^ U At2 ^ Uh(At1 ^ End1 ) _ (At2 ^ End2 );   In1 _ At2 _ In2 _ At1 i; In1 ; B1 ^ B2   F52 U :B1 ^ B2 ^ U At1 ^ Uh(At1 ^ End1 ) _ (At2 ^ End2 );   In1 _ At2 _ In2 _ At1 i; In2 ; B1 ^ B2 For every branch for which U (A; F ) holds there must be a node x1 below x0 with A

valid in x1 and for all nodes y in between the formula F holds. The following cases arise: (1) For all these y it holds that B1 ^ B2 and therefore also F . (2.1) There is exactly one y1 , in which B1 ^ :B2 holds, for all other y it holds that B1 ^ B2 . 9

i

(2.2) There is exactly one y1 , in which :B1 ^ B2 holds, for all other y it holds that B1 ^ B2 . (3.1) There are several nodes y1 ; y2,..., in which B1 ^ :B2 holds, and no z with :B1 ^ B2 . (3.2) There are several nodes z1 ; z2 ..., in which :B1 ^ B2 holds, and no y with B1 ^ :B2 . (4.1) There are several nodes y1 ; y2,..., in which B1 ^ :B2 holds, and exactly one z with :B1 ^ B2 , where z lies below y1 ; y2; ::: . (4.2) There are several nodes z1 ; z2,..., in which :B1 ^ B2 holds, and exactly one y with B1 ^ :B2, where y lies below z1 ; z2; ::: . (5.1) There are several nodes y1 ; y2,..., in which B1 ^ :B2 holds, and several nodes z1 ; z2; : : :, in which :B1 ^ B2 holds, where y1 lies above z1 . (5.2) There are several nodes y1 ; y2;..., in which B1 ^ :B2 holds, and several nodes z1 ; z2,..., in which :B1 ^ B2 holds, where z1 lies above y1 . Let us consider the sequence of nodes between x0 and x1 in each of these cases to show that these cases correspond exactly to the formulae F1{F52: Case (1) is obvious: Up to A holds B1 ^ B2 and therefore in this case F1 is valid. Case (2.1): Assume that in y1 the formula B1 ^ :B2 ^ U !(C; D) is valid. Then the node z required by U !(C; D) in which C holds, lies in between y1 and x1, or z = x1 , or x1S + z . Therefore one of the pictures from gure 3 ts:

x0 y1

u

9 > > = > > ;

x0 B1 ; B2

9 B1 ; :B2

y1

u

> > = > > ;

u

> > ;

9 B1; :B2 > > > > > > > > > > > =

B1 ; B2 ; D

u

 >>; B1; B2  x01  x1  A u

u

x1 = z

> > > > > > > > > > > ;

x0

u

y1

u

B1 ; B2

u

9 B1 ; B2; C   >>= z

9 > > =

B1 ; B2 ; D x1

 A; C

u

z

9 > > = > > ;

D

9 A; D

u

> > = > > ;

D

C

u

Figure 3: Three possible cases for z Note that U (B1 ^ B2 ^ C ^ U (A; B1 ^ B2 ); B1 ^ B2 ^ D) does not require the node in which A holds to be identical with x1 . This formula is also true if z is on the path from y1 to some x01 with A x01 . In this case we can consider the path x0; : : :; x01 instead of x0 ; : : :; x1 for the evaluation of U (A; F ). (

10

)

Therefore under the assumption of case (2.1) in y1 the formula End1 resp. in x0 the formula U (End1 ; B1 ^ B2 ) holds i there is a branch with U (A; F ). Case (2.2): If in y1 the formula :B1 ^ B2 ^:U !(C; D) holds, we get by symmetry End2 y1 . )

(

Case (3.1): Every chain of nodes between x0 and x1 with B1 ^ :B2 ends in a y0 , such that the subtree below y0 looks like in case (2.1), i.e. also End1 y0 holds. We consider the path between x0 and y0 . If the nodes, in which B1 ^ :B2 holds, are y1 , y2 , ..., we have the following situation (with root to the left): (

z

u

x0

B1 B1 B2 :B2 }|

B2

?

{ z

}|

u

u

y1| {z } 6 6D C

U !(C; D)

B1

:B2

?

}|

u

y2|

6

B1

:B2

B2

{ z

{z

D

)

}

U !(C; D)

u

6

C

{

?

u

y3

6

::: :::

End1 y0 u

U !(C; D)

Now we have to describe the sequence of events between y1 and y0 . On one hand for every node y with y1 S + y and yS  y0 such that neither C nor D holds in y there must be a former node (closer to the root) in which C ^ B2 was true, and since this node B2 was true. On the other hand, if for every such y between y1 and y0 the formula C _D _S (B2 ^C; B2) is true, then at each :B2 also U !(C; D) holds: End1 y0 guarantees, that U !(C; D) is valid in y0 . Suppose there were a yi with :U !(C; D). Then either :U !(C; >) holds in yi (which is impossible, because U !(C; >) has to hold in y0 ), or :B2 ^ U !(:C ^ :D; :C ) holds in yi . Therefore there would be a y with :C ^ :D ^ S (:B2 ; :C ), hence also a y with :(C _ D _ S (B2 ^ C; B2)), which is a contradiction. We can conclude that in this case U (B1 ^ :B2 ^ U (In1 ^ End1 ; In1 ); B1 ^ B2 ) holds. (

)

Case (3.2) is similar, we get U (:B1 ^ B2 ^ U (In2 ^ End2; In2); B1 ^ B2 ). Case (4.1) di ers from (3.1) in that in y0 not End1 but End2 holds and therefore

:U !(C; D). This means that the last U !(C; D) has to be nished before y0 or at latest in y0 , and therefore S (B2 ^ C; B2) or C holds in y0 . Thus we have (At2 ^ End2 ) in y0 , B1 ^ :B2 ^ U (At2 ^ End2 ; In1 ) in y1 and F41 in x0. Case (4.2) again is similar to (4.1). End1 is valid in y0 , therefore also U !(C; D), thus for the last yi such that :U !(C; D) there must be a node between yi and y0 (including), in which (:C ^ :D) holds, and after that no :B1 occurs. This is what is expressed by At1 y0 . (

)

Case (5.1): Here we have a chain, beginning with y1 , followed by y2 , y3 , ..., and z1 , z2 , ..., arbitrarily shued. For all y between y1 and z1 the formula In1 holds, in z1 the formula At2 holds, after that up to the last element of the chain In1 _ At2 _ In2 _ At1 is satis ed. The chain ends with a y0 such that (At1 ^ End1), or with a z0 such that (At2 ^ End2). This situation is described by the formula F51. Case (5.2) again is similar to (5.1). Since (1){(5.2) cover all possible cases, we have 11

j= U (A; F ) $ F1 _ F21 _ F22 _ F31 _ F32 _ F41 _ F42 _ F51 _ F52.

This is what was to be proved.

2

Note that on the right hand side of the equation of lemma 3.1 no U !{operator occurs. This, together with the following lemma, gives a basis for eliminating all U !{operators in a formula. Lemma 3.2 The following equivalences are valid: (i) S (A ^ U !(C; D); B _ U !(C; D)) $ S (A; D?) ^ hC _ D ^ U !(C; D)i_ _S C ^ S (A; D); C _ D _ :S (:B; :C ) ^ :S (:B; :C ) _ hC _ D ^ U !(C; D)i (ii) S (A ^ :U !(C; D); B _ U !(C; D)) $ S (A; B ^ :C ) ^ h:C ^ (:D _ :U !(C; D))i_ _S :C ^ :D ^ S (A; B ^ :C ); C _ D _ S (A _ (B ^ C ); B ) ^ ^S (B ^ C; B ) _ hC _ D ^ U !(C; D)i (iii) S (A ^ U !(C; D); B _ :U !(C; D)) $ S (A; B ^ D) ^ hC _ D ^ U !(C; D)i_ _S C ^ S? (A; B ^ D); :C _ S (A _ B ^ :C ^ :D; B ) ^  ^ S (B ^ :C ^ :D; B ) _ h:C ^ (:D _ :U !(C; D))i (iv) S (A ^ h:U !(C; D); B _ :U !(C; D)) $ :S (:B ^ U !(C; D); :A _ U !(C; D))^ i ? S (:C ^ :D ^ S (A; :C ); >) _ S (A; :C ) ^ h:C ^ (:D _ :U !(C; D))i

Proof: These formulae are derived from Gabbay[7]. As an example we prove (iii): The formula requires that for the current node x there exists a former node y with yS + x such that (A ^ U !(C; D)) y , i.e. there is a z such that C z and 8t(yS + t ^ tS + z ! D t ). There are two possibilities for z : 1) xS  z . Then between y and x U !(C; D) holds and thus also B , therefore S (A; B ^ D) ^ hC _ D ^ U !(C; D)i is true. 2) zS + x. Then we have the following situation: :C :C D : C :D A C B :C:D B ?z }| { ?z }| { z }| { ?z }| { z }| { ? : : : y | {z } |z x {z } B ^ U !(C; D) B _ :U !(C; D) ( )

( )

( )

u

u

u

u

u

u

u

In the area, in which B _ :U !(C; D) holds, S (A; B ) _ S (B ^ :C ^ :D; B ) _ :C is valid. The argument is the same as used in lemma 3.1. In x it holds that S (B ^ :C ^ :D; B ), if the last :U !(C; D) was nished before x, or :C ^ :D, if it ended in x, or :C ^ :U !(C; D), if it will end beyond x. Exactly this situation is expressed by the above disjunction (iii). 2 Note that in these formulae on the right hand side there is no U ! inside of an S (the rst conjunct of equation (iv) has to be replaced by the corresponding term via equation (i) to get this form). (i){(iv) therefore can be used to pull out every formula U !(C; D) which occurs inside an S {operator. Theorem 3.3 For every formula F 2 TL(U !; S ; U ; P ) there is an equivalent formula F 0, in which no U !{operator occurs inside a U or S . 12

Proof: is done by induction on the number of di erent subformulae U !(C; D) inside any U , S in F , and for every number by subinduction on the depth of nesting of a particular formula U !(C; D) inside of S . Let F1 and F2 be boolean combinations of formulae with U !(C; D), such that C and D contain no U !{operator. Then F1 and F2 can be rewritten using conjunctive and disjunctive form as F1 $ (A1 ^ U !(C; D)) _ (A2 ^ :U !(C; D)) and F2 $ (B1 _ U !(C; D)) ^ (B2 _ :U !(C; D)) Therefore S (F1 ; F2) $ S (A1 ^ U !(C; D)) _ (A2 ^ :U !(C; D)); (B1 _ U !(C; D)) ^ (B2 _ :U !(C; D) $ S [A1 ^ U !(C; D); B1 _ U !(C; D)] ^ S [A1 ^ U !(C; D); B2 _ :U !(C; D)]_ _S [A2 ^ :U !(C; D); B1 _ U !(C; D)] ^ S [A2 ^ :U !(C; D); B2 _ :U !(C; D)] To each of these four S {formulae the corresponding equivalence from lemma 3.2 can be applied to yield a formula with the same subformulae and a lower nesting of U ! inside S . If U ! occurs inside a U , we can replace every direct occurrence of U !(C; D) in F1 in U (F1 ; F2) by U (C; D), because of the following equivalence: j= U (A1 ^U !(C; D) _ A2^:U !(C; D); F2) $ U (A1 ^U (C; D) _ A2^:U (C; D); F2) Thus the only remaining case are U !{operators in the second argument of a U { operator. Since every such formula can be written as U (A; F1 ), the occurrences of U !(C; D) can be eliminated using equation 3.1. 2 As a corollary of theorem 3.3 we get (using lemma 1.13) Theorem 3.4 For every formula F 2 TL(U !; S ; U ; P ) there is an equivalent formula F 0 2 TL(S ; U ; P ). Clearly this theorem generalises if the Xk {operators are added. Therefore with theorem 2.6 we can conclude Theorem 3.5 fU ; S ; Xkg is expressively complete.

4 Extensions In this section we want to investigate on which structures other than the so far considered tree models our method of proving expressive completeness extends.

4.1 Ordered and arc{labelled trees

De nition 4.1 An ordered tree B = hN ; S; Di consists of a set of nodes N , a

successor relation S and an additional ordering relation D on nodes with the same predecessor, such that  hN ; S i is a tree according to de nition 1.1  D is a linear (irre exive) order on the successor nodes of each node 13

De nition 4.2 An arc{labelled tree B = hN ; S1; : : :; Sb i consists of a set of nodes N together with b distinguished successor relations S1 ; : : :; Sb, such that  each Si is functional, i.e. for every x there is at most one y with xSi y  hN ; S i is a tree according to de nition 1.1, where xSy if xS1 y _ : : : _ xSb y.

The rst order language on ordered and arc{labelled trees uses predicates S + ; D and S + ; S1 ; : : :; Sb, respectively. Equality is in both cases de nable. It is rather easy to see that these languages have the same expressive power as the rst order language with the predicate S  and the additional monadic predicates A1 x ; : : :; Ab x and where B1 x ; : : :; Bb x , respectively,  V and Ak x if 9y1 ; : : :; yk . Besides that Xk can be de ned via A0 and via Bk0 : Xk A  XW1(A? ^ A0 (A ^ A0 (:::)::) (k times A)  Xk A  P X1(B ^ A) ^ : : : ^ X1(Bk ^ A) where the latter disjunction is over all permutations P of k di erent j . Therefore we have Theorem 4.3 fS ; U ; A0g is expressively complete for ordered trees. fS ; U ; B10 ; : : :; Bb0 g is expressively complete for arc{labelled trees. (

(

(

)

(

)

(

)

)

(

)

)

( )

0

( )

0

1

4.2 Unbounded branching trees

It is rather easy to see that no nite set of operators can be expressively complete if we give no upper bound on the branching degree of the nodes. Every operator uses only a xed number of bound variables, whereas the statement \node x0 has at least k di erent successors" requires k di erent variable names. But the above proofs also hold if we allow an in nite set of operators: Theorem 4.4 fS ; Ug[fXk j k < !g is expressively complete for unbounded (< !) branching trees. fS ; Ug [ fBk0 j k < !g is expressively complete for unbounded branching labelled trees. 14

4.3 Arborescences

De nition 4.5 An arborescence hN ; Si is a set of nodes N together with an irre exive successor relation S  N  N , such that the following holds:  For every node there are at most b successors  For every node there are at most b predecessors  For every two di erent nodes there is a unique nite path connecting them, i.e. for x0 6= x1 there is exactly one sequence hy0 ; y1 ; : : :; yn i such that x0 = y0 ; x1 = yn and for every  < n holds y Sy+1 or y+1 Sy , and for all  6=  holds y 6= y . (The third condition implies that there is no loop from x0 to x0). Symmetry tells us that we can construct a two dimensional logic with operators fU !, S !, U , S , Xk , Yk g which is expressively complete for arborescences. But the separating equations, which allowed us to eliminate U ! from under U ; S fail to hold: they rely on the fact that the set of nodes y with yS  x0 is linearly ordered. We therefore leave it as an open question whether there is a one dimensional complete set of operators for arborescences.

References [1] [2] [3] [4]

[5] [6] [7]

J.A.W. Kamp: Tense Logic and the Theory of Linear Order; Dissertation,

University of California, Los Angeles (1968). D.M. Gabbay: Expressive Functional Completeness in Tense Logic; in: U. Monnich (ed.): Aspects of Philosophical Logic; pp.91{117 Reidel, Dordrecht (1981). N. Immerman, D. Kozen: De nability with Bounded Number of Bound Variables; in: Proc. 2nd IEEE LICS, pp.236{244; Edinburgh (1987). Reappeared in: Information and Computation 83; pp.121{139 (1989). T. Hafer, W. Thomas: Computation Tree Logic CTL* and Path Quanti ers in the Monadic Theory of the Binary Tree; in: T. Ottmann (ed.): ICALP 1987, Springer LNCS 267, (1988). Short version of T. Hafer: On the Expressive Completeness of CTL*; Bericht Nr. 123, Schriften zur Informatik, RWTH Aachen, (Dez. 1986). D. Gabbay, A. Pnueli, S. Shelah, J. Stavi: On the Temporal Analysis of Fairness; in: Proc. 7th ACM POPL, pp.163{173; Las Vegas (1980). B.-H. Schlingloff: Zur temporalen Logik von Baumen; Dissertation, Institut fur Informatik der Technischen Universitat Munchen, Report TUM{I9012; (1990). D. Gabbay: The Declarative Past and Imperative Future: Executable Temporal Logic for Interactive Systems; in: B.Banieqbal et al. (eds), Temporal logic in Speci cation, Springer LNCS 398, pp.431{448 (1989).

15