Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Institut fur
Mathematische Logik und Grundlagenforschung
An Introduction
to
Mathematical Logic
Lecture given
by
Wolfram Pohlers
worked out and
supplemented
by
Thomas Gla
Wolfram Pohlers
Thomas Gla
Institut fur
Mathematische Logik und Grundlagenforschung
Westfalische Wilhelms-Universitat Munster
Einsteinstrae 62
D 48149 Munster
Typeset AMS-LaTEX
Preface
This text is based on my personal notes for the introductory courses in Mathematical
Logic I gave at the university of Munster in the years 1988 through 1991. They have
been worked out and supplemented by Thomas Gla to whom I express my sincere
thanks for a well done job.
Our courses have been planned for freshmen in Mathematical Logic with a certain
background in Mathematics. Though self contained in principle, this text will therefore
sometimes appeal to the mathematical experience of the reader.
According to the aim of the lectures, to give the student a rm basis for further
studies, we tried to cover the central parts of Mathematical Logic.
The text starts with a chapter treating rst order logic. The examples for application of
Gentzen's Hauptsatz in this section give a faint
avour how to apply proof theoretical
methods in Mathematical Logic.
Fundamentals of model theory are treated in the second chapter, fundamentals of
recursion theory in chapter 3. We close with an outline of other formulations of (rst
order and non rst order) logics.
Nearly nothing, however, is said about set theory. This is usually taught in an
extra course. Thus there is an appendix in which we develop the small part of the
theory of ordinal and cardinal numbers needed for these notes on the basis of a naive
set theory.
One of the highlights of this text are Godel's incompleteness theorems. The true
reason for these theorems is the possibility to code the language of number theory by
natural numbers. Only a few conditions have to be satised by this coding. Since we
believe that a development of such a coding in all its awkward details could mystify
the simple basic idea of Godel's proof, we just required the existence of a suitable
arithmetisation and postponed the details of its development to the appendix.
iv Preface
I want to express my warmest thanks to all persons who helped in nishing this text.
Besides Thomas Gla { who did the work of a co-author { I want to mention Andreas
Schluter in the rst place. He did not only most of the exercises but also most of
the proof-reading. Many improvements are due to him. My thanks go also to all our
students who detected and reported errors in a rst version and gave us many helpful
critical remarks. We do not regard these notes as nished. Therefore we are still open
for suggestions and criticism and will appreciate all reports about errors, both typing
errors and possible more serious errors.
Last but not least I want to thank our secretary Martina Pfeifer who TEXed the
main bulk of this paper.
Historical Remarks : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1
Notational Conventions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3
1 Pure Logic 5
Heuristical Preliminaries : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5
1.1 First Order Languages : : : : : : : : : : : : : : : : : : : : : : : : : : : : 6
1.2 Truth Functions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 10
1.3 Semantics for First Order Logic : : : : : : : : : : : : : : : : : : : : : : : 17
1.4 Propositional Properties of First Order Logic : : : : : : : : : : : : : : : 27
1.5 The Compactness Theorem for First Order Logic : : : : : : : : : : : : : 35
1.6 Logical Consequence : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 45
1.7 A Calculus for Logical Reasoning : : : : : : : : : : : : : : : : : : : : : : 48
1.8 A Cut Free Calculus for First Order Logic : : : : : : : : : : : : : : : : : 53
1.9 Applications of Gentzen's Hauptsatz : : : : : : : : : : : : : : : : : : : : 66
1.10 First Order Logic with Identity : : : : : : : : : : : : : : : : : : : : : : : 82
1.11 A Tait-Calculus for First Order Logic with Identity : : : : : : : : : : : : 85
2 Fundamentals of Model Theory 93
2.1 Conservative Extensions and Extensions by Denitions : : : : : : : : : : 93
2.2 Completeness and Categoricity : : : : : : : : : : : : : : : : : : : : : : : 99
2.3 Elementary Classes and Omitting Types : : : : : : : : : : : : : : : : : : 109
3 Fundamentals of the Theory of Decidability 115
3.1 Primitive Recursive Functions : : : : : : : : : : : : : : : : : : : : : : : : 116
3.2 Primitive Recursive Coding : : : : : : : : : : : : : : : : : : : : : : : : : 124
3.3 Partial Recursive Functions and the Normal Form Theorem : : : : : : : 130
3.4 Universal Functions and the Recursion Theorem : : : : : : : : : : : : : 134
3.5 Recursive, Semi-recursive and Recursively Enumerable Relations : : : : 136
3.6 Rice's Theorem : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 142
3.7 Random Access Machines : : : : : : : : : : : : : : : : : : : : : : : : : : 145
3.8 Undecidability of First Order Logic : : : : : : : : : : : : : : : : : : : : : 148
4 Axiom Systems for the Natural Numbers 153
4.1 Peano Arithmetic : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 153
4.2 Godel's Theorems : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 158
v
vi Contents
5 Other Logics 165
5.1 Many-Sorted Logic : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 165
5.2 !-Logic : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 172
5.3 Higher Order Logic : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 175
Appendix 179
A.1 The Arithmetisation of NT : : : : : : : : : : : : : : : : : : : : : : : : : 179
A.2 Naive Theory of the Ordinals : : : : : : : : : : : : : : : : : : : : : : : : 188
A.3 Cardinal Numbers : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 198
Bibliography 203
Historical Texts : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 203
Original Articles : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 203
Text Books : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 206
Glossary 209
Index 215
Historical Remarks
Notational Conventions
i stands for if and only if.
; denotes the empty set.
IN is the set of natural numbers 0; 1; 2; : : :
If f : X ! Y is a function we call X the domain of f, i.e. X = dom(f): The
range of f is the set
rg(f) = fy 2 Y : 9x2X(f(x) = y)g:
If f : X ! Y is a function and Z X, then f Z denotes the restriction of f to
Z, i.e. f Z : Z ! Y
f Z(x) = f(x) for x 2 Z:
X Y is the set of functions f : Y ! X:
Pow(X) denotes the power set of X, i.e. the set of all subsets of X.
X n Y denotes the set X without Y , i.e. the set
fx 2 X : x 2= Y g:
X [ Y denotes the union of X and Y, i.e. the set
fx : x 2 X or x 2 Y g:
X \ Y denotes the intersection of X and Y, i.e. the set
fx : x 2 X and x 2 Y g:
idX is the identity on X, i.e. dom(idX ) = X and
idX (x) = x for x 2 X:
4 Notational Conventions
Chapter 1
Pure Logic
Heuristical Preliminaries
In the historical remarks we already emphasised that the development of a formal lan-
guage belongs to the main tasks of mathematical logic. To see what will be needed for
a formal language of mathematics we are going to examine examples of mathematical
propositions. Let us start with a simple one
5 j 15;
i.e. the natural number 5 divides the natural number 15, or
(3 + 4) = (2 + 5):
These propositions tell us facts about natural numbers. The rst one tells us that the
two natural numbers 5 and 15 share the property that one (the rst) divides the other
(the second). Such properties which may be shared by one or more objects (natural
numbers in our example) will be called predicates . The number of objects which may
share a predicate is called the arity of the predicate. The equality of natural numbers,
for instance, is a binary predicate. Whenever we have an n-ary predicate P and n
objects o1; : : : ; on, then (Po1 : : :on ) is a proposition , something which either can be
true or false.
The second example is a bit more complex. In it we do not longer compare two
objects but two things, 3 + 4 and 2 + 5 which are built up from objects by functions .
Such things will be called terms . Terms can be evaluated and the evaluation will
yield an object. Thus objects in predicates may well be replaced by terms and still
represent a proposition. We may even replace objects occurring in terms by terms
and still obtain a term. To get a uniform denition we could say that every object is
a term and that more complex terms are obtained by applying an n-ary function f
to already formed terms t1 ; : : : ; tn, i.e. by building (ft1 : : :tn ). Once propositions are
formed, we may compose them to more complex ones by using sentential connectives.
In colloquial language we compose ones by connectives such as
`and'
it is raining and I'm taking my umbrella,
6 I. Pure Logic
`or'
it is raining or the sun is shining,
`if : : : then'
if it is raining, then I'm going to use my umbrella,
`not' etc.
We will use the symbols ^; _; !; : to denote these connectives. Of course we will
have to give them a mathematically exact meaning (which of course should be as close
as possible to their meaning in colloquial language, because it is colloquial language
which conserves our long experience in thinking). This will be done in section 1.2.
The use of sentential connectives, however, does not exhaust all the possibilities of
forming more complex propositions. In mathematics we usually deal with structures.
Let's take the example of a group. A group G consists of a non-empty set G of objects,
together with a binary group operation, say , a neutral element, say 1, and the equality
relation. The only propositions which are legal with respect to our hitherto collected
rules are equations between terms and their sentential combinations. But this does
not even allow us to express that 1 is the neutral element of G . In order to do that we
have to say something like:
1 x = x and x 1 = x for all objects x in G:
Here x is a symbol for an arbitrary element of G, i.e. x is a variable . This variable
is quantied by saying for all x in G. Thus we also have to introduce the universal
quantier 8x (or some other name, say x; y; : : :, for the variable).
The universal quantier alone does not suce to express that G is a group. To
formulate the existence of the inverse object we have to say
8x there exists an object y with x y = 1:
Thus we need also the dual of the universal quantier, the existential quantier 9x.
Altogether this means that in order to describe a group in our formal language, we have
to allow object variables replacing objects in the formation for terms and quantiers
binding them.
These are all the ingredients for a rst order language. This language is already
quite powerful. E.g. it suces for the formalisation of group axioms, ring axioms etc.
However, one can imagine much more powerful languages. So we might introduce
variables for predicates and quantiers binding them. This would be called a second
order language. Third or even higher order languages languages can be obtained by
iterating this process, i.e. allowing the quantication over predicates on predicates etc.
Now we close our preliminary words and try to put these ideas into mathematical
denitions.
Exercises
E 1.1.1. We dene the set of permitted words (i.e. non-void nite strings) over the
alphabet fM; U; I g by the following inductive denition. There x; y are words and
concatenated words are denoted by writing them one behind the other.
1. MI is a permitted word.
2. If xI is a permitted word, so is xIU:
3. If Mx is permitted, so is Mxx:
4. If xIIIy is permitted, so is xUy:
5. If xUUy is permitted, so is xy:
Prove the following claims:
a) MUUIU is a permitted word.
b) MU is not permitted.
E 1.1.2. The set M IN is dened inductively by:
1. 2 2 M
2. Is n 2 M; so n + 3 2 M:
Prove: It is n 2 M i there is an m 2 IN with n = 3m + 2:
1.2 Truth Functions
Up to now we have only developed the syntax of rst order languages. A term or a
formula is nothing but a well-formed sequence of letters according to the rules of the
respective grammar. Therefore we need to x the meaning of the letters and of the
expressions formed out of the letters. We start by xing the meaning of the sentential
connectives. The purpose of sentential connectives is to connect propositions. A
proposition is something which either can be true or false. Thus sentential connectives
can be regarded as syntactical counterpart of truth functions and we have to develop a
theory of truth functions. We represent the truth value `true' by t, f stands for `false'.
1.2. Truth Functions 11
Denition 1.2.1. An n-ary truth function is a map from ft; f gn into ft; f g.
Now we have to give a precise meaning to the sentential connectives of colloquial
language. That is easy for negation. We dene the truth function : : ft; f g ! ft; f g
by
: (t) = f and : (f) = t:
It is also easy for ^ and _ . To make their denition more visible we arrange it in
form of truth tables.
^ t f _ t f
t t f t t t
f f f f t f
These truth tables are to be read in the following way. ^ and _ are binary truth
functions. The rst argument is in the vertical column left of the vertical line, the
second in the horizontal row above the horizontal line. The value stands at the crossing
point of the row of the rst and the column of the second argument.
A bit more subtle to dene is the implication ! formalising the colloquial if : : :
then . The truth table of ! is
! t f
t t f
f t t
This is the way how implication is dened in classical logic. The controversies about the
meaning of implication reach back to the times of Megarians and Stoics. What people
annoys is the `ex falso quodlibet' saying that ! (f; ) is always true independent from
the second argument. However, there are other interpretations of the colloquial if : : :
then statements leading to dierent kinds of logic and thus also to dierent kinds of
mathematics.
One example is intuitionistic logic which interprets if A, then B in such a way that
a proof for fact A can be converted in one for fact B. In this lecture we will restrict
ourselves to the classical interpretation of implication as given in the above truth table.
Usual mathematics is based on classical logic which uses the classical interpretation of
implication.
To study the theory of truth functions more generally we are going to introduce a
formal language. The alphabet consists of
propositional variables, denoted by a; b; a0; : : :
all connectives, i.e. names for all truth functions.
Now we are able to build up expressions only with respect to their sentential structure.
Think of propositional variables as of variables for propositions (or formulas). The
expressions build up only by this means are called sentential forms.
12 I. Pure Logic
Denition 1.2.2. We dene the sentential forms inductively as follows.
1. Every propositional variable is a sentential form.
2. If A1 ; : : : ; An are sentential forms and ' is an n-ary connective (i.e. a name for
an n-ary truth function ' ), then ('A1 : : :An ) is a sentential form.
Sentential forms are denoted by A; B; C; A0; : : :
Think of sentential forms build up by :; ^; and _: Then (using inx notation)
(:a)
(((:a) ^ b) _ a)
are examples for sentential forms.
Now let's make some conventions to spare parentheses:
outer parentheses will be cancelled
: binds more than ^; _; ! and ^; _ more than !, i.e. we will write
:A ^ B ! C _ :C
instead of
(((:A) ^ B) ! (C _ (:C)))
we will write
A1 ! A2 ! : : : ! An
instead of
(A1 ! (A2 ! (: : : ! An) : : :)):
This will also be the case if we replace ! by ^ or _.
Now we want to formalise that we think of propositional variables as variables for
propositions (which either can be true or false). Therefore we think that we have asso-
ciated a truth value with every propositional variable. Then we are able to determine
the truth value of a sentential form by successive application of the corresponding truth
functions.
A boolean assignment is a map B : A ! ft; f g; where A denotes the set of propositional
variables. Boolean assignments are denoted by B ; B 0 ; : : : We dene the value B (A) of
a sentential form A induced by a boolean assignment B as follows.
Denition 1.2.3. We dene B (A) for sentential forms A inductively. It is dened
according to the denition of the sentential forms.
1. If A 2 A , then B (A) is already given by the assignment.
2. If A = ('A1 : : :An ); where ' is a name for the n-ary truth function ' , then
B (A) = ' (B (A1 ); : : : ; B (An )).
1.2. Truth Functions 13
If B is a boolean assignment with B (a) = f and B (b) = t, then we obtain in the above
example
B (:a) = : B (a) = t
B (((:a ^ b) _ a)) = (( : B (a)) ^ B (b)) _ B (a)
= (( : f) ^ t) _ f
=t
Now we give a rst example for using `induction on the denition'.
Proposition 1.2.4. If A is a sentential form and B is a boolean assignment, then
B (A) 2 ft; f g:
Proof by induction on the denition of `A is a sentential form'.
1. If A 2 A , then B (A) 2 ft; f g according to the denition of a boolean assignment.
2. If A = ('A1 : : :An ), then we have (B (A1 ); : : : ; B (An )) 2 ft; f gn by the induc-
tion hypothesis (which applies because A1 ; : : : ; An are previously dened sen-
tential forms). Since ' is a name for an n-ary truth function ' and B (A) =
' (B (A1 ); : : : ; B (An )); it is B (A) 2 ft; f g.
Let A be a sentential form and fa1 ; : : : ; ang the set of propositional variables occurring
in A: It is obvious from Denition 1.2.3 that B (A) only depends on B fa1 ; : : : ; ang
(i.e. B restricted to the nite set fa1 ; : : : ; ang). There are only 2n many boolean as-
signments which dier on fa1; : : : ; ang. This means that there is an obvious algorithm
for computing B (A) which consists in writing down B (a1 ); : : : ; B (an ) for the 2n many
assignments which dier on fa1; : : : ; ang and then computing B (A) according to the
truth tables for the functions represented by the connectives occurring in A. For a
precise formalisation of this fact cf. the appendix (Lemma A.1.11).
Denition 1.2.5. Let A and B be sentential forms. We say that A and B are sen-
tentially equivalent, written as A B; if B (A) = B (B) for any boolean assignment
B.
Proposition 1.2.6. is an equivalence relation on the sentential forms, i.e. we have
AA
A B entails B A
A B and B C entail A C:
The following proposition gives a list of equivalent sentential forms.
Proposition 1.2.7.
a) A ^ B B ^ A; A _ B B _ A:
b) :(A ^ B) :A _ :B; :(A _ B) :A ^ :B:
14 I. Pure Logic
c) :(:A) A:
d) (A ^ B) ^ C A ^ (B ^ C); (A _ B) _ C A _ (B _ C):
e) (A ^ B) _ C (A _ C) ^ (B _ C); (A _ B) ^ C (A ^ C) _ (B ^ C):
f) A ! B :A _ B:
The proofs are obtained by mere computation of both sides.
At this point we want to single out some connectives, respectively some truth functions,
by which all other connectives, respectively truth functions, can be represented in a
way as ! is represented in Proposition 1.2.7 by : and _:
Denition 1.2.8.
a) A sentential form A1 ^ : : : ^ An, in which every Ai ; i = 1; : : : ; n is either a
propositional variable or of the form :ai for ai 2 A , is a pure conjunction.
b) Dually a sentential form A1 _ : : : _ An , where the Ai ; i = 1; : : : ; n are as above,
is called a pure disjunction (or clause).
c) A sentential form A1 ^ : : : ^ An, where all the Ai (i = 1; : : : ; n) are pure disjunc-
tions, is a conjunctive normal form.
d) Dually a sentential form A1 _ : : : _ An with pure conjunctions Ai (i = 1; : : : ; n)
is a disjunctive normal form.
The aim of the following theorem is to obtain an equivalent disjunctive normal form for
arbitrary sentential forms. How the normal form can be computed (not in the general
situation) will be performed in the following example:
(a _ :c) ^ (b _ c) (a ^ (b _ c)) _ (:c ^ (b _ c))
(a ^ b) _ (a ^ c) _ (:c ^ b) _ (:c ^ c)
(a ^ b) _ (a ^ c) _ (:c ^ b)
using Proposition 1.2.7 and the fact B (:c ^ c) = f for all boolean assignments B .
Theorem 1.2.9. Let A be a sentential form. Then there is a disjunctive normal form
B such that A B.
Proof. Let A be a sentential form. Then there are only nitely many propositional
variables, say a1 ; : : : ; an; occurring in A. We have 2n boolean assignments
B 1 ; : : : ; B 2n
and since B j (Ajk ) = t we have B i (Ajk ) = f: Fitting parts together we have for the
pure conjunctions
Ci = Ai1 ^ : : : ^ Ain; i = 1; : : : ; 2n
the fact that
B i (Cj ) = t i i = j
since B i (Cj ) = t just in the case if B i (Ajk ) = t for all k = 1; : : : ; n: Without loss of
generality we may assume that we have numbered the boolean assignments in such a
way that
B i (A) = t for i = 1; : : : ; m
and
B j (A) = f for j = m + 1; : : : ; 2n:
If m = 0 dene
B = a0 ^ :a0 :
Then we have that B is a disjunctive normal form with
AB
since B (A) = f = B (B) for all boolean assignments B . If m 6= 0 dene the disjunctive
normal form
B = C1 _ : : : _ Cm :
Then it is for i = 1; : : : ; m
B i (B) = B i (Ci ) = t = B i (A)
and for j = m + 1; : : : ; 2n
B j (B) = f = B j (A)
since it is
B j (C1 ) = : : : = B j (Cm ) = f:
So we have for all i = 1; : : : ; 2n
B i (A) = B i (B)
and we can conclude A B:
16 I. Pure Logic
Corollary 1.2.10. For any sentential form A there is a conjunctive normal form B
such that A B.
Proof. To prove the corollary we observe that, in view of Proposition 1.2.7 the nega-
tion of a disjunctive normal form is equivalent to a conjunctive normal form and vice
versa. Thus choose a disjunctive normal form B0 equivalent to :A which exists by
1.2.9. Then by 1.2.7 A ::A :B0 which by the above remark is equivalent to a
conjunctive normal form.
Denition 1.2.11. Let M be a set of connectives, i.e. names for some xed truth
functions. We call M complete if for every sentential form there is an equivalent
sentential form only containing connectives from M.
So we obtain as another immediate corollary of Theorem 1.2.9:
Theorem 1.2.12. f:; ^; _g; f:; _g and f:; ^g are complete sets of connectives.
Proof. From Theorem 1.2.9 we see that f:; ^; _g is complete. But according to 1.2.7
we can express ^ by : and _, and _ by : and ^.
At this point we have obtained a justication for taking only the connectives
^; _; :; !
into the alphabet of a rst order language (cf. Denition 1.1.1) since every other
connective can be represented by them.
Exercises
E 1.2.1 (Sheer stroke). The binary truth function j: ft; f g2 ! ft; f g is given by:
j t f
t f t
f t t
One may think of j as a connective. Prove that fjg is a complete set of connectives.
Dene the connectives :; !; _; ^ using only j.
E 1.2.2. The binary truth function
: ft; f g2 ! ft; f g is given by:
t f
t f f
f f t
One may think of
as a connective. Is f
g complete?
E 1.2.3. Let f
1 ; : : : ;
ng be a complete set of connectives. Prove or disprove that
f :
1 ; : : : ; :
n g is complete.
E 1.2.4. Prove: f^; _g is not complete.
E 1.2.5. Is f^; _; !g a complete set of connectives?
1.3. Semantics for First Order Logic 17
E 1.2.6. A king puts a prisoner to a severe test. He orders the prisoner into a room
with two doors. Behind each door there may be a tiger or a princess. Choosing the
door with the princess the prisoner will be set free. Otherwise he will be torn into
pieces by the tiger. Knowing that the prisoner is a logician, the king has mounted two
signs to the door.
The choice of the room doesn't The princess is in the other room.
make any dierence.
Exercises
E 1.3.1.
a) Prove: j= 8x(F ^ G) ! 8xF ^ 8xG:
b) Let L be a rst order language including a constant symbol 0: Determine L-
formulas F and G with
6j= 8x(F _ G) ! 8xF _ 8xG:
E 1.3.2. Let L be a rst order language and P a predicate symbol of L: Which of the
following formulas are valid?
a) (F ! G) ! ((F ! :G) ! :F)
26 I. Pure Logic
b) 8xF ! 9xF
c) 8y9xP yx ! 9x8yPyx
d) 9xF ^ 9xG ! 9x(F ^ G)
E 1.3.3.
a) Let S be an L-structure. Prove that if
S j= G ! F and x 2= FV(G)
so one has
S j= G ! 8xF
b) Is the condition x 2= FV(G) necessary? Prove your claim.
E 1.3.4. Prove Lemma 1.3.5. Hint: Show rst that for a term s also sx (t) is a term
with
FV(sx (t)) FV(t) [ (FV(s) n fxg):
Do we have in general
FV(Fx(t)) = FV(t) [ (FV(F) n fxg)?
E 1.3.5. Let F be an L-formula, S an L-structure and an S -assignment. Prove:
S j= F[] , SS j= F[]:
E 1.3.6.
a) Determine a rst order language LV S suited for talking about a vector space and
its eld.
Hint: use a binary predicate symbol `='.
b) Formulate a theory (a set of sentences) TV S in the language LV S such that for
all LV S I-structures S (i.e. LV S -structures interpreting =S by f(s; s) : s 2 S g,
cf. also section 1.10) one has: S j= TV S , S consists of a eld and vector space
over this eld.
c) Dene the LV S I-structure S of the continuous functions over the eld R of the
real numbers.
d) Determine LV S -formulas F and G such that the following holds in all LV S I-
structures S with S j= TV S :
1. s1 ; : : : ; sn 2 S are linear independent , S j= F[s1; : : : ; sn]:
2. s1 ; : : : ; sn 2 S form a vector space basis , S j= G[s1 ; : : : ; sn ]:
E 1.3.7.
a) Let S be an L-structure and an S -assignment. Prove:
S j= 9xF [] , S j= 9yFx (y)[]
if y 2= FV(F) [ BV(F):
1.4. Propositional Properties of First Order Logic 27
b) Is the condition y 2= FV(F) [ BV(F) in a) necessary? Prove your claim.
c) Let S be an L-structure and a S -assignment. Now let F and F~ be two L-
formulas which are obtained by renaming bounded variables. Prove:
~
S j= F[] , S j= F[]:
E 1.3.8. Let F be an L-sentence with FV(F) = fx1; : : : ; xng. Prove for any L-
structure S it is
S j= F , S j= 8x1 : : : 8xnF:
E 1.3.9. Let LIN = (0; 1; +; ; <; =) be the language of number theory and N =
(IN; 0; 1; +; ;<; =) the LIN -structure of the natural numbers. Determine LIN-formulas
F and G such that
1. N j= F[n] , n 2 IN is prime
2. N j= G , there are innitely many prime twins.
Because F B = t or (:F)B = t it is
0 0
[
C n+1 = fcSn : c 2 C [
+1
Km g
mn+1
and Sn+1 = (S; C n+1 ; F; P): We have to show that Sn+1 j= F[] for all F 2 HL such
that degH (F) n+1: If degH (F) n this follows from the induction hypothesis since
Sn is the Ln-retract of Sn+1: If F = Gx(t) ! 9xG we have Sn+1 j= F[] already by
1.5.1. Thus assume that
F = 9xG ! Gx (c9xG ) with degH (c9xG ) = n + 1:
40 I. Pure Logic
If Sn+1 6j= 9xG[], then trivially
Sn+1 j= 9xG ! Gx (c9xG)[]:
If otherwise
Sn+1 j= 9xG[]
we already have Sn j= 9xG[] because 9xG 2 Ln and Sn is the Ln-retract of Sn+1 :
Thus c9SxG
n = (x) for some such that S j= G[ ]: By 1.3.6 this entails S
+1
x n n+1 j=
Gx (c9xG)[]: Altogether this yields
Sn+1 j= 9xG ! Gx (c9xG)[]:
S
Finally we dene K = n2IN C n and SH = (S; K; F; P) which gives us the desired
expansion.
Theorem 1.5.8 (Compactness theorem for rst order logic). Let M be a set
of L-formulas such that every nite subset of M is consistent, then M is consistent.
Proof. Let M be a nitely consistent set of L-formulas. First we show M [ HL is
nitely consistent. If N M [ HL is nite, then we may decompose N = M0 [ H0
where M0 M and H0 HL are both nite. Thus M0 is consistent which gives us an
L-structure S and an S -assignment with S j= F[] for all F 2 M0 : By 1.5.7 we have
an LH -expansion SH of S such that SH j= F[] for all F 2 H0: Thus SH j= F[] for
all F 2 N and we are done.
M [ HL is of course a Henkin set. The nite consistency of M [ HL trivially
entails the nite sentential consistency of M [ HL: By the compactness theorem for
propositional logic we obtain the sentential consistency of M [ HL which by 1.5.4
means that M [ HL is consistent. Since M M [ HL this comprises the consistency
of M:
Now we are going to reformulate this theorem. Therefore we make the following
denition (cf. also Denition 2.1.1).
Denition 1.5.9. Let L be a rst order language and M a set of L-sentences. An
L-structure S is a model of M, brie
y S j= M, if we have S j= F for all F 2 M:
The following corollary is just the same as Theorem 1.5.8.
Corollary 1.5.10. Let M be a set of L-sentences. Then M has a model i every
nite subset of M has one.
Before we present some consequences of the compactness theorem we are going to take
a look at a consequence of the proof.
For a rst order language L = L(C ; F ; P ) we dene
card(L) = card(C [ F [ P );
i.e. we mean by the cardinality of a language the cardinality of the set of its non-logical
symbols.
1.5. The Compactness Theorem for First Order Logic 41
Lemma 1.5.11. Let L be a rst order language. Then the Henkin extension LH has
the cardinality
card(LH ) = max(@0 ; card(L)):
Proof. This is indicated in the exercises for card(L) @0: But the general statement
is obtained by a similar proof.
Theorem 1.5.12. Let M be a set of L-sentences. If M has a model, then M has a
model S of cardinality card(LH ); i.e. it is
card(S) = max(@0 ; card(L)):
Proof. For card(L) @0 this will be proved in the exercises. Nearly the same proof
yields the theorem. Here we will restrict ourselves only by stating that the claim could
be extracted from the proof of the compactness theorem. The model S is the structure
of the same name constructed in the proof of Theorem 1.5.4.
The compactness theorem for rst order logic is one of the most important theorems
of pure logic. We are going to use it over and over again. Just to give a
avor of
its power we want to sketch how to use it in the construction of a model of the real
numbers containing innitesimals.
First let LIN = (0; 1; +; ; <; =) be the language of number theory. Dene
Th(N ) = fF 2 LIN : F is LIN -sentence and (IN; 0; 1; +; ; <; =) j= F g:
Then Th(N ) is consistent by denition. Let c be a new constant symbol and dene a
set of sentences
M = Th(N ) [ fn1 <c : n 2 INg
where n1 stands for the term |1+ :{z: :+1}. If N M is a nite subset, then N = N0 [ N1
n-times
where
N0 Th(N ) and N1 = fn1 1<c; : : : ; nk 1<cg:
Put n = maxfn1; : : : ; nk g and dene cN = n + 1: Then
N = (IN; 0; 1; n + 1; +; ; <; =)
is a model of N: Thus every nite subset of M has a model and by the compactness
theorem { therefore so has M. Call this model N : Then there is a `number' cN in the
domain of N which is larger than all n 2 IN and obviously N j= Th(N ).
But we promised to show that there is an extension of the reals containing innites-
imals. To get this let L be the language of reals (we don't need to specify L further)
and denote the extended language which has constant symbols for all reals by LR .
Take the LR -expansion RR of R. It is
Th(RR) = fF 2 LR : F is LR -sentence and RR j= F g:
42 I. Pure Logic
Now put
M = Th(RR) [ fn1<c : n 2 INg
where c is a new constant symbol. Clearly M is nitely satisable and thus has a
model R: R contains cR which is bigger than all natural numbers and thus { recall
that R is an Archimedian eld { bigger than all reals. Conversely (cR) 1 is smaller
than all positive reals. We call an element 2 R nite if there is an r 2 R such that
jj < r:
2 R is innitesimal if
jj < r
for all 0 < r 2 R: We say ; 2 R are innitesimally close if j j is innitesimal.
In this case we write
:
Now we can prove the following result: For every nite 2 R there is an uniquely
determined r0 2 R with
r0 :
To see that r0 exists we dene
r0 = supfr 2 R : r < g:
Because is nite the set
fr 2 R : r < g
is bounded in R and so the supremum exists in R. This means
r0 2 R:
By the denition of r0 it is
r0 r
for all 0 < r 2 R: Since also
r0 r
for all 0 < r 2 R it is ( r0) r: Hence
j r0j r
for all 0 < r 2 R; which shows
r0 :
That r0 is uniquely determined can be seen as follows: let r0 and r1 with
r0; r1 2 R: Then it is
0 jr0 r1j j r0 j + j r1j 2r
for all 0 < r 2 R: Since r0 r1 2 R we must have r0 = r1: So we have a map
st : R ! R
1.5. The Compactness Theorem for First Order Logic 43
mapping a nite element 2 R on its standard part, i.e. onto the uniquely determined
r 2 R such that r: Just to get an impression how to use innitesimals, continuity
for functions on R is dened by
f is continuous in x , 8"(" 0 ! f(x + ") f(x))
and the derivative is just
f 0 (x) = st f(x + ")" f(x) for some " 0:
We leave this topic now and advise the interested reader to look at, e.g. the book of
A. E. Hurd and P. A. Loeb: An Introduction to Nonstandard Real Analysis.
After this trip to the real numbers we will discuss the limitations for the expressive
power of rst order logic which are implied by the compactness theorem. Therefore
we give an example concerning group theory. If we want to express that a group has
the torsion property we would like to say
8x9n 1(xn = 1):
This seems to be expressible in the language of group theory. But in fact we have
made a not-rst-order statement. This may be clear by syntactical point of view since
xn abbreviates x| :{z: : x}
n-times
and the quantier 9n 1 does not range over the elements of an intended structure
but over natural numbers. Therefore the torsion property would look like
8x(x = 1 _ x x = 1 _ x x x = 1 _ : : :):
But this is an innite expression and no rst order sentence. Now let us see why there
cannot be any set of rst order sentences expressing the torsion property: this is a
consequence of the compactness theorem. Therefore assume that there is a set M of
LGT -sentences such that for any group G
G j= M i G has the torsion property.
Now let AxGT be the set of section 1.3 such that for any LGT -structure S we have
S j= AxGT i S is a group
still assuming that = is interpreted by f(s; s) : s 2 S g; i.e. = is interpreted standardly.
Why we do not have to worry about standardness will be claried in section 1.10. Take
T be AxGT plus the sentences
:(cn = 1) for every n 1
44 I. Pure Logic
where c is a new constant symbol. But then every nite set of T [ M has a model
since there are only nitely many sentences containing the new constant symbol. All
we have to do is to nd a group with the torsion property in which c can be interpreted
by an element of order N, where N is bigger than all n such that
:(cn = 1)
occurs in the given nite set of sentences. Such a group is for example the direct sum
of all groups
Z=pZ
where p is a prime. So by the compactness theorem we nd a model of M [ T: And if
we assume that = is interpreted standardly, then the retract to LGT is a structure G
such that
G j= AxGT ; i.e. G is a group
and G has not the torsion property since for g = cG 2 G we know
gn 6= 1 for every n 1
since G j= T: So we have G j= M but G does not have the torsion property. In the
exercises we will give a lot of similar examples.
Pursuing the subject of logic we shall next study the notion of logical consequence.
Exercises
E 1.5.1. A partial ordering on X (cf. E 1.4.2) is called linear if
8x; y2X(x y _ y x):
A linear ordering is a well-ordering if for any sequence (xn)n2IN X there is a k 2 IN
with xk xk+1: Prove that there is no L(; =)-theory T; such that for all LI-structures
(cf. E 1.3.6) S = (S; S ; =S )
S j= T ,S is a well-ordering on S:
E 1.5.2. Prove that there is no LV S -theory T (cf. E 1.3.6) such that for all LV S I-
structures S
S j= T , S is a nitely dimensional vector space over a eld.
E 1.5.3. Let LR= L(fx : x 2 Rg; ff : f : Rn ! R; n 2 INg; f=; <g), where R are
the real numbers. Let R be the LR-structure with domain R, where all symbols are
interpreted canonically. Prove that there is an LRI-structure R (cf. E 1.3.6) such
that for all LR-sentences F
R j= F , R j= F
and there is r 2 R with
R j= r<x[r]
for all r 2 R:
1.6. Logical Consequence 45
E 1.5.4. A language L = L(C ; F ; P) is countable if C [ F [ P is nite or countably
innite. Let L be countable.
a) Prove that there are only countably many L-terms and L-formulas.
b) Prove that the Henkin-language LH is countable.
c) If M is a set of L-sentences and there is an L-structure S with S j= M, then
there is a countable L-structure S 0 with S 0 j= M:
E 1.5.5. Let TF be the theory of elds. TOF ; the theory of ordered elds is obtained
by TF adding a binary predicate symbol < and the following axioms:
1. 8x(:x < x)
2. 8x8y8z(x < y ^ y < z ! x < z)
3. 8x8y(x < y _ x = y _ y < x)
4. 8x8y8z(x < y ! x + z < y + z)
5. 8x8y8z(x < y ^ 0 < z ! x z < y z)
A structure S j= TOF is called Archimedian ordered of for any s 2 S there is an n 2 IN
such that
S j= x < 1| + :{z: : + 1}[s]
n-times
a) Prove that there is no theory T such that for all LI-structures S (cf. E 1.3.6)
S j= T , S is an Archimedian ordered eld.
b) If there is an LOF -sentence F with S j= F for all ordered non-Archimedian elds
S , so S 0 j= F for all ordered elds S 0 :
E 1.5.6. Let L be a rst order language. Dene a theory T such that for any L-
structure S
a) S j= T , S has 3 elements.
b) S j= T , S has innitely many elements.
c) Is F an L-sentence such that for all innite L-structures S one has S j= F, then
there is an m > 0, such that S 0 j= F for all L-structures S 0 with at least m
elements.
Exercises
E 1.7.1.
a) Let M be a set of L-formulas with x 2= FV(M) and M ` F: Prove that M ` Fx (t)
for any L-term t with FV(t) \ BV(F) = ;:
b) Is x 2= FV(M) a necessary condition? Prove your claim.
E 1.7.2. Give derivations ; ` F of the following formulas where P; Q; R are predicate
symbols.
a) 9x8yPxy ! 8y9xP xy
b) 8x(Qx ! Rx) ! (8xQx ! 8xRx):
E 1.7.3.
a) ; ` 9xF $ 9yFx (y) for y 2= FV(F)
b) Let F; F~ be two formulas which are obtained by renaming bound variables. Prove:
1) ; ` F $ F~
2) M ` F i M ` F: ~
c) Mx (c) ` Fx(c) implies M ` F
E 1.7.4. Prove Proposition 1.7.7.
E 1.7.5. In the proof of the completeness theorem we demanded Hk+1; : : : ; Hm to be
ordered in a certain way. Is this necessary?
1.8. A Cut Free Calculus for First Order Logic 53
1.8 A Cut Free Calculus for First Order Logic
The calculus just developed is usually called a `Hilbert style' calculus because similar
calculi already were proposed by David Hilbert [ 1862, y1943]. Again we want to
emphasise that developing this calculus we achieved a considerable reduction of the
complexity of the notion of logical validity and logical consequence. In order to check
whether a formula belongs to the set
Con(M) = fF : M j= F g
of logical consequences of a given set M we have, according to the denition, to consider
all L-structures S and all S -assignments : Then we have to check S j= M[] and in
case that this holds also S j= F[]: This seems to be a quite complicated procedure.
For the syntactical calculus, however, this becomes much simpler. We may even
construct a (hypothetical) machine, which works according to the rules of the Hilbert
style calculus, and this machine will, step by step, produce all logical consequences of
M (provided that M is given in a form which allows to be stored in the machine). To
check whether F is a consequence of M we just have to wait until F appears in the
list produced by the calculus. If F really belongs to Con(M) we eventually will get
the answer `Yes'. However, if F 2= Con(M), we don't get any answer. All we know is
that F did not yet show up. But we never can be sure whether F will show up in the
future or not. Thus we do not really have a decision procedure. Later on we will show
that such a decision procedure cannot exist (cf. Theorem 3.8.2).
In this section, however, we want to introduce a calculus which allows us to search
for a proof of F: In order to develop this calculus we need some observations. The
compactness theorem which is a deep theorem for the semantical notion of logical
consequence is obviously trivial for the syntactical notion of logical consequence:
M ` F implies fF1; : : : ; Fng ` F for some fF1; : : : ; Fng M:
In a derivation of M ` F we can use only nitely many M-axioms. This proves that the
compactness theorem also follows from the completeness theorem. We did it the other
way round and deduced the completeness theorem from the compactness theorem (in
fact the compactness theorem for sentential logic was sucient). Thus there is a nite
subset fF1; : : : ; Fng M such that M ` F , fF1; : : : ; Fng ` F: So it would suce
to dene fF1; : : : ; Fng ` F: By the deduction theorem this is equivalent to
fF1; : : : ; Fk g ` Fk+1 ! : : : ! Fn ! F
or
fF1; : : : ; Fkg ` :Fk+1 _ : : : _ :Fk _ F:
If we omit the _-symbol on the right hand we obtain gures of the form
(1.2) A1 ; : : : ; An ` S1 ; : : : ; Sm
whose semantical interpretation is
A1 ^ : : : ^ An j= S1 _ : : : _ Sm :
54 I. Pure Logic
According to Gerhard Gentzen [ 1909, y1945] gures of the form displayed in (1.2)
are called sequents . The formulas A1 ; : : : ; An are the antecedents while S1 ; : : : ; Sm
are the succedents of the sequent.
Gentzen used the notions of sequents to prove his famous `Hauptsatz' (1935) which
roughly says that for every derivable formula F there is already a derivation without
detours, which means that it only uses sub-formulas of F: Of course this cannot be true
in full generality. Since there are only nitely many sub-formulas of F this would give
us a decision procedure. We are going to explore what a derivation without detours
really means. We will, however, not do this in the original Gentzen-style, but use a
simplication of the calculus due to William W. Tait (1968). The observation he
made is that
F1; : : : ; Fm ` G1 ; : : : ; Gn
is { according to the deduction theorem { equivalent to
` :F1; : : : ; :Fm; G1; : : : ; Gn:
So there is indeed no need to distinguish between antecedent and succedent formulas.
All we need is to derive nite sets of formulas whose semantical meaning is that of the
disjunction of these formulas.
Negated formulas take over the role of antecedents, non-negated that of succedents.
But we can even dispense with the negation symbol and thus completely abolish the
dierence between antecedent and succedent formulas. We will follow this line because
then the calculus gets a beautiful symmetrical formulation which makes it easy to
handle. Thus we have to alter the language for the Tait-calculus a little.
Denition 1.8.1. Let L = L(C ; F ; P) a rst order language. The Tait-language LT
for the language L is given by the following alphabet:
1. Variables as usual. (This means as in Denition 1.1.1)
2. The sets C and F as usual.
3. The set P of predicate symbols together with a set P = fP : P 2 Pg: It is
#P = #P:
4. The sentential connectives ^; _ and the quantiers 8; 9.
5. Auxiliary symbols as usual.
For example, the Tait-language for group theory obtains a binary predicate symbol =,
too. The intended meaning of = is, that it should be interpreted as 6=.
The grammars for forming terms and formulas are not altered. An L-structure S
is also a structure for the Tait-language for L: The interpretation of the new predicate
symbols is given by
P S = f(s1 ; : : : ; sn ) : (s1 ; : : : ; sn ) 2= P S g:
Thus P is a symbol for the complement of P: Although negation does not belong to
the alphabet of the Tait-language for L we may dene it by the following clauses:
1.8. A Cut Free Calculus for First Order Logic 55
Denition 1.8.2. For a formula F of a Tait-language F is dened by induction on
the denition of the formulas.
1. (Pt1 : : :tn) = (Pt1 : : :tn ); (Pt1 : : :tn ) = (Pt1 : : :tn )
2. (F ^ G) = (F _ G); (F _ G) = (F ^ G)
3. (8xF ) = (9xF); (9xF ) = (8xF)
As an easy consequence of the denition we get the syntactical property
(F) = F:
The intended meaning of F was that of :F: To see that we really met this intention
we prove the following proposition.
Proposition 1.8.3. Let S be an L-structure, an S -assignment and F an L-formula.
Then it is
ValS (F; ) = : ValS (F; ):
Proof by induction on the denition of F:
1. If F = Pt1 : : :tn , then F = Pt1 : : :tn and if F = Pt1 : : :tn , then F =
Pt1 : : :tn : By denition it is
ValS (Pt1 : : :tn ; ) = : ValS (Pt1 : : :tn ; ):
2. All other cases follow from the induction hypothesis using Proposition 1.3.13.
In the following we are going to denote nite sets of formulas by capital Greek letters,
; ; ; : : :
Denition 1.8.4. We dene the Tait-calculus for a language L. The relation T
is dened inductively as follows. Let be a set of LT -formulas.
1. If fP; P g for an atomic LT -formula P, then T (L-axiom)
2. T ; F and T ; G imply T ; F ^ G (^-rule)
3. T ; Fi for i = 1 or i = 2 implies T ; F1 _ F2 (_-rule)
S
4. T ; Fx(y) and y 2= FV() = fFV(F) : F 2 g implies
T ; 8xF (8-rule)
5. T ; Fx(t) for some term t implies T ; 9xF (9-rule)
The formulas shown explicitly in the conclusion are called the main formulas of the
inferences. Remark that, due to the fact that we derive sets of formulas, two occur-
rences of a particular formula are automatically contracted into one. Especially it is
possible for the main formula to occur in the premise of an inference. The typical
case for this phenomenon, which will become particularly important in the proof of
56 I. Pure Logic
the completeness theorem 1.8.15 and in Herbrand's theorem 1.9.8, is the following: If
we have derived T 9xF; Fx(t) we can conclude
T 9xF:
Now we give some technical results about the Tait-calculus which will be proven in the
exercises.
Proposition 1.8.5.
a) T ; F and F~ is obtained from F by renaming bounded variables implies
~
T ; F:
b) T implies T x (t):
c) (Structural rule) T implies T ; :
d) (_-inversion) T ; F0 _ F1 implies T ; F0; F1:
e) (^-inversion) T ; F0 ^ F1 implies T ; F0 and T ; F1:
In a rst step we show the soundness of the Tait-calculus. We dene
_
: = fF : F 2 g S j= i S j=
and prove the following lemma.
Lemma 1.8.6. If T , then : is inconsistent.
Proof. We prove this lemma by induction on the denition of T : In case of an
L-axiom we have fP; P g : Thus fP; P g : which entails the inconsistency
of :: To consider the following cases we rst have to make some remarks.
Let us assume that the last inference is of the form:
(1.3) T i; Fi for i 2 I ) T 0 ; F
where F is the main formula of that inference and = 0 [ fF g: We want to restrict
ourselves only to the case that in (1.3) we have i = 0 = which case is possible
by the above mentioned contractions. All the other cases are handled in a similar way
or can be reduced to that case by an application of the structural rule.
In the case of the ^-rule
T ; F and T ; G ) T ; (F ^ G)
we get the inconsistency of :; F and :; G by induction hypothesis. Let S be
an L-structure and an S -assignment such that S j= :[]: Then S j= F[] and
S j= G[]: Hence S j= (F ^ G)[] which entails
S 6j= :; (F ^ G)[]:
1.8. A Cut Free Calculus for First Order Logic 57
So :; (F ^ G) is inconsistent. In case of the _-rule for i 2 f1; 2g
T ; Fi ) T ; F1 _ F2
we have by the induction hypothesis the inconsistency of ; Fi: Thus if S j= :[] we
get S j= Fi[] and therefore also S j= (F1 _ F2)[]: Hence :; (F1 _ F2) is inconsistent.
If we have
T ; Fx(y) ) T ; 8xF
according to the 8-rule, then :; Fx(y) is inconsistent by the induction hypothesis.
Assume S j= :[]: Then we have S j= Fx(y)[]: If is any S -assignment with y
we have since y 2= FV()
S j= :[ ]
and because :; Fx(y) is inconsistent it follows
S j= Fx (y)[ ]:
So up to now we have proven
S j= 8yFx (y)[]:
Using renaming bounded variables (cf. Exercise E 1.3.7) we obtain S j= 8xF [] which
proves the inconsistency of :; 8xF: Finally assume an instance
T ; Fx(t) ) T ; 9xF
of the 9-rule. Again we have the inconsistency of :; Fx(t) by induction hypothesis.
If S j= :[] we get S j= Fx (t)[]: Put
(
(z) = (z) for z 6= x
S
t [] for z = x:
Then x and (x) = tS [] which entails S j= F[ ]: Thus S j= 9xF [] and
:; 9xF is inconsistent.
Theorem 1.8.7 (Soundness of the Tait-calculus). T F implies j= F:
Corollary 1.8.8.
a) T ; F entails : j= F
b) T ; F entails : ` F
Proof. We have : j= F i : [ fF g is inconsistent by 1.6.3. Thus we get a) by
1.8.6. b) follows from a) by the completeness theorem.
Our next aim is to show that j= F also entails T F; i.e. to prove the completeness of
the Tait-calculus. Since we already have a completeness theorem the simplest idea to
do this is to prove ` F ) T F by induction on the derivation of F in the Hilbert-
style calculus. It is not too hard to see that T F1; : : : ; Fn holds for all boolean valid
58 I. Pure Logic
formulas F1 _ : : : _ Fn : It is also easy to prove T Fx (t) ! 9yFx (y) and to show that
T F _ G entails T 9xF _ G for x 2= FV (G):
However, we cannot yet show that T F; T F _ G entails T G: So in order
to carry out this proof we need a rule
(cut) T ; F and T ; F ) T
known as the cut-rule. The addition of the cut-rule will of course not spoil the correct-
ness of the calculus. Thus one way to get the completeness of T would be rst to
add the cut-rule and afterwards to try to get rid of it again. This is indeed a tractable
way and we are going to follow it in the exercises. Here we choose the dierent way
to prove directly the completeness of the Tait-calculus. For this we rst need some
notations. The idea of the proof is to dene a search tree which searches for the proof
of a given formula F: Such an idea has been proposed by Kurt Schutte [ 1909] for
the rst time.
However, since the Tait-calculus derives sets of formulas we are forced to dene
search trees for sets : The search has of course to follow a certain strategy which
investigates the formulas in the set : Therefore we need to order the formulas in
such that we can handle them according to their order. We will therefore, for the
rest of this section, interpret as a nite list. This means that there is a dierence
between = (A; B; C) and 0 = (B; A; C):
Denition 1.8.9. Let = (F1; : : : ; Fn) be a nite list of LT -formulas.
a) A formula F 2 is irreducible in if it is atomic. Otherwise we call F a redex
of :
b) A redex in is distinguished if it is leftmost, i.e. a redex Fj 2 is distinguished
if all Fi with i < j are irreducible.
c) The reductum r of is obtained by cancelling the distinguished redex in :
To dene the search tree for a nite list of formulas we rst have to dene the notion
of a tree. For = (x = y; 8x(x 1 = x); 9y(y 6= 1)), where we wrote 6= instead of =
we have
x = y irreducible
8x(x 1 = x) the distinguished redex
and
r = (x = y; 9y(y 6= 1));
where 9y(y 6= 1) is the distinguished redex in r : Here we are going to identify n 2 IN
with the ordinal
n = f0; : : : ; n 1g
as we do in the appendix. Instead of n 2 IN we will often write
n<!
because we identify IN with the least limit ordinal !:
1.8. A Cut Free Calculus for First Order Logic 59
Denition 1.8.10.
a) A number sequence is a map : n ! ! where f0; : : : ; n 1g = n < !: We call
dom() = n also the length of : By !<! we denote the set of number sequences.
is an initial segment of , written as , if (k) = (k) for all k 2 dom():
Number sequences are denoted by ; ; 0; : : :
b) A tree is a nonempty subset T !<! which is closed under initial segments,
i.e. if 2 T, then 2 T: 2 T is called a node in T: A node 2 T
is topmost if _ hni 2= T for all n < !: (_ hni denotes the map with domain
dom()+1 such that _ hni(dom()) = n, i.e. if = hs0 ; : : : ; sk i, then _ hni =
hs0 ; : : : ; sk ; ni):hi; the empty map, is a member of any tree. We call hi the root
of T:
c) Let f : ! ! be a map with dom(f) = !: f n is dened by f n(k) = f(k)
for k < n: f is a path in T if f n 2 T holds for all n 2 dom(f). T is well-founded
if every path in T is nite, i.e.
8f 2 !! 9n(f n 2= T):
f is a path through T if the path f is either topmost in T or dom(f) = !:
= =1 =1
x y; x ;x h0; 0i h1; 0i x = 1 ( = 1) = 1
; x ;x
( = 1) _ = 1 =
x x ; x y h0i h1i ( = 1) _ = 1 = 1
x x ;x
@@
hi
The combination of the principal syntactical and semantical lemma yields the com-
pleteness theorem.
Theorem 1.8.15 (Completeness of the Tait-calculus). j= F1 _ : : : _ Fn implies
T F1; : : : ; Fn:
Proof. First we remark that we need not bother about the restriction of L being
countable in the proof of the principal syntactical and semantical lemma as we can
restrict the language L to those non-logical symbols which occur in F1; : : : ; Fn. Assume
that T F1 ; : : : ; Fn is false. Then, by the principal syntactic lemma, there is a search
path for F1; : : : ; Fn which does not contain an axiom. This, by the principal semantic
lemma, entails that there is a structure S and an S -assignment with S 6j= Fi [] for
i = 1; : : : ; n: Hence 6j= F1 _ : : : _ Fn:
Assume that we have any calculus K: We call an inference rule
F1; : : : ; Fn ) G
admissible for K if K F1; : : : ; K Fn imply K G:
Theorem 1.8.16 (Weak form of Gentzen's Hauptsatz). The cut rule
F ! G; G ! H ) F ! H
is admissible for the Tait-calculus.
Proof. Assume T F _ G and T G _ H: Then we have j= F _ G and j=
G _ H by the soundness theorem 1.8.7. Hence j= F _ H which by the completeness
theorem 1.8.15 entails T F; H: By two inferences (_) this entails T F _ H:
We call 1.8.16 the weak form of Gentzen's Hauptsatz, since we did not show that there
is a terminating procedure for the elimination of (cut). In the exercises we indicate
how such a procedure is obtainable. Dealing with cut elimination procedures is the
hard core of proof theoretical research.
Exercises
Let LT be a Tait-language. We dene the length l(F) of a formula F inductively:
1. Is F atomic, so let l(F) = 0:
2. Is F = F0 F1 and 2f^; _g, so let l(F) = maxfl(F0); l(F1)g + 1:
3. Is F = QxG and Q2f8; 9g; so let l(F) = l(G) + 1:
1.8. A Cut Free Calculus for First Order Logic 65
E 1.8.1. Prove l(F) = l(F):
Now we are going to dene a renement of the Tait-calculus nk for n; k2IN induc-
tively.
(Ax) Is P atomic and fP; P g ; so nk for all n; k2IN:
(^) If nk ; F0 and nk ; F1; then nk ; F0 ^ F1 for
0 1
n
Prove: nk ) 02k :
( )
E 1.8.5. Let F be a boolean valid formula. Prove that there is an n 2 IN such that
n
0 F:
E 1.8.6. Let F be an LT -formula with ; ` F: Prove that there are n; k 2 IN such that
n
k F:
E 1.8.7. Use the preceding exercises to obtain a second prove for the completeness
theorem for the Tait-calculus:
j= F entails T F:
E 1.8.8. Determine the search tree for
= ft1 6= t1 ; 9y(y = t1 ^ (Pt5 ^ Pt5))g;
where t0 ; t1; : : : is the xed enumeration of the terms.
1.9 Applications of Gentzen's Hauptsatz
As a rst application of Gentzen's Hauptsatz we want to show a theorem of Jacques
Herbrand [ 1908, y1931]. To prepare this we need the notion of an existential formula,
9-formula for short.
Denition 1.9.1. The class of 9-formulas is inductively dened by the following
clauses.
1. Every atomic formula is an 9-formula.
2. If F and G are 9-formulas, so are (F ^ G) and (F _ G):
3. If F is an 9-formula, then so is 9xF:
Now let's introduce the problem behind Herbrand's theorem: think of a sentence 9xF
with F quantier free and
T 9xF:
Then we know by the soundness of the Tait-calculus that we have
S j= 9xF
for any L-structure S : This means
SS j= Fx (s)
i.e. in the structure S we have a witness s 2 S for the formula 9xF: But in general
there is not one single term t such that the interpretation of t is a witness in any
1.9. Applications of Gentzen's Hauptsatz 67
structure S . This means we do not have a term t such that for all L-structures S we
have
S j= Fx (t):
The following lemma gives the way out in this special case: it is possible to nd a nite
set of terms so that in each case the witness can be taken to be the interpretation of
one of those terms. In Exercise E 1.9.4 we ask if it is possible to x an upper bound
for the number of terms witnessing the existential formula.
Lemma 1.9.2. Let ; F be a nite set of 9-formulas. If T ; 9xF, then there are
nitely many terms t1 ; : : : ; tn such that
T ; Fx(t1 ); : : : ; Fx(tn):
Proof. We show the lemma by induction on the length of the derivation T ; 9xF:
If T ; 9xF is an L-axiom, then T ; Fx(t1 ); : : : ; Fx (tn) is also an L-axiom. Thus
we may assume that T ; 9xF is the conclusion of one of the inferences. There are
two possibilities:
1. The main formula of the inference belongs to the set . Then we have the
possibilities of an (^); (_) or (9)-inference. (8)-inferences are excluded because
is a set of 9-formulas. In the case of an ^-inference we have the premises
T 0; F0; 9xF and T 0; F1; 9xF
and obtain terms t1 ; : : : ; tk; s1 ; : : : ; sl with
T0; F0; Fx(t1 ); : : : ; Fx(tk ) and T 0; F1; Fx(s1 ); : : : ; Fx(sl )
by the induction hypothesis. Using the structural rule and an ^-inference we
obtain
T 0; F0 ^ F1; Fx(t1 ); : : : ; Fx(tk ); Fx (s1 ); : : : ; Fx(sl ):
That was claimed. We may treat the cases of an _- or 9-inference simultaneously.
Thus assume that we have the premise
0 ; G0; 9xF
T
which by either an _- or 9-inference leads to the conclusion
0; G; 9xF:
T
Then G0 is an 9-formula, too, and by induction hypothesis we have
0; G0; Fx(t1 ); : : : ; Fx(tn ):
T
Using the same inference this yields
T 0; G; Fx(t1 ); : : : ; Fx (tn):
68 I. Pure Logic
2. The main formula of the inference is 9xF: Then we have the premise
T ; Fx(t); 9xF
for some term t and obtain
T ; Fx(t); Fx(t1 ); : : : ; Fx(tm )
by the induction hypothesis.
Lemma 1.9.3 (Herbrand's lemma). If F is an 9-formula with j= 9xF , then there
are nitely many terms t1 ; : : : ; tn such that j= Fx(t1 ) _ : : : _ Fx(tn ):
Proof. From j= 9xF we obtain T 9xF by the completeness theorem 1.8.15. Using
Lemma 1.9.2 this yields T Fx(t1 ); : : : ; Fx(tn ) which, by the soundness theorem,
entails j= Fx (t1) _ : : : _ Fx (tn):
Denition 1.9.4. We say that a formula F is in prenex form if
F = Q1x1 : : : QnxnF0
where BV(F0 ) = ; and Qi 2 f9; 8g for i = 1; : : : ; n:
Theorem 1.9.5. For any formula F there is a formula FN in prenex form such that
F S FN :
Proof by induction on the length of the formula F:
1. For an atomic formula we put FN = F:
2. If F = G _ H, then we have by induction hypothesis formulas GN S G and
HN S H in prenex form. Let
GN = QG1 x1 : : : QGn xn G0
and
HN = QH1 y1 : : : QHm ym H0 :
Without loss of generality we may assume that
; = fx1; : : : ; xng \ fy1 ; : : : ; ym g
= fx1; : : : ; xng \ FV(H0 )
= fy1 ; : : : ; ym g \ FV(G0 ):
We put
FN = QG1 x1 : : : QGn xnQH1 y1 : : : QHm ym (G0 _ H0)
and have to show
(A) FN S F
(B) H _ 9xG S 9x(H _ G)
(C) H _ 8xG S 8x(H _ G)
1.9. Applications of Gentzen's Hauptsatz 69
for x 2= FV(H): Iterated application of (B) and (C) yields (A).
To prove (B) let S be an L-structure and an S -assignment such that S j=
(H _ 9xG)[]: Then S j= H[] or S j= 9xG[]:
In the second case there is a x such that S j= G[ ] which entails
S j= (H _ G)[ ]
and in the rst case we get
S j= (H _ G)[ ]
for any x since x 2= FV(H): Hence
S j= 9x(H _ G)[]:
If S 6j= (H _ 9xG)[], then S 6j= H[] and S 6j= 9xG[] which entails
S 6j= 9x(H _ G)[]:
The proof of (C) is similar:
If S j= (H _ 8xG)[], then S j= H[] or S j= G[ ] for all x : Thus
S j= (H _ G)[ ]
for all x because x 2= FV(H):
Hence S j= 8x(H _ G)[]: If S 6j= (H _ 8xG)[], then S 6j= H[] and S 6j= G[ ]
for some x : As x 2= FV(H) this again entails S 6j= (H _ G)[ ] and we get
S 6j= 8x(H _ G)[]:
3. F = :G: Then there is GN S G where GN = Q1 x1 : : : Qn xnG0 is in prenex
form. But then
F S :GN S Q 1x1 : : : Q n xn:G0 = FN
where 8 = 9 and 9 = 8: Obviously FN is in prenex form.
4. F = QxG for Q 2 f8; 9g: Then we have a prenex formula GN S G and obtain
F S QxGN and put FN = QxGN :
Denition 1.9.6. Let
F = 9x0 : : : 9xk 18xk Qk+1xk+1 : : : Qn xnG
be an L-formula in prenex form with G quantier free. We extend the language L to
L by adding a new function symbol f and put
F = 9x0 : : : 9xk 1Qk+1xk+1 : : : Qn xnGxk (fx0 : : :xk 1):
Let F (0) = F and L(0) = L and dene F (n+1) = (F (n)) and L(n+1) = (L(n)) : Then
there is an n 2 IN such that F (n+1) = F (n) and thus also L(n+1) = L(n): Let m be the
least such n and put
FH = F (m) and LH = L(m) :
We call FH a Herbrand form of F and LH a Herbrand language for F: For a formula
F not in prenex form we dene FH = (FN )H :
70 I. Pure Logic
At this point we want to give an easy example for computing the Herbrand form of a
formula. Therefore let
F = 8x9y(x y = 1) ! 8x9y(y x = 1)
in the language LGT of group theory. Because F is not in prenex form we compute it
by:
F S 9x18x2:(x1 x2 = 1) _ 8y1 9y2 (y2 y1 = 1)
S 9x18x28y1 9y2 (:(x1 x2 = 1) _ (y2 y1 = 1)):
This formula is in prenex form, say FN . Thus we have
(FN ) = 9x1 8y1 9y2 (:(x1 fx1 = 1) _ (y2 y1 = 1))
for a new function symbol f and
(FN )(2) = 9x19y2 (:(x1 fx1 = 1) _ (y2 gx1 = 1))
with g as a new function symbol. This is a Herbrand form of F:
Lemma 1.9.7. We have j= F i j= FH :
Proof. Since F S FN we may assume that F is in prenex form and it suces to
show
j= F , j= F
because then the lemma follows by iteration. So let F = 9x0 : : : 9xk 18xk G where G
is in prenex form. Then
F = 9x0 : : : 9xk 1Gxk (fx0 : : :xk 1):
We already know
j= 8xk G ! Gxk (fx0 : : :xk 1)
which entails
j= 9x0 : : : 9xk 18xk G ! 9x0 : : : 9xk 1Gxk (fx0 : : :xk 1):
Hence j= F ) j= F : For the opposite direction assume 6j= F: Then there is an L-
structure S and an S -assignment such that S 6j= F[], i.e.
S 6j= 9x0 : : : 9xk 18xk G[]:
Choose s0 ; : : : ; sk 1 2 S arbitrarily and dene
(x) = (x) for x 2= fx0; : : : ; xk 1g
and (xi ) = si : Then we have S 6j= 8xk G[ ] which shows that there is an assignment
0 xk such that S 6j= G[ 0]: Put
f S (s0 ; : : : ; sk 1) = 0(xk ):
1.9. Applications of Gentzen's Hauptsatz 71
This expands S to an L-structure S : If we had
S j= 9x0 : : :xk 1Gxk (fx0 : : :xk 1)[];
we could nd x ;::: ;xk with
0 1
To show the `(' direction, we apply the completeness theorem for the Tait-calculus to
get
1 1 n n
T Gx ;::: ;xk (t1; : : : ; tk ); : : : ; Gx ;::: ;xk (t1 ; : : : ; tk )
1 1
and conclude
T 9x1 : : : 9xk G
by applications of the 9-rule. For the opposite direction we assume j= FH and get
T 9x1 : : : 9xk G by the completeness theorem. Since 9x1 : : : 9xk G is an 9-formula we
may apply Lemma 1.9.2 to obtain
n
T 9x2 : : : 9xk Gx (t1 ); : : : ; 9x2 : : : 9xk Gx (t1 ):
1 1
1 1
Iterating this procedure and possibly adding dummy terms we nally get the claim.
At this point we nish the observations concerning Herbrand's theorem of 1930. We
are going to derive a second consequence of Gentzen's Hauptsatz: the interpolation
theorem.
72 I. Pure Logic
Theorem 1.9.9 (Interpolation for the Tait-calculus). Let and be nite sets
of formulas in the Tait-language for L such that neither T nor T : If T ; ,
then there is a formula E satisfying the following properties:
1: FV(E) FV() \ FV( ):
2: E contains only predicate symbols which occur in formulas of as well as in
formulas of : = fF : F 2 g:
3: T ; E and T E; :
We call E an interpolation formula for and :
Proof. We use induction on the denition of T ; :
1. Assume T ; by an L-axiom. Since 6 T and 6 T there is an atomic
formula P with P 2 and P 2 (or P 2 and P 2 ). Set E = P (or
E = P).
2. Assume that the last inference was
T ; F0; ; T ; F1; ) T ;
where (F0 ^ F1 ) 2 : There are the following sub-cases
(a) T ; F0: Then 6 T ; F1 because otherwise we had T : Thus by
induction hypothesis there is an interpolation formula E for ; F1 and .
Since F1 is a sub-formula of (F0 ^ F1 ) 2 ; E obviously satises properties 1.
and 2. for and . We have T E; and T ; F1; E; and T ; F0
entails also T ; F0; E: Hence T ; E by an ^-inference and E is also
an interpolation formula for and :
(b) 6 T ; F0 and 6 T ; F1:
By induction hypothesis we have interpolation formulas E1 for ; F0 and
and E2 for ; F1 and : For the same reasons as above E1 and E2 satisfy
properties 1. and 2. also for and : From T E1 ; and T E2;
we obtain T (E1 _ E2 ); and T ; F0; E1 and T ; F1; E2 rst
yield T ; F0; E1 _ E2 and T ; F1; E1 _ E2: Then we get by an ^-
inference T ; E1 _ E2. Thus (E1 _ E2) is an interpolation formula for
and .
3. The last inference was
T ; Fi; )` ;
for i 2 f0; 1g and (F0 _ F1) 2 according to the _-rule. Then we have 6 T ; Fi
because otherwise we had T : By induction hypothesis there is an interpola-
tion formula E for ; Fi and also satisfying 1. and 2. for the sets and :
From T ; Fi; E; however, we obtain T ; E by an _-inference. Thus E is
also an interpolation formula for and :
1.9. Applications of Gentzen's Hauptsatz 73
4. The last inference was
T ; Fx(y); ) T ;
according to the 8-rule where 8xF 2 : Again we have 6 T ; Fx(y) which by
induction hypothesis gives us an interpolation formula E for ; Fx(y) and . By
the variable condition we have y 2= FV( ; ) which by 1. entails that y 2= FV(E):
Thus we get from T ; Fx(y); E also T ; E by an 8-inference. It is obvious
that E also satises 1. and 2. for and and hence is an interpolation formula
for and :
5. The last inference was an 9-inference
T ; Fx(t); ) T ;
with 9xF 2 : By induction hypothesis we have an interpolation formula D for
; Fx(t) and : Then D satises property 2. also for and since there are no
new predicate symbols in Fx (t):
Let
fy1; : : : ; yng = (FV(t) n FV( )) \ FV():
We have
T ; Fx(t); D and T D; :
By 9-inferences we thus obtain T ; D and T 8y1 : : : 8yn D; Since all of
the variables y1 ; : : : ; yn do not belong to FV( ) we apply 8-inferences to get
T ; 8y1 : : : 8yn D:
Putting E = 8y1 : : : 8yn D we see that E is an interpolation formula for and
:
Annoyingly we also have to regard the case that the main formula of the last inferences
belongs to the set : Since most of the cases are dual to those already treated we can
be quite short.
6. T ; F0; ; T ; F1; ) T ; and (F0 ^ F1) 2
(a) T F0; entails 6 T F1; : Let E be an interpolation formula for and
F1; : Then T ; E and T E; F1; :
Thus T E; by (^) and E interpolates also and :
(b) 6 T F0; and 6 T F1 ; give interpolation formulas E0 and E1: Thus
T ; Ei for i = 0; 1 and T E0 ; F0; as well as T E1 ; F1; , then
E = E0 _ E1 interpolates and :
7. T ; Fi; ) T ; and (F0 _ F1 ) 2 : Then 6 T Fi ; which gives E
with T ; E and T E; Fi ; : E also interpolates and :
74 I. Pure Logic
8. T Fx (y); ) T ; by an 8-inference and 8xF 2 : By the induction
hypothesis there is a formula E with T ; E and T E; Fx(y); : Since
y 2= FV(E) we also get E as an interpolation formula for and :
9. T ; Fx(t); ) T ; by an 9-inference and 9xF 2 : Then we have a
formula D with T ; D and T D; Fx (t); : Let
fy1; : : : ; yng = (FV(t) n FV()) \ FV( ):
By 9-inferences we rst get T ; 9y1 : : : 9yn D and T D; : As before
we have y1 ; : : : ; yn 2= FV() which yields T 8y1 : : : 8yn D; : Putting E =
9y1 : : : 9yn D we get an interpolation formula for and :
Corollary 1.9.10. If and are nite sets of formulas such that T ; but
6 T and 6 T , then and have at least one common predicate symbol.
The hypotheses 6 T and 6 T in the interpolation theorem for the Tait-calculus
are of course annoying. To get a general formulation of the interpolation theorem we
should try to get rid of them. This, however, is not easy. If we assume that we have
T , then we obviously obtain T ; for any formula set , even if and have
no predicate symbol in common. Thus the only possible interpolation formula is the
empty formula which is not yet available in our language. So let us try to introduce
a symbol, say ?, for the empty formula. ? may be viewed as a 0-placed predicate
symbol. Therefore we need its dual notion, say >, in the Tait-language. We dene
? = > and > = ?: The L-axiom for this axiom then becomes ` ; >; ? which is
the same as
` ; > (>-axiom)
because ? is supposed to stand for the empty formula. The interpretation of the symbol
? is of course ValS (?; ) = f in all L-structures S : For this reason the interpretation
of the dual symbol in the Tait-language has to be
ValS (>; ) = t
for all L-structures S : Due to these interpretations we have that :( [ f>g) is always
inconsistent and so the soundness theorem for the Tait-calculus extends also to the
Tait-calculus with >-axiom. The proof of the completeness theorem remains literally
the same. So we have soundness and completeness for the Tait-calculus with >-axiom,
too. We rst observe that ? really behaves like the empty formula. We will use
the obvious notion >-Ax to express that is derivable in the Tait-calculus with
>-axiom.
Proposition 1.9.11. >-Ax ; ? implies >-Ax :
Proof. By induction on the denition of >-Ax ; ?: ? can never be the main-
formula of the last inference. Therefore we get the claim immediately from the in-
duction hypothesis in case that >-Ax ; ? in conclusion of an inference. But if
1.9. Applications of Gentzen's Hauptsatz 75
Now we may use Lyndon's interpolation theorem to show that indeed any globally
monotone operator is denable by a P-positive formula F:
Theorem 1.9.22. A rst order denable operator is globally monotone i it is den-
able by some P-positive formula.
Proof. The one direction of the theorem is Lemma 1.9.21. To prove the opposite
direction let F be globally monotone. Then we have
(S ; P; Q) j= 8x1 : : : 8xn(Px1 : : :xn ! Qx1 : : :xn) ! 8x(F ! FP (Q))
for any structure S and any expansion (S ; P; Q) of S : Thus
j= 8x1 : : : 8xn(Px1 : : :xn ! Qx1 : : :xn) ^ F ! FP (Q)
By Lyndon's interpolation theorem we get an interpolation formula E; i.e.
(1.19) j= 8x1 : : : 8xn(Px1 : : :xn ! Qx1 : : :xn) ^ F ! E
(1.20) j= E ! FP (Q):
Since Q only occurs positively in
8x1 : : : 8xn (Px1 : : :xn ! Qx1 : : :xn ) ^ F
it can at most occur positively in E: Thus choosing Q as P in (1.19) and (1.20) we get
j= F $ EQ (P); i.e. F is logically equivalent to a formula EQ (P) which has at most
positive occurrences of P:
Exercises
E 1.9.1. Let F; G be quantier free formulas of the rst order language L: Let 0 be a
constant symbol, f and j j function symbols and < a predicate symbol. Compute a
prenex form of the following formulas:
a) 8xF $ 9xG
1.9. Applications of Gentzen's Hauptsatz 81
b) 8x(0 < x ! 9y(0 < y ^ 8z(jz x0j < y ! jf(z) f(x0 )j < x))):
E 1.9.2. Let P; Q; R be binary predicate symbols of the Tait-language LT : Compute
with respect to the proof of the interpolation theorem for the Tait-calculus, an inter-
polation formula for
8x(9yPxy ^ 9yQxy) and 8x9y(Pxy _ Rxy)
Hint: First determine a derivation for
8x(9yPxy ^ 9yQxy) ! 8x9y(Pxy _ Rxy)
in the Tait-calculus.
E 1.9.3. Prove that every monotone operator has a least xed point, i.e. if is the
operator the least xed point is a set s with
a) (s) = s
b) 8t( (t) = t ! s t)
E 1.9.4. Prove or disprove: For every rst order language L containing only nitely
many constant and function symbols there is an n 2 IN such that for every L-formula
9xF with T 9xF there are t1; : : : ; tm ; m n with
Fx(t1 ) _ : : : _ Fx (tm ):
T
E 1.9.5. Let L(C ; F ; P) be a rst order language with C [ F [ P nite. Let P; Q be
unary predicate symbols not in L; S a nite L-structure and R S: We call
R is S -invariant , for all isomorphisms ' : S = S it is R = f'(r) : r 2 Rg
For the notion of an isomorphism cf. Denition0 2.2.6. We denote the expansions of an
L-structure S 0 to L(P) and L(P; Q) by (S 0 ; P S ) and (S 0 ; P S 0 ; QS 0 ): Now, let P S = R
and F an L(P)-formula, such that for all L-structures S 0
(S 0 ; P S 0 ) j= F , (S 0 ; P S 0 )
= (S ; P S )
Prove the following claims:
a) R is S -invariant and (S 0 ; P S 0 ) = (S 0 ; P S 0 ) ) P S 0 is S -invariant.
b) R is S -invariant ) (S 0 ; P S 0 ; QS 0 ) j= F ^ FP (Q) ! 8x(Px $ Qx)
c) R is S -invariant , there is an L-formula G with
FV(G) fx0g such that R = fs 2 S : S j= G[s]g:
Hint: Use Beth's denability theorem.
d) For any set X S there is an L-formula G with FV(G) fxg such that
f'(s) : s 2 X and ' : S = Sg = fs 2 S : S j= G[s]g:
82 I. Pure Logic
E 1.9.6. Prove Proposition 1.9.17.
E 1.9.7. It is possible to strengthen Herbrand's lemma in the following way:
If T is a theory with
T j= 9xF
then there are nitely many terms t1 ; : : : ; tn such that
T j= Fx (t1) _ : : : _ Fx (tn):
Which restrictions have to be made on T and F that the above strengthing is correct?
E 1.9.8. Do we have in general j= F $ FH ; i.e. do we have for all LH -structures S
(which are expansions of L-structures) and all S -assignments
S j= F $ FH []?
b) Prove:
Id j= s1 = t1 ^ : : : ^ sn = tn ! Fx ;::: ;xn (s1 ; : : : ; sn ) = Fx ;::: ;xn (t1 ; : : : ; tn):
1 1
where P denotes an atomic formula of the Tait-language for LI (Id-rule). The other
axioms and rules are those of the ordinary Tait-calculus (cf. Denition 1.8.4).
Proposition 1.11.2. If Id , then : is LI-inconsistent.
Proof. The proof is essentially that of 1.8.6 with the additional clauses that we have
Id by an Id-axiom or an Id-rule.
In the case of an Id-axiom we have (t = t) 2 : Hence (t 6= t) 2 : and :
is LI-inconsistent. In case of an Id-rule we have by induction hypothesis the LI-
inconsistency of
: [ fs1 6= t1; : : : ; sn 6= tng
and
: [ fP x ;::: ;xn (t1; : : : ; tn)g:
1
since S is an LI-structure.
Corollary 1.11.3. Id F entails Id F and Id j= F:
Proof. By 1.11.2 we rst get Id F and this by 1.10.9 entails Id j= F:
Our next aim is the proof of the opposite direction of 1.11.3. To prepare this we need
the following lemma.
1.11. A Tait-Calculus for First Order Logic with Identity 87
Lemma 1.11.4. Assume Id ; P and Id ; P for an atomic formula P. Then
Id ; :
Proof. Without loss of generality we may assume that P is not an equation. We
show the lemma by induction on the length of the derivation Id ; P: If P 2 ;
we get Id ; by the structural rule and are done. Thus assume P 2= ; : Then
Id ; P cannot be an L-axiom. If it is an Id-axiom, then (t = t) 2 for some
L-term t because P is not an equation. Then Id ; is an Id-axiom, too. If the
last inference is
Id i ; P ) Id ; P for i = 0 or i = 0; 1
then we get Id i ; by induction hypothesis and obtain Id ; by the same
inference. Thus the only non-trivial case is that the main formula of the last inference
is P: Since P is atomic this can only by an inference according to the Id-rule. But
then P = Px ;::: ;xn (s1 ; : : : ; sn) and we have the premises
1
(1.21) Id ; s1 = t1 ; : : : ; Id ; sn = tn
and
(1.22) Id ; Px ;::: ;xn (t1 ; : : : ; tn):
1
we get
(1.25) Id ; Px ;::: ;xn (t1 ; : : : ; tn)
1
by another application of the Id-rule. But (1.25) together with (1.22) yield
Id ;
by the induction hypothesis.
For the next lemma we introduce the set
Idt = f8xk+1 : : : 8xn Fx ;::: ;xk (t1 ; : : :tk ) :
1
(1.27) Id ; t = r
and
(1.28) Id ; s 6= r
From (1.26) and (1.27) we get Id ; s = r by the Id-rule. This together with
(1.28) entails Id by Lemma 1.11.4.
4. F = (s1 = t1 ^ : : : ^ sn = tn ! fs1 : : :sn = ft1 : : :tn )
Then we have the premises
(1.29) T : ; ; s1 = t1 ; : : : ; T : ; ; sn = tn
and
(1.30) T : ; ; fs1 : : :sn 6= ft1 : : :tn
(where we tacitly use ^-inversion to get (1.29)). By the induction hypothesis
these yield
(1.31) Id ; s1 = t1 ; : : : ; Id ; sn = tn
and
(1.32) Id ; fs1 : : :sn 6= ft1 : : :tn:
From (1.29) and the Id-axiom
(1.33) Id ; ft1 : : :tn = ft1 : : :tn
we get
(1.34) Id ; fs1 : : :sn = ft1 : : :tn:
From (1.30) and (1.34) we get
(1.35) Id
by Lemma 1.11.4.
90 I. Pure Logic
5. F = (s1 = t1 ^ : : : ^ sn = tn ! (Ps1 : : :sn ! Pt1 : : :tn))
i.e.
F = (s1 = t1 ^ : : : ^ sn = tn ^ Ps1 : : :sn ^ Pt1 : : :tn ):
Then we have the premises (again using ^-inversion)
(1.36) T : ; ; s1 = t1 ; : : : ; T : ; ; sn = tn
Another application of Lemma 1.11.5 is the interpolation theorem for predicate logic
with identity. In a language with identity we can even avoid the addition of the
empty formula, which was needed to state the interpolation theorem for pure logic in
a general setting (cf. Theorem 1.9.13). We observe that the formula t = t for closed
terms t behaves like > and dually t 6= t like ?: We have
(1.39) Id ; t = t
for any formula set by an Id-axiom and
; t 6= t ) Id
Id
by (1.1) and Lemma 1.11.4. Thus we get the general interpolation theorem for the
calculus Id . Of course, no longer we can count `=' among the non-logical symbols,
because t 6= t, in the role of the empty formula, must not contain a non-logical predicate
symbol.
Theorem 1.11.9 (Interpolation theorem for logic with identity). If we have
Id F ! G, then there is an interpolation formula E for F and G, i.e. we have
Id F ! E and Id E ! G and E contains at most those non-logical predicate con-
stants positively (negatively) which occur simultaneously positively (negatively) in F
and G:
Proof. By the above remark and Theorem 1.11.6 it is just the same as the proof of
1.9.14 by a slight modication of the proof of Theorem 1.9.9 for the calculus Id in
the axiom case and for the Id-rule.
We will now leave these more syntactical investigations and turn to the fundamentals
of model theory.
92 I. Pure Logic
Chapter 2
Fundamentals of Model Theory
The objects of interest in model theory are structures and classes of structures. Here
connections to rst order logic will be studied. Especially it is analysed if and how
structures and classes of structures can be described within rst order logic.
In this chapter we will only deal with predicate logic with identity. Therefore there
will be no need to emphasise that. So we are just writing j= instead of Id etc.
Then we have
(2.8) T(L0 ) j= fs1 : : :sn = x $ Gt:
To show (2.8) we observe that by (2.6) we have
(2.9) T(L0 ) j= 9x1 : : : 9xn (Gsx (x1) ^ : : : ^ Gsxn (xn)):
1
and show T (L0) j= fs1 : : :sn = x $ Gt as above. This terminates the proof of (2.5).
Next we show: For an atomic formula Pt1 : : :tn there is an L(T)-formula G such
that
(2.11) T(L0) j= Pt1 : : :tn $ G:
If P 2= P , then there is an L(T)-formula F P (x1 ; : : : ; xn) with FV(F P ) = fx1; : : : ; xng
(2.12) T(L0) j= 8x1 : : : 8xn(Px1 : : :xn $ F P )
We put
G = 9x1 : : : 9xn(Gtx (x1) ^ : : : ^ Gtxn (xn) ^ F P )
1
and
T(L0) j= Pt1 : : :tn ^ 9x1 : : : 9xn(Gtx (x1) ^ : : : ^ Gtxn (xn))
1
by (2.12) and (2.6). From (2.11), however, we get: For any L0 -formula F there is an
L(T)-formula F T such that
(2.13) T(L0 ) j= F $ F T
dening F T inductively by the clauses
1. (Pt1 : : :tn )T = G where G is as in (2.11)
2. (F ^ G)T = F T ^ GT
3. (:F)T = :(F T )
4. (9xF )T = 9x(F T ):
Now an easy induction on the length of F shows (2.13).
Corollary 2.1.7. Let L0 be an extension of T by denitions. For every L0-formula F
there is an L(T)-formula F T such that T(L0) j= F i T j= F T :
Proof. Take F T as in 2.1.6. Then we have
(2.14) T(L0) j= F $ F T :
Thus if T(L0) j= F, then T(L0 ) j= F T which entails T j= F T by 2.1.5 since F T is an
L(T)-formula. On the other hand if T j= F T , then of course T(L0 ) j= F T which entails
T(L0) j= F by (2.14).
Exercises
E 2.1.1. Let L1 be an extension by denitions of T and L2 an extension by denitions
of T(L1 ). Prove that L2 is an extension by denitions of T.
E 2.1.2. Let T be a consistent L-theory and a set of sentences with
F1 ; : : : ; Fn 2 ) F1 _ : : : _ Fn 2
Show the equivalence of:
1. T has an axiom system , i.e. T j= and j= T:
2. For all L-structures S ; S 0
S j= T and 8F 2 (S j= F ) S 0 j= F) implies S 0 j= T:
Hint: For the interesting direction let = fF 2 : T j= F g: To prove j= T
dene for any arbitrary S 0 j= T the set
= f:F : S 0 j= :F and F 2 g:
Show the consistency of T [ and derive the premis of 2.
2.2. Completeness and Categoricity 99
2.2 Completeness and Categoricity
It is a natural question to ask, whether there is a set of sentences, i.e. an axiom system
which characterises the theorems of a given L-structure S : The obvious answer is of
course `yes'. Just take
Th(S ) = fF : F is L-sentence and S j= F g:
But of course this is not what we really meant. Our question was whether there is some
`simple set' of sentences, whatever `simple' could mean. A possible `simple' set would
be a nite set of sentences or at least a set of sentences together with an algorithm
which allows us to decide whether a sentence belongs to the set or not. Before we
make more precise what a `simple' set of sentences really could mean, we shall study
some general properties of axiom systems. But rst we take a look at the connections
between two given structures.
Denition 2.2.1. Let S1; S2 be two L-structures.
a) We call ' : S1 ! S2 an embedding, written as
' : S1 ,! S2 ;
if the following conditions are satised:
1. ' is one-one.
2. '(cS ) = cS for all c 2 C :
1 2
s1 ; : : : ; sn 2 S1 :
b) We call ' : S1 ! S2 an elementary embedding, written as
' : S1 S2 ;
if we have
1. ' : S1 ,! S2
2. For any L-formula F and any S1 -assignment we have
S1 j= F[] , S2 j= F['];
where ' is the S -assignment ' :
c) We call S1 a substructure of S2 , written as S1 S2; if the identity is an embed-
ding, i.e. idS : S1 ,! S2 :
1
sS 0 = '(s):
a) If we have ' : S1 ,! S2 , then it is for all LS -terms t and all S1S -assignments
1 1
0
'(s) = sS :
a) If it is S 0 j= Diag(S1 ), then we have ' : S1 ,! S2 :
b) If it is S 0 j= Th(S1S ), then we have ' : S1 S2:
1
2.2. Completeness and Categoricity 101
Proof. We prove only the rst part. First we have to show that ' is one-one. If we
have r; s 2 S1 with r 6= s, then it is
S1 j= r 6= s:
Since S 0 j= Diag(S1) we know
'(r) = rS 0 6= sS 0 = '(s);
and so ' is one-one. Now let c 2 C : Then we have
S1S j= c = cS :
1
1
0 0
'(cS ) = (cS )S = cS = cS :
1 1 2
b) It is S1 S2 i S2S j= Th(S1S ):
1 1
which by induction hypothesis entails SS 0 j= G0x ;::: ;xk ;y (s1; : : : ; sn; s): This, however,
1
contradicts (2.21) and 1.3.6. This terminates the proof of (2.19) and (2.19) entails
S0 S:
Here we can give another proof of the second part of Lemma 2.2.10. Let T 0 be dened
106 II. Model Theory
as in the proof of 2.2.10. Since we have seen that every nite subset of T 0 has a model
S by the compactness theorem for logic with identity. Because all the new constant
symbols have to be interpreted dierent we have card(S) : Since card(T) we
obtain by Lowenheim-Skolem downwards a model S 0 of T with card(S 0 ) = : The
Lowenheim-Skolem downwards theorem is another reason for some limits of rst order
logic. For example it is not possible to characterise the real numbers R (e.g. viewed
as a eld) up to isomorphism. To be more explicit there is no set M of rst order
sentences such that we have
S j= M i S = R
since we would nd some countable structure S R and so S cannot be isomorphic
to R: In this argumentation we have assumed that R is an L-structure for a countable
language L: If we make no restrictions to the cardinality of L we are able to construct
a structure R S with card(S) > card(R) by the next theorem. Though the following
theorem is named by Lowenheim and Skolem it is due to Alfred Tarski [ 1901,
y1983] and Robert L. Vaught [ 1926] in 1957.
Theorem 2.2.12 (Lowenheim-Skolem upwards). Let S be an L-structure and let
= card(S) @0 : For any cardinal
maxf; card(L)g
there is an elementary extension S 0 S such that card(S 0 ) = :
Proof. Let T = Th(SS ): Since @0 S is an innite model of T which entails
that T has a model S 0 of a given cardinality card(T) by Lemma 2.2.10. We
have S 0 j= Th(SS ) and thus S 0 S up to isomorphism. Because we have card(T) =
maxf; card(L)g we are done.
Theorem 2.2.13 (Vaught's test). Let @0 and T be a consistent -categorical
theory without nite models and card(T) : Then T is complete.
Proof. Let S ; S0 2 ModL(T ): Then we obtain two models S 0 ; S 00 of T of cardinality
by Lowenheim-Skolem upwards. Thus S S 0 = S 0 0 S0 which entails S S0 : By
2.2.9 this entails the completeness of T:
In the exercises we will learn that the theory DLO of dense linear orderings without
endpoints is @0 -categorical. Since DLO has no nite models we know by Vaught's test
that DLO is complete and more:
DLO is complete for (Q; <Q):
Exercises
E 2.2.1. Prove Proposition 2.2.3.
E 2.2.2. Let L be a rst order language only with the non-logical symbol =. Deter-
mine easy criteria such that for all L-structures S ; S 0
2.2. Completeness and Categoricity 107
a) S
= S 0:
b) S S 0 :
E 2.2.3. Let S be an L-structure and X S: Dene
\
S0 = fS 0 : S 0 S and X S 0 g:
a) Prove that there is a substructure S0 of S with domain S0 :
b) Show that it is S0 = ftS [s1 ; : : : ; sn] : t L-term and s1 ; : : : ; sn 2 X g:
E 2.2.4. If T is a set of 8-formulas, S2 j= T and S1 S2, then it is S1 j= T:
E 2.2.5. If T is a set of 89-formulas (i.e. formulas of the shape
8x1 : : : 8xn9y1 : : : 9ym F
with F quantier free) and (Sn )n2IN is a sequence of L-structures with Sn Sn+1 and
Sn j= T for all n 2 IN then one has S j= T; where S = Sn2IN Sn is dened in the
obvious way.
E 2.2.6. If T is a set of positive formulas (i.e. formulas which are build up from atomic
formulas by ^; _; 8; 9) then T will be preserved under epimorphisms. I.e. if
S1 j= F[s1; : : : ; sn]
and ' is an epimorphism onto S2. So
S2 j= F['(s1); : : : ; '(sn )]
for all F 2 T:
E 2.2.7. Let S0 S1 S2 be L-structures. Prove or disprove:
a) S0 S1 and S1 S2 ) S0 S2 :
b) S0 S1 and S0 S2 ) S1 S2 :
c) S0 S2 and S1 S2 ) S0 S1 :
E 2.2.8 (Tarski's lemma). Let (Sn )n2IN be a sequence of L-structures with Sn
Sn+1 for all n 2 IN: Prove that for all n 2 IN
[
Sn Si :
i2IN
E 2.2.9. Let S ; S 0 be L-structures with S S 0 : Prove that S S 0 i for all formulas
F and all s1 ; : : : ; sn 2 S one has: if there is an s0 2 S 0 with S 0 j= F[s1; : : : ; sn ; s0];
then there is an s 2 S with S 0 j= F[s1 ; : : : ; sn ; s]:
E 2.2.10. Prove that a theory T is categorical i it is complete and has a nite model.
108 II. Model Theory
E 2.2.11. Let L be a language with equality containing only a unary predicate symbol
P: The theory T should determine that P is true for innitely many objects and is
false for innitely many objects.
a) Give an exact axiomatisation of T:
b) Prove: T is @0 -categorical (@0 = card(IN)):
c) Prove: T is not -categorical for all uncountable :
E 2.2.12. Let S = (Q; <Q) and S 0 = (R;<R) the L(<)-structures of the rational and
real numbers, respectively. Prove the following claims:
a) Is g : R ! R bijective and strictly monotone increasing, then we have for all
r1; : : : ; rn 2 R
S 0 j= F[r1; : : : ; rn] , S 0 j= F[g(r1); : : : ; g(rn)]:
b) For q1; : : : ; qn 2 Q and r 2 R there is a bijective and strictly monotone increasing
function g : R ! R with
g(r) 2 Q and g(q1 ) = q1; : : : ; g(qn) = qn:
c) S S 0 :
d) S 6= S 0 :
E 2.2.13. A set I 6= ; of partial isomorphisms from S to S 0 has the `back-and-forth'-
property. I.e.
1. 8f 2I 8x2S 9g2I(f g ^ x 2 dom(g))
2. 8f 2I 8y2S 0 9g2I(f g ^ y 2 rg(g)):
Here f g denotes that g extends f in the following sense:
dom(f) g ^ 8x2 dom(f)(f(x) = g(x)):
Prove: S = S : 0
E 2.2.14. Let DLO be the theory of the dense linear orderings without endpoints,
i.e.
1. 8x8y(x < y ! 9z(x < z ^ z < y))
2. 8x8y(x < y _ x = y _ y < x)
3. 8x8y(x < y ^ y < z ! x < z)
4. 8x(:x < x)
5. 8x9y(x < y)
6. 8x9y(y < x)
Prove:
a) (G. Cantor [1845, y1918], 1895) DLO is @0 -categorical.
b) There are two models of DLO of the same cardinality which are not isomorphic.
Hint: Use E 2.2.13 for a) and take R and R extended by a copy of Q on the left hand
side.
2.3. Elementary Classes and Omitting Types 109
2.3 Elementary Classes and Omitting Types
Denition 2.3.1. Let K be a collection of L-structures.
a) We call K an elementary class if K = ModL (T ) for some rst order theory T:
b) We call K nitely axiomatisable if K = ModL (T) for some nite set of L-sentences
T.
There is a wide variety of nitely axiomatisable structures, e.g. groups, Abelian groups,
domains, integral domains, elds, elds of xed characteristic p 6= 0, ordered elds,
lattices, etc. In fact all these structures are dened as the model classes of certain
nite axiom systems. However, there are collections of structures which are not even
elementary let alone nitely axiomatisable. An easy example is given by the following
lemma.
Lemma 2.3.2. Let K be the collection of structures which are all isomorphic to some
innite structure S : Then K is not elementary.
Proof. Assume K = ModL(T) for some theory T: Since S is innite we obtain a
elementary extension S 0 S such that card(S 0 ) > card(S) by the Lowenheim-Skolem
theorem. S 0 and S cannot by isomorphic, hence S 0 2= K,
S 0 j= Th(SS ) and Th(SS ) Th(S ) T
which shows S 0 j= ModL (T ) in contradiction to our assumption.
Indeed we have proven a stronger result than 2.3.2. What we really have shown is:
Theorem 2.3.3. Let K be a class of structures, all having the cardinality @0 :
Then K is not elementary.
2.3.2 and 2.3.3 already show us some limitations for the characterisation of structures
by rst order axiom systems. As a corollary of 2.2.10 we also get:
Theorem 2.3.4. Let K be a class of nite structures of arbitrarily large nite cardi-
nality. Then K is not an elementary class.
Proof. K = ModL(T) for some theory T implies by 2.2.10 that there are innite struc-
tures in K: This contradicts the hypothesis that K contains only nite structures.
Thus the classes of the nite groups or nite elds are not elementary.
Lemma 2.3.5. Let K = ModL(T) be nitely axiomatisable. Then there is a nite
axiom system Ax which is contained in T, i.e. Ax T:
Proof. Since K is nitely axiomatisable there is a single sentence F such that K =
ModL (fF g) (e.g. let F be the conjunction of all the sentences of a nite axiom system
for K). Then T j= F and by the compactness theorem there is a nite subset Ax T
such that Ax j= F: If G 2 ModL (Ax), then
G 2 ModL (fF g) = ModL (T) and ModL (T) ModL (Ax)
110 II. Model Theory
holds trivially because of Ax T: Hence
ModL (T ) = ModL (Ax):
Now we will leave the topic of elementary classes and turn to the notion of a type.
The idea of a type is an approach to characterise some given objects (or more precise:
a tuple of objects) by the set of properties which are true of those. Such a set will be
called a type.
Denition 2.3.6. Let S be an L-structure, s1; : : : ; sn 2 S and T an L-theory.
a) The type of the n-tuple (s1 ; : : : ; sn ) is the set of L-formulas
= fF : FV(F) fx1; : : : ; xng and S j= F[s1; : : : ; sn]g:
b) An n-type in S is a type for an n-tuple of elements of S:
c) An n-type in T is an n-type in some model of T:
Up to now we have only been concerned with the 0-type in S : This is
Th(S ) = fF : F is L-sentence and S j= F g:
Next we observe some simple facts about types. The rst fact is that we have either
F 2 or :F 2 if is an n-type in some L-structure and FV(F) fx1 ; : : : ; xng:
Proposition 2.3.7. Let 0; 1 be n-types in S : 0 1 implies 0 = 1 :
Proof. If we assume 0 6= 1 , then there is an F with FV(F) fx1; : : : ; xng such
that F 2 1 and F 2= 0 : By the above observation it is :F 2 0 1 : This is a
contradiction.
Proposition 2.3.8. Let be an n-type in an L-theory T and let F1; : : : ; Fk; G be
L-formulas with free variables among x1 ; : : : ; xn:
a) If T j= F1 _ : : : _ Fk ; then there is an Fi; 1 i k such that Fi 2 .
b) If T j= F1 ^ : : : ^ Fk ! G and F1; : : : ; Fk 2 , then it is G 2 .
The proofs are obtained by taking a look at the denition of an n-type in T:
Proposition 2.3.9. Let T be a countable theory, i.e. card(T) @0 ; and M 6= ; a set
of formulas with free variables among x1; : : : ; xn such that for all formulas F1 ; : : : ; Fk 2
M it is
T 6j= :F1 _ : : : _ :Fk :
Then there is an n-type in a countable model of T with M :
2.3. Elementary Classes and Omitting Types 111
Proof. It is T [ M consistent since otherwise by the compactness theorem there are
F1; : : : ; Fk 2 M such that T [ fF1; : : : ; Fk g is inconsistent. But then
T j= :F1 _ : : : _ :Fk :
But this is forbidden. By the Lowenheim-Skolem downwards theorem there is a count-
able model S of T and s1 ; : : : ; sn 2 S such that
S j= M[s1 ; : : : ; sn ]:
But this means, if is the type of (s1 ; : : : ; sn); M :
Corollary 2.3.10. Let T be a countable theory. If is an n-type in T, then there is
a countable model S of T such that is an n-type in S :
Proof. By Proposition 2.3.9 (with M = ) and Proposition 2.3.7 we have to prove
T 6j= :F1 _ : : : _ :Fk
for all F1 ; : : : ; Fk 2 : But if there are F1; : : : ; Fk 2 such that
T j= :F1 _ : : : _ :Fk ;
then by Proposition 2.3.8 there is an Fi such that :Fi 2 . This is not possible.
Denition 2.3.11. Let T be an L-theory and M a set of L-formulas. The formula F
is a T-generator of M if
1. T [ fF g is consistent.
2. T [ fF g j= G for all G 2 M:
So if F is a T -generator of M; then it is possible to generate all formulas of M out of
F using T: The next lemma shows that an n-type in T is determined by any generator
if there is one.
Lemma 2.3.12. Let be an n-type in T and F a T-generator of with free variables
among x1; : : : ; xn. Then it is
= fG : FV(G) fx1; : : : ; xng and T j= F ! Gg:
Proof. We have `' since F is a T-generator of . For the other inclusion take a
formula G with FV(G) fx1 ; : : : ; xng and
(2.22) T j= F ! G:
Since F is a T -generator of we have
F2
because otherwise we had :F 2 and so
T j= F ! :F:
112 II. Model Theory
This would imply that T j= :F; but this means T [ fF g is inconsistent. Using Propo-
sition 2.3.8 and (2.22) we obtain G 2 :
We close this section with a theorem of A. Ehrenfeucht.
Theorem 2.3.13 (Omitting types theorem). Let T be a countable and consistent
theory, and let M be a set of formulas with free variables among x1; : : : ; xn without a
T-generator. Then there is a countable model S of T such that no n-type in S contains
M.
Proof. Let T 0 = T [ HL(T ) be the Henkin extension of T: Since T is countable so is
T 0 by Lemma 1.5.11. So there is an enumeration of the n-tuples of Henkin constants.
Now dene inductively a sequence of L(T 0)-sentences such that
a) Tk = T 0 [ fF1; : : :Fk g is consistent.
b) Fk is :Fx ;::: ;xn (c1 ; : : : ; cn) where F 2 and (c1; : : : ; cn) is the kth n-tuple in
1
the above enumeration.
First observe that T 0 is consistent by Theorem 1.5.7. Now suppose in step k the
sentences F1 ; : : : ; Fk 1 have been dened. Let (c1; : : : ; cn) be the kth n-tuple. Let
= fF : F is L(T)-formula,FV(F) fx1; : : : ; xng
and Tk 1 j= Fx ;::: ;xn (c1; : : : ; cn)g:
1
for m n and
(2.23) Tk 1 j= Gx ;::: ;xm (c1 ; : : : ; cm ):
1
This implies
T j= 9xn+1 : : : 9xm Gx ;::: ;xn (c1 ; : : : ; cn) ! Fx ;::: ;xn (c1; : : : ; cn)
1 1
and
Tk 1 j= 9xn+1 : : : 9xm Gx ;::: ;xn (c1 ; : : : ; cn):
1
and because of S j= T~
S j= :F[s1; : : : ; sn ]:
This means that F is not in the n-type of (s1 ; : : : ; sn ): This shows that M is not
contained in any n-type in S :
Exercises
E 2.3.1. Prove that K is an elementary class i K is the intersection of a family of
nitely axiomatisable classes.
E 2.3.2. Let (Ki )i2I be a collection of elementary classes and let K Ti2I Ki be a
nitely axiomatisable
T class. Show that there is a nite subcollection (Ki )i2I ; I0 I
such that K i2I Ki :
0
which shows that the primitive recursive functions are closed under -abstraction.
Proposition 3.1.9. It is for all x1; x2 2 IN
min(x1 ; x2) = x1 _ (x1 _ x2 ):
And so the function xy: min(x; y) is primitive recursive.
3.1. Primitive Recursive Functions 119
Proof. If x1 x2, then x1 _ x2 = 0 and x1 _ (x1 _ x2 ) = x1 and if x1 > x2, then
we show x1 _ (x1 _ x2) = x2 by induction on x1: Let x1 = y + 1: Then by the last
proposition
x1 _ (x1 _ x2) = (y + 1) _ ((y + 1) _ x2)
=e) (y + 1) _ S(y _ x2)
=b) y _ (y _ x2 ):
If y > x2 this yields y _ (y _ x2) = x2 by induction hypothesis and if y = x2 we get
y _ (y _ x2 ) = x2 _ 0 = x2 by d).
Another important function is the sign function dened by
sg(0) = 0 and sg(x + 1) = 1
and its dual sg dened by sg(0) = 1 and sg(x + 1) = 0:
Denition 3.1.10. A relation R INn is primitive recursive if its characteristic func-
tion R : INn ! IN, dened by
(
R (z1 ; : : : ; zn ) = 1 if (z1 ; : : : ; zn) 2 R
0 otherwise,
is primitive recursive.
Denition 3.1.11. Let K be a class of relations.
a) K is closed under boolean operations if for any n-ary truth function ' and
R1; : : : ; Rn 2 K (with the same arity) it is
f~z : '(R1(~z ); : : : ; Rn(~z)) = tg 2 K:
b) K is closed under primitive recursive substitution if for R 2 K with #R = n and
for any primitive recursive functions f1 ; : : : ; fn (with the same arity) it is
f~x : (f1 (~x); : : : ; fn (~x)) 2 Rg 2 K:
c) K is closed under bounded quantication if for R 2 K with #R = n + 1 the sets
f(~x; y) : 8z yR(~x; z)g and f(~x; y) : 9z yR(~x; z)g
belong to K:
Lemma 3.1.12. The primitive recursive relations are closed under boolean operations
and primitive recursive substitution.
120 III. Theory of Decidability
Proof. Since :; ^ form a complete set of connectives it suces to show that the
primitive recursive relations are closed under : and ^, i.e. if R and S are primitive
recursive so are
Q = f(z1 ; : : : ; zn) : (z1 ; : : : ; zn ) 2= Rg
and
T = f(z1; : : : ; zn ) : (z1 ; : : : ; zn) 2 R and (z1 ; : : : ; zn ) 2 S g:
But Q = Sub(sg; R ) and T = R S (i.e. T = Sub(; R; S )):
Finally if
Q = f~z : (f1 (~z ); : : : ; fn (~z)) 2 Rg
for primitive recursive functions f1 ; : : : ; fn, then Q = Sub(R ; f1; : : : ; fn) which
shows the closure under primitive recursive substitution.
Another important concept is the bounded search operator dened by
(
xz P(z1; : : : ; zn; x) = minfx z : P(z1; : : : ; zn; x)g if it exists
0 otherwise.
Lemma 3.1.13. Let P be an n + 1-ary primitive recursive relation. Then
z1 : : :zn z:xz P(z1; : : : ; zn; x)
is an n + 1-ary primitive recursive function.
Proof. We dene f by the following recursion equations: f(~z; 0) = 0
f(~z ; y + 1) = f(~z ; y) + sg(f(~z ; y)) (y + 1) P (~z; y + 1) sg(P (~z; 0))
and prove f(~z ; y) = xy P(~z; x) by induction on y: If y = 0, then
f(~z ; y) = 0 = xy P(~z; x):
Let y = z + 1: Then f(~z ; z) = xz P(~z; x) by induction hypothesis. We distinguish
the following cases:
1. We have (~z; 0) 2 P: Then
xy P(~z; x) = xz P(~z; x) = 0
and we get f(~z ; z) = 0 by induction hypothesis and sg(P (~z ; 0)) = 0: Hence
f(~z ; y) = 0:
2. We have (~z; n) 2 P for some 0 < n z: Then 0 6= xz P(~z; x) = f(~z ; z): Hence
sg(f(~z ; z)) = 0 and
f(~z ; y) = f(~z ; z) = xz P(~z; x) = xy P(~z; x):
3. (~z; n) 2= P for all 0 n z but (~z; y) 2 P: Then xz P(~z; x) = 0 and
xy P(~z; x) = y: Hence f(~z ; z) = 0 and thus f(~z ; y) = z + 1 = y:
3.1. Primitive Recursive Functions 121
4. (~z; n) 2= P for all 0 n y: Then
xz P(~z; x) = xy P(~z; x) = 0:
Then f(~z ; z) = 0 = P (~z; z + 1): Hence f(~z ; y) = 0:
Lemma 3.1.14. The class of the primitive recursive relations is closed under bounded
quantication.
Proof. Since
8x zP(~z; x) , :9x z :P(~z; x)
and the primitive recursive relations are closed under negations it suces to prove the
closure under bounded existential quantication. Thus let P be primitive recursive
and
Q = f(~z; z) : 9x z(~z; x) 2 P g:
Then
Q (~z; z) = sg(P (~z; 0) + xz P(~z; x)):
Hence Q is primitive recursive.
Lemma 3.1.15 (Denition by cases). Let P1; : : : ; Pn be primitive recursive pred-
icates which are pairwise disjoint and g1; : : : ; gn+1 primitive recursive functions. Then
the function f dened by
8
>
> g1 (~z) if P1(~z)
<... ..
.
f(~z ) = >
> g (~z ) if Pn(~z)
:gnn+1 (~z) otherwise
>
is primitive recursive.
Proof. We have
n
X n
X
f(~z ) = gi (~z) Pi (~z) + gn+1(~z) sg( Pi (~z)):
i=1 i=1
In the following tabular we give more examples of primitive recursive predicates and
functions.
122 III. Theory of Decidability
Exercises
E 3.1.1. Give a description of the following functions using only basic functions and
basic operations.
a) : IN2 ! IN; (a; b) 7! a b
b) exp : IN2 ! IN; (a; b) 7! ab
c) pd : IN ! IN; a 7! pd(a)
d) _ : IN2 ! IN; (a; b) 7! a _ b
E 3.1.2. Prove: a _ a = 0
E 3.1.3. Prove that the following functions are primitive recursive.
a) f1 (x) = [log2 (x + 1)]
where [r] is the greatest integer r for r 2 R:
3.1. Primitive Recursive Functions 123
p
b) f2 (x; y) = [ y x + 1]
1+
where x:p(x) is the function which enumerates the primes. Due to the uniqueness
of the factorisation of a natural number into prime powers it is obvious how to get
decoding functions. All we have to check is that this can be done primitive recursively.
The rst step in this direction is the following lemma.
3.2. Primitive Recursive Coding 125
Proposition 3.2.1. The function p which enumerates the primes is primitive recur-
sive.
Proof. p satises the following recursion equations
(p0) p(0) = 2
(pS) p(z + 1) = xp(z)!+1 (Pr(x) ^ p(z) < x)
From the previous section it is obvious that this denes p primitive recursively. But
of course we have to check that p satises (p0) and (pS): p0 is obvious. All that needs
checking is that there is a prime in the interval ]p(z); p(z)!+1]: Towards a contradiction
assume that
]p(z); p(z)! + 1] \ Pr = ;:
Let q be some prime factor of p(z)! + 1: Then q p(z) which entails qjp(z)!: Hence
qj1, a contradiction.
Denition 3.2.2. Let (x; y) be the multiplicity of p(y) in the factorisation of x; i.e.
(x; y) = zx :(p(y)z+1 jx):
Then : IN2 ! IN is primitive recursive and we have the following representation.
Proposition 3.2.3. If x 6= 0, then
Y
x
x= p(i) (x;i) :
i=0
Now we are prepared for the denition of the coding and decoding functions which {
according to the common literature { will be denoted by <> and ( )i :
Denition 3.2.4.
a) <>= 0 code of the empty sequence
n
Y
hz0 ; : : : ; zn i = p(i)zi +1
i=0
b) (x)i = (x; i) _ 1:
Note that (x)i is dened for arbitrary natural numbers x: However, not every natural
number codes a sequence. Obviously only those natural numbers code sequences which
have no gaps in their decomposition into prime factors, i.e. if p(i+1) is a prime factor,
then so is p(i): Thus we dene
c) Seq = fz : z 6= 1 ^ 8i z(p(i + 1)jz ! p(i)jz)g and call Seq the set of sequence
numbers.
126 III. Theory of Decidability
Finally we dene the length of a sequence coded into x by
d) lh(x) = zx (:p(z)jx):
Proposition 3.2.5. ~x:h~xi; xi:(x)i and lh are primitive recursive functions, Seq is a
primitive recursive predicate such that
1: z 2 Seq ^ lh(z) = 0 , z =<> and
2: z = hz0 ; : : : ; zn 1i , z 2 Seq ^ lh(z) = n ^ 8i < n(zi = (z)i ):
Finally we dene the concatenation of sequence numbers by a_ 0 = a; 0_ b = b and
a_ b = h(a)0 ; : : : ; (a)lh(a) _ 1; (b)0; : : : ; (b)lh(b) _ 1 i
for a; b 6= 0: Again this is dened for arbitrary a; b: It is easily veried that xy:x_ y
is primitive recursive. For sequence numbers, however, we obviously get
hz0 ; : : : ; zni_ hx0; : : : ; xmi = hz0 ; : : : ; zn; x0; : : : ; xmi:
It is worth while to observe that (x)i < x holds for all natural numbers x 6= 0:
As a rst application of coding (there will be many more of them later) we show
that the primitive recursive functions are closed under course-of-values recursion. Let
f : INn+1 ! IN be any function. The course-of-values function f : INn+1 ! IN is
dened by
(CV 0) f(~z; 0) =<>
(CV S) f(~z; x + 1) = f(~z; x)_ hf(~z ; x)i
Then we have the following proposition.
Proposition 3.2.6.
a) f(~z; n + 1) = hf(~z ; 0); : : : ; f(~z ; n)i and
b) f is primitive recursive i f is.
Proof.
a) follows by induction on n: For n = 0 we have f(~z ; 1) = hf(~z ; 0)i by (CV 0) and
(CV S) and for n = x + 1 we get
f(~z ; n + 1) = f(~z; x + 1)_ hf(~z ; x + 1)i
=i:h: hf(~z ; 0); : : : ; f(~z ; x)i_hf(~z ; x + 1)i
= hf(~z ; 0); : : : ; f(~z ; n)i:
b) If f is primitive recursive, then f is obviously also primitive recursive. If f is
primitive recursive, then f(~z ; x) = (f(~z ; x+ 1))x which shows that f is primitive
recursive.
3.2. Primitive Recursive Coding 127
The following result goes back to Thoralf Skolem (1923) and Rosza Peter [ 1905,
y1977] (1934).
Lemma 3.2.7 (Course-of-values recursion). Let g : INn+2 ! IN be primitive re-
cursive. Then the function h : INn+1 ! IN satisfying
h(~z; x) = g(~z; x; h(~z; x))
is uniquely determined and primitive recursive.
Proof. The course-of-values of h is given by
h(~z; 0) =<>
h(~z; x + 1) = h(~z; x)_ hg(~z; x; h(~z; x))i:
Thus h is uniquely determined and primitive recursive. But then the same holds for
h:
Corollary 3.2.8. Let g : INn+k+1 ! IN; g0 : INn ! IN and hi : IN ! IN; i = 1; : : : ; k be
primitive recursive functions such that hi(x) < x holds for all x > 0 and i = 1; : : : ; k:
Then there is a uniquely determined primitive recursive function f : INn+1 ! IN
satisfying (0
f(~z ; x) = g (~z) if x = 0
g(~z; x; f(~z; h1(x)); : : : ; f(~z; hk (x))) if x 6= 0:
Proof. We have
(0
f(~z ; x) = g (~z) if x = 0
g(~z; x; (f(~z; x))h (x) ; : : : ; (f(~z ; x))hk (x)) if x 6= 0:
1
One should observe that pf q indeed codes an algorithm for the computation of f: The
leading component tells us whether we have to apply recursion, substitution or if we
have one of the basic functions. Since decoding is primitive recursive we may eectively
construct a primitive recursive function [e] out of a code e 2 CPR: Thus the function
(
UPR (e; x) = [e](x) if e 2 CPR ^ (e)1 = 1
0 otherwise
is eectively computable.
Theorem 3.2.13. UPR is not primitive recursive.
Proof. Towards a contradiction assume that UPR is primitive recursive. Then
x:UPR (x; x) + 1 is also primitive recursive. Let e0 be its code. Then
UPR (e0 ; e0) = [e0 ](e0 ) = UPR (e0 ; e0 ) + 1:
A contradiction.
The diagonalisationargument in the proof of Theorem 3.2.13 reveals a general dilemma.
Whenever we try to dene eective computability in some precise way there will be
some algorithm for computing this functions and this algorithm can be coded. Thus
we will get some kind of coding and once we have a class of functions which can be
coded we may use the same diagonalisation argument as in 3.2.13 to show that there
are eectively computable functions not belonging to that class. The way out of this
dilemma is to regard partial functions.
Exercises
E 3.2.1. Prove that the following predicates are primitive recursive.
a) P1 = fn : n is sum of two odd prim numbersg
130 III. Theory of Decidability
b) P2 = fn : n is sum of its divisors 6= ng
E 3.2.2. (Raphael M. Robinson, 1947) We dene the iterative functions inductively
by the following clauses:
1. S; Ckn; Pkn; x:(x)i; x1 : : :xn :hx1; : : : ; xni are iterative functions.
2. If f; g1 ; : : : ; gn are iterative, then so is Sub(f; g1 ; : : : ; gn):
3. If g is iterative and unary and f : IN2 ! IN is dened by:
f(0; x) = x
f(n + 1; x) = g(f(n; x));
then f is iterative.
Prove:
a) Every iterative function is primitive recursive.
b) Every primitive recursive function is iterative.
Hint: For f = R(g; h) observe the function s : IN2 ! IN with
s(n;~x) = hf(~x; n); n;~xi
Show that for g; h iterative so is s.
E 3.2.3. The Fibonacci-function is dened by
f(0) = f(1) = 1
f(n + 2) = f(n) + f(n + 1):
Show that f is primitive recursive.
E 3.2.4. Dene : IN2 ! IN with (n; m) = (m+n)(2m+n+1) + m: Prove that there are
primitive recursive functions 1; 2 : IN ! IN such that
(1 (n); 2(n)) = n
using simultaneous recursion.
Here we are going to give an easy example, how to use the recursion theorem. We want
to prove, using the recursion theorem, that there is a recursive function f : IN2 ! IN
with
f(x; 0) ' x2
f(x; n + 1) ' f(f(x; n); n):
Therefore we are going to dene h : IN3 P! IN by
( 2
h(e; x; n) ' x 2 2 if n = 0
feg (feg (x; n _ 1); n _ 1) if n 6= 0:
Using Theorem 3.4.2 h is partial recursive. Using the recursion theorem there is an
e 2 IN, such that
8x8n h(e; x; n) ' feg2(x; n):
136 III. Theory of Decidability
Now one can prove by induction on n : 8n8x feg2(x; n) #. So dene f = feg2, i.e. f is
partial recursive and dom(f) = IN2 , i.e. f is total. So f is recursive.
Exercises
E 3.4.1. Prove that there is a primitive recursive function f : IN2 ! IN, such that
8x ff(e0 ; e1)g1 (x) ' fe0 g1(fe1 g1(x)):
E 3.4.2. Prove that the Ackermann-Peter function dened in E 3.1.5 is recursive using
the recursion theorem.
E 3.4.3.
a) (R. Peter, 1935) Prove that the function UPR of section 3.2 is recursive.
b) Prove that there is a relation which is recursive (i.e. a relation R such that R
is recursive) but not primitive recursive.
E 3.4.4. Prove that there is no normal form theorem of the following shape: There
is a primitive recursive relation T IN3 such that for all partial recursive functions
f : IN P! IN there is an e 2 IN such that
8x f(x) ' yT(e; x; y)
E 3.4.5. (S. C. Kleene, A. M. Turing, 1936) Prove that there is no recursive
universal function for the class of recursive functions f with rg(f) f0; 1g:
E 3.4.6. Prove that the partial recursive functions are closed under
a) course-of-values recursion.
b) simultaneous recursion.
Now we have the means to give a second proof to show that there are universal partial
recursive functions.
Corollary 3.5.10. The function n : INn+1 P! IN dened by n(e; ~z) ' fegn(~z) is
partial recursive.
Proof. For the graph of the function n we have n(e; ~z) ' y i fegn(~z) ' y which
means
9u(T n(e; ~z ; u) ^ 8z < u:T n(e; ~z; z) ^ U(u) = y):
So Gn is r.e. and by 3.5.9 n is partial recursive.
We close this section by a characterisation of recursive relations which is due to
E. L. Post (1943), S. C. Kleene (1943) and A. Mostowski (1947).
Theorem 3.5.11 (Post's theorem). A relation R is recursive i both R and :R
are r.e.
Proof. For the easy direction let R be recursive. Then R and :R are recursive and
hence also r.e. by 3.5.5. For the opposite direction let R and :R be both r.e. Then we
have recursive relations P1 and P2 such that
~x 2 R , 9u((~x; u) 2 P1 )
and
~x 2= R , 9v((~x; v) 2 P2 ):
Let
f(~x) ' z((~x; z) 2 P1 _ (~x; z) 2 P2 ):
3.5. Recursive, Semi-recursive and Recursively Enumerable Relations 141
Then f is partial recursive and obviously also total. Hence f is recursive. We claim
~x 2 R , (~x; f(~x)) 2 P1
which by the closure of recursive relations under recursive substitutions entails the
recursiveness of R: To prove the claim we observe
~x 2 R ) 9u((~x; u) 2 P1) ^ 8u((~x; u) 2= P2 ):
Thus (~x; f(~x)) 2 P1 and we have the direction from left to right. Conversely if ~x 2= R,
then 8u((~x; u) 2= P1 ) which implies (~x; f(~x)) 2= P1 :
Post's theorem is easy to visualise if we think in terms of decidability and positive
decidability. If R is decidable, then :R is and thus both are positively decidable.
On the other hand if R and :R are positive decidable we simultaneously apply the
algorithms which decide ~x 2 R and ~x 2= R positively. Since either ~x 2 R or ~x 2= R we
either get an answer assuring ~x 2 R or ~x 2= R: This, however, decides ~x 2 R:
Corollary 3.5.12. A (total) function f : INn ! IN is recursive i its graph is recursive.
Proof. If f is recursive, then Gf is r.e. by Theorem 3.5.9. Because
(~z; y) 2= Gf , 9x(f(~z ) = x ^ y 6= x)
, 9x((~z; x) 2 Gf ^ y =6 x)
:Gf is r.e., too. So by 3.5.11 Gf is recursive. The second direction follows directly by
3.5.9.
Finally we show that the classes of recursive and r.e. relations are indeed distinct.
The proof is based on a diagonalisation argument and was mentioned by E. L. Post
(1922), K. Godel (1931) and S. C. Kleene (1936)
Theorem 3.5.13. There is a r.e. relation which is not recursive, namely
K = fx : 9zT 1 (x; x; z)g = fx : x 2 Wx1 g:
Proof. K is r.e. by 3.5.4. Towards a contradiction assume that K is recursive. Then
:K is recursive, too, and there is an e 2 IN such that :K = We1 and we obtain
e 2= K , e 2 We1 , 9yT 1 (e; e; y) , e 2 K:
Thus K cannot be recursive.
Now we close this section by reviewing the connection between the subsets (unary
relations) of IN we have studied up to now.
142 III. Theory of Decidability
ZZ
Z
: ZZ Xy
ZZ XX
r.e. complements of r.e.
ZZ
ZZ recursive
Z
primitive recursive
We learned that this picture is correct, e.g. by Post's theorem we know that the
recursive subsets of IN are just those subsets which are r.e. and complements of r.e. sets.
Exercises
E 3.5.1. Prove that the class of r.e. relations is not closed under unbounded universal
quantication.
E 3.5.2. (S. C. Kleene, 1936) Let R IN be an innite set. Prove:
a) R is r.e. i R is range of a one-one recursive function.
b) R is recursive i R is range of a strictly increasing recursive function.
E 3.5.3.
a) There is an n 2 IN with Wn1 = fng.
b) For any recursive function f there is an n 2 IN with Wf1(n) = Wn1 :
E 3.5.4. Let R IN2 be r.e. Is the function f : IN P! IN dened by
f(x) ' yR(x; y)
partial recursive?
E 3.5.5. (S. C. Kleene, 1936) Prove that for a r.e. relation P INn+1 there is a
partial recursive function f : INn P! IN such that
9yP(~x; y) , f(~x) # ^P(~x; f(~x)):
3.6 Rice's Theorem
Up to now we have been mainly concerned with recognising sets to be recursive. This
section is devoted to a theorem which may help us to see that many explicitly given
sets are not recursive. It is due to H. Rice in 1953. The idea behind that theorem
3.6. Rice's Theorem 143
is that it is only positively decidable if two partial recursive functions fe0 g; fe1g are
extensionally dierent, i.e. if it is
9x fe0 g(x) 6' fe1g(x):
But now we have to observe the following closure property of partial recursive functions.
Proposition 3.6.1 (Denition by cases). If P1; : : : ; Pn are pairwise disjoint r.e.
relations and g1; : : : ; gn are partial recursive functions, then the function f dened by
8
>
> g1 (~z) if P1(~z)
<... ..
.
f(~z ) ' >
> g (~z ) if Pn(~z)
:"n
>
otherwise
is partial recursive.
Proof. Using Theorem 3.5.9 we only have to prove that Gf is r.e. It is
(~z; y) 2 Gf , f(~z ) ' y
, (P1(~z ) ^ g1(~z ) ' y) _ : : : _ (Pn(~z) ^ gn(~z) ' y):
This representation shows that Gf is r.e. since Ggi is r.e. by Theorem 3.5.9.
Theorem 3.6.2 (Rice's theorem). Let F be a nonempty set of n-ary partial recur-
sive functions such that F =
6 ffegn : e 2 CP ^ (e)1 = ng: Then the set
fe : fegn 2 Fg
is not recursive.
Proof. Let M = fe : fegn 2 Fg: To obtain a contradiction assume that M is recursive.
Choose f 2 F and g 2= F but g n-ary partial recursive. Now dene h : INn+1 P! IN
by (
h(e; ~z) ' g(~z ) if e 2 M
f(~z ) if e 2= M:
Since M and :M are r.e. h is partial recursive by Proposition 3.6.1. Thus using the
recursion theorem there is an index e0 2 IN, such that
8~z h(e0 ;~z) ' fe0 gn (~z):
Now we have
1. e0 2 M ) fe0 gn(~z) ' h(e0 ;~z) ' g(~z); so fe0gn = g 2= F ; i.e. e0 2= M:
2. e0 2= M ) fegn(~z ) ' h(e0 ;~z) ' f(~z ); so fe0gn = f 2 F ; i.e. e0 2 M:
In both cases we have yielded a contradiction.
144 III. Theory of Decidability
Corollary 3.6.3. Let f be partial recursive. Then the set of indices of f, i.e. the set
fe : fegn = f g, is not recursive and thus not nite.
Corollary 3.6.4. The set of indices of all recursive functions is not recursive.
This result can be improved in the following fashion.
Theorem 3.6.5. The set of indices of all recursive functions is not r.e.
Proof. Let T ot = fe : feg is a recursive functiong. Assume that Tot is r.e. Then
there is a recursive function f, such that Tot = rg(f): Now dene g : IN P! IN by
g(x) ' ff(x)g1 (x) + 1: Then g is total, since f(n) 2 Tot and so ff(n)g1 is total.
Therefore g has an index in Tot, i.e. there is an e 2 IN such that g = ff(e)g1 : Now we
have
ff(e)g1 (e) = g(e) = ff(e)g1 (e) + 1:
This is a contradiction.
Exercises
E 3.6.1. Prove that Part = fx : Wx1 6= INg is not r.e.
Hint: Construct (using the Snm -theorem) a primitive recursive function f with x 2=
K , f(x) 2 Part; where K IN was dened in Theorem 3.5.13.
E 3.6.2. Dene Inf = fx = Wx1 is inniteg. Prove:
a) Inf is not recursive.
b) Inf is not r.e.
Hint: Dene a recursive function f with
x 2 Tot , f(x) 2 Inf
where T ot was dened in the proof of Theorem 3.6.5
E 3.6.3. Dene: R IN is extensional if for all e0 ; e1 2 IN one has
e0 2 R ^ fe0 g1 = fe1 g1 ) e1 2 R:
a) Let ; 6= R 6= IN be extensional. Prove that there is either a recursive function
f : IN ! IN with
K = fx : f(x) 2 Rg
or a recursion function f : IN ! IN with
:K = fx : f(x) 2 Rg:
Hint: Let e0 2 IN with 8xfe0 g(x) " : If e0 2= R then choose e1 2 R: Observe the
function (
g(x; y) ' fe1 g(y) if x 2 K
" otherwise.
For e0 2 R the proof runs similar.
b) Use part a) to prove Theorem 3.6.2.
3.7. Random Access Machines 145
3.7 Random Access Machines
Informally a random access machine is a computing device whose hardware consists of
a memory which is arranged in successively numbered (nitely many) registers. Each
register is capable of storing an arbitrarily large number. The basic instructions are
INC(r) increase the content of register number r by one,
DEC(r) decrease the content of register number r by one,
BEQ(r) check whether the content of register number r is zero.
Formally we may dene a random access machine with n + 1 registers as a tuple
(INn+1 ; fINC(r); DEC(r) : r ng; fBEQ(r) : r ng)
where
INC(r) : INn+1 ! INn+1
INC(r) (z0 ; : : : ; zr ; : : : ; zn) = (z0 ; : : : ; zr + 1; : : : ; zn )
Exercises
E 3.8.1. Prove that the set
V al = fpF q : F is valid in all structures g IN
is r.e.
E 3.8.2. Dene Satfin = fpF q : F is valid in some nite structureg.
Prove:
a) Satfin is r.e.
Hint: Show that without loss of generality L is nite observing only non-isomor-
phic structures.
b) Satfin is not recursive
Hint: Dene FP;~x as in the proof of Theorem 3.8.2 but with x < Sx only for
those x which are not maximal w.r.t. < : For the content of the registers one
needs r < Sr:
E 3.8.3. Prove that the set
V alfin = fpF q : F is valid in all nite structures g
is not r.e.
152 III. Theory of Decidability
Chapter 4
Axiom Systems for the Natural Numbers
The topic of this section is the description of the structure of natural numbers within
the frame of rst order logic. It will turn out that this structure cannot be categori-
cally described and that there are very interesting phenomena to be observed. These
phenomena incorporate a serious limit to the expressional power of rst order axiom
systems and are known as Kurt Godel's incompleteness theorems.
Exercises
E 4.1.1. Let T be a r.e. theory, i.e. the set fpF q : F 2 T g is r.e. Then it is
fpF q : T j= F g
a r.e. set. (For the notion pF q cf. section 4.2.)
e = pH q
G = Hx (e);
1
then we have
G $ Hx (e)
1
$ Fx (sub1(e; N(e)))
1
$ Fx (sub1(pH q; peq))
1
$ Fx (pHx (e)q)
1 1
$ Fx (pGq):
1
Surely all this can be done in NT because we only use dening equations and rst
order logic with identity. So the proof is terminated.
The diagonalisation lemma is the key lemma to incompleteness. Up to now we have
only used hypotheses I.{III. Hypothesis IV. is used in Godel's rst theorem, published
in 1931.
Theorem 4.2.5 (First incompleteness theorem). There is an LNT -sentence G1
(stating that it is not provable in T itself) such that
1: T 6` G1 (so G1 is true, i.e. N j= G1)
and if T is !-consistent, then
2: T 6` :G1:
162 IV. Axiom Systems for the Natural Numbers
Proof. Use Lemma 4.2.4 to obtain the formula G1 with
NT ` G1 $ :PrvblT (pG1q):
Then we have T 6` G1 since otherwise by IV. 1.
NT ` PrvblT (pG1q)
which means NT ` :G1 and T ` G1: Contradiction, since T extends NT: Now, let T
be !-consistent and assume towards a contradiction
T ` :G1;
then by denition of G1, i.e. since T extends NT
T ` G1 $ :PrvblT (pG1q)
we obtain
T ` PrvblT (pG1q):
By IV.2. we obtain
T ` G1 ;
and this is a contradiction.
This gives the rst strengthening of Corollary 4.1.8.
Corollary 4.2.6. NT and PA are incomplete.
We now dene
con(T) = :PrvblT (p0 = 1q):
Thus con(T ) expresses that T does not derive p0 = 1q: Together with pure logic this
entails that T cannot derive any false sentence. We have the following property.
Lemma 4.2.7. NT ` con(T) ) T is consistent.
Proof. If T is inconsistent, then T ` 0 = 1; since T proves any formula. By IV. 1.
NT ` PrvblT (p0 = 1q)
but since NT is consistent
NT 6` :PrvblT (p0 = 1q):
This was aimed.
To prove Godel's second theorem we just have to state some hypotheses which are
proven in the appendix. The rst one is just a restatement of IV.1.
(G1) T ` F ) NT ` PrvblT (pF q)
(G2) NT ` PrvblT (pF q) ^ PrvblT (pF ! Gq) ! PrvblT (pGq)
(G3) NT ` PrvblT (pF q) ! PrvblT (pPrvblT (pF q)q):
With these assumptions we prove the following key lemma.
4.2. Godel's Theorems 163
Lemma 4.2.8. NT ` G1 $ con(T):
Proof. First we are going to prove the direction from left to right. Because
T ` 0 = 1 ! G1
we obtain by (G1) and (G2)
NT ` PrvblT (0 = 1) ! PrvblT (pG1q):
By the denition of G1 we have
(4.3) NT ` G1 $ :PrvblT (pG1q):
This entails
NT ` PrvblT (0 = 1) ! :G1
i.e.
NT ` G1 ! con(T):
For the opposite direction we start with
T ` G1 ^ :G1 ! 0 = 1
which by (G1) and (G2) gives:
(4.4) NT ` PrvblT (pG1q) ^ PrvblT (p:G1q) ! :Con(T):
By (4.1) and (G1) we have
NT ` PrvblT (pPrvblT (pG1q) ! :G1q)
and by (G2) it follows
NT ` PrvblT (pPrvblT (pG1q)q) ! PrvblT (p:G1q):
Now (G3) is used to obtain
NT ` PrvblT (pG1q) ! PrvblT (p:G1q):
Using this and (4.2) we have
NT ` con(T) ! :PrvblT (G1 ):
By (4.1) this is
NT ` con(T) ! G1 :
Now we can prove Godel's second theorem which states that an adequate theory cannot
prove its own consistency. This theorem has also been published in 1931. It destroyed
the so-called Hilbert's programme which was initiated by David Hilbert. Aim of
this programme was that it should be possible to prove the consistency of any given
(mathematical) theory by nite means, i.e. means available in NT:
164 IV. Axiom Systems for the Natural Numbers
Theorem 4.2.9 (Second incompleteness theorem). T 6` con(T):
Proof. By the rst incompleteness theorem we have
T 6` G1
and by Lemma 4.2.8
T ` con(T ) ! G1 :
So we just have T 6` con(T ):
Using the facts which we needed for the proof of the second incompleteness theorem
we can prove a nice result now.
Theorem 4.2.10. NT is !-incomplete.
Proof. By the second incompleteness theorem we have
NT 6` con(NT);
i.e. we have
NT 6` 8x:Proof(x; p0 = 1q):
But we also have
NT ` :Proof(n; p0 = 1q)
by Theorem A.1.16 since NT is consistent and we have
NT 6` 0 = 1:
Exercises
E 4.2.1. (A. Tarski) Prove that there is no LNT -formula Tr with FV(Tr) = fx1g
such that for all sentences F
NT ` F $ Tr(pF q):
Chapter 5
Other Logics
In the rst four chapters of this book we have been only confronted with one kind of
logic:
rst order logic.
As it is for rst order logic a (general) logic is given by two aspects: its syntax and
its semantics. In this chapter we will give various modications of the syntax and
semantics of rst order logic. We learned that rst order logic has two important
features:
compactness and Lowenheim-Skolem
properties. These give reason for certain limitations of the expressive power of the rst
order logic. We will try to analyse these properties for other logics.
SI
P S = P for P 2 P :
Now we only have to dene by ((xi )+ ) = I (xi ): Here we make use of + : VI ! V
being one-one and onto.
S I j= F[I ] , S j= F + []
is proved by induction on the denition of F: This is easy and left to the reader.
Theorem 5.1.14 (Compactness for many-sorted logic). Let M be a set of LI -
formulas such that every nite subset of M is consistent, then M is consistent.
Proof. Let M be nitely consistent. Then by Lemma 5.1.11 M [ OntI is nitely
consistent. By Theorem 5.1.13 M + [ Ont is a nitely consistent set of rst order
formulas. By the compactness theorem for rst order logic (with identity) M + [ Ont
is consistent. Using Theorem 5.1.12 M is consistent.
Theorem 5.1.15 (Lowenheim-Skolem for many-sorted logic). Let S I be an LI -
structure and = card(S I ) !:
a) For any innite with card(LI ) and any S0I S I ; i.e. it is S0i S i for
all i 2 I, with card(S0I ) there is an elementary substructure S 0 I such that
S0I S 0 I and card(S 0 I ) = :
b) For any maxf; card(LI )g there is an elementary extension S 0 I S I such
that card(S 0 I ) = :
5.1. Many-Sorted Logic 171
Proof.
a) By Theorem 5.1.13 we nd an L-structure S with
card(S) = card(S I ) =
such that for any S I -assignment I we have a with
S I j= F[I ] , S j= F + []:
Especially S j= Ont[]: By the Lowenheim-Skolem upwards theorem for L we
nd an elementary substructure S 0 S with S0I S 0 and card(S 0 ) = such
that
(5.1) S j= F + [] , S 0 j= F + []
for any S 0 -assignment . Since we had S = S I we obtain by the proof of 2.2.10
[
S 0 = Si0 ;
i2I
so if we applyI Theorem 5.1.12
I
to the L-structure S 0 , we get an L0I -structure S 0 I
0 0
with card(S ) = card(S ) = : By (5.1) we have
S 0 j= Ont[]
for the above . Therefore we have (using the denitions of and I in 5.1.12
and 5.1.13, respectively) by Theorem 5.1.12
S I j= F[I ] , S 0 I j= F[I ]
for any S 0 I -assignment I . Thus S 0 I S I :
b) This follows from compactness and Lowenheim-Skolem upwards as we remarked
for rst order logic in section 2.2.
We will close this section by determining a complete calculus for many-sorted logic.
Here we only have to change the points 2. and 5. of Denition 1.7.1 to dene M I F
as follows
2I : Fxi (t) ! 9xi F for all LI -formulas F and terms t of sort i.
5I : M I F ! G implies M I 9xiF ! G for xi 2= FV(M [ fF g)
The other axioms and the other rule do not change. By adapting the proof of the
completeness theorem in section 1.7 we obtain the following result.
Theorem 5.1.16 (Completeness theorem for I ). Let M and F be LI -formu-
las. Then we have M I F i for all LI -structures S I and all S I -assignments with
S I j= M[] we have S I j= F[]:
172 V. Other Logics
From the above observation we might learn that the logics LI do not enable us to state
more powerful propositions than rst order logic. Let's review this section. The reasons
why many-sorted logic can be embedded into rst order logic is that the semantics of
LI can be expressed in terms of rst order logic (cf. Denition 5.1.10). I.e. semantics
of many-sorted logic is in fact a rst order semantics.
Exercises
E 5.1.1. Finish the proofs of Theorem 5.1.12 and Theorem 5.1.13.
E 5.1.2. Prove the omitting types theorem for many-sorted logic: let T be a countable
and consistent LI -theory, and let M be a set of formulas with free variables among
xi1 ; : : : ; xinn without a T -generator. Then there is a countable model S I of T such that
1
5.2 ! -Logic
If we take a two-sorted language and a xed structure S in which we will interpret one
of the two sorts of variables we obtain so-called S -logic.
In this section we take IN (= !) as the xed structure. But now we dene syntax
and semantics of L! .
Denition 5.2.1. L! is a two-sorted language with identity. We denote the two sorts
of variables by
n; m; n0; : : :
x; y; z; : : :
Furthermore, for every n 2 IN we have a constant symbol n in L! . This nishes the
denition of the syntax of L! is a two-sorted language. The dierence to a two-sorted
logic is given by the semantics. Here we want that the rst sort ranges over the natural
numbers.
Denition 5.2.2. An L!-structure S! is a structure for the two-sorted language L!
such that
S! = ((IN; S); C ; F; P)
and with
nS! = n 2 IN:
Our rst observation for !-logic is the failure of the compactness property.
Theorem 5.2.3. !-logic does not have the compactness property.
Proof. Let L! have a constant symbol c of the sort of natural numbers and take
M = fn 6= c : n 2 INg:
Then M is nitely consistent in !-logic as it is in rst order logic. But in !-logic M
is inconsistent since we have to interpret c by a natural number.
5.2. !-Logic 173
In !-logic we are able to express the torsion property of a group. Remember that due
to the compactness theorem this was not possible in rst order logic (cf. the end of
section 1.5). In !-logic we have to add some axioms to the list of rst order axioms of
group theory:
x0 = 1
xn+1 = xn x
If we have Ax!GT is AxGT plus these axioms, we obtain that
S! j= Ax!GT i S! is a group
and for a structure with S! j= Ax!GT we have
S! j= 8x9n(n 6= 0 ^ xn = 1) i S! has the torsion property.
Theorem 5.2.4. !-logic neither has the Lowenheim-Skolem upward property nor the
Lowenheim-Skolem downward property.
Proof. To refute the Lowenheim-Skolem properties we dene a language L! and an
L! -sentence F such that for all L! -structures S! we have
S! j= F ) card(S) = @0 :
Therefore take a function symbol f into L! and dene F expressing that f S! is a
one-one map from IN onto S. I.e. let F be the formula
8x9n(f(n) = x) ^ 8n8m(f(n) = f(m) ! n = m):
Now we will introduce a calculus for !-logic. This will be done in the following way:
we dene M ! F similarly to section 5.1 where we dened a Hilbert style calculus
for many-sorted logic and add the clause
6. M ! Fn(m) for all m 2 IN implies M ! 8nF (!-rule)
Unlike all rules which have been considered previously, the !-rule is not a nite rule:
it requires innitely many premises.
Lemma 5.2.5 (!-soundness theorem). M ! F implies M ! F
Proof. Here by M ! F we denote that for all L! -structures S! with
S! j= M we have S! j= F:
All we have to check is the !-rule. But it is sound since we have
S! j= 8nF i S! j= Fn(m) for all m 2 IN:
A more surprising fact is the completeness of the calculus with !-rule with respect to
!-structures. This was uncovered by L. Henkin (1954) and S. Orey (1956).
174 V. Other Logics
Theorem 5.2.6 (!-completeness theorem). Let L! be countable and M a set of
L! -formulas. Then
M ! F implies M ! F:
Proof. Suppose M 6 ! F: Think of L! as a two-sorted language and denote the
two-sorted calculus by M ` F (as dened in section 5.1, but only for the two-sorted
language L! ). Now set
T = fG : M ! G and G is a sentence g:
Since M 6 ! F we have
T 0 = T [ f:F g
is consistent (in the two-sorted sense) because of
(5.2) T ` G , M ! G:
Now let m be a variable and
= fm 6= n : n 2 INg:
0
Next we prove that has no T -generator (in two-sorted sense). Therefore suppose
G is a T 0 -generator of :
Then we have for each n 2 IN
T 0 ` G ! m 6= n:
Substituting n for m and using the identity axioms we obtain
T 0 ` :Gm (n):
But this entails
T ` :F ! :Gm (n):
Using (5.2), the !-rule and (5.2) again we get
T ` :F ! :G;
and this implies
(5.3) T 0 ` :G:
But we wanted that G is a T 0-generator, and this means T 0 [fGg is consistent contrary
to (5.3). Thus we have proved that has no T 0 -generator. By the omitting types
theorem for many-sorted logic (cf. Exercise E 5.1.2) we get a model S of T 0 such that
no 1-type in S contains . This means that S is a !-model, say S! , because for every
s 2 S in the sort of the natural numbers there is an n 2 IN such that
S! j= m = n[s]:
Furthermore we have
S! j= M and S! j= :F:
But this means M 6 ! F:
Here we close our observations about !-logic.
5.3. Higher Order Logic 175
5.3 Higher Order Logic
In this section we deal with second order logic and mention how to change or extend the
denitions to obtain third or even higher order logic. Second order logic is intended
to express properties of elements and subsets (second order objects) of a non-xed
structure. In addition third order logic includes statements concerning subsets of
subsets (third order objects) of that structure. We will see that second (and of course
higher) order logic is at least as strong as !-logic. That is why we cannot expect to
have the compactness or Lowenheim-Skolem property.
Denition 5.3.1. L2 is a two-sorted language with identity. We denote the two sorts
of variables by
x; y; z; : : :
X; Y; Z; : : :
Furthermore, we have a binary predicate symbol with # = (1; 2), i.e. we have
formulas of kind xX.
In general we will have for nth order logic an n-sorted language Ln containing predicate
symbols 1 ; : : : ; n 1 with #i = (i; i + 1); i = 1; : : : ; n 1. The semantics will be
declared as follows.
Denition 5.3.2. An L2-structure S2 is a structure for the two-sorted language L2
such that
S2 = ((S; Pow(S)); C ; F; P)
and with S =2, i.e. the interpretation of the -symbol is the element relation. S is
2
(rst order) NT model satisfying (Ind) of Theorem 4.1.2. By that theorem we get the
isomorphism between S and N .
But this means that second order logic is quite powerful: using second order logic we
can x the natural numbers. This con
icts with the compactness and Lowenheim-
Skolem properties.
Theorem 5.3.4. Second order logic does not have the compactness property.
Theorem 5.3.5. Second order logic neither has the Lowenheim-Skolem upward prop-
erty nor the Lowenheim-Skolem downward property.
Using a certain modication of the semantics of second order logic we will be able to
talk about subsets of a structure without losing a rst order semantics. We will call
this logic weak second order logic. The syntax of Lw2 is the same as of L2.
Denition 5.3.6. An Lw2 -structure S2w is a structure for the two-sorted language Lw2
such that
S2w = ((S1 ; S2); C ; F; P)
with S2 Pow(S1 ) and S w =2. S1 is called the rst order part of S2w ; S2 is the second
2
order part.
But we can also regard Lw2 simply as a two-sorted language. A two-sorted structure
for Lw2 (viewed not as weak second order logic)
S 2 = ((S1 ; S2 ); C ; F; P)
is called regular if S2 Pow(S1 ) and S =2. So regular structures are just weak
2
Exercises
E 5.3.1. Prove Theorem 5.3.4 and Theorem 5.3.5.
E 5.3.2. Prove compactness and Lowenheim-Skolem properties for weak second order
logic.
E 5.3.3. Make explicit the complete calculus for weak second order logic, mentioned
at the end of the section.
E 5.3.4. Lfin2 is called nite second order logic, which is obtained by changing the
semanticsfinof L2 as follows: second order objects are nite sets of rst order objects.
I.e. an L2 -structure is given by
S2fin = ((S; Fin(S)); C ; F; P);
where Fin(S) is the set of all nite subsets of S. Prove:
a) For every Lfin
2 -sentence F there is an L2-sentence G with
S2fin j= F i S2 j= G:
b) Lfin
2 does not have the compactness property.
c) fin
L2 has the Lowenheim-Skolem property.
Remark: This part of the exercise is dicult.
178 V. Other Logics
Appendix A
The last lemma has established the third hypothesis. To dene the proof predicate we
have to x a calculus for rst order logic. We opt for a Hilbert-style calculus. There
we have the following axioms:
182 Appendix
sententially valid formulas
8xF ! Fx(t)
dening axioms for = (cf. 1.10.2)
Non-logical axioms of NT are given by
dening axioms for the function symbols of LNT
the induction scheme (IND) (cf. section 4.1)
Proposition A.1.9. The following relations are primitive recursive:
a) PP(n; m) , n is code of a propositional part of the formula with code m
b) PA(n; m) , n is code of a propositional atom of the formula with code m
c) BA(n; m) , m is code of a boolean assignment on the propositional atoms of
the formula with code n
Proof. Parts a) and b) are established easily. For part c) observe that we have
BA(n; m) ,Fml(n) ^ Seq(m) ^ lh(m) = n ^
8x n((PA(x; n) ! (m)x 1) ^
(:PA(x; n) ! (m)x = 2):
Proposition A.1.10. There is a primitive recursive function Bval with
Bval(pF q; n) =truth value of the formula F under
the boolean assignment n:
Proof. Dene by course-of-values recursion on x
8 (y) if Fml(x) ^ BA(x; y) ^ ((x) = 9 _ (x) = 12)
> x
>
0 0
>
> 1 _ Bval((x)1 ; y)
< if Fml(x) ^ BA(x; y) ^ (x)0 = 10
Bval(x; y) = > Bval((x) ; y) Bval((x) ; y)
> 1 2
>
> if Fml(x) ^ BA(x; y) ^ (x)0 = 11
:
0 otherwise
Now the only hypothesis of the previous section to check is (G4). Therefore we are
going to prove `formalized' versions of Theorem A.1.16.
Denition A.1.22. We are going to dene pF x_ 1 : : : x_ nq recursively on n (outside of
NT) as follows
pF x_ 1q = subst(pF q; px1q; N(x1))
pF x_ 1 : : : x_ n q = subst(pF x_ 1 : : : x_ n 1q; pxnq; N(xn)):
I.e. pF x_ 1 : : : x_ n q is a term with free variables x1; : : : ; xn. It denotes (codes up) the
formula F after replacing the free variables by numerals.
Proposition A.1.23.
F x_ 1 : : : x_ nqx ;::: ;xn (k1 ; : : : ; kn) = pFx ;::: ;xn (k1 ; : : : ; kn)q
p 1 1
Now for the rest of this section we denote ordinals by ; ;
; 0; : : : Besides we use
the following notation
(
= z ifif [<] [] and [ z] = with z 2
d():
This denition makes sense since we have for < [] exactly one z 2
d() such that
[ z] = : Using this notation we have for an arbitrary well-ordering with []
[ ] = :
Lemma A.2.12. For all 2 On we have = [f 2 On : < g]:
Proof. Take with = []: Now dene
: f 2 On : < g !
d()
by () = z i [ z] = : By the upper remark is well-dened. is order preserving
because if we take 1 < 2 < we have
[ z1 ] = 1 < 2 = [ z2 ] ) z1 z2 :
is onto since for z 2
d() it is [ z] < and ([ z]) = z: By this observation we
have
[f 2 On : < g] = [] = :
A.2. Naive Theory of the Ordinals 195
At this point we are able to prove the facts for ordinals used in section 1.4.
Theorem A.2.16 (Transnite induction). If for all 2 On we have
8<F () ! F();
then we have F() for all 2 On:
Proof. This follows directly by Lemma A.2.2 and Lemma A.2.11.
Corollary A.2.17. If we have
1: F(0)
2: 8(F() ! F( + 1))
3: for every limit ordinal 8 < F() ! F();
then we have F() for all 2 On:
Proof. By transnite induction on we proof 8F(): Thus we have
8<F ()
as induction hypothesis. Now we have to show F(): If = 0 we have F() by 1: If
is a successor, say = + 1, then it is < and we have F() by the induction
hypothesis. But then F() follows by 2: If is a limit ordinal F() follows directly
from 3: and the induction hypotheses.
Now we turn to dene functions by transnite recursion. We want to dene a function
F on the ordinals in such a way that we are allowed to dene F() for 2 On in
the terms of and all the F() for < : All those F() are contained in the single
object
F = F f : < g:
Theorem A.2.18 (Transnite recursion). If G is a binary function, then there is
a uniquely determined function F such that
F() = G(; F )
holds for all 2 On:
A.2. Naive Theory of the Ordinals 197
Proof. First we prove that F is uniquely determined. Therefore let F 0 be a function
with
F 0() = G(; F 0 )
holds also for all 2 On: We prove
8(F() = F 0())
by transnite induction on : By the induction hypothesis we have
8 < (F() = F 0()):
So it is F = F 0 and therefore
F() = G(; F ) = G(; F 0 ) = F 0():
This nishes the induction. It remains to prove the existence of the function F: We
prove that for every 2 On the function F exists by induction on : If = 0, then
it is
F 0 = F ; = ;
and if = + 1 we have by induction hypothesis the function F : Now we dene
for
< (
F (
) = F (
) if
<
G(; F ) if
= :
And if is a limit ordinal we have by induction hypothesis for every < a function
F : Now dene for
<
F (
) = F
+ 1(
):
This is dened since if it is
< so we have
+ 1 < : Now we can prove that the
function F dened by
F() = F + 1()
comes up to
F() = G(; F )
by induction on : This is left to the reader.
Corollary A.2.19. There is a uniquely determined function F such that
1: F(0) = X
2: F( + 1) = G(; F())
3: F() = H(; F ) for limit ordinals ;
where X is a set and G; H are given functions.
198 Appendix
Proof. Dene for 2 On and functions f dene the function G0 by
8
>
<X if = 0
G0(; f) = >G(; f()) if = + 1
:H(; f ) if is a limit ordinal
and apply Theorem A.2.18.
By this corollary we have proved all the facts we presented in section 1.4.
A.3 Cardinal Numbers
In section 1.4 we met cardinals in the form of special ordinals. Here we will give a short
introduction to the theory of cardinals and elementary cardinal arithmetic using the
naive theory of the ordinals. Studying cardinals means to study sets with respect to
quantitative aspects. For nite sets we are used to it. But are there dierent types of
innite sets? This theory is a theory of innity. It was developed by Georg Cantor
at the end of the last century.
Denition A.3.1. The sets A; B are called equinumerous if there is a one-one map
from A to B. In this case we write A B.
Proposition A.3.2. is an equivalence relation.
We have the following equinumerous sets.
Lemma A.3.3. Let A; B; C; D be sets. Then it is:
a) If A B and C D, then
AC B D
Pow(A) Pow(B)
C A DB
b) If A \ B = ;, then C A[B C A C B .
c) It is C AB (C B )A .
d) It is Pow(A) f0; 1gA.
Proof. We leave a) and c) to the reader. In b) we have to dene a one-one map
F : C A[B onto
! CA CB:
So let f 2 C A[B , i.e. f : A [ B ! C. Then we dene F(f) = (f A; f B). So F is
one-one and since A \ B = ; we also have that F is onto. This proves b). In d) we
just have to map every subset to its characteristic function.
To give just one example concerning the real numbers R we have
R Pow(IN) ININ f0; 1gIN
and the interested reader is requested to prove this. Using Proposition A.3.2 we can
imagine cardinals as equivalence classes.
A.3. Cardinal Numbers 199
Denition A.3.4. The equivalence classes of the relation are called cardinals. The
equivalence class of the set A is denoted by card(A).
Now we are going to install an ordering on the class of all cardinals.
Denition A.3.5. Let A; B be sets. Then we dene A 4 B if there is a one-one map
from A to B.
Using the well-ordering theorem the following theorem is just a proposition. But it
still remains true if the well-ordering theorem is not available. In that context it is
called Cantor-Bernstein theorem.
Theorem A.3.6. A 4 B and B 4 A imply A B.
Proof. We will only give a sketch of the proof not using the well-ordering theorem.
First we prove a special version of this theorem. Therefore let A B C with A C
be given. Then we will show B C.
Since C A we have a one-one map f from C onto A. Now dene
B0 = B; Bn+1 = ff(b) : b 2 Bn g
C0 = C; Cn+1 = ff(c) : c 2 Cng
with n 2 IN. Then g : C ! B dened by
g(x) = f(x) if there is an n 2 IN with x 2 Cn n Bn
x otherwise
is a one-one map from C onto B, i.e. B C.
Now we will prove the general version of the theorem. Since A 4 B and B 4 A we
have one-one maps f : A ! B and g : B ! A. But then
A0 = fg(f(a)) : a 2 Ag fg(b) : b 2 B g A
and A A0 (with g f one-one and onto). So we get by the above observations
A fg(b) : b 2 B g B:
The relation 4 can be transferred to the cardinals.
Proposition A.3.7. The relations 4 and are compatible.
Proof. Let A; B; C; D be sets with A 4 B C 4 D. But then A 4 D using
composition of functions. But we wanted this to be proved.
By the well-ordering theorem there is an ordinal in every equivalence class w.r.t. ,
i.e. in every cardinal. So the least such ordinal will be a canonical representative for
that equivalence class. From now on we will identify a cardinal with its canonical
representative, i.e. the class of all cardinals is a subclass of the ordinals. Furthermore
4 and coincide.
Historical Texts
It follows a list of the books mentioned in the historical remarks.
Boole, G.
1847 The mathematical analysis of logic, reprinted 1947, Blackwell: Oxford, 82 pp
1854 The laws of thought, reprinted 1958, Dover, xi+424 pp
Frege, F.L.G.
1879 Begrisschrift, eine der arithmetischen nachgebildete Formelsprache des rei-
nen Denkens, reprinted 1964 in: Begrisschrift und andere Aufsatze, Olms,
xvi+124 pp
Leibniz, G.W.
1666 De arte combinatoria, reprinted 1858 in: Leibnizens mathematische Schriften,
Halle, pp 7{79
Peano, G.
1897 Formulaire de mathematiques, vol. 2, chap I, Bocca & Clausen, 63 pp
Whitehead, A.N. & Russell, B.
1910 Principia mathematica, vol. I, 2nd ed. reprinted 1957, Cambridge University
Press, xlvi+674 pp
1912 Principia mathematica, vol. II, 2nd ed. reprinted 1957, Cambridge University
Press, xxiv+772 pp
1913 Principia mathematica, vol. III, 2nd ed. reprinted 1957, Cambridge University
Press, x+491 pp
Original Articles
In the following the original papers concerning important theorems of this book are
listed.
Church, A.
1936 A note on the `Entscheidungsproblem', Journal of Symbolic Logic 1, pp 40{41
and pp 101{102
204 Bibliography
Craig, W.
1957 Linear reasoning. A new form of the Herbrand-Gentzen theorem, Journal of
Symbolic Logic 22, pp 250{268
1957 Three uses of the Herbrand-Gentzen theorem in relating model theory and proof
theory, Journal of Symbolic Logic 22, 269{285
Gentzen, G.
1935 Untersuchungen uber das logische Schliessen, I, II, Mathematische Zeitschrift
39, pp 176{210 and pp 405{431
Godel, K.
1930 Die Vollstandigkeit der Axiome des logischen Funktionenkalkuls, Monatshefte
fur Mathematik und Physik 37, pp 349{360
formal unentscheidbare Satze der `Principia Mathematica' und verwand-
1931 Uber
ter Systeme, Monatshefte fur Mathematik und Physik 38, pp 173{198
Henkin, L.
1949 The completeness of the rst-order functional calculus, Journal of Symbolic
Logic 14, 159{166
1954 A generalization of the notion of !-consistency, Journal of Symbolic Logic 19,
pp 183{196
Herbrand, J.
1930 Recherches sur la theorie de la demonstration, Trauvaux de la Societe des
Sciences et lettres de Varsovie, Classe III sciences mathematique et physiques
33, 128 pp
Hilbert, D. & Bernays, P.
1934 Grundlagen der Mathematik, vol. I, 2nd ed. reprinted 1968, Springer; xv+473
pp
1939 Grundlagen der Mathematik, vol. II, 2nd ed. reprinted 1970, Springer, xiv+561
pp
Kleene, S.C.
1936 A note on recursive functions, Bulletin of the American Mathematical Society
42, pp 544{546
1936 General recursive functions of natural numbers, Mathematische Annalen 112,
pp 727{742
1938 On notations for ordinal numbers, Journal of Symbolic Logic 3, pp 150{155
Lowenheim, L.
Moglichkeiten im Relativkalkul, Mathematische Annalen 76, pp 447{470
1915 Uber
Lyndon, R.C.
1959 Existential Horn sentences, Proceedings of the American Mathematical Society
10, pp 994{998
Original Articles 205
Mal'cev, A.I.
1936 Untersuchungen aus dem Gebiete der mathematischen Logik, Matematicheskij
Sbornik, n.s., Akademiya Nauk SSSR i Moskovskoe Matematicheskoe Obshch-
estvo 1 (43), pp 323{336
Mostowski, A.
1947 On denable sets of positive integers, Fundamenta mathematicae 34, pp 81-112
Orey, S.
1956 On !-consistency and related properties, Journal of Symbolic Logic 21, pp 246{
252
Peter, R.
den Zusammenhang der verschiedenen Begrie der rekursiven Funktio-
1934 Uber
nen, Mathematische Annalen 110, pp 612{632
1935 Konstruktion nichtrekursiver Funktionen, Mathematische Annalen 111, pp 42{
60
Post, E.L.
1921 Introduction to a general theory of elementary propositions, American Journal
of Mathematics 43, pp 163{185
Robinson, R.M.
1947 Primitive recursive functions, Bulletin of the American Mathematical Society
54, pp 925{942
Rice, H.
1953 Classes of recursively enumerable sets and their decision problems, Transac-
tions of the American Mathematical Society 74, pp 358{366
Rosser, J.B.
1936 Extensions of some theorems of Godel and Church, Journal of Symbolic Logic
1, pp 87{91
Skolem, T.A.
1920 Logisch-kombinatorische Untersuchungen uber die Erfullbarkeit oder Beweis-
barkeit mathematischer Satze nebst einem Theorem uber dichte Mengen, Norske
Videnskaps - Akademi i Oslo, Mathematisk-Naturvidenskapelig Klasse, Skrifter
4, pp 1{36
1923 Begrundung der elementaren Arithmetik durch die rekurrierende Denkweise
ohne Anwendung scheinbarer Veranderlichen mit unendlichem Ausdehnungs-
bereich, Norske Videnskaps - Akademi i Oslo, Mathematisk-Naturvidenskapelig
Klasse, Skrifter 6, pp 1{38
206 Bibliography
Tait, W.W.
1968 Normal derivability in classical logic, in: The Syntax and Semantics of In-
nitary Languages, editor: Barwise, J., Lecture Notes in Mathematics 72,
Springer, pp 204{236
Tarski, A. & Vaught, R.L.
1957 Elementary (arithmetical) extensions, Summaries of Talks Presented at the
Summer Institute for Symbolic Logic, Institute for Defence Analyses, CRD,
pp 160{163
Turing, A.M.
1936 On computable numbers, with an application to the Entscheidungsproblem, Pro-
ceedings of the London Mathematical Society, ser. 2, 42, pp 230{265 and
corrections ibid. 43, pp 544{546
Text Books
Here we list interesting text books for readers who want to learn more about mathemat-
ical logic. Of course, this must be only a collection of some good texts in mathematical
logic.
General Logics
Barwise, J. (ed.)
1977 Handbook of mathematical logic, North-Holland, xi+1165 pp
This book has an encyclopedic character with advanced texts concerning var-
ious topics of all areas of mathematical logic.
Shoeneld, J.R.
1967 Mathematical logic, Addison-Wesley, vii+344 pp
This is the standard reference for standard theorems in mathematical logic. It
goes far beyond this book and is a good addition to it.
Recursion Theory
Hinman, P.G.
1978 Recursion theoretic hierarchies, Springer, xii+480 pp
This is an advanced text book dealing with denability theory and hierarchies.
Odifreddi, P.
1989 Classical recursion theory, North-Holland, xviii+688 pp
This is a comprehensive written survey of recursion theory.
Rogers, H.
1967 Theory of recursive functions and eective computability, McGraw-Hill, xxi+
482 pp
This is the standard reference for recursion theory. It is written quite illustra-
tively.
Text Books 207
Model Theory
Chang, C.C. & Keisler, H.J.
1990 Model theory, 3rd ed., North-Holland, xvi+650 pp
This is the standard text book for model theory. It covers besides pure logic
and advanced set theory.
Set Theory
Jech, Th.
1978 Set theory, Academic Press, xiv+391
This book is the standard reference in set theory.
Levy, A.
1979 Basic set theory, Springer, xiv+391 pp
This is a soft, comprehensive introduction to set theory.
Proof Theory
Girard, J.Y.
1987 Proof theory and logical complexity, vol. I, Bibliopolois, 503 pp
This book is a thorough introduction to proof theory of Peano arithmetic.
Pohlers, W.
1989 Proof theory, Lecture Notes in Mathematics 1407, Springer, vi+213 pp
This is a straight forward introduction to a special eld of proof theory: im-
predicative proof theory.
Schutte, K.
1977 Proof theory, Springer, xii+299 pp
This book contains the basic proof theoretical results in impredicative proof
theory.
Takeuti, G.
1987 Proof theory, 2nd ed., North-Holland, x+490 pp
This book contains besides hardly readable chapters a good survey of proof
theoretical results about Peano Arithmetic.
Others
Hurd, A.E. & Loeb, P.A.
1985 An introduction to nonstandard real analysis, Academic Press, xii+232 pp
This is as mentioned in the text.
208 Bibliography
Glossary
Notational Conventions
; the empty set, 3
IN the natural numbers, 3
dom(f) domain of the function f, 3
rg(f) range of the function f, 3
f Z restriction of f to Z, 3
XY the set of all functions from Y to X, 3
Pow(X) power set of X, 3
X nY the set X without Y , 3
X [Y union of X and Y , 3
X \Y intersection of X and Y , 3
idX the identity map on X, 3
Chapter I
^ and, 6,7
_ or, 6,7
: not, 6,7
! implies, 6,7
8 for all, 6,7
9 there is, 6,7
C constant symbols, 7
F function symbols, 7
P predicate symbols, 7
L rst order language, 7
L(C ; F ; P ) rst order language with non-logical symbols specied, 7
FV(t) free variables of the term t, 8
FV(F) free variables of the formula F, 8
BV(F) bounded variables of the formula F, 8
: truth function for negation, 11
^ truth function for conjunction, 11
_ truth function for disjunction, 11
! truth function for implication, 11
B (A) value of the sentential form A under the boolean assignment B , 12
AB equivalence of sentential forms, 13
210 Glossary
S structure, 17
C constants of a structure, 17
F functions of a structure, 17
P predicates of a structure, 17
V set of all variables, 18
tS [] value of t under the assignment in the structure S , 18
ValS (F; ) truth value of F in S under the assignment , 19
x and dier at most at x, 19
S j= F[] F is true in S under , 19
S 6j= F[] F is false in S under , 19
Fx (t) F with x replaced by t, 20
sx (t) s with x replaced by t, 20
=i:h: is equal to (by the induction hypothesis), 21
LS L extended by constant symbols for elements of S, 22
SS S expanded by constants for S, 22
S j= F F is valid in S , 23
j= F F is valid, 23
AxGT axioms of group theory, 23
S j= F[a1; : : :an] F is valid in S under the assignment a1 ; : : : ; an, 24
F S G semantical equivalence of formulas, 24
$ if and only if, 24
PP(F) propositional parts of F, 27
PA(L) propositional parts of L, 27
PA(F) propositional atoms of F, 27
FB truth value of F under the boolean assignment B , 28
B boolean assignment induced by , 28
BM boolean assignment induced by the set M, 30
! rst limit ordinal, 32
card(M) cardinality of M, 32
@0 cardinality of the natural numbers, 32
c9xF Henkin constant for 9xF , 35
LH Henkin extension of L, 38
KH Henkin constants, 38
degH (c) Henkin degree of c, 38
degH (F) Henkin degree of F, 38
HL Henkin set, 38
L1 L2 sub-language, 38
SH LH -expansion of S , 49
S j= M S is a model of M, 40
card(L) cardinality of the language L, 40
M j= F F is logical consequence of M, 46
F1; : : : ; Fn j= F F is logical consequence of F1 ; : : : ; Fn, 46
M `F M proofs F, 49
LT Tait-language for L, 54
P predicate symbols in the Tait-language for complements, 54
Glossary 211
F negation of F in the Tait-language, 55
T proof of in the Tait-calculus, 55
: negation of , 56
S j= is valid in S , 56
r reductum of , 58
dom() length of the sequence , 59
!<! the number sequences, 59
is initial segment of , 59
S search tree for , 60
FN prenex form of F, 68
FH Herbrand form of F, 69
LH Herbrand language, 69
? empty formula, 74
> dual of ?, 74
>-Ax proof in the extended Tait calculus, 74
FT translation of F into the Tait-language, 76
F operator induced by F, 78
LI language with identity, 82
Id0 open form of the identity axioms, 83
M Id F logical consequence respecting LI-structures, 84
Id proof with identity axioms, 86
Idt term form of the identity axioms, 87
Chapter II
L(T) language of T , 93
T(L) extension of T by denition, 95
Th(S ) theory of S , 99
' : S1 ,! S2 embedding, 99
' : S1 S2 elementary embedding, 99
S1 S2 substructure, 99
S1 S2 elementary substructure, 99
Diag(S ) diagram of S , 100
S1 = S2 the structures S1 and S2 are isomorphic, 101
Con(Ax) logical consequences of Ax, 102
ModL (T ) model class of T , 102
card(T) cardinality of T, 103
Chapter III
Ckn constant function with value k, 116
Pkn kth projection, 116
S successor function, 116
Sub(f; g1 ; : : : ; gn) substitution, 116
R(g; h) recursor, 116
212 Glossary
pd predecessor function, 117
_ arithmetical dierence, 117
~x:f(~x; y~) functions taking arguments for ~x, 118
sg sign function, 119
sg dual function to sg, 119
R characteristic function of R, 119
xz bounded -operator, 120
p(n) nth prime, 125
(x; y) multiplicity of p(y) in the factorisation of x, 125
<> code of the empty sequence, 125
hz0 ; : : : ; zni coded sequence, 125
(x)i ith component of a coded sequence, 125
Seq coded sequences, 125
lh(x) length of a coded sequence, 126
x_ y concatenation of coded sequences, 126
f course-of-values function, 126
CPR codes of primitive recursive functions, 128
UPR universal function for primitive recursive functions, 129
f : INn P! IN partial function, 130
f(x) " f is undened at x, 130
f(x) # f is dened at x, 130
f(n) ' g(n) partial equality, 131
f unbounded -operator, 131
P unbounded -operator, 131
CP codes of partial recursive functions, 132
Cmp computation predicate, 132
fegn (~z) partial recursive function with code e, 133
T n (e; ~z; z) Kleene's T-predicate, 133
n universal partial recursive function, 134
Snm Snm -predicate, 135
Wen recursive enumerable set with index e, 138
Gf graph of f, 140
K diagonal set, 141
INC increase function of a RAM, 145
DEC decrease function of a RAM, 145
BEQ branch function of a RAM, 145
MP marks of the programme P, 145
P transition function, 146
iP iterated transition function, 146
FP;~x formula describing P, 148
Chapter IV
LPA language of Peano Arithmetic, 153
PA Peano Arithmetic, 153
NT number theory, 154
Glossary 213
Chapter V
LI many-sorted language, 165
FV(t) free variables of t, 166
FVi (t) free variables of sort i in t, 166
SI many-sorted structure, 166
t+ translated term, 168
F+ translated formula, 168
OntI ontological axioms, 168
Ont ontological axioms, 169
L! language of !-logic, 172
S! !-structure, 172
! F calculus with !-rule, 173
! F validity in !-structures, 173
L2 second order language, 175
S2 second order structure, 175
L2PA language of second order Peano Arithmetic, 175
N constant symbol for the natural numbers, 175
PA2 second order Peano Arithmetic, 175
Lw2 weak second order language, 176
S2w weak second order structure, 176
214 Glossary
Index