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

1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Embed Size (px)

Citation preview

Page 1: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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 = {mn |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 ∈ Bthen A = B.

Definition 1.1 (Subset). Let A,B be sets. Then A is a subset of B, writtenA ⊆ 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 ∈ BBecause B ⊆ A if x ∈ B then x ∈ AHence, 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 isdefined 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 ∪ Ciff x ∈ A or (x ∈ B or x ∈ C)iff x ∈ A or x ∈ B or x ∈ Ciff (x ∈ A or x ∈ B) or x ∈ Ciff x ∈ A ∪B or x ∈ Ciff x ∈ (A ∪B) ∪ C

Definition 1.3 (Intersection). Let A,B be sets. The intersection A ∩ B of Aand 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 ∩ Ciff 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 ∩ Ciff x ∈ (A ∩B) ∪ (A ∩ C)

1

Page 2: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Definition 1.4 (Set Theoretic Difference). Let A,B be sets. The set theoreticdifference 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 ∪ Ciff 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 inCiff x ∈ A and x 6∈ B and x ∈ A and x 6 inCiff 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 functionfrom A to B written f : A → B if f assigns a unique element b ∈ B to eacha ∈ 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 theconcept of an ordered pair. IE, a mathematical object 〈a, b〉 satisfying〈a, b〉 = 〈c, d〉 iff a = c and b = d. In particular, 〈1, 2〉 6= {1, 2}.

Definition 1.5 (Cartesian Product). If A,B are sets, then their CartesianProduct A×B = {〈a, b〉 |a ∈ A, b ∈ B}

Definition 1.6 (Function). f is a function from A to B iff f ⊆ A×B and foreach a ∈ A, there exists a unique b ∈ B such that 〈a, b〉 ∈ f .

In this case, the unique value b is called the value of f at a, and we writef(a) = b.

It only remains to define 〈a, b〉 in terms of set theory.

Definition 1.7 (Ordered Pair). 〈a, b〉 = {{a}, {a, b}}

Theorem 1.5. 〈a, b〉 = 〈c, d〉 iff a = c and b = d.

Proof. Clearly if a = c and b = d then 〈a, b〉 = {{a}, {a, b}} = {{c}, {c, d}} =〈c, d〉

1. Suppose a = b. Then {{a}, {a, b}} = {{a}, {a, a}} = {{a}, {a}} = {{a}}Since {{a}} = {{c}, {c, d}} we must have {a} = {c} and {a} = {c, d}. Soa = 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

Page 3: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

NB (Note Bene) - It is almost never necessary in a mathematical proof toremember that a function is literally a set of ordered pairs.

Definition 1.8 (Injection). The function f : A→ B is an injection iff (∀a, a′ ∈A) if a 6= a′ then f(a) 6= f(a′)

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→ Cis 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 aninjection and a surjection.

Theorem 1.7. If f : A→ B and g : B → C are bijections, then g ◦ f : A→ Cis a bijection.

Proof. Composition of surjections is a surjection, and compositions of injectionsare injections.

Definition 1.12 (Inverse Function). If f : A → B is a bijection, then itsinverse, f−1 : B → A is defined by f−1(b) = the unique a ∈ A such thatf(a) = b.

Remarks - If f : A→ B is a bijection, it is easily checked that f−1 : B → Ais a bijection.

In terms of ordered pairs, f−1 = {〈b, a〉 : 〈a, b〉 ∈ f}

Definition 1.13 (Equinumerous). Two sets, A and B, are equinumerous, writ-ten 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 anbe f(n). Then, a0, a1, . . . is a list of the elements of A such that every elementoccurs exactly once, and conversely, if such a list exists, then we can define abijection f : N→ A by f(n) = an

3

Page 4: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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

infinite matrix

11 →

21

31 →

21 ↙

22 ↗

32 ↙

↓ 13 ↗

23 ↙

33

Proceed through the matrix along the indicated route adding rational num-bers to your list if they have not already occurred.

Second, we declare that N ∼ Q. In the first part, we showed that there existsa 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 Cantor’s Theorem, A 6∼P(A), thus A ≺P(A).

4

Page 5: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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

Definition 1.16 (Countable). A set A is countable iff either A is finite orA ∼ 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 → Ais also a bijection, B ∼ A

3. Suppose that A ∼ B and B ∼ C. Then, there exist bijections f : A→ Band g : B → C. As f, g are bijections, g ◦ f : A→ C is also a bijection, soA ∼ C

Theorem 1.16 (Cantor-Bernstein). If A � B and B � A then A ∼ B.

The proof will be delayed.

Theorem 1.17 (Zarmelo). If A,B are any sets, then either A � B or B � A.

This proof will be omitted, though the theorem is equivalent to the axiomof choice.

Axiom 1.2 (Axiom of Choice). Suppose F is a set of nonempty sets. Thenthere exists a function f such that f(A) ∈ A for each A ∈ F. We say that f isa choice function for F

Theorem 1.18. N ∼ Q

Proof. We can define an injection f : N→ Q by f(n) = n. Hence, N � QWe 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ε+13a5b. We also define g(0) = 0.Clearly, g is an injection, so Q � NThus, 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 byf(x) = tan(πx− π

2 )

5

Page 6: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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.r1r2 . . . such that 0 ≤ rn < 9 and the expansion doesn’t end in an infinitestring 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 thatr = 0.r0r1r2 . . .. Let p0, p1, . . . be the primes in increasing order. Then f(r) ={pr0+1

0 , pr1+11 , . . .}. 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 theng(S) = 0.S0S1S2 . . . where Sn = 7 if n ∈ S and Sn = 5 if n 6∈ S (note, 7 and 5are 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 theleast infinite size.

Proof. Suppose S ⊂ N is infinite. Let S0, S1, S2, . . . be the increasing enumera-tion of S. This list witnesses that N ∼ S

Hypothesis 1.1 (Continuum Hypothesis). If X ⊆ R, then either X is count-able or X ∼ R

Theorem 1.22 (Godel and Cohen). If the axioms of set theory are consistent,then it is impossible to prove or disprove the Continuum Hypothesis from theseaxioms.

Definition 1.17 (Set of Finite Subsets). Fin(N) is the set of finite subsets ofN.

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) = ps0+10 . . . psn+1

n , 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, thenAB = {f |f : A→ B}

Theorem 1.24. NN ∼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} definedby χS(n) = 1 if n ∈ S and χS(n) = 0 if n /∈ S. The set g(S) = χS ∈ N

N.Clearly, g is an injection, and so P(N) � N

N

6

Page 7: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Next we define π : NN → P(N) by π(f) = {pf(0)+1

0 , . . . , pf(n)+1n , . . .}, where

p0, p1, . . . are the primes in increasing order.Clearly, π is an injection.Hence, N

N �P(N).So, by Cantor-Bernstein, N

N ∼P(N)

And now, a heuristic principle. If S is an infinite set, then, in general, ifeach 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 functionsf : 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).Next, we define a map π : EC(N) → N by π(g) = p

f(0)+10 . . . p

f(a)+1a , where

a is the least integer such that f(t) = f(a) ∀t ≥ a. Clearly, π is an injection,so EC(N) � N

Thus, by Cantor-Bernstein, N ∼ EC(N)

We are almost ready to prove the Cantor-Bernstein Theorem. First, we willrequire 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, thiscontradicts 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

A ∼ B

7

Page 8: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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= x′ are distinct elements of A.There are three cases:

1. Suppose x ∈ An \Cn, x′ ∈ Am \Cm for some n,m. Since h is an injection,k(x) = h(x) 6= h(x′) = k(x′)

2. Suppose x, x′ /∈ An \ Cn ∀n. Then k(x) = x 6= x′ = k(x′)

3. Without loss of generality, suppose x ∈ An \Cn for some n and x′ /∈ 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= x′ = k(x′)

Claim 3 - k is a surjection.Let c ∈ C be arbitrary. There are two cases.

1. Suppose c /∈ An \ Cn ∀n, then k(c) = c

2. Suppose c ∈ An \ Cn for some n. Since c ∈ C = C0, ∃m such thatn = m+1, since h[Am\Cm] = h[Am]\h[Cm] = An\Cn. So, ∃a ∈ Am\Cmsuch 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.r0r1 . . . rn . . . and s = 0.s0s1 . . . sn . . ., then,g(〈r, s〉) = 0.r0s0r1s1 . . . rnsn . . ..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+ 1otherwise.

This is an injection, and so P(N) � Sym(N), so, by Cantor-Bernstein,P(N) ∼ Sym(N)

8

Page 9: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Definition 1.22 (Finite Sequence). Let A be a set. Then a finite sequence ofelements of A is an inject 〈a0, a1, . . . , an〉, with ai ∈ A and n ≥ 0.〈a0, a1, . . . an〉 = 〈b0, b1, . . . bm〉 if and only if n = m and ∀i ai = bi

Definition 1.23 (Finite Sequence). 〈a0, . . . an〉 = f : {0, . . . , n} → A : f(i) =ai

Definition 1.24 (Finseq(A)). Finseq(A) is the set of finite sequences of el-emetns of A.

Theorem 1.29. If A is a nonempty countable set, then N ∼ Finseq(A)

Proof. Fix some a ∈ A. Then, we can define an injection f : N → Finseq(A) :

n 7→n︷ ︸︸ ︷

〈a, . . . , a〉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

〈a0, . . . , an〉 7→ 2e(a0)+1 . . . pe(an)+1n , 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 car-dinality, 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 ∼ A′ and B ∼ B′ and A ∩ B = A′ ∩ B′ = ∅, thenA ∪B ∼ A′ ∪B′

Proof. Since A ∼ A′ and B ∼ B′, there exist bijections f : A → A′ andg : B → B′, then we can define a bijection h : A ∪B → A′ ∪B′ by h(x) = f(x)if x ∈ A and h(x) = g(x) if x ∈ B.

Theorem 1.31. ℵ0 + ℵ0 = ℵ0

Proof. Let E be the even natural numbers and O be the odd natural numbers.So ℵ0 + ℵ0 = card(E ∪O) = card N = ℵ0

9

Page 10: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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 sub-traction.

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 iszero, then κλ = max{κ, λ}

Definition 1.28 (Cardinal Exponentiation). If κ, λ are cardinal numbers, thenκλ = card(AB) where |A| = λ and |B| = κ.

Theorem 1.33. |R| = 2ℵ0

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

{0,1} = |R|

In fact, if κ is any cardinal number, then κ < 2κ.This just restates that A �P(A)

2 Relations

Definition 2.1 (Binary Relation). A binary relation on a set A is a subsetR ⊆ A×A. We usually write aRb instead of 〈a, b〉 ∈ R

Example 2.1. 1. The order relation on N is <= {〈n,m〉 : n,m ∈ N, n < m}

2. divisibility relation on N+ is D = {〈n,m〉 : n,m ∈ N+,m divides n}

Observation: Thus P(N × N) is the set of binary relations on N. SinceN × N ∼ N, it follows that P(N × N) ∼ P(N), in particular, P(N × N) isuncountable.

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 isreflexive, symmetric and transitive.

10

Page 11: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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 Ais 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 = ∪i∈IBi

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 relationE on A by aEb iff (∃i ∈ I) such that a, b ∈ Bi. Then, E is an equivalencerelation and the E−equivalence 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) 〈a, a〉 /∈ 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). 〈A,R〉 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 〈A,R〉is a partial order if R is irreflexive and transitive.

11

Page 12: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Definition 2.12 (Isomorphism). Let 〈A,<〉 and 〈B,≺〉 be partial orders. Amap 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 〈A,<〉 an 〈B,≺〉 are isomorphic, and write 〈A,<〉 ∼=〈B,≺〉

Theorem 2.4. 〈Z, <〉 ∼= 〈Z, >〉

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. 〈N+, D〉 6∼= 〈P(N),⊂〉

Proof. N+ 6∼P(N), so no bijection exists.

Theorem 2.6. 〈R \ {0}, <〉 6∼= 〈R, <〉

Proof. Suppose f : R \ {0} → R is an isomorphism.For each n ≥ 1 let rn = f( 1

n )Then, r1 > r2 > . . . rk > . . . f(−1)Let s be the greatest lower bound of {rn : n ≥ 1}.∃t ∈ R \ {0} such that f(t) = sClearly, t < 0, thus t

2 > tf( t2 ) > s, hence ∃n ≥ 1 such that rn < f( t2 ).But then t

2 <1n and f( 1

n ) < f( t2 ), so a contradiction.

Definition 2.13. For each prime p, let Z[1/p] = { apn : a ∈ Z, n ≥ 0}

Definition 2.14 (Dense Linear Order without Endpoints). A linear order〈D,<〉 is a dense linear order without endpoints, or DLO, if the following hold:

1. if a, b ∈ D and a < b then ∃c ∈ D such that a < c < b

2. if a ∈ D then ∃b ∈ D such that a < b

3. if a ∈ D then ∃c ∈ D such that c < a

Theorem 2.7. For each prime p, 〈Z[1/p], <〉 is a DLO.

Proof. Clearly 〈Z[1/p], <〉 is a linear order without endpoints.Let a, b ∈ Z[1/p] with a < b. Then, we can express a = c

pn and b = dpm .

Adjusting c or d if necessary, we can suppose a = cpn and b = d

pn .So then a = c

pn < c+1pn ≤ d

pn = b

So, let r = cpn + 1

pn+1 = cp+1pn+1 ∈ Z[1/p]

Then, a < r < b

12

Page 13: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Theorem 2.8. If 〈A,<〉 and 〈B,≺〉 are countable DLOs, then 〈A,<〉 ∼= 〈B,≺〉

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 = {〈a0, b0〉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, andfn : An → Bn is an order preserving bijection.

We construct An+1, Bn+1, fn+1 in two steps.

1. If an+1 ∈ An, then A′n = An, B′n = Bn and f ′n = 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 A′n =An ∪ {an+1}, B′n = Bn ∪ {d} and f ′n = fn ∪ {〈an+1, d〉

2. If bn+1 ∈ B′n, then An+1 = A′n, Bn+1 = B′n and fn+1 = f ′n

Else, d0 < . . . < bn+1 < . . . < d`, where B′n = {d0, . . . , d`}.Then, ∃e ∈ A such that (f ′n)−1(d0) < . . . < e < . . . < (f ′n)−1(d`)

And so, we define An+1 = A′n ∪ {e}, Bn+1 = B′n ∪ {bn+1} and fn+1 =f ′n ∪ {〈e, bn+a〉}Finally, let f = ∪nfn, then f is an order preserving bijection between Aand B.

Corollary 2.9. 1. 〈Q, <〉 ∼= 〈Q \ {0}, <〉

2. 〈Z[1/2], <〉 ∼= 〈Z[1/3], <〉

3. If 〈D,<〉 is a countable DLO, then 〈D,<〉 ∼= 〈Q, <〉

Definition 2.15 (S extends R). Suppose R and S are binary relations on theset A. We say S extends R if R ⊆ S

Theorem 2.10. If 〈A,≺〉 is a partial order, then there exists a binary relation< extending ≺ such that 〈A,<〉 is a linear order.

3 Propositional Logic

Definition 3.1 (Formal Language). We define our formal alphabet as the fol-lowing symbols

1. The sentence connectives ∨,∧,¬,⇒,⇔

2. The punctuation symbols (, )

13

Page 14: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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

Definition 3.2 (Expression). An expression is a finite sequence of symbols fromthe alphabet.

Definition 3.3 (Well Formed Formulas). The set of well-formed formulas, orwffs, 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 applica-tions 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, manyof 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 rightparentheses.

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 symbolsL 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 definethe 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

Page 15: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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 〈a0, . . . , an〉 is a finite sequence,then a proper initial segment has the form 〈a0, . . . , as〉 where 0 ≤ s < n

Lemma 3.2. Any proper initial segment of a wff has more left than right paren-theses. 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 initialsegment of γ.

So, using the inductive hypothesis and the previous theorem, we see thatthe result also holds for α.

Theorem 3.3 (Unique Readability Theorem). If α is a wff of length greaterthan 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 omitparentheses when there is no ambiguity. These are not wffs, however, justrepresentations 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

Page 16: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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

Definition 3.9 (Tautological Implication). Let Σ be a set of wffs and ϕ be awff. Then Σ tautologically implies ϕ, written Σ |= ϕ iff every truth assignmentwhich satisfies Σ also satisfies ϕ.

Definition 3.10 (Tautology). ϕ is a tautology iff ∅ |= ϕ, ie, every truth as-signment satisfies ϕ.

Definition 3.11 (Tautological Equivalence). The wffs ϕ,ψ are tautologicallyequivalent iff {ϕ} |= ψ and {ψ} |= ϕ

Definition 3.12 (Finitely Satisfiable). Σ is finitely satisfiable if every finitesubset Σ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 appli-cations.

Theorem 3.5. Suppose Σ is an infinite set of wffs and Σ |= ϕ. Then, thereexists 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, Γ =〈V,R〉 is a graph iff E is symmetric and irreflexive.

Definition 3.14 (k-colorable). Let k ≥ 1. Then, the graph Γ = 〈V,R〉 isk-colorable if there exists a function

χ : V → {1, 2, . . . , k}

such that if aEb then χ(a) 6= χ(b)

Theorem 3.6 (Erdos). Let Γ = 〈V,R〉 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 = 〈V0, E0〉 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 ≤ kNext, we write down the set of wffs Σ which imposes suitable constraints on

truth assignments. In this case, Σ consists of the wffs

16

Page 17: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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 = 〈V0, E0〉 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 〈A,≺〉 be a countably infinite partial ordering. Then, thereexists a linear ordering 〈A,<〉 such that < extends ≺.

Proof. We work with the propositional language consisting of the sentence sym-bols 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 satisfi-

able.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

Page 18: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Theorem 3.8 (clearly false). If 〈A,<〉 is a countable infinite linear order thenA has a least element.

What goes wrong with an attempted proof by compactness? It turns out tobe impossible to translate this into a set of wffs.

Definition 3.15 (Distinct Representatives). Suppose that S is a set.Suppose 〈Si : i ∈ I〉 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 (Hall’s Matching Theorem 1935). Let S be any set and n ∈ N+.Let 〈s1, . . . , sn〉 be an indexed collection of subsets of S.

Then, the necessary and sufficient condition for the existence of a system ofdistinct 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 Hall’s theorem). As above,but cross out all reference to n.

Counterexample is S = N.

Theorem 3.11 (Infinite Version of Hall’s Matching Theorem). Let S be anyset.

Let 〈S:i ∈ N+〉 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 aredistinct.

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

Page 19: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Then, Sn1 , . . . SnNclearly satisfies Hall’s Condition.

By Hall’s Theorem, for finite collection, there exists a system of distinctrepresentatives xni

∈ Sni, 1 ≤ i ≤ N .

Let ν0 be a truth assignment such that if 1 ≤ i ≤ N and x ∈ Snithen

ν0(Cni,x) = T iff x = xni . Then ν0 satisfies Σ0.

We are now almost ready to prove the compactness theorem. The basic ideais 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 Σ ∪ {α} isn’t 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

Page 20: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Suppose Φ ⊂ ∆ is a finite subset. Then, ∃n such that Φ ⊂ ∆n. Since ∆n issatisfiable, 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, ν(β ∨ γ) = TThe other cases are similar.

Definition 3.16 (Tree). A partial order 〈T,<〉 is a tree iff the following con-ditions 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 afinite 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 〈T,<〉 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 ofimmediate successors.

5. A branch B of T is a maximal linearly ordered subset of T .

20

Page 21: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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 (Konig’s Lemma). If T is an infinite, finitely branching tree, thenT has an infinite branch.

Remark - if B is such a branch, then necessarily, |B ∩ Levn(T )| = 1 for alln ∈ N.

First, we will prove that Compactness implies Konig.

Proof. Let T be an infinite finitely branching tree. Then Levn(T ) is finite forall 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 Konig’s 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

Page 22: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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 Konig’s Lemma

Theorem 3.15 (Erdos). Let Γ = 〈V,E〉 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| < kn, 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 Konig’s Lemma, there

exists an infinite branch B through T .For each n ≥ 1, let χn ∈ B ∩ Levn(T ).Define χ =

⋃n≥1 χ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 Konig’s Lemma is equivalent to the Com-pactness 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 forinfinitely many ` ≥ 1

22

Page 23: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Clearly w satisfies Σn =⋃` ∆`

Thus, T is an infinite, finitely branching tree. By Konig’s Lemma, thereexists an infinite branch B through T .

Let νn ∈ B ∩ Levn(T ) and define ν =⋃n νn is a truth assignment which

satisfies Σ.

4 First Order Logic

Definition 4.1 (Alphabet of a First Order Language). The Alphabet of a FirstOrder 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 n−place predicatesymbols

(b) A possibly empty countable set of constant symbols

(c) For each n ≥ 1 a possibly empty countable set of n−ary functionsymbols

Example 4.1. The language of arithmetic is {+,×, <, 0, 1}, where +,× are2-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 fromthe 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 ft1, . . . , tnis a term.

Definition 4.4 (Atomic Formula). An atomic formula is an expression of theform Pt1, . . . , tn where P is an n-ary predicate symbol.

Remark- = is a 2-ary predicate symbol, so every language has atomic for-mulas.

23

Page 24: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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

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.AbbreviationsWe 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 thefirst 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 PA ⊂ 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 fA : An → A

24

Page 25: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

An Example: Suppose L has the following non logical symbols: A 2-placepredicate 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 = {〈1, 2〉, 〈2, 3〉, 〈3, 4〉, 〈4, 1〉}cA = 2 andfA : A→ A is 1 7→ 2 7→ 3 7→ 4 7→ 1Now, 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 = 〈N,+,×, <, 0, 1〉, 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 , ands : 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 → Aas 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(ft1, . . . , tn) = fA (s(t1), . . . , s(tn))

Step 2 Atomic formulas:

1. A |== t1t2[s] iff s(t1) = s(t2)

2. If P is an n-ary predicate symbol and t1, . . . , tn are terms, then A |=Pt1, . . . , tn[s]iff 〈s(t1), . . . , s(tn)〉 ∈ PA

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) onthe wff ϕ. Then, A |= ϕ[s1] iff A |= ϕ[s2]

25

Page 26: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Proof. We argue by induction on the complexity of ϕ.Suppose ϕ is atomic.First suppose ϕ is = t1t2. Then, by the homework, s1(t1) = s2(t1) and

s1(t2) = s2(t2).Hence, A |== t1t2[s1] iff s1(t1) = s1(t2) iff s2(t1) = s2(t2) iff A |== t1t2[s2]Next, suppose ϕ is Pt1, t2, . . . tnThen, s1(ti) = s2(ti) for 1 ≤ i ≤ n.Hence, A |= Pt1, . . . , tn[s1] iff 〈s1(t1), . . . , s1(t2)〉 ∈ PA iff〈s2(t1), . . . , s2(t2)〉 ∈ PA iff A |= Pt1, . . . , 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 orA 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 Σ issatisfiable.

An Application of CompactnessLet L be the language of arithmetic mentioned before.Let Th(N) = {σ : σ is a sentence which is true in 〈N,+,×, <, 0, 1〉}Consider the following set Σ of wffs: Th(N) ∪ {x > 1 + . . .+ 1︸ ︷︷ ︸

n

: n ≥ 1}

We claim that Σ is finitely satisfiable.Let Σ0 ⊂ Σ be finite.Then, Σ0 = T ∪ {x > 1 + . . .+ 1︸ ︷︷ ︸

n1

, . . . , x > 1 + . . .+ 1︸ ︷︷ ︸nt

} with T ⊂ Th(N) is a

finite subset and n1, . . . , nt ≥ 1Let m > max{n1, . . . , nt}. Let s : V → N satisfy s(x) = m.Then, 〈N,+,×, <, 0, 1〉 satisfies Σ0.

26

Page 27: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

By compactness, Σ is satisfiable.Then, A satisfies Th(N) and yet s(x) = c > 1A + . . .+ 1A︸ ︷︷ ︸

n

for any number

nSo, 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 orderlanguage L

A function f : A → B is an isomorphism iff the following conditions aresatisfied:

1. f is a bijection

2. for each n-ary predicate symbol P and a1, . . . , an ∈ A, then 〈a1, . . . , an〉 ∈PA iff 〈f(a1), . . . , f(an)〉 ∈ PB

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 α isany 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 ft1, . . . , tn, by the inductive hypothesis, we know ϕ(s(ti)) =

ϕ ◦ s(ti).Thus, ϕ(s(ft1, . . . , tn)) = ϕ(fA (s(t1), . . . , s(tn))) = ϕ ◦ s(ft1, . . . , tn))

And now we can prove the theorem

Proof. We argue by induction on complexity of a wff α.Assume α is atomic, say, Pt1, . . . , tnA |= Pt1, . . . , tn[s] iff 〈s(t1), . . . , s(tn)〉 ∈ PA

27

Page 28: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

iff 〈ϕ(s(t1)), . . . , ϕ(s(tn))〉 ∈ PB

iff 〈ϕ ◦ s(t1), . . . , ϕ ◦ s(tn)〉 ∈ PB

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 sentencesA is a model of T iff A |= σ for all σ ∈ TMod(T ) is the class of models of T .

Abbreviation: if E is a binary predicate symbol, then we write xEy insteadof Exy.

Example 4.2. Let T be the following:¬(∃x)xEx(∀x)(∀y)xEy ⇒ yExThen, 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 singlesentence.

Example 4.3. The class of graphs is finitely axiomatizableThe class of infinite graphs is axiomatizableIs 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 leastn elements”.

Consider the set of sentences Σ = T ∪ {θn : n ≥ 1}We claim that Σ is finitely satisfiableSuppose Σ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

Page 29: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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 awff.

Then, Σ logically/semantically implies ϕ, written Σ |= ϕ iff for every struc-ture 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 oflogical axioms, defined later.

Definition 4.17 (Deduction). Let Γ be a set of wffs and let ϕ be a wff. Adeduction of ϕ from Γ is a finite sequence of wffs 〈α1, α2, . . . , αn〉 such thatαn = ϕ and for each 1 ≤ i ≤ n either αi ∈ Γ ∪ Λ or there exist k, j < i suchthat αk is αj ⇒ αi

In the latter case, we say that αi follows from αj and αj ⇒ αi by modusponens (MP).

Definition 4.18 (Theorem). ϕ is a theorem of Γ, written, Γ ` ϕ iff there existsa 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 (Godel’s Completeness Theorem). If Γ |= ϕ then Γ ` ϕ.

Definition 4.19 (The Logical Axioms, Λ). ϕ is a generalization of ψ iff forsome n ≥ 0 and variables x1, . . . , xn we have that ϕ is ∀x1 . . . ∀xnψ. Whenn = 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α ⇒ αxt ), where αxt means to substitute t for all instances of x in αwhen t is substitutable for x in α.

3. (∀x(α⇒ β))⇒ (∀xα⇒ ∀xβ)

4. (α⇒ ∀xα) where x does not occur free in α.

5. x = x

6. (x = y ⇒ (α ⇒ α′)) where α is atomic and α′ is the result of replacingsome, possibly none, of the occurrences of x with y.

Explanations. A tautology is a wff which can be obtained from a propositionaltautology by substituting wffs.

αxt is the result of substituting t for each free occurrence of x in α. We sayt is substitutable for x in α if no variable of t becomes bound by a quantifier inαxt .

29

Page 30: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Now, we will prove the Soundness theorem, which is easy.We will make use of the following result

Lemma 4.13. Each logical axiom is valid.

And now, the proof of Soundness.

Proof. We argue by the minimum length n ≥ 1 of a deduction of ϕ from Γ, thatΓ |= ϕ.

If n = 1, then ϕ ∈ Γ ∪ Λ.Clearly, if ϕ ∈ Γ, then Γ |= ϕSuppose ϕ ∈ Λ. Then ϕ is valid, and so Γ |= ϕ.Next suppose n > 1.Let 〈α1, . . . , αn〉 be a deduction of ϕ from Γ. Then, ϕ must follow by modus

ponens, and so there are earlier 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 existsa 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 andA |= Γ[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 freein Γ 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ϕ, bymodus ponens.

Next, suppose that n > 1.Then, in a proof of minimum length n, ϕ follows from earlier wffs ψ and

ψ ⇒ ϕ.

30

Page 31: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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 givesus ∀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} tautologicallyimplies β, 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

Page 32: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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 thatZFC 6` 0 = 1.

Applications: Some theorems about equality:

1. ` ∀x(x = x)

Proof. ∀x(x = x) ∈ Λ

2. ∀x∀y(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) byGeneralization

3. ∀x∀y∀z(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 appliedthree times, we have ` ∀x∀y∀z(x = y ⇒ (y = z ⇒ z = x)).

Theorem 4.20 (Generalization on Constants). Assume that Γ ` ϕ and c is aconstant symbol which doesn’t occur in Γ. Then there exists a variable y whichdoesn’t occur in ϕ scuh that Γ ` ∀yϕcy. Furthermore, there exists a deduction of∀yϕcy from Γ in which c doesn’t occur.

Remark 4.4. This says that if we suppose Γ ` ϕ(c) and c does not occur in Γ,then for a suitable variable y, we have that Γ ` ∀yϕ(y).

More importantly, suppose that Γ is a consistant set of formulas in the lan-guage L . Let L + = L ∪{c} where c is a new constant symol. Then Γ remainsconstant in L +.

Proof. Suppose that (*)=〈α1, . . . , αn〉 is a deduction of ϕ from Γ. Let y be avariable with any αi. We claim that (**)=〈(α1)cy, . . . , (αn)cy〉 is a deduction ofϕcy from Γ. We will check that for all i ≤ n, either (αi)cy ∈ Γ ∪ Λ or follows byMP. We will break into cases.

1. Suppose that αi ∈ Γ. Then αi doesn’t 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

Page 33: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Let Φ be the elements of Γ which actually occur in (**). Then Φ ` ϕcy. Asy does not occur free in Φ, By generalization, Φ ` ∀yϕcy.

Hence Γ ` ∀yϕcy. Finally note that c certainly doesn’t occur in (**).Recall the proof of generalization, and we see that c also doesn’t occur in

the proof of ∀yϕcy from Γ.

Corollary 4.21. Suppose that Γ ` ϕxc where c is a constant that doesn’t occurin Γ ∪ {ϕ}. Then Γ ` ∀xϕ via a deduction in which c does not occur.

Proof. By the above theorem, Γ ` ∀y(ϕxc )cy for some variable y which doesn’toccur in ϕxc . Since c doesn’t occur in ϕ, we have that (ϕxc )cy = ϕxy . Thus,Γ ` ∀yϕxy .

By the exercise, teh following is a logical axiom: ∀yϕxy ⇒ ϕ. Thus ∀xϕxy ` ϕ.Since x doesn’t occur free in ∀yϕxy , generalization igves ∀yϕxy ` ∀xϕ.By deduction, ` (∀yϕxy ⇒ ∀xϕ), and since Γ ` ∀yϕxy by Modus Ponens, wE

get Γ ` ∀xϕ.

Theorem 4.22 (Existence of Alphabetic Variants). Let ϕ be a wff, t a termand x a variable. Then there exists a wff ϕ′ (which differs from ϕ only in thequantified variables) such that

1. ϕ ` ϕ′ and ϕ′ ` ϕ

2. t is a substitute for x in ϕ′

Proof. Omitted, see Enderton

4.2 The Completeness Theorem

Finally, we are ready to begin a proof of the completeness theorem.

Theorem 4.23 (The Completeness Theorem). If Γ |= ϕ then Γ ` ϕ.

We will make use of the following:

Lemma 4.24. The following are equivalent:

1. The Completeness Theorem

2. If Γ is consistant then Γ is satisfiable.

Proof. 1 ⇒ 2: Suppose that Γ is consistant. Then there exists a wff ϕ suchthat Γ 6` ϕ. By completeness, Γ 6|= ϕ. Hence there exists a structure A and afunction 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

Page 34: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Theorem 4.25 (Completeness). If Γ is a consistent set of wffs in a countablelanguage L , then there exists a countable structure A for L and a functions : 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 setof new constant symbols. Then Γ remains consistant in L +.

Proof. Suppose not. Then there exists a wff β of L + such that Γ ` (β ∧¬β) inL +.

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, β′ ∧ ¬β′ in L where β′ is the result of replacing each ciwith yi. Since yi is substitutable for yi in β′, Γ ` β′ ∧ ¬β′ in L . This is acontradiction.

Lemma 4.27 (Add Witnesses). Let 〈ϕ1, x1〉, . . . , 〈ϕn, xn〉 enumerate all pairs〈ϕ, x〉 where ϕ si a wff of L + and x is a variable. Let θ1 be the wff ¬∀x1ϕ1 ⇒(¬ϕ1)x1

c1 where c1 is the first new constnat which doesn’t occur in ϕ. If n > 1then θn is the wff ¬∀xnϕn ⇒ (¬ϕn)xn

cnwhere cn is the first new constant symbol

which doesn’t occur in ϕ1, . . . , ϕn, θ1, . . . , θn−1. 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. Recallthat θn+1 has the form ¬∀xϕ ⇒ (¬ϕ)xc . By rule T, we have Γ ∪ {θ1, . . . , θn} `¬∀xϕ adn Γ ∪ {θ1, . . . , θn} ` ϕxc .

Since c doesn’t 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 forevery wff ϕ of L +, either ϕ ∈ ∆ or ¬ϕ ∈ ∆.

Proof. Let α1, . . . , αn, . . . be an enumeration of the wffs of L +. We shall defineinductively 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 absur-dum, ∆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 theconsistency.

Lemma 4.29. For each of the following wffs, ∆ ` ϕ and so ϕ ∈ ∆:

34

Page 35: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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)⇒ Px1 . . . xn = Py1 . . . yn)

5. For each n-ary function symbol f , ∀x1, . . . ,∀xn,∀y1, . . .∀yn((x1 = y1 ∧. . . ∧ xn = yn)⇒ fx1 . . . xn = fy1 . . . yn)

Similarly, since ∆ is deductively closed and ∀x∀y(x = y ⇒ y = x) ∈ ∆, wehave 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 t1Et2iff (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 t1Et2. Then (t1 = t2) ∈ ∆, and so (t2 = t1) ∈ ∆, so t2Et2, 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 PA on A by

〈[t1], . . . , [tn]〉 ∈ PA iff Pt1, . . . , tn ∈ ∆.

Lemma 4.31. PA is well defined.

Proof. Suppose that [s1] = [t1], . . . , [sn] = [tn]. We must show that Ps1, . . . , sn ∈∆ iff Pt1, . . . , tn ∈ ∆. By hypothesis (si = ti) ∈ ∆ for each i.

Since ((si = ti ∧ . . . ∧ sn = tn) ⇒ (Ps1, . . . , sn ⇐⇒ Pt1, . . . , tn)) ∈ ∆, theresult follows.

For each constant symbol c, we define cA = [c], and for each n-ary func-tion symbol f , we define an n-ary operation fA on A by fA ([t1], . . . , [tn]) =[ft1, . . . , tn]. As above, fA 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 = ft1, . . . , tn. By induction, we assume that s(ti) = [ti]

for each i. Thus s(ft1, . . . , tn) = fA (s(t1), . . . , s(tn)) = fA ([t1], . . . , [tn]) =[ft1, . . . , tn].

Lemma 4.33 (Substitution Lemma). If the term t is substitutable for x in ψ,then A |= ψxt [s] iff A |= ψ[s(x|s(t))].

35

Page 36: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

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 ϕ isatomic. 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 Pt1, . . . , tn. Then A |= (Pt1, . . . , tn)[s] iff 〈s(t1), . . . , s(tn)〉 ∈PA , iff 〈[t1], . . . , [tn]〉 ∈ PA iff Pt1, . . . , 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 |= ψxc [s], and hence by the induction hypoth-

esis, ψxc ∈ ∆. Thus ¬ψxc /∈ ∆, so (*) implies that ¬∀xψ /∈ ∆. Thus ∀xψ ∈ ∆.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 ψ′ be an alphabetic variant of ψ such that t is substitutable for x in ψ′.

Then A 6|= ψ′[s(x|s(t))]. By the substitution lemma, A 6|= (ψ′)xt [s], and by theinduction hypothesis, (ψ′)ct ∈ ∆. Since (∀xψ′ ⇒ (ψ′)xt ) ∈ Λ ⊂ ∆, we must have∀xψ′ /∈ ∆. Thus ∀xψ /∈ ∆.

Finally, let A0 be the structure for L obtained by forgetting the interpre-tations 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 countablefirst order language. If Γ is finitely satifiable, then Γ is satisfiable in somecountable 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 finitesubset of Γ is consistent, Γ is consistent. By completeness, Γ is satisfiable in acountable structure.

Theorem 4.37. Let T be a set of sentences in a first order language. If theclass C = Mod(T ) is finitely axiomatizable, then there exists a finite subsetT0 ⊂ T such that C = Mod(T0)

Proof. Suppose that C = Mod(T ) is finitely axiomatizable. Then there existsa sentence σ such that C = Mod(σ), since Mot(T ) = Mod(σ), we have T |= σ.Hence by completeness, T ` σ. Thus, there is a finite set T0 ⊂ T such that T0 `σ. By soundness T0 |= σ. Hence, C = Mod(T ) ⊂Mod(T0) ⊂Mod(σ) = C .

36

Page 37: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Definition 4.22. Let A ,B be structures for the first order language L . ThenA 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, nonstan-dard arithmetic.)

Definition 4.23 (Complete Set). A consistent set of sentences is said to becomplete iff for every sentence σ, either T ` σ or T ` ¬σ.

Definition 4.24 (Theory). A theory is a set of sentences. A consistant theoryis 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 Aand B are models of T , then A ≡ B.

Proof. Let σ be any sentence. Then T ` σ or T ` ¬σ. Suppose that T ` σ. Bysoundness if T is true then σ is true. So A |= σ and B |= σ.

On the other hand, if T ` ¬σ, then by soundness we have A |= ¬σ andB |= ¬σ.

Theorem 4.39 (Los-Vaught Test). Let T be a consistent theory in a countablelanguage 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 contradictionthat 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. BYcompleteness, there exist countable models A and B of T ∪ {σ} and T ∪ {¬σ}respectively. By the first property, they are countably infinite, and by thesecond, A ' B, contradiction.

Corollary 4.40. TDLO is complete.

Proof. TDLO has no finite models. Also we have seen by the back and forthargument that any two countable dense linear orders are isomorphism, and soby L-V, we are done.

Corollary 4.41. 〈Q, <〉 ≡ 〈R, <〉

Proof. Both are models of the complete theory TDLO.

The rationals are a linear order win which ”every conceivable finite configu-ration is realized.” We next seek a graph theoretic analogue: the infinite randomgraph.

37

Page 38: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Definition 4.25. For k ≥ 1, let Pk be the dfirst order sentence in the languageof graphs which says that if x1, . . . , xk, y1, . . . , yk are distinct vertices, there ex-ists a vertex z such that z 6= xi, yi for all i, z is joined to xi for all i, and zisnot 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 Γ = 〈N, E〉 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 Γ∗ = 〈N, E∗〉 defined as follows. For each pair

n 6= m, we toss a coin. If heads, we join, if tails we don’t.

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 2−2k, and so theprobability that z doesn’t work is 1− 2−2k. Let N \ F = {z1, . . . , zn, . . .}.

Then the probability that none of the z1, . . . , zn works is (1 − 2−2k)n, andlimn→∞(1− 2−2k)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.We’ll 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 )where T = {{k, `}|1 ≤ k < ` ≤ n}. Hence |Gn| = 2|T | = 2(n

2) = 2n(n−1)/2.

Definition 4.27. If ϕ is any sentence in the language of graph theory, thenProbn(ϕ) = |{G∈Gn:G|=ϕ}|

|Gn|

This is the same probability as if we joined each pair of vertices independentlywith probability 1/2.

38

Page 39: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Theorem 4.46 (Zero-One Law). Let ϕ be any sentence in the langauge of graphtheory. 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 existsX = {x1, . . . , xk, y1, . . . , yk} such that no z in {1, . . . , n} \ X is joined to pre-

cisely the first k. For fixed X, probability of this event is(

1−(

12

)2k)n−2k

.So summing over all possible 2k subsets of X, we see that Probn(¬Pk) =(n2k

) (1−

(12

)2k)n−2k

. This is a polynomial times an exponential, and so Probn(¬Pk)→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 lan-guage. How many countable models can T have up to isomorphism?

Theorem 4.48 (Vaught). If T is a complete theory in a countable language,then T cannot have exactly two countable models.

Theorem 4.49. There exists a complete theory in a countable language whichhas exactly 3 countable models up to isomorphism.

Proof. Let L be the language with nonlogical symbols: a binary predicatesymbol <, constant symbols c1, . . . , cn, . . . , n ∈ N+. And let T be the theorywhich says < is a DLO without end points adn cn < cn+1 for n ∈ N+. Clearly,T is consistent.

Three models are 〈Q, <, n〉, 〈Q, <, 1− 2−n〉 and 〈Q, <,∑nk=1

1k2 〉.

These are the only models, as if A = 〈Q, <, cAn 〉, then limn→∞ cAn = ∞,limn→∞ cAn ∈ Q or limn→∞ cAn /∈ Q, and each corresponds to

Let Ln be the language consisting of <, c1, . . . , cn. Let Tn be a theory suchthat < is a DLO and c1 < . . . < cn. Clearly L = ∪Ln, and T = ∪Tn. Notethat Tn has no finite models, is consistent, and has a unique countable modelup to isomorphism, and so by L-V, T is complete.

Let ϕ be any sentence in L . Then there exists an n ∈ N+ such that ϕ isa sentence in Ln, and hence Tn ` ϕ or Tn ` ¬ϕ, and hence T ` ϕ or T ` ¬ϕ.Thus T is complete.

39

Page 40: 1 Elementary Set Theorysiegelch/Notes/logic.pdf · 1 Elementary Set Theory Notation: fgenclose a set. f1;2;3g= f3;2;2;1;3gbecause a set is not de ned by order or multiplicity. f0;2;4;:::g=

Theorem 4.50. For each n ≥ 3, there exists a complete theory in a countablelanguage which hs exactly n models up to isomorphism.

40