<<

University of Pennsylvania ScholarlyCommons

IRCS Technical Reports Series Institute for Research in Cognitive Science

November 1995

First Order Logic, Fixed Point Logic and Linear Order

Anuj Dawar University of Pennsylvania

Steven Lindell University of Pennsylvania

Scott Weinstein University of Pennsylvania, [email protected]

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

Dawar, Anuj; Lindell, Steven; and Weinstein, Scott, "First Order Logic, Fixed Point Logic and Linear Order" (1995). IRCS Technical Reports Series. 145. https://repository.upenn.edu/ircs_reports/145

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

This paper is posted at ScholarlyCommons. https://repository.upenn.edu/ircs_reports/145 For more information, please contact [email protected]. First Order Logic, Fixed Point Logic and Linear Order

Abstract The Ordered conjecture of Kolaitis and Vardi asks whether fixed-point logic differs from first-order logic on every infinite class of finite deror ed structures. In this paper, we develop the tool of bounded variable element types, and illustrate its application to this and the original conjectures of McColm, which arose from the study of inductive definability and infinitary logic on proficient classes of finite structures (those admitting an unbounded induction). In particular, for a class of finite structures, we introduce a compactness notion which yields a new proof of a ramified ersionv of McColm's second conjecture. Furthermore, we show a connection between a model-theoretic preservation property and the Ordered Conjecture, allowing us to prove it for classes of strings (colored orderings). We also elaborate on complexity-theoretic implications of this line of research.

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

This technical report is available at ScholarlyCommons: https://repository.upenn.edu/ircs_reports/145 Institute for Research in Cognitive Science

First Order Logic, Fixed Point Logic and Linear Order

Anuj Dawar Steven Lindell Scott Weinstein

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

November 1995

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

IRCS Report 95--30

First Order Logic Fixed Point Logic and

Linear Order

 

Anuj Dawar Steven Lindell Scott Weinstein

Dept of Computer Science Univ of Wales Swansea Swansea SA PP UK

email adawarswanseaacuk



Dept of Computer Science Haverford College Haverford PA USA

email slindellhaverfordedu



Dept of Philosophy Univ of Pennsylvania Philadelp hi a PA USA

email weinsteincisupennedu

Abstract The Ordered conjecture of Kolaitis and Vardi asks whether

xedp oint logic diers from rstorder logic on every innite class of

nite ordered structures In this pap er wedevelop the to ol of b ounded

variable elementtyp es and illustrate its application to this and the orig

inal conjectures of McColm which arose from the study of inductive

denability and innitary logic on procient classes of nite structures

those admitting an unb ounded induction In particular for a class of

nite structures weintro duce a compactness notion which yields a new

pro of of a ramied version of McColms second conjecture Furthermore

we show a connection b etween a mo deltheoretic preservation prop erty

and the Ordered Conjecture allowing us to prove it for classes of strings

colored orderings We also elab orate on complexitytheoreti c implica

tions of this line of research

Intro duction

The extensions of rst order logic by means of xed p oint op erators in particular

the least xed p oint and partial xed p oint op erators have b een much studied

in recentyears in the eld of nite mo del theory This is in large measure due to

their connection with complexity classes ImmermanImmandVardi Var

showed that the logic LFP the extension of rst order logic with a least xed

p oint op erator captures the class PTIME on ordered structures Vardi Var

and Abiteb oul and VianuAV showed that the similar extension of rst or

der logic with a partial xed p oint op erator PFP captures the class PSPACE

on ordered structures Furthermore Abiteb oul and VianuAV showed that

LFP PFP if and only if PTIME PSPACE even without the restriction to

ordered structures One of the most imp ortant to ols in the analysis of the xed

p oint logics is the b ounded variable innitary logic L Kolaitis and Vardi

Research supp orted byEPSRCgrant GRH

Partially supp orted by NSF grant CCR and the John C Whitehead faculty

research fundatHaverford College

Supp orted in part by NSF CCR

KVb showed that on the class of nite structures LFP and PFP can b e

seen as fragments of L Moreover L has an elegantcharacterization in

terms of p ebble games which has proved an extremely useful to ol in the analysis

of the expressivepower of the xed p oint logics

The logics LFP and PFP are b oth extensions of rst order logic and indeed

they are prop er extensions on the class of all nite structures and on the class of

ordered nite structures It also follows from the result of Abiteb oul and Vianu

that if we can separate these two logics on any class of nite structures C then

wewould separate PTIME from PSPACE On the other hand one can construct

innite classes of structures on which the logics are equivalent and b oth of them

indeed even L collapse to rst order logic

Kolaitis and Vardi KVa initiated an investigation of which classes of

structures C have the prop erty that LFP and L collapse to rst order logic

on C They proved a conjecture of McColm McC showing that L collapses

to FO if and only if every p ositive rstorder induction is b ounded Gurevich

Immerman and Shelah GIS refuted another conjecture due to McColm by

constructing a class of structures on which LFP collapses to FO but L do es

conjectured the following weaker version of not Kolaitis and Vardi KVb

McColms conjecture which remains op en

Conjecture KolaitisVardi On every innite class of ordered structures

thereisapolynomial time computable query that is not rst order denable

In this pap er we discuss McColms conjectures relating them to nite vari

able elementtyp es as intro duced in DLW a notion of compactness for classes

of nite structures and a preservation prop erty In particular we relate this

preservation prop erty to Conjecture allowing us to prove it for classes of strings

linear orders with unary relations We also comment on the complexitytheo

retic implications of Conjecture Parts of the material in this pap er app eared

in preliminary form in Daw

Section covers the background material on xed p oint logics innitary

logics and elementtyp es Section relates inductive denitions and McColms

conjectures to b ounded variable elementtyp es compactness and preservation

prop erties Section discusses the relation b etween the preservation prop erties

and Conjecture while Section relates this conjecture to questions in com

plexity theory

Background

We assume the standard denitions of a rst order language or signature and

a structure interpreting it Unless otherwise mentioned all structures we will b e

dealing with are assumed to have nite universe and all signatures are assumed

to b e nite and relational that is to consist of nitely many relation symb ols

We write F to denote the class of all nite structures of signature and O

to denote the class of ordered nite structures ie O is the collection of

structures in F whichinterpret the binary relation symbol as a linear

fg

order

An nary query over a class of structures C is a map Q sending each structure

A C to an nary relation over A which satises the following condition for all

A B C if f is an isomorphism from A onto B then QBf QA

We will write FO LFP etc b oth to denote logics ie sets of formulas and

the classes of queries that are expressible in the resp ective logics Wesay a logic

L col lapses to another logic L over a class of structures C if and only if the

collection of restrictions of queries in L to C is included in the collection of

restrictions of queries in L to C

Inductive and Innitary Logics

Let R x x b e a rstorder formula On a structure A denes the

k

A A

op erator R fha a ijhAR ij a a gIf is an Rp ositive

k k

A

formula is monotone Wemay view as determining an induction on A the

A

m

m 

The closure stages of which are dened as follows

A

A A A

m

m

ordinal of on A denoted jjjj is the least m such that The

A

A A

th

y can b e uniformly dened over all m stage of the induction determined b

m

structures by a rstorder formula whichwe denote by The inductively

is the least xed p oint of the op erator that dened by on A denoted

A

A

m

is where m jjjj If s is a k tuple of elements of A and s

A

A A A

m

we use jsj to denote the least m suchthats The stage comparison query

A

for denoted is the query which assigns to each structure A the k ary

relation dened as follows

jsj js j s s s s

A A

where s and s are k tuples of elements of A

We write LFP for the extension of rstorder logic with the lfp op eration

which uniformly determines the least xed p ointofanRp ositiveformula That

is for any Rp ositiveformula lfpR x x is a formula of LFP and

k

A j lfpR x x s if and only if s We will need the following

k

A

basic result ab out inductive denabilitywhich is a sp ecial case of Moschovakiss

Stage Comparison Theorem see Mos

Theorem Mos Let beanR positive rstorder formula The stage

comparison query is denable in LFP

m

The stages can b e dened for an arbitrary not necessarily p ositive

A

formula on a structure A If the formula is not p ositive these stages are not

necessarily increasing and they mayormay not converge to a xed p oint We

m

for m such that dene the partial xed p ointof on structure A to b e

A

m

m

ifsuchanm exists and empty otherwise The logic PFP is then the

A

A

closure of rst order logic under an op eration pfp uniformly dening the partial

xed p ointofaformula

The interest in xed p oint logics on nite structures stems largely from their

connection with complexity classes as established by the following results

Theorem Imm Var For any signature LFP PTIME on O

Theorem Var AV For any signature PFP PSPACE on O

Theorem AV LFP PFP if and only if PTIME PSPACE

In particular it follows from Theorem that the separation of LFP and PFP

on any class C of nite structures would yield the separation of PTIME from

PSPACE

k

Let L b e the fragment of rstorder logic which consists of those formulas

k

whose variables b oth free and b ound are among x x Let L b e the

k

k

closure of L under the rst order op erations and the op erations of conjunction

and disjunction applied to arbitrary nite or innite sets of formulas L

S

k

L Kolaitis and Vardi KVb established that on F the xed p oint

k

logics LFP and PFP can b e viewed as fragments of L Indeed they establish

wing result concerning the stages of a rstorder induction the follo

k m

Theorem KVb Let L and let be the mth stage of the induc

m k

tion determinedby is uniformly denable in L over the class of nite

k

structures Hence the least xedpoint of is uniformly denable in L over

the class of nite structures

The following denition was intro duced by McColm McC

Denition A class C of structures is procient if there is some p ositive for

mula such that supfjjjj j A Cg

A

McColm McCformulated two conjectures which taken together state

that the following three conditions are equivalentforany class of structures C

C is not procient

LFP collapses to rst order logic on C

L collapses to rst order logic on C

It is easily seen that condition implies for if is a formula suchthat

m

sup fjjjj j A Cg then there is an m such that for

A

A A

m

all A CButby Theorem it follows that is uniformly dened bya

rst order formula McColm McC also showed that condition implies

Kolaitis and Vardi KVashowed that implies thereby establishing the

equivalence of and and resolving the second of McColms two conjectures

Gurevich et al GIS construct an example of a class of structures where

holds but fails refuting the rst of the two conjectures

While McColms rst conjecture has b een refuted in the general case it

remains op en whether it nonetheless holds on classes of ordered structures ie

for any class C that is a sub class of O for some Itwas conjectured by Kolaitis

and Vardi KVa that it do es Since the only implication that is unresolved

is the implication this conjecture is the one stated as Conjecture

ab ove

ElementTyp es

The following denition intro duces the notion of elementtyp e which plays a

fundamental role in our investigations

Denition Let A b e a structure and let l k b e natural numbers For

k

any sequence s ha a i of elements of Athe L type of s in A denoted

l

k

Typ e As is the set of formulas L with free variables among x x

l

k

k k

such that A j a a is an L typ e if and only if it is the L typ e of

l

k

some tuple in some nite or innite structure If is an L typ e wesay that

the tuple s realizes in A if and only if Typ e As

k

k

In DLWwe established some prop erties of L typ es realized in nite

k

structures among them the following basic result that the L typ e of a tuple in

k

a nite structure is determined by a single formula of L

Theorem DLW For every nite structure A for every l k and l tuple

s of elements from A there is a formula Typ e As such that for any

k

structure B and l tuple t of elements B if B j t then Typ e As

k

Typ e B t

k

satises the conditions of Theorem wesaythat isolates Typ e As If

k

k

We write hAsi hBti to denote that Typ e As Typ e B t Recall

k k

that the quantier rank of a formula is the maximum depth of nesting of quan

kn

tiers in the formula We write hAsi hB ti to denote that Typ e As

k

k

and Typ e B t agree on all formulas of L of quantier rank n Finallywe

k

k k

sif A j hBti to denote that for every formula L write hAsi

and only if B j t

Notice that by Theorem for every structure A and every tuple s of elements

of A of length k there is an n suchthatforevery tuple of elements s of A if

kn k

hAsi hAs i then hAsi hAs i This observation justies the following

denition

Denition Let A b e a structure and s b e a tuple of elements of A of length

k

s is equal to the k The Scott rank of s in A with resp ect to k denoted sr

A

kn

least n such that for every tuple of elements s of A if hAsi hAs i then

k

hAsi hAs i The Scott rank of a structure A with resp ect to k denoted

k k k

sjs jAj g sr A is equal to sup fsr

A

Wewillmake use of Scott ranks in obtaining information ab out the expressive

power of LFP over arbitrary classes of nite structures The next lemma co dies

a simple relation b etween the Scott rank of a structure A and the number of

k

L typ es of k tuples realized over A The denition which precedes it intro duces

notation which will b e useful here and b elow

Denition Let A b e a structure let C b e a class of structures and let l k

b e natural numb ers with l k

k

S AfTyp e A ha a i j a a jAjg

l l

k

l

k

A card S A

k

k

S

k k

S A S C

l l

AC

Lemma For al l nite structures A and k

k

sr A A

k

kn k

Pro of Note that for each A k and n and determine equivalence

ts of A The collection of equivalence relations on the set of k tuples of elemen

k k

classes determined by corresp onds exactly to S A and thus the number

k

kn

of equivalence classes is A For each n the equivalence relation is

k

kn k

a renementof Moreover if m sr A then the equivalence relation

km k

is identical to The result now follows immediately

kn k

The equivalence relations and consequently canbecharacterized

in terms of the following twoplayer k p ebble game Wehave a b oard consisting

of one copy of each of the structures A and B There is also a supply of pairs of

p ebbles fha b iha b igAt eachmove of the game PlayerIpicks up one

k k

of the p ebbles either an unused p ebble or one that is already on the b oard

and places it on an element of the corresp onding structure ie she places a on

i

an elementofA or b on an elementofB Player I I then resp onds by placing

i

the unused p ebble in the pair on an element of the other structure Player I I

loses if the resulting map f from A to Bgiven by f a b j k isnot

j j

er I I wins the nmove game if she has a strategy to a partial isomorphism Play

avoid losing in the rst n moves regardless of what moves are made byPlayer

I Moreover some of the p ebbles may b e placed on the b oard b efore the start

of the game That is if s is an l tuple of elements of A and t is an l tuple of

elements of B where l k thenwesay the p ebbles are initially placed on s and

t if b efore the start of the game the p ebbles a a are on the elements of s

l

and the p ebbles b b are on the elements of tWe then have the following

k

characterization

Theorem ImmPoi Let A and B be structures over a xed signa

ture and let s and t be tuples of elements from the respective structures Player II

wins the n move k pebble game on structures A and B with the pebbles initial ly

kn

on the tuples s and t if and only if hAsi hB ti

k

Kolaitis and Vardi KVb proved that the equivalence relations and

k

coincide when restricted to nite structures

Theorem KVb For nite structures A and B and tuples s and t of

elements from the respective structures the fol lowing areequivalent

k

hAsi hBti

k

hAsi hB ti

k

The next result characterizes the descriptive complexityof L typ e equiva

lence and establishes a further connection b etween nite variable elementtyp es

and inductive denability

Theorem DLW Let l k and let be a nite relational signature

Thereisan Rpositive rstorder formula such that for any structure A of

signature and any l tuples s and s A j lfpR x x s s if and only

l

k

if s and s realize distinct L types in A

In sketching a pro of of this theorem we will use the following notion of basic

typ e

Denition For any structure A and elements a a jAjwhere l k

l

k k

the basic L type of a a is the set of atomic formulas ofL in l free

l

variables suchthatA j a a

l

Note that for a given nite relational signature there are only nitely many

distinct basic typ es Furthermore each basic typ e is characterized by a single

k

quantier free formula of L

Pro of of Theorem Sketch Let x x x x be

k q k

k

a xed enumeration of quantier free formulas of L in k free variables charac

terizing all the basic typ es in the signature Then dene as follows



x y x x y y

i j  k k

ij q

where y is obtained from xby replacing every x by y It should b e

i i j j

k

clear that for any tuplesa b jAj A j ab if and only if the basic typ es of



a and b are dierent

Now dene as follows

x y R x x y y xy Rx x y y

i k k  i k k

ik

y x Rx x y y

i i k k

ik

A k p ebble game argument can nowbeusedtoshow that the least xed p oint

k

of expresses the inequivalence of L typ es Indeed the n th stage of the

k

induction determined by expresses the inequivalence of L typ es restricted to

formulas of quantier rank at most n

The following lemma is a corollary to the pro of of the preceding theorem It

relates Scott ranks to the stages of the induction generated by the formula in

our pro of sketchabove

Lemma Let l k and let be a nite relational signature Let bethe

formula constructedabove relative to k and Let A be a structure of signature

k

sm Then and let s bean l tuple of elements of A with sr

A

m m

thereisan l tuple s such that A j s s and A j s s

for every l tuple s if A j lfpR x x y y s s then A j

k k

m

s s

k

In consequence jj jj sr A A

Moreover a stronger form of Theorem can b e shown namely that the

k

equivalence classes with resp ect to L in a structure A can in some sense

b e ordered uniformly by a formula of LFP This result stated formally b elow

is a crucial step in the pro of of the result due to Abiteb oul and Vianuthat

LFP PFP if and only if PPSPACE

Theorem AV DLW For every k and any signature thereisan

LFP formula x x such that for any structure A and k tuples s s

k

and s of elements of A

k

if A j s s then s and s realize distinct L types in A

it is not the case that A j s s and A j s sand

k

if s and s realize distinct L types in A then either A j s s or A j

s s

if A j s s and A j s s then A j s s

We will use the symbol to denote the preorder on k tuples dened bythe

k

formula

ElementTyp es and Inductive Denitions

k

In this section we use the machinery of L typ es develop ed ab ovetoprovide

a pro of of McColms second conjecture and related results The denition of

prociency of a class C given in Denition states that there is an inductive

denition over C that is unb ounded As wesaw in the preceding section it is

p ossible to think of inductive denitions as computations over b ounded variable

elementtyp es Intuitively sp eaking for C to admit unb ounded inductions it

must contain structures with arbitrarily large numb ers of typ es This motivates

a notion of compactness of a class of nite structures whichwe dene b elow

The denition of a class C being k compact is essentially equivalent to McColms

condition for C b eing k antiprocient see McC

k

C is Denition The class of structures C is k compact if and only if S

k

nite

In other words a class C is k compact if and only if there are only nitely

k k

many L typ es of k tuples realized in structures in C ObservethatifS C is

k

k

nite then S C is nite for all l k The prop ertywehave dened is called

l

k compactness b ecause it is equivalentto C satisfying a certain compactness

k

condition as weshow next Recall from Denition that a set of L formulas

k k

is an L typ e if and only if it is the L typ e of some tuple in some nite or

innite structure

Theorem A class of nite structures C is k compact if and only if for

k k

every L type if for every nite subset of thereisatype S C such

l

k

that then S C l

Pro of

k

Let C be k compact and let S C f gWeknow from Theorem

n

l

that there are formulas that isolate the typ es resp ec

n n

tivelyThus if is a typ e that is not realized in any structure in C itmust

b e the case that But then f g is a nite

n n

subset of that is not realized in any structure in C

k

Supp ose C is not k compact Let S C f j i g and let i be

i i

k

umeration of formulas such that isolates Let f j i g an en

i i i

Weshow that can b e completed to a typ e suchthatevery nite subset

of is realized in some structure in C However it is clear that could not

b e realized in any structure in C

k

To construct let i b e a xed enumeration of all formulas of L

i

We dene the sets of formulas inductively as follows

n



f g if f g for innitely many i

n n n n i

n

g otherwise f

n n

A simple argumentby induction shows that for all n for innitely

n i

S

many iLet The construction ensures that every nite

n

n

subset of is realized in some structure in C It then follows from a direct

application of the Compactness Theorem that is realized in some p ossibly

k

innite structure Thus is an L typ e and as was observed earlier it

cannot b e realized in any structure in C

We motivated the denition of k compactness with the intuition that inductions

are b ounded over a class of structures if there is a b ound on the number of typ es

that are realized in any structure in the class However k compactness is on

the face of it a stronger condition It stipulates that there is a nite number of

typ es realized in the entire class The next lemma shows that the two notions

indeed coincide

Lemma For any class of nite structures C the fol lowing conditions are

equivalent

C is k compact

sup f A j A Cg and

k

k

sup fsr A j A Cg

Pro of

k k

C isnite C for all A CThus if S Itisclearthat A card S

k

k k

there is a nite b ound on all A

k

This follows immediately from Lemma

k

It follows from the denition of Scott rank that every L typ e realized in

k k

A is isolated byaformula of L of quantier rank at most sr A Thus if

k k

m supfsr A j A Cg every typ e in S C is isolated byaformula of

k

quantier rank at most mHowever for any xed m there are up to logical

k 

equivalence only nitely manyformulas of L of quantier rank at most m

k

Thus S C must b e nite

k

Wecannow relate closure ordinals of formulas and typ es through the follow

ing lemma which will then allowustomake the connection b etween prociency

and k compactness in Theorem b elow

k

Lemma For every Rpositive formula L and every nite structure A

jjjj A

k

A

Pro of

m

Each stage of the iteration of the op erator dened by is closed under

k

the equivalence relation see Theorem therefore it can b e viewed as a

unionofequivalence classes under this relation Furthermore since the op erator

dened by is monotone the numb er of stages in whichitconverges must b e

bounded by the numb er of equivalence classes This numb er is of course just

A

k

We are now in a p osition to prove the following theorem

Theorem Let C be a class of nite structures of signature C is procient

if and only if thereisa k such that C is not k compact

Pro of

k

Supp ose C is procient Then there is a k and a formula L such that

supfjjjj j A Cg But it then follows immediately by Lemmas and

A

that C is not k compact

For the other direction let k b e suchthatC is not k compact By Lemma

k

it follows that supfsr A j A Cg From this and Lemma it follows

where is at once that C is procient In particular sup fjj jj j A Cg

A

the formula dened ab ove with resp ect to k and

Having related the notions of k compactness and prociency in Theorem

wenow establish the relationship b etween k compactness of a class C and the

k

expressivepower of L over this class in the following theorem

Theorem Let C be a class of nite structures

If C is k compact then only nitely many distinct queries are denable in

k k

L over C Moreover each such query is already denable in L

k

If C is not k compact then distinct queries are denable in L over C

Hence some such query is not rstorder denable

Pro of

Supp ose C is k compact Weknow from Theorem that there is a list

k k

of L formulas which isolates each of the L typ es of k tuples

n

k

realized over structures in C Clearlyevery L query is equivalentover C

n

to a disjunction of the s But there are such disjunctions and eachof

i

k

them is a formula of L



Recall that we are dealing with purely relational languages This is not true in

languages that include symb ols

Supp ose C is not k compact Again we know from Theorem that there is

k

alist i offormulas of L which isolate the countably many distinct

i

k

typ es realized over structures in C Again each L query is equivalentover

C to a countable disjunction of the s But there are such disjunctions

i

which dene distinct queries and only countably many rstorder formulas

Wenowhave the p ositive solution to McColms second conjecture as a corol

lary of Theorems and

Corollary McC KVa AclassC of nite structures is procient

if and only if thereisaqueryexpressible over C in L that is not expressible

in FO on C

Indeed wehave also shown a somewhat stronger result It is a direct con

k

sequence of Theorem that for every k L collapses to FO on a class of

k k

nite structures C if and only if L collapses to L on C Thisisaversion of

what Kolaitis and Vardi termed the ramied version of McColms conjecture

KVa

The pro of of Theorem relies on the fact that in any class that is not

k compact the induction dened by the formula is unboundedAswesee

below we can extract from this fact an LFP denable query that is closed under

k k

the relation but is not denable in L in any class that is not k compact

k

The query is constructed to include exactly one equivalence class in each

structure A The equivalence class selected will b e one of maximal Scott rank in

A This is formally stated in the lemma b elow

Lemma For any k there is a formula x x of LFP with the fol low

k

ing properties for every structure A

A j x x

k

for any two k tuples s and s of elements of A if A j s and A j s

then Typ e AsTyp e As

k k

k

is equivalent to a formula of L

k k

for every k tuple s of elements of A if A j s then sr ssr A

A

Pro of

Let R z z b e the formula given by Theorem Consider the stage

k

comparison relation of this formula which is denable in LFP by Theorem

Dene x x asfollows

k

y y z z lfpR z z z z

k k k k

hz z i hx x y y i

k k k

Then by Lemma for any structure A and any k tuple s of elemen ts of A

k k

A j s if and only if sr ssr A That is picks out all the tuples in A

A

of maximal Scott rank Since there must clearly b e some such tuples satises

the rst and the fourth conditions Furthermore since tuples that realize the

same typ e have the same Scott rank the query dened by is closed under the

k k

equivalence relation and therefore it is denable in L and it satises the

third condition In general however it do es not satisfy the second condition

since there may b e more than one equivalence class of maximal Scott rank in

any given structure To select from among these we use the ordering on equiv

alence classes given by Theorem Now dene the formula x x

k k

as follows

x x y y y y hy y i hx x i

k k k k k k

Since selects exactly one equivalence class it satises condition and and

the equivalence class is selected from among those selected by so it satises

condition Since the entire equivalence class is chosen this follows from the

denes a query closed under the equivalence denition of the preorder

k

k

relation and it therefore satises condition

k

It is clear that the formula is not equivalenttoanyformula of L in any class

C that is not k compact Indeed supp ose it were equivalenttosuchaformula

of quantier rank m Then since C is not k compact it contains a structure A

k k

with sr A m but all tuples s in A suchthatA j sare L equivalent

and by the denition of Scott ranks they cannot b e distinguished from all other

tuples in A by formulas of quantier rank m yielding a contradiction This

argument enables us to establish the following two theorems

Theorem For any class of structures C the fol lowing areequivalent

C is k compact

k k

L LFP L on C

Pro of

follows from Theorem Conversely if is false then the formula

k k

of Theorem witnesses that the separation of L LFP from L

The ab ove can b e seen as strengthening Theorem in the sense that it

k k

shows that if C is not k compact then not only can we separate L from L

but the separating query can b e chosen to b e LFP denable

Denition A class of structures C has the k preservation property if every

k k

query that is closed over C and rst order denable on C is denable in L

over C

This denition allows us to state a sucient condition on a class of structures

for the separation of LFP and FO

Theorem If thereisak such that C is not k compact and has the k

preservation property then LFP does not col lapse to FO on C

The Ordered Conjecture

Theorem raises the question of which classes of structures C havethek

preservation prop erty In this section weinvestigate this question for classes of

ordered structures Wealsoshow that this is linked to the question of whether

the class of all nite structures F has the k preservation prop erty

In the case of the class of all structures nite or innite this question is

resolved as a direct consequence of a result proved byImmerman and Kozen

IK using the compactness theorem This is stated in the theorem b elow

Theorem IK The class S of al l structures nite or innite has the

k preservation property for al l k

It has b een observed that most preservation theorems that hold on the class of

all structures fail when we restrict ourselves to nite structures see Gur

One would exp ect that this is the case for the ab oveaswell Here weshowthat

the question of whether such a preservation theorem holds on nite structures

is connected to Conjecture To see this we rst establish a technical lemma

For any signature let the width of denoted w b e the maximum arity

of any relation symbol in Fix a signature and let m maxw We

then have the following

Lemma For any structure A in O and any l tuple s ha a i of

l

m

elements in Awhere l m there is a formula of L such that for any

structure B of signature fg B j t ifandonlyifthere is an isomorphism

B with f st f A

Pro of



Werstshow that for every element a of A there is a formula xofL

a

a Toshow this we such that a is the unique elementofA satisfying A j

a

inductively dene the following class of formulas

x x x



x y y x x y xx y x

n n

It is clear that A j a if and only if there are at most n elements less than or

n

A

equal to a in the linear order Thus the formula identies

n n n

the nth element of the order uniquely

Using these formulas it is clear that any mtuple can b e uniquely identied

m m

by a formula of L and we can therefore construct a sentence of L that

A

determines the structure A up to isomorphism among structures in O If is the

V



sentence of L that asserts that is a linear order then x

a i

A

i

il

is the required formula

It follows from Lemma that if C is a class of ordered structures over some

signature where w m then every query of arity at most monC is

m

denable in L assuming m is at least Furthermore if is any rstorder

formula with at most k free variables for any k minsuch a signature and

is as ab ove then it follows easily from Lemma that is equivalentover

k

the class F to a formula of L Let denote the signature fgWecan

nowprove the following theorem

Theorem If thereisa k m such that F has the k preservation property

then every class CO has the k preservation property

Pro of

Let be any rstorder formula with free variables among x x Since

k

to a formula of m k by the observations ab ove is equivalentover F

k

there is a formula of L But then bythe k preservation prop ertyofF

k

Since is true in all structures in C it tto over F L that is equivalen

follows that on C denes the same query as

Theorem shows that a preservation theorem along the lines of Theorem

for nite structures would resolve Conjecture This however seems an unlikely

eventuality since it seems unlikely that every class of ordered structures has the

k preservation prop erty for some k This is b ecause for any class CO and

any k mifC has the k preservation prop ertythenevery rst order denable

k

query of arity k or less is denable in L Thus in particular every rst order

sentence is equivalent to one with no more than k variables Nonetheless there

are interesting classes of structures for whichthisproperty holds The following

result is due to Poizat Poi for another exp osition of this result see IK

Theorem Poi If contains only unary relation symbols then every

rst order formula with at most threefree variables is equivalent on O to a



formula of L

As a corollarywe get the following theorem

ifC contains Theorem For any unary signature and any class CO

arbitrarily large structures then LFP does not col lapse to FO on C

Complexity Theoretic Implications

It turns out that a resolution of Conjecture whether p ositive or negative would

have imp ortant implications in complexity theory Moreover if the question is

resolved by the metho ds outlined in the previous section ie byshowing that the

class O has the k preservation prop erty for some k then this has some unlikely

implications that follow from the observation contained in the next prop osition

Prop osition If O has the k preservation property then every rst order

k

denable k ary query on F is computable in DTIMEn

Pro of

By the k preservation prop ertyevery rst order denable k ary query is den

k

able by a formula of L Insuch a formula every subformula contains at most

k free variables Since there is a constantnumber of such subformulas wecan

k

evaluate in a structure A of size nbyenumerating all n k tuples in Aand

checking whether they satisfy the subformulas It can b e veried that suchan

k

algorithm runs in time O n

Taking to b e the language of graphs ie the signature consisting of just

one binary relation it follows from the ab ove that if there is a k such that O

has the k preservation prop ertythenforevery c the problem of determining

k

whether a graph has a cclique is solvable in DTIMEn On the other hand

it is dicult to prove that there is no k suchthatevery rst order denable

k

Bo olean query on F is computable in DTIMEn b ecause such a result would

imply the separation of PTIME from PSPACE see ST

Moreover if we could show that Conjecture is false that would also es

tablish the separation of PTIME and PSPACE This follows from the result in

DH that on any innite class of ordered structures there is a PFP query

that is not rst order denable Thus wehave the following prop osition

Prop osition If there is an innite class of ordered structures on which

LFP FO then PTIME PSPACE

In order to state the complexity theoretic implications of a p ositive resolution

of Conjecture weintro duce some notation LogH denotes the logarithmic time

hierarchy ie the class of those problems that can b e solved in logarithmic time

by an alternating machine with a b ounded numb er of alternations Similarly

LinH denotes the linear time hierarchy ie those problems that can b e solved

by a linear time b ounded depth alternating machine

Consider a signature including ternary relation symb ols and Let

CO b e the class of structures such thatisinterpreted as the addition

relation consistent with the order and is interpreted as the corresp onding

multiplication relation It follows from a result of Barrington et al BIS that

FO LogH on this class of structures Now consider the class of structures

D of the form hm iiecontaining no relations other than the numerical

predicates This allows us to give a succinct representation of these structures

That is since the structure is completely determined by the value of mwecan

represent it as a binary string of length logm It then follows that on this class

a query is denable in rst order logic if and only if it is in LinH another wayto

characterize this class is as the class RUD of rudimentary sets of binary strings

whichwas shown in Wratobeequivalent to LinH Similarly a query is

O n

denable in LFP on this class if and only if it is computable in DTIME

note here that n logm is the length of the binary string We write ETIME

to denote the latter class Thus wehave the following prop osition

Prop osition If Conjecture holds then LinH ETIME

The complexity theoretic separation of Prop osition can b e seen as a linear

counterpart to the separation of PH from EXPTIME

Conclusions

To conclude we present several directions of investigation suggested by the re

sults wehave presented The rst is to show that the class of ordered graphs

do es not havethek preservation prop ertyforany k or equivalentlytoshow

k

that there is a class of ordered structures for whichFO do es not collapse to L

for any k Another direction is to investigate for what classes of ordered struc

tures the sucient condition provided by Theorem can b e used to establish

the separation of LFP and FO That is for what classes of ordered structures is

k

it the case that there is a k suchthatFO collapses to L Weshowed that this

is true for all classes of strings ie linear orders with additional unary predi

cates but are there other interesting classes of structures for which this holds

Since we do not exp ect all classes of ordered structures to have this prop ertyit

would also b e instructive to nd other weaker sucient conditions on a class

of ordered structures so that LFP FO

References

AV S Abiteb oul and V Vianu Datalog extensions for database queries and up

dates Journal of Computer and System Sciences

AV S Abiteb oul and V Vianu Computing with rstorder logic Journal of

Computer and System Sciences

BIS DM Barrington N Immerman and H Straubing On uniformity within

NC Journal of Computer and System Sciences

Daw A Dawar Feasible Computation through Model Theory PhD thesis Univer

ennsylvania sityofP

DH A Dawar and L Hella The expressivepower of nitely many generalized

quantiers Information and Computation

DLW A Dawar S Lindell and S Weinstein Innitary logic and inductiveden

abilityover nite structures Information and Computation

GIS Y Gurevich N Immerman and S Shelah McColms conjecture In Proc

th IEEE Symp on Logic in Computer Science

Gur Y Gurevich Toward logic tailored for computational complexity In

M Richter et al editors Computation and Proof Theory pages

Springer Lecture Notes in Mathematics

IK N Immerman and D Kozen Denabili ty with b ounded numb er of b ound

variables Information and Computation

Imm N Immerman Upp er and lower b ounds for rstorder expressibili ty Journal

of Computer and System Sciences

Imm N Immerman Relational queries computable in p olynomial time Informa

tion and Control

KVa Ph G Kolaitis and M Y Vardi Fixp oint logic vs innitary logic in nite

mo del theoryInProc th IEEE Symp on Logic in Computer Science pages

KVb Ph G Kolaitis and M Y Vardi Innitary logics and laws Information

and Computation

McC G L McColm When is arithmetic p ossible Annals of Pure and Applied

L ogic

Mos Y N Moschovakis Elementary Induction on Abstract Structures North Holland

Poi B Poizat Deux ou trois choses que je sais de L Journal of Symbolic Logic

n

ST A Stolb ouskin and M Taitslin Is rst order contained in an initial segment

of PTIME In Computer ScienceLogic volume of LNCS Springer

Verlag

Var M Y Vardi The complexity of relational query languages In Proceedings

of the th ACM Symposium on the Theory of Computing pages

Wra C Wrathall Rudimentary predicates and relative computation SIAM Jour

nal on Computing

a

This article was pro cessed using the L T X macro package with LLNCS style E