0% found this document useful (0 votes)
107 views

2006 Spring Notes

This document provides an introduction and overview of set theory concepts that will be covered in a math class. It begins with some introductory remarks about using logic and sets as foundations of mathematics. It then covers basic set theory topics like subsets, unions, intersections, differences and functions defined as sets of ordered pairs. It introduces the concepts of injections, surjections and bijections as ways to describe functions, and defines when two sets have the same cardinality or are equinumerous.

Uploaded by

Raekpacman
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views

2006 Spring Notes

This document provides an introduction and overview of set theory concepts that will be covered in a math class. It begins with some introductory remarks about using logic and sets as foundations of mathematics. It then covers basic set theory topics like subsets, unions, intersections, differences and functions defined as sets of ordered pairs. It introduces the concepts of injections, surjections and bijections as ways to describe functions, and defines when two sets have the same cardinality or are equinumerous.

Uploaded by

Raekpacman
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Math 461 Introduction. Set theory.

Class notes written by Simon Thomas These notes are transcribed from class notes
written by Professor Simon Thomas. The notes follow the notation of Endertons A
mathematical introduction to logic but may be read independently.
1 A few introductory remarks
In mathematical reasoning, logical arguments are used to deduce the consequences
(called theorems) of basic assumptions (called axioms).
Question 1.1. What does it mean for one sentence to follow logically from another
sentence?
Question 1.2. Suppose that a sentence does not follow logically from the set T of
axioms. How can we prove that this is so?
We will begin the course by studying some basic set theory.
Motivation:
1. We will need this material in our study of mathematical logic.
2. Set theory is a foundation for all of mathematics.
3. Set theory is beautiful.
Remark 1.3. In a couple of weeks we will come across a natural set-theoretic statement,
the Continuum Hypothesis, which can neither be proved nor disproved using the classical
axioms of set theory.
2 Basic Set Theory
Notation: 2, 3, 5 = 2, 5, 5, 2, 3.
0, 2, 4, 6, . . . = x [ x is an even natural number.
x A means x is an element of A.
is the empty set.
N = 0, 1, 2, 3, . . . is the set of natural numbers.
Z = . . . , 2, 1, 0, 1, 2, . . . is the set of integers.
Q = a/b [ a, b Z, b ,= 0 is the set of rational numbers.
R is the set of real numbers.
Axiom of Extensionality: Suppose that A, B are sets. If for all x,
x A i x B
then A = B.
2006/01/18 1
Math 461 Introduction. Set theory.
Denition 2.1. Suppose that A, B are sets. Then A is a subset of B, written A B,
i for all x,
i x A then x B.
Example 2.2.
1. N Z
2. If A is any set then A.
Proposition 2.3. If A B and B A, then A = B.
Proof. Let x be arbitrary. Since A B, if x A then x B. Since B A, if x B
then x A. Hence x A i x B. By the Axion of Extensionality, A = B.
Denition 2.4. Let A, B be sets. The union of A and B, written A B, is the set
dened by
x A B i x A or x B.
Proposition 2.5. A (B C) = (A B) C
Proof. Let x be arbitrary. Then 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 2.6. Let A, B be sets. The intersection of A and B, written A B is the
set dened by
x A B i x A and x B.
Exercise 2.7. Prove that A (B C) = (A B) C.
Proposition 2.8. 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).
Exercise 2.9. A (B C) = (A B) (A C)
2006/01/18 2
Math 461 Functions. Equinumerosity. Statement of Cantor-Bernstein.
Denition 2.10. Let A, B be sets. The set theoretic dierence of A and B, written
AB, is the set dened by
x AB i x A and x / B.
1, 2, 33, 4, 5 = 1, 2.
NZ = .
ZN = 1, 2, 3, . . ..
Proposition 2.11. A(B C) = (AB) (AC)
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 / C)
i x A and x / B and x / C
i x A and x / B and x A and x / C
i (x A and x / B) and (x A and x / C)
i x AB and x AC
i x (AB) (AC).
Exercise 2.12. Prove that A(B C) = (AB) (AC).
3 Functions
Provisional Denition:
Let A, B be sets. Then f is a function from A to B, written f : A B, i f assigns
a unique element f(a) B to each a A.
What is the meaning of assigns? To illustrate our earlier comments on set theory
as a foundation for mathematics, we shall reduce the notion of a function to the language
of basic set theory.
Basic idea
For example, consider f : R R dened by f(x) = x
2
. Then the graph of f is a
subset of R
2
. We shall identify f with its graph.
To generalize this idea to arbitrary functions, we rst need to introduce the idea of
an ordered pair; ie a mathematical object a, b) such that
a, b) = c, d) i a = c and b = d. ()
Denition 3.1. Let A and B be sets. Then the Cartesian product of A and B is the
set
AB = a, b) [ a A, b B.
2006/01/23 3
Math 461 Functions. Equinumerosity. Statement of Cantor-Bernstein.
Denition 3.2. f is a function from A to B i the following conditions hold:
1. f AB
2. For each a A, there is a unique b B such that a, b) f.
In this case, the unique such b is said to be the value of f at a and we write f(a) = b.
In order to reduce the notion of a function to basic set theory, we now only need to
nd a purely set theoretic object to play the role of x, y).
Denition 3.3. x, y) = x, x, y.
Finally, we must prove that with this denition, the set x, y) satises ().
Theorem 3.4. a, b) = c, d) i a = c and b = d.
Proof. (): Clearly if a = c and b = d then a, b) = c, d).
(): Conversely, suppose that a, b) = c, d); ie
a, a, b = c, c, d.
We split our analysis into three cases.
Case 1
Suppose that a = b. Then a, a, b equals
= a, a, a
= a, a
= a
Since
c, c, d = a
it follows that
c = c, d = a.
This implies that c = d = a. Hence a = c and b = d.
Case 2
Similarly, if c = d, we obtain that a = c and b = d.
Case 3
Finally suppose that a ,= b and c ,= d. Since
a, a, b = c, c, d
we must have that a = c or a = c, d. Since c ,= d the second option is
impossible. Hence a = c and so a = c.
Also a, b = c or a, b = c, d. Clearly the rst option is impossible and so
a, b = c, d. Since a = c, we must have b = d.
2006/01/23 4
Math 461 Functions. Equinumerosity. Statement of Cantor-Bernstein.
Important remark When working with functions, it is almost never necessary to
remember that a function is literally a set of ordered pair as above.
Denition 3.5. The function f : A B is an injection (one-to-one) i
a ,= a

implies f(a) ,= f(a

).
Denition 3.6. The function f : A B is a surjection (onto) i for all b B, there
exists an a A such that f(a) = b.
Denition 3.7. If f : A B and g : B C are functions, then their composition is
the function g f : A C dened by (g f)(a) = g(f(a)).
Proposition 3.8. 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, there exists a b B such that
g(b) = c. Since f is surjective, there exists a A such that f(a) = b. Hence (g f)(a) =
= g(f(a))
= g(b)
= c
Thus g f is surjective.
Exercise 3.9. If f : A B and g : B C are injections then g f : A C is also an
injection.
Denition 3.10. The function f : A B is a bijection i f is both an injection and a
surjection.
Denition 3.11. If f : A B is a bijection, then the inverse f
1
: B A is the
function dened by
f
1
(b) equals the unique a A such that f(a) = b.
Remark 3.12. 1. It is easily checked that f
1
: B A is also a bijection.
2. In terms of ordered pairs:
f
1
= b, a) [ a, b) f.
4 Equinumerosity
Denition 4.1. Two sets A and B are equinumerous, written A B, i there exists a
bijection f : A B.
Example 4.2. Let E = 0, 2, 4, . . . be the set of even natural numbers. Then N E.
2006/01/23 5
Math 461 Functions. Equinumerosity. Statement of Cantor-Bernstein.
Proof. We can dene a bijection f : N E by f(n) = 2n.
Important remark It is often extremely hard to explicitly dene a bijection f : N A.
But suppose such a bijection exists. Then letting a
n
= f(n), we obtain a list of the
elements of A
a
0
, a
1
, a
2
, . . . , a
n
, . . .
in which each element of A appears exactly once. Conversely, if such a list exists, then
we can dene a bijection f : N A by f(n) = a
n
.
Example 4.3. N Z
Proof. We can list the elements of Z by
0, 1, 1, 2, 1, . . . , n, n, . . .
Theorem 4.4. N Q
Proof. Step 1 First we prove that N Q
+
, the set of positive rational numbers. Form
an innite matrix where the (i, j)
th
entry is j/i.
Proceed through the matrix by traversing, alternating between upward and down-
ward, along lines of slope one. At the (i, j)
th
entry add the number j/i to the list if it
has not already appeared.
Step 2 We have shown that there exists a bijection f : N Q
+
. Hence we can list the
elements of Q by
0, f(0), f(0), f(1), f(1), . . .
Denition 4.5. If A is any set, then its powerset is dened to be
T(A) = B [ B A.
Example 4.6.
1. T(1, 2) = , 1, 2, 1, 2.
2. T(1, 2, . . . n, ) has size 2
n
.
Theorem 4.7. (Cantor) N T(N)
Proof. (The diagonal argument) We must show that there does not exist a bijection
f : N T(N). So let f : N T(N) be any function. We shall show that f isnt a
surjection. To accomplish this we shall dene a subset S N such that f(n) ,= S for all
n N. We do this via a time and motion study. For each n N, we must perform:
1. the n
th
decision: is n S?
2006/01/23 6
Math 461 Functions. Equinumerosity. Statement of Cantor-Bernstein.
2. the n
th
task: we must ensure that f(n) ,= S.
We decide to accomplish the n
th
task with the n
th
decision. So we decide that
n S i n / f(n)
Clearly S and f(n) dier on whether they contain n and so f(n) ,= S. Hence f is not a
surjection.
Discussion Why is this called the diagonal argument?
Denition 4.8. A set A is countable i A is nite or N A. Otherwise A is uncountable.
eg Q is countable
T(N) is uncounable.
Theorem 4.9. (Cantor) If A is any set, then A T(A).
Proof. Supose that f : A T(A) is any function. We shall show that f isnt a surjec-
tion. Dene S A by
a S i a / f(a).
Then S and f(a) dier on whether they contain a. Thus f(a) ,= S for all a A.
Denition 4.10. Let A, B be sets.
1. A _ B i there exists an injection f : A B.
2. A B i A _ B and A B.
Corollary 4.11. If A is any set, then A T(A).
Proof. Dene f : A T(A) by f(a) = a. Clearly f is an injection and so A _ T(A).
Since A T(A), we have A T(A).
Corollary 4.12. N T(N) T(T(N)) . . .
Having seen that we have a nontrivial subject, we now try to develop some general
theory.
5 Cantor-Bernstein Theorem
Theorem 5.1. Let A, B, C be sets.
1. A A
2. If A B, then B A.
2006/01/23 7
Math 461 Cantor-Bernstein
3. If A B and B C, then A C.
Exercise 5.2. If A _ B and B _ C, then A _ C.
Theorem 5.3. (Cantor-Bernstein) If A _ B and B _ A, then A B.
Proof delayed
Theorem 5.4. If A, B are any sets, then either A _ B or B _ A.
Proof omitted
This theorem is equivalent to:
Axiom of Choice If T is a family of nonempty sets then there exists a function f such
that f(A) A for all A T. (Such a function is called a choice function.)
6 The Cantor-Bernstein Theorem (continued)
Some applications of the Cantor-Bernstein theorem
Theorem 6.1. N Q.
Proof. First dene a function f : N Q by f(n) = n. Clearly f is an injection and so
N _ Q.
Now dene a function g : Q N as follows. First suppose that 0 ,= q Q. Then we
can uniquely express
q =
a
b
where = 1 and a, b N are positive and relatively prime. Then we dene
g(q) = 2
+1
3
a
5
b
.
Finally dene g(0) = 7. Clearly g is an injection and so Q _ N.
By Cantor-Bernstein, N Q.
Theorem 6.2. R T(N).
We shall make use of the following result.
Lemma 6.3. (0, 1) R.
Proof of Lemma 6.3. By Calc I, we can dene a bijection f : (0, 1) R by f(x) =
tan(x /2).
2006/01/30 8
Math 461 Cantor-Bernstein
Proof of Theorem 6.2. By the lemma, it is enough to show that (0, 1) T(N). We shall
make use of the fact that eact r (0, 1) has a unique decimal expansion
r = 0.r
1
r
2
r
3
. . . r
n
. . .
so that
1. 0 r
n
9
2. the expansion does not terminate with innitely many 9s. (This is to avoid two
expansions such as 0.5000 . . . = 0.4999 . . .)
First we dene f : (0, 1) T(N) as follows. If
r = 0.r
0
r
1
r
2
. . . r
n
. . .
then
f(r) = 2
r
0
+1
, 3
r
1
+1
, . . . , p
rn+1
n
, . . .
where p
n
is the n
th
prime. Clearly f is an injection and so (0, 1) _ T(N).
Next we dene a function g : T(N) (0, 1) as follows: If ,= S N then
g(S) = 0.s
0
s
1
s
2
. . . s
n
. . .
where
s
n
= 0 if n S
s
n
= 1 if n / S.
Finally, g() = 0.5. Clearly g is an injection and so T(N) _ (0, 1).
By Cantor-Bernstein, (0, 1) T(N).
The following result says that N has the smallest innite size.
Theorem 6.4. If S N, then either S is nite or N S.
Proof. Suppose that S is innite. Let
s
0
, s
1
, s
2
, . . . , s
n
, . . .
be the increasing enumeration of the elements of S. This list witnesses that N S.
The Continuum Hypothesis (CH) If S R, then either S is countable or R S.
Theorem 6.5. (Godel 1930s, Cohen 1960s) If the axioms of set theory are consistent,
then CH can neither be proved nor disproved from these axioms.
Denition 6.6. Fin(N) is the set of all nite subsets of N.
Theorem 6.7. N Fin(N).
Proof. First dene f : N Fin(N) by f(n) = n. Clearly f is an injection and so
N _ Fin(N). Now dene g : Fin(N) N as follows. If s = s
0
, s
1
, s
2
, . . . , s
n
where
s
0
< s
1
< . . . < s
n
, then
g(S) = 2
s
0
+1
3
s
1
+1
. . . p
sn+1
n
where p
i
is the i
th
prime. Also we dene g() = 1. Clearly g is an injection and so
Fin(N) _ N.
By Cantor-Bernstein, N Fin(N).
2006/01/30 9
Math 461 Cantor-Bernstein
Exercise 6.8. If a < b are reals, then (a, b) (0, 1).
Exercise 6.9. If a < b are reals, then [a, b] (0, 1).
Exercise 6.10. N NN.
Exercise 6.11. If A B and C D, then AC BD.
Denition 6.12. If A and B are sets, then
B
A
= f [ f : A B.
Theorem 6.13. T(N) N
N
.
Proof. For each S N we dene the corresponding characteristic function
S
: N
0, 1 by

S
(n) = 1 if n S

S
(n) = 0 if n / S
Let f : T(N) N
N
be the function dened by f(S) =
S
. Clearly f is an injection and
so T(N) _ N
N
.
Now we dene a function g : N
N
T(N) by
g() = 2
(0)+1
, 3
(1)+1
, . . . , p
(n)+1
n
, . . .
where p
n
is the n
th
prime. Clearly g is an injection. Hence N
N
_ T(N).
By Cantor-Bernstein, T(N) N
N
.
Heuristic Principle Let S be an innite set.
1. If each s S is determined by a nite amount of data, then S is countable.
2. If each s S is determined by innitely many independent pieces of data, then S
is uncountable.
Denition 6.14. A function f : N N is eventually constant i there exists a, b N
such that
f(n) = b for all n a.
EC(N) = f N
N
[ f is eventually constant .
Theorem 6.15. N EC(N).
Proof. For each n N, let c
n
: N N be the function dened by
c
n
(t) = n for all t N.
Then we can dene an injection f : N EC(N) by f(n) = c
n
. Hence N _ EC(N).
Next we dene a function g : EC(N) N as follows. Let EC(N). Let a, b N
be chosen so that:
1. (n) = b for all n a
2006/01/30 10
Math 461 Cantor-Bernstein
2. a is the least such integer.
Then
g() = 2
(0)+1
3
(1)+1
. . . p
(a)+1
a
where p
i
is the i
th
prime. Clearly g is an injection. Thus EC(N) _ N.
By Cantor-Bernstein, N EC(N).
7 The proof of Cantor-Berstein
Next we turn to the proof of the Cantor-Bernstein Theorem. We shall make use of the
following result.
Denition 7.1. If f : A B and C A, then
f[C] = f(c) [ c C.
Lemma 7.2. If f : A B is an injection and C A, then
f[AC] = f[A]f[C].
Proof. Suppose that x f[AC]. Then there exists a AC such that f(a) = x. In
particular x f[A]. Suppose that x f[C]. Then there exists c C such that f(c) = x.
But a ,= c and so this contradicts the fact that f is an injection. Hence x / f[C] and so
x f[A]f[C].
Conversely suppose that x f[A]f[C]. Since x f[A], there exists a A such
that f(a) = x. Since x / f[C], it follows that a / C. Thus a AC and x = f(a)
f[AC].
Theorem 7.3. (Cantor-Bernstein) If A _ B and B _ A, then A B.
Proof. Since A _ B and B _ A, there exists injections f : A B and g : B A. Let
C = g[B] = g(b) [ b B.
Claim 7.4. B C.
Proof of Claim 7.4. The map b g(b) is a bijection from B to C.
Thus it is enough to prove that A C. For then, A C and C B, which implies
that A B.
Let h = g f : A C. Then h is an injection.
Dene by induction on n 0.
A
0
= A C
0
= C
A
n+1
= h[A
n
] C
n+1
= h[C
n
]
Dene k: A C by k(x) =
= h(x) if x A
n
C
n
for some n
= x otherwise
2006/01/30 11
Math 461 Cantor-Bernstein
Claim 7.5. k is an injection.
Proof of Claim 7.5. Suppose that x ,= x

are distinct elements of A. We consider three


cases.
Case 1:
Suppose that x A
n
C
n
and x

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

= h(x) = k(x).
Case 2:
Suppose that x / A
n
C
n
for all n and that x

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

= k(x).
Case 3:
Suppose that x A
n
C
n
and x

/ A
m
C
m
for all m. Then
k(x) = h(x) h[A
n
C
n
]
and
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 7.6. k is a surjection.
Proof of Claim 7.6. Let x C. There are two cases to consider.
Case 1:
Suppose that x / A
n
C
n
for all n. Then k(x) = x.
Case 2:
Suppose that x A
n
C
n
. Since x C, we must have that n = m + 1 for some m.
Since
h[A
m
C
m
] = A
n
C
n
,
there exists y A
m
C
m
such that k(y) = h(y) = x.
This completes the proof of the Cantor-Bernstein Theorem.
Theorem 7.7. R RR
Proof. Since (0, 1) R, it follows that (0, 1)(0, 1) RR. Hence it is enough to prove
that (0, 1) (0, 1)(0, 1).
First dene f : (0, 1) (0, 1)(0, 1) by f(r) = r, r). Clearly f is an injection and
so (0, 1) _ (0, 1)(0, 1).
Next dene g : (0, 1)(0, 1) (0, 1) as follows. Suppose that r, s (0, 1) have
decimal expansions
r = 0.r
0
r
1
. . . r
n
. . .
2006/01/30 12
Math 461 Relations and Orders
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
. . .
Clearly g is an injection and so (0, 1)(0, 1) _ (0, 1).
By Cantor-Bernstein, (0, 1) (0, 1)(0, 1).
Exercise 7.8. RN R
Exercise 7.9. RQ R
Exercise 7.10. Let Sym(N) = f [ f : N N is a bijection . Prove that T(N)
Sym(N).
Denition 7.11. Let A be any set. Then a nite sequence of elements of A is an object
a
0
, a
1
, . . . , a
n
), n 0
so that each a
i
A, chosen so that
a
0
, a
1
, . . . , a
n
) = b
0
, b
1
, . . . , b
n
)
i n = m and a
i
= b
i
for 0 i n.
FinSeq(A) is the set of all nite sequences of elements of A.
Theorem 7.12. If A is a nonempty countable set, then N FinSeq(A).
Proof. First we prove that N _ FinSeq(A). Fix some a A. Then we dene f : N
FinSeq(A) by
f(n) = a, a, a, a, a, . . . , a

n + 1 times
).
Clearly f is an injection and so N _ FinSeq(A).
Next we prove that FinSeq(A) _ N. Since A is countable, there exists an injection
e: A N. Dene g : FinSeq(A) N by
g(a
0
, a
1
, . . . , a
n
)) = 2
e(a
0
)+1
. . . p
e(an)+1
n
where p
i
is the n
th
prime. Clearly g is an injection. Hence FinSeq(A) _ N.
By Cantor-Bernstein, N FinSeq(A).
8 Binary relations
Denition 8.1. A binary relation on a set A is a subset R AA. We usually write
aRb instead of writing a, b) R.
Example 8.2. 1. The order relation on N is given by
n, m) [ n, m N, n < m.
2006/02/06 13
Math 461 Relations and Orders
2. The division relation D on N0 is given by
D = n, m) [ n, m N, n divides m.
Observation Thus T(NN) is the collection of all binary relations on N. Clearly
T(NN) T(N) and so T(NN) is uncountable.
Denition 8.3. Let R be a binary relation on A.
1. R is reexive i xRx for all x A.
2. R is symmetric i xRy implies yRx for all x, y A.
3. R is transitive i xRy and yRz implies xRz for all x, y, z A.
R is an equivalence relation i R is reexive, symmetric, and transitive.
Example 8.4. Dene the relation R on Z by
aRb i 3[a b.
Proposition 8.5. R is an equivalence relation.
Exercise 8.6. Let A = a, b) [ a, b Z, b ,= 0. Dene the relation S on A by
a, b)Sc, d) i ad bc = 0.
Prove that S is an equivalence relation.
Denition 8.7. Let R be an equivalence relation on A. For each x A, the equivalence
class of x is
[x] = y A [ xRy.
Example 8.4 Cont. The distinct equivalence classes are
[0] = . . . , 6, 3, 0, 3, 6, . . .
[1] = . . . , 5, 2, 1, 4, 7, . . .
[2] = . . . , 4, 1, 2, 5, 8, . . .
Denition 8.8. Let A be a nonempty set. Then B
i
[ i I is a partition of A i the
following conditions hold:
1. ,= B
i
for all i I.
2. If i ,= j I, then B
i
B
j
= .
3. A =

iI
B
i
.
2006/02/06 14
Math 461 Relations and Orders
Theorem 8.9. Let R be an equivalence relation on A.
1. If a A then a [a].
2. If a, b A and [a] [b] ,= , then [a] = [b].
Hence the set of distinct equivalence classes forms a partition of A.
Proof. 1. Let a A. Since R is reexive, aRa and so a [a].
2. Suppose that c [a] [b]. Then aRc and bRc. Since R is symmetric, cRb. Since R
is transitive, aRb. We claim that [b] [a]. To see this, suppose that d [b]. Then
bRd. Since aRb and bRd, it follows that aRd. Thus d [a]. Similarly, [a] [b]
and so [a] = [b].
Theorem 8.10. Let B
i
[ i I be a partition of A. Dene a binary relation R on A
by
a Rb i there exists i I such that a, b B
i
.
Then R is an equivalence relation whose equivalence classes are precisely B
i
[i I.
Example 8.11. How many equivalence relations can be dened on A = 1, 2, 3?
Soln This is the same as asking how many partitions of A exist.
1, 2, 3,
1, 2, 3, 1, 3, 2, 2, 3, 1,
1, 2, 3
Hence there are 5 equivalence relations on 1, 2, 3.
Exercise 8.12. How many equivalence relations can be dened on A = 1, 2, 3, 4?
Challenge Let EQ(N) be the collection of equivalence relations on N. Prove that
EQ(N) T(N).
9 Linear orders
Denition 9.1. Let R be a binary relation on A.
1. R is irreexive i a, a) / R for all a A.
2. R satises the trichotomy property i for all a, b A, exactly one of the following
holds:
a Rb, a = b, b Ra.
2006/02/06 15
Math 461 Relations and Orders
A, R) is a linear order i R is irreexive, transitive, and satises the trichotomy prop-
erty.
Example 9.2. Each of the following are linear orders.
1. N, <)
2. N, >)
3. Z, <)
4. Q, <)
5. R, <)
Denition 9.3. Let R be a binary relation on A. Then A, R) is a partial order i R
is irreexive and transitive.
Example 9.4. Each of the follow are partial orders, but not linear orders.
1. Let A be any nonempty set containing at least two elements. Then T(A), ) is
a partial order.
2. Let D be the strict divisability relation on N
+
= N0. Then N
+
, D) is a partial
order.
Denition 9.5. Let A, <) and B, <) be partial orders. A map f : A B is an
isomorphism i the following conditions are satised.
1. f is a bijection
2. For all x, y A, x < y i f(x) < f(y).
In this case, we say that A, <) and B, <) are isomorphic and write A, <)

=B, <).
Example 9.6. Z, <)

=Z, >)
Proof. Let f : Z Z be the map dened by f(x) = x. Clearly f is a bijection. Also,
if x, y Z, then x < y
i x > y
i f(x) > f(y).
Thus f is an isomorphism.
Example 9.7. N, <),

= Z, <).
Proof. Suppose that f : N Z is an isomorphism. Let f(0) = z. Since f is a bijection,
there exists n N such that f(n) = z 1. But then n > 0 and f(n) < f(0), which is a
contradiction.
2006/02/06 16
Math 461 Relations and Orders
Exercise 9.8. Prove that Z, <),

= Q, <).
Example 9.9. Q, <),

= R, <).
Proof. Since Q is countable and R is uncountable, there does not exist a bijection
f : Q R. Hence there does not exist an isomorphism f : Q R.
Example 9.10. R, <),

= R0, <).
Proof. Suppose that f : R0 R is an isomorphism. For each n 1, let r
n
= f(1/n).
Then
r
1
> r
2
> . . . > r
n
> . . . > f(1).
Let s be the greatest lower bound of r
n
[ n 1. Then there exists t R0
such that f(t) = s. Clearly t < 0. Hence f(t/2) > s. But then there exists n 1
such that r
n
< f(t/2). But this means that t/2 < 1/n and f(t/2) > f(1/n), which is a
contradiction.
Question 9.11. Is Q, <)

=Q0, <)?
Denition 9.12. For each prime p,
Z[1/p] = a/p
n
[ a Z, n N.
Question 9.13. Is Z[1/2], <)

=Z[1/3], <)?
Denition 9.14. A linear order D, <) is a dense linear order without endpoints or
DLO i the following conditions hold.
1. For all a, b D, if a < b, then there exists c D such that a < c < b.
2. For all a D, there exists b D such that a < b.
3. For all a D, there exists b D such that b < a.
Example 9.15. The following are DLOs.
1. Q, <)
2. R, <)
3. Q0, <)
4. R0, <)
Theorem 9.16. For each prime p, Z[1/p], <) is a DLO.
2006/02/06 17
Math 461 Relations and Orders
Proof. Clearly Z[1/p], <) linear order without endpoints. Hence it is enough to show
that Z[1/p] is dense. Suppose that a, b Z[1/p]. Then there exists c, d Z and n N
such that a = c/p
n
and b = d/p
n
. Clearly a < a + (1/p
n
) b. Consider
r =
c
p
n
+
1
p
n
=
cp + 1
p
n+1
Z[1/p].
Then a < r < b.
Theorem 9.17. If A, <) and B, <) are countable DLOs then A, <)

=B, <).
Corollary 9.18. Q, <)

=Q0, <).
Corollary 9.19. Z[1/2], <)

=Z[1/3], <).
Corollary 9.20. If p is any prime, then Z[1/p], <)

=Q, <).
Proof of Theorem 9.17. Let A = a
n
[ n N and B = b
n
[ n N. First dene
A
0
= a
0
and B
0
= b
0
and let f
0
: A
0
B
0
be the map dened by f
0
(a
0
) = b
0
.
Now suppose inductively that we have dened a function f
n
: A
n
B
n
such that
the following conditions are satised.
1. a
0
, . . . , a
n
A
n
A.
2. b
0
, . . . , b
n
B
n
B.
3. f
n
: A
n
B
n
is an order preserving bijection.
We now extend f
n
to a suitable function f
n+1
.
Step 1 If a
n+1
A
n
, then let A

n
= A
n
, B

n
= B
n
, and f

n
= f
n
. Otherwise, suppose for
example that
c
0
< c
1
< . . . < c
i
< a
n+1
< c
i+1
< . . . < c
m
where A
n
= c
0
, . . . , c
m
. Choose some element b B such that f
n
(c
i
) < b < f
n
(c
i+1
)
and dene
A

n
= A
n
a
n+1

n
= B
n
b
f

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

n
, then let A
n+1
= A

n
, B
n+1
= B

n
, and f
n+1
= f

n
. Otherwise,
suppose for example that
d
0
< d
1
< . . . < d
j
< b
n+1
< d
j+1
< . . . < d
t
2006/02/06 18
Math 461 Propositional logic
where B

n
= d
0
, . . . , d
t
. Choose some element a A such that (f

n
)
1
(d
j
) < a <
(f

n
)
1
(d
j+1
) and dene
A
n+1
= A

n
a
B
n+1
= B

n
b
n+1

f
n+1
= f

n
a, b
n+1
).
Finally, let f =

n0
f
n
. Then f : A B is an isomorphism.
10 Extensions
Denition 10.1. Suppose that R, S are binary relations on A. Then S extends R i
R R.
Example 10.2. Consider the binary relations R, S on N dened by
R = n, m) [ n < m
S = n, m) [ n m
Then S extends R.
Example 10.3. Consider the partial order on a, b, c, d, e which is
d, b), d, a), d, e), d, c), a, b), e, b), c, b).
Then we can extend to the linear order < dened by the transitive closure of
d < e < c < a < b.
Exercise 10.4. If A, ) is a nite partial order, then we can extend to a linear
ordering < of A.
Question 10.5. Does the analogous result hold if A, ) is a innite partial order?
Denition 10.6. If A is a set and n 1, then
A
n
= a
1
, . . . , a
n
) [ a
1
, . . . , a
n
A.
An n-ary relation on A is a subset R A
n
.
An n-ary operation on A is a function f : A
n
A.
11 Propositional logic
The study of how the truth value of compound statements depends on those of simple
statements.
A reminder of truth-tables.
2006/02/13 19
Math 461 Propositional logic
and
A B A B
T T T
T F F
F T F
F F F
or
A B A B
T T T
T F T
F T T
F F F
not
A A
T F
F T
material implication
A B A B
T T T
T F F
F T T
F F T
i
A B A B
T T T
T F F
F T F
F F T
Now our study actually begins... First we introduce our formal language.
Denition 11.1. The alphabet consists of the following symbols:
1. the sentence connectives
, , , ,
2. the punctuation symbols
(, )
3. the sentence symbols
A
1
, A
2
, . . . , A
n
, . . . , n 1
2006/02/13 20
Math 461 Propositional logic
Remark 11.2. Clearly the alphabet is countable.
Denition 11.3. An expression is a nite sequence of symbols from the alphabet.
Example 11.4. The following are expressions:
(A
1
A
2
), (( ())A
3
Remark 11.5. Clearly the set of expressions is countable.
Denition 11.6. The set of well-formed formulas (ws) is dened recursively as follows:
1. Every sentence symbol A
n
is a w.
2. If and are ws, then so are
(), ( ), ( ), ( ), ( )
3. No expression is a w unless it is compelled to be so by repeated applications of
(1) and (2).
Remark 11.7.
1. From now on we omit clause (3) in any further recursive denitions.
2. Clearly the set of ws is countably innite.
3. Because the denition of a w is recursive, most of the properties of ws are proved
by induction on the length of a w.
Example 11.8.
1. (A
1
(A
2
)) is a w.
2. ((A
1
A
2
) is not a w. How can we prove this?
Proposition 11.9. If is a w, then has the same number of left and right paren-
theses.
Proof. We argue by induction on the length n 1 of the w . First suppose that
n = 1. Then must be a sentence symbol, say A
n
. Clearly the result holds in this case.
Now suppose that n > 1 and that the result holds for all ws of length less than n.
Then must have one of the following forms:
(), ( ), ( ), ( ), ( )
for some ws , of length less than n. By induction hypothesis the result holds for
both and . Hence the result also holds for .
2006/02/13 21
Math 461 Propositional logic
Denition 11.10. L is the set of sentence symbols.

L is the set of ws. T, F is the
set of truth values.
Denition 11.11. A truth assignment is a function : L T, F.
Denition 11.12. Let be a truth assignment. Then we dene the extension :

L
T, F recursively as follows.
0. If A
n
L then (A
n
) = (A
n
).
For any ,

L
1. (()) =
= T if () = F
= F otherwise
2. (( )) =
= T if () = () = T
= F otherwise
3. (( )) =
= F if () = () = F
= T otherwise
4. (( )) =
= F if () = T and () = F
= T otherwise
5. (( )) =
= T if () = ()
= F otherwise
Possible problem. Suppose there exists a w such that has both the forms ( )
and ( ) for some ws , , , . Then there will be two (possibly conicting) clauses
which dene ().
Fortunately no such exists...
Theorem 11.13 (Unique readability). If is a w of length greater than 1, then
there exists eactly one way of expressing in the form:
(), ( ), ( ), ( ), or ( )
for some shorter ws , .
We shall make use of the following result.
Lemma 11.14. Any proper initial segment of a w contains more left parentheses than
right parentheses. Thus no proper initial segment of a w is a w.
2006/02/13 22
Math 461 Propositional logic
Proof. We argue by induction on the length n 1 of the w . First suppose that
n = 1. Then is a sentence symbol, say A
n
. Since A
n
has no proper initial segments,
the result holds vacuously.
Now suppose that n > 1 and that the result holds of all ws of length less than n.
Then must have the form
(), ( ), ( ), ( ), or ( )
for some shorter ws and . By induction hypothesis, the result holds for both and
. We just consider the case when is ( ). (The other cases are similar.) The
proper initial segments of are:
1. (
2. (
0
where
0
is an initial segment of
3. (
4. (
0
where
0
is an initial segment of .
Using the induction hypothesis and the previous proposition (Proposition 11.9), we see
that the result also holds for .
Proof of Theorem 11.13. Suppose, for example, that
= ( ) = ( ).
Deleting the rst ( we obtain that
) = ).
Suppose that ,= . Then wlog is a proper initial segment of . But then isnt a
w, which is a contradiction. Hence = . Deleting and , we obtain that
) = ).
and so = .
Next suppose that
= ( ) = ( ).
Arguing as above, we nd that = and so
) = )
which is a contradiction.
The other cases are similar.
2006/02/13 23
Math 461 Applications and proof of compactness
Denition 11.15. Let : L T, F be a truth assignment.
1. If is a w, then satises i () = T.
2. If is a set of ws, then satises i () = T for all .
3. is satisable i there exists a truth assignment which satises .
Example 11.16. 1. Suppose that : L T, F is a truth assignment and that
(A
1
) = F and (A
2
) = T. Then satises (A
1
A
2
).
2. = A
1
, (A
2
), (A
1
A
2
) is not satisable.
Exercise 11.17. Suppose that is a w and
1
,
2
are truth assignments which agree
on all sentence symbols appearing in . Then
1
() =
2
(). (Hint: argue by induction
on the length of .)
Denition 11.18. Let be a set of ws and let be a w. Then tautologically
implies , written [= , i every truth assignment which satises also satises .
Important Observation. Thus [= i is not satisable.
Example 11.19. A
1
, (A
1
A
2
) [= A
2
.
Denition 11.20. The ws , are tautologically equivalent i both [= and
[= .
Example 11.21. (A
1
A
2
) and ((A
2
) (A
1
) are tautologicaly equivalent.
Exercise 11.22. Let , be ws. Then the following statements are equivalent.
1. and are tautologically equivalent.
2. ( ) is a tautology.
(Hint: do not argue by induction on the lengths of the ws.)
12 The compactness theorem
Question 12.1. Suppose that is an innite set of ws and that [= . Does there
necessarily exists a nite subset
0
such that
0
[= ?
A positive answer follows from the following result...
Theorem 12.2 (The Compactness Theorem). Let be a set of ws. If every nite
subset
0
is satisable, then is satisable.
2006/02/27 24
Math 461 Applications and proof of compactness
Denition 12.3. A set of ws is nitely satisable i every nite subset
0
is
satisable.
Theorem 12.4 (The Compactness Theorem). If is a nitely satisable set of
ws, then is satisable.
Before proving the compactness theorem, we present a number of its applications.
Corollary 12.5. If [= , then there exists a nite subset
0
such that
0
[= .
Proof. Suppose not. Then for every nite subset
0
, we have that
0
,[= and hence

0
() is satisable. Thus () is nitely satisable. By the Compactness
Theorem, () is satisable. But this means that ,[= , which is a contradiction.
13 A graph-theoretic application
Denition 13.1. Let E be a binary relation on the set V . Then = V, E) is a graph
i:
1. E is irreexive; and
2. E is symmetric.
Example 13.2. Let V = 0, 1, 2, 3, 4 and let E = i, j) [ j = i + 1 mod 5. This is
called the cycle of length ve.
Denition 13.3. Let k 1. Then the graph = V, E) is k-colorable i there exists a
function : V 1, 2, . . . k. such that for all a, b V ,
if aEb, then (a) ,= (b).
Example 13.4. Any cycle of even length is two-colorable. Any cycle of odd length is
three-colorable but not two-colorable.
Theorem 13.5 (Erd os). A countable graph = V, E) is k-colorable i every nite
subgraph
0
is k-colorable.
Proof. Suppose that is k-colorable and let : V 1, 2, . . . , k is any k-coloring.
Let
0
= V
0
, E
0
) be any nite subgraph of . Then
0
= [V
0
is a k-coloring of
0
.
In this direction we use the Compactness Theorem.
Step 1 We choose a suitable propositional language. The idea is to have a sentence
symbol for every decision we must make. So our language has sentence symbols:
C
v,i
for each v V, 1 i k.
2006/02/27 25
Math 461 Applications and proof of compactness
(The intended meaning of C
v,i
is: color vertex v with color i.)
Step 2 We write down a suitable set of ws which imposes a suitable set of constraints
on our truth assignments. Let be the set of ws of the following forms:
(a) C
v,1
C
v,2
. . . C
v,k
for each v V .
(b) (C
v,i
C
v,j
) for each v V and 1 i ,= j k.
(c) (C
v,i
C
w,i
) for each pair v, w V of adjacent vertices and each 1 i k.
Step 3 We check that we have chosen a suitable set of ws.
Claim 13.6. Suppose that is a truth assignment which satises . Then we can
dene a k-coloring : 1, . . . , k by
(v) = i i (C
v,i
) = T.
Proof. By (a) and by (b), for each v V , there exists a unique 1 i k such that
(C
v,i
) = T. Thus : V 1, . . . is a function. By (c), if v, w V are adjacent, then
(v) ,= (w). Hence is a k-coloring.
Step 4 We next prove that is nitely satisable. So let
0
be any nite subset.
Let V
0
V be the nite set of vertices that are mentioned in
0
. Then the nite
subgraph
0
= V
0
, E
0
) is k-colorable. Let
: V
0
1, . . . , k
be a k-coloring of
0
. Let
0
be a truth assignment such that if v V
0
and 1 i k,
then
(C
v,i
) = T i
0
(v) = i.
Clearly
0
satises
0
.
By the Compactness Theorem, is satisable. Hence is k-colorable.
14 Extending partial orders
Theorem 14.1. Let A, ) be a countable partial order. Then there exists a linear
ordering < of A which extends .
Proof. We work with the propositional language which has sentence symbols
L
a,b
for a ,= b A
Let be the following set of ws:
2006/02/27 26
Math 461 Applications and proof of compactness
(a) L
a,b
L
b,a
for a ,= b A
(b) (L
a,b
L
b,a
) for a ,= b A
(c) ((L
a,b
L
b,c
) L
a,c
) for distinct a, b, c A
(d) L
a,b
for distinct a, b A with a b.
Claim 14.2. Suppose that is a truth assignment which satises . Dene the binary
relation < on A by
a < b i (L
a,b
) = T.
Then < is a linear ordering of A which extends .
Proof. Clearly < is irreexive. By (a) and (b), < has the trichotomy property. By (c),
< is transitive. Finally, by (d), < extends .
Next we prove that is nitely satisable. So let
0
be any nite subset. Let
A
0
A be the nite set of elements that are mentioned in
0
and consider the partial
order A
0
,
0
). Then there exists a partial ordering <
0
of A
0
extending
0
. Let
0
be
the truth assignment such that if a ,= b A
0
, then

0
(L
a,b
) = T i a
0
b.
Clearly
0
satises
0
.
By the compactness theorem, is satisable. Hence there exists a linear ordering <
of A which extends .
15 Halls Theorem
Denition 15.1. Suppose that S is a set and that 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
for i I such that if i ,= j I, then x
i
,= x
j
.
Example 15.2. Let S = N and let S
n
[ n N) be dened by
S
n
= n, n + 1
Thus S
0
= 0, 1, S
1
= 1, 2, . . . Then we can take x
i
= i S
i
.
Theorem 15.3 (Halls Matching Theorem (1935)). Let S be any set and let n
N
+
. Let S
1
, S
2
, . . . , S
n
) be an indexed collection of subsets of S. Then a necessary and
sucent condition for the existance of a system of distinct representatives is:
(H) For every 1 k n and choice of k distinct indices 1 i
1
, . . . , i
k
n, we have
[S
i
1
. . . S
i
k
[ k.
2006/02/27 27
Math 461 Applications and proof of compactness
Challange: Prove this!
Problem 15.4. State and prove an innite analogue of Halls Matching Theorem.
First Attempt Let S be any set and let S
n
[ n N
+
) be an indexed collection of
subsets of S. Then a necessary and sucient condition for the existence of a system of
distinct representatives is:
(H

) For every k N
+
and choice of k distinct indices i
1
, . . . , i
k
N, we have
[S
i
1
. . . S
i
k
[ k.
Counterexample Take S
1
= N, S
2
= 0, S
3
= 1, . . ., S
n
= n 2, . . . Clearly
(H

) is satised and yet there is no system of distinct representatives.


Question 15.5. Where does the compactness argument break down?
Theorem 15.6 (Innite Halls Theorem). Let S be any set and let S
n
[ n 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:
(H

) For every k N
+
and choice of k distinct indices i
1
, . . . , i
k
N, we have
[S
i
1
. . . S
i
k
[ k.
Proof. We work with the propositional language with sentence symbols
C
n,x
. n N
+
, x S
n
.
Let be the following set of ws:
(a) (C
n,x
C
m,x
) for n ,= m N
+
, x S
n
S
m
.
(b) (C
n,x
C
n,y
) for n N
+
, x ,= y S
n
S
m
.
(c) (C
n,x
1
. . . C
n,x
k
) for n N
+
, where S
n
= x
1
, . . . , x
k
.
Claim 15.7. Suppose that is a truth assignment which satises . Then we can
dene a system of distinct representatives by
x S
n
i (C
n,x
) = T.
Proof. By (b) and (c), each S
n
gets assigned a unique representative. By (a), distinct
sets S
m
,= S
m
get assigned distinct representatives.
Next we prove that is nitely satisable. So let
0
be any nite subset. Let
i
1
, . . . , i
l
be the indices that are mentioned in
0
. Then S
i
1
, . . . S
i
l
satises condition
(H). By Halls Theorem, there exists a set of distinct representatives for S
i
1
, . . . S
i
l
;
say, x
r
S
ir
. Let
0
be the truth assignment such that for 1 r l and x S
ir
,
(C
ir,x
) = T i x = x
r
.
Clearly
0
satises
0
.
By the Compactness Theorem, is satisable. Hence there exists a system of distinct
representatives.
2006/02/27 28
Math 461 Applications and proof of compactness
16 Proof of compactness
Theorem 16.1 (The Compactness Theorem). If is a nitely satisable set of
ws, then is satisable.
Basic idea Imagine that for each sentence symbol A
n
, either A
n
or A
n
.
Then there is only one possibility for a truth assignment which satises : namely,
(A
n
) = T i A
n
.
Presumably this works...
In the general case, we extend to a nitely satisable set as above. For technical
reasons, we construct so that for every w , either or .
Lemma 16.2. Suppose that is a nitely satisable set of ws. If is any w, then
either is nitely satisable or is nitely satisable.
Proof. Suppose that isnt nitely satisable. Then there exists a nite subset

0
such that
0
isnt satisable. Thus [= . We claim that is
ntely satisable. Let be any nite subset. If then is satisable.
Hence we can suppose that =
0
for some nite subset
0
. Since
is nitely satisable, ther exists a truth assignment which satises
0

0
. Since

0
[= , it follows that () = T. Hence satises
0
.
Proof of the Compactness Theorem. Let be a nitely satisable set of ws. Let

1
,
2
, . . . ,
n
, . . . n 1
be an enumeration of all the ws

L. We shall inductively dene an increasing
sequence of nitely satisable sets of ws

0

1
. . .
n
. . .
First let
0
= . Suppose inductively that
n
has been dened. Then

n+1
=
n

n+1
, if this is nitely satisable
=
n
(
n+1
), otherwise.
By the lemma,
n+1
is also nitely satisable. Finally dene
=

n
.
2006/02/27 29
Math 461 Konigs Lemma
Claim 16.3. is nitely satisable.
Proof. Suppose that is a nite subset. Then there exists an n such that
n
.
Since
n
is nitely satisable, is satisable.
Claim 16.4. If is any w, then either or () .
Proof. There exists an n 1 such that =
n
. By construction, either
n

n+1
or
(
n
)
n+1
; and
n+1
.
Dene a truth assignment : L T, F by
(A
l
) = T i A
l
.
Claim 16.5. For every w , () = T i .
Proof. We argue by induction on the length m of the w . First suppose that m = 1.
Then is a sentence symbol; say, = A
l
. By denition
(A
l
) = (A
l
) = T i A
l
.
Now suppose that m > 1. Then has the form
(), ( ), ( ), ( ), ( )
for some shorter ws , .
Case 1 Suppose that = (). Then
() = T i () = F
i / by induction hypothesis
i () by Claim 16.4
i
Case 2 Suppose that is ( ). First suppose that () = T. Then () = T or
() = T. By induction hypothesis, or . Since is nitely satisable,
, (( )) , and , (( )) , . Hence (( )) / and so ( ) .
Conversely suppose that () . Since is nitely satisable, (), (), (
) , . Hence () / or () / ; and so or . By induction hypothesis,
() = T or () = T. Hence ( ) = T.
Exercise 16.6. Write out the details for the other cases.
Thus satises . Since , it follows that satises .
2006/03/06 30
Math 461 Konigs Lemma
17 Trees and Konigs Lemma
Denition 17.1. A partial order T, ) is a tree i the following conditions are satised.
1. There exists a unique minimal element t
0
T called the root.
2. For each t T, the set
Pr
T
(t) = s T [ s t
is a nite set which is linearly ordered by .
Example 17.2. The complete binary tree is dened to be
T
2
= f [ f : n 0, 1
ordered by
f g i f g.
Denition 17.3. 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
T
(n) = t T [ ht
T
(t) = n.
3. For each t T, the set of immediate successors of t is
succ
T
(t) = s T [ t s and ht
T
(s) = ht
T
(t) + 1.
4. T is nitely branching i each t T has a nite (possibly empty) set of immediate
successors.
5. A branch B of T is a maximal linearly ordered subset of T.
Example 17.4. Consider the complete binary tree T
2
. If : N 0, 1, then we can
dene a corresponding branch of T
2
by
B

= [n [ n N.
Conversely, let B be an arbitrary branch of T
2
. Let =

B. Then : N 0, 1 and
B = B

.
Exercise 17.5. Let T, ) be a tree. Then the following are equivalent:
2006/03/06 31
Math 461 Konigs Lemma
1. T is nitely branching.
2. Lev
T
(n) is nite for all n 0.
Lemma 17.6 (K onig). Suppose that T is an innite nitely branching tree. Then there
exists an innite branch B through T.
Remark 17.7. Note that such a branch B necessarily satises:
[B Lev
T
(n)[ = 1 for all n 0.
First we shall give a proof of K onigs Lemma, using the Compactness Theorem.
Proof of K onigs Lemma. Let T, ) be an innite nitely branching tree. Then each
level Lev
T
(n) is nite and so T is countably innite. We shall work with the propositional
language with sentence symbols B
t
[ t T. Let be the following set of ws:
(a) B
t
1
. . . B
t
l
where Lev
T
(n) = t
1
, . . . , t
l
and n 0.
(b) (B
t
i
B
t
j
) where Lev
T
(n) = t
1
, . . . , t
l
, n 0, and 1 i < j l.
(c) (B
s
B
t
) for s, t T with s t.
Claim 17.8. Suppose that is a truth assignment which satises . Then
B = t T [ (B
t
) = T
is an innite branch through T.
Proof. By (a) and (b), B intersects every level in a unique point. Suppose that s ,= t B.
Then wlog we have that ht
T
(s) < ht
T
(t). Let n = ht
T
(s). By (c), B must contain the
predecessor of t in Lev
T
(n), which must be equal to s. Thus s t. It follows that B is
linearly ordered.
We claim that is nitely satisable. Let
0
be a nite subset. Then there
exists n 0 such that if t T is mentioned in
0
, then ht
T
(t) < n. Choose t
0
Lev
T
(n)
and let
0
be the truth assignment such that for all t T with ht
T
(t) < n,

0
(B
t
) = T i t < t
0
.
Clearly
0
satises
0
. By Compactness, is satisable and hence T has an innite
branch.
Next we shall give a direct proof of K onigs Lemma.
Proof of K onigs Lemma. Let T be an innite nitely branching tree. We shall dene a
sequence of elements t
n
T inductively so that the following conditions are satised:
2006/03/06 32
Math 461 Konigs Lemma
(a) t
n
Lev
T
(n)
(b) If m < n then t
m
t
n
.
(c) s T [ t
n
s is innite.
First let t
0
Lev
T
(0) be the root. Clearly the above conditions are satised.. Assume
inductively that t
n
has been dened. Then t
n
has a nite set of immediate successors;
say a
1
, . . . , a
l
. If t
n
s and ht
T
(s) > n + 1, then there exists 1 i l such that
a
i
s. By the pigeon hole principle, there exists 1 i l such that a
i
satises (c).
Then we dene t
n+1
= a
i
. Clearly B = t
n
[ n 0 is an innite branch through T.
Next we present an application of K onigs Lemma.
Theorem 17.9 (Erd os). A countably innite graph is k-colorable i every nite
subgraph of is k-colorable.
Proof. () Trival!
() Suppose that every nite subgraph of is k-colorable. Let = v
1
, v
2
, . . . , v
n
, . . .;
and for each n 1, let
n
= v
1
, . . . , v
n
and let C
n
be the set of k-colorings of
n
. Let
T be the tree with levels dened by
Lev
T
(0) =
Lev
T
(n) = C
n
for n 0
partially ordered as follows. Suppose that Lev
T
(n) and Lev
T
(m) where 1
n < m. Then
i = [v
1
, . . . , v
n
.
Clearly T is an innite nitely branching tree. By K onigs Lemma, there exists an
innite branch B =
n
[ n N through T, where
n
Lev
T
(n). We claim that
=

n
is a k-coloring of . It is clear that : 1, . . . , k. Next suppose that
a ,= b are adjacent vertices. Then there exists n 1 such that a, b
n
. By
denition, we have that (a) =
n
(a) and (b) =
n
(b). Since
n
is a k-coloring of
n
,
it follows that
n
(a) ,=
n
(b). Thus (a) ,= (b).
Finally we use K onigs Lemma to give a proof of the Compactness Theorem.
Proof of Compactness Theorem. Suppose that is a nitely satisable set of ws in the
propositional language with sentence symbols A
1
, A
2
, . . . , A
n
, . . .. We dene a tree T
as follows.
Lev
T
(0) =
2006/03/06 33
Math 461 First Order Logic
If n 1, then Lev
T
(n) is the set of all partial truth assignments : A
1
, . . . , A
n

T, F which satisfy every which only mention A
1
, . . . , A
n
.
We partially order T as follows. Suppose that Lev
T
(n) and

Lev
T
(m), where
1 n < m. Then

i =

[A
1
, . . . , A
n
.
Clearly [Lev
T
(n)[ 2
n
and so each level Lev
T
(n) is nite.
Claim 17.10. For each n 0, Lev
T
(n) ,= .
Proof. Clearly we can suppose that n 1. Let
n
be the set of ws in which only
involve A
1
, . . . , A
n
. If
n
is nite, the result holds by the nite satisability of . Hence
we can suppose that
n
is innite; say
n
=
1
,
2
, . . . ,
t
, . . .. For each t 1, let
t
=

1
, . . . ,
t
. Then there exists a partial truth assignment
t
: A
1
, . . . , A
n
T, F
which satises
t
. By the pigeon hole principle, there exists a xed : A
1
, . . . , A
n

T, F such that
t
= for innitely many t 1. Clearly Lev
T
(n).
Thus T is an innite, nitely branching tree. By K onigs Lemma, there exists an
innite branch B =
n
[ n N through T, where
n
Lev
T
(n). It follows that
=

n
is a truth assignment which satises .
18 First Order Logic
Denition 18.1. The alphabet of a rst order language L consists of:
A. Symbols common to all languages (Logical Symbols)
(a) Parentheses (, )
(b) Connectives ,
(c) Variables v
1
, v
2
, . . . , v
n
, . . . n 0
(d) Quantier
(e) Equality symbol =
B. Symbols particular to the language (Non-logical Symbols)
(a) For each n 1, a (possibly empty) countable set of n-place predicate symbols.
(b) A (possibly empty) countable set of constant symbols.
(c) For each n 1, a (possibly empty) countable set of n-place function symbols.
Remark 18.2. It is easily checked that the alphabet is countable.
Denition 18.3. An expression is a nite sequence of symbols from the alphabet.
2006/03/20 34
Math 461 First Order Logic
Remark 18.4. The set of expressions is countable.
Denition 18.5. The set of terms is dened inductively as follows:
1. Each variable and each constant symbol is a term.
2. If f is an n-place function symbol and t
1
, . . . , t
n
are terms, then ft
1
. . . t
n
is a term.
Denition 18.6. An atomic formula is an expression of the form
Pt
1
. . . t
n
where P is an n-place predicate symbol and t
1
, . . . , t
n
are terms.
Remark 18.7. The equality symbol = is a two-place predicate symbol. Hence every
language has atomic formulas.
Denition 18.8. The set of well-formed formulas (ws) is dened inductively as follows:
1. Every atomic formula is a w.
2. If and are ws and v is a variable, then
(), ( ), and v
are ws.
Some abbreviations We usually write
( ) instead of (() )
( ) (( ()))
v (v())
u = t = ut
u ,= t ( = ut)
We also use common sense in our use of parentheses.
Denition 18.9. Let x be a variable.
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 18.10. The w is a sentence i has no free variables.
2006/03/20 35
Math 461 First Order Logic
19 Truth and Structures
Denition 19.1. A structure / for the rst order language L consists of:
1. a non-empty set A, the universe of /.
2. for each n-place predicate symbol P, an n-ary relation P
A
A
n
.
3. for each constant symbol c, an element c
A
A.
4. for each function symbol f, an n-ary operation f
A
: A
n
A.
Example 19.2. Suppose that L has the following non-logical symbols:
1. a 1-place predicate symbol S
2. a 2-place predicate symbol R
3. a constant symbol c
4. a 1-place function symbol f.
Then we can dene a structure
/ = A; S
A
, R
A
, c
A
, f
A
)
for L as follows:
1. A = 1, 2, 3, 4
2. S
A
= 2), 3)
3. R
A
= 1, 2), 2, 3), 3, 4), 4, 1)
4. c
A
= 1
5. f
A
: A A where 1 2, 2 3, 3 4, and 4 1.
Target Let L be any rst order language. For each sentence and each structure /
for L, we want to dene
/ [=
/ satises or is true in /.
Example 19.3 (Example Cont.). Let be the sentence
xy(fx = y Rxy)
Clearly
/ [= .
2006/03/20 36
Math 461 First Order Logic
First we need to dene a more involved notion. Let
be a w
/ be a structure for L
s: V A be a function, where v is the set of variables.
Then we will dene
/ [= [s]
is true in / if each free occurence of x in is interpreted as s(x) in A.
Step 1
Let T be the set of terms. We rst dene an extension s: T A as follows:
1. For each variable v 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.
(a). / [= = t
1
t
2
[s] i s(t
1
) = s(t
2
).
(b). If P is an n-place predicate symbol dierent from = and t
1
, . . . , t
n
are terms, then
/ [= Pt
1
. . . t
n
[s] i s(t
1
), . . . , s(t
n
)) P
A
.
Step 3 Other ws.
(c). / [= ()[s] i / ,[= [s].
(d). / [= ( )[s] i / ,[= [s] or / [= [s].
(e). / [= x[s] i for all a A, / [= [s(x[a)] where s(x[a) is dened by
s(x[a)(y) = s(y), y ,= x
= a, y = x
2006/03/20 37
Math 461 First Order Logic
Theorem 19.4. Assume that s
1
, s
2
: V A agree on all free variables (if any) of the
w . Then
/ [= [s
1
] i / [= [s
2
].
Proof slightly delayed.
Corollary 19.5. If is a sentence, then either
1. / [= [s] for all s: V A or
2. / ,[= [s] for all s: V A.
Denition 19.6. Let be a sentence. Then / [= i / [= [s] for all s: V A.
Exercise 19.7. Let / be a structure and let t be a term. If s
1
, s
2
: V A agree on all
variables (if any) in t, then s
1
(t) = s
2
(t).
Proof of Theorem 19.4. We argue by induction on the complexity of .
Case 1 Suppose that is an atomic formula. First suppose that is = t
1
t
2
. By the
Exercise, s
1
(t
1
) = s
2
(t
1
) and s
1
(t
2
) = s
2
(t
2
). Hence
/ [= = 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 / [= = t
1
t
2
[s
2
].
Next suppose that is Pt
1
. . . t
n
. Again by the Exercise, s
1
(t
i
) = s
2
(t
i
) for 1 i n.
Hence
/ [= Pt
1
. . . t
n
[s
1
] i s
1
(t
1
), . . . , s
1
(t
n
)) P
A
i s
2
(t
1
), . . . , s
2
(t
n
)) P
A
i / [= Pt
1
. . . t
n
[s
2
].
Case 2 Suppose that is (). Then s
1
, s
2
agree on the free variables of . Hence
/ [= ()[s
1
] i / ,[= [s
1
]
i / ,[= [s
2
] by ind. hyp.
i / [= ()[s
2
].
2006/03/20 38
Math 461 Compactness
Case 3 A similar argument deals with the case when is ( ).
Case 4 Suppose that is x. Then s
1
, s
2
agree on all free variables of except
possibly x. Hence for all a A, s
1
(x[a) and s
2
(x[a) agree on all free variables of .
Thus
/ [= x[s
1
] i for all a A, / [= [s
1
(x[a)]
i for all a A, / [= [s
2
(x[a)]
i / [= x[s
2
].
20 Compactness in rst order logic
Denition 20.1. Let be a set of ws.
(a) / satises with s i / [= [s] for all .
(b) is satisable i there exists a structure / and a function s: V A such that
/ satises with s.
(c) is nitely satisable i every nite subset of is satisable.
One of the deepest results of the course:
Theorem 20.2 (Compactness). Let be a set of ws in the rst order language L.
If is nitely satisable, then is satisable.
Application of the Compactness Theorem Let L be the language of arithmetic; ie
L has non-logical symbols +, , <, 0, 1. Let
ThN = [ is a sentence satised by N; +, , <, 0, 1).
Consider the following set of ws:
ThN x > 1 + . . . + 1

n times
[n 1.
We claim that is nitely satisable. To see this, suppose that
0
is any nite
subset; say,
0
= T x > 1 + . . . + 1

n
1
, . . . , x > 1 + . . . + 1

nt
, where T ThN. Let
m = maxn
1
, . . . , n
t
and let s: V N with s(x) = m + 1. Then N satises
0
2006/04/03 39
Math 461 Compactness
with s. By the Compactness Theorem, there exists a structure / for L and a function
s: V A such that / satises with s. Thus / is a model of artihmetic containing
the innite natural number s(x) A.
Discussion of the order relation in /....
Now we return to the systematic development of rst order logic.
Denition 20.3. Let /, B be structures for the 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 any n-tuple a
1
, . . . , a
n
A,
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 n-tuple a
1
, . . . , a
n
A,
f(h
A
(a
1
, . . . , a
n
)) = h
B
(f(a
1
), . . . , f(a
n
)).
We write /

=B i / and B are isomorphic.


Theorem 20.4. Suppose that : A B is an isomorphism. If is any sentence, then
/ [= i B [= .
In order to prove the above theorem, we must prove the following more general
statement.
Theorem 20.5. Suppose that : A B is an isomorphism and s: V A. Then for
any w
/ [= [s] i B [= [ s].
We shall make use of the following result.
Lemma 20.6. With the above hypotheses, for each term t,
( s(t)) = ( s)(t).
Proof. Exercise.
Proof of Theorem 20.5. We argue by induction of the complexity of . First suppose
that is atomic, say Pt
1
. . . t
n
. Then
/ [= Pt
1
. . . t
n
[s] i s(t
1
), . . . , s(t
n
)) P
A
i ( s(t
1
)), . . . , ( s(t
n
))) P
B
i ( s)(t
1
)), . . . , ( s)(t
n
)) P
B
i B [= Pt
1
. . . t
n
[ s]
2006/04/03 40
Math 461 Compactness
Next suppose that is . Then
/ [= [s] i / ,[= [s]
i B ,[= [ s]
i B [= [ s]
A similar argument deals with the case when is ( = ).
Finally suppose that is v. Then
/ [= v[s] i / [= [s(v[a)], for all a A
i B [= [ s(v[a)], for all a A
i B [= [( s)(v[(a))], for all a A
i B [= [( s)(v[b)], for all b B
i B [= v[ s]
Example 20.7. N, <),

= Z, <).
Proof. Consider the sentence given by
(x)(y)(y = x x < y).
Then N, <) [= and Z, <) ,[= . Thus N, <),

= Z, <).
Example 20.8. Z, <),

= Q, <).
Proof. Consider the sentence given by
(x)(y)(x < y (z)(x < z z < y)).
Denition 20.9. Let T be a set of sentences.
1. / is a model for T i / [= for every T.
2. Mod(T) is the class of all models of T.
Abbreviation If E is a binary predicate symbol, then we usually write xEy instead of
Exy.
2006/04/03 41
Math 461 Compactness
Example 20.10. Let T be the following set of sentences:
(x)(xEx)
(x)(y)(xEy yEx).
Then Mod(T) is the class of graphs.
Example 20.11. Let T be the following set of sentences:
(x)(xEx)
(x)(y)(z)((xEy yEz) xEz)
(x)(y)(x = y xEy yEx)
Then Mod(T) is the class of linear orders.
Denition 20.12. A class ( of structures is axiomatizable i there is a set T of sentences
such that ( = Mod(T). If there exists a nite set T of sentences such that ( = Mod(T),
then ( is nitely axiomatizable.
Example 20.13. The class of graphs is nitely axiomatizable.
Example 20.14. The class of innite graphs is axiomatizable.
Proof. For each n 1 let O
n
be the sentence
There exist at least n elements.
For example O
3
is the sentence
(x)(y)(z)(x ,= y y ,= z z ,= x).
Then ( = Mod(T), where T is the following set of sentences:
(x)(xEx)
(x)(y)(xEy yEx)
O
n
, n 1.
Question 20.15. Is the class of innite graphs nitely axiomatizable?
Question 20.16. Is the class of nite graphs axiomatizable?
Another application of the Compactness Theorem...
2006/04/03 42
Math 461 Compactness
Theorem 20.17. Let T be a set of sentences in a rst order language L. If T has
arbitrarily large nite models, then T has an innite model.
Proof. For each n 1, let O
n
be the sentence which says:
There exist at least n elements.
Let be the set of sentences T O
n
[ n 1. We claim that is nitely satisable.
Suppose
0
is any nite subset. Then wlog

0
= T O
n
1
, . . . , O
nt
.
Let m = maxn
1
, . . . , n
t
. Then there exists a nite model /
0
of T such that /
0
has at
least m elements. Clearly /
0
satises
0
. By the Compactness Theorem, there exists a
model / of . Clearly / is an innite model of T.
Corollary 20.18. The class T of nite graphs is not axiomatizable.
Proof. Suppose T is a set of sentences such that T = Mod(T). Clearly there are
arbitrarly large nite graphs and hence T has arbitrarly large nite models. But this
means that T has an innite model, which is a contradiction.
Corollary 20.19. The class ( of innite graphs is not nitely axiomatizable.
Proof. Suppose that there exists a nite set T =
1
, . . . ,
n
of sentences such that
( = Mod(T). Consider the following set T

of sentences.
(x)(xEx)
(x)(y)(xEy yEx)
(
1
. . .
n
).
Then clearly Mod(T

) is the class of nite graphs, which is a contradiction.


21 Valid sentences
Denition 21.1. Let be a set of ws and let be a w. Then logically im-
plies/semantically implies i for every structure / and for every function s: V A,
if / satises with s, then / satises with s. In this case we write [= .
Denition 21.2. The w is valid i [= ; ie, for all structures / and functions
s: V A, / [= [s].
Example 21.3. xPx [= Pc.
Question 21.4. Suppose that is an innite set of ws and that [= . Does there
exist a nite set
0
such that
0
[= ?
2006/04/03 43
Math 461 Logical Axioms
Answer Yes. We shall show that [= i there exists a proof of from . Such a
proof will only use a nite subset
0
.
We now return to the syntactic aspect of rst order languages. We will next dene
rigorously the notion of a deduction or proof.
Notation will denote the set of logical axioms. These will be dened explicitly a little
later.
eg (x( ) (x x)).
Each logical axiom will be valid.
Denition 21.5. Let be a set of ws and a w. A deduction of from is a nite
sequence of ws

1
, . . . ,
n
)
such that
n
= and for each 1 i n, either:
(a)
i
; or
(b) there exist j, k < i such that
k
is (
j

i
).
Remark 21.6. In case (b), we have

1
, . . . ,
j
, . . . , (
j

i
), . . . ,
i
, . . . ,
n
)
We say that
i
follows from
j
and (
j

i
) by modus ponens (MP).
Denition 21.7. is a theorem of , written , i there exists a deduction of
from .
The two main results of this course...
Theorem 21.8 (Soundness). If , then [= .
Theorem 21.9 (Completeness (Godel)). If [= , then .
22 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
.
The logical axioms are all generalizations of all ws of the following forms:
1. Tautologies.
2. (x
x
t
), where t is a term which is substitutable for x in .
2006/04/12 44
Math 461 Logical Axioms
3. (x( ) (x x)).
4. ( x), where x doesnt appear free in .
5. x = x.
6. (x = y (

)), where is atomic and

is obtained from be replacing


some (possibly none) of the occurrences of x by y.
Explanation 1. A tautology is a w that can be obtained from a propostional tautology
by substituting ws for sentence symbols.
eg (P Q) (Q P)
is a propositional tautology.
(x ) ( x)
is a rst order tautology.
Explanation 2.
x
t
is the result of replacing each free occurrence of x by t. We say
that t is substitutable for x in i no variable of t gets bound by a quantier in
x
t
.
eg Let be y(x = y). Then y is not substitutable for x in . Note that in this
case
x
x
t
becomes
xy(x = y) y(y = y)
which is not valid. So we need the above restriction.
Explanation 4. A typical example is
Pyz xPyz.
Here x is a dummy quantier which does nothing. Note that
x = 0 x(x = 0)
is not valid. So we need the above restriction.
2006/04/12 45
Math 461 Logical Axioms
23 Some examples of deductions
Example 23.1. (Px yPy)
Proof. Note that (Px yPy) is an abbreviation of (Px yPy). The following
is a deduction from .
1. (yPy Px) (Px yPy) [Axiom 1]
2. (yPy Px) [Axiom 2]
3. (Px yPy) [MP, 1, 2]
Example 23.2. x(Px yPy)
Proof. The following is a deduction from .
1. x((yPy Px) (Px yPy)) [Axiom 1]
2. x(yPy Px) [Axiom 2]
3. x((yPy Px) (Px yPy)) (x(yPy Px) x(Px
yPy)) [Axiom 3]
4. x(yPy Px) x(Px yPy) [MP, 1, 3]
5. x(Px yPy)) [MP, 2, 4]
24 Soundness Theorem
Theorem 24.1 (Soundness). If , then [= .
We shall make use of the following result.
Lemma 24.2. Every logical axiom is valid
Proof. We just consider the case where has the form
( x)
where x isnt free in . Let / be any structure and s: V A. If / ,[= [s], then / [=
( x)[s]. So suppose that / [= [s]. Let a A be any element. Then s and s(x[a)
agree on the free variables of . Hence / [= [s(x[a)] and so / [= ( x)[s].
2006/04/12 46
Math 461 Beginning the completeness theorem.
Remark 24.3. The other cases are equally easy, except for the case of
(x
x
t
)
which is harder. We will give a detailed proof of this case later.
Exercise 24.4. Show that
(x( ) (x ))
is valid.
Proof of the Soundness Theorem. We argue by induction on the minimal length n 1
of a deduction that if , then [= .
First suppose that n = 1. Then . If then clearly [= . If ,
then the lemma (24.2) says that is valid. Thus [= and so [= .
Now suppose that n > 1. Let

1
, . . . ,
n
= )
be a deduction of from . Then must follow from MP from two earlier ws and
( ). Note that proper initial segments of deductions from are also deductions
from . Thus and ( ) via deductions of length less than n. By induction
hypothesis, [= and [= ( ). Let / be any structure and s: V A. Suppose
that / satises with s. Then / [= [s] and / [= ( )[s]. Hence / [= [s]. Thus
[= .
Denition 24.5. A set of ws is inconsistent i there exists a w such that
and . Otherwise, is consistent.
Corollary 24.6. If is satisable, then is consistent.
Proof. Suppose that is satisable. Let / satisfy with s: V A. Now suppose that
is inconsistent; say and . By Soundness [= and [= . But this
means that / [= [s] and / [= [s], which is a contradiction.
25 Meta-theorems
Now we turn to the proof of the Completeness Theorem. First we need to prove a
number of Meta-Theorems.
Theorem 25.1 (Generalization). If and x doesnt occur free in any w of ,
then x.
2006/04/17 47
Math 461 Beginning the completeness theorem.
Remark 25.2. Note that if c is a constant symbol, then
x = c x = c.
However,
x = c , x(x = c).
How do we know this? By the Soundness Theorem, it is enough to show that
x = c , [=x(x = c).
Proof of Generalization Theorem. We argue by induction on the minimal length n of a
deduction of from that x.
First suppose that n = 1. Then .
Case 1 Suppose that . Then x and so x.
Case 2 Suppose that . Then x doesnt occur free in and so ( x) .
Hence the following is a deduction of x from .
1. [in ]
2. x [Ax 4]
3. x [MP, 1, 2]
Now suppose that n > 1. Then in a deduction of minimal length, follows from
earlier ws and ( ) by MP. By induction hypothesis, x and x( ).
Hence the following is a deduction of x from .
1. . . . deduction of x from .
n. x
n+1. . . . deduction of x( ) from .
n+m. x( )
n+m+1. x( ) (x x) [Ax 3]
n+m+2. x x [MP, n + m, n + m + 1]
n+m+3. x [MP, n, n + m + 2]
2006/04/17 48
Math 461 Beginning the completeness theorem.
Denition 25.3.
1
, . . . ,
n
tautologically implies i
(
1
(
2
. . . (
n
) . . .))
is a tautology.
Theorem 25.4 (Rule T). If
1
, . . . ,
n
and
1
, . . . ,
n
tautologically implies
, the .
Proof. Obvious, via repeated applications of MP.
Theorem 25.5 (Deduction). If , then ( ).
Proof. We argue by induction on the minimal length n of a deduction of from .
First suppose that n = 1.
Case 1 Suppose that . Then the following is a deduction from .
1. [in ]
2. ( ( )) [Ax 1]
3. ( ) [MP, 1, 2]
Case 2 Suppose that = . In this case ( ) is a tautology and so ( ).
Now suppose that n > 1. Then in a deduction of minimal length follows from
earlier ws and ( ) by MP. By induction hypothesis, ( ) and (
( )). Clearly ( ), ( ( )) tautologically implies ( ). By Rule
T, ( ).
Theorem 25.6 (Contraposition). i .
Proof. Suppose that . By the deduction theorem ( ). By Rule
T, ( ). Hence amd ( ). By Rule T, .
The other direction is similar.
Theorem 25.7 (Reductio Ad Absurdum). If is inconsistent, then .
Proof. Suppose that and . By the Deduction Theorem ,
( ) and ( ). Since ( ), ( ) tautologically implies ,
Rule T gives .
Remark 25.8. If is inconsistent, then for ever w .
Proof. Suppose that and . Clearly
( ( ))
is a tautology. By Rule T, .
2006/04/17 49
Math 461 Beginning the completeness theorem.
26 Applications: some theorems about equality
Eq 1.
x(x = x)
Proof. This is a logical axiom.
Eq 2.
xy(x = y y = x)
Proof. 1. x = y (x = x y = x) [Ax 6]
2. x = x [Ax 5]
3. x = y y = x [Rule T, 1, 2]
4. y(x = y y = x) [Gen, 3]
5. xy(x = y y = x) [Gen, 4]
Eq 3.
xyz(x = y (y = z x = z))
Proof. 1. y = x (y = z x = z) [Ax 6]
2. x = y y = x [Shown in proof of Eq 2]
3. x = y (y = z x = z) [Rule T, 1, 2]
4. xyz(x = y (y = z x = z)) [Gen cubed, 3]
27 Generalization on constants
Theorem 27.1 (Generalization on constants). Assume that and that c is a
constant symbol which doesnt occur in . Then there exists a variable y (which doesnt
occur in ) such that y
c
y
.
Furthermore, there exists a deduction of y
c
y
from in which c doesnt occur.
Remark 27.2. Intuitively, suppose that says nothing about c and that (c). Then
y(y). In other words, to prove y(y), let c be arbitrary and prove (c).
2006/04/17 50
Math 461 Beginning the completeness theorem.
Remark 27.3. Suppose that is a consistent set of ws in the language L. Let L
+
be
the language obtained by adding a new constant symbol c. Then is still consistent in
L
+
.
Why? Suppose not. Then there exists a w in L
+
such that in L
+
. By
the above theorem, for some variable y which doesnt occur in ,
y(
c
y

c
y
)
via a deduction that doesnt involve c. Since
y(
c
y

c
y
) (
c
y

c
y
)
is a logical axiom,

c
y

c
y
in L. This implies that is inconsistent in L, which is a contradiction.
Proof of Generalization on Constants. Suppose that
()
1
, . . . ,
n
)
is a deduction of from . Let y be a variable which doesnt occur in any of the
i
.
We claim that
() (
1
)
c
y
, . . . , (
n
)
c
y
)
is a deduction of
c
y
from . We shall prove that, for all i n, either (
i
)
c
y
or
(
i
)
c
y
follows from earlier ws in () via MP.
Case 1 Suppose that
i
. Since c doesnt occur in , it follows that (
i
)
c
y
=
i
.
Case 2 Suppose that
i
. Then it is easily checked that (
i
)
c
y
.
Case 3 Suppose there exist j, k < i such that
k
is (
j

i
). Then (
k
)
c
y
is ((
j
)
c
y

(
i
)
c
y
). Hence (
i
)
c
y
follows from (
k
)
c
y
and (
j
)
c
y
by MP.
Let be the nite subset of which occurs in (). Then
c
y
via a deduction
in which c doesnt occur. By the Generalization Theorem, since y doesnt occur free in
, it follows that y
c
y
via a deduction in which c doesnt occur. It follows that
y
c
y
via a deduction in which c doesnt occur.
Exercise 27.4. 1. Show by induction on that if y doesnt occur in , then x is
substitutable for y in
x
y
and (
x
y
)
y
x
= .
2. Find a w such that (
x
y
)
y
x
,= .
Corollary 27.5. Suppose that
x
c
, where c is a constant symbol that doesnt occur
in or . Then x, via a deduction in which c doesnt occur.
2006/04/17 51
Math 461 Beginning the completeness theorem.
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 , (
x
c
)
c
y
=
x
y
. Thus y
x
y
. By the exercise, the following
is a logical axiom: y
x
y
. Thus y
x
y
. Since x doesnt occur free in y
x
y
,
Generalization gives that y
x
y
x. Hence Deduction yields that y
x
y
x.
Since y
x
y
, Rule T gives x.
Theorem 27.6 (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 choice of


quantied variables) such that:
(a)

and

.
(b) t is substitutable for x in

.
Proof Omitted
28 Completeness
Now we are ready to begin the proof of:
Theorem 28.1 (Completeness). If [= , then .
We shall base our strategy on the following observation.
Proposition 28.2. The following statements are equivalent:
(a) The Completeness Theorem: ie if [= , then .
(b) If is a consistent set of ws, then is satisable.
Proof. (a) (b)
Suppose that is consistent. Then there exists a w such that , . By Com-
pleteness, , [=. Hence there exists a structure / and a function s: V A such that
/ satises with s and / , [=[s]. In particular, is satisable.
(b) (a)
Suppose that , . Applying Reductio ad Absurdum, is consistent. It
follows that is satisable and hence , [=.
Now we prove:
Theorem 28.3 (Completeness). If is a consistent set of ws in a countable lan-
guage L, then there exists a countable structure / and s: V A such that / satises
with s.
2006/04/17 52
Math 461 Beginning the completeness theorem.
Proof. Step 1 Expand L to a larger language L
+
by adding a countably innte set of
new constant symbols. Then remains consistent as a set of ws in L
+
.
Proof of Step 1. Suppose not. Then there exists a w of L
+
such that in
L
+
. Suppose that c
1
, . . . , c
n
includes the new constants (if any) which appear in . By
Generalization on Constants, there are variables y
1
, . . . , y
n
such that:
(a) y
1
. . . y
n
(

), where

is the result of replacing each c


i
by y
i
; and
(b) the deduction doesnt involve any new constants.
Since y
i
is substitutable for y
i
in

, we obtain that

. But this means


that is inconsistent in the original language L, which is a contradiction.
Step 2 (We add witnesses to existential ws.) Let

1
, x
1
),
2
, x
2
), . . . ,
n
, x
n
), . . .
enumerate all pairs , x), where is 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 constant which doesnt occur in
1
. If n > 1, then
n
is the w
x
n

n
(
n
)
xn
cn
,
where c
n
is the rst new constant which doesnt occur in
1
, . . . ,
n

1
, . . . ,
n1
.
Let
=
n
[ n 1.
Claim 28.4. is consistent.
Proof. Suppose not. Let n 0 be the least integer such that
1
, . . . ,
n+1
is
inconsistent. By Reductio ad Absurdum,

1
, . . . ,
n

n+1
.
Recall that
n+1
has the form
x
x
c
.
By Rule T,

1
, . . . ,
n
x.
and
2006/04/17 53
Math 461 Beginning the completeness theorem.

1
, . . . ,
n

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

1
, . . . ,
n
x.
But this contradicts the minimality of n, or the consistency of if n = 0.
Step 3 We extend to a consistent set of ws such that for every w of L
+
, either
or .
Proof. Let
1
,
2
, . . . ,
n
, . . . enumerate all the ws of L
+
. We dene inductively an
increasing sequence of consistent sets of ws

0

1
. . .
n
. . .
as follows

0
=
Suppose that
n
has been dened. If
n

n+1
is consistent, then we set

n+1
=
n+1
.
Otherwise, if
n

n+1
is inconsistent, then
n+1
so we can set
n+1
=

n+1
.
Finally let =
n0

n
. Clearly satises our requirements.
Notice that is deductively closed; ie if , then . Otherwise,
and so and , which contradicts the consistency of .
Step 4 For each of the following ws , and so .
Eq 1 x(x = x).
Eq 2 xy(x = y y = x).
Eq 3 xyz((x = y y = z) x = z).
Eq 4 For each n-ary predicate 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
)
2006/04/17 54
Math 461 Beginning the completeness theorem.
Eq 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) , if t
1
, t
2
are
any terms, then (t
1
= t
2
t
2
= t
1
) etc.
Step 5 We construct a structure / for L
+
as follows.
Let T be the set of terms in L
+
. Dene a relation E on T by
t
1
Et
2
i (t
1
= t
2
) .
Claim 28.5. E is an equivalence relation.
Proof. Suppose that t T. Then (t = t) and so tEt. Thus E is reexive.
Next suppose that t
1
Et
2
. Then (t
1
= t
2
) . Since (t
1
= t
2
t
2
= t
1
) , it
follows that (t
2
= t
1
) . Thus t
2
Et
1
and so E is symmetric.
Similarly E is transitive.
Denition 28.6. For each t T, let
[t] = s T [ tEs.
Then we dene
A = [t] [ t T.
Denition 28.7. For each n-ary predicate symbol P, we dene an n-ary relation P
A
on A by
[t
1
], . . . , [t
n
]) P
A
i Pt
1
. . . t
n
.
Claim 28.8. 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 assumption, (s
1
= t
1
) , . . . , (s
n
= t
n
) . Since
[(s
1
= t
1
. . . s
n
= t
n
) (Ps
1
. . . s
n
Pt
1
. . . t
n
)] ,
the result follows.
Denition 28.9. For each constant symbol c, c
A
= [c].
Denition 28.10. For each n-ary function symbol f, we dene an n-ary operation
f
A
: A
n
A by
f
A
([t
1
], . . . , [t
n
]) = [ft
1
. . . t
n
].
2006/04/17 55
Math 461 Beginning the completeness theorem.
Claim 28.11. f
A
is well-dened.
Proof. Similar.
Finally we dene s: V A by s(x) = [x].
Claim 28.12 (Target). For every w of L
+
,
/ [= [s] i .
We shall make use of the following result.
Claim 28.13. For each term t T, s(t) = [t].
Proof. By denition, the result holds when t is a variable or a constant symbol. Suppose
that t is ft
1
. . . t
n
. Then by induction hypothesis, s(t
1
) = [t
1
], . . . , s(t
n
) = [t
n
]. Hence
s(ft
1
. . . t
n
) = f
A
( s(t
1
), . . . , s(t
1
))
= f
A
([t
1
], . . . , [t
1
])
= [ft
1
, . . . , t
1
]
Proof of Target Claim. We argue by induction on the complexity of . First suppose
that is atomic.
Case 1 Suppose that is t
1
= t
2
. Then
/ [= (t
1
= t
2
)[s] i s(t
1
) = s(t
2
)
i [t
1
] = [t
2
]
i (t
1
= t
2
)
Case 2 Suppose that is Pt
1
. . . t
n
. Then
/ [= 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 case when isnt atomic.
Case 3 Suppose that is . Then
/ [= [s] i / , [=[s]
i /
i
2006/04/17 56
Math 461 Beginning the completeness theorem.
Case 4 The case where is ( ) is similar.
Case 5 Finally suppose that is x. We shall make use of the following result.
Lemma 28.14 (Substitution). If the term t is substitutable for x in , then
/ [=
x
t
[s] i / [= [s(x[ s(t))].
Proof. Omitted.
Recall that is x. By construction, for some constant c,
(
x
c
) (*)
First suppose that / [= x[s]. Then, in particular, / [= [s(x[[c])] and so / [=
[s(x[ s(c))]. By the Substitution Lemma, / [=
x
c
[s]. Hence by induction hypothesis,

x
c
and so
x
c
/ . By (*), x / and so x .
Conversely, suppose that / , [=x[s]. Then there exists a term t T such that
/ , [=[s(x[[t])]. Thus / , [=[s(x[ s(t))]. Let

be an alphabetic variant of such that


t is substitutable for x in

. Then / , [=

[s(x[ s(t))]. By the Substitution Lemma,


/ , [= (

)
x
t
[s]. By induction hypothesis, (

)
x
t
/ . Since t is substitutable for x in

is
follows that (x

)
x
t
) . Hence x

/ and so x / .
Finally let /
0
be the structure for L obtained from/by forgetting the interpretations
of the new constant symbols. Then /
0
satises with s.
This completes the proof of the Completeness Theorem.
Corollary 28.15. [= i .
Theorem 28.16. Let be a set of ws in a countable rst order language. If is
nitely satisable, then is satisable in some countable structure.
Proof. Suppose that every nite subset
0
is satisable. By Soundness, every nite
subset
0
is consistent. Hence is consistent. By Completeness, is satisable in
some countable structure.
Theorem 28.17. Let T be a set of sentences in a rst order language L. If the class
( = Mod(T) is nitely axiomatizable, then there exists a nite subset T
0
T such that
( = Mod(T
0
).
Proof. Suppose that ( = Mod(T) is nitely axiomatizable. Then there exists a sentence
such that ( = Mod(). Since Mod(T) = Mod(), it follows that T [= . By the
Completeness Theorem, T and hence there exists a nite subset T
0
T such that
T
0
. By Soundness, T
0
[= . Hence
( = Mod(T) Mod(T
0
) Mod() = (
and so ( = Mod(T
0
).
2006/04/17 57
Math 461 Beginning the completeness theorem.
Denition 28.18. Let /, B be structures for the rst-order language L. Then / and
B are elementarily equivalent, written / B, i for every sentence of L,
/ [= i B [= .
Remark 28.19. If /

=B, then / B. Howevery, the converse does not hold, eg consider


a nonstandard model of arithmetic.
Denition 28.20. A consistent set of sentences T is said to be complete i for every
sentence , either T or T .
Example 28.21. Let / be any structure and let
Th(/) = [ is a sentence such that / [= .
Then Th(/) is a complete theory.
Theorem 28.22. If T is a complete theory in the rst-order language L and /, B are
models of T, then / B.
Proof. Let be any sentence. Then either T or T . Suppose that T . By
Soundness, T [= . Hence / [= and B [= . Similarly if T , then / [= and
B [= .
Theorem 28.23 (Los-Vaught). Let T be a consistent theory in a countable language
L. Suppose that
(a) T has no nite models.
(b) If /, B are countably innite models of T, then /

=B.
Then T is complete.
Proof. Suppose not. Then there exists a sentence such that T , and T , . Hence
T and T are both consistent. By Completeness, there exists countable
structures / and B such that / [= T and B [= T . By (a), / and B must
be countably innite. Hence, by (b), /

=B. But this contradicts the fact that / [=


and B [= .
Corollary 28.24. Let T
DLO
be the theory of dense linear orders without endpoints.
Then T
DLO
is complete.
Proof. Clearly T
DLO
has no nite models. Also, if /, B are countable dense linear orders
without endpoints, then /

=B. Hence T
DLO
is complete.
Corollary 28.25. Q, <) R, <).
Proof. Q, <) and R, <) are both models of the complete theory T
DLO
.
The rationals Q, <) are a countable linear order in which every possible nite
conguration is realized.
2006/04/17 58

You might also like