You are on page 1of 40

1 Elementary Set Theory

Notation:
enclose a set.
1, 2, 3 = 3, 2, 2, 1, 3 because a set is not dened by order or multiplicity.
0, 2, 4, . . . = x[x is an even natural number because two ways of writing
a set are equivalent.
is the empty set.
x A denotes x is an element of A.
N = 0, 1, 2, . . . are the natural numbers.
Z = . . . , 2, 1, 0, 1, 2, . . . are the integers.
Q =
m
n
[m, n Z and n ,= 0 are the rational numbers.
R are the real numbers.
Axiom 1.1. Axiom of Extensionality Let A, B be sets. If (x)x A i x B
then A = B.
Denition 1.1 (Subset). Let A, B be sets. Then A is a subset of B, written
A B i (x) if x A then x B.
Theorem 1.1. If A B and B A then A = B.
Proof. Let x be arbitrary.
Because A B if x A then x B
Because B A if x B then x A
Hence, x A i x B, thus A = B.
Denition 1.2 (Union). Let A, B be sets. The Union A B of A and B is
dened by x A B if x A or x B.
Theorem 1.2. A (B C) = (A B) C
Proof. Let x be arbitrary.
x A (B C) i x A or x B C
i x A or (x B or x C)
i x A or x B or x C
i (x A or x B) or x C
i x A B or x C
i x (A B) C
Denition 1.3 (Intersection). Let A, B be sets. The intersection A B of A
and B is dened by a A B i x A and x B
Theorem 1.3. A (B C) = (A B) (A C)
Proof. Let x be arbitrary. Then x A (B C) i x A and x B C
i x A and (x B or x C)
i (x A and x B) or (x A and x C)
i x A B or x A C
i x (A B) (A C)
1
Denition 1.4 (Set Theoretic Dierence). Let A, B be sets. The set theoretic
dierence A B is dened by x A B i x A and x , B.
Theorem 1.4. A (B C) = (A B) (A C)
Proof. Let x be arbitrary.
Then x A (B C) i x A and x , B C
i x A and not (x B or x C)
i x A and (x , B and x ,inC)
i x A and x , B and x ,inC
i x A and x , B and x A and x ,inC
i x (A B) and x (A C)
i x (A B) (A C)
Provisional denition of function: Let A, B be sets. Then f is a function
from A to B written f : A B if f assigns a unique element b B to each
a A.
But what is the meaning of assign?
Basic idea is to consider f : R R dened by f(x) = x
2
. We shall identify
f with its graph. To generalize this to arbitrary sets A and B we rst need the
concept of an ordered pair. IE, a mathematical object a, b) satisfying
a, b) = c, d) i a = c and b = d. In particular, 1, 2) , = 1, 2.
Denition 1.5 (Cartesian Product). If A, B are sets, then their Cartesian
Product AB = a, b) [a A, b B
Denition 1.6 (Function). f is a function from A to B i f AB and for
each a A, there exists a unique b B such that a, b) f.
In this case, the unique value b is called the value of f at a, and we write
f(a) = b.
It only remains to dene a, b) in terms of set theory.
Denition 1.7 (Ordered Pair). a, b) = a, a, b
Theorem 1.5. a, b) = c, d) i a = c and b = d.
Proof. Clearly if a = c and b = d then a, b) = a, a, b = c, c, d =
c, d)
1. Suppose a = b. Then a, a, b = a, a, a = a, a = a
Since a = c, c, d we must have a = c and a = c, d. So
a = c = d, in particular, a = c and b = d.
2. Suppose c = d. Then similarly a = b = c so a = c and b = d.
3. Suppose a ,= b and c ,= d.
Since a, a, b = c, c, d we must have a = c or a = c, d.
The latter is clearly impossible, so a = c.
Similarly, a, b = c, d or a, b = c. The latter is clearly impossible,
and as a = c, then b = d.
2
NB (Note Bene) - It is almost never necessary in a mathematical proof to
remember that a function is literally a set of ordered pairs.
Denition 1.8 (Injection). The function f : A B is an injection i (a, a


A) if a ,= a

then f(a) ,= f(a

)
Denition 1.9 (Surjection). The function f : A B is a surjection i (b
B)(a A) such that f(a) = b
Denition 1.10 (Composition). If f : A B and g : B C are functions,
then their composition g f : A C is dined by (g f)(x) = g(f(x))
Theorem 1.6. If f : A B and g : B C are surjections, then g f : A C
is also a surjection.
Proof. Let c C be arbitrary.
Since g is surjective, b B such that g(b) = c.
Since f is surjective, a A such that g(a) = b.
Then, (g f)(a) = g(f(a)) = c, hence g f is a surjection.
Denition 1.11 (Bijection). A function f : A B is a bijection if f is an
injection and a surjection.
Theorem 1.7. If f : A B and g : B C are bijections, then g f : A C
is a bijection.
Proof. Composition of surjections is a surjection, and compositions of injections
are injections.
Denition 1.12 (Inverse Function). If f : A B is a bijection, then its
inverse, f
1
: B A is dened by f
1
(b) = the unique a A such that
f(a) = b.
Remarks - If f : A B is a bijection, it is easily checked that f
1
: B A
is a bijection.
In terms of ordered pairs, f
1
= b, a) : a, b) f
Denition 1.13 (Equinumerous). Two sets, A and B, are equinumerous, writ-
ten A B i there exists a bijection f : A B.
Theorem 1.8 (Galileo). Let E = 0, 2, 4, . . . be the even natural numbers.
Then, N E
Proof. We can dene a bijection f : N E by f(n) = 2n
Remark 1.1. If is often extremely dicult to explicitly dene a bijection f :
N A. However, suppose that f : N A is a bijection. For each n N let a
n
be f(n). Then, a
0
, a
1
, . . . is a list of the elements of A such that every element
occurs exactly once, and conversely, if such a list exists, then we can dene a
bijection f : N A by f(n) = a
n
3
Theorem 1.9. N Z
Proof. We can list the elements of Z: 0, 1, 1, 2, 2, . . .
Theorem 1.10. N Q
Proof. We proceed in two steps.
First, we prove that N Q
+
= q Q : q > 0 and consider the following
innite matrix
1
1

2
1
3
1

2
1

2
2

3
2

1
3

2
3

3
3
Proceed through the matrix along the indicated route adding rational num-
bers to your list if they have not already occurred.
Second, we declare that N Q. In the rst part, we showed that there exists
a bijection f : N Q
+
hence we can list Q by 0, f(1), f(1), . . ..
Denition 1.14 (Power Set). If A is any set, then its power set is P(A) =
B : B A, so P(1, 2, . . . , n)is of size 2
n
.
Theorem 1.11 (Cantor). N , P(N)
Proof. This method of proof is called the diagonal argument.
We must show that there does not exist a bijection f : N P(N).
Let f : N P(N) be any function.
So, we shall prove that f is not a surjection. Hence, we must nd a set
S N such that n N f(n) ,= S.
We do this via a time and motion study
For each n N we must make the n
th
decision. That is, if n S.
We perform the n
th
task, that is, ensure f(n) ,= S.
We make the n
th
decision so that it accomplishes the n
th
task, ie, n S i
n , f(n).
Clearly, f(n) and S will dier on whether they contain n, thus, n
N f(n) ,= S, and so f is not a surjection.
In general, unattributed Theorems are due to Cantor.
Theorem 1.12. If A is any set, then A , P(A)
Proof. Suppose that f : A P(A) is any function. Consider the set S = a
A : a , f(a).
Then, a S i a , f(a), so f(a) = S. Hence, f is not a surjection.
Denition 1.15 (_). Let A and B be sets.
A _ B i there exists an injection f : A B.
A B i A _ B and A , B
Theorem 1.13. For any set A, A P(A)
Proof. We can dene an injection f : A P(A) by f(a) = a.
Thus, A _ P(A)
By Cantors Theorem, A , P(A), thus A P(A).
4
Corollary 1.14. N P(N) P(P(N)) . . .
Denition 1.16 (Countable). A set A is countable i either A is nite or
A N. Otherwise, A is uncountable.
Theorem 1.15. Let A, B, C be sets.
1. A A
2. A B B A
3. A B and B C A C
Proof. 1. Let id
A
: A A be the function dened by id
A
(a) = a. Clearly,
id
A
is a bijection, so A A
2. Suppose A B. Then there exists a bijection f : A B. Since f
1
: B A
is also a bijection, B A
3. Suppose that A B and B C. Then, there exist bijections f : A B
and g : B C. As f, g are bijections, g f : A C is also a bijection, so
A C
Theorem 1.16 (Cantor-Bernstein). If A _ B and B _ A then A B.
The proof will be delayed.
Theorem 1.17 (Zarmelo). If A, B are any sets, then either A _ B or B _ A.
This proof will be omitted, though the theorem is equivalent to the axiom
of choice.
Axiom 1.2 (Axiom of Choice). Suppose F is a set of nonempty sets. Then
there exists a function f such that f(A) A for each A F. We say that f is
a choice function for F
Theorem 1.18. N Q
Proof. We can dene an injection f : N Q by f(n) = n. Hence, N _ Q
We next dene g : Q N as follows:
If 0 ,= q Q, we can uniquely express q =
a
b
where = 1 and (a, b) = 1,
and a, b > 0.
So, g(q) = 2
+1
3
a
5
b
. We also dene g(0) = 0.
Clearly, g is an injection, so Q _ N
Thus, by the Cantor-Bernstein Theorem, N Q
Lemma 1.19. (0, 1) R
Proof. From elementary claculus, we can dene a bijection f : (0, 1) R by
f(x) = tan(x

2
)
5
Theorem 1.20. R P(N)
Proof. By the lemma, it is eanough to show that (0, 1) P(N).
We make use of the fact that each r (0, 1) has a unique decimal expansion
r = 0.r
1
r
2
. . . such that 0 r
n
< 9 and the expansion doesnt end in an innite
string of nines. (this is to avoid two expansions such as 0.500 . . . = 0.4999 . . .)
First we dene a function f : (0, 1) P(N) as follows. Suppose that
r = 0.r
0
r
1
r
2
. . .. Let p
0
, p
1
, . . . be the primes in increasing order. Then f(r) =
p
r
0
+1
0
, p
r
1
+1
1
, . . .. Clearly, f is an injection, hence (0, 1) _ P(N)
Next, we dene a function g : P(N) (0, 1) as followes: If S N then
g(S) = 0.S
0
S
1
S
2
. . . where S
n
= 7 if n S and S
n
= 5 if n , S (note, 7 and 5
are arbitrarily chosen), hence P(N) _ (0, 1)
By the Cantor-Bernstein Theorem, (0, 1) P(N), hence R P(N)
Theorem 1.21. If S N then either S is nite or S N. That is, N has the
least innite size.
Proof. Suppose S N is innite. Let S
0
, S
1
, S
2
, . . . be the increasing enumera-
tion of S. This list witnesses that N S
Hypothesis 1.1 (Continuum Hypothesis). If X R, then either X is count-
able or X R
Theorem 1.22 (Godel and Cohen). If the axioms of set theory are consistent,
then it is impossible to prove or disprove the Continuum Hypothesis from these
axioms.
Denition 1.17 (Set of Finite Subsets). Fin(N) is the set of nite subsets of
N.
Clearly, N _ Fin(N) _ P(N)
Theorem 1.23. N Fin(N)
Proof. We can dene an injection f : N Fin(N) by f(n) = n.
Next, we can dene g : Fin(N) N as follows.
Suppose that S = s
0
, s
1
, . . . , s
n
,= , where s
0
< s
1
< . . . < s
n
. Then
g(S) = p
s
0
+1
0
. . . p
s
n
+1
n
, with p
0
, . . . , p
n
being the primes in increasing order,
and also g() = 0. Clearly, g is an injection, so Fin(N) _ N
By Cantor-Bernstein, Fin(N) N
Denition 1.18 (The set of functions between sets). If A, B are sets, then
A
B
= f[f : A B
Theorem 1.24.
N
N
P(N)
Proof. We rst dene a function g : P(N)
N
N
as follows:
For each subset of N, the characteristic function is (x) : N 0, 1 dened
by
S
(n) = 1 if n S and
S
(n) = 0 if n / S. The set g(S) =
S

N
N
.
Clearly, g is an injection, and so P(N) _
N
N
6
Next we dene :
N
N
P(N) by (f) = p
f(0)+1
0
, . . . , p
f(n)+1
n
, . . ., where
p
0
, p
1
, . . . are the primes in increasing order.
Clearly, is an injection.
Hence,
N
N
_ P(N).
So, by Cantor-Bernstein,
N
N
P(N)
And now, a heuristic principle. If S is an innite set, then, in general, if
each s S is determined by nitely many pieces of data, then S is countable,
and if each s S is determined by innitely many independent pieces of data,
then S is countable.
Denition 1.19 (EC(N)). EC(N) is the set of eventually constant functions
f : N N, ie, functions f such that there exist a, b N such that f(n) =
b n a
Theorem 1.25. N EC(N)
Proof. First, we dene a mat f : N EC(N) by f(n) = c
n
, where c
n
(t) =
n t N.
Clearly, f is an injection, so N _ EC(N).
Next, we dene a map : EC(N) N by (g) = p
f(0)+1
0
. . . p
f(a)+1
a
, where
a is the least integer such that f(t) = f(a) t a. Clearly, is an injection,
so EC(N) _ N
Thus, by Cantor-Bernstein, N EC(N)
We are almost ready to prove the Cantor-Bernstein Theorem. First, we will
require a denition and a lemma.
Denition 1.20 (Image of Z). If f : X Y and Z X, then f[Z] = f(z) :
z Z is the image of Z.
Lemma 1.26. If f : A B is an injection and C A, then f[A C] =
f[A] f[C]
Proof. First suppose x f[AC]. Then, a AC such that f(a) = x. Hence,
x f[A].
Suppose x f[C]. Then, c C such that f(c) = x. As a ,= c, this
contradicts f being an injection, thus x f[A] f[C]
Conversely, suppose x f[A] f[C]. Then a A such that f(a) = x.
Since x / f[C], a / C, so a A C, therefore, x f[A C]
And now, the proof of the Cantor-Bernstein Theorem.
Proof. Since A _ B and B _ A, there exist injection f : A B and g : B A.
Let C = g[B] = g(b) : b B.
Claim 1 - B C.
The map b g(b) is a bijection from B to C, so the claim is proved.
Thus, it is enough to show A C, because then A C and C B, so
A B
7
Let h = g f : A A, then h is an injection.
Dene by induction on n 0 A
0
= A4, A
n+1
= h[A
n
] and C
0
= C, C
n+1
=
h[C
n
].
Dene a function k : A C by k(x) = h(x) if x A
n
C
n
for some n and
k(x) = x otherwise.
Claim 2 - k is an injection.
Suppose that x ,= x

are distinct elements of A.


There are three cases:
1. Suppose x A
n
C
n
, x

A
m
C
m
for some n, m. Since h is an injection,
k(x) = h(x) ,= h(x

) = k(x

)
2. Suppose x, x

/ A
n
C
n
n. Then k(x) = x ,= x

= k(x

)
3. Without loss of generality, suppose x A
n
C
n
for some n and x

/ A
n

C
n
n. Then, k(x) = h(x) h[A
n
C
n
] = h[A
n
] h[C
n
] = A
n+1
C
n+1
.
Hence, k(x) = h(x) ,= x

= k(x

)
Claim 3 - k is a surjection.
Let c C be arbitrary. There are two cases.
1. Suppose c / A
n
C
n
n, then k(c) = c
2. Suppose c A
n
C
n
for some n. Since c C = C
0
, m such that
n = m+1, since h[A
m
C
m
] = h[A
m
]h[C
m
] = A
n
C
n
. So, a A
m
C
m
such that k(a) = h(a) = c.
Therefore, k is a bijection, so A C
Theorem 1.27. R R R
Proof. Since R (0, 1), it is enough to prove that (0, 1) (0, 1) (0, 1)
We can dene an injection f : (0, 1) (0, 1) (0, 1) such that f(r) =

1
2
, r
_
.
Next we dene an injection g : (0, 1) (0, 1) (0, 1) as follows.
If r = 0.r
0
r
1
. . . r
n
. . . and s = 0.s
0
s
1
. . . s
n
. . ., then,
g(r, s)) = 0.r
0
s
0
r
1
s
1
. . . r
n
s
n
. . ..
By the Cantor-Bernstein Theorem, (0, 1) (0, 1) (0, 1)
Denition 1.21 (Sym(N)). Sym(N) = f
N
N
: f is a bijection
Theorem 1.28. Sym(N) P(N)
Proof. Since Sym(N)
N
N
P(N), we have Sym(N) _ P(N).
Next, we dene a function f : P(N) Sym(N) by S f
S
where f
S
(2n) =
2n +1 and f
S
(2n +1) = 2n if n S and f
S
(2n) = 2n and f
S
(2n +1) = 2n +1
otherwise.
This is an injection, and so P(N) _ Sym(N), so, by Cantor-Bernstein,
P(N) Sym(N)
8
Denition 1.22 (Finite Sequence). Let A be a set. Then a nite sequence of
elements of A is an inject a
0
, a
1
, . . . , a
n
), with a
i
A and n 0.
a
0
, a
1
, . . . a
n
) = b
0
, b
1
, . . . b
m
) if and only if n = m and i a
i
= b
i
Denition 1.23 (Finite Sequence). a
0
, . . . a
n
) = f : 0, . . . , n A : f(i) =
a
i
Denition 1.24 (Finseq(A)). Finseq(A) is the set of nite sequences of el-
emetns of A.
Theorem 1.29. If A is a nonempty countable set, then N Finseq(A)
Proof. Fix some a A. Then, we can dene an injection f : N Finseq(A) :
n
n
..
a, . . . , a)
So, N Finseq(A)
Next, we dene an injection g : Finseq(A) N as follows:
Since A is countable, there exists an injection e : A N. We dene
a
0
, . . . , a
n
) 2
e(a
0
)+1
. . . p
e(a
n
)+1
n
, where p
i
is the i
th
prime.
Thus, Finseq(A) _ N, and so, by the Cantor-Bernstein Theorem, N
Finseq(A)
And now, we move on to Cardinal Arithmetic.
Denition 1.25 (Cardinality). To each set A we associate an object, its car-
dinality, denoted card(A) or [A[ such that [A[ = [B[ i A B
Examples
1. If A is a nite set, then [A[ is its usual size.
2. [N[ =
0
3. The innite cardinals begin
0
,
1
, . . . ,

,
+1
, . . .
Denition 1.26 (Cardinal Addition). Let , be cardinal numbers, then +
= card(A B) where card(A) = , card(B) = and A B =
Theorem 1.30. If A A

and B B

and A B = A

= , then
A B A

Proof. Since A A

and B B

, there exist bijections f : A A

and
g : B B

, then we can dene a bijection h : A B A

by h(x) = f(x)
if x A and h(x) = g(x) if x B.
Theorem 1.31.
0
+
0
=
0
Proof. Let E be the even natural numbers and O be the odd natural numbers.
So
0
+
0
= card(E O) = card N =
0
9
In fact, if , are cardinal numbers, at least one of which is innite, then
+ = max,
And it is clearly impossible to sensibly dene an operation of cardinal sub-
traction.
Denition 1.27 (Cardinal Multiplication). Let , be cardinals. Then =
card(AB) when [A[ = and [B[ = .
We have already checked that this is well dened.
Theorem 1.32.
0

0
=
0
Proof. Since N N N, we have
0

0
= card(N N) = card(N) =
0
In fact, if , are cardinals, at least one of which is innite, and neither is
zero, then = max,
Denition 1.28 (Cardinal Exponentiation). If , are cardinal numbers, then

= card(
A
B
) where [A[ = and [B[ = .
Theorem 1.33. [R[ = 2

0
Proof. We know R P(N)
N
{0,1}
, hence 2

0
= card(
N
{0,1}
= [R[
In fact, if is any cardinal number, then < 2

.
This just restates that A _ P(A)
2 Relations
Denition 2.1 (Binary Relation). A binary relation on a set A is a subset
R AA. We usually write aRb instead of a, b) R
Example 2.1. 1. The order relation on N is <= n, m) : n, m N, n < m
2. divisibility relation on N
+
is D = n, m) : n, m N
+
, m divides n
Observation: Thus P(N N) is the set of binary relations on N. Since
N N N, it follows that P(N N) P(N), in particular, P(N N) is
uncountable.
Let R be a binary relation on A.
Denition 2.2 (Reexive Property). R is reexive if (a A)aRa
Denition 2.3 (Symmetric Property). R is symmetric if (a, b A)aRb
bRa
Denition 2.4 (Transitive Property). R is transitive if (a, b, c A)aRb
bRc aRc
Denition 2.5 (Equivalence Relation). R is an equivalence relation i R is
reexive, symmetric and transitive.
10
Example: Consider the relation R dened on Z by aRb i 3[a b
Theorem 2.1. R is an equivalence relation on Z.
Proof. Let a Z, then 3[a a = 0. Hence, aRa, thus R is reexive.
Let a, b Z. Suppose aRb, so 3[a b, so 3[b a = (a b), so bRa, thus,
R is symmetric.
Let a, b, c Z. Suppose aRb and bRc, so 3[a b and 3[b c, so, 3[(a b) +
(b c) = a c, so aRc, and so R is transitive.
Denition 2.6 (Equivalence Class). Let R be an equivalence relation on A.
For each x A, the corresponding equivalence class is [x] = y A : xRy
Example continued:
The equivalence classes of R above are:
[0] = . . . , 6, 3, 0, 3, 6, . . .
[1] = . . . , 5, 2, 1, 4, 7, . . .
[2] = . . . , 4, 1, 2, 5, 8, . . .
Denition 2.7 (Partition). Let A be a nonempty set. Then, a partition of A
is a collection B
i
: i I such that
1. (i I)B
i
,=
2. (i, j I) if i ,= j then B
i
B
j
=
3. (a A)(i I) such that a B
i
. That is, A =
iI
B
i
Theorem 2.2. Let R be an equivalence relation on A.
Then, (a A)a [a] and If a, b A and [a] [b] ,= , then [a] = [b]. Hence,
the set of equivalence classes [a] : a A forms a partition of A.
Theorem 2.3. Let B
i
: i I be a partition of A. Dene the binary relation
E on A by aEb i (i I) such that a, b B
i
. Then, E is an equivalence
relation and the Eequivalence classes are precisely B
i
: i I
Example: How many equivalence classes are there on 1, 2, 3?
Answer: There are exactly ve equivalence relation, corresponding to
1, 2, 3, 1, 2, 3, 2, 1, 3, 3, 1, 2, 1, 2, 3
Denition 2.8 (Irreexive Property). R is irreexive i (a) a, a) / R
Denition 2.9 (Trichotomy Property). R satises the Trichotomy Property if
(a, b A) exactly one of the following holds, aRb, a = b, bRa.
Denition 2.10 (Linear Order). A, R) is a linear order if R is irreexive,
transitive, and satises the trichotomy property.
Denition 2.11 (Partial Order). Let R be a binary relation on A, then A, R)
is a partial order if R is irreexive and transitive.
11
Denition 2.12 (Isomorphism). Let A, <) and B, ) be partial orders. A
map f : A B is an isomorphism if the following conditions are satised:
1. f is a bijection
2. (a, b A)a < b i f(a) f(b)
In this case, we say that A, <) an B, ) are isomorphic, and write A, <)

=
B, )
Theorem 2.4. Z, <)

= Z, >)
Proof. Dene f : Z Z by f(z) = z, then a < b i a > b i f(a) > f(b).
Thus, f is an isomorphism
Notation - Let D be the strict divisibility relation on N
+
. that is, aDb
a < b&a[b
Theorem 2.5. N
+
, D) ,

= P(N), )
Proof. N
+
, P(N), so no bijection exists.
Theorem 2.6. R 0, <) ,

= R, <)
Proof. Suppose f : R 0 R is an isomorphism.
For each n 1 let r
n
= f(
1
n
)
Then, r
1
> r
2
> . . . r
k
> . . . f(1)
Let s be the greatest lower bound of r
n
: n 1.
t R 0 such that f(t) = s
Clearly, t < 0, thus
t
2
> t
f(
t
2
) > s, hence n 1 such that r
n
< f(
t
2
).
But then
t
2
<
1
n
and f(
1
n
) < f(
t
2
), so a contradiction.
Denition 2.13. For each prime p, let Z[1/p] =
a
p
n
: a Z, n 0
Denition 2.14 (Dense Linear Order without Endpoints). A linear order
D, <) is a dense linear order without endpoints, or DLO, if the following hold:
1. if a, b D and a < b then c D such that a < c < b
2. if a D then b D such that a < b
3. if a D then c D such that c < a
Theorem 2.7. For each prime p, Z[1/p], <) is a DLO.
Proof. Clearly Z[1/p], <) is a linear order without endpoints.
Let a, b Z[1/p] with a < b. Then, we can express a =
c
p
n
and b =
d
p
m
.
Adjusting c or d if necessary, we can suppose a =
c
p
n
and b =
d
p
n
.
So then a =
c
p
n
<
c+1
p
n

d
p
n
= b
So, let r =
c
p
n
+
1
p
n+1
=
cp+1
p
n+1
Z[1/p]
Then, a < r < b
12
Theorem 2.8. If A, <) and B, ) are countable DLOs, then A, <)

= B, )
Proof. This is called the Back and Forth Argument.
Let A = a
n
: n N and B = b
n
: n N
First dene A
0
= a
0
and B
0
= b
0
and f
0
= a
0
, b
0
)
Suppose inductively that we have constructed A
n
, B
n
, f
n
such that A
n
is a
nite subset of A such that a
0
, . . . , a
n
A
n
, B
n
is similarly related to B, and
f
n
: A
n
B
n
is an order preserving bijection.
We construct A
n+1
, B
n+1
, f
n+1
in two steps.
1. If a
n+1
A
n
, then A

n
= A
n
, B

n
= B
n
and f

n
= f
n
.
If a
n+1
/ A
n
, then say c
0
< c
1
< . . . , a
n+1
< . . . < c
m
where A
n
=
c
0
, . . . , c
m

d B such that f(c


0
) < . . . < d < . . . < f(c
m
), so we dene A

n
=
A
n
a
n+1
, B

n
= B
n
d and f

n
= f
n
a
n+1
, d)
2. If b
n+1
B

n
, then A
n+1
= A

n
, B
n+1
= B

n
and f
n+1
= f

n
Else, d
0
< . . . < b
n+1
< . . . < d

, where B

n
= d
0
, . . . , d

.
Then, e A such that (f

n
)
1
(d
0
) < . . . < e < . . . < (f

n
)
1
(d

)
And so, we dene A
n+1
= A

n
e, B
n+1
= B

n
b
n+1
and f
n+1
=
f

n
e, b
n+a
)
Finally, let f =
n
f
n
, then f is an order preserving bijection between A
and B.
Corollary 2.9. 1. Q, <)

= Q 0, <)
2. Z[1/2], <)

= Z[1/3], <)
3. If D, <) is a countable DLO, then D, <)

= Q, <)
Denition 2.15 (S extends R). Suppose R and S are binary relations on the
set A. We say S extends R if R S
Theorem 2.10. If A, ) is a partial order, then there exists a binary relation
< extending such that A, <) is a linear order.
3 Propositional Logic
Denition 3.1 (Formal Language). We dene our formal alphabet as the fol-
lowing symbols
1. The sentence connectives , , , ,
2. The punctuation symbols (, )
13
3. The sentence symbols A
0
, A
1
, . . . , A
n
, . . . for n 0
Denition 3.2 (Expression). An expression is a nite sequence of symbols from
the alphabet.
Denition 3.3 (Well Formed Formulas). The set of well-formed formulas, or
ws, is dened recursively as follows
1. Every sentence symbol A
n
is a w.
2. If , are ws, then ( ), ( ), (,), ( ), ( )
3. No expression is a w unless compelled to be so by nitely many applica-
tions of 1 and 2.
Remark 3.1. From now on, we will omit 3 in recursive denitions. Clearly,
the set of ws is countable, and since the denition of a w is recursive, many
of the basic properties of ws are proved by induction.
Example 3.1. (A
1
A
2
) is a w, but (A
1
A
2
)) is not.
Theorem 3.1. If is a w, then has the same number of left and right
parentheses.
Proof. We argue by induction on the length of the w .
If n = 1, then is a sentence symbol, say, A
s
. So the result holds.
Suppose n > 1 and the result holds for all ws of length less than n.
Then there exist ws , such that has one of the following forms:
( ), ( ), (), ( ), ( )
By induction, the result holds for and , hence, the result also holds for
.
Denition 3.4. L is the set of sentence symbols
L is the set of ws.
T, F is the set of truth values.
Denition 3.5 (Truth Assignment). A truth assignment is a function : L
T, F
Denition 3.6 (Extension of ). Let be a truth assignment. Then we dene
the extension : L T, F recursively as follows
1. If A
n
L, then (A
n
) = (A
n
)
2. ((A
n
)) = T of () = F
((A
n
)) = F of () = T
3. (( )) = T if () = T and () = T
(( )) = F else.
14
4. (( )) = F if () = () = F
(( )) = T else.
5. (( )) = F if () = T and () = F
(( )) = T else.
6. (( )) = T if () = v()
(( )) = F else.
Denition 3.7 (Proper Initial Segment). If a
0
, . . . , a
n
) is a nite sequence,
then a proper initial segment has the form a
0
, . . . , a
s
) where 0 s < n
Lemma 3.2. Any proper initial segment of a w has more left than right paren-
theses. Thus, no proper initial segment of a w is a w.
Proof. We argue by induction on the length n 1 of the w .
First, suppose n = 1, then is a sentence symbol, say, A
s
. As A
s
has no
proper initial segments, the result holds vacuously.
Suppose n > 1, and the result holds for all ws of length less than n.
Then, has the form (), (), (), ( ), ( ) for some shorter
ws and .
Since all the cases are similar, we just consider the case when is ( ).
The proper initial segments are (,(
0
where
0
is a not necessarily proper
initial segment of , (, (
0
where
0
is a not necessarily proper initial
segment of .
So, using the inductive hypothesis and the previous theorem, we see that
the result also holds for .
Theorem 3.3 (Unique Readability Theorem). If is a w of length greater
than one, then there exists exactly one way of expressing in the form (), (
), ( ), ( ), ( ) for shorter ws , .
Proof. Suppose is both ( ) and ( ).
Then, ( ) = ( ), and so deleting the rst parenthesis, ) = ).
Suppose ,= , then without loss of generality, is a proper initial segment
of .
By the lemma, is not a w. This is a contradiction, so = .
Hence, deleting , , we have ) = ). So =
The other cases are similar.
From now on, we will use common sense in writing proofs, and may omit
parentheses when there is no ambiguity. These are not ws, however, just
representations of them.
Denition 3.8 (Satisable). Let : L T, F be a truth assignment.
1. If is a w, then satises if () = T.
2. If is a set of ws, then satises if () = T for all
15
3. is satisable if there exists a truth assignment which satises .
Denition 3.9 (Tautological Implication). Let be a set of ws and be a
w. Then tautologically implies , written [= i every truth assignment
which satises also satises .
Denition 3.10 (Tautology). is a tautology i [= , ie, every truth as-
signment satises .
Denition 3.11 (Tautological Equivalence). The ws , are tautologically
equivalent i [= and [=
Denition 3.12 (Finitely Satisable). is nitely satisable if every nite
subset
0
is satisable.
Theorem 3.4 (The Compactness Theorem). If is nitely satisable, then
is satisable.
Before proving the Compactness Theorem, we will make a number of appli-
cations.
Theorem 3.5. Suppose is an innite set of ws and [= . Then, there
exists a nite subset
0
such that
0
[= .
Proof. Suppose not.
Then, for every nite subset
0
, we have
0
,[= , and so
0
()
is satisable.
Thus, () is nitely satisable.
By compactness, () is satisable, but this contradicts [= .
Denition 3.13 (Graph). Let E be a binary relation on a set V . Then, =
V, R) is a graph i E is symmetric and irreexive.
Denition 3.14 (k-colorable). Let k 1. Then, the graph = V, R) is
k-colorable if there exists a function
: V 1, 2, . . . , k
such that if aEb then (a) ,= (b)
Theorem 3.6 (Erdos). Let = V, R) be a countably innite graph, and k 1.
Then, is k-colorable i every nite subgraph
0
of is k-colorable.
Proof. Suppose that : V 1, 2, . . . , k is a one coloring of .
Let
0
= V
0
, E
0
) be a nite subgraph.
Then, let
0
= V
0
be the restriction of to V
0
.
Then,
0
is a k-coloring of
0
.
First, we must choose a suitable propositional language. We need a sentence
symbol for each decision we must make.
In this case, we take sentence symbols C
v,i
v V and 1 i k
Next, we write down the set of ws which imposes suitable constraints on
truth assignments. In this case, consists of the ws
16
1. ((C
v,i
C
v,j
)) for v V and 1 i ,= j k
2. (C
v,1
. . . C
v,k
) for v V
3. ((C
v,i
C
w,i
)) for all v, w V with vEw and 1 i k.
We check that is indeed a suitable collection of ws.
So, by 1 and 2, for each v V there exists a unique 1 i k such that
v(C
v,i
) = T, hence, is a function.
Suppose vEw. By 3, they cannot be assigned the same color. That is, we
cannot have v(C
v,i
) = T = v(C
w,i
) for any 1 i k.
So now we check that is satisable.
Let
0
be any nite subset.
Let
0
= V
0
, E
0
) be the nite subgraph consisting of the vertices which
were mentioned in
0
.
By assumption,
0
is k-colorable.
Let : V
0
1, . . . , k be a k-coloring of
0
.
Then, let
0
be a truth assignment such that for all v V
0
, and 1 i k,

0
(C
v,i
) = T i
0
(v) = i.
Then clearly,
0
satises
0
.
Thus, is nitely satisable.
By compactness, is satisable. Thus, is k-colorable.
Theorem 3.7. Let A, ) be a countably innite partial ordering. Then, there
exists a linear ordering A, <) such that < extends .
Proof. We work with the propositional language consisting of the sentence sym-
bols L
a,b
where a ,= b A.
Let be the set of ws of the form
1. (L
a,b
L
b,c
) L
a,c
for a, b, c A distinct.
2. (L
a,b
L
b,a
) for a ,= b A.
3. (L
a,b
L
b,a
) for a ,= b A.
4. L
a,b
for a b
Clearly, <is irreexive, and 2 and 3 show that <has the trichotomy property.
By 1, < is transitive, and by 4, <.
Thus, it is enough to show that is satisable.
By the compactness theorem, it is enough to show that is nitely satis-
able.
Let
0
be any nite subset.
Let A
0
be the nite subset of A which is actually mentioned in
0
.
Let
0
be the restriction of to A
0
.
By the homework, there exists a linear ordering <
0
of A
0
which extends
0
.
Let
0
be a truth assignment such that for all a ,= b A
0
,
0
(L
a,b
) = T i
a <
0
b.
So
0
satises
0
. hence, is nitely satisable.
17
Theorem 3.8 (clearly false). If A, <) is a countable innite linear order then
A has a least element.
What goes wrong with an attempted proof by compactness? It turns out to
be impossible to translate this into a set of ws.
Denition 3.15 (Distinct Representatives). Suppose that S is a set.
Suppose S
i
: i I) is an indexed collection of not necessarily distinct subsets
of S.
A system of distinct representatives is a choice of elements x
i
S
i
such that
if i ,= j then x
i
,= x
j
.
Theorem 3.9 (Halls Matching Theorem 1935). Let S be any set and n N
+
.
Let s
1
, . . . , s
n
) be an indexed collection of subsets of S.
Then, the necessary and sucient condition for the existence of a system of
distinct representatives is
For any 1 k n and choice of k distinct indices i
1
, . . . , i
k
, then we have
[S
i
1
. . . S
i
k
[ k
Theorem 3.10 (clearly false attempt at an innite Halls theorem). As above,
but cross out all reference to n.
Counterexample is S = N.
Theorem 3.11 (Innite Version of Halls Matching Theorem). Let S be any
set.
Let S
:
i N
+
) be an indexed collection of nite subsets of S.
Then, a necessary and sucient condition for the existence of a system of
distinct representatives is for every 1 k and choice of k distinct indices,
i
1
, . . . i
k
we have [S
i
1
. . . S
i
k
[ k
Proof. Clearly, if a system exists, then the condition holds.
Conversely, suppose the condition holds.
We work with the propositional language with sentence symbols C
n,x
for
x S
n
and n 1.
Let be the set of ws of the following form
1. (C
n,x
C
m,x
), x S
n
S
m
2. (C
n,x
C
n,y
), x ,= y S
n
3. For each n 1, letting S
n
= x
1
, . . . x
t
n
we add C
n,x
. . . C
n,x
t
n
By 2 and 3 we choose exactly one element from each set, and by 1 they are
distinct.
It only remains to check that is satisable.
By compactness, it is enough to check that is nitely satisable.
Let
0
be any nite subset of .
Let n
1
, . . . n
N
be the nitely many indices mentioned in
0
.
18
Then, S
n
1
, . . . S
n
N
clearly satises Halls Condition.
By Halls Theorem, for nite collection, there exists a system of distinct
representatives x
n
i
S
n
i
, 1 i N.
Let
0
be a truth assignment such that if 1 i N and x S
n
i
then

0
(C
n
i
,x
) = T i x = x
n
i
. Then
0
satises
0
.
We are now almost ready to prove the compactness theorem. The basic idea
is that it would be much easier if for every sentence symbol A
n
, either A
n

or (A
n
) .
Then, the only possible truth assignment satisfying is (A
n
) = T i A
n

.
Presumably, this works.
So our strategy will be to extend until we reach this special case.
For technical reasons, we extend so that for every , either or
() .
Lemma 3.12. Let be a nite satisable set of ws. For each w , either
is nitely satisable or () is nitely satisable.
Proof. Suppose isnt nitely satisable.
Then, there exists a nite subset
0
such that
0
is not satisable.
Thus,
0
[= ()
We claim that () is nitely satisable.
Let be any nite subset.
If , then is satisable, so we can suppose =
0
for some
nite set
0
.
Let be a truth assignment which satises the nite subset
0

0
of .
since
0
[= , we must have () = T.
Hence, satises
0
and .
So, is nitely satisable.
Now, we shall prove the compactness theorem.
Proof. Let
1
, . . . ,
n
, . . . be an enumeration of all ws.
We shall inductively dene and increasing sequence of sets of ws
0

1
. . . such that
1.
0
=
2.
n
is nitely satisable
3. Either
n

n
or
n

n
Assume inductively that we have dened
n
.
Then, dene
n+1
=
n

n+1
if
n

n+1
is nitely satisable and

n+1
=
n

n+1
otherwise.
By lemma,
n+1
is nitely satisable.
So, the inductive construction can be accomplished.
Finally, let =
n

n
19
Suppose is a nite subset. Then, n such that
n
. Since
n
is
satisable, we know that is satisable, so is nitely satisable.
Let =
n
, then either
n

n
or
n

n
. Since
n
, for each w
either or
Finally, dene a truth assignment by (A

) if true i A

.
Then, we want to show that for any w , = T i .
We argue by induction on the length m 1 of the w .
First, suppose m = 1, then, is a sentence symbol A
t
and the result follows.
Now, suppose m > 1, and result holds for all shorter ws.
Then, has one of the following forms (), (), (), ( ), ( )
Case I - Suppose is . Then, () = T i () = F, which is i / ,
which is i
Case II - Suppose is .
First suppose ( ) = T,
Then, () = T or () = T, and so or .
Since is nitely satisable, , ( ) , and , ( ) , so
( ) / , thus, Suppose .
Since , , , , it follows that / or / .
Hence, or . By induction hypothesis, () = T or () = T.
Hence, ( ) = T
The other cases are similar.
Denition 3.16 (Tree). A partial order T, <) is a tree i the following con-
ditions are satised
1. There exists a least element t
0
T called the root.
2. For each t T the set of its predecessors, Pr
T
(t) = s T : s < t is a
nite set which is linearly ordered by <.
Denition 3.17 (Complete Binary Tree). The complete binary tree T
2
is T
2
=
f[f : 0, . . . , n 1 0, 1 for some n 0 ordered by f < g i f g
Denition 3.18. Let T, <) be a tree
1. If t T, then the height of t is dened to be ht
T
(t) = [Pr
T
(t)[
2. For each n 0, the n
th
level of T is Lev
n
(T) = t T : ht
T
(t) = n
3. For each t T, the set of immediate successors is succ
T
(t) = s T : t <
s, ht
T
(s) = ht
T
(t) + 1
4. T is nitely branching if each t T has a nitely, possibly empty, set of
immediate successors.
5. A branch B of T is a maximal linearly ordered subset of T.
20
Theorem 3.13. Consider the complete binary tree T
2
.
if f : N 0, 1 is any function, then we obtain a corresponding branch
B
f
= f 0, . . . , n 1 : n 0
Every branch has this form.
Does every innite tree have an innite branch?
Clearly not, as there is the tree with a root, and then a countable set of
successors to that root, and nothing else.
Lemma 3.14 (Konigs Lemma). If T is an innite, nitely branching tree, then
T has an innite branch.
Remark - if B is such a branch, then necessarily, [B Lev
n
(T)[ = 1 for all
n N.
First, we will prove that Compactness implies Konig.
Proof. Let T be an innite nitely branching tree. Then Lev
n
(T) is nite for
all n N, so T is countable.
We use the propositional language with sentence symbols B
t
for t T.
Let be the following set of ws for each n 0, if Lev
n
(T) = t
1
, . . . , t

then we include:
1. B
t
1
. . . B
t

2. (B
t
i
B
t
j
) for 1 i < j
3. B
s
B
t
for all s, t T such that t < s
So, by compactness, it is enough to show that is nitely satisable.
Let
0
be an arbitrary nite subset. There exists n N such that if
t T is mentioned in
0
then ht
T
(t) < n then v
0
(B
t
) = T i t < t
0
.
Clearly, v
0
satises
0
, thus is nitely satisable.
Now, we shall prove Konigs Lemma without using compactness.
Proof. We dene an induction on n 0, a sequence of elements t
n
Lev
n
(T)
such that
1. t
0
is the root
2. if m < n then t
m
< t
n
3. s T : t
n
< s is innite.
Clearly, t
0
satises 2 and 3.
Suppose, inductively, that we have dened t
n
. Let a
1
, . . . , a
r
be the set of
immediate successors to t
n
.
If t
n
< s, and ht
T
(s) > n + 1 then there exists 1 i r such that a
i
< s.
By the Pigeon Hole Principle, there exists 1 i r such that s T : a
i
<
s is innite.
21
So, we can choose t
n+1
= a
i
.
Then, t
n+1
satises 2 and 3 above. And so, by induction, we have B = t
n
:
n 0, an innite branch.
So now, an application of Konigs Lemma
Theorem 3.15 (Erdos). Let = V, E) be a countably innite graph. Then,
is k-colorable i every nite subgraph of is k-colorable.
Proof. It is obvious that if it is k-colorable then every nite subgraph is.
Suppose that every nite subgraph is k-colorable.
Let V = v
0
, v
1
, . . .
For each n 1, let
n
= v
1
, . . . , v
n

Let C
n
be the nonempty set of colorings :
n
1, . . . , k
Then [C
n
[ < k
n
, so C
n
is nite.
Let T be the tree such that Lev
0
(T) = and Lev
n
(T) = C
n
for n 1.
If n < m and C
n
, C
m
we dene < i v
1
, . . . v
n
=
Then, T is an innite, nitely branching tree. By Konigs Lemma, there
exists an innite branch B through T.
For each n 1, let
n
B Lev
n
(T).
Dene =

n1

n
Clearly, : v 1, . . . , k, and suppose s, t v are adjacent vertices. Then,
there is some n 1 such that s, t
n
.
Since
n
is a k-coloring of
n
, (s) =
n
(s) ,=
n
(t) = (t)
Thus, is a k-coloring.
Now we will nish proving that Konigs Lemma is equivalent to the Com-
pactness Theorem
Proof. Let A
1
, A
2
, . . . , A
n
, . . . be the sentences in our language.
Let T be the tree such that
1. Lev
0
(T) =
2. for n 1, Lev
n
(T) = the partial truth assignments : A
1
, . . . , A
n

T, F such that if only involves a subset of A
1
, . . . , A
n
, then
() = T
3. If , T with Lev
m
(T) and Lev
n
(T) with m < n, we set <
i A
1
, . . . , A
n
=
Clearly each level Lev
n
(T) is nite, so T is nitely branching.
Let
n
be the set of ws which only involve A
1
, . . . , A
n
. If
n
if
nite, then
n
is satisable.
Hence, we can suppose
n
=
1
, . . . ,
n
, . . . is innite.
For each 1, let

=
1
, . . . ,

Then there exists w

: A
1
, . . . , A
n
T, F satisfying

By the Pigeonhole Principle, there exists a xed w such that w

> w for
innitely many 1
22
Clearly w satises
n
=

Thus, T is an innite, nitely branching tree. By Konigs Lemma, there


exists an innite branch B through T.
Let
n
B Lev
n
(T) and dene =

n

n
is a truth assignment which
satises .
4 First Order Logic
Denition 4.1 (Alphabet of a First Order Language). The Alphabet of a First
Order Language consists of
1. Symbols Common to All Languages
(a) Parentheses (, )
(b) Connectives ,
(c) Variables v
1
, v
2
, . . .
(d) Quantier
(e) Equality =
2. Symbols Particular to the Language (Non logical Symbols)
(a) For each n 1 a possibly empty countable set of nplace predicate
symbols
(b) A possibly empty countable set of constant symbols
(c) For each n 1 a possibly empty countable set of nary function
symbols
Example 4.1. The language of arithmetic is +, , <, 0, 1, where +, are
2-ary function symbols, < is a 2-ary predicate symbol and 0, 1 are constants.
Remark 4.1. Clearly, an alphabet is countable.
Denition 4.2 (Expression). An expression is a nite sequence of symbols from
the alphabet.
Denition 4.3 (Terms). The set T of terms is dened inductively as follows
1. Each constant symbol and each variable is a term
2. If f is an n-ary function symbol and t
1
, . . . , t
n
are terms, then ft
1
, . . . , t
n
is a term.
Denition 4.4 (Atomic Formula). An atomic formula is an expression of the
form Pt
1
, . . . , t
n
where P is an n-ary predicate symbol.
Remark- = is a 2-ary predicate symbol, so every language has atomic for-
mulas.
23
Denition 4.5 (Well-Formed Formulas). The set of ws is dened inductively
by
1. Each atomic formula is a w
2. if , are ws, and v is a variable, then (), ( ), v are ws
As usual, there exists a unique readability theorem.
Abbreviations
We usually write
1. ( ) instead of (() )
2. ( ) instead of (( ()))
3. v instead of (v())
4. u = t instead of = ut
5. u ,= t instead of ( = ut)
6. etc
We also use common sense in the use of parentheses.
Denition 4.6 (Free Variable). Let x be a variable and be a w
1. if is atomic then x occurs free in i x occurs in
2. x occurs free in () i x occurs free in
3. x occurs free in ( ) i x occurs free in or x occurs free in
4. x occurs free in v i x occurs free in and x ,= v.
Denition 4.7 (Sentence). A sentence is a w with no free variables.
4.1 Truth and Models
Denition 4.8 (A structure for a rst order language). A structure A for the
rst order language L consists of
1. A nonempty set A, the universe of A
2. For each n-place predicate symbol P, an n-ary relation P
A
A A
. . . A = A
n
3. For each constant symbol c, an element c
A
A
4. For each n-ary function symbol, an n-ary operation f
A
: A
n
A
24
An Example: Suppose L has the following non logical symbols: A 2-place
predicate symbol R, a constant c and a 1-ary function symbol f.
Then, A is a structure for L where:
A = 1, 2, 3, 4
R
A
= 1, 2), 2, 3), 3, 4), 4, 1)
c
A
= 2 and
f
A
: A A is 1 2 3 4 1
Now, we will attempt to dene what it means for a statement to be true in
a rst order language.
Let L be a rst order language.
For each sentence of L, and each structure A for L, we want to dene
A [= as A satises , or is true in A
Example N = N, +, , <, 0, 1), clearly, N [= x(x + 1 = 1 + 1 + 1)
First, we are forced to dene a more general notion.
Denition 4.9 (A [= with s). Let be any w, A a structure for L, and
s : V A where V is the set of variables.
Then, we dene A [= [s], A satises with s
The intuitive meaning is that: is true in A when each free variable v of
is interpreted as s(v) A.
Step 1 Let T be the set of terms of L. We rst dene an extension s : T A
as follows:
1. For each variable v, s(v) = s(v)
2. For each constant symbol c, s(c) = c
A
3. If f is an n-place function symbol and t
1
, . . . , t
n
are terms, then
s(ft
1
, . . . , t
n
) = f
A
(s(t
1
), . . . , s(t
n
))
Step 2 Atomic formulas:
1. A [== t
1
t
2
[s] i s(t
1
) = s(t
2
)
2. If P is an n-ary predicate symbol and t
1
, . . . , t
n
are terms, then A [=
Pt
1
, . . . , t
n
[s]
i s(t
1
), . . . , s(t
n
)) P
A
Step 3 Other ws
1. A [= ()[s] i A ,[= [s]
2. A [= ( )[s] i A ,[= [s] or A [= [s]
3. A [= v[s] i for all a A, A [= [s(v[a)] where s(v, a) : V A,
s(v[a)(x) = s(x) for x ,= v and = a for x = v.
Theorem 4.1. Assume s
1
, s
2
: V A agree on all free variables (if any) on
the w . Then, A [= [s
1
] i A [= [s
2
]
25
Proof. We argue by induction on the complexity of .
Suppose is atomic.
First suppose is = t
1
t
2
. Then, by the homework, s
1
(t
1
) = s
2
(t
1
) and
s
1
(t
2
) = s
2
(t
2
).
Hence, A [== t
1
t
2
[s
1
] i s
1
(t
1
) = s
1
(t
2
) i s
2
(t
1
) = s
2
(t
2
) i A [== t
1
t
2
[s
2
]
Next, suppose is Pt
1
, t
2
, . . . t
n
Then, s
1
(t
i
) = s
2
(t
i
) for 1 i n.
Hence, A [= Pt
1
, . . . , t
n
[s
1
] i s
1
(t
1
), . . . , s
1
(t
2
)) P
A
i
s
2
(t
1
), . . . , s
2
(t
2
)) P
A
i A [= Pt
1
, . . . , t
n
[s
2
]
Next, suppose = ()
Then, A [= [s
1
] i A ,[= [s
1
] i A ,[= [s
2
] by the inductive hypothesis,
i A [= ()[s
2
]
The case where = ( ) is similar.
Finally, we suppose that = x
Clearly, if a A, then s
1
(x[a) and s
2
(x[a) agree on all free variables of .
A [= x[s
1
] i for all a A, A [= [s
1
(x[a)] i for all a A A [=
[s
2
(x[a)] i A [= x[s
1
].
Corollary 4.2. If is a sentence, then either A [= [s] for all s : V A or
A ,[= [s] for all s : V A.
Denition 4.10 (A [= ). Let be a sentence. Then, A [= i A [= [s]
for all s : V A
Denition 4.11 (Satises). Let be a set of ws
1. A satises with s i A [= [s] for all
2. is satisable i there exists a structure A for L and a function s : V
A such that A satises with s.
3. is nitely satisable i any nite subset of is satisable
Theorem 4.3 (Compactness Theorem). If is nitely satisable, then is
satisable.
An Application of Compactness
Let L be the language of arithmetic mentioned before.
Let Th(N) = : is a sentence which is true in N, +, , <, 0, 1)
Consider the following set of ws: Th(N) x > 1 +. . . + 1
. .
n
: n 1
We claim that is nitely satisable.
Let
0
be nite.
Then,
0
= T x > 1 +. . . + 1
. .
n
1
, . . . , x > 1 +. . . + 1
. .
n
t
with T Th(N) is a
nite subset and n
1
, . . . , n
t
1
Let m > maxn
1
, . . . , n
t
. Let s : V N satisfy s(x) = m.
Then, N, +, , <, 0, 1) satises
0
.
26
By compactness, is satisable.
Then, A satises Th(N) and yet s(x) = c > 1
A
+. . . + 1
A
. .
n
for any number
n
So, c is an innite, or nonstandard, natural number. Furthermore, we can
assume A is countable, and so we get the structure N < QZ.
Thus, the statements that are true about N in rst order logic do not uniquely
identify N.
Denition 4.12 (Isomorphism). Let A, B be structures for the rst order
language L
A function f : A B is an isomorphism i the following conditions are
satised:
1. f is a bijection
2. for each n-ary predicate symbol P and a
1
, . . . , a
n
A, then a
1
, . . . , a
n
)
P
A
i f(a
1
), . . . , f(a
n
)) P
B
3. for each constant symbol c, f(c
A
) = c
B
4. For each n-ary function symbol h and a
1
, . . . , a
n
A, f(h
A
(a
1
, . . . , a
n
)) =
h
B
(f(a
1
), . . . , f(a
n
))
Theorem 4.4. Suppose : A B is an isomorphism if is any sentence,
then A [= i B [=
We will actually prove the more general statement:
Theorem 4.5. Suppose : A B is an isomorphism, and s : V A. If is
any w, then A [= [s] i B [= [ s]
We shall need the following technical lemma:
Lemma 4.6. With the above hypotheses, for each term t, (s(t)) = s(t)
Proof. We argue by induction on the complexity of t.
First suppose that t is a variable x.
Then, (s(x)) = (s(x)) = ( s)(x) = (s(x)) = s(x)
Next, suppose that t is a constant symbol c.
Then, (s(c)) = (c
A
) = c
B
= s(c)
Suppose that t is ft
1
, . . . , t
n
, by the inductive hypothesis, we know (s(t
i
)) =
s(t
i
).
Thus, (s(ft
1
, . . . , t
n
)) = (f
A
(s(t
1
), . . . , s(t
n
))) = s(ft
1
, . . . , t
n
))
And now we can prove the theorem
Proof. We argue by induction on complexity of a w .
Assume is atomic, say, Pt
1
, . . . , t
n
A [= Pt
1
, . . . , t
n
[s] i s(t
1
), . . . , s(t
n
)) P
A
27
i (s(t
1
)), . . . , (s(t
n
))) P
B
i s(t
1
), . . . , s(t
n
)) P
B
Next, suppose = , which is similar, as is =
Finally, suppose = v. Then, A [= v[s]
i for all a A, A [= [s(v[a)]
i for all a A, B [= [ s(v[a)]
i for all a A, B [= [( s)(v[(a))]
As is surjective, for all b B, B [= [( s)(v[b)]
Denition 4.13 (Models). Let T be a set of sentences
A is a model of T i A [= for all T
Mod(T) is the class of models of T.
Abbreviation: if E is a binary predicate symbol, then we write xEy instead
of Exy.
Example 4.2. Let T be the following:
(x)xEx
(x)(y)xEy yEx
Then, Mod(T) is the class of graphs
Denition 4.14 (Axiomatizable). Let C be a class of structures.
C is axiomatizable i there exists a set of sentences T such that C = Mod(T)
If there exists a nite set of sentences T, such that = Mod(T) then is
nitely axiomatizable.
Theorem 4.7. C is nitely axiomatizable i C can be axiomatized by a single
sentence.
Example 4.3. The class of graphs is nitely axiomatizable
The class of innite graphs is axiomatizable
Is the class of nite graphs axiomatizable? Is the class of innite graphs
nitely axiomatizable?
Theorem 4.8. Let T be a set of sentences in a rst order language.
If T has arbitrarily large nite models, then T has an innite model.
Proof. For each n 1, let
n
be the sentence which says There exist at least
n elements.
Consider the set of sentences = T
n
: n 1
We claim that is nitely satisable
Suppose
0
is any nite subset. Then,
0
= T
0

n
1
, . . . ,
n
t

Let m = maxn
1
, . . . , n
t
, then T has a nite models A of size greater than
m.
Clearly, A is a model of
0
.
By compactness, there exists a model B of . Thus, B is an innite model
of T.
Corollary 4.9. The class F of nite graphs is not axiomatizable.
28
Corollary 4.10. The class C of innite graphs is not nitely axiomatizable.
Denition 4.15 (Semantically Implies). Let be a set of ws and let be a
w.
Then, logically/semantically implies , written [= i for every struc-
ture A for L and every s : V A, if A satises with s, then A satises
with s.
Denition 4.16 (Valid). The w is valid i [=
Now we will return to the development of syntax. will denote the set of
logical axioms, dened later.
Denition 4.17 (Deduction). Let be a set of ws and let be a w. A
deduction of from is a nite sequence of ws
1
,
2
, . . . ,
n
) such that

n
= and for each 1 i n either
i
or there exist k, j < i such
that
k
is
j

i
In the latter case, we say that
i
follows from
j
and
j

i
by modus
ponens (MP).
Denition 4.18 (Theorem). is a theorem of , written, i there exists
a deduction of from .
And now we nally arrive at the two main theorems of the course.
Theorem 4.11 (The Soundness Theorem). If then [=
Theorem 4.12 (Godels Completeness Theorem). If [= then .
Denition 4.19 (The Logical Axioms, ). is a generalization of i for
some n 0 and variables x
1
, . . . , x
n
we have that is x
1
. . . x
n
. When
n = 0 we see that is a generalization of .
The logical axioms are all generalizations of all ws of the following forms:
1. Tautologies
2. (x
x
t
), where
x
t
means to substitute t for all instances of x in
when t is substitutable for x in .
3. (x( )) (x x)
4. ( x) where x does not occur free in .
5. x = x
6. (x = y (

)) where is atomic and

is the result of replacing


some, possibly none, of the occurrences of x with y.
Explanations. A tautology is a w which can be obtained from a propositional
tautology by substituting ws.

x
t
is the result of substituting t for each free occurrence of x in . We say
t is substitutable for x in if no variable of t becomes bound by a quantier in

x
t
.
29
Now, we will prove the Soundness theorem, which is easy.
We will make use of the following result
Lemma 4.13. Each logical axiom is valid.
And now, the proof of Soundness.
Proof. We argue by the minimum length n 1 of a deduction of from , that
[= .
If n = 1, then .
Clearly, if , then [=
Suppose . Then is valid, and so [= .
Next suppose n > 1.
Let
1
, . . . ,
n
) be a deduction of from . Then, must follow by modus
ponens, and so there are earlier ws and ( ).
Since initial segments of deductions are also deductions, we have that
and ( ) by deductions of length less than n.
Let A be any structure and s : V A. Suppose A [= [s]. By the inductive
hypothesis, A [= and A [= ( )
Hence, [=
Denition 4.20 (Inconsistent). A set of ws is inconsistent i there exists
a w such that and .
Otherwise, is consistent.
Corollary 4.14. If is satisable, then is consistent.
Proof. Suppose that is satisable, say, A is a structure, s : V A and
A [= [s].
Suppose is inconsistent, then and
By Soundness, [= and [=
Then, [= [s] and [= [s], which is impossible.
Now, we shall begin working toward Completeness.
First, we must prove a number of meta-theorems.
Theorem 4.15 (Generalization Theorem). If and x does not occur free
in then x
Proof. We argue by induction on the minimum length of a deduction of from
.
Suppose that n = 1.
Then, . If , then x , so done.
If , then, as x is not free in , x does not occur free in . So x
is in . And so a deduction from of x is 1-, 2- x and 3-x, by
modus ponens.
Next, suppose that n > 1.
Then, in a proof of minimum length n, follows from earlier ws and
.
30
By the induction hypothesis, x and x( ).
So, a deduction of x from would proceed by rst deducing x, then
x( ). Then, by the logical axioms, we have x( ) (x x).
And so, by modus ponens, we get x x, and another modus ponens gives
us x.
Denition 4.21 (Tautologically Implies).
1
, . . . ,
n
tautologically implies
i (
1
(
2
(. . . (
n
))) . . .) is a tautology.
Theorem 4.16 (Rule T). If
1
, . . . ,
n
and
1
, . . . ,
n
tautologically
implies , then .
Proof. Obvious, by repeated application of modus ponens.
Theorem 4.17 (Deduction Theorem). If then ( )
Proof. We argue by induction on the minimal length of a deduction of from
.
Suppose n = 1.
First, suppose . Then, the following is a deduction of . 1-,
2-( ( )) and 3-
Second, assume = .
Then, is a tautology, and so of course ( )
Suppose n > 1.
Then, in a proof of minimal length n, we must have that follows from
earlier ws and ( ) by modus ponens.
By induction hypothesis, ( ) and ( ( ))
Clearly, ( ), ( ( )) tautologically implies .
By Rule T, ( )
Theorem 4.18 (Contraposition). i
Proof. Suppose
By deduction theorem, ( )
By rule T, ( )
Hence, , so ( )
Hence,
The other direction is similar.
Theorem 4.19 (Reductio Ad Absurdum). If is inconsistent, then

Proof. Since is inconsistent, there exists a w such that
and
By deduction theorem, ( ) and ( )
Clearly, ( ), ( ) tautologically implies
By rule T,
Remark 4.2. If is inconsistant, then for every w
31
Proof. Suppose that and . Clearly ( ( )) is a tautology.
By Rule T, .
Remark 4.3. Thus, to prove the consistancy of ZFC, it is enough to show that
ZFC, 0 = 1.
Applications: Some theorems about equality:
1. x(x = x)
Proof. x(x = x)
2. xy(x = y y = x)
Proof. x = y (x = x y = x) by axiom 6. x = x by axiom 5,
x = y y = x by Rule T and axioms 1,2. y(x = y y = x) by
Generalization
3. xyz(x = y (y = z x = z))
Proof. We have y = x (y = z x = z) by axiom 6. Then x =
y y = x by the previous statement, so we have by Rule T and 1,2
(x = y (y = z z = x)), and so by Generalization three applied
three times, we have xyz(x = y (y = z z = x)).
Theorem 4.20 (Generalization on Constants). Assume that and c is a
constant symbol which doesnt occur in . Then there exists a variable y which
doesnt occur in scuh that y
c
y
. Furthermore, there exists a deduction of
y
c
y
from in which c doesnt occur.
Remark 4.4. This says that if we suppose (c) and c does not occur in ,
then for a suitable variable y, we have that y(y).
More importantly, suppose that is a consistant set of formulas in the lan-
guage L. Let L
+
= L c where c is a new constant symol. Then remains
constant in L
+
.
Proof. Suppose that (*)=
1
, . . . ,
n
) is a deduction of from . Let y be a
variable with any
i
. We claim that (**)=(
1
)
c
y
, . . . , (
n
)
c
y
) is a deduction of

c
y
from . We will check that for all i n, either (
i
)
c
y
or follows by
MP. We will break into cases.
1. Suppose that
i
. Then
i
doesnt involve c, and so (
i
)
c
y
=
i
.
2. Suppose
i
. Then it is easily checked that (
i
)
c
y
.
3. Suppose that there exist j, k < i such that
k
is (
j

i
). Then (
k
)
c
y
is
((
j
)
c
y
(
i
)
c
y
). So (
i
)
c
y
follows by Modus Ponens from (
j
)
c
y
and (
k
)
c
y
.
32
Let be the elements of which actually occur in (**). Then
c
y
. As
y does not occur free in , By generalization, y
c
y
.
Hence y
c
y
. Finally note that c certainly doesnt occur in (**).
Recall the proof of generalization, and we see that c also doesnt occur in
the proof of y
c
y
from .
Corollary 4.21. Suppose that
x
c
where c is a constant that doesnt occur
in . Then x via a deduction in which c does not occur.
Proof. By the above theorem, y(
x
c
)
c
y
for some variable y which doesnt
occur in
x
c
. Since c doesnt occur in , we have that (
x
c
)
c
y
=
x
y
. Thus,
y
x
y
.
By the exercise, teh following is a logical axiom: y
x
y
. Thus x
x
y
.
Since x doesnt occur free in y
x
y
, generalization igves y
x
y
x.
By deduction, (y
x
y
x), and since y
x
y
by Modus Ponens, wE
get x.
Theorem 4.22 (Existence of Alphabetic Variants). Let be a w, t a term
and x a variable. Then there exists a w

(which diers from only in the


quantied variables) such that
1.

and


2. t is a substitute for x in

Proof. Omitted, see Enderton


4.2 The Completeness Theorem
Finally, we are ready to begin a proof of the completeness theorem.
Theorem 4.23 (The Completeness Theorem). If [= then .
We will make use of the following:
Lemma 4.24. The following are equivalent:
1. The Completeness Theorem
2. If is consistant then is satisable.
Proof. 1 2: Suppose that is consistant. Then there exists a w such
that , . By completeness, ,[= . Hence there exists a structure A and a
function s : V A such that A satises with s, but A ,[= [s]. In particular,
A satises with s.
2 1: Suppose that , . By reductio ad absurdum, is consistent.
Thus, it is satisable, and so ,[= .
We now prove the following version of the completeness theorem:
33
Theorem 4.25 (Completeness). If is a consistent set of ws in a countable
language L, then there exists a countable structure A for L and a function
s : V A such that A satises with s.
We will proceed in several lemmas.
Lemma 4.26. Expand L to a language L
+
by adding a countably innite set
of new constant symbols. Then remains consistant in L
+
.
Proof. Suppose not. Then there exists a w of L
+
such that ( ) in
L
+
.
Suppose that c
1
, . . . , c
n
include the new constants, if any, which appear in
. By generalization on constants, there exist variables y
1
, . . . , y
n
such that
y
1
, . . . , y
n
,

in L where

is the result of replacing each c


i
with y
i
. Since y
i
is substitutable for y
i
in

in L. This is a
contradiction.
Lemma 4.27 (Add Witnesses). Let
1
, x
1
), . . . ,
n
, x
n
) enumerate all pairs
, x) where si a w of L
+
and x is a variable. Let
1
be the w x
1

1

(
1
)
x
1
c
1
where c
1
is the rst new constnat which doesnt occur in . If n > 1
then
n
is the w x
n

n
(
n
)
x
n
c
n
where c
n
is the rst new constant symbol
which doesnt occur in
1
, . . . ,
n
,
1
, . . . ,
n1
. Let =
n
[n 1. Then
is consistant.
Proof. Suppose not. Then let n 0 be the least integer such that
1
, . . . ,
n+1

is inconsistant. Then by reductio ad absurdum,


1
, . . . ,
n

n+1
. Recall
that
n+1
has the form x ()
x
c
. By rule T, we have
1
, . . . ,
n

x adn
1
, . . . ,
n

x
c
.
Since c doesnt occur in
1
, . . . ,
n
, we have
1
, . . . ,
n

x. This contradicts
n+1
being the rst contradiction, or the consistency of
if n = 0.
Lemma 4.28. We can extend to a consistent set of ws such that for
every w of L
+
, either or .
Proof. Let
1
, . . . ,
n
, . . . be an enumeration of the ws of L
+
. We shall dene
inductively an increasing sequence
0

1
. . . of consistent sets of ws. Let

0
= .
Suppose inductively that
n
has been dened. If
n

n+1
is consitent,
then let
n+1
=
n

n+1
. If it is inconsistent, then by reductio ad absur-
dum,
n

n+1
, and so we let
n+1
=
n

n+1
. Clearly =
n
satises our requirements.
Notice now that is deductively closed. That is, if , then .
Otherwise if / , then , and so and , contradicting the
consistency.
Lemma 4.29. For each of the following ws, and so :
34
1. x(x = x)
2. (x)(y)(x = y y = x)
3. (x)(y)(z)((x = y y = z) x = z)
4. For each n-ary preducate symbol P, x
1
, . . . , x
n
, y
1
, . . . , y
n
((x
1
= y
1

. . . x
n
= y
n
) Px
1
. . . x
n
= Py
1
. . . y
n
)
5. For each n-ary function symbol f, x
1
, . . . , x
n
, y
1
, . . . y
n
((x
1
= y
1

. . . x
n
= y
n
) fx
1
. . . x
n
= fy
1
. . . y
n
)
Similarly, since is deductively closed and xy(x = y y = x) , we
have that if t
1
, t
2
are terms, then (t
1
= t
2
t
2
= t
1
) .
Lemma 4.30. We construct a structure A for our language L
+
as follows:
Let T be the set of terms of L
+
and dene a binary relation E on T by t
1
Et
2
i (t
1
= t
2
) .
Then E is an equivalence relation.
Proof. Let t T. Then (t = t) , and so tEt for all t, so E is reexive.
Suppose that t
1
Et
2
. Then (t
1
= t
2
) , and so (t
2
= t
1
) , so t
2
Et
2
, so
E is symmetric.
Transitivity is similar.
For each t T, we dene [t] = s T[tEs, then we dene A = [t][t T.
For any n-ary predicate symbol, we dene an n-ary relation P
A
on A by
[t
1
], . . . , [t
n
]) P
A
i Pt
1
, . . . , t
n
.
Lemma 4.31. P
A
is well dened.
Proof. Suppose that [s
1
] = [t
1
], . . . , [s
n
] = [t
n
]. We must show that Ps
1
, . . . , s
n

i Pt
1
, . . . , t
n
. By hypothesis (s
i
= t
i
) for each i.
Since ((s
i
= t
i
. . . s
n
= t
n
) (Ps
1
, . . . , s
n
Pt
1
, . . . , t
n
)) , the
result follows.
For each constant symbol c, we dene c
A
= [c], and for each n-ary func-
tion symbol f, we dene an n-ary operation f
A
on A by f
A
([t
1
], . . . , [t
n
]) =
[ft
1
, . . . , t
n
]. As above, f
A
is well-dened.
Finally, we dene s : V A by s(x) = [x].
Lemma 4.32. For every term t, s(t) = [t].
Proof. By denition this is true when t is a constant symbol or a variable.
Suppose that t = ft
1
, . . . , t
n
. By induction, we assume that s(t
i
) = [t
i
]
for each i. Thus s(ft
1
, . . . , t
n
) = f
A
( s(t
1
), . . . , s(t
n
)) = f
A
([t
1
], . . . , [t
n
]) =
[ft
1
, . . . , t
n
].
Lemma 4.33 (Substitution Lemma). If the term t is substitutable for x in ,
then A [=
x
t
[s] i A [= [s(x[ s(t))].
35
And our nal claim:
Lemma 4.34. For each w of L
+
, A [= [s] i
Proof. We argue by deduction on the complexity of . First suppose that is
atomic. Assume that is t
1
= t
2
. Then A [= (t
1
= t
2
)[s] i s(t
1
) = s(t
2
), i
[t
1
] = [t
2
], i (t
1
= t
2
) .
Now suppose that is Pt
1
, . . . , t
n
. Then A [= (Pt
1
, . . . , t
n
)[s] i s(t
1
), . . . , s(t
n
))
P
A
, i [t
1
], . . . , [t
n
]) P
A
i Pt
1
, . . . , t
n
.
Next we consider the cases where is not atomic.
Suppose that is . Then A [= [s] i A ,[= [s] i / , i A.
The case is is similar.
Finally, suppose is x. By construction, for some constant c, (x

x
c
) . Call this (*).
First suppose that A [= x[s], then in particular, A [= [s(x[[c])], that is,
A [= [s(x[ s(x))].
By the substitution lemma, A [=
x
c
[s], and hence by the induction hypoth-
esis,
x
c
. Thus
x
c
/ , so (*) implies that x / . Thus x .
Conversely, suppose that A ,[= x[s]. Then there exists a term t T such
that A ,[= [s(x[[t])], that is, A ,[= [s(x[ s(t))].
Let

be an alphabetic variant of such that t is substitutable for x in

.
Then A ,[=

[s(x[ s(t))]. By the substitution lemma, A ,[= (

)
x
t
[s], and by the
induction hypothesis, (

)
c
t
. Since (x

)
x
t
) , we must have
x

/ . Thus x / .
Finally, let A
0
be the structure for L obtained by forgetting the interpre-
tations of the new constants. Then A
0
satises with s.
Thus, the completeness theorem holds.
Corollary 4.35. [= .
Theorem 4.36 (Compactness Theorem). Let be a set of ws in a countable
rst order language. If is nitely satiable, then is satisable in some
countable structure.
Proof. Suppose that is nitely satisable. Let
0
be any nite subset,
then
0
is satisable. Hence, by soundness,
0
is consistent. Since every nite
subset of is consistent, is consistent. By completeness, is satisable in a
countable structure.
Theorem 4.37. Let T be a set of sentences in a rst order language. If the
class C = Mod(T) is nitely axiomatizable, then there exists a nite subset
T
0
T such that C = Mod(T
0
)
Proof. Suppose that C = Mod(T) is nitely axiomatizable. Then there exists
a sentence such that C = Mod(), since Mot(T) = Mod(), we have T [= .
Hence by completeness, T . Thus, there is a nite set T
0
T such that T
0

. By soundness T
0
[= . Hence, C = Mod(T) Mod(T
0
) Mod() = C.
36
Denition 4.22. Let A, B be structures for the rst order language L. Then
A and B are elementarily equivalent, written A B i for every sentence
L, A [= i B [= .
Remark 4.5. A B implies A B, but the converse is false (eg, nonstan-
dard arithmetic.)
Denition 4.23 (Complete Set). A consistent set of sentences is said to be
complete i for every sentence , either T or T .
Denition 4.24 (Theory). A theory is a set of sentences. A consistant theory
is complete if it is as a set of sentences.
Theorem 4.38. Let T be a complete theory in a rst order langague L. If A
and B are models of T, then A B.
Proof. Let be any sentence. Then T or T . Suppose that T . By
soundness if T is true then is true. So A [= and B [= .
On the other hand, if T , then by soundness we have A [= and
B [= .
Theorem 4.39 (Los-Vaught Test). Let T be a consistent theory in a countable
language L. Suppose
1. T has no nite models
2. If A are countably innite models of T, then A B.
Then T is complete.
Proof. Suppose that T satises the two conditions. Assume for contradiction
that T is not complete. Then there is a sentence such that T , and T , .
By reduction ad absurdum, T and T are both consistent. BY
completeness, there exist countable models A and B of T and T
respectively. By the rst property, they are countably innite, and by the
second, A B, contradiction.
Corollary 4.40. T
DLO
is complete.
Proof. T
DLO
has no nite models. Also we have seen by the back and forth
argument that any two countable dense linear orders are isomorphism, and so
by L-V, we are done.
Corollary 4.41. Q, <) R, <)
Proof. Both are models of the complete theory T
DLO
.
The rationals are a linear order win which every conceivable nite congu-
ration is realized. We next seek a graph theoretic analogue: the innite random
graph.
37
Denition 4.25. For k 1, let P
k
be the drst order sentence in the language
of graphs which says that if x
1
, . . . , x
k
, y
1
, . . . , y
k
are distinct vertices, there ex-
ists a vertex z such that z ,= x
i
, y
i
for all i, z is joined to x
i
for all i, and zis
not joined to y
i
for all i.
We dene the theory T
R
to be the theory (x)(y)(x ,= y) P
k
[k 1.
Theorem 4.42. T
R
is consistant.
Proof. By soundness, it is enough to show that it is satisable.
Consider the graph = N, E) where n is joind to m i 2
n
appears in the
binary expansion of m, or vice versa.
We claim that satises P
k
for all k 1. So let n
1
, . . . , n
k
, m
1
, . . . , m
k
be distinct natural numbers. Let maxm
1
, . . . , m
k
, n
1
, . . . , n
k
. Then z =
2
n
1
+. . . +2
n
k
+2

is joined to all of n
1
, . . . , n
k
, and none of the m
1
, . . . , m
k
.
Question: Why is T
R
called the theory of the random graph?
Answer: Consider a graph

= N, E

) dened as follows. For each pair


n ,= m, we toss a coin. If heads, we join, if tails we dont.
Proposition 4.43.

is a model of T
R
with probability 1.
Proof. Suppose that x
1
, . . . , x
k
, y
1
, . . . , y
k
N are distinct. Fix some z / F =
x
1
, . . . , x
k
, y
1
, . . . , y
k
. Then the probability that z works is 2
2k
, and so the
probability that z doesnt work is 1 2
2k
. Let N F = z
1
, . . . , z
n
, . . ..
Then the probability that none of the z
1
, . . . , z
n
works is (1 2
2k
)
n
, and
lim
n
(1 2
2k
)
n
= 0, and so with probability 1, one of them will work.
Question: Why is T
R
claled the theory of THE random graph?
Theorem 4.44. If G, H are countably innite models of T
R
, then G H.
Proof. By the back and forth argument.
Theorem 4.45. T
R
is complete.
Proof. L-V.
And now for something (apparently) completely dierent.
Well study the basics of nite random graph theory.
Denition 4.26. G
n
is the set of all graphs with vertex set 1, . . . , n.
Remark 4.6. Each G G
n
is uniquely deterined by the edge set E P(T)
where T = k, [1 k < n. Hence [G
n
[ = 2
|T|
= 2
(
n
2
)
= 2
n(n1)/2
.
Denition 4.27. If is any sentence in the language of graph theory, then
Prob
n
() =
|{GG
n
:G|=}|
|G
n
|
This is the same probability as if we joined each pair of vertices independently
with probability 1/2.
38
Theorem 4.46 (Zero-One Law). Let be any sentence in the langauge of graph
theory. THen either lim
n
Prob
n
() = 1 or lim
n
Prob
n
() = 0.
We will rst prove the following special case:
Theorem 4.47. For each k 1, lim
n
Prob
n
(P
k
) = 1.
Proof. Let n 2k + 1. Suppose that G G
n
and G ,[= P
k
. Then there exists
X = x
1
, . . . , x
k
, y
1
, . . . , y
k
such that no z in 1, . . . , n X is joined to pre-
cisely the rst k. For xed X, probability of this event is
_
1
_
1
2
_
2k
_
n2k
.
So summing over all possible 2k subsets of X, we see that Prob
n
(P
k
) =
_
n
2k
_
_
1
_
1
2
_
2k
_
n2k
. This is a polynomial times an exponential, and so Prob
n
(P
k
)
0, so Prob
n
(P
k
) 1 as n .
Now we prove the Zero-One Law.
Proof. The axioms of T
R
are true with probability 1. As T
R
is complete by L-V,
either T
R
or T
R
.
Assume that T
R
. Then there exists k
1
< . . . < k
s
such that =
(x)(y)(x ,= y), P
k
1
, . . . , P
k
s
, and hence [= .
Let be the sentence which says that there are at least 2k
s
+ 1 elements.
Then clearly , P
k
s
[= . Hence, if n 2k
s
+1 then Prob
n
(P
k
S
) Prob
n
()
lim
n
Prob
n
(P
k
s
) = 1, and so 1 Prob() 1.
The other case is similar.
Open Problem: Let T be a complete theory in a countable rst order lan-
guage. How many countable models can T have up to isomorphism?
Theorem 4.48 (Vaught). If T is a complete theory in a countable language,
then T cannot have exactly two countable models.
Theorem 4.49. There exists a complete theory in a countable language which
has exactly 3 countable models up to isomorphism.
Proof. Let L be the language with nonlogical symbols: a binary predicate
symbol <, constant symbols c
1
, . . . , c
n
, . . . , n N
+
. And let T be the theory
which says < is a DLO without end points adn c
n
< c
n+1
for n N
+
. Clearly,
T is consistent.
Three models are Q, <, n), Q, <, 1 2
n
) and Q, <,

n
k=1
1
k
2
).
These are the only models, as if A = Q, <, c
A
n
), then lim
n
c
A
n
= ,
lim
n
c
A
n
Q or lim
n
c
A
n
/ Q, and each corresponds to
Let L
n
be the language consisting of <, c
1
, . . . , c
n
. Let T
n
be a theory such
that < is a DLO and c
1
< . . . < c
n
. Clearly L = L
n
, and T = T
n
. Note
that T
n
has no nite models, is consistent, and has a unique countable model
up to isomorphism, and so by L-V, T is complete.
Let be any sentence in L. Then there exists an n N
+
such that is
a sentence in L
n
, and hence T
n
or T
n
, and hence T or T .
Thus T is complete.
39
Theorem 4.50. For each n 3, there exists a complete theory in a countable
language which hs exactly n models up to isomorphism.
40

You might also like