Notes
Outline
Finite Model Theory
Lecture 4
Ordered Structures, Gaifman’s Theorem
Outline
Order-invariant queries
Gurevitch’s theroem
Gaifman’s theorem (time permitting)
Invariant Queries
Idea:
Use some innocuous additional information to express a query
“Forget” the extra information
Need to check that the query is invariant w.r.t. to the extra info
Example
Recall: EVEN(A) is not expressible in FO
Let s<,+ = {<,+}
Consider A 2 STRUCT[s<,+] s.t.
< is interpreted as a linear order a1 < … < an
(ai, aj, ak) 2 +     iff      i+j=k
Then, we can write a sentence f that checks EVEN(A)   [  HOW ?? ]
Example (cont’d)
f = 9 x. 9 y.(x+x=y Æ : 9 z(y < z))
For any vocabulary s and A 2 STRUCT[s], if A’ is any structure over the same universe and vocabulary s<,+ then

(A, A’) ² f  iff EVEN(A)
C-Invariance
Let s, s’ be two disjoint vocabularies, and C a class of s’-structures (C µ STRUCT[s’])
Definition A sentence f over s [ s’ is called C-invariant if for any A 2 STRUCT[s] and A’, A’’ 2 C, s.t. A=A’=A” (i.e. same universes)

                (A,A’) ² f  iff   (A,A’’) ² f
Notation  f 2 (FO+C)inv
C-Invariance (cont’d)
We have seen that EVEN 2 (FO + (<,+))inv
Main question for today:

  Is (FO + <)inv more powerful than FO ?
Order-Invariant FO
Theorem (Gurevich) There are properties in (FO + <)inv that are not in FO.


           FO   &   (FO + <)inv
The Proof
Idea: recall that we can express EVEN in MSO(<).

Let S(x,y) =  :(9 z.x<z Æ z<y) Æ x < y
We can’t say 9 P in FO.  Instead, we will use a vocabulary s that allows to assert the existence of all 2n sets P.
The Proof
3 Steps
Design s, fB s.t. A ² fB iff A is an atomic boolean algebra, A = (2X, µ)
Let EVENB = (EVEN(|X|) Æ fB
Show that EVENB 2 (FO + <)inv
Prove (using EF-games) that EVENB Ï FO
Boolean Algebras
Background: two alternative definitions
Definition 1.  A boolean algebra is A = (A, µ) s.t.:
 µ is a partial order
 8 x, y 2 A 9 inf(x,y);  will denote it x Å y
 8 x,y 2 A 9 sup(x,y);  will denote it  x [ y
There are minimal, maximal elements: ?, > 2 A
 8 x, there exists x 2 A s.t. x Å x = ?, x [ x = >.
Boolean Algebras (con’t)
Definition 2.  A BA is an algebra
 (A,[, Å, ?, >,  ) s.t.
 [, Å = commutative, associative, idempotent, distributive
x Å ? = ?,   x [ ? = x,
x Å > =  x,   x [ > = >
x Å  x = ?,   x [ x = >
Boolean Algebra’s (cont’d)
Proposition. The two definitions are equivalent
Proof:
From µ to Å, [:
   define x Å y = inf(x,y), x [ y = sup(x,y)
From Å, [ to µ:
   define x µ y to mean x Å y = x
Boolean Algebras (cont’d)
Define:

atom(x) = (x ¹ ?) Æ 8 y. (y µ x ) y=? Ç y = x)
Proposition. Let A be finite. Let X = {x | x 2 A, atom(x)}.  Then (A,µ) is isomorphic to (2X, µ)
[why ?]
Step 1
Define fB to consists of the axioms of a boolean algebra (using Definition 1)
Step 2
Show that EVENB 2 (FO + <)inv
Step 3
Now we prove that EVENB Ï FO
Proposition.  Let |X|, |Y| ¸ 2k.  Then:

(2X, µ)
ºk (2Y, µ)
We prove it using two lemmas.
Step 3
Lemma. Assume (2X, µ) ºk (2Y, µ).  Then the duplicator has a winning strategy where he responds to ; with ;, to Y with X, to X with Y.
[Why ?]
Lemma.  Assume X1 Å X2 = ;, Y1 Å Y2 = ; and that (2X1, µ) ºk (2Y1, µ), (2X2, µ) ºk (2Y2, µ).  Then:
      (2X1 [ X2, X1, X2, µ)
ºk (2Y1 [ Y2, Y1, Y2, µ)
[Why ?]
[How do prove the proposition ?]
Summary
Having < seems to add lots of extra power
Will see this later, for fixpoint logics
In FO(<) it is even more surprising
The extra structure (boolean algebra) seems quite artificial.  Can we get rid of it ?
Open problem: does < add extra power over strings ?
Gaifman’s Theorem
Let A 2 STRUCT[s]
Recall the r-ball (also called r-sphere):
Br(x) = {y | d(x,y) · r}
Br(x) can be expressed in FO (obviously)
Gaifman’s Theorem
Definition A formula f(x) is r-local if all its quantifiers are bounded to Br(x):
 9 z.y   è 9 z. (z 2 Br(x)) Æ y
 8 z.y è 8 z.(z 2 Br(x)) ) y)
We write f(r) to emphasize that f is r-local.
Gaifman’s Theorem
Theorem [Gaifman] Let s be relational.  Then every FO sentence over s is equivalent to a Boolean combination of sentences of the form: