University of Pennsylvania ScholarlyCommons

IRCS Technical Reports Series Institute for Research in Cognitive Science

October 1995

Finite and Finite Variable

Eric Rosen University of Pennsylvania

Follow this and additional works at: https://repository.upenn.edu/ircs_reports

Rosen, Eric, "Finite Model Theory and Finite Variable Logics " (1995). IRCS Technical Reports Series. 139. https://repository.upenn.edu/ircs_reports/139

University of Pennsylvania Institute for Research in Cognitive Science Technical Report No. IRCS-95-28.

This paper is posted at ScholarlyCommons. https://repository.upenn.edu/ircs_reports/139 For more information, please contact [email protected]. Finite Model Theory and Finite Variable Logics

Abstract In this dissertation, I investigate some questions about the model theory of finite structures. One goal is to better understand the expressive power of various logical languages, including first order (FO), over this . A second, related, goal is to determine which results from classical model theory remain true when relativized to the class, F, of finite structures. As it is well known that many such results become false, I also consider certain weakened generalizations of classical results.

k k I prove some basic results about the languages L ∃ and L ∞ω∃, the existential fragments of the finite k k k variable logics L and L ∞ω. I show that there are finite models whose L (∃)-theories are not finitely k axiomatizable. I also establish the optimality of a normal form for L ∞ω∃, and separate certain fragments of this logic. I introduce a notion of a "generalized preservation ", and establish certain partial k positive results. I then show that existential preservation fails for the language L ∞ω, both over F and over the class of all structures. I also examine other preservation properties, e.g. for classes closed under homomorphisms.

In the final chapter, I investigate the finite model theory of propositional modal logic. I show that, in contrast to more expressive logics, model logic is "well behaved" over F. In particular, I establish that various that are true over the class of all structures also hold over F. I prove that, over F a class of models is FO-definable and closed under bisimulations if it is defined by a modal FO sentence. In addition, I prove that, over F, a class is defined yb a modal sentence and closed under extensions if it is defined by a ◊-modal sentence.

Comments University of Pennsylvania Institute for Research in Cognitive Science Technical Report No. IRCS-95-28.

This thesis or dissertation is available at ScholarlyCommons: https://repository.upenn.edu/ircs_reports/139 Institute for Research in Cognitive Science

Finite Model Theory and Finite Variable Logics Ph.D. Dissertation

Eric Rosen

University of Pennsylvania 3401 Walnut Street, Suite 400C Philadelphia, PA 19104-6228

October 1995

Site of the NSF Science and Technology Center for Research in Cognitive Science

IRCS Report 95-28

Finite Model Theory and Finite Variable Logics

Eric Rosen

A Dissertation

in

Philosophy

Presented to the Faculties of the UniversityofPennsylvania in Partial Fulllment of the

Requirements for the Degree of Do ctor of Philosophy

Scott Weinstein

Sup ervisor of Dissertation

Samuel Freeman Graduate Group Chairp erson

c

Copyright

by Eric Rosen

Tomyparents iii

Acknowledgments

I am extremely grateful to my advisor Scott Weinstein for all that he has taughtme

and for the help and encouragement that he has provided so graciously over the last four

years It has b een an immense pleasure working with him he made this pro ject fun and

exciting Scott originally suggested that I pursue nite mo del theory a sub ject which

has develop ed into an active and fertile area of research and he continues to guide me in

the right direction This dissertation owes a great deal to his ability to nd and ask the

most interesting questions Manyofmy results are attempts to answer problems that he

originally p osed I could not haveasked for a b etter advisor

Iwould like to thank Steven Lindell for the manyways in whichhehelpedmewith

this work Scott Steven and I have met regularly to discuss a variety of topics in nite

mo del theory during which time I learned much of what I know ab out descriptive com

plexity theorySteven also listened patiently to manyofmy ideas and provided useful

feedback Finally asamember of my dissertation committee he read mywork carefully

and suggested many improvements

I am also grateful to Maria Bonet Anuj Dawar Yuri Gurevich and James Rogers

for valuable discussions on topics covered in my dissertation Marco Hollenb ergs detailed

umber comments on the nal chapter help ed me improve the presentation and eliminate a n

of errors

Iowe a sp ecial debt of gratitude to Prof Johan van Benthem In March of he

visited Penn to give a series of lectures on his research on mo dal logic At that time I

hadanumber of very interesting discussions with b oth him and Scott during which they

suggested lo oking at this work on mo dal logic from the p ersp ective of nite mo del theory

Since then Prof van Benthem has made more many useful recommendations whichhave iv

b een very helpful Chapter contains some results in this area

Long b efore myadventures in logic b egan I entered the Penn philosophy department

intending to pursue myinterest in Wittgenstein and the philosophy of language Although

things have turned out dierentlyIwould like to thank Professors Thomas Ricketts and

Gary Ebbs for what they taught me ab out analytic philosophy and for what they showed

me ab out how to do philosophy Thank you also to my friends here who made gradu

ate scho ol more interesting and enjoyable Peter Dillard Amy Herzel Scott Kimbrough

Rukesh Korde Shari RudavskyPeter Schwartz Lisa Shab el and Larry Shapiro Alisa

and Alan my sister and brother have also b een go o d friends From the very b eginning

my parents instilled in me a love of learning For all their love and supp ort I dedicate this

dissertation to them v

ABSTRACT

Finite Model Theory and Finite Variable Logics

Eric Rosen

Sup ervisor Scott Weinstein

In this dissertation I investigate some questions ab out the mo del theory of nite struc

tures One goal is to b etter understand the expressivepower of various logical languages

including rstorder logic FO over this class A second related goal is to determine

which results from classical mo del theory remain true when relativized to the class F of

nite structures As it is wellknown that many such results b ecome false I also consider

certain weakened generalizations of classical results

k k

Iprove some basic results ab out the languages L and L the existential

k k

fragments of the nite variable logics L and L I show that there are nite mo dels

k

whose L theories are not nitely axiomatizable I also establish the optimalityofa

k

and separate certain fragments of this logic I intro duce a notion normal form for L

of a generalized preservation theorem and establish certain partial p ositive results I

then show that existential preservation fails for the language L bothover F and over

the class of all structures I also examine other preservation prop erties eg for classes

closed under homomorphisms

In the nal chapter I investigate the nite mo del theory of prop ositional mo dal logic

Ishow that in contrast to more expressive logics mo dal logic is wellb ehaved over F In

particular I establish that various theorems that are true over the class of all structures

also hold over F I prove that over F a class of mo dels is FOdenable and closed under

bisimulations i it is dened byamodalFOsentence In addition I prove that over F

a class is dened by a mo dal sentence and closed under extensions i it is dened bya

mo dal sentence vi

Contents

Acknowledgments iv

Abstract vi

Intro duction

Preservation theorems

Preliminaries

Logical equivalence and EhrenfeuchtFraisse games

k k

Basic nite mo del theory for L and L

Existential preservation

Generalized preservation theorems

The failure of existential preservation for L

Other generalized preservation theorems

The class HOM

Generalized preservation theorems for HOM and MON

Mo dal logic over nite structures

Background

Preservation theorems

Conclusion

Bibliography vii

Chapter

Intro duction

Finite mo del theory investigates the mo del theory of nite structures This sub ject in

teracts with a variety of elds from math logic and computer science including classical

mo del theory graph theory and complexity theory The dierent areas and asp ects of

nite mo del theory are unied byaninterest in the expressivepower of logical languages

In this dissertation I pursue mo del theoretic questions p ertaining to denabilitypaying

particular attention to preservation theorems Some of these problems are just nite ver

sions of results from classical mo del theory That is we can ask whether a classical theorem

remains true when restricted to the class F of nite mo dels Other questions are varia

tions on standard ideas Chapters and for example examine preservation theorems

involving languages other than rstorder logic

It is well known that many theorems from classical mo del theory b ecome false over

the class of nite mo dels see For example the LosTarski theorem states that a

rstorder sentence denes a class of mo dels that is closed under extensions if and only if

it is equivalent to an existential sentence Tait showed that this prop osition b ecomes

false when relativized to the class F That is there is a sentence such that Mo d

f

the class of nite mo dels of is closed under extensions but is not equivalentover F to

any existential sentence As a result of these kinds of failures it would b e interesting to

nd classical theorems that remain true over F But negative results can also b e viewed

as raising new problems p ertaining to what we call generalizedpreservation theorems For

example Taits example suggests that we lo ok for some alternativecharacterization of the

rstorder denable classes of mo dels that are closed under extensions Chapter contains

some results in this direction Ialsoinvestigate preservation theorems for other logics

prominent in nite mo del theory

The remainder of this intro duction provides some information ab out more general as

p ects of nite mo del theory that provide a setting for what follows Below I briey discuss

the imp ortance of logical languages other than rstorder logic In Section I then de

scrib e preservation theorems in more detail and briey summarize the topics covered in

the remaining chapters Section contains notation background information preliminary

denitions and some basic results Section describ es the connection b etween logical

equivalence and EhrenfeuchtFraisse games

Over the class of nite mo dels central results of classical mo del theory either b ecome

obviously false such as the or meaningless like the Lowenheim

Skolem theorem The failure of compactness in particular means that most standard

pro ofs of classical results are invalid over F Furthermore it has b een shown that when

relativized to the class F many of these results actually b ecome false includin g the Los

Tarksi theorem the Beth denability theorem Craigs interp olation theorem see

and Lyndons lemma see In addition many natural and computationally simple

prop erties suchasparity and graph connectedness are not expressible in FO As a con

sequence rstorder logic FO is not as natural and attractive over F asitisinthe

general case

A central motivation for the investigation of other logics has b een the desire to nd

logical characterizations of computational complexity classes An imp ortant early result

from Fagin says that a prop erty that is a class of mo dels is in NP i it is denable by

an existential secondorder sentence Since then Immerman and others haveshown that

over the class of ordered nite structures many other complexity classes are capturedin

this sense bydierent logics This research has highlighted the interest of a varietyof

xed p oint logics which extend FOby adding some sort of op erator

Barwise showed that over a xed structure every formula in least xed p oint logic

is equivalent to a formula in L innitary nite variable logic which is dened b elow

Kolaitis and Vardi observed that this remains true over the class F Although nite

variable logic lo oks rather strange b ecause of the way in whichvariables are reused it has

b een useful for proving results ab out the expressivepower of xed p oint logics since there

is a nice algebraic characterization of logical denability for the language From a very

dierent p oint of view others see have argued for the relevance of nite variable logic

to mo dal logic Because of these connections as well as my b elief in the intrinsic interest

of this logic it has b een aorded considerable attention in this dissertation Chapter in

particular is devoted to basic questions ab out the mo del theory of the existential fragments

k k

of L and L

Various kinds of questions arise ab out the expressivepower of logical languages As

mentioned ab ove Fagin and Immerman have established close connections b etween the

complexity of describing a prop erty of nite structures in a logical language and the com

plexity of computing the prop ertyonaTuring machine or some other abstract mo del of

computation A ma jor op en problem is to determine whether there is a logic that can

express exactly those prop erties that are in P Given two logics L and L we can also ask

ab out their relative expressivepower that is is every sentence in L equivalent to some

sentence in L Finallygiven a single prop ertysuch as graph planarity and a logic L

we can ask whether there is a sentence in L that expresses the prop erty

Toshow that a prop erty can b e dened in L it suces to exhibit a sentence that

expresses it On the other hand negative results require a more general metho d Over the

class of all structures one generally uses compactness over F these kinds of results are

most often established using EhrenfeuchtFraisse typ e games This technique which also

works in the classical setting plays an imp ortant role in nite mo del theory and has b een

applied to logics other than FO including esp ecially nite variable logics and fragments

thereof Some of these games are dened in Section

Preservation theorems

Classical preservation theorems establish a connection b etween syntactic and semantic

prop erties of rstorder logic In particular they are prop ositions of the following form

A class of mo dels C isFOdenable and closed under preserved under some

sp ecied algebraic op eration i C is dened byaFOsentence of some sp ecied

syntactic form

Thus the LosTarski theorem relates classes closed under extensions to existential sen

tences The Homomorphism preservation theorem states that a class C is FOdenable

and closed under homomorphisms i it is dened by a p ositive existential sentence

We remarked ab ove that one asp ect of nite mo del theory has b een the attempt to

determine which classical theorems remain valid over the class of nite structures It was

also noted that essentially every known answer is negative A fundamental motivation for

this dissertation has b een to try to nd p ositive mo del theoretic results that hold over

F To this end weintro duce a generalization of the notion of a preservation theorem

in order to formulate certain weaker versions of classical theorems that wewould liketo

show remain true over F The starting p oint for our investigation is Taits result that

the LosTarski theorem fails nitely This led us to ask whether there is a natural logic

stronger than FO such that every FOdenable class that is closed under extensions is

dened by an existential sentence of this logic

This question also suggests that weinvestigate preservation theorems for these stronger

logics For example if there is a logic L that contains FO and has an existential preservation

theorem over F then the answer to the previous question must b e yes One of the main

results of this dissertation is that existential preservation do es not hold for L either

over F or over all structures

k

Chapter contains some basic results ab out the mo del theory of the languages L

k k k

Weshow the existential fragments of the nite variable logics L and L and L

k

that there are nite structures whose L theories are not nitely axiomatizable We

k

also establish the optimality of a normal form for L due to Kolaitis and Vardi and

separate certain fragments of this language

Chapter discusses preservation theorems for classes closed under extensions Section

establishes some generalized preservation theorems for fragments of rstorder logic

In Section weprove that existential preservation fails for L In Chapter we

examine generalized preservation theorems for other classes of mo dels including those

that are monotone and those that are closed under homomorphisms

Chapter initiates the investigation of the nite mo del theory of mo dal logic which

it is well known can b e viewed as a fragmentofFO The results here indicate that in

us we prove that contrast to stronger languages mo dal logic is wellb ehaved over F Th

some preservation theorems due to van Benthem and his collab orators remain true over F

A somewhat op enended question raised by this work is the extent to which these

can b e generalized to apply to stronger fragments of FO esp ecially those considered in

Recently connections have emerged b etween mo dal logic and certain areas of theoretical

computer science We hop e that some of our results and the techniques develop ed here

will b e of interest to researchers in these elds

Preliminaries

Let F b e the collection of nite structures of signature We will assume that the universe

of any A F is an initial segmentof N f g We will often use A B etc to

denote b oth a structure and its universe when no confusion is likely to result We assume

that the signature is nite and contains no symbols we suppress mention of

when no confusion is likely to result A boolean query CF is a class of nite structures

that is closed under isomorphisms We use C to range over b o olean queries In Chapters

and we fo cus on b o olean queries which are closed under extensions

if A C and A B then B Cg Denition EXT fC F j A B C

Let L b e a logical language and let be a sentence of L Mo d fA j A j g is the

Lclass determined by and Mo d fA F jA j g is the b o olean query expressed

f

by Wesay that C is Ldenable just in case it is the b o olean query expressed by some

sentence L We will often use L to denote the of Ldenable b o olean queries

We let FO denote rstorder logic L the usual innitary extension of rstorder logic

k

which allows conjunction and disjunction over arbitrary sets of formulas L the fragment

of FO consisting of those formulas all of whose variables b oth free and b ound are among

S

k k

thek variable fragmentof L L L We x x and similarly L

k

k

let FO denote the set of existential formulas of FO that is those formulas obtained

by closing the set of atomic formulas and negated atomic formulas under the op erations

of conjunction disjunction and existential quantication We dene L the set of

existential formulas of L similarly but require in addition closure under innitary

k

conjunction and disjunction We let L consist of the formulas common to FOand

k k

L and we dene L andL similarly

A Datalog program P is a collection of rules of the form

k

Such a rule has a head and a body Each of the is either an inequalityor

k i

a literal over the signature where and are disjoint consists of the extensional

relations and constants of P and consists of the intensional relations of P The heads of

all rules are built from intensional relations and intensional relations o ccur only p ositively

throughout P The program contains a distinguished intensional relation R of arity n

and determines an nary query over structures in F The value of this query for a given

A F is the value of R when the program is viewed as determining leastxed p oints for

eachoftheintensional relations with resp ect to a simultaneous induction asso ciated with

the program The reader may consult for further details and discussion As with

logics w e use Datalog to refer to the class of queries computed by Datalog

programs as well as to the class of programs themselves Datalog programs are dened

similarly except that all the are restricted to b e p ositive literals even those built from

i

extensional relations Observe that Datalog iscontained in the least xedp oint

extension of rstorder logic LFP

In our current notation the failure of the LosTarski Theorem over nite structures

may b e expressed as

FO EXT FO

This raises the question of whether FO EXT is contained in the existential fragment

of some stronger logic The following prop osition completely characterizes the relative

expressivepower of the existential fragments of the logics in whichwe are interested

Prop osition

FO Datalog L L EXT

Proof It is easy to see that every query in FO can b e expressed by a program in

Datalog whichmakes use of no recursion It is wellknown that this inclusion is

strict for example the query s tconnectivity is expressible in Datalog but not in FO

has b een noted by Afrati Cosmadakis and The inclusion of Datalog in L

Yannakakis see also the argumenttoshowthisisavariant of the pro of that

least xedp ointlogiciscontained in L over the class of nite structures see

Afrati Cosmadakis and Yannakakis also exhibit queries which witness the separation

of Datalog and L even over the class of p olynomial time computable queries

The identitybetween L and EXT has b een noted by Kolaitis and indep endently by

Lo see and Finally it is easy to construct p olynomial time computable b o olean

queries in EXT whicharenotinL For example let C b e the query over the signature

fE s tg of sourcetarget graphs that says that there is an E path from s to t whose length

is less than half the cardinality of the structure It is clear that CEXT It is also easy to

verify that C is not in L and therefore not in L by a straightforward application

raisse game whichwe review b elow of the k p ebble EhrenfeuchtF

The ab ove prop osition together with the failure of the LosTarski Theorem in the nite

case suggests the following questions

Is FO EXT L

Is FO EXT Datalog

Is L EXT L

Clearly a p ositive answer to the second or third question would imply a p ositive answer

to the rst In Chapter weprovide partial p ositive answers to the rst and second

questions and a negative answer to the third question Recently Martin Grohe has

proved that the answer to question is no

Logical equivalence and EhrenfeuchtFraisse games

Let L b e one of the logical languages wehavedenedabove Given a structure A the

Ltheory of A is the collection of sentences of L which are satised by A Wesay that A

is Lequivalent to B if and only if the Ltheory of A is equal to the Ltheory of B and

wesay that A is Lcompatible with B if and only if the Ltheory of A is contained in the

Ltheory of B Note that if L is closed under negation then the relations of Lequivalence

k k

and Lcompatibility coincide whereas for languages like L and L these relations

k k k k k k

for L equivalence L and are distinct We use the notations

k k

compatibility resp ectively More generally equivalence L compatibilityandL

k

if a and b are j tuples of elements from A and B then wewriteA a B b i for all

k

x L if A j a then B j b formulas

The main to ol for studying these relations are renements of the EhrenfeuchtFraisse

k

game Barwise characterized L equivalence in terms of partial isomorphisms while

k

Immerman and Poizat provided related p ebble game characterizations of L

equivalence Kolaitis and Vardi characterized compatibility in the negation free frag

k

mentofL b oth in terms of collections of partial homomorphisms as well as in terms

of a onesided p ositiveversion of the p ebble game Belowwe use a minor variant of the

k

approachintocharacterize L compatibility

A set I of partial isomorphisms from A to B is said to havethe kbackandforth

property if for all f I such that the domain of f has cardinality k and all a A

b B there is a function g I such that f g and a domg b rng g That is

the k forth prop erty is the onesided version going forth from A of the k backandforth

prop erty

Barwise proved the following prop osition whichgives an algebraic characterization

k

equivalence of L

Prop osition Barwise Let A and B be structures of signature and let h be the

A A B

with domh fc j c g such that hc c for al l c The fol lowing

conditions areequivalent

k

B A

artial isomorphisms from A to B such that There is a non I of p

a I is closed under subfunctions

b I has the k backandforth property

c for al l f I f h is a partial isomorphism from A to B

In a similar spirit Kolaitis and Vardi gave an algebraic characterization of the

k

compatibility relation for the negation free fragmentofL in terms of collections of

partial homomorphisms with the k forth prop ertyWe adapt their approach to the case of

k

L in the following theorem

Prop osition Kolaitis and Vardi Let A and B be structures of signature and

A A B

let h be the map with domhfc j c g such that hc c for al l c The

fol lowing conditions areequivalent

k

A B

There is a nonempty set I of partial isomorphisms from A to B such that

a I is closed under subfunctions

b I has the k forth property

c for al l f I f h is a partial isomorphism from A to B

Both Prop ositions and can b e expressed more colorfully in terms of p ebble games

k

This approachto L equivalence was intro duced by Immerman and Poizat and

k

compatibilityby Kolaitis and Vardi In order to state the as an approachtoL

relevant results in a suitably rened form we require the notion of the quantier rank of a

formula We state this denition for formulas of L since all the languages we consider

are fragments of it

Denition The quantier rank of L qrisdened by the fol lowing induction

qr if is atomic

qr qr

V W

qr qr supfqr j g

qrx qrx qr

The nround k p ebble EhrenfeuchtFraisse game on A and B is played b etween two

players Sp oiler and Duplicator with k pairs of p ebbles The Sp oiler

k k

b egins each round bycho osing a pair of p ebbles that mayormay not b e in play

i i

on the b oards A and B Hebyconvention the Sp oiler is male the Duplicator female

either places on an elementofAor on an elementofB The Duplicator then plays

i i

the remaining p ebble on the other mo del The Sp oiler wins the game if after any round

m n the function f from A to B which sends the p ebbled by to the element

i

p ebbled by and preserves the denotations of constants is not a partial isomorphism

i

k

otherwise the Duplicator wins the game The nround game is the onesided version of

the nround k p ebble EhrenfeuchtFraisse game in which the Sp oiler is restricted to play

a p ebble into A at every round while the Duplicator resp onds by playing into B the

i i

winning condition remains the same Both the k p ebble EhrenfeuchtFraisse game and its

onesided varianthave innite versions whichwe call the eternal k p ebble Ehrenfeucht

k

Fraisse game and the eternal game In these games the play continues through a

sequence of rounds of order typ e The Sp oiler wins the game if and only if he wins at

th

the n round for some n as ab ove otherwise the Duplicator wins In describing the

play of p ebble games b elow we will often use S to refer to the Sp oiler and D to refer to the

Duplicator We will also often use etc to refer to b oth p ebbles and the elements

i i

they p ebble at a given round of play

The foregoing nround games may b e used to characterize equivalence and compatibility

k k

of structures with resp ect to L sentences and L sentences of quantier rank n and

the eternal games may b e used to characterize equivalence and compatibility of structures

k k

with resp ect to L sentences and L sentences Given structures A and B we let

kn k

A B if and only if A and B satisfy the same sentences of L of quantier rank n

kn k

and welet A B if and only if every sentence of L of quantier rank n whichis

true in A is also true in B The following two prop ositions use the nround p ebble games

to characterize these relations The rst is due to Immerman and Poizat and the

second is essentially due to Kolaitis and Vardi

Prop osition Immerman Poizat For al l structures A and B the fol low

ing conditions areequivalent

kn

A B

The Duplicator has a winning strategy for the nround k pebble EhrenfeuchtFraisse

game on A and B

Prop osition Kolaitis and Vardi For al l structures A and B the fol lowing

conditions areequivalent

kn

A B

k

The Duplicator has a winning strategy for the nround game on A and B with

the Duplicator playing on B

The next prop osition gives a characterization of the innitary equivalence and compat

ibility relations in terms of the eternal games It is essentially due to Kolaitis and Vardi

Prop osition Kolaitis and Vardi For al l structures A and B the fol

lowing conditions areequivalent

k

a A B

b The Duplicator has a winning strategy for the eternal k pebble Ehrenfeucht

Fraisse game on A and B

For al l structures A and B the fol lowing conditions areequivalent

k

a A B

k

b The Duplicator has a winning strategy for the eternal game on A and B

with the Duplicator playing on B

Kolaitis and Vardi observed that over nite structures innitary equivalence

and compatibility coincide with their nitary analogs

Prop osition Kolaitis and Vardi Let A or B be a nite structure

Then the fol lowing conditions areequivalent

k

a A B

k

b A B

Let B be a nite structure Then the fol lowing conditions areequivalent

k

a A B

k

b A B

The foregoing prop ositions yield the following corollaries concerning denability

Prop osition Kolaitis and Vardi For al l CF the fol lowing conditions are

equivalent

k

C is L denable

k

For al l A C and B CA B

k

For al l A C and B CA B

For al l A C and B C thereisann such that the Spoiler has a winning

k

strategy for the nround game on A and B with the Spoiler playing on A

Chapter

k

Basic nite mo del theory for L 

k

and L 



k k k k

L and L In this chapter we present some basic mo del theory for L L

answering questions concerning nite axiomatizability and normal forms Let L and L

b e logical languages and let T b e a collection of sentences of L Wesay that T is nitely

axiomatizable in L if and only if there is a sentence L suchthatModT

f

k

Mo d Dawar Lindell and Weinstein prove that the L theory of any nite mo del

f

k k

is nitely axiomatizable in L As a corollary they obtain a simple normal form for L

k

over F in particular they showthatevery sentence of L is equivalent to a countable

k

disjunction of sentences of L and is also equivalent to a countable conjunction of sentences

k k

of L Incontrast we showbelow that there are nite mo dels whose L theories are

k

not nitely axiomatizable in L Building on this result weprove that the normal form

k k

for L over F every sentence of L is equivalentover F to a countable disjunction of

k

countable conjunctions of sentences of L exhibited by Kolaitis and Vardi is optimal

k k

when considered as a normal form for L sentences over L

k

We b egin by proving that there are mo dels whose L theories are not nitely

k

atizable in L Our exploits the k extension whichwenow describ e

briey Let b e a purely relational nite signature A basic k type over the signature

is a maximal consistent set of literals over in the variables x x A kextension

k

V V

axiom of signature is a sentence of the form x x x where is a

k k

basic k typ e of signature is a basic k typ e of signature and Over a

xed signature the kGaifman theory is the set of all k extensions axioms of signa

k

ture It is easy to see that for each k there are only nitely many k extension axioms

S

Gaifman showed that the theory T axiomatizes an categorical mo del called

k

k

the random structureFagin proved the law for rstorder logic by showing that

every extension axiom is almost surely true over F Fagins result implies that almost

every A F satises the k Gaifman theory Immerman showed that anytwo mo dels

k

of the k Gaifman theory are L equivalent and Kolaitis and Vardi made use of the

k Gaifman theory in their pro of of the lawforL Wemake the following easy

observation

k

Prop osition Let A j and let B be any nite or innite model Then B A

k

k

Equivalently for al l L if is satisable then A j

k

Proof The pro of follows easily from Prop osition by considering the eternal game on

B and A with the Duplicator playing on A The k Gaifman axioms essentially say that D

can extend a partial isomorphism with domain of size kin every p ossible way Therefore

she has a winning strategy for the game

We observe that this result yields a compactness theorem over nite structures and a

k

nitary analog of the LowenheimSkolem Theorem for L

Corollary For every k thereisann such that for every set of sentences of

k

k

L is satisable if and only if every nite of is satisable if and only

if is satisedina model of size n

k

k

The next prop osition establishes that there are nite structures whose L theory is

k

not nitely axiomatizable in L

k

Prop osition For al l k thereisamodel A F such that the L theory of A

k k

k

is not nitely axiomatizable in L

y nite mo del of the k Gaifman theory over the language of graphs Proof Let A be an

k

kn n kn n n

This and A B such that A B We showthatforany n there is a B

k k

k k k

k

implies that the theory of A cannot b e axiomatized by L sentences of quantier rank

k

k

n and therefore that it is not nitely axiomatizable in L

n

For the purp ose of dening the mo dels B we require the following notion and notation

k

A basic k typ e satises the distinctness condition if for every lkthe formula x

l

x Let f g b e a set of basic k typ es such that

k s

every basic k typ e is equivalent to some and

i

if i j then is not equivalentto

i j

Similarly for each i s let f g b e a set of basic k typ es each of which

i

in i

extends and satises the distinctness condition such that

i

every basic k typ e which extends and satises the distinctness condition is equiv

i

alent to some and

ij

if j j then is not equivalentto

ij ij

n

We pro ceed to dene the mo dels B Let B b e the graph on twovertices with exactly

k k

n

has b een realizes b oth basic typ es Given that B one lo op and no other edges Thus B

k k

n

n

b of elements of dened wenow dene B as an extension of B For eachk tuple

k

k

n

n n

B let b b e the unique i such that B j b and let X fb j j n bg

i

k k

b

bj

n

b e a set of distinct ob jects disjointfromB We supp ose that for any distinct pair of

k

n

k tuples Let X b e the union of all the sets a and b of elements of B X X

a

k

b

n n

n

X We let the universe of B B X The edge relation of B is obtained from that

k k k

b

n

n

b b of B by adding the minimal numb er of edges so that each k tuple satises

k

bj

bj

n

is welldened Wesay that the height of an element b It is easy to see that each B

k

n

intro duced in this construction is the least n such that b B

k

kn n

By Prop osition it suces to describ e a winning strat We rst show that A B

k

k

k n

egy for D in the nround game with D playing on B and S playing on A The strategy

k

k

th m

foreach m n In we describ e for D will allow her to playherm moveonsome b B

k

round D answers the rst moveofSby playing her p ebble on the appropriate elementof

n

to create a partial isomorphism Supp ose that D has played only onto elements B B

k k

m

m where m n LetScho ose p ebble pair to play in round through round of B

l l

k

for l l m We consider two cases If S plays on the same element as some

l l

Doing so she obviously maintains then D must play onto the element p ebbled by

l l

m

a partial isomorphism and succeeds in playing within B On the other hand supp ose

k

on A after that S plays on a distinct elementsuch that the elements p ebbled by

l l

to a tuple of length the round satisfy wemay need to pad the tuple p ebbled by

ij

k by rep eating its last element if all the p ebbles are not in play at this round Before

st

are on a tuple b similarly padded if necessary D plays her m move the p ebbles

m m

that satises She then plays on the element b B therebymaintaining a

i l

k

bj

partial isomorphism This strategy enables her to win the nround game

kn n

Next weshow that A B By Prop osition it suces to show that S can win

k

k

n

the n round game with D playing on B and S playing on A We describ e a strategy

k

k

for playby S which forces D to p ebble an elementofheight at least m by the end of

round m to avoid losing at that round It follows that S wins the n round game

n

have height n S plays as follows He rst places his k p ebbles since all elements of B

k

on a set of k distinct elements which form a k clique that is for every pair of distinct

p ebbled elements a and a A j E a a Sma yplay in this waysince A j By our

k k k

n n

construction ab ove if b b B are distinct elements of the same height B j E b b

k k

n

It follows immediately that any r clique in B containsanelement of height at least r

k

Therefore if S has not won by round k D has p ebbled an elementofheight at least k by

the end of that round Note that in case n k we are done since at round n D

will b e unable to playonto an element of height at least n toformann clique

We pro ceed to describ e the strategy for Ss continuing play under the assumption that

kn Supp ose that through round m k m n D has played a p ebble

to an element of height at least m and that the k p ebbles S has played lie on distinct on

elements of A whichformak clique We showhow S can play to ensure that D must

k

playonto an element of height at least m at round m if she is to preventS

from winning at this round and leave the round with a k clique p ebbled Supp ose that

i

is p ebbling an element b of height greater than the heightofany other element p ebbled in

n

at round m By our hyp othesis the heightofb is at least m Pick j i recall that B

k

k and let a A b e the element p ebbled by S picks up and places it on an

k j j

a A such that

k

A j E a a E a a and

k

for every a A on which one of the remaining k p ebbles lies a a and

k

A j E a a E a a

k

The existence of suchan a follows from the fact that A j We claim that to avoid

k k

losing at this round D must play her p ebble onto an element b of height greater than

j

the heightofb and hence of height at least m Let b b e the element p ebbled by

n

at round m By our construction each elementofB is connected to at most k

j

k

elements of lesser height Therefore from the hyp otheses that S had p ebbled a k clique

at round m and that b is an element of maximal height p ebbled by D at that round we

may conclude that the only element of height the heightofb adjacenttob onto whichD

could play is b itself But this playwould fail to maintain a partial isomorphism with

j

the elements S has now p ebbled at round m by the rst condition wehave imp osed

on the choice of a ab ove Therefore to avoid losing at round m Dmust p ebble an

element of height at least m

The next result follows immediately

k

Corollary Thereare innitely many formulas of L which arepairwise inequivalent

over F

k k

Wenow consider L theories and normal forms for L sentences over F We

k

k

let Th A denote the L theory of A Before pro ceeding we dene the following

k

fragments of L

V V

k k

Let L f j for some L g

W W

k k

Let L f j for some L g

V W V W

k k

Let L f j for some countable L g

W V W V

k k

Let L f j for some countable L g

V

k

Prop osition For al l nite structures Athereisa L such that Mo d

f

k

Mo d Th A

f

k k

k

Proof Observe that Mo d Th A fB F jA B g Let C FMo d Th A

f A f

k

By Prop osition for each B C there is a sentence L such that A j and

A B B

V

k

B j Let It is easy to verify that Mo d Mo d Th A

B B f f

B C

A

k

Kolaitis and Vardi obtained a normal form for the negation free fragmentof L

k

over F It is easy to extend their result to L and to provide a dual normal form as

well We co dify these normal forms in the next prop osition

k

Prop osition Kolaitis and Vardi For every sentence L thereisa

W V V W

k k

L and a L such that Mo d Mo d Mo d

f f f

Proof Let C Mod By Prop osition for each A CB FC there is a sentence

f

W V

k

such that A j and B j Let and let L

AB AB AB AB

AC B C

V W

It is easy to verify that the prop osition holds for this choice of

AB

B C AC

and

V W

k k

Next weshow that the fragments L and L are closed under nite con

junction nite disjunction and existential quantication over F This means that if an

V W

k k k

L denable query cannot b e expressed in either L or L then it is only

denable using b oth an innitary conjunction and an innitary disjunction

V W

k k

Prop osition The languages L and L areboth closed under nite conjunc

tion nite disjunction and existential quantication over F

k

y j i g b e a set of formulas of L We show that if y Proof Let f x

i

V V

k

x then y isequivalentover F to some formula y L The other closure

V V

y and let y x conditions maybeeasilyveried Let x

m m l

m lm

a A b e such We show is equivalentto It is obvious that implies LetA F and

that A j a Because A is nite there is some a A such that for arbitrarily large m

V

a Therefore A j a and implies a A j a

m m

m

V W

k k

Belowweshow that the query classes L and L are prop er of

V W V W

k k k

L and that neither of L and L is a subset of the other Werst

V W

k k

give necessary and sucient conditions for classes to b e denable in L and L

and prove a lemma from Kolaitis and Vardi that we need b elow

V

k

Prop osition A class C is denable in L i for al l B Cthereisa

B

k

L such that B j and for al l A CA j

B B

W

k k

A class C is denable in L i for al l A Cthereisa L such that

A

A j and for al l B CB j

A A

V

Proof To prove supp ose that C is dened by the sentence and that B C

n

n

Then there is some such that B j Let b e this In the other direction

m m B m

V

observe that the sentence denes C The pro of of is similar

B

B C

k

Lemma Kolaitis and Vardi The relation is polynomial time computable

Proof Let A and B b e mo dels of signature We dene hA B i to b e the following mo del

with signature fQxg where Qx is a unary predicate not in It is the disjoint union

of A and B with the extension of the predicate Qx interpreted as the universe of B It

is easy to see that given a standard enco ding of the mo dels A and B on Turing machines

eg see an enco ding of hA B i can b e pro duced in p olynomial time

Mo difying an idea from Dawar Lindell and Weinstein wenow show that there is

k

an LFP sentence such that for all A and B hA B ij i A B Itiswell known see

that every LFP query can b e computed in p olynomial time Comp osing the function

that outputs a representation of hA B i with the function that computes the

of then yields the desired algorithm

Let Rx x y y b e the k ary relation on mo dels hA B i such that hA B ij

k k

k

Ra a b b ieach a is in Aeach b is in B and A a B b Werst

k k i i

x y can b e expressed in LFPLetf g b e the set of all atomic show that R

t

formulas over with free variables among x x Given any k tuple a A and k

k

k

tuple b B A a B b i there is a such that A j ai B j b In

kn

a B b i there is an a A and an i k such that for all b B general A

kn

A a B b where a and b are the k tuples obtained from a and b by replacing

th

the i comp onentby a and b resp ectively Then the least xed p oint of the following

formula denes the desired relation Rx y

x y lfp Qx Qy x y x y Qx Qy Rx y

i i i i i i

ik ik

k

ObservethatA B i for each k tuple a A there is a k tuple b B such that

k k k

a B b If A B then there is a sentence L such that A j and B j A

Then for any a A and b B A a j a and B b j b In the other direction

k

assume that A B and a A Supp ose that for each b B there is a formula x such

b

V

k

a j x and B b j x Then x xisanL sentence such that A

b b bB b

that A j and B j a contradiction Finally let be the following sentence

x x Qx y y Qy x y

k i k i

ik ik

This completes the pro of

Prop osition For each k thereisapolynomial time computable boolean query

V W

k k

C L L

Proof Let k begiven and let the graph A b e a mo del of the k Gaifman theory Let T

k

V V

k k

b e the L theory of A and let T Clearly L Let C Mod It is easy

k f

k

to see that C fB F jA B gthus by Lemma C is p olynomial time computable In

k

k

the pro of of Prop osition we showed that for every satisable L Mo d C

f

W

k

This implies that for every L C Mod

f

W

Prop osition Thereisapolynomial time computable boolean query C L such

V

k

that for al l k C L In consequence for each k there is a class C

W V

k k

L L

Proof Over the signature fE s tg let C fA j there is a path from s to t g the class

W

of s tconnected graphs This class is clearly in L As noted earlier it is in Datalog

V

k

and hence p olynomial time computable From Prop osition to show that C L

w that there is a B C such that for all n there is an A C such it suces to sho

n

kn

that A B This latter condition is equivalent to Ds p ossessing a winning strategy

n

k

for the nround game on A and B We construct B to give her the greatest p ossible

n

freedom in cho osing her moves Let M be any graph such that M j and let M

k s

resp M b e obtained from M by requiring that s resp t denote a lo opfree element

t

We dene B to b e the disjoint union of M and M thus insuring that B C

s t

n

For each nletA b e the simple chain from s to t of length The basic idea is

n

that bycho osing the chain to b e long enough S will not b e able to witness the existence

of a path from s to t in only n moves Let dx y b e the natural distance function on A

n

Wenow describ e Ds strategyIneachround mDcho oses to play on an elementofM

s

nm

i S just played a p ebble on a A such that either i ds a orii there

n

nm

is a j such that is on an elementofM and d a She then plays her

j s j

tofB so that she maintains a partial p ebble on an element of the appropriate comp onen

isomorphism among the p ebbles on that comp onent It is easy to see that this is p ossible

b ecause M and M are mo dels of

s t k

In order to establish that this is a winning strategy it suces to verify the following

two claims

In eachroundl n if D plays a p ebble on M then is not adjacentto t on

i s i

A Similarly for M and s

n t

After each round l for all pairs of p ebbles f gif A j E then and

i j n i j i

are on the same comp onentofB

j

n

We argue by induction that if D plays on M in round m then ds

i s i

n nm n n

Since ds t this establishes that A j

n

n

E t In round D plays on M i ds Supp ose that in round m

i i s i

nm

D plays on M Then either ds or there is an such that is on M

i s i j j s

nm n n

and by induction hyp othesis ds d

j j i

nm

In b oth cases the induction condition is maintained The second part

of Claim follows from the fact that in round m if D plays on M then S must have

i t

nm

played such that ds

i i

To prove Claim observe that at each round mif M and M then

i s j t

nm

The details are similar to the previous argument d

i j

k

The next result shows that the normal form for L over F given in Prop osition

is optimal

W V

k

Prop osition For al l k thereisaclassCF such that C L

V W

k k

L L

Proof The pro of of this prop osition is a synthesis of the pro ofs of the preceding two

k

results We dene a set of mo dels fA A g which are pairwise L incompatible

k k

such that for each itheL theory of A is not nitely axiomatizable in L We then

i

W

k k

let C fB jiA B g The arguments to show that this class is neither in L nor

i

V

k

in L are variants of the pro ofs of Prop ositions and

We dene eachmodel A as an expansion of a homeomorphic of a graph which

i

is a mo del of the k Gaifman theoryTo clarify the exp osition we also add a unary

predicate V to the signature to lab el the original vertices of the graph Let R b e a nite

graph that veries observ e that R also veries Each A is obtained from R

k k i

by replacing all edges which are not lo ops by pairwise disjoint paths of length i Where

there is a twoway undirected edge a single undirected path is inserted rather than two

directed paths If i then A is just the expansion of R with signature fExy V xg

A

RIfi then the universe of A is the set R ffa b j gj a b R R j such that V

i

Eab and jigWehave lab eled eachnewvertex by a set of size If a and b

are connected in R then in A there is a path of length i from a to b along the vertices

i

A

i

fa b g fa b i R Observe that eachvertex fa b j g is g Again we set V

A

i

connected to exactly two other vertices Also if a b V a b then da b i

W

k

Toverify that C is not in L it suces to show that there is a mo del A C and a

kn n

sequence B B disjoint from C such that for each n A B LetA be A and let

n n

from the pro of of Prop osition by putting every each B b e obtained from the mo del B

k

vertex into the extension of the predicate V From that pro of it is immediate that for all

k n k n kn n

B For each i A j xVx and consequently A B This n A B but A

i i

n

establishes that each B is not in C

V

k

In order to show that C L wenow dene a single B C such that for all

kn

n there is an A suchthatA B By Prop osition this will establish that

f n f n

V



k R

C L Let R b e an expansion of R obtained by letting V fag for some a R



R

such that R j EaaLetR b e an expansion of R obtained by letting V fag for

some a R such that R j EaaWesay that an element a contains a looporis looped

i Eaa Otherwise it is loop free Likewise wesaythateach R is lo op ed and that R

is lo op free We dene B to b e the disjoint union of k copies of b oth R and R A

component of B is any submo del that is one of the copies of R or R Observe that the

comp onents are exactly the maximal connected submo dels Here the predicate V plays a

role like the constants s and t in the pro of of Prop osition

It is easy to see that B is not in C For each i A has the prop erty expressible in L

i

that there are two distinct vertices b oth in the relation V that are connected by a path

of length i On the other hand no comp onentofB contains two distinct elements in V

k

thus for all i A B

i

x kn

Let f x It remains to establish that for each n A B As in the

f n

k

pro of of Prop osition the Duplicator can win the nmove game on A and B

f n

b ecause the vertices of A that are in V are to o far apart for the S to distinguish the

f n

mo dels by witnessing that they are actually connected In order to describ e the Ds winning

strategywe dene an auxiliary matching partial function x m that assigns to each

vertex x A that is p ebbled in round m avertex a A such that A j Va

f n f n f n

We will write xforx m or even omit the subscript when it is unnecessary Let

m

a A b B denote the vertex p ebbled by the S D in round j let R denote the

j j j

f n

f n

in round m i Va comp onentofB that contains b For all a A say that a is live

j

or a is o ccupied by a p ebble at the end of the round The function x will satisfy the

m

following conditions for all a a fb j b is live in round mg

If the S do es not replay the p ebble on a in round m then a a

m m

For all m nif Va then a a

m

nm

If a a and a a then da a In particular if a

m m m

a then there is no edge connecting a and a

m

The D will also maintain the following mo dularity condition

In each round m if the p ebbles on a and a i j have not b een replayed b etween

i j

rounds i and m then a a ib and b are on the same comp onentofB

m i m j i j

In round of the game let the S playona A Let a b e the element a V

f n

n

that is closest to a observe that this is welldened and that da a Since the

n

distance b etw een anytwo elements in V is greater than f n this implies that for

n

all v V fag da v as required by condition The D then cho oses a comp onent

R of B such that R is lo op ed i a is lo op ed let v b e the unique elementinR such

that Vv She then plays on an element b R such that the tuple b v has the same

atomic typ e as a a which immediately implies that the p ebbles in play determine

a partial isomorphism Since R j it is easy to see that there is such an element

k

In round m n the S plays on some a We describ e the Ds resp onse by

m

considering two cases One for all a a that are live in round m da a

m m

nm

In this case let a beany v V such that for all live a

m m

v a v The D nowcho oses an unp ebbled comp onentof B whichwe call R

m m

that is lo op ed i v is lo op ed Since there are k copies of eachofR and R and only

k p ebbles there is always such a comp onent She then plays on some b R

m m

such that the atomic typ e of b v is the same as that of a a where

m m m m

v is the unique elementofR such that Vv Note that for all live p ebbled

m m m

a j m a a which implies by conditions and ab ove that

j m j m m

a b is not adjacenttoa b Therefore the D has succeeded in preserving a partial

j j m m

isomorphism it is easy to verify that conditions are also maintained

nm

Second if there is an element a fb j b is live g such that da a then

m

let a be a In order to see that a iswelldened supp ose that

m m m m m

there are two such elements a and a Observe that da a da a da a

m m

nm

By condition wehave that a a as desired Note that x

m m m

satises the ab ove conditions The D then plays on some element b R such

m m

that b b b v has the same atomic typ e as a a a a

l l m m l l m m m

j j

where a a andR R foralli j Again this is p ossible

m l m m l m

i i

b ecause R j Note that the D also maintains condition This establishes that

m k

the D has a winning strategy

Finallywe prove the following separation

V W

k k k

Prop osition Over F for k L L L

Proof Let Pathx y express the binary query there is an E path from x to y For

signature fE sgwedene C fA jxPaths x and Pathx xgLet x y be

n

an L formula that denes the binary query there is a path of length n from x to y It is

V W

k

Also observe that xy s x x y denes easy to see that C is in L

n

n

C Finally there are arbitrarily large minimal mo dels in C that is mo dels A C such that

for all prop er submo dels B A B C This immediately implies that C FO and a

k

fortiori not in L

Chapter

Existential preservation

Generalized preservation theorems

In this section weprove some generalized preservation theorems for fragments of FO Our

results are of the form

L EXT L

for certain quantier prex classes L FO and L L or Datalog We

intro duce the following notation

Denition Let w bea regular expression over the alphabet f g in the sense of formal

language theory FOw with squarebrackets is the set of prenexedsentences such

that the quantier prex of is a wordintheregular language determined by the regular

expression w For example FO is the set of sentences whose quantier prex is a

s single fol lowed by a string of

Recall that Tait showed FO EXT FO Gurevich and Shelah give

examples witnessing that

FO EXT FO

and Compton observed that

FO EXT FO

showing that these examples are b est p ossible in terms of quantier alternation prex see

Kolaitis and Vardi see observed that the example of Gurevich and Shelah

can b e dened in Datalog Theorem b elow establishes that

FO EXT Datalog

It follows that the ab ovementioned examples in the literature witnessing the failure of

the LosTarski theorem in the nite case are denable in Datalog since all these

examples are in FO The next theorem establishes a slightly more general result

with L in place of Datalog

Theorem FO EXT L

EXT Let Proof Let FO EXT That is FO and Mo d

f

C Mod We pro ceed to show that CL By Prop osition it suces to show

f

k

such that that there is a k such that for each A C and B C there is a L

AB

A j and B j

AB AB

Let x x y z z xyz where is quantier free and let k i j

i j

we supp ose without loss of generality that i Wenow describ e a winning strategy

k

for S in the eternal game on A and B for A C and B Cwhich establishes by

k

Prop osition the existence of L with the desired prop erties There are two

AB

a a a b e a sequence of elements of A such that A j y zayz stages Let

i

If D has not lost after h rounds for h i S plays p ebble on element a If

h h

S has not won after i moves and D has played her p ebbles on b b b then

i

B j y z byz since B j

The goal of the second part of Ss strategy is to force D to play a p ebble on some

element b such that B j z bb z without removing any of the p ebbles

i

which x the of the variables x x on b oth A and B Regardless of

i

zaa z so the element a on which S will have played his corresp onding p ebble A j

that he can then win easily In order to describ e Ss strategywe rst dene a sequence of

subsets of the universe of B Let fb j b B and B j z bb z g Observe that

S

B j y z byz and therefore is nonemptyGiven if b

m l

lm

S

then let B b e the submo del of B whose universe is B Let fb j

m l m

lm

b B and B j y bb y g For each B since B B wehave that

m m m m

x y z xyz In particular B j y z byzandthus as ab ove B j

m m m

is nonemptySinceB is nite there is some n suchthat b and some element

n

b p ebbled by Then B is partitioned into the sets B We also b

f n n f n

have that A j zaa z and B j z bb z

f n f

The Sp oiler can win by executing a substrategy that comp els D to playinsets

m

c b e a sequence of elements of length j such that of successively smaller index Let

A j aa c S plays his next j moves on this sequence until D makes a losing move

f

or plays a p ebble onto an elementin form n We claim that one of these

g m

two p ossibilitie s must o ccur For supp ose that D plays on a sequence d B Then

n

B j bb d and xyz witnesses that the function that takes a a c to b b d

n f f f

and preserves the denotations of constants is not a partial isomorphism

Supp ose that D has played some p ebble into some set By the same argument

g m

as ab ove reusing p ebbles f g f g S can either win or force D to playinto

i k g

some for some m m Iterating this pro cedure S can force D to playinto and

m

then win by using the same pro cedure one more time

We remark the following two renements of the foregoing theorem

For each B C there is a number m such that for all A C S wins the m

B B

k

round game on A and B Here m is determined by the maximum number of

B

sets that get dened on B foranychoice of Ds rst i moves It follows easily

k

from Prop osition that this condition is equivalent to there b eing a L

B

with quantier rank m such that for all A C A j andB j Then

B B B

V

k

is equivalentto and is a single innite conjunction of L sentences

B

B C

k

We knowby Prop osition that not all sentences of L can b e expressed in this

form Indeed it follows from Theorem b elow that if FO EXT then

V W

k k

is equivalent to a formula in L L for some k

k

Supp ose that is an L sentence with quantier typ e that is no o ccurs in

in the scop e of another quantier In this case we can show by a mo dication of the

k

pro of of Theorem that is equivalenttoanL sentence This contrasts with

Prop osition b elow which establishes that for all k there is a sentence L such

k

k

but is not equivalentover F to anysentence in L that Mo d EXT

k f k

Theorem FO EXT Datalog

Proof Let x x y zx y z with x y z quantier free Let c c c

j p

b e the sequence of constants in the signature of and let C Mod For a Awe

f

say that a closes with parameters a i there is a sequence a aa a such that for

n

all ln A j a a a and there is an m n such that A j a a a Note that

l l n m

ayzpath from a to a and this is equivalent to there b eing an a such that there is a

a ayzcycle including a

We claim that A j i there is a j tuple a such that every elementofa c closes

with parameters a Supp ose that A do es not satisfy these conditions We prove that

xy z x y z where the latter sentence is equivalenttoLeta A be a A j

sequence of length j Byhyp othesis there is an a a c such that a do es not close

a Since A is nite this implies that there is an m and a sequence with parameters

a a a such that for all lm A j a a a a z as a and A j z

m m

l l

desired

In the other direction let a be such that every member of a c closes with parameters

aLets ha a a i and t he c e i b e sequences witnessing

h h h hm h h h hn

h h

that each elementof a c closes with parameters aLetB b e the submo del of A with

S S

universe s t Then it is easy to verify that B j and since Mo d EXT it

i j f

i j

follows that A j

The following program with x x x computes

j

x y z x y z P

P x y z P x y w Pxwz

Q P x x y Pxy y Pxx y Pxy y

j j j j

P x c w Pxw w Pxc w Pxw w

p p p p

W

This can b e easily converted into a Datalog program Let x y z where

i

i

each is a conjunction of literals Replace the clause P x y z xyz with the

i

x y z for all i clauses P

i

The failure of existential preservation for L

In this section weprove that L EXT L Indeed we establish that there is a

such that Mo d is closed under extensions but there is no L sentence L

such that Mo d Mod Thus witnesses the failure of existential preservation for

f f

L simultaneously over the class of nite structures and over the class of all structures

The central lemma on which this result relies is of interest in itself It says that for all

k

k the nitary language L fails in a strong way to satisfy an existential preservation

prop ertyAndreka van Benthem and Nemeti show ed that for every k there is a

k

sentence L which is preserved under extensions but which is not equivalenttoany

k

k

sentence of L For k the sentence they construct uses a relation of

k

k

arity k and has the prop erty that it is equivalent to a sentence of L They state

the following op en problems

k

For any k and n is there a sentence L which is preserved under

n

k n

extensions but which is not equivalenttoanysentence of L

k

For k is there a formula of L containing only one binary relation symbols

k

which is preserved under extensions but is not equivalenttoanysentence of L

The next prop osition settles b oth these op en problems The main result of the section

follows easily from the pro of of this prop osition

Prop osition For each kthere is a sentence L containing a single binary

k

relation such that

Mo d is closed under extensions but

k

k

Mo d Mod for al l L

f k f

Proof Before presenting the full pro of wesketch the basic outline Let the kpyramid of

k

B P B b e the smallest class of nite and innite mo dels containing B that is closed

k

under substructures and L equivalence For each k we dene nite structures A

k

and B with the following prop erties

k

k

A B

k k

P B isL denable

k

A P B

k k

Let L be such that Mo d P B and let It is obvious that

k k k k k

k

Mo d is closed under extensions that A j and that B j Supp ose L

k k k k k

k

is such that A j Since A B this implies that B j and therefore that is

k k k k

not equivalentto

k

We dene structures A and B in terms of simpler submo dels For f t let the

k k

t f ag F t f b e the directed chain of length t with one additional vertex attached

th

to the f link That is the vertex set of F t f is f tt g and the edge

relation is fi i j i tgff t g A is the disjoint union of the k ags

k

F k kFk kFk k Let the k j tree T k j b e the tree

th

obtained from A b y fusing the i no des of each ag for all i j This tree has height

k

k and the no de at height j has outdegree k Then B is the disjoint union of the

k

k trees T k Tk Tk k

k k

First weshow that A B by describing a winning strategy for D in the eternal

k k

game on A and B Acomponent of a mo del is a maximal connected submo del Observe

k k

that every comp onentofA is emb eddable in every comp onentofB Call a comp onent

k k

of either A or B vacant at round n if there is no p ebble lo cated on any element of that

k k

th

es We consider two cases of moves for comp onent b efore the players make their n mov

n

S First supp ose that in some round n S plays p ebble on a vacant comp onent A of

i

A Since there are only k pairs of p ebbles and since p ebble is not on the b oard there

k i

n n n

isavacant comp onent B of B and an isomorphic injection h A B D will play

k n

n

p ebble on h In the other case S plays on a nonvacant comp onent A There

i n i

n

is some m n such that A has b een o ccupied continuously since round m and either

n n m

m or A was vacant at round m Thus A A and there are previously dened

m

B and h Dnowplays on h By this condition every pair of p ebbles

m i m i l l

m m

on comp onents A and B satises the condition that h In b oth cases it

m l l

is clear that D has maintained a partial isomorphism By Prop osition it now follows

k

B immediately that A

k k

Next we show that P B is denable in L Consider the following prop erties

k

A contains no chains of length k

A contains no cycles of length k

No element a A has indegree that is A j xy z x y Exz Eyz

It is easy to showthateach prop erty is expressible in L is closed under substructures

and holds of B From this it follows immediately that each B P B p ossesses all

k k

three prop erties Consequentlyevery member of P B is a forest consisting of directed

k

trees of height k

Next we note the following facts

Lemma Let A and B be the disjoint unions of components A A and B B

m n

k

respectively For k A B ifandonlyifforeach component A B either the

i i

k

number of components of A that are L equivalent to it is equal to the number of components

k

of B that are L equivalent to it or both numbers are k

This result can b e proved by a simple p ebble game argument

k

Lemma For each h and each k uptoequivalencein L thereare only nitely

many trees of height h

The pro of pro ceeds by induction on h The case where h is obvious Given a tree T

call a prop er subtree that contains a no de t of height and all of its descendents a tree

k

of T For h we claim that two trees T and T of heightatmosth are L equivalent

k

if and only if for each tree T T the numb er of trees of T that are L equivalentto

i

k

T equals the numb er of trees of T that are L equivalenttoT orbothnumb ers are

k The argument is just like the pro of of the preceding lemma From the claim the

lemma follows immediately

k

Corollary For each h and each k uptoequivalencein L thereare only nitely

many forests of height h

This is an immediate consequence of the preceding lemmas

k

These observations establish that there are only nitely many complete L theories that

are satisable in P B Moreover eachsuch theory has a nite mo del By every

k

k

such theory is axiomatized by a single L sentence Hence if welet b e the disjunction

k

of these sentences wehaveMod P B as desired

k k

Finallywe argue that A P B By the denition of P B for every B

k k k

P B thereisanm and a sequence E D E D E of structures with

k m m

B E and B E such that

k m

For all i m D E

i i

For all i m D E

i i

It suces to show that for any such sequence A cannot b e emb edded in any E Let

k i

g P B f k g b e the function such that g D is the maximum number

k

of comp onents of A that can b e emb edded in D pairwise disjointly Weshow that for

k

each i m g E k In fact we show that g is monotonically decreasing on

i

the aforementioned sequence Because each D is a submo del of E it is clear that

i i

It remains to establish that g B k and that g E g D g D g E

k i i i i

Observe that anyemb edding of a ag F k finto a comp onent C of any B

P B must map the ro ot of the ag to the ro ot of C This implies that no twoagsofA

k k

can b e disjointly emb edded into any such comp onent and since B has only k comp onents

k

that g B k

k

From Lemma it follows that every E can b e obtained from D by rep eated application

i i

of the following three op erations First replace some comp onent with a comp onent that

is L equivalent to it Second add a disjointcopy of a tree that is L equivalentto

at least comp onents Third remove a comp onent that is L equivalent to at least

other comp onents Thus it suces to argue that no such op eration p erformed on some

B P B can yield a B such that g B gB It is obvious that removing a

k

comp onent cannot increase the value of g

We claim that it suces to consider the eect of the other two op erations on comp onents

of heightk If trees T and T are L equivalent then they have the same height

Also no comp onent F k fofA canbeemb edded in any tree of height k

k

This establishes that the presence of shorter comp onents in a mo del B do es not aect the

value of g B

Observe that for all trees T and T such that T T F t f can b e emb edded in T i

it can b e emb edded in T This is b ecause the following prop erty can b e expressed in L

there is an element x such that i there is a y such that there is a path of length f from

y to x ii x has outdegree iii there is a y such that there is a path of length t f

from x to y Over trees this prop ertysays that the mo del embeds F t f Consequently

the op eration of replacement cannot increase the value of g

It remains to establish that adding an additional comp onent to a mo del B P B

k

do es not change the value of g We observe that B has the following prop erties

k

there is at most one j j k such For eachk chain contained in B

k

th

that the j link of the chain has outdegree

For eachk chain contained in B there is at most one j k j k

k

th

such that the j link of the chain has outdegree

These prop erties are closed under substructures and L equivalence consequently they

hold of every mo del B P B Let C C and C be L equivalent comp onents of B

k

of heightk The ab ove argument establishes that each C is either some F k f or

i

the simple k chain Let B b e the extension of B obtained by adding a comp onent

C Observe that in fact all four comp onents must b e isomorphic and embed at most

one isomorphism typ e of ag Therefore the image of anyemb edding h A B

k

can contain vertices from at most one of these four comp onents This demonstrates that

g B g B and completes the pro of

The following result establishes the failure of existential preservation for L

Theorem There is a sentence L such that both

Mo d is closed under extensions

For al l L Mo d Mod

f f

Proof We claim that it suces to show that for each k there is a sentence L

k

and a pair of nite mo dels A and B such that

k k

Mo d is closed under extensions

k

A j and B j

k k k k

k

A B

k k

For all j A j

j k

V

Let It is clear that is closed under extensions and that it has nite mo dels since

k

k

k

it is true in each A Supp ose that is a sentence in L such that implies Then

k

A j and therefore B j But for all l B j Therefore Mo d Mod

k k l f f

A and B from the pro of of Prop osition fail to The sentences and the mo dels

k k k

meet condition b ecause for jk A j To see this observe that A will always b e a

j k j

submo del of B To x this defect it suces to construct A B and as in the pro of of

k

k k k

Prop osition that also satisfy the additional condition that for all j and k A P B

j

k

In order to accomplish this we add simple gadgets to the mo dels Let the k cycle C

k

b e the graph on k vertices whose edge relation forms a simple directed cycle of length k

b e obtained from A and B resp ectivelyby adding a disjointcopyof and B Then let A

k k

k k

k

C By slightly mo difying the pro of of Prop osition we can show that A B and

k

k k

such L satised by exactly the mo dels in the complementofP B that there is a

k k

that A j Finally it is easy to verify that for j k the j cycle cannot b e emb edded

k k

in any B P B and therefore A j

j

k k

Chapter

Other generalized preservation

theorems

In previous chapters weinvestigated existential logics and denabilityover the class EXT

of sets of structures closed under extensions Wenowturnourattention to some other

natural classes of structures and examine the status of generalized preservation theorems

in connection with these classes Recall that a homomorphism hxfromA to B is a

function from A to B such that for all nary relation symbols R x in the signature of

n

A and all ntuples a in A ifA j Ra then B j Rha Let HOM b e the class

consisting of all sets of nite mo dels that are closed under homomorphisms A mo del B

is an enrichment of A over the relations R R i the universe of B is equal to the

t

n n

universe of A and for all nary relations R x i t and all ntuples a A B

i

a then B j R a A class C of mo dels is monotone in relations R R if A j R

i t i

i for all A Cif B is an enrichmentofA over the relations R R then B C

t

Belowwewillbeinterested in sets of structures that are monotone in every relation of

their signature Let MON denote the class of such sets of nite mo dels

Preservation theorems from classical mo del theory provide exact characterizations of

the FOdenable classes that are closed under homomorphisms and that are monotone

The Homomorphism preservation theorem says that a FOdenable class is closed under

homomorphisms i it is dened byapurely positive existential sentence ie an existential

sentence in whichevery relation symb ol and equality o ccurs only p ositively Lyndons

lemma states that a FOdenable class of mo dels is monotone in relations R fR R g

k

R o ccurs only p ositively ie in the i it is dened by a sentence in whicheach relation in

scop e of no negations It is still an op en problem whether the Homomorphism preservation

theorem fails over F We discuss this question in depth in Section in whichwe present

some partial p ositive results Ajtai and Gurevichshowed that Lyndons lemma fails

over the class of nite mo dels More recently Stolb oushkin has constructed a simpler

counterexample Below wegive a slight simplication of Stolb oushkins example that is

also monotone in every relation symb ol This result and generalized preservation theorems

over HOM and MON are discussed in Section

The class HOM

Weinvestigate the status of preservation theorems over the class HOM Although it is

unknown whether the Homomorphism preservation theorem remains true over F b elow

we present some partial p ositive results answering the question for certain fragments of FO

In particular weshow that every sentence in FO HOM is equivalenttoapositive

existential sentence In contrast to earlier results for EXT we resolve armatively

the homomorphism preservation theorem only for the nite variable language L We then

discuss the class IHOM of sets closed under injective homomorphisms Finallyw e establish

a preservation theorem for identityfreeFOsentences over F

Weintro duce the following notation Let FO denote the fragmentofFO con

taining exactly those sentences in which no relation symb ol o cccurs in the scop e of a

negation Thus the negation symbol may only bind equalities WeuseFO to

denote the purely p ositive existential fragmentofFO Adding inequalities to this frag

ment we get FO In this terminology the ma jor op en problem is whether

FO HOMFO

The homomorphism preservation prop erty for FO

In this section we consider various fragments of FO Werstshow that if FO HOM is

either existential or p ositive then it is equivalent to a p ositive existential sentence Recall

that A is a minimal mo del of a class C i for all prop er submo dels B of A B C Also the

p ositive diagram of a mo del A of cardinality n is the conjunction of all atomic formulas with

free variables among fx x g that are true in A under some xed injective assignment

n

of these variables onto the universe of A The next lemma is straightforward

Lemma Let be an existential FO sentence such that Mo d is closed under homo

f

morphisms Then thereisa FO that is equivalent to

Proof Let C Mod Since C is in FO it has nitely many minimal mo dels Let

f

b e the disjunction of the existential closures of the p ositive diagrams of each minimal

mo del in C Itiseasytoverify the equivalence of and

Belowwe establish the complementary result for the p ositive fragmentofFO Our

pro of requires the following EhrenfeuchtFraisse game played on a single structure Unlike

games played on two structures in each round only one player makes a move

Denition Let beaprenexed FO sentence Q x Q x x x where

n n n

each Q is a quantier and is quantier free The game is played as fol lows In each

i

round m m n the D plays if Q is an otherwise the S plays As usual a move

m

consists of placing a pebble on some element of A After n rounds the D wins if

m

and the S wins otherwise A j

n

The following prop osition characterizes satisfaction of a sentence in a mo del game

theoretically

Prop osition For al l prenexed sentences and al l structures A A j i the D has

a winning strategy in the game

Prop osition For al l satisable sentences FO HOM i thereisanequiv

alent FO If is unsatisable and thus in HOMthenitisequivalent to the

existential sentence xx x

Proof Let b e satisable and in FO HOM Let C Mod If is valid we let

f

Otherwise by Corollary proved b elow we can assume that is identity be xx x

free ie contains no equalities or inequalities Furthermore we can also assume that has

b een prenexed and that its matrix is in conjunctive normal form ie is a conjunction of

disjunctions of atomic formulas Wesay that an atomic formula Rxisaformula of i

x that is b ound by a universal quantier in Let b e the sentence there is a variable x

obtained from by deleting all o ccurences of all formulas and all universal quantiers

For example if were x x x Rx x Px Px Rx x Rx x Px then

would b e x x Px Px Rx x We claim that is equivalentto Observe

that is obtained eectively from an identityfree

First we sho w that every conjunct of contains a nonformula Supp ose for contra

diction that is a conjunct of that contains only formulas Let A be any mo del in C

and let A b e the extension of A obtained by adding one element a without altering anyof

the relations Observe that A is in C since the class is closed under homomorphisms We

claim that the S has a winning strategy in the game on A which implies that A j a

contradiction In order to win it suces for the S to always playeach of his moves on the

element a regardless of the Ds playEvery variable assignment extending the assignment

determined by Ss moves falsies the conjunct and hence also the formula Therefore

the S wins the game as desired

V

Wenowshow that implies Let Q x where each is a Q x

j j n n

j k

V

disjunction of atomic formulas Let Q x Q x where each Q is

s s s s j s

m m

j k

l

and each is obtained from by deleting all formulas Supp ose that A j let

j j

V

a a a A b e such that A j a Wenow describ e the Ds winning

s s j

m j k

strategy in the game on AIneach round s n she plays a p ebble on a Anyvariable

l s

l

assignmentforfx x g that is determined bysuchagameveries each hence also

m j

each Therefore A j thereby establishing that implies

j

Next weprove the opp osite direction Let A j and again let A b e the extension of

A obtained by adding an isolated element a SinceA j the D has a winning strategy

for the game on A In particular she can win a game in which the S plays every one

A

of his p ebbles on a Since a is not a member of any tuple that is in any relation R

and since every atomic formula o ccurs only p ositivelywe can assume that the D do es not

playany p ebble on a Let a a a A b e some tuple in A A such that

s s

m

the D wins the game on A in which the S always plays on a and in each round s

l

Observethateach formula is falsied bythisvariable assignment the D plays on a

s

l

Therefore each disjunction must contain a nonformula that is satised by this

j j

variable assignmentinA Since each o ccurs in the disjunction it is easy to see that

j j

V

a Therefore A j This establishes that implies and completes the A j

j

j k

pro of

Next we establish another partial p ositive result over a fragmentofFO dened in

terms of quantier prex structure The pro of uses the following version of the Ehrenfeucht

l m n

Fraisse game The game on A and B is a round game played with l m n

lab eled p ebble pairs such that

on B The Duplicator then puts l The Sp oiler plays l p ebbles

l

on A p ebbles

l

In round the S plays m p ebbles onA The D then puts m

l lm

p ebbles on B

l lm

onB The D then In round the S plays n p ebbles

lm lmn

puts n p ebbles on A

lm lmn

Of course the D wins just in case the p ebbles determine a partial isomorphism from A to

B The following lemma is easy to verify

Lemma The fol lowing two conditions areequivalent

l m n

For al l FO ifA j thenB j

l m n

The D has a winning strategy in the game on A and B

Prop osition FO HOM FO Furthermore given FO

HOMthereisaneective procedure for nding an equivalent sentence FO

l m n

Proof Let be in FO HOM and let b e the signature of Weshow that there

is an s that b ounds the size of every minimal mo del of C Mod This implies

f

that C is dened by a sentence in FO and thus by Lemma that it is actually denable

in FO In fact we can calculate s as a function of m and which establishes that

there is an eective pro cedure for nding a sentence equivalentto in FO Let r

be the numb er of mo dels up to isomorphism of signature and cardinality m and let

s r m Also let t l m n

Let A b e a minimal mo del of C Wewanttoshow that there is a B C of cardinality

s such that there is a homomorphism from B into A By the minimalityofA the homo

morphism must b e onto implying that the cardinalityofA is also s Let fM M g

q

b e the set of submo dels of A of cardinalitym again up to isomorphism We use C D

to denote the mo del which is the disjoint union of C and D and p D to denote the disjoint

union of p copies of D Let G t M t M and let B M M It is

q q

to A Observe also obvious that there are homomorphisms from G onto B and from B in

that the cardinalityofB is q m s Since C is closed under homomorphisms it suces

to show that G C

To establish this fact we dene an extension A of A and describ e the Ds winning

l m n

strategy for the game on A and G Since A j this implies that G j Let

A A G and let f xbetheobvious injection from G into A In Round the S

plays l p ebbles onsomel tuple in G The D then plays on the l tuple f in A In

Round the S plays some p ebbles onA A and plays his other p ebbles on

G A Conceptually the D makes her moveintwo stages She rst plays her p ebbles

of G one of the copies onf She then cho oses an unp ebbled comp onent M

p

of M such that there is an emb edding hx from M into G that contains the tuple

p

p

in its range There must b e such a comp onent since G contains t copies of each M The

p

D then plays her p ebbles on the preimage of under hx It is clear that the

D succeeds in maintaining a partial isomorphism Now let f xbetheemb edding of G

In Round the D plays her and equals f xon G M into A that equals hxonM

p p

p ebbles on the image f A of the p ebbles played by the S It is easy to see

that this is indeed a winning strategy for the D

L has the homomorphism preservation prop erty

In this section weshowthatL has the homomorphism preservation prop ertyover F

and over the class of all structures That is we show that L HOM L where

L is the set of sentences in L FO Recall that it is unknown whether L has

the existential preservation prop erty though the corresp onding negative result has b een

k

established for all L k see As L only contains twovariables we assume without

loss of generality that the signature do es not contain any relation of arity Elements

a and b are adjacent i there is a binary relation Rxy such that A j Rab Rba

Prop osition The homomorphism preservation theorem holds for L over F and over

the class of al l structures In fact for al l L HOManequivalent L such

that qr qr can be found eectively

Proof Let L HOM and let qr n Let C Mod The same argument also

f

Cwe dene a sentence establishes the claim in the innite case For eachmodel A

A

L with qr n such that A j and Mo d C From the construction

A A f A

it will b e clear that although C is innite there are only nitely many distinct Letting

A

W

it is immediate that Mo d Mod

A f f

AC

ab

For each mo del A and elements a b Alet x y b e the atomic typ e of a bin

A ie the conjunction of all atomic formulas withfreevariables among x y such that

m

A j a b For all a A and all m x L nwealsodeneaformula

a

m m

with qr x msuch that A j a Let N a the neighbors of a denote the set of

a a

b a suchthata is adjacenttob x is just the atomic typ e of a in AFor all m

a

V

ab m m m

y x y y except that we we essentially want xtobe x

a a a

bN a

m

eliminate redundant identical conjuncts Here y denotes the formula obtained from

a

m

xbyexchanging all o ccurences of x and y This guarantees that for xed m there

a

V

m n

are only nitely many formulas of the form x Finallylet x x

A

a aA a

again eliminating redundant conjuncts

To showthat implies we dene a mo del M suchthatiM j iiM Ciii

A A

for all B such that B j there is a homomorphism from M to B Since C is closed

A

under homomorphisms these conditions imply that every mo del of is in C as desired

A

Given let Q fq q g b e the set of o ccurences of existential quantiers in For

A t A

deniteness we stipulate that if ij then q o ccurs to the left of q in The universe

i j A

of M is QTheinterpretation of the relations on M is determined straightforwardly from

as follows M j Eq q i there is an o ccurence of an atomic formula Evwsuch that

A i j

v and w are b ound by q and q resp ectively Similarly for unary predicates Every

i j

elldened It is easy to see that M satises formula o cccurs only p ositivelysoM is w

conditions i and iii Indeed for all B an assignmentofvariables that veries that

B j determines a homomorphism from M to B

A

To prove that M C it suces to show that there are A and N such that iA

n n

A iiA N and iii there is a homomorphism from N to M Here A N

means that for all L with qr n A j i N j Since C is closed under

n

homomorphisms and L equivalence i iii imply that M CLetN M and

A A N It is immediate that i and iii are satised

We dene the following supplementary relation on M and hence also on N For all

q q M S q q i q o ccurs in the scop e of q and there is an o ccurence of a binary atomic

i j i j j i

formula in that contains variables b ound by b oth q and q Observe that q and q in

A i j i j

Q are adjacentin M i they are adjacent in the mo del Q S We claim that Q S is

a directed forest ie the disjoint union of directed trees Alternatively G is a directed

forest i it is acylic and every element a has indegree The acylicityofQ S follows

immediately from the denition of SxyTo establish the claim it suces to prove the

following lemma

Lemma Let be a formula of L and let q beanoccurence of a quantier in Then

j

there is at most one quantier occurence q such that i q is in the scopeof q andii

i j i

there is an atomic formula Evwin such that v andw arebound by both q and q

i j

Proof Let q o ccur in and let q x x b e a subformula of such that the scop e of q

j j j

is x Every o ccurence of a binary relation symb ol that contains two distinct variables

satsies conditions i contains the twovariables x and y since L Supp ose that q

i

and ii of the lemma Then q must bind every free o ccurence of the variable y in the

i

subformula x Therefore no other quantier in can satisfy this pair of conditions

Since Q S is a forest there is a welldened function x on M N such that q

i

is the heightofq in Q S The height of the mo del M N equals qr n

i A

n

Wenow establish that A N by describing the Ds winning strategy in the nround

p ebble game on A and N We claim that if the S can win the game then he can do so

playing according to the following normal form

In eachroundm he plays the p ebble pair that was not played in the previous

round and do es not replay it on the same element it just o ccupied

In round he plays a p ebble on the Acomp onentofA

i

In each round m heplays a p ebble on an element adjacentto

i i i i

Condition is obvious To see that do es not hinder the S supp ose that he do es not

play his rst moveontheAcomp onentofA The D will then play all of her moves

according to the bijection b etween N and the N comp onentof A until the S plays on

the Acomp onent To win the S must eventually play some on the Acomp onent The

i

D will then play on the vacant M comp onentofN At the start of the next round

i

p ebbles and i j are removed from the b oard so the S could havereached the same

j j

p osition so oner by playing on A A in round

Consider Condition Supp ose that in some round m the S plays on an element

i

of N not adjacentto The D then plays on the corresp onding elementofavacant

i i

M comp onentinA Since the p ebbles i j will b e replayed in the next round for

j j

the same reasons as ab ove the S has not made any progress Likewise if the S plays on

A again the D can resp ond by playing on the vacant M comp onentofN

Wenow describ e the Ds winning strategy assuming that the S always plays in accord

with the ab ove conditions The S b egins by playing on some a A A The D then plays

on the q of either M comp onent such that q o ccurs in the formula as the quantifer

k k A

n

that binds the formula x Observe that q is the ro ot of an S tree In all later rounds

k

a

the p ebbles are always played adjacently so the D can play so that these p ebbles climb

up the S tree To win she maintains the condition that the p ebbles are played

i i

in round m so that m and is lo cated on the element q that binds the

i i l

nm

j i

y Supp ose that the D has maintained this condition through x y formula

i

y m rounds mn and that in round m the S plays N The D will then pla

j i

nm

i

j

p ebble on the quantier o ccurence that binds the formula x y y

j

j

nm

y The argument for the case where the S plays on N is which is a conjunct of

i

similar Because the D always plays up the tree in every round m the p ebble of

lesser height will b e replayed The S is therebyprevented from moving down the tree as

n

doing so would violate Condition This establishes that A N Thus implies

A

W

and is equivalentto

A

A

Lastlywe argue that can b e found eectively By induction on m it is easy to show

m

that one can eectively generate all p ossible formulas of the form x Thus one can

a

also enumerate the nite set of formulas of the form with qr n for xed

A A

nLetd b e the maximal numb er of quantiers o ccuring in any formula Every

i

minimal mo del of Mo d has cardinality dso is equivalentto i the sentences

f i i

are equivalent on all mo dels of cardinality d which is decidable Since is nite one

can eectively nd the that is equivalentto

Injective homomorphisms

In this section we briey discuss a class that lies b etween EXT and HOM Recall that a

map hxis injective i for all a b domh if f a f b then a b Let IHOM b e

the class consisting of exactly those sets of nite mo dels which are closed under injective

homomorphisms Observe that HOM IHOM EXT and that each inclusion is prop er

Over the class of all structures the Injective homomorphism theorem says that a FO

denable class of mo dels is closed under injective homomorphisms i it is denable bya

FO sentence Minor mo dications of the pro ofs of Prop osition and Theorem

yield the following results

Prop osition For each kthere is a sentence L containing a single binary

k

relation such that

Mo d is closed under injective homomorphisms but

k

k

Mo d Mod for al l L

f k f

k

Sketch Alter the pro of of Prop osition by dening the k pyramid of B P B to

b e the smallest class of nite and innite mo dels containing B that is closed under

k

substructures L equivalence and impoverishmentsA is an imp overishmentofB i B

is an enrichmentofA The pro of then pro ceeds as b efore

The next theorem follows from the previous prop osition as Theorem follows from

Prop osition

Theorem There is a sentence L such that both

Mo d is closed under injective homomorphisms

For al l L Mo d Mod

f f

Beyond these two prop ositions other results relating to preservation prop erties for

EXT and HOM do not seem to generalize easily to yield analagous results for IHOM For

example we do not see how to adapt any of the examples witnessing the failure of the

Existential preservation theorem due to Tait GurevichShelah and Grohe to dene non

trivial FOclasses in IHOM Furthermore our pro ofs of partial p ositive results concerning

FOdenabilityover HOM app ear to rely essentially on the stronger closure prop erties of

HOM There are thus various op en questions regarding injective homomorphism preser

vation prop erties over F We p ose the following problem

Do es the Injective homomorphism preservation theorem hold over F

By Lemma an armative answer to this question immediately implies the Homomor

phism preservation theorem over F though it is uncertain whether the reverse implication

holds

This brief section indicates that the class IHOM is rather dierent than EXT and

HOM while still sharing features with b oth classes Resolving the status of the Injective

homomorphism preservation theorem in either waywould yield additional information

ab out older questions and results Thus a negative answer would clearly strengthen T aits

result More generallywe b elieve that further understanding of the relationship b etween

denabilityover EXT IHOM and HOM will provide insightinto FOdenabilityand

generalized preservation prop erties

IdentityfreeFO

The following preservation theorem characterizes the expressivepower gained from adding

the identity sign to the language of FO As the pro of uses a mo died EhrenfeuchtFraisse

game it is simultaneously a pro of over F and over the class of all structures Amap

hxfromA to B is a strict surjection i it is a homomorphism of A onto B such that

for all k ary relations R x in the signature of A and all k tuples a A A j Rai

a A class C is closed under reverse strict surjections i for all A and all B C B j Rh

if there is a strict surjection from A to B then A CFor the rest of this section to avoid

trivialities we restrict our attention to languages with nonempty signatures

Denition The nround identity free ifgame on A and B is playedaccording to

the same rules as the standard nround EhrenfeuchtFraisse game on A and B but has

dierent winning conditions The S wins at some round m i thereisa k ary relation

symbol Rxanda sequence p p p p m such that A j R i

k i p p

k

B j R The D wins the game if the S does not win at any round m n

p p

k

Observe that the D do es not have to play so that the p ebbles determine a bijection b etween

the mo dels This reects the absence of identity in the language under consideration We

omit the obvious equivalent algebraic characterization The following prop osition and

corollary are stated without pro of

Prop osition Given models A and B the fol lowing two conditions areequivalent

For al l identity free sentences with quantier rank n A j i B j

The D has a winning strategy in the nround ifgame on A and B

Corollary For al l classes C the fol lowing two conditions areequivalent

C is dened by an identity freesentence of quantifer rank n

For al l A CB C the S wins the nround ifgame on A and B

Wenow state and prove the preservation theorem

Prop osition Let C bea classofmodels Then C is FOdenable and closed under strict

surjections and reverse strict surjections i it is denable by an identity free sentence

Proof Let C b e dened byasentence FOwithqrnWe argue that for all

A CB C the S wins the nround ifgame on A and B By the preceding Corollary

this implies that C is denable by an identity free sentence with the same quan tier rank

as

Supp ose that the D wins the nround ifgame on some A C and B C Let A B

n

mean that A and B are equivalent on all FOsentences of quantier rank n We will

dene mo dels A C B C such that A B acontradiction Given a mo del Aand

n

elements a a Awesay that a is a copy of a i the p ermutation a a p ermuting

a and a is an automorphism of ALetA B b e the extension of A B obtained by

adding n copies of every element of the structure For example if A were the graph

A

with universe fa b g and edge relation E fa b g then A would b e the graph with

A

universe fa a b b g and edge relation E fa b j i j ng There are

n n i j

obvious strict surjections from A and B to A and B resp ectively and hence A C

B C

Wenowshow that the Ds winning strategy for the ifgame on A and B can b e

easily adapted to provide a winning strategy for the standard nround EhrenfeuchtFraisse

n

game on A and B demonstrating that A B The basic idea is that the presence

of n copies of every element enables the D to mo dify her strategy from the ifgame as

follows Whenever she is in a p osition where she would haveplayed on a previously p ebbled

element she instead plays on a vacantcop y of that element That is she maintains the

condition that if through round m p ebbles have b een placed on a a a A

m

b b b B then she would win the ifgame on A and B with the p ebbles on

m

a a a b b b where each a b is a copyofa b Supp ose that she

m m i i

i i

maintains this condition through m rounds mn and that in round m the S plays

on some unp ebbled a A The D then plays on an unp ebbled copy b B of some

m m

b B such that a a b b is a winning p osition for the D in the ifgame on

m m m

A and B Similarly if the S plays on B

The next corollary follows immediately

Corollary For al l classes C ifCFO HOM then it is denable by an identity free

sentence

The ab ove argument demonstrates the existence of an equivalent identity free sentence

with the same quantier rank as More generally the idea of the ab ove pro of yields

signicant information ab out the desired identityfreesentences For example if is in

prenex form we can establish that there is an identity free with the same quantier

prex The next corollary was needed in the pro of of Prop osition ab ove It can b e

proved using the p ositive EhrenfeuchtFraisse game from describ ed in Section and

the positive ifgame C is nontrivial i it is neither empty nor the class of all structures

Corollary Let C be a nontrivial class denable in FO and closed under strict

surjections and reverse strict surjections Then C is dened by an identity free sentence

of FO If C F resp then it is dened by the sentence xx x resp xx

x

Generalized preservation theorems for HOM and MON

In this section we discuss generalized preservation prop erties for the classes HOM and

MON Weposevarious op en problems in the same spirit as the question of whether

FO EXT is contained in the existential fragment of some stronger logic from Chapter

One purp ose of this investigation is to try to understand b etter the connection b etween

denabilityinFO and in resource b ounded fragmen For example the fact that ts of L

FO Datalog FO means that there are classes in EXT FO that are denable

in two dierent extensions of FO that are obtained by adding dierent orthogonal

mechanisms to the language to get FO and recursion to get Datalog

The languages L and L are dened in the obvious manner We

view Datalog as LFP and Datalog as LFP PositiveLFPLFP extends

Datalog in allowing anyFO formula to o ccur in the b o dy of a clause The intensional

predicates are computed in the obvious manner The following prop osition is proved by

arguments analagous to those in the pro of of Prop osition

Prop osition Datalog L HOM

MON LFP L

In strict analogy to op en problems p osed ab ove for EXTwe ask the following questions

Is FO HOM L

Is FO HOM Datalog

Is FO MON L

Is FO MON LFP

Ajtai and Gurevichshowed that FO Datalog FO Consequentlyapositive

answer to the second question would imply the truth of the Homomorphism preservation

theorem over F Observe also that their result contrasts with the known fact that FO

Datalog FO Wenowshow that FO LFP FO The class that we

dene is based on a construction from Stolb oushkin which gives a simple pro of that

Lyndons lemma fails nitely

Prop osition ThereisaFOdenable class CMON such that

C is denable in LFP

C is not denable in FO

Therefore FO LFP FO

Proof We dene a class C which includes a class of structures that w e call PQorders

based on the grids from A P Qorder A consists of two disjoint linear orders with

A A

some additional relations of sets P and Q whereP and Q are monadic predicates

in the signature Weverify directly that C is denable in FO and in LFP Using

a mo dication of Stolb oushkins idea and the appropriate EhrenfeuchtFraisse game for

FO we then show that C is not FO denable

Denition Let fP x Qx x y S xy T xy c dg A is a P Qorder i

Every element a A is in exactly one of the relations P and Q

A A A

The relation x y linearly orders the submodels P and Q andforalla P

A

a b ba b Q A j

A A A

Sxy is the successor relation on the submodels P and Q and for al l a P

A

b Q A j Sab Sba

A A

c is the minimal element in P andd is the minimal element in Q

xy Txy Px Qy

x Sx x Tcdx x x x Px Px Qx Qx Tx x fx x Tx

Sx x Tx x g

uv w u v Tuw Tvw xx w Tux

It is obvious that the class of nite P Qorders is dened by some FO Wenow

dene a sentence FO and let C Mod We dene i as

f i

W

follows and let

i

i

xPx Qx Qc Pd

xy Txy Py Qx

xy x y Px Qy Qx Py

xy x y yx

xy z xy yz zx

xy z Sxy x y yx x y yz Px Qy Py Qx

We claim that C is monotone First supp ose that A C satsies Since is p ositive

every enrichmentofA also satsies Now supp ose that A is a P Qorder By considering

expansions of the dierent relations in the signature it is easy to see that every enrichment

A

of A is also in C For example if B is obtained from A by expanding P then there is a

b B such that B j Pb QbThus B j Similar considerations show that expanding

Qx S xy or xy also pro duces a mo del of Finally there are enrichments B of A such

that only the relation Txy is expanded and B j but it is easy to verify that any such

enrichmentisaP Qorder

Wenowshow that C is LFPdenable Observe that by Prop osition this also

provides an alternative pro of that C is monotone We dene in LFP a relation Rxy

such that over the class of P Qorders Rab holds i Pa Qb heig htb heig hta

Here heig htx is the heightofx in the linear order Rxy is like Txy except that it

consists of edges from P s to Qs p ointing in the other direction Let Rxy b e the relation

computed by the clause Rxy Px y d wz Rw z Swx Szy

The following sentences are comp onents of the LFP program to b e dened b elow

Roughlyany mo del that satises their conjunction is either a mo del of or lo oks very

muchlikeaP Qorder

Let xPx Qx xy Qx Qy x y yx x y Px Py x

A A

y yx x y The second conjunct says that every pair of elements in P Q is

connected by the relation xyFor assume that no elementofA is in b oth P and Q

Otherwise we simply have that A j Then says that if x and y are distinct and in

A A A

P ienotin Q then there is an edge connecting them Likewise for x and y in Q

Let xy z Qx Qy x y yx Sxz xy z Px Py x y yx Sxz

This sentence says that every element that is not maximal has a successor For example

A A

supp ose that x and y are in P Q such that xy In particular x is not maximal

Then by the rst conjunct x has a successor

Let xy Qx Py Rxy Txy vwTvw Rv w This says that Txy b ehaves

in the appropriate wayby using the inductively dened relation Rxy as its complement

The following LFP program denes C

Rxy Px y d wz Rw z Swx Szy

B

o

Here B is the distinguished Bo olean predicate Supp ose that A C Either A j in

viously in the class computed by the ab ove program or it is a P Qorder which case A is ob

In the latter case it is easy to verify that and are each satised in A and hence

the value of the Bo olean predicate B onA is true To establish the containment in the

other direction supp ose that A is in the class computed by the program If A j but

A j then it is straightforward to verify that A is a P Qorder

The denition of the preceding program exploits the following idea Since every element

A A

in a P Qorder A is either in P or Q and since x y linearly orders P and Q negation

can essentially b e expresssed in a p ositivewayFor example A j Pa i A j Qa Also

roughly xy i x y yxWe also observe that by making minor changes one

can eliminate the symb ols c d and Sxy from the vo cabularyFor example Sxy is actually

p ositively denable over P Qorders

It remains to show that C is not denable byaFO sentence We adapt a pro of of

Stolb oushkins from in which the positive nround EhrenfeuchtFraisse game is intro

duced The rules of this game are identical to those of the standard nround Ehrenfeucht

Fraisse game except that the D wins i the function f x from A to B that sends each

p ebble to p ebble is a partial injective homomorphism b etween the induced submo dels

i i

of A and B That is the D must maintain the condition that for all k ary relations R

n

and all k tuples of p ebbles ifA j R then B j Rf We dene A B to

mean that for all sentences FO with qr nif A j then B j

Prop osition Stolb oushkin For al l A and B and al l n the fol lowing condi

tions areequivalent

n

A B

The D has a winning strategy in the positive nround game on A and B

Toprove that C FO itsucestoshow that for all n there are A CB C

n

such that A B We dene A to b e a P Qorder and B to b e an imp overishment

of A obtained byremoving a single T edge Let the universe of A b e the set of ordered

n A A

pairs fw h j w f g and h g with P resp Q the set of elements of

the form hresp h A jw h w h iw w and hh The relation

A A A

x y uniquely determines the the interpretation of Sxy c d Finally

A n n

T fw h w h j w w andh h g f g B is

B A n n

identical to A except that T T f gItiseasytoverify that

A C and that B C

Wenow describ e a winning strategy for the D in the nround p ositivegameonA and

B Ineach round she either plays on the same element on the other structure as the S

or she plays on its S predecessor or successor RoughlyonP or far from the midp oints

n n

and the D copies the Ss moves and near the midp oints and in Q she

plays so that the p ebbles on B are shifted one higher than their counterparts In

any round m if S plays on h in either A or B then the D plays on h in the other

n n n

mo del In round if the S plays on h and dh j h j then the D also

plays on h Otherwise the D plays a shift so that h and h

with h h or h dep ending on whether or not the S played on A In this case we

say that the p ebble pair is shifted In each round m let I b e the smallest interval

m

n n

and the hcomp onent h of s t s t that contains

l m m m m

any shifted p ebble l m If no p ebbles have b een shifted through round m then

l

n n

I is the degenerate interval In round m the D copies the Ss move

m

nm

h if the distance from h to the interval I is greater than

m m m m

Otherwise the D plays a shift exactly as describ ed for the rst round It is easy to see

that this provides the D with a winning strategy

Chapter

Mo dal logic over nite structures

In this chapter we discuss the nite mo del theory of the language of prop ositional mo dal

logic PM Mo dal logic has b een studied extensively in connection with philosophical logic

More recently connections have emerged b etween mo dal logic and computational linguis

tics and certain areas of computer science Belowwe will b e interested in the classical

mo del theory of mo dal logic an approach taken byvan Benthem and others For example

PM satises certain preservation theorems that are analogous to classical theorems for FO

We show that in contrast to more expressive logics PM remains wellb ehaved over F as

various classical results remain true over the class of nite mo dels

In order to make this chapter selfcontained we briey describ e the and seman

tics of PM Most of this material is wellknown and more detailed descriptions can b e

found in many places eg see The syntax of PM is obtained from that of simple

sentential logic by adding the two mo dal op erators  necessarily and possibly

Over a signature of symbols fp p g the class of sentences of

k

PM is the smallest class containing each atomic sentence p and closed under nega

i

tion conjunction disjunction and the op erators  and Wewillalways assume that

the signature is nite and nonempty A Kripke mo del of PM is a directed graph A

with additional unary predicates fP P g corresp onding to each prop osition symbol

k

The edge relation Rxy is often called the accessibility relation and wewillsay that b is

accessible from a just in case Rab

Denition Satisfaction for sentences of PM at a node or world is dened inductively

PM

A aj p i A j P a

i i

The Boolean operations are given their standard interpretations

PM

For the modal operator necessarily A aj q i for al l b A such that A j

PM PM

Rab A bj q Possibly is dened dual ly A aj q i there is some b A

PM

such that A j Rab and A bj q

This semantics suggest a natural interpretation of PM into FO In fact by reusing

variables we can translate PM into the language L Since sentences of PM are evaluated

at a no de of the Kripke mo del they naturally translate into FOformulas with one free

variable In order to keep the image of the translation in L we will simultaneously

dene two functions and such that i contains x free and ii for

d d

all PM is obtainable from by replacing every o ccurrence of x by x

and viceversa The functions fromsentences of PM to formulas of L are dened

d

inductively as follows

p P x

d j j d

q q q q

d d d

q q

d d

q x Rx x q

d d d d d

q x Rx x q

d d d d d

To simplify the exp osition we add a single constant c to our FOsignature to convert each

formula with one free variable into a sentence Let b e the function from PM to L

such that for all PM is obtained from by replacing each free o ccurence

of x by c Then each mo del is viewed as having a distinguished no de at whichmodal

M

sentences are evaluated Let FO themodal fragment of rst order logic b e the image of

PM under the mapping

In his dissertation van Benthem gave an algebraic characterization of FOdenable

classes that are denable by a mo dal sentence He intro duced the following imp ortant

notion

A B

Denition Given two models A and B with distinguishednodes c and c a bisim

ulation between A and B is a binary relation containedinA B such that

A B

c c

For al l a b such that a bifA j Raa B j Rbb then thereisab B a A

such that a b

For al l a b such that a b and al l P A j P a i B j P b

j j j

We say that A bisimulates with B i there is a bisimulation between the two models We

also write A a B b if there is a bisimulation between A and B such that a b

Bisimulation is an equivalence relation on structures which can b e seen as a mo died

weak kind of partial isomorphism It is easy to see that if there is a bisimulation b etween

a pair of mo dels then they satisfy the same mo dal sentences

Van Benthem proved the following preservation theorem a FOdenable class of mo d

M

els is closed under bisimulations i it can b e dened by a sentence in FO Belowwe

prove that this result remains true over F We then show that an existential preservation

theorem due to van Benthem and Visser see also holds over the class of nite struc

tures Finallywegive an alternative pro of which do es not use the compactness theorem

of Andreka van Benthem and Nemetis result establishing the mo dal analog of the

Craig interp olation theorem

Background

In this section wepresent background information needed for the pro ofs of the main results

that app ear in Section Our development of this material closely parallels analogous

results for b oth F O and for the various nite variable logics We rst dene an innite

game to characterize full bisimulation We then intro duce nite versions of the game and

the notion of nbisimulation and determine their connection to mo dal denability

In the eternal modal EhrenfeuchtFraisse game the Sp oiler and the Duplicator play

a mo died two p ebble EhrenfeuchtFraisse game with p ebble pairs At

A B

the start of the game p ebbles and are on c and c resp ectively In round the S

either places on some elementofA such that A j R or places on some element

of B such that B j R The D then do es the same on the other structure In each

subsequent round n the Sp oiler cho oses a pair of p ebbles already in playand

i i

replays either on A suchthatA j R or on B such that B j R The D

i i i i i i

then plays the other p ebble on the other structure in accordance with the same restriction

Each player loses immediately if he or she cannot make a legal move The Sp oiler wins at

i B j P Observe that the Duplicator round n if there is P such that A j P

i m i m m

do es not have to play so that the partial mapping from A to B induced by the p ebbles is a

partial isomorphismeg in some round she could play on the same elementas in

M

B even if S had not just played on in A This is b ecause sentences of FO do not

contain equality The Duplicator wins the game just in case in every round the Sp oiler

do es not win The following prop osition is straightforward

Prop osition For al l A and B of signature the fol lowing conditions areequivalent

There is a bisimulation between A and B

The Duplicator has a winning strategy in the modal game on A on B

We turn our attention now to mo dal denability

Denition The quantier rank of a formula qr is dened inductively

qrP

i

qr qr

qr qr maxqr qr

qr qr qr

Of course there are no genuine quantiers in PM the choice of terminology emphasizes

the connection b etween PM and FO In particular for all PM qr equals the

n

quantier rank of the FOsentence Let PM b e the set of sentences of quantier

n

tier rank n Givenamodel A the PM theory of A is then the set of sentences of quan

rank n satised by A

Lemma Let be a xed signature

n

For al l nuptological equivalence thereare nitely many sentences of PM

Thereisarecursive function f n that generates a nite list of al l sentences up

to logical equivalence of quantier rank n

n

For al l AthePM theory of A is nitely axiomatizable

Proof WeprovePart by induction on n The case n is obvious For n observe

that every sentence of quantier rank n is a Bo olean combination of sentences of the

form with qr nParts and follow easily from Part

Denition We say that thereisannbisimulation between A and B written A B

n

i thereisasequenceofrelations each on A B such that

n

A B

c c

For al l m nifa bandA j Raa then thereisab B such that B j Rbb

m

and a b and viceversa

m

For al l m nifa b then for al l P A j P a i B j P b

m j j j

Intuitively A B means that A and B bisimulate up to depth n Observe that

n

A B implies A B for all n and that also denes an equivalence relation on

n n

classes of structures By xing a b ound on the numb er of rounds in a game we get the

nround mo dal EhrenfeuchtFraisse game Then the following prop osition can b e proved

by straightforward mo dication of standard results connecting EhrenfeuchtFraisse games

to logical expressibility

Prop osition For al l nand A and B over some the fol lowing conditions areequiv

alent

Thereisannbisimulation between A and B

The Duplicator has a winning strategy in the nround modal game on A on B

dal formulas of quantier rank n A j i B j For al l mo

The next prop osition follows easily from Prop osition and Lemma

Prop osition Let C be any class of models closed under isomorphism Let C beany

subclass of C also closed under isomorphism Then for al l n the fol lowing conditions are

equivalent

For al l A C B CC A B

n

For al l A C B CC theSwinsthe nround modal game on A and B

Thereisamodal sentence of quantier rank n that denes the class C over C

Bisimulation and nbisimulation are rather weak equivalence relations in the sense

that they determine relatively large equivalence classes In other words for every mo del

A there are many other mo dels with the same mo dal theory Our pro ofs will exploit this

feature rep eatedly

We x the following terminology

Denition The children of a in A arethoseb such that A j Rab We say that b is a

descendent of a i there is a directedpath from a to bFor al l n b is an ndescendent of

a

a if thereisapath of length n from a to b The family of a written F is the submodel

of A with universe fag fb j b is a descendent of agFor al l a and b we say that a and b

are disjoint i F F

a b

The r neighborhoodofapoint a denoted N a is dened inductively N a is the

r

A with universe fagFor al l r b N a i b N a or thereisan submodel of

r r

a N a such that A j Ra b Rba An r tree is a directedtreerootedatc of height

r

r An r pseudotreeisamodel such that N c is a tree such that al l distinct pairs of its

r

leaves are disjoint as denedabove

Wenow describ e certain op erations on mo dels that pro duce either bisimilar or n

bisimilar mo dels For A and awesay that A is obtained from A by adding a copyof

the family of a i A is the extension of A with universe the disjoint union of A and of

a a a

F such that for all a A and a F the copy of F in A A j Raa Ra ai

a

A j Raa Ra a where a is the copyofa F The binary relation fa a j a

A A a A and a a or a is a copyofag witnesses that A

Another concept from mo dal logic is that of unraveling a structure to pro duce another

structure with whichitbisimulates Before dening this notion wegive a simple illus

tration Let A b e the graph on one vertex with a lo op and let A b e the directed chain

on c n such that for all m n A j Rm m and A j Rnn We can view

A as having b een obtained from A by unraveling or unwinding the lo op n times The

set A A is itself a bisimulation b etween A and A In general anymodel A can b e

c

nunraveled so that the ndescendents of c form an ntree By unraveling F in A we

obtain a p ossibly innite tree Every unraveling of A bisimulates with A

e assume that every elementofA is a descendentofc ie To simplify the denition w

c

A F The nunraveling of A will b e an npseudotree whichwe call A We rst describ e

A

the tree p ortion of A that is N c The ro ot of the tree will b e c itself and for each

n

path in A of length s n starting at c there is a no de of height s in the tree Thus each

no de is indexed by a path a c a a a that is a sequence of length s such

s

that for all qsAj Ra a Given a path a and an element a A let a a denote

q q

their concatenation that is a a a a For each such a A j P aiA j P a

s j j s

In A there is an edge from a to a i a a a for some a A This completes the

description of the ntree which is the nneighb orho o d of c in A Wenow attach copies of

families to the leaves of this tree of height n to obtain the npseudotree A That is at

a

n

a c a a a we attacha copyofF a and identifying the elements eachnode

n

a There may b e many copies of any family but each pair of families is disjoint It is now

n

easy to construct a bisimulation b etween A and A The unraveling is dened similarly

except that no families are attached to anynodes

We collect together some easy to verify facts for later use

c

A bisimulates with a treerootedatcits Prop osition For al l A A F

A

unraveling A bisimulates with an npseudotree its nunraveling Anbisimulates

with an ntree a submodel of its nunraveling Over a xed signature thereisa

recursive function f x such that for al l modal sentences of quantier rank nif

is satisable by a nite or innite mo del then it is satisable by an ntreeofcardinality

c

is acyclic f nFor al l nite A the modal theory of A is nitely axiomatizable i F

Proof We provide pro ofs of Facts and From Fact and Prop osition it is clear that

n

for all PM is satisable i it is satised byanntree Given a xed nite signature

wenow dene an eective pro cedure that maps each natural number n into a nite

n

set of ntrees T such that for all PM of quantier rank nif is satisable

n n

then it is satised in some A T This will suce to establish the claim The sets T

are dened inductively T contains every mo del up to isomorphism with exactly one

j j n n

element and has cardinality For n A T i A T or A is an ntree

ro oted at c with children a a satisfying the following prop erties i for all i k

k

a a n a

j i i

F is isomorphic to some tree B the family F T and ii for all i j k F

n

It is easy to verify b oth that there is a recursive b ound on the size of mo dels in each T

n

and that every ntree bisimulates with an ntree in T This establishes Fact

c

Wenow proveFact Supp ose that F is acylic We show by induction on the

c

height n of F that A is axiomatized byasentence of quantier rank n For

V V

n let P Q P P where is the set of prop osition

P Q

c and P is any prop osition symbol in For n and eachchild symb ols satised at

V

a

i

a of clet be a sentence that axiomatizes the family F Then let P

i i

P

W V V

It is clear that axiomatizes the mo dal theory of AIn  Q

i i

i i Q

c

the other direction let A b e such that F contains a cycle and let b e a mo dal sentence

of quantier rank n Let B be an ntree that veries It is easy to show that there is

a mo dal sentence ofquantier rank n true in A but not in B For example

let P P contain a string of n s for any P Therefore the

mo dal theory of A is not axiomatized byanysentence of quantier rank n and hence is

not nitely axiomatizable

Observe that Fact implies some wellknown results One a mo dal formula is satisable

i it is satisable by a nite Kripkemodel Two it is decidable whether a formula is

satisable b oth over the class of all structures and over F

Preservation theorems

In this section we show that two mo dal preservation theorems remain valid over the class

F The arguments do not use niteness in anyessential way therefore they also give

alternative pro ofs of the theorems in the general case that do not rely on the Compactness

theorem Finallyweshowhow these metho ds can b e used to reprove the mo dal version

of the Craig interp olation theorem without employing compactness

Prop osition The bisimulation preservation theorem for modal sentences remains true

in the nite case That is a class C is FOdenable and closed under bisimulations i it

is denable by a modal sentence

Proof Let C be a FOdenable class that is closed under bisimulations Supp ose that C

is not denable by a mo dal formula By Prop osition this implies that for all n there

are A C and B C such that A B Of course since C is closed under bisimulations

n

wehave that A B Wewillshow that this condition implies that for all n there are

actually A C and B C such that A B Recall that A B means that for all FO

n n

with qr n A j i B j This immediately implies that C is not FOdenable

acontradiction

More sp ecicallywe show that there is a function l xsuch that for all nifA B

ln

then there are A and B such that A A B B and A B Bycho osing A C and

n

B CwegetA C and B CGiven A and B we nd A and B by mo difying A and

B in a sequence of steps as describ ed in the following lemmas

Lemma Let A and B besuchthat A B Then thereare tpseudotrees A and B

t

such that A A B B andA B

t

Let A and B be the tunravelings of A and B Then A and B are tpseudotrees such

that A A and B B By the transitivityof this implies that A B

t t

pseudotrees Lemma Let A and B be tpseudotrees such that A B Then thereare t

t

B A

N c A and B such that A A B B andN c

t t

The pro of describ es an algorithm for mo difying the two mo dels in a sequence of steps

that yields mo dels with isomorphic tneighb orho o ds of c After each step s s twe

A B

s s

havemodels A and B such that A A and B B and c and c have isomorphic

s s s s

sneighb orho o ds At eachsteps A resp B is obtained from A by adding

s s s

copies of families of no des of distance s from c

Let fa a b b g b e the set of the children of c in A and B The relation

l m t

induces an equivalence relation on this set such that each equivalence class has at least

one memb er in eachofA and B To obtain A and B with isomorphic neighborhoods

of c that bisimulate with A and B it suces to add enough copies of families of the c

children a and b such that each equivalence class has an equal numb er of memb ers in

i j

A and B For example renumb ering the indices of cchildren if necessary supp ose that

fa a b b g is one such equivalence class Also without loss of generality assume

i j

a

i

Let g xbea that i j ThenA will contain j i additional copies of the family F

bijection b etween the cchildren in A and B such that for all a A a B g a

i i t i

By iterating this pro cedure at eachsteps we obtain A and B and a bijection

s s

A B

g between no des of distance s from c and c with the following prop erties For

s

all no des a in A of distance s from c the bijection g maps the children of a to those

i s s i

of g a and for all a domg A a B g a Finallywecho ose

s i s s s s

ts

A and B to b e the mo dels A and B

t t

Together these lemmas establish that there are mo dels A C and B C that lo ok

rather similar In particular for all t there are tpseudotrees A C and B C such that

A B

N c N c Although these mo dels have isomorphic tneighborhoods of cwe still

t t

e A and B lo ok very know nothing ab out the other part of each mo del whichmightmak

dierent in FO The nal step of the pro of takes care of this by using a version of Hanf s

lemma

Prop osition Hanf For each signature there is a function f x with the fol

lowing property For al l n A and B ifthereisabijection h A B such that for al l

N ha with a and ha distinguished then A B a A N a

n

f n f n

A B

Lemma Let A and B be f npseudotrees with N c N c where

f n f n

f x is the Hanf function Then thereare A and B such that A A B B and

A B

n

EachofA and B will b e obtained from A and B resp ectivelyby extending the original

mo del by adding disjoint comp onents in suchaway that it will b e obvious that A and

B p ossess the same f nnbhds It is clear that extending mo dels in suchaway do es not

A

aect bisimulations Let A B b e the submo del of A B with universe A N c

f n

B

B N c We dene A B to b e the disjoint union of A and B B and A Weve

f n

added to A the part of B that maylookvery dierent from it and viceversa so that

A will lo ok the same lo cally as B In particular for example it is easy to see that

car dA car dB Wenow dene a bijection b etween these mo dels in parts Let

A B

g x b e an isomorphism b etween N c in A and N c in B Dene h xtobe

f n f n

A B

the bijection b etween N c andN c that is a restriction of the isomorphism

f n f n

g x Let A b e the submo del of A whose universe is those elements of B that are in

B

N c viewing B here as a submo del of B We dene B similarilyLeth b e the

f n

bijection b etween A and B that is also a restriction of the isomorphism g x Let h be

A and B that takes the Apart of A to the bijection b etween the remaining pieces of

the Apart of B and the B part of A to the B part of B Itistheneasytoverify that

h h h h is a bijection from A to B that preserves f nnbhds This is p erhaps

easier to see if one draws a picture Thus A B as desired

n

To complete the pro of all that remains is to combine the ab ove results Supp ose that

C is FOdenable closed under bisimulations but not denable by a mo dal formula Then

by Lemmas and for all n there are A C and B C such that A B But this

n

implies that C is not FOdenable a contradiction This proves the prop osition

The next preservation theorem that we consider characterizes those sentences whose

classes of mo dels are closed under extensions Before stating the main result we dene

some terminology and prove a few preliminary lemmas

Denition A sentenceisa modal sentence built up from atomic

and negated atomic propositions using and

For al l A and B we write A  B i for al l sentences ifA j then B j

Given a model Athe theory of A is the set of sentences satisedby A

Observe that the sentences are precisely those PM such that is an existential

FOsentence In particular the class of mo dels of any sentence is closed under extensions

Lemma Let A beann tree rootedat c

For al l sentences of quantier rank n A j

The theory of A is axiomatized by a sentence of quantier rank n

Proof Partisobvious since A do es not contain any paths of length n By Lemma

let b e the set of all sentencesofquantier rank n up to equivalence satised

k

V

in AByPart it is clear that axiomatizes the theory of A

i

n

Lemma Given a xed signature there is a nite set of ntrees T fB B g

v

n

such that for al l Athereisa u v such that A B Furthermore T can be obtained

n u

eectively

n

Proof This result follows easily from Fact of Prop osition Let T b e the same set that

was dened in the pro of of this Fact such that every satisable sentence of quantier

n

n

rank n is satised bysomeB T LetA be any mo del and let PM axiomatize

n

n

n

its PM theory again using Lemma By Fact there is a B T such that B j

n

This now implies that A B

n

The next result can b e viewed as the mo dal version of the LosTarski theorem for nite

structures

Prop osition The existential preservation theorem for modal logic remains true over F

That is for al l if Mo d EXTthen is equivalent to a sentence Moreover

f

thereisaneective procedure for nding the equivalent sentence

n

Proof Let CEXT b e dened bysomesentence with quantier rank n Let C

n

CT fD D g For each D i k let axiomatize the theory of D By

k i i i

W

We claim that is equivalentto Lemma qr n Let

i i

ik

n

First we show that implies Supp ose that A j We claim that there is a D C

n

such that A D By Lemma there is a B T such that A B Since C is closed

n n

n

under equivalence B must actually b e in C and hence in C LetD B There is

n

some as dened ab ove such that D j Sinceqr n this implies that A j

i i i i

and hence A j

Nowwepro ve the opp osite direction implies Supp ose that A j Then A j

i

n

for some i k By Lemma there is a B T such that A B Observe that

n

D  B Wewanttoshow that there is an A such that i B A and hence A A

i n

and ii D A AsD CandCEXT i and ii imply that A C Since C is

i i

closed under equivalence A C as desired Thus it suces to establish the following

n

lemma

Lemma Let B D betrees such that D  B Then thereisa mtree A m n such

that B A and D A

By induction on the height n of D For n itisobvious that D B since D is just

D

the single no de c and for all predicate symb ols p D j p i B j pLetA B

D B

Consider n Let fd d g and fb b g be the children of c and c re

s t

d b

p r

sp ectivelyWe claim that for each d there is a b such that F  F Let with

p r

d

p

qr n axiomatize the theory of F Then D j and therefore B j Thus

b

r

there is a b suchthatF j as desired

r

B

By adding extra copies of families of the children of c to B if necessarywegetB

such that B B and there is an injection h fd d gfb b g b B such

s

j

t

hd hd d

i i i

 F By the induction hyp othesis eachsuch F bisimulates with an that F

d hd hd

i i i

h that F T Let A b e obtained from B by replacing each n tree T suc

hd hd

i i

subtree F B with the tree T It is easy to see that B A and D A

This also completes the pro of of the prop osition

Corollary For every modal sentence thereisadecision procedure that determines

whether Mo d Mo d is closed under extensions Therefore the set of sentences that

f

dene such classes is recursive

Proof By the pro of of the previous prop osition if Mo d Mod EXT then it is

f

equivalenttoasentence of quantier rank qr By Lemma one can eectively

list up to logical equivalence all suchsentences Then it suces to test the

l

validityofeachsentence which is decidable

i

Wenow turn to an interp olation theorem due to Andreka van Benthem and Nemeti

It will b e convenienttointro duce briey a fragment of second order prop ositional mo dal

P etc as shorthand logic which allows quantication over prop ositions We often use

for sequences P P Wewrite P to indicate that the set of prop osition symbols

n

P Alsoby PP Qwe mean the sentence P P P Q that o ccur in equals

n

Denition Let P Q be a sentenceof PM such that P Q Then QP Q

is a modal sentence for al l A with signature P A j QP Q i thereisaB

an expansion of A with signature P Q such that B j P Q modal sentences

QP Qare dened similarly of the form

P

For all A B and nwewriteA B i for all sentences q r n that only

n

P A j i B j Recall that every satisable mo dal contain prop osition symb ols from

sentence is satisifed by a nite mo del hence implies over the class of all mo dels i

implies over F By this fact the truth of the interp olation theorem in the general case

immediately yields its truth over F

Prop osition Andreka van Benthem and Nemeti Let and bemodal

sentences with signatures and suchthat is nonempty If implies

over F then there is a sentence with such that implies and

implies Furthermore qr maxqr qr

Proof Supp ose that P Q implies P R where P Q and R are pairwise disjoint

sequences of prop ositions symb ols Equivalently QP Q implies R P R Thus we

consider mo dels over the signature P Let n maxqrqr Recall that by

P

equivalence classes We claim that it Lemma or there are only nitely many

n

P

suces to show that for any QP Q class C if there is an A C such that A j

n

P

then for all B C B j R P R If this is true for each class C containing an A

n

QP Q let be a sentence with signature P qr n that denes that satises

i i

the class Here we use that P is nonempty since no sentence contains no prop osition

W

symb ols Then is an interp olant

i

P

Supp ose towards a contradiction that there are A and B such that A B A j

n

QP Q and B j R P R Let A and B b e expansions of A and B such that

A j P Q and B j P R By Lemma there are ntrees A and B that are

equivalenttoA and B resp ectively FinallyletA and B b e the reducts of A

n

and B It is clear that A j QP QandB j R P R Wenowwant to nd a

QP Q R P R This will establish the contradiction D such that D j

D is constructed by extending A and B simultaneously by iteratively adding copies

of families of elements First weshow that for anymodel M ifM is obtained from M

m

by adding a copyofafamily F forany m M then every sentence satised in M

is also satised in M Supp ose that M j PP Q Let N b e an expansion of M that

P Q and let N b e obtained from N by adding veries the rstorder mo dal sentence

a copy of the family of m It is clear that N N thus N j P Q Since N is an

expansion of M M j PP Q as desired

Wenow describ e the construction of D As in the pro of of Lemma induces an

n

A B

equivalence relation on the set of children of c and c such that every equivalence class

has at least one memberineachmodelLetA and B b e obtained from A and B by

adding enough copies of families of these children so that there is a bijection g xfrom

A B a g a

  i i

the children of c to those of c such that for all a F F Observe that

i n

A B

 

N c N c Rep eat this pro cedure at eachlevel m n of the trees on pairs of

subtrees in A and B determined by the bijection g x at the previous level By the

m m m

argument of the preceding paragraph for all m A j QP Q and B j R P R

m m

A B

m m

Furthermore N c N c This construction yields trees A and B such

m m n n

that A A B B and A B LetD A

n n n n n

Chapter

Conclusion

In this dissertation wehaveinvestigated the prosp ects for the development of p ositive

mo del theoretic results over the class of nite structures Regarding preservation theorems

these prosp ects app ear to b e somewhat mixed The p ositive results that we establish have

b een for weaker less expressive languages such as prop ositional mo dal logic L and low

quantifer prex classes of FO and for classes with strong closure conditions eg HOM

In particular results from Chapter indicate that mo dal logic remains wellb ehaved over

F One way to try to extend this work would b e to try achieve similar results for stronger

levels of the b ounded quantier hierarchyintro duced in It is also unknown whether

existential preservation holds for L bothover F and over the class of all structures see

k

and whether homomorphism preservation holds for L k Wehave also given a

partial p ositive answer to what is p erhaps the ma jor op en question in this area do es the

Homomorphism preservation theorem hold over F

The situation regarding generalized preservation theorems for the class EXT is now

fairly well understo o d Grohes pro of that FO EXT L essentially yields a deni

tive negative answer to the questions that app ear at the end of Section One may still

ask for which quantifer prex classes w isFOw EXT L We can also raise

analogous questions for the class HOM

Is FO HOM L

Is FO HOM Datalog

Is L HOM L

Observe that by Ajtai and Gurevichs result a p ositive answer to question would imply

the truth of the Homomorphism preservation theorem over F

FinallyIwould like to mention several questions that arise in connection with the

results from Chapter Recall that for all k there is a single nite mo del that satises the

k k k

set of all consistentsentences of L By Prop osition Mo d is not denable

f

W W

k k

in L of course it may b e denable in L for some k k We ask instead

the following related question

k

For k is Mo d inFO

f

k k k k

Recall also that for anymodel A of the k Gaifman theory A j Let C fA j

k

B A and B j g the upward closure of Mo d It is clear there is a B such that

k f k

k k

that for all k C Mo d but we do not know whether the classes are equal

f

k k

For k is C Mod

f

k

For k is C in FO

The nal question can b e reformulated as a problem in combinatorics It is equivalentto

asking whether there is a nite set fB B g of mo dels with the k extension prop erty

n

such that for every mo del with this prop erty there is some such B emb edded in it

i

Biblio graphy

F Afrati S Cosmadakis and M Yannakakis On datalog vs p olynomial time In

Proceedings of the th ACM Symposium on Principles of Database Systems

M Ajtai and Y Gurevich Monotone versus p ositive Journal of the ACM

M Ajtai and Y Gurevich Datalog vs rstorder logic In Proceedings of the th

IEEE Symposium on Foundations of Computer Science pages

H Andreka J van Benthem and I Nemeti Submo del preservation theorems in nite

variable fragments In A Ponse M de Rijke and Y Venema editors Modal Logic

and Process Algebra Cambridge University Press

H Andreka J van Benthem and I Nemeti Back and forth b etween mo dal logic and

Technical Rep ort ML University of Amsterdam

J Barwise On Moschovakis closure ordinals Journal of Symbolic Logic

J van Benthem Modal correspondence theory PhD thesis University of Amsterdam

dal logic and classical logic Bibliop olis J van Benthem Mo

A Dawar S Lindell and S Weinstein Innitary logic and inductive denabilityover

nite structures Information and Computation

R Fagin Generalized rstorder sp ectra and p olynomialtime recognizable sets In

R M Karp editor Complexity of Computation SIAMAMS Proceedings Vol pages

R Fagin Probabilities on nite mo dels Journal of Symbolic Logic

March

H Gaifman Concerning measures in rstorder calculi Israel Journal of Mathematics

M Grohe Existential least xedp oint logic and its relatives Manuscript

Y Gurevich Toward logic tailored for computational complexity In M Richter

et al editors Computation and pages Springer Lecture Notes

in Mathematics

Y Gurevich On nite mo del theory extended abstract In S R Buss and PJ

Scott editors Feasible Mathematics pages Birkhauser

W Hanf Mo deltheoretic metho ds in the study of elementary logic In J Addi

son L Henkin and A Tarski editors The Theory of Models pages North

Holland

N Immerman Upp er and lower b ounds for rstorder expressibility Journal of

Computer and System Sciences

Ph G Kolaitis and M Y Vardi On the expressivepower of datalog to ols and a case

studyInProceedings of the th ACM Symposium on Principles of Database Systems

pages

Ph G Kolaitis and M Y Vardi Innitary logics and la ws Information and

Computation

Lib o Lo Preservation theorems of nite mo dels abstract Journal of Symbolic Logic

B Poizat Deux ou trois choses que je sais de L Journal of Symbolic Logic

n

A Stolb oushkin Finitely monotone prop erties In Proceedings of the th IEEE

Symposium on Logic in Computer Science pages

W Tait A counterexample to a conjecture of Scott and Supp es Journal of Symbolic

Logic