Zeilschr. f . m&. Logik und Cnrndlagen d. M&. Bd. 21, S. 89-96 (1975)
MONADIC GENERALIZED SPECTRA in Yorktown Heights, New York (U.S.A.)l) by RONALDFAGIN
1. Introduction Let d be the class of finite models of a second-order existential sentence 3Pl.. .3P,o, where u is a n arbitrary first-order sentence (with equality). Thus, d is a P C class in the sense of TARSKI[8], where we restrict our attention to the class of finite structures. If PI, . . .,P,, are the only nonlogical symbols appearing in u, then A? can be identified with the set of cardinalities of finite models of 6. H. SCHOLZ [7] called this set the spectrum of (T.Hence, in the general case, we call d a generalized spectrum. If P,, . . ., P, are each unary predicate symbols, then we call d a monadic generalized spectrum. I n this paper, we show, by using FRAIssE-type games, that the class of monadic generalized spectra is not closed under complement. If Y is a similarity type, that is, a finite set of predicate and constant symbols, then by an Y-structure, we mean a relational structure appropriate for 9'. We will show that the class of non-connected, finite {P}-structures (where P is a binary predicate symbol) is a monadic generalized spectrum, but that the class of connected, finite {P}-structures is not (although the latter class is a generalized spectrum with just one existentialized binary predicate symbol, as we will see). Assume throughout this paper that P is a binary predicate symbol and that U , , U , , . .. are unary predicate symbols. Define a cycle (of lengthn) to be a {P}-structure % ' = = ( A ; Q ) , where for some n distinct elements a,, . . ., a,,,
A = { a l , . . ., a,}, Q = {(ai,ai+J : 1 i < n} u {(an,u,)}. Write card(%) = n. If % = ( A ; Q) and $'3 = ( B ;R) are cycles, and A n B = 0, then by the cardinal sum 9.i @ b, we mean the {P}-structure ( A u B ; Q u R). We d l show that if z is gu,. . . 3Uda, where d is a first-order {P, u,, . . ., u d } ' sentence (that is, its nonlogical symbols are a subset of {P,U , , . . ., U,}), then there is a constant N such that for each cycle 9.i with 9l k z and card(%)2 N , there is a cycle b such that B @ B k z. It easily follows that the class of connected, finite {P}-structures is not a monadic generalized spectrum. This result is related to monadic second-order decidability results in Bihxi~[2] and RABIN[6}, but it does not seem t o be directly derivable from them. I n any case, this result can be derived very directly by the use of FaGssE-type games [5], which is the approach we will use. G . ASSER[l] posed the question of whether the complement of every spectrum is a spectrum. We remark that the author showed in [3] and [4] that there is a particular monadic generalized spectrum d (namely, the class of all finite models of 3u v 23 ! y(Pxy A Uy),where U is unary, P is binary, and 3 ! y is read "There is exactly l) This paper is based on a part of the author's doctoral dissertation [3] in the Department of Mathematics at the University of California, Berkeley. Part of this work was carried out while the author was a National Science Foundation Graduate Fellow; also, part of this work wm supported by NSF Grant No. GP-24532. The author is grateful to ROBERTVAUGHT and WILLIAMCRAIQ for useful suggestions which improved readability.
90
RONALD FAUIN
one y?‘)such that the complement of every generalized spectrum is a generalized spectrum (and thus the complement of every spectrum is a spectrum) iff the complement 2 of LZ? is a generalized spectrum. 2. Definitions
Denote the set of natural numbers (0,1, 2, . . .} by N. If 9’ is a similarity type and % is an 9’-structure (both defined earlier), then we denote the universe of 8 by 181,and the interpretation (in %) of S in 9’by 8%. If 8 and 23 are isomorphic 9’-structures via the isomorphism g, then we write g:
8 z 23.
Assume that 9’ and Y are disjoint similarity types, that % is an 9’v F-structure, and that ‘$3 is an 9’-structure. Then 8 is a n expamion of 23 (to Y w Y ) , written = 1231, and 8%= f18 for each Xin 9. 23 = % Y, if Assume that % is an 9’-structure, and that a E 181.We denote by (8,a ) the Y w {c}. structure ‘$3, such that 23 “9’= ‘2l and cB = a, where c is a new constant symbol, chosen by some fixed rule. If % is an 9’-structure and B l%l, then by 8 I B we mean the substructure of 8 with universe B. If ‘p is a formula with distinct free individual variables x,, . . ., X k , and if a,, . . ., ak E E1 81,then by 8 1 y [ z ; : : : zwe ] , mean that y is satisfied in % when x i is interpreted by ai (1 g i k). An atomic 9’-formuk is a formula t , = t , or 8t, . . . tk, where each ti is a constant symbol in 9’ or an individual variable, and where X is a L-ary predicate symbol in 9’. A negation-atomic 9’-formula is the negation of a n atomic 9’-formula. A first-order formula ‘p is in prenex normal form if it is of the form QIxl . . . Q m x , , , ~ , where each Ql is V or 3, each xi is an individual variable, and y is quantifier-free. We say that ‘p starts with m quantifiers. If I+I is a first-order formula, then by 3Yq, we mean the (existential second-order) formula 38, . . . 3X,’p, where 9’ = {XI, . . ., d n 1 }similarly ; for V Y ’ p . If T is a set of formulas, then by r\(cp : y E we mean the conjunction of the formulas in P;similarly for V { V : 9 EI’}.
r
r},
3. Fraiss6 games I n this section, we will describe some games, of the type first introduced by R. FRAISSE. Let Y be a similarity type, let % and 113 be 9’-structures with 1%1 n 1231 = 0, and let r be a natural number. Then we can informally describe a game as follows: Player I moves first, and picks a point in either (a(or @(. Then player I1 picks a point in (the universe of) the opposite structure. Let a, be the point picked in I%], and b, the point picked in 1231. On player 1’s second move, he again picks a point in either /%I or 1231, and player I1 then picks a point in the opposite structure. Let a2 be the point picked in 181 on either player 1’s or player 11’s second move, and b, the point picked in 1231. Continue until player I and player I1 have each taken r moves (i.e., until r round9 of the game have been played). Let { c L :1 i =< k} be the set of constant symbols in 9 (k = 0 is possible). Let ar+l(br+i) be c y ( c y ) , 1 5 i k. Then player I1 wins iff the following two conditions hold :
91
MONADIC GENERALIZED SPECTRA
s
1. { ( a l ,b l ) : 1 5 i r + k } is a one-one function, say g . That is, ai = aj iff bi = bj (1 i 5 r k,l 9 J +k). 2 . g: (II I { ~ 1 .> . .>a r + k } z % I { b l , . . *, b r + k } .
s
+
sr
We will now inductively define a notion % 8, which corresponds to the intuitive notion of player I1 having a winning strategy in the game just informally described. We say % ,2 ‘3 if for every quantifier-free 9-sentence a, we have 8 != a iff 23 C u. (If Y contains no constant symbols, then there are no quantifier-free 9-sentences.) For each natural number r, we say % -r+l % if 1. For each a in l%l there is b in 181such that (a,(I) - r (8,b ) . 2. For each b in 181there is a in such that (%, a ) - p (23, b ) . It is clear that w r is a n equivalence relation, for each r. I n our proofs, we may talk of players I and 11, of player 1’s first move, and so on. It will be clear how t o make the arguments formal. We will now consider another game. Let Y be ’as before, and let 9- be a finite set of predicate symbols with 9n9- = 0. Let % and % be 9’-structures, and let r be a natural number. On player I’s first move, he selects an 9u F-structure %’ such that W Y = = %. Then player I1 selects an Y LJ Y-structure Bf such that 8’ 9 = %. Player I1 wins iff af w r 23’. Formally, we say % -+: 8 if for each expansion M‘ of % to Y LJ 9, there is a n expansion ‘23’ of % to 9’LJ 9- such that af w r !Bf.If F is a set of d distinct unary predicate symbols, then write 8 P-: 8 for % -+: 8. It is easy t o see that +-: is transitive and reflexive, but as we shall see, it is not necessarily symmetric. The corresponding symmetric notion would be % t.,”23, which holds if B + : % a.nd 23 -+J3. We will prove the next theorem (which is essentially due to FRAYSSE [5]) in more generality than we will need. If 9is a finite set of unary predicate symbols, then call 9monadic. Let X be a class of 9-structures. Following TARSKI [8], we say that a class .d of Y-structures is in P C ( X )( P C l ( S ) )if d = {a E X : % C 39-u) for some (monadic) F and some firstorder Y u 9--sentence a. We are interested in the case when X is the class of finite {P}-structures and 9 is monadic. T h e o r e m 1. A s s u m e d E X . Then d E P C ( X )( P C , ( X ) )i f f there is some (monadic) F and some natural number r such that whenever % E&, 8 E X , and % +? 23, then N~
-
r
r
% E d .
Proof “*”. Let d = {a E S : % C 3Yo}. We can assume without loss of generality that 9- contains only predicate symbols and that a is in prenex normal form. Say a starts with r quantifiers. Assume that 3 E d,that 23 E X , and that % -+?%. We will show that % ~ dWe. will prove this in the special case when u is Vx3yM, where IW is quantifier-free. The general case is very similar. Assume that 8 4 d.Then 8 C V9- 32 Vy M. Find an 9’w 9-structure 3‘ such that a’ I‘ 9 = % and %’ k Vx 3yM. Let 23’ be an arbitrary 9w 9-structure with 8’ 9 = 23. We will show that not 3’ ‘$3’. On player 1’s first move, he picks b, in N
r
123’1 such that 8‘k Vy
- /6:1. 2M
N
Let al in 18’1be player 11’sresponse. Then 8’I=3yM
On player 1’s next move, he picks a2in player 11’s response. Then %’ k
,
1 Wl such that
- [;l!j. M
%f I=M
[z,ij.
Let b, in 193‘1 be
So player I1 has clearly lost.
92
RONALD FAUIN
“e”. For each finite set 9’ of predicate symbols, we will define the notion of an m-type,(Y’), for 0 5 m 6 r, by backwards induction (from m = r to m = 0.) An r-type,(Y’) is any formula
[
r\{O : 8 k 8 ” * * .
and O is a n atomic or negation-atomic 9-formula) ,
a,. . .a,
such that 8 is an 9‘-structure and a,, . . ., a, E 181. For each set A of (m + 1)types,(9’), the following is an m-type,(Y’) : A{3vrn+1v : Y E A } A A{Vvm+i Y : v # A }* It is easily proved by induction that for any 9”-structure 8 and any a,, . . ., a, in N
181, we have 8
:[ : :]:I
t rp
for exactly one m-type,(Y) rp. For each m (0
5 m 5 r),
there is only a finite number of &?tinct m-typesl.(Y’)).and each has free variables 01,
. . .)Urn.
For each 9’-structure 8, and each natural number r, denote U, the O-type,(Y‘) such that 8 t u, by a(%, r ) . It is easy to see that if 8 and b are 9‘-structures, then 9l ,8 iff 8 b a(8, r ): player 11’s strategy is to make sure that after the mth move, if a,, . . ., a, (b,, . . ., b,) are the points that have been picked in I S1 (Ibl),then
-
If 8 is an 9-structure, then let z(S, 9, r ) be the (finite) conjunction A{Wu(W, r ) : 8‘is an 9 u 9-structure with x‘ r 9 = 8 } .It is easy to see that if b is an Y-structure, then 8 4 : b iff 114 k T(%, Y, r). 23, then Let d X have the property that whenever % E d,23 E X , and b E d.Then d = {b E X :8 t V(z(8, Y, r ) :8 ~ d } } . So d E P C ( X ) , because a finite conjunction or disjunction of existential second-order sentences is an existential second-order sentence. Likewise, if 9-is monadic, then E PC,(X). 4. Nonelosure under complement I n this section, we will show that for each pair d, r of natural numbers, there are structures 8 and such that 8 is a cycle, 2 ‘3 is the cardinal sum of two cycles, and % -+f!23. I (In fact, % = 8 @ (.S for some cycle(.S.)It then follows easily from Theorem 1, that the class of connected, finite {P)-structures is not a monadic {PI-spectrum (a {P}structure 9l is connected if for each a, b in 181 there is a finite sequence a,, . . .,a, of points in 131 such that a, = a, a, = b, and either PNapi+,or PNai+,ai, for 1 6 i < n). However, as we will see, the class of nonconnected, finite (2‘)-structures is a monadic {P}-spectrum. Let 9 = {P,U , , . . ., U d ) as before. Let a’ be a n Y-structure, with %’ {P}the cardinal sum of cycles. If a E [all,then define the weak marking m on a to be the subset m 5 { U,, . . ., U,}, where U iE m iff Uya. Assume that 1. a,, . . ., a, E 18’1. t). 2. mi is the weak marking on ai (1 i 3. PWa,a,+, (1 i < t ) .
r
93
MONADIC GENERALIZED SPECTRA
Then (ml,. . ., m,) is a weak sequence (of length t ) in W.A weak sequence (m,, . . ., mt> occurs at least n times in %' if there are a t least n different t-tuples (a,, . . .,at) such that the three conditions above hold. Define v: N + N by v(0) = 1,
v(r + 1) = 2v(r) 4- 1 .
Let n ( r ) = m ( r ) for each r. The next lemma is the main tool in proving our result. L e m m a 2. Let r be a natural number, and let 'ill and 6 be Y-structures, with 9 as above, such that 'ill { P } and 6 { P } are each cycles of length at least v(r + 1). Assume % 0 6. that every weak sequence of length w(r) in B occurs at least n ( r )times in 'ill.Then \w
r
r
-
P r o o f . Let 23 = $!j@ 6, where f : \w z 9. We write f(a) as a, for each a in I%/.We assume that 1%1 A 1931 = 0. Assume that each player has made k selections of points. Then the strong marking m = m(k, a ) on a point a in 1591, where 59 is 9I or 8, is the subset m of { U , , . . ., ud}U v (1, . . ., k ) , where U , E m iff U f a , and iE m iff the point a was selected by either player in the ith round. For each natural number n, denote by S(a, n) (X'(a, n)) the (2n + 1)-tuple <m-,, m-,+,, . . ., m,, . . ., mn>, where for some (2n + 1)-tuple a r - p } GZ B I { b i, . . *, b r - p } .
3. &'(a,, v ( p ) )= X'(b,, v(p)), 1 6 i 5 r - p . 4. If 6 , then X(a,, v ( p ) )occurs a t least n ( r ) times in 'ill.
+ x,
+
When p = r, these are trivially true. Assume that these are true for p = s 1; we will show that player I1 can play so that they are true when p = s. On his (r - s)th move, player I can pick it point in either !%Ior 1933).Assume first that he picks a = ar+ in I%/.There are now three cases. Case 1. #'(a, v(s)) is not clean. Intuitively speaking, player I has selected a point a which is near another point a' that has already been selected. If b' is the point in IBI which was selected in the same round as a', then player 11's strategy is to pick a point b in 1931 such that b relates t o b' (with respect t o distance and direction) as a relates t o a'. Formally, we know that a, E C(a, v(s)), for some i with 1 5 i 5 r - s - 1. By assumption, S'(a,, w(s + 1)) = S'(b,, v(s + 1)). For some j 5 v(s), there are 5,. . , ., x, in with p'x~~+~, for 1 k < j , such that either z1= a and x, = a,, or x1 = a, and xJ = a. If the former is true, then find y,, . . ., y, in (81, with PByhyk+l, f o r 1 - k < j , and with yJ = 6,. Set br+ = y l . The latter case is similar, with y, = b, I and yJ = br+.
94
RONALD FAAOIN
+
Now C(a, w(s)) C(a,,w(s l)),and so it is easy to check that the four conditions hold with p = S. For example, #'(a,+, w(s))= #'(br-s, w(s)) since #'(a,, w(s 1))= = #'(bL, W ( S 1)).
+
+
Case 2 . #'(a, w ( s ) )is clean and #'(a, w(s)) is clean. Player I has selected a point a which is not near any point that has been selected before; also, ti is not near any point which has been selected before. Let br+ = i i : that is, player I1 seIects ii. The four conditions hold for p = s. Case 3. S'(a, ~ ( r )is) clean and S ( a ,w(s))is not clean. Player I has selected a point a which is not near any point that has been selected before, but a is near a point that has been selected before. So player I1 cannot pick a ; he must instead pick a point in 161 whose immediate neighborhood looks like the immediate neighborhood of a.
c,
We know that b , E C(ii, ~ ( s ) for ) some i with 1 =< i =< r - s - 1. Then b, + because if 6, = a,, then a, E C(a,w(s)), and'so #'(a, w(s)) would not be clean. By con1))= #@,,w(s 1)) occurs a t ditions 3 and 4, we therefore know that #(a,, w(s least n(r) times in %. Now C(a,w(s))5 C(b,,w(s + l ) ) , and so #(a, w(s)) = #(a, w(s)) occurs a t least n(r)!times in 3 (and 8).Now UL -l:; C(b,,w(s)) contains a t most ( r - s - 1) w(s 1) 5 ( r - 1)w(r) < n(r) points. So we can find d in Igl such that S(d, w(s)) = #(a,w(s)), and with d not hU;:-l C(b,, w(s)).Hence S'(d, ~ ( 8 )is) clean. Let br-* = d. The four conditions now hold for p = s.
+
+
+
Now say player I picks b = br+ in 181. There are two cases: b E Case 1'. b
E
131. For some a, we have b
or b
E
161.
= 6.There are three subcases.
Case l'a. #'(a;, w(s))is not clean. This is dealt with exactly like Case 1. Case l'b. #'(a, w(s)) and #'(a, v(s))are both clean. Let ar-* = a. Case l'c. #'(a, w(s)) is clean, and #'(a, w(s)) is not clean. Then as in Case 3, we can find d i n /%I such that X ( d , w(s)) = #(a, w(s)), such that S ( d , ~ ( s )i s) clean, and such that #(d, w(s))occurs a t least n(r) times in %. Let ar-$ = d. Case 2'. b E 161. There are two subcases. Case 2'a. #'(b, v(s))is not clean. This is dealt with like Case 1 (and Case l'a). Case 2'b. S ( b , w(s)) is clean. Now each weak sequence of length w(s) in 6 occurs a t least n(r) times in 8.As in Case 3, we can find d i n (81such that S(d, w(s)) = w(s)), with B(d, ~ ( s ) clean. ) Of course, S(d, w(s)) occurs at least n ( r ) times in a. Let ar-s = d. The induction is compIete. When p = 0, we see from conditions 1 and 2 that player I1 wins.
#(a,
Let p = { p , , . . ., p,) and q =