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 defined 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 6= 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 iff x B
then A = B.
Definition 1.1 (Subset). Let A, B be sets. Then A is a subset of B, written
A B iff (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 iff x B, thus A = B.
Definition 1.2 (Union). Let A, B be sets. The Union A B of A and B is
defined 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) iff x A or x B C
iff x A or (x B or x C)
iff x A or x B or x C
iff (x A or x B) or x C
iff x A B or x C
iff x (A B) C
Definition 1.3 (Intersection). Let A, B be sets. The intersection A B of A
and B is defined by a A B iff 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) iff x A and x B C
iff x A and (x B or x C)
iff (x A and x B) or (x A and x C)
iff x A B or x A C
iff x (A B) (A C)
1

Definition 1.4 (Set Theoretic Difference). Let A, B be sets. The set theoretic
difference A \ B is defined by x A \ B iff x A and x 6 B.
Theorem 1.4. A \ (B C) = (A \ B) (A \ C)
Proof. Let x be arbitrary.
Then x A \ (B C) iff x A and x 6 B C
iff x A and not (x B or x C)
iff x A and (x 6 B and x 6 inC)
iff x A and x 6 B and x 6 inC
iff x A and x 6 B and x A and x 6 inC
iff x (A \ B) and x (A \ C)
iff x (A \ B) (A \ C)
Provisional definition 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 defined by f (x) = x2 . We shall identify
f with its graph. To generalize this to arbitrary sets A and B we first need the
concept of an ordered pair. IE, a mathematical object ha, bi satisfying
ha, bi = hc, di iff a = c and b = d. In particular, h1, 2i =
6 {1, 2}.
Definition 1.5 (Cartesian Product). If A, B are sets, then their Cartesian
Product A B = {ha, bi |a A, b B}
Definition 1.6 (Function). f is a function from A to B iff f A B and for
each a A, there exists a unique b B such that ha, bi 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 define ha, bi in terms of set theory.
Definition 1.7 (Ordered Pair). ha, bi = {{a}, {a, b}}
Theorem 1.5. ha, bi = hc, di iff a = c and b = d.
Proof. Clearly if a = c and b = d then ha, bi = {{a}, {a, b}} = {{c}, {c, d}} =
hc, di
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 6= b and c 6= 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.
Definition 1.8 (Injection). The function f : A B is an injection iff (a, a0
A) if a 6= a0 then f (a) 6= f (a0 )
Definition 1.9 (Surjection). The function f : A B is a surjection iff (b
B)(a A) such that f (a) = b
Definition 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.
Definition 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.
Definition 1.12 (Inverse Function). If f : A B is a bijection, then its
inverse, f 1 : B A is defined 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 = {hb, ai : ha, bi f }
Definition 1.13 (Equinumerous). Two sets, A and B, are equinumerous, written A B iff 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 define a bijection f : N E by f (n) = 2n
Remark 1.1. If is often extremely difficult to explicitly define a bijection f :
N A. However, suppose that f : N A is a bijection. For each n N let an
be f (n). Then, a0 , a1 , . . . 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 define a
bijection f : N A by f (n) = an
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
1
2
3
1
1
1
2
3
2
infinite matrix 1 .
2 %
2 .
3
13 % 23 .
3
Proceed through the matrix along the indicated route adding rational numbers to your list if they have not already occurred.
Second, we declare that N Q. In the first part, we showed that there exists
a bijection f : N Q+ hence we can list Q by 0, f (1), f (1), . . ..
Definition 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 2n .
Theorem 1.11 (Cantor). N 6 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 find a set
S N such that n N f (n) 6= S.
We do this via a time and motion study
For each n N we must make the nth decision. That is, if n S.
We perform the nth task, that is, ensure f (n) 6= S.
We make the nth decision so that it accomplishes the nth task, ie, n S iff
n 6 f (n).
Clearly, f (n) and S will differ on whether they contain n, thus, n
N f (n) 6= 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 6 P(A)
Proof. Suppose that f : A P(A) is any function. Consider the set S = {a
A : a 6 f (a)}.
Then, a S iff a 6 f (a), so f (a) = S. Hence, f is not a surjection.
Definition 1.15 (). Let A and B be sets.
A  B iff there exists an injection f : A B.
A B iff A  B and A 6 B
Theorem 1.13. For any set A, A P(A)
Proof. We can define an injection f : A P(A) by f (a) = {a}.
Thus, A  P(A)
By Cantors Theorem, A 6 P(A), thus A P(A).
4

Corollary 1.14. N P(N) P(P(N)) . . .


Definition 1.16 (Countable). A set A is countable iff either A is finite 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 idA : A A be the function defined by idA (a) = a. Clearly,
idA 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
AC
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 define an injection f : N Q by f (n) = n. Hence, N  Q
We next define g : Q N as follows:
If 0 6= q Q, we can uniquely express q = a
b where  = 1 and (a, b) = 1,
and a, b > 0.
So, g(q) = 2+1 3a 5b . We also define 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 define 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.r1 r2 . . . such that 0 rn < 9 and the expansion doesnt end in an infinite
string of nines. (this is to avoid two expansions such as 0.500 . . . = 0.4999 . . .)
First we define a function f : (0, 1) P(N) as follows. Suppose that
r = 0.r0 r1 r2 . . .. Let p0 , p1 , . . . be the primes in increasing order. Then f (r) =
{pr00 +1 , pr11 +1 , . . .}. Clearly, f is an injection, hence (0, 1)  P(N)
Next, we define a function g : P(N) (0, 1) as followes: If S N then
g(S) = 0.S0 S1 S2 . . . where Sn = 7 if n S and Sn = 5 if n 6 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 finite or S N. That is, N has the
least infinite size.
Proof. Suppose S N is infinite. Let S0 , S1 , S2 , . . . be the increasing enumeration of S. This list witnesses that N S
Hypothesis 1.1 (Continuum Hypothesis). If X R, then either X is countable or X R
Theorem 1.22 (G
odel and Cohen). If the axioms of set theory are consistent,
then it is impossible to prove or disprove the Continuum Hypothesis from these
axioms.
Definition 1.17 (Set of Finite Subsets). Fin(N) is the set of finite subsets of
N.
Clearly, N  Fin(N)  P(N)
Theorem 1.23. N Fin(N)
Proof. We can define an injection f : N Fin(N) by f (n) = {n}.
Next, we can define g : Fin(N) N as follows.
Suppose that S = {s0 , s1 , . . . , sn } 6= , where s0 < s1 < . . . < sn . Then
g(S) = ps00 +1 . . . psnn +1 , with p0 , . . . , pn 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
Definition 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 first define a function g : P(N) NN as follows:


For each subset of N, the characteristic function is (x) : N {0, 1} defined
by S (n) = 1 if n S and S (n) = 0 if n
/ S. The set g(S) = S NN .
Clearly, g is an injection, and so P(N)  NN
6

f (0)+1

Next we define : NN P(N) by (f ) = {p0


p0 , p1 , . . . are the primes in increasing order.
Clearly, is an injection.
Hence, NN  P(N).
So, by Cantor-Bernstein, NN P(N)

f (n)+1

, . . . , pn

, . . .}, where

And now, a heuristic principle. If S is an infinite set, then, in general, if


each s S is determined by finitely many pieces of data, then S is countable,
and if each s S is determined by infinitely many independent pieces of data,
then S is countable.
Definition 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 define a mat f : N EC(N) by f (n) = cn , where cn (t) =
n t N.
Clearly, f is an injection, so N  EC(N).
f (0)+1
f (a)+1
, where
Next, we define a map : EC(N) N by (g) = p0
. . . pa
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 definition and a lemma.
Definition 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 [A \ C]. Then, a A \ C such that f (a) = x. Hence,
x f [A].
Suppose x f [C]. Then, c C such that f (c) = x. As a 6= 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 7 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
AB
7

Let h = g f : A A, then h is an injection.


Define by induction on n 0 A0 = A4, An+1 = h[An ] and C0 = C, Cn+1 =
h[Cn ].
Define a function k : A C by k(x) = h(x) if x An \ Cn for some n and
k(x) = x otherwise.
Claim 2 - k is an injection.
Suppose that x 6= x0 are distinct elements of A.
There are three cases:
1. Suppose x An \ Cn , x0 Am \ Cm for some n, m. Since h is an injection,
k(x) = h(x) 6= h(x0 ) = k(x0 )
2. Suppose x, x0
/ An \ Cn

n. Then k(x) = x 6= x0 = k(x0 )

3. Without loss of generality, suppose x An \ Cn for some n and x0


/ An \
Cn n. Then, k(x) = h(x) h[An \ Cn ] = h[An ] \ h[Cn ] = An+1 \ Cn+1 .
Hence, k(x) = h(x) 6= x0 = k(x0 )
Claim 3 - k is a surjection.
Let c C be arbitrary. There are two cases.
1. Suppose c
/ An \ C n

n, then k(c) = c

2. Suppose c An \ Cn for some n. Since c C = C0 , m such that


n = m+1, since h[Am \Cm ] = h[Am ]\h[Cm ] = An \Cn . So, a Am \Cm
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 define an injection f : (0, 1) (0, 1) (0, 1) such that f (r) = 12 , r .
Next we define an injection g : (0, 1) (0, 1) (0, 1) as follows.
If r = 0.r0 r1 . . . rn . . . and s = 0.s0 s1 . . . sn . . ., then,
g(hr, si) = 0.r0 s0 r1 s1 . . . rn sn . . ..
By the Cantor-Bernstein Theorem, (0, 1) (0, 1) (0, 1)
Definition 1.21 (Sym(N)). Sym(N) = {f NN : f is a bijection }
Theorem 1.28. Sym(N) P(N)
Proof. Since Sym(N) NN P(N), we have Sym(N)  P(N).
Next, we define a function f : P(N) Sym(N) by S fS where fS (2n) =
2n + 1 and fS (2n + 1) = 2n if n S and fS (2n) = 2n and fS (2n + 1) = 2n + 1
otherwise.
This is an injection, and so P(N)  Sym(N), so, by Cantor-Bernstein,
P(N) Sym(N)

Definition 1.22 (Finite Sequence). Let A be a set. Then a finite sequence of


elements of A is an inject ha0 , a1 , . . . , an i, with ai A and n 0.
ha0 , a1 , . . . an i = hb0 , b1 , . . . bm i if and only if n = m and i ai = bi
Definition 1.23 (Finite Sequence). ha0 , . . . an i = f : {0, . . . , n} A : f (i) =
ai
Definition 1.24 (Finseq(A)). Finseq(A) is the set of finite sequences of elemetns of A.
Theorem 1.29. If A is a nonempty countable set, then N Finseq(A)
Proof. Fix some a A. Then, we can define an injection f : N Finseq(A) :
n
z }| {
n 7 ha, . . . , ai
So, N Finseq(A)
Next, we define an injection g : Finseq(A) N as follows:
Since A is countable, there exists an injection e : A N. We define
e(a )+1
ha0 , . . . , an i 7 2e(a0 )+1 . . . pn n , where pi is the ith prime.
Thus, Finseq(A)  N, and so, by the Cantor-Bernstein Theorem, N
Finseq(A)
And now, we move on to Cardinal Arithmetic.
Definition 1.25 (Cardinality). To each set A we associate an object, its cardinality, denoted card(A) or |A| such that |A| = |B| iff A B
Examples
1. If A is a finite set, then |A| is its usual size.
2. |N| = 0
3. The infinite cardinals begin 0 , 1 , . . . , , +1 , . . .
Definition 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 A0 and B B 0 and A B = A0 B 0 = , then
A B A0 B 0
Proof. Since A A0 and B B 0 , there exist bijections f : A A0 and
g : B B 0 , then we can define a bijection h : A B A0 B 0 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

In fact, if , are cardinal numbers, at least one of which is infinite, then


+ = max{, }
And it is clearly impossible to sensibly define an operation of cardinal subtraction.
Definition 1.27 (Cardinal Multiplication). Let , be cardinals. Then =
card(A B) when |A| = and |B| = .
We have already checked that this is well defined.
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 infinite, and neither is
zero, then = max{, }
Definition 1.28 (Cardinal Exponentiation). If , are cardinal numbers, then
= card(AB ) where |A| = and |B| = .
Theorem 1.33. |R| = 20
Proof. We know R P(N) N{0,1} , hence 20 = card(N{0,1} = |R|
In fact, if is any cardinal number, then < 2 .
This just restates that A  P(A)

Relations

Definition 2.1 (Binary Relation). A binary relation on a set A is a subset


R A A. We usually write aRb instead of ha, bi R
Example 2.1.

1. The order relation on N is <= {hn, mi : n, m N, n < m}

2. divisibility relation on N+ is D = {hn, mi : 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.
Definition 2.2 (Reflexive Property). R is reflexive if (a A)aRa
Definition 2.3 (Symmetric Property). R is symmetric if (a, b A)aRb
bRa
Definition 2.4 (Transitive Property). R is transitive if (a, b, c A)aRb
bRc aRc
Definition 2.5 (Equivalence Relation). R is an equivalence relation iff R is
reflexive, symmetric and transitive.
10

Example: Consider the relation R defined on Z by aRb iff 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 reflexive.
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.
Definition 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, . . .}
Definition 2.7 (Partition). Let A be a nonempty set. Then, a partition of A
is a collection {Bi : i I} such that
1. (i I)Bi 6=
2. (i, j I) if i 6= j then Bi Bj =
3. (a A)(i I) such that a Bi . That is, A = iI Bi
Theorem 2.2. Let R be an equivalence relation on A.
Then, (a A)a [a] and If a, b A and [a] [b] 6= , then [a] = [b]. Hence,
the set of equivalence classes {[a] : a A} forms a partition of A.
Theorem 2.3. Let {Bi : i I} be a partition of A. Define the binary relation
E on A by aEb iff (i I) such that a, b Bi . Then, E is an equivalence
relation and the Eequivalence classes are precisely {Bi : i I}
Example: How many equivalence classes are there on {1, 2, 3}?
Answer: There are exactly five equivalence relation, corresponding to
{{1, 2, 3}}, {{1}, {2, 3}}, {{2}, {1, 3}}, {{3}, {1, 2}}, {{1}, {2}, {3}}
Definition 2.8 (Irreflexive Property). R is irreflexive iff (a) ha, ai
/R
Definition 2.9 (Trichotomy Property). R satisfies the Trichotomy Property if
(a, b A) exactly one of the following holds, aRb, a = b, bRa.
Definition 2.10 (Linear Order). hA, Ri is a linear order if R is irreflexive,
transitive, and satisfies the trichotomy property.
Definition 2.11 (Partial Order). Let R be a binary relation on A, then hA, Ri
is a partial order if R is irreflexive and transitive.

11

Definition 2.12 (Isomorphism). Let hA, <i and hB, i be partial orders. A
map f : A B is an isomorphism if the following conditions are satisfied:
1. f is a bijection
2. (a, b A)a < b iff f (a) f (b)
In this case, we say that hA, <i an hB, i are isomorphic, and write hA, <i
=
hB, i
Theorem 2.4. hZ, <i
= hZ, >i
Proof. Define f : Z Z by f (z) = z, then a < b iff a > b iff 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. hN+ , Di
6 hP(N), i
=
Proof. N+ 6 P(N), so no bijection exists.
Theorem 2.6. hR \ {0}, <i
6 hR, <i
=
Proof. Suppose f : R \ {0} R is an isomorphism.
For each n 1 let rn = f ( n1 )
Then, r1 > r2 > . . . rk > . . . f (1)
Let s be the greatest lower bound of {rn : n 1}.
t R \ {0} such that f (t) = s
Clearly, t < 0, thus 2t > t
f ( 2t ) > s, hence n 1 such that rn < f ( 2t ).
But then 2t < n1 and f ( n1 ) < f ( 2t ), so a contradiction.
Definition 2.13. For each prime p, let Z[1/p] = { pan : a Z, n 0}
Definition 2.14 (Dense Linear Order without Endpoints). A linear order
hD, <i 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, hZ[1/p], <i is a DLO.
Proof. Clearly hZ[1/p], <i is a linear order without endpoints.
Let a, b Z[1/p] with a < b. Then, we can express a = pcn and b =
Adjusting c or d if necessary, we can suppose a = pcn and b = pdn .
d
So then a = pcn < c+1
pn pn = b
1
So, let r = pcn + pn+1
= cp+1
pn+1 Z[1/p]
Then, a < r < b
12

d
pm .

Theorem 2.8. If hA, <i and hB, i are countable DLOs, then hA, <i
= hB, i
Proof. This is called the Back and Forth Argument.
Let A = {an : n N} and B = {bn : n N}
First define A0 = {a0 } and B0 = {b0 } and f0 = {ha0 , b0 i
Suppose inductively that we have constructed An , Bn , fn such that An is a
finite subset of A such that a0 , . . . , an An , Bn is similarly related to B, and
fn : An Bn is an order preserving bijection.
We construct An+1 , Bn+1 , fn+1 in two steps.
1. If an+1 An , then A0n = An , Bn0 = Bn and fn0 = fn .
If an+1
/ An , then say c0 < c1 < . . . , an+1 < . . . < cm where An =
{c0 , . . . , cm }
d B such that f (c0 ) < . . . < d < . . . < f (cm ), so we define A0n =
An {an+1 }, Bn0 = Bn {d} and fn0 = fn {han+1 , di
2. If bn+1 Bn0 , then An+1 = A0n , Bn+1 = Bn0 and fn+1 = fn0
Else, d0 < . . . < bn+1 < . . . < d` , where Bn0 = {d0 , . . . , d` }.
Then, e A such that (fn0 )1 (d0 ) < . . . < e < . . . < (fn0 )1 (d` )
And so, we define An+1 = A0n {e}, Bn+1 = Bn0 {bn+1 } and fn+1 =
fn0 {he, bn+a i}
Finally, let f = n fn , then f is an order preserving bijection between A
and B.

Corollary 2.9.

1. hQ, <i
= hQ \ {0}, <i

2. hZ[1/2], <i
= hZ[1/3], <i
3. If hD, <i is a countable DLO, then hD, <i
= hQ, <i
Definition 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 hA, i is a partial order, then there exists a binary relation
< extending such that hA, <i is a linear order.

Propositional Logic

Definition 3.1 (Formal Language). We define our formal alphabet as the following symbols
1. The sentence connectives , , , ,
2. The punctuation symbols (, )

13

3. The sentence symbols A0 , A1 , . . . , An , . . . for n 0


Definition 3.2 (Expression). An expression is a finite sequence of symbols from
the alphabet.
Definition 3.3 (Well Formed Formulas). The set of well-formed formulas, or
wffs, is defined recursively as follows
1. Every sentence symbol An is a wff.
2. If , are wffs, then ( ), ( ), (6 ), ( ), ( )
3. No expression is a wff unless compelled to be so by finitely many applications of 1 and 2.
Remark 3.1. From now on, we will omit 3 in recursive definitions. Clearly,
the set of wffs is countable, and since the definition of a wff is recursive, many
of the basic properties of wffs are proved by induction.
Example 3.1. (A1 A2 ) is a wff, but (A1 A2 )) is not.
Theorem 3.1. If is a wff, then has the same number of left and right
parentheses.
Proof. We argue by induction on the length of the wff .
If n = 1, then is a sentence symbol, say, As . So the result holds.
Suppose n > 1 and the result holds for all wffs of length less than n.
Then there exist wffs , such that has one of the following forms:
( ), ( ), (), ( ), ( )
By induction, the result holds for and , hence, the result also holds for
.
Definition 3.4. L is the set of sentence symbols
L is the set of wffs.
{T, F } is the set of truth values.
Definition 3.5 (Truth Assignment). A truth assignment is a function : L
{T, F }
Definition 3.6 (Extension of ). Let be a truth assignment. Then we define
the extension : L {T, F } recursively as follows
1. If An L , then (An ) = (An )
2. ((An )) = T of () = F
((An )) = 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.
Definition 3.7 (Proper Initial Segment). If ha0 , . . . , an i is a finite sequence,
then a proper initial segment has the form ha0 , . . . , as i where 0 s < n
Lemma 3.2. Any proper initial segment of a wff has more left than right parentheses. Thus, no proper initial segment of a wff is a wff.
Proof. We argue by induction on the length n 1 of the wff .
First, suppose n = 1, then is a sentence symbol, say, As . As As has no
proper initial segments, the result holds vacuously.
Suppose n > 1, and the result holds for all wffs of length less than n.
Then, has the form ( ), ( ), (), ( ), ( ) for some shorter
wffs 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 wff of length greater
than one, then there exists exactly one way of expressing in the form (), (
), ( ), ( ), ( ) for shorter wffs , .
Proof. Suppose is both ( ) and ( ).
Then, ( ) = ( ), and so deleting the first parenthesis, ) = ).
Suppose 6= , then without loss of generality, is a proper initial segment
of .
By the lemma, is not a wff. 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 wffs, however, just
representations of them.
Definition 3.8 (Satisfiable). Let : L {T, F } be a truth assignment.
1. If is a wff, then satisfies if () = T .
2. If is a set of wffs, then satisfies if () = T for all
15

3. is satisfiable if there exists a truth assignment which satisfies .


Definition 3.9 (Tautological Implication). Let be a set of wffs and be a
wff. Then tautologically implies , written |= iff every truth assignment
which satisfies also satisfies .
Definition 3.10 (Tautology). is a tautology iff |= , ie, every truth assignment satisfies .
Definition 3.11 (Tautological Equivalence). The wffs , are tautologically
equivalent iff {} |= and {} |=
Definition 3.12 (Finitely Satisfiable). is finitely satisfiable if every finite
subset 0 is satisfiable.
Theorem 3.4 (The Compactness Theorem). If is finitely satisfiable, then
is satisfiable.
Before proving the Compactness Theorem, we will make a number of applications.
Theorem 3.5. Suppose is an infinite set of wffs and |= . Then, there
exists a finite subset 0 such that 0 |= .
Proof. Suppose not.
Then, for every finite subset 0 , we have 0 6|= , and so 0 {()}
is satisfiable.
Thus, {()} is finitely satisfiable.
By compactness, {()} is satisfiable, but this contradicts |= .
Definition 3.13 (Graph). Let E be a binary relation on a set V . Then, =
hV, Ri is a graph iff E is symmetric and irreflexive.
Definition 3.14 (k-colorable). Let k 1. Then, the graph = hV, Ri is
k-colorable if there exists a function
: V {1, 2, . . . , k}
such that if aEb then (a) 6= (b)
Theorem 3.6 (Erd
os). Let = hV, Ri be a countably infinite graph, and k 1.
Then, is k-colorable iff every finite subgraph 0 of is k-colorable.
Proof. Suppose that : V {1, 2, . . . , k} is a one coloring of .
Let 0 = hV0 , E0 i be a finite subgraph.
Then, let 0 =  V0 be the restriction of to V0 .
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 Cv,i v V and 1 i k
Next, we write down the set of wffs which imposes suitable constraints on
truth assignments. In this case, consists of the wffs
16

1. ((Cv,i Cv,j )) for v V and 1 i 6= j k


2. (Cv,1 . . . Cv,k ) for v V
3. ((Cv,i Cw,i )) for all v, w V with vEw and 1 i k.
We check that is indeed a suitable collection of wffs.
So, by 1 and 2, for each v V there exists a unique 1 i k such that
v(Cv,i ) = T , hence, is a function.
Suppose vEw. By 3, they cannot be assigned the same color. That is, we
cannot have v(Cv,i ) = T = v(Cw,i ) for any 1 i k.
So now we check that is satisfiable.
Let 0 be any finite subset.
Let 0 = hV0 , E0 i be the finite subgraph consisting of the vertices which
were mentioned in 0 .
By assumption, 0 is k-colorable.
Let : V0 {1, . . . , k} be a k-coloring of 0 .
Then, let 0 be a truth assignment such that for all v V0 , and 1 i k,
0 (Cv,i ) = T iff 0 (v) = i.
Then clearly, 0 satisfies 0 .
Thus, is finitely satisfiable.
By compactness, is satisfiable. Thus, is k-colorable.
Theorem 3.7. Let hA, i be a countably infinite partial ordering. Then, there
exists a linear ordering hA, <i such that < extends .
Proof. We work with the propositional language consisting of the sentence symbols La,b where a 6= b A.
Let be the set of wffs of the form
1. (La,b Lb,c ) La,c for a, b, c A distinct.
2. (La,b Lb,a ) for a 6= b A.
3. (La,b Lb,a ) for a 6= b A.
4. La,b for a b
Clearly, < is irreflexive, 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 satisfiable.
By the compactness theorem, it is enough to show that is finitely satisfiable.
Let 0 be any finite subset.
Let A0 be the finite subset of A which is actually mentioned in 0 .
Let 0 be the restriction of to A0 .
By the homework, there exists a linear ordering <0 of A0 which extends 0 .
Let 0 be a truth assignment such that for all a 6= b A0 , 0 (La,b ) = T iff
a <0 b.
So 0 satisfies 0 . hence, is finitely satisfiable.
17

Theorem 3.8 (clearly false). If hA, <i is a countable infinite 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 wffs.
Definition 3.15 (Distinct Representatives). Suppose that S is a set.
Suppose hSi : i Ii is an indexed collection of not necessarily distinct subsets
of S.
A system of distinct representatives is a choice of elements xi Si such that
if i 6= j then xi 6= xj .
Theorem 3.9 (Halls Matching Theorem 1935). Let S be any set and n N+ .
Let hs1 , . . . , sn i be an indexed collection of subsets of S.
Then, the necessary and sufficient condition for the existence of a system of
distinct representatives is
For any 1 k n and choice of k distinct indices i1 , . . . , ik , then we have
|Si1 . . . Sik | k
Theorem 3.10 (clearly false attempt at an infinite Halls theorem). As above,
but cross out all reference to n.
Counterexample is S = N.
Theorem 3.11 (Infinite Version of Halls Matching Theorem). Let S be any
set.
Let hS: i N+ i be an indexed collection of finite subsets of S.
Then, a necessary and sufficient condition for the existence of a system of
distinct representatives is for every 1 k and choice of k distinct indices,
i1 , . . . ik we have |Si1 . . . Sik | 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 Cn,x for
x Sn and n 1.
Let be the set of wffs of the following form
1. (Cn,x Cm,x ), x Sn Sm
2. (Cn,x Cn,y ), x 6= y Sn
3. For each n 1, letting Sn = {x1 , . . . xtn } we add Cn,x . . . Cn,xtn
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 satisfiable.
By compactness, it is enough to check that is finitely satisfiable.
Let 0 be any finite subset of .
Let n1 , . . . nN be the finitely many indices mentioned in 0 .
18

Then, Sn1 , . . . SnN clearly satisfies Halls Condition.


By Halls Theorem, for finite collection, there exists a system of distinct
representatives xni Sni , 1 i N .
Let 0 be a truth assignment such that if 1 i N and x Sni then
0 (Cni ,x ) = T iff x = xni . Then 0 satisfies 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 An , either An
or (An ) .
Then, the only possible truth assignment satisfying is (An ) = T iff An
.
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 finite satisfiable set of wffs. For each wff , either
{} is finitely satisfiable or {()} is finitely satisfiable.
Proof. Suppose {} isnt finitely satisfiable.
Then, there exists a finite subset 0 such that 0 {} is not satisfiable.
Thus, 0 |= {()}
We claim that {()} is finitely satisfiable.
Let {} be any finite subset.
If , then is satisfiable, so we can suppose = 0 {} for some
finite set 0 .
Let be a truth assignment which satisfies the finite subset 0 0 of .
since 0 |= , we must have () = T .
Hence, satisfies 0 and .
So, {} is finitely satisfiable.
Now, we shall prove the compactness theorem.
Proof. Let 1 , . . . , n , . . . be an enumeration of all wffs.
We shall inductively define and increasing sequence of sets of wffs 0
1 . . . such that
1. 0 =
2. n is finitely satisfiable
3. Either n n or n n
Assume inductively that we have defined n .
Then, define n+1 = n {n+1 } if n {n+1 } is finitely satisfiable and
n+1 = n {n+1 } otherwise.
By lemma, n+1 is finitely satisfiable.
So, the inductive construction can be accomplished.
Finally, let = n n
19

Suppose is a finite subset. Then, n such that n . Since n is


satisfiable, we know that is satisfiable, so is finitely satisfiable.
Let = n , then either n n or n n . Since n , for each wff
either or
Finally, define a truth assignment by (A` ) if true iff A` .
Then, we want to show that for any wff , = T iff .
We argue by induction on the length m 1 of the wff .
First, suppose m = 1, then, is a sentence symbol At and the result follows.
Now, suppose m > 1, and result holds for all shorter wffs.
Then, has one of the following forms (), ( ), ( ), ( ), ( )
/ ,
Case I - Suppose is . Then, () = T iff () = F , which is iff
which is iff
Case II - Suppose is .
First suppose ( ) = T ,
Then, () = T or () = T , and so or .
Since is finitely satisfiable, {, ( )} 6 and {, ( )} 6 so
( )
/ , thus, Suppose .
Since {, , } 6 , it follows that
/ or
/ .
Hence, or . By induction hypothesis, () = T or () = T .
Hence, ( ) = T
The other cases are similar.
Definition 3.16 (Tree). A partial order hT, <i is a tree iff the following conditions are satisfied
1. There exists a least element t0 T called the root.
2. For each t T the set of its predecessors, PrT (t) = {s T : s < t} is a
finite set which is linearly ordered by <.
Definition 3.17 (Complete Binary Tree). The complete binary tree T2 is T2 =
{f |f : {0, . . . , n 1} {0, 1} for some n 0} ordered by f < g iff f g
Definition 3.18. Let hT, <i be a tree
1. If t T , then the height of t is defined to be htT (t) = |PrT (t)|
2. For each n 0, the nth level of T is Levn (T ) = {t T : htT (t) = n}
3. For each t T , the set of immediate successors is succT (t) = {s T : t <
s, htT (s) = htT (t) + 1}
4. T is finitely branching if each t T has a finitely, 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 T2 .


if f : N {0, 1} is any function, then we obtain a corresponding branch
Bf = {f  {0, . . . , n 1} : n 0}
Every branch has this form.
Does every infinite tree have an infinite 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 (K
onigs Lemma). If T is an infinite, finitely branching tree, then
T has an infinite branch.
Remark - if B is such a branch, then necessarily, |B Levn (T )| = 1 for all
n N.
First, we will prove that Compactness implies Konig.
Proof. Let T be an infinite finitely branching tree. Then Levn (T ) is finite for
all n N, so T is countable.
We use the propositional language with sentence symbols Bt for t T .
Let be the following set of wffs for each n 0, if Levn (T ) = {t1 , . . . , t` }
then we include:
1. Bt1 . . . Bt`
2. (Bti Btj ) for 1 i < j `
3. Bs Bt for all s, t T such that t < s
So, by compactness, it is enough to show that is finitely satisfiable.
Let 0 be an arbitrary finite subset. There exists n N such that if
t T is mentioned in 0 then htT (t) < n then v0 (Bt ) = T iff t < t0 .
Clearly, v0 satisfies 0 , thus is finitely satisfiable.
Now, we shall prove K
onigs Lemma without using compactness.
Proof. We define an induction on n 0, a sequence of elements tn Levn (T )
such that
1. t0 is the root
2. if m < n then tm < tn
3. {s T : tn < s} is infinite.
Clearly, t0 satisfies 2 and 3.
Suppose, inductively, that we have defined tn . Let {a1 , . . . , ar } be the set of
immediate successors to tn .
If tn < s, and htT (s) > n + 1 then there exists 1 i r such that ai < s.
By the Pigeon Hole Principle, there exists 1 i r such that {s T : ai <
s} is infinite.
21

So, we can choose tn+1 = ai .


Then, tn+1 satisfies 2 and 3 above. And so, by induction, we have B = {tn :
n 0}, an infinite branch.
So now, an application of Konigs Lemma
Theorem 3.15 (Erd
os). Let = hV, Ei be a countably infinite graph. Then,
is k-colorable iff every finite subgraph of is k-colorable.
Proof. It is obvious that if it is k-colorable then every finite subgraph is.
Suppose that every finite subgraph is k-colorable.
Let V = {v0 , v1 , . . .}
For each n 1, let n = {v1 , . . . , vn }
Let Cn be the nonempty set of colorings : n {1, . . . , k}
Then |Cn | < k n , so Cn is finite.
Let T be the tree such that Lev0 (T ) = and Levn (T ) = Cn for n 1.
If n < m and Cn , Cm we define < iff  {v1 , . . . vn } =
Then, T is an infinite, finitely branching tree. By Konigs Lemma, there
exists an infinite branch B through T .
For each n
S 1, let n B Levn (T ).
Define = 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) 6= n (t) = (t)
Thus, is a k-coloring.
Now we will finish proving that Konigs Lemma is equivalent to the Compactness Theorem
Proof. Let {A1 , A2 , . . . , An , . . .} be the sentences in our language.
Let T be the tree such that
1. Lev0 (T ) =
2. for n 1, Levn (T ) = the partial truth assignments : {A1 , . . . , An }
{T, F } such that if only involves a subset of {A1 , . . . , An }, then
() = T
3. If , T with Levm (T ) and Levn (T ) with m < n, we set <
iff  {A1 , . . . , An } =
Clearly each level Levn (T ) is finite, so T is finitely branching.
Let n be the set of wffs which only involve A1 , . . . , An . If n if
finite, then n is satisfiable.
Hence, we can suppose n = {1 , . . . , n , . . .} is infinite.
For each ` 1, let ` = {1 , . . . , ` }
Then there exists w` : {A1 , . . . , An } {T, F } satisfying `
By the Pigeonhole Principle, there exists a fixed w such that w` > w for
infinitely many ` 1
22

S
Clearly w satisfies n = ` `
Thus, T is an infinite, finitely branching tree. By Konigs Lemma, there
exists an infinite branch B through T .
S
Let n B Levn (T ) and define = n n is a truth assignment which
satisfies .

First Order Logic

Definition 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 v1 , v2 , . . .
(d) Quantifier
(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.
Definition 4.2 (Expression). An expression is a finite sequence of symbols from
the alphabet.
Definition 4.3 (Terms). The set T of terms is defined inductively as follows
1. Each constant symbol and each variable is a term
2. If f is an n-ary function symbol and t1 , . . . , tn are terms, then f t1 , . . . , tn
is a term.
Definition 4.4 (Atomic Formula). An atomic formula is an expression of the
form P t1 , . . . , tn where P is an n-ary predicate symbol.
Remark- = is a 2-ary predicate symbol, so every language has atomic formulas.
23

Definition 4.5 (Well-Formed Formulas). The set of wffs is defined inductively


by
1. Each atomic formula is a wff
2. if , are wffs, and v is a variable, then (), ( ), v are wffs
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 6= t instead of ( = ut)
6. etc
We also use common sense in the use of parentheses.
Definition 4.6 (Free Variable). Let x be a variable and be a wff
1. if is atomic then x occurs free in iff x occurs in
2. x occurs free in () iff x occurs free in
3. x occurs free in ( ) iff x occurs free in or x occurs free in
4. x occurs free in v iff x occurs free in and x 6= v.
Definition 4.7 (Sentence). A sentence is a wff with no free variables.

4.1

Truth and Models

Definition 4.8 (A structure for a first order language). A structure A for the
first 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 = An
3. For each constant symbol c, an element cA A
4. For each n-ary function symbol, an n-ary operation f A : An 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}
RA = {h1, 2i, h2, 3i, h3, 4i, h4, 1i}
cA = 2 and
f A : A A is 1 7 2 7 3 7 4 7 1
Now, we will attempt to define what it means for a statement to be true in
a first order language.
Let L be a first order language.
For each sentence of L , and each structure A for L , we want to define
A |= as A satisfies , or is true in A
Example N = hN, +, , <, 0, 1i, clearly, N |= x(x + 1 = 1 + 1 + 1)
First, we are forced to define a more general notion.
Definition 4.9 (A |= with s). Let be any wff, A a structure for L , and
s : V A where V is the set of variables.
Then, we define A |= [s], A satisfies 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 first define an extension s : T A
as follows:
1. For each variable v, s(v) = s(v)
2. For each constant symbol c, s(c) = cA
3. If f is an n-place function symbol and t1 , . . . , tn are terms, then
s(f t1 , . . . , tn ) = f A (s(t1 ), . . . , s(tn ))
Step 2 Atomic formulas:
1. A |== t1 t2 [s] iff s(t1 ) = s(t2 )
2. If P is an n-ary predicate symbol and t1 , . . . , tn are terms, then A |=
P t1 , . . . , tn [s]
iff hs(t1 ), . . . , s(tn )i P A
Step 3 Other wffs
1. A |= ()[s] iff A 6|= [s]
2. A |= ( )[s] iff A 6|= [s] or A |= [s]
3. A |= v[s] iff for all a A, A |= [s(v|a)] where s(v, a) : V A,
s(v|a)(x) = s(x) for x 6= v and = a for x = v.
Theorem 4.1. Assume s1 , s2 : V A agree on all free variables (if any) on
the wff . Then, A |= [s1 ] iff A |= [s2 ]
25

Proof. We argue by induction on the complexity of .


Suppose is atomic.
First suppose is = t1 t2 . Then, by the homework, s1 (t1 ) = s2 (t1 ) and
s1 (t2 ) = s2 (t2 ).
Hence, A |== t1 t2 [s1 ] iff s1 (t1 ) = s1 (t2 ) iff s2 (t1 ) = s2 (t2 ) iff A |== t1 t2 [s2 ]
Next, suppose is P t1 , t2 , . . . tn
Then, s1 (ti ) = s2 (ti ) for 1 i n.
Hence, A |= P t1 , . . . , tn [s1 ] iff hs1 (t1 ), . . . , s1 (t2 )i P A iff
hs2 (t1 ), . . . , s2 (t2 )i P A iff A |= P t1 , . . . , tn [s2 ]
Next, suppose = ()
Then, A |= [s1 ] iff A 6|= [s1 ] iff A 6|= [s2 ] by the inductive hypothesis,
iff A |= ()[s2 ]
The case where = ( ) is similar.
Finally, we suppose that = x
Clearly, if a A, then s1 (x|a) and s2 (x|a) agree on all free variables of .
A |= x[s1 ] iff for all a A, A |= [s1 (x|a)] iff for all a A A |=
[s2 (x|a)] iff A |= x[s1 ].
Corollary 4.2. If is a sentence, then either A |= [s] for all s : V A or
A 6|= [s] for all s : V A.
Definition 4.10 (A |= ). Let be a sentence. Then, A |= iff A |= [s]
for all s : V A
Definition 4.11 (Satisfies). Let be a set of wffs
1. A satisfies with s iff A |= [s] for all
2. is satisfiable iff there exists a structure A for L and a function s : V
A such that A satisfies with s.
3. is finitely satisfiable iff any finite subset of is satisfiable
Theorem 4.3 (Compactness Theorem). If is finitely satisfiable, then is
satisfiable.
An Application of Compactness
Let L be the language of arithmetic mentioned before.
Let Th(N) = { : is a sentence which is true in hN, +, , <, 0, 1i}
Consider the following set of wffs: Th(N) {x > 1 + . . . + 1 : n 1}
| {z }
n

We claim that is finitely satisfiable.


Let 0 be finite.
Then, 0 = T {x > 1 + . . . + 1, . . . , x > 1 + . . . + 1} with T Th(N) is a
| {z }
|
{z
}
n1

nt

finite subset and n1 , . . . , nt 1


Let m > max{n1 , . . . , nt }. Let s : V N satisfy s(x) = m.
Then, hN, +, , <, 0, 1i satisfies 0 .

26

By compactness, is satisfiable.
Then, A satisfies Th(N) and yet s(x) = c > 1A + . . . + 1A for any number
{z
}
|
n

So, c is an infinite, or nonstandard, natural number. Furthermore, we can


assume A is countable, and so we get the structure N < Q Z.
Thus, the statements that are true about N in first order logic do not uniquely
identify N.
Definition 4.12 (Isomorphism). Let A , B be structures for the first order
language L
A function f : A B is an isomorphism iff the following conditions are
satisfied:
1. f is a bijection
2. for each n-ary predicate symbol P and a1 , . . . , an A, then ha1 , . . . , an i
P A iff hf (a1 ), . . . , f (an )i P B
3. for each constant symbol c, f (cA ) = cB
4. For each n-ary function symbol h and a1 , . . . , an A, f (hA (a1 , . . . , an )) =
hB (f (a1 ), . . . , f (an ))
Theorem 4.4. Suppose : A B is an isomorphism if is any sentence,
then A |= iff 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 wff, then A |= [s] iff 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)) = (cA ) = cB = s(c)
Suppose that t is f t1 , . . . , tn , by the inductive hypothesis, we know (s(ti )) =
s(ti ).
Thus, (s(f t1 , . . . , tn )) = (f A (s(t1 ), . . . , s(tn ))) = s(f t1 , . . . , tn ))
And now we can prove the theorem
Proof. We argue by induction on complexity of a wff .
Assume is atomic, say, P t1 , . . . , tn
A |= P t1 , . . . , tn [s] iff hs(t1 ), . . . , s(tn )i P A
27

iff h(s(t1 )), . . . , (s(tn ))i P B


iff h s(t1 ), . . . , s(tn )i P B
Next, suppose = , which is similar, as is =
Finally, suppose = v. Then, A |= v[s]
iff for all a A, A |= [s(v|a)]
iff for all a A, B |= [ s(v|a)]
iff for all a A, B |= [( s)(v|(a))]
As is surjective, for all b B, B |= [( s)(v|b)]
Definition 4.13 (Models). Let T be a set of sentences
A is a model of T iff 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
Definition 4.14 (Axiomatizable). Let C be a class of structures.
C is axiomatizable iff there exists a set of sentences T such that C = Mod(T )
If there exists a finite set of sentences T , such that = Mod(T ) then is
finitely axiomatizable.
Theorem 4.7. C is finitely axiomatizable iff C can be axiomatized by a single
sentence.
Example 4.3. The class of graphs is finitely axiomatizable
The class of infinite graphs is axiomatizable
Is the class of finite graphs axiomatizable? Is the class of infinite graphs
finitely axiomatizable?
Theorem 4.8. Let T be a set of sentences in a first order language.
If T has arbitrarily large finite models, then T has an infinite 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 finitely satisfiable
Suppose 0 is any finite subset. Then, 0 = T0 {n1 , . . . , nt }
Let m = max{n1 , . . . , nt }, then T has a finite 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 infinite model
of T .
Corollary 4.9. The class F of finite graphs is not axiomatizable.
28

Corollary 4.10. The class C of infinite graphs is not finitely axiomatizable.


Definition 4.15 (Semantically Implies). Let be a set of wffs and let be a
wff.
Then, logically/semantically implies , written |= iff for every structure A for L and every s : V A, if A satisfies with s, then A satisfies
with s.
Definition 4.16 (Valid). The wff is valid iff |=
Now we will return to the development of syntax. will denote the set of
logical axioms, defined later.
Definition 4.17 (Deduction). Let be a set of wffs and let be a wff. A
deduction of from is a finite sequence of wffs h1 , 2 , . . . , n i 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).
Definition 4.18 (Theorem). is a theorem of , written, ` iff there exists
a deduction of from .
And now we finally arrive at the two main theorems of the course.
Theorem 4.11 (The Soundness Theorem). If ` then |=
Theorem 4.12 (G
odels Completeness Theorem). If |= then ` .
Definition 4.19 (The Logical Axioms, ). is a generalization of iff for
some n 0 and variables x1 , . . . , xn we have that is x1 . . . xn . When
n = 0 we see that is a generalization of .
The logical axioms are all generalizations of all wffs of the following forms:
1. Tautologies
2. (x tx ), where tx 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 ( 0 )) where is atomic and 0 is the result of replacing
some, possibly none, of the occurrences of x with y.
Explanations. A tautology is a wff which can be obtained from a propositional
tautology by substituting wffs.
tx 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 quantifier in
tx .
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 h1 , . . . , n i be a deduction of from . Then, must follow by modus
ponens, and so there are earlier wffs 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, |=
Definition 4.20 (Inconsistent). A set of wffs is inconsistent iff there exists
a wff such that ` and ` .
Otherwise, is consistent.
Corollary 4.14. If is satisfiable, then is consistent.
Proof. Suppose that is satisfiable, 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 wffs and
.
30

By the induction hypothesis, ` x and ` x( ).


So, a deduction of x from would proceed by first 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.
Definition 4.21 (Tautologically Implies). {1 , . . . , n } tautologically implies
iff (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 wffs and ( ) by modus ponens.
By induction hypothesis, ` ( ) and ` ( ( ))
Clearly, {( ), ( ( ))} tautologically implies .
By Rule T, ` ( )
Theorem 4.18 (Contraposition). {} ` iff {} `
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 wff such that {} `
and {} `
By deduction theorem, ` ( ) and ` ( )
Clearly, {( ), ( )} tautologically implies
By rule T, `
Remark 4.2. If is inconsistant, then ` for every wff

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
ZFC6` 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 ` ycy . Furthermore, there exists a deduction of
ycy 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 language L . Let L + = L {c} where c is a new constant symol. Then remains
constant in L + .
Proof. Suppose that (*)=h1 , . . . , n i is a deduction of from . Let y be a
variable with any i . We claim that (**)=h(1 )cy , . . . , (n )cy i is a deduction of
cy from . We will check that for all i n, either (i )cy or follows by
MP. We will break into cases.
1. Suppose that i . Then i doesnt involve c, and so (i )cy = i .
2. Suppose i . Then it is easily checked that (i )cy .
3. Suppose that there exist j, k < i such that k is (j i ). Then (k )cy is
((j )cy (i )cy ). So (i )cy follows by Modus Ponens from (j )cy and (k )cy .

32

Let be the elements of which actually occur in (**). Then ` cy . As


y does not occur free in , By generalization, ` ycy .
Hence ` ycy . 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 ycy from .
Corollary 4.21. Suppose that ` xc 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(xc )cy for some variable y which doesnt
occur in xc . Since c doesnt occur in , we have that (xc )cy = xy . Thus,
` yxy .
By the exercise, teh following is a logical axiom: yxy . Thus xxy ` .
Since x doesnt occur free in yxy , generalization igves yxy ` x.
By deduction, ` (yxy x), and since ` yxy by Modus Ponens, wE
get ` x.
Theorem 4.22 (Existence of Alphabetic Variants). Let be a wff, t a term
and x a variable. Then there exists a wff 0 (which differs from only in the
quantified variables) such that
1. ` 0 and 0 `
2. t is a substitute for x in 0
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 satisfiable.
Proof. 1 2: Suppose that is consistant. Then there exists a wff such
that 6` . By completeness, 6|= . Hence there exists a structure A and a
function s : V A such that A satisfies with s, but A 6|= [s]. In particular,
A satisfies with s.
2 1: Suppose that 6` . By reductio ad absurdum, {} is consistent.
Thus, it is satisfiable, and so 6|= .
We now prove the following version of the completeness theorem:

33

Theorem 4.25 (Completeness). If is a consistent set of wffs in a countable


language L , then there exists a countable structure A for L and a function
s : V A such that A satisfies with s.
We will proceed in several lemmas.
Lemma 4.26. Expand L to a language L + by adding a countably infinite set
of new constant symbols. Then remains consistant in L + .
Proof. Suppose not. Then there exists a wff of L + such that ` ( ) in
L +.
Suppose that c1 , . . . , cn include the new constants, if any, which appear in
. By generalization on constants, there exist variables y1 , . . . , yn such that
` y1 , . . . , yn , 0 0 in L where 0 is the result of replacing each ci
with yi . Since yi is substitutable for yi in 0 , ` 0 0 in L . This is a
contradiction.
Lemma 4.27 (Add Witnesses). Let h1 , x1 i, . . . , hn , xn i enumerate all pairs
h, xi where si a wff of L + and x is a variable. Let 1 be the wff x1 1
(1 )xc11 where c1 is the first new constnat which doesnt occur in . If n > 1
then n is the wff xn n (n )xcnn where cn is the first 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 ()xc . By rule T, we have {1 , . . . , n } `
x adn {1 , . . . , n } ` xc .
Since c doesnt occur in {1 , . . . , n } {}, we have {1 , . . . , n }
x. This contradicts n+1 being the first contradiction, or the consistency of
if n = 0.
Lemma 4.28. We can extend to a consistent set of wffs such that for
every wff of L + , either or .
Proof. Let 1 , . . . , n , . . . be an enumeration of the wffs of L + . We shall define
inductively an increasing sequence 0 1 . . . of consistent sets of wffs. Let
0 = .
Suppose inductively that n has been defined. If n {n+1 } is consitent,
then let n+1 = n {n+1 }. If it is inconsistent, then by reductio ad absurdum, n ` n+1 , and so we let n+1 = n {n+1 }. Clearly = n
satisfies 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 wffs, ` 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 , x1 , . . . , xn , y1 , . . . , yn ((x1 = y1
. . . xn = yn ) P x1 . . . xn = P y1 . . . yn )
5. For each n-ary function symbol f , x1 , . . . , xn , y1 , . . . yn ((x1 = y1
. . . xn = yn ) f x1 . . . xn = f y1 . . . yn )
Similarly, since is deductively closed and xy(x = y y = x) , we
have that if t1 , t2 are terms, then (t1 = t2 t2 = t1 ) .
Lemma 4.30. We construct a structure A for our language L + as follows:
Let T be the set of terms of L + and define a binary relation E on T by t1 Et2
iff (t1 = t2 ) .
Then E is an equivalence relation.
Proof. Let t T . Then (t = t) , and so tEt for all t, so E is reflexive.
Suppose that t1 Et2 . Then (t1 = t2 ) , and so (t2 = t1 ) , so t2 Et2 , so
E is symmetric.
Transitivity is similar.
For each t T , we define [t] = {s T |tEs}, then we define A = {[t]|t T }.
For any n-ary predicate symbol, we define an n-ary relation P A on A by
h[t1 ], . . . , [tn ]i P A iff P t1 , . . . , tn .
Lemma 4.31. P A is well defined.
Proof. Suppose that [s1 ] = [t1 ], . . . , [sn ] = [tn ]. We must show that P s1 , . . . , sn
iff P t1 , . . . , tn . By hypothesis (si = ti ) for each i.
Since ((si = ti . . . sn = tn ) (P s1 , . . . , sn P t1 , . . . , tn )) , the
result follows.
For each constant symbol c, we define cA = [c], and for each n-ary function symbol f , we define an n-ary operation f A on A by f A ([t1 ], . . . , [tn ]) =
[f t1 , . . . , tn ]. As above, f A is well-defined.
Finally, we define s : V A by s(x) = [x].
Lemma 4.32. For every term t, s(t) = [t].
Proof. By definition this is true when t is a constant symbol or a variable.
Suppose that t = f t1 , . . . , tn . By induction, we assume that s(ti ) = [ti ]
for each i. Thus s(f t1 , . . . , tn ) = f A (
s(t1 ), . . . , s(tn )) = f A ([t1 ], . . . , [tn ]) =
[f t1 , . . . , tn ].
Lemma 4.33 (Substitution Lemma). If the term t is substitutable for x in ,
then A |= tx [s] iff A |= [s(x|
s(t))].

35

And our final claim:


Lemma 4.34. For each wff of L + , A |= [s] iff
Proof. We argue by deduction on the complexity of . First suppose that is
atomic. Assume that is t1 = t2 . Then A |= (t1 = t2 )[s] iff s(t1 ) = s(t2 ), iff
[t1 ] = [t2 ], iff (t1 = t2 ) .
Now suppose that is P t1 , . . . , tn . Then A |= (P t1 , . . . , tn )[s] iff h
s(t1 ), . . . , s(tn )i
P A , iff h[t1 ], . . . , [tn ]i P A iff P t1 , . . . , tn .
Next we consider the cases where is not atomic.
Suppose that is . Then A |= [s] iff A 6|= [s] iff
/ , iff A .
The case is is similar.
Finally, suppose is x. By construction, for some constant c, (x
xc ) . 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 |= cx [s], and hence by the induction hypoth/ , so (*) implies that x
/ . Thus x .
esis, cx . Thus cx
Conversely, suppose that A 6|= x[s]. Then there exists a term t T such
that A 6|= [s(x|[t])], that is, A 6|= [s(x|
s(t))].
Let 0 be an alphabetic variant of such that t is substitutable for x in 0 .
Then A 6|= 0 [s(x|
s(t))]. By the substitution lemma, A 6|= ( 0 )xt [s], and by the
induction hypothesis, ( 0 )ct . Since (x 0 ( 0 )xt ) , we must have
x 0
/ . Thus x
/ .
Finally, let A0 be the structure for L obtained by forgetting the interpretations of the new constants. Then A0 satisfies with s.
Thus, the completeness theorem holds.
Corollary 4.35. |= ` .
Theorem 4.36 (Compactness Theorem). Let be a set of wffs in a countable
first order language. If is finitely satifiable, then is satisfiable in some
countable structure.
Proof. Suppose that is finitely satisfiable. Let 0 be any finite subset,
then 0 is satisfiable. Hence, by soundness, 0 is consistent. Since every finite
subset of is consistent, is consistent. By completeness, is satisfiable in a
countable structure.
Theorem 4.37. Let T be a set of sentences in a first order language. If the
class C = M od(T ) is finitely axiomatizable, then there exists a finite subset
T0 T such that C = M od(T0 )
Proof. Suppose that C = M od(T ) is finitely axiomatizable. Then there exists
a sentence such that C = M od(), since M ot(T ) = M od(), we have T |= .
Hence by completeness, T ` . Thus, there is a finite set T0 T such that T0 `
. By soundness T0 |= . Hence, C = M od(T ) M od(T0 ) M od() = C .

36

Definition 4.22. Let A , B be structures for the first order language L . Then
A and B are elementarily equivalent, written A B iff for every sentence
L , A |= iff B |= .
Remark 4.5. A ' B implies A B, but the converse is false (eg, nonstandard arithmetic.)
Definition 4.23 (Complete Set). A consistent set of sentences is said to be
complete iff for every sentence , either T ` or T ` .
Definition 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 first 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 finite models
2. If A are countably infinite models of T , then A ' B.
Then T is complete.
Proof. Suppose that T satisfies the two conditions. Assume for contradiction
that T is not complete. Then there is a sentence such that T 6` and T 6` .
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 first property, they are countably infinite, and by the
second, A ' B, contradiction.
Corollary 4.40. TDLO is complete.
Proof. TDLO has no finite 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. hQ, <i hR, <i
Proof. Both are models of the complete theory TDLO .
The rationals are a linear order win which every conceivable finite configuration is realized. We next seek a graph theoretic analogue: the infinite random
graph.

37

Definition 4.25. For k 1, let Pk be the dfirst order sentence in the language
of graphs which says that if x1 , . . . , xk , y1 , . . . , yk are distinct vertices, there exists a vertex z such that z 6= xi , yi for all i, z is joined to xi for all i, and zis
not joined to yi for all i.
We define the theory TR to be the theory {(x)(y)(x 6= y)} {Pk |k 1}.
Theorem 4.42. TR is consistant.
Proof. By soundness, it is enough to show that it is satisfiable.
Consider the graph = hN, Ei where n is joind to m iff 2n appears in the
binary expansion of m, or vice versa.
We claim that satisfies Pk for all k 1. So let n1 , . . . , nk , m1 , . . . , mk
be distinct natural numbers. Let ` max{m1 , . . . , mk , n1 , . . . , nk }. Then z =
2n1 + . . . + 2nk + 2` is joined to all of n1 , . . . , nk , and none of the m1 , . . . , mk .
Question: Why is TR called the theory of the random graph?
Answer: Consider a graph = hN, E i defined as follows. For each pair
n 6= m, we toss a coin. If heads, we join, if tails we dont.
Proposition 4.43. is a model of TR with probability 1.
Proof. Suppose that x1 , . . . , xk , y1 , . . . , yk N are distinct. Fix some z
/F =
{x1 , . . . , xk , y1 , . . . , yk }. Then the probability that z works is 22k , and so the
probability that z doesnt work is 1 22k . Let N \ F = {z1 , . . . , zn , . . .}.
Then the probability that none of the z1 , . . . , zn works is (1 22k )n , and
limn (1 22k )n = 0, and so with probability 1, one of them will work.
Question: Why is TR claled the theory of THE random graph?
Theorem 4.44. If G, H are countably infinite models of TR , then G ' H.
Proof. By the back and forth argument.
Theorem 4.45. TR is complete.
Proof. L-V.
And now for something (apparently) completely different.
Well study the basics of finite random graph theory.
Definition 4.26. Gn is the set of all graphs with vertex set {1, . . . , n}.
Remark 4.6. Each G Gn is uniquely deterined by the edge set E P(T )
n
where T = {{k, `}|1 k < ` n}. Hence |Gn | = 2|T | = 2( 2 ) = 2n(n1)/2 .
Definition 4.27. If is any sentence in the language of graph theory, then
Probn () = |{GG|Gnn:G|=}|
|
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 limn Probn () = 1 or limn Probn () = 0.
We will first prove the following special case:
Theorem 4.47. For each k 1, limn Probn (Pk ) = 1.
Proof. Let n 2k + 1. Suppose that G Gn and G 6|= Pk . Then there exists
X = {x1 , . . . , xk , y1 , . . . , yk } such that no z in {1, . . . , n} \ X is joined to pre
2k n2k
cisely the first k. For fixed X, probability of this event is 1 21
.
So summing over all possible 2k subsets of X, we see that Probn (Pk ) =

 n2k
n
1 2k
1

. This is a polynomial times an exponential, and so Probn (Pk )


2k
2
0, so Probn (Pk ) 1 as n .
Now we prove the Zero-One Law.
Proof. The axioms of TR are true with probability 1. As TR is complete by L-V,
either TR ` or TR ` .
Assume that TR ` . Then there exists k1 < . . . < ks such that =
(x)(y)(x 6= y), Pk1 , . . . , Pks } ` , and hence |= .
Let be the sentence which says that there are at least 2ks + 1 elements.
Then clearly {, Pks } |= . Hence, if n 2ks +1 then Probn (PkS ) Probn ()
limn Probn (Pks ) = 1, and so 1 Prob() 1.
The other case is similar.
Open Problem: Let T be a complete theory in a countable first order language. 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 c1 , . . . , cn , . . . , n N+ . And let T be the theory
which says < is a DLO without end points adn cn < cn+1 for n N+ . Clearly,
T is consistent.
Pn
Three models are hQ, <, ni, hQ, <, 1 2n i and hQ, <, k=1 k12 i.
A
These are the only models, as if A = hQ, <, cA
n i, then limn cn = ,
A
A
limn cn Q or limn cn
/ Q, and each corresponds to
Let Ln be the language consisting of <, c1 , . . . , cn . Let Tn be a theory such
that < is a DLO and c1 < . . . < cn . Clearly L = Ln , and T = Tn . Note
that Tn has no finite 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 Ln , and hence Tn ` or Tn ` , 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