You are on page 1of 20

Lecture Notes on

Logic
Following the lectures of Dr. Jochen Koenigsmann
Written by Jakub Z avodn y
12.10.2010, v1.1
Part B Course in Mathematics, University of Oxford
Michaelmas Term 2007
Contents
1 Propositional Calculus 3
2 Deductive System L
0
5
3 Deductive system SQ 10
4 Predicate Calculus 10
5 Deductive System K 14
6 Godels Completeness Theorem 16
2
1 Propositional Calculus
Denition 1.1. The alphabet / consists of the following symbols: propo-
sitional variables p
0
, p
1
, . . . (p
i
for each i N
0
), negation , implication
, conjunction , disjunction , equivalence and parentheses (, ). The
symbols , , , are called logical connectives.
A string of / is a nite sequence of symbols from /. The length of a
string is the number of symbols it contains.
Denition 1.2. A string of / is a formula of / if and only if
it is a propositional variable (i.e. it consists of a single symbol, which
is a propositional variable),
it is of the form A, where A is a formula,
it is of the form (A B), (AB), (AB) or (A B), where A and
B are formulas.
The set of all formulas of / is denoted Form(/).
Theorem 1.3 (Unique Readability Theorem). For each formula of /,
exactly one of the following holds. Either is a propositional variable p
i
for
a unique i N
0
, or it is for a unique formula , or it is ( ) for
unique formulas , and a unique binary connective .
Proof. By induction on the length of .
Denition 1.4. A valuation is a function v : p
i
: i N
0
T, F, where
the values T, F are called true and false.
Denition 1.5. Given a valuation v, we can extend it to a function v :
Form(/) T, F by letting v() = v() is is a propositional variable,
and using the table below for the cases = and = ( ). This
extension is well-dened and unique by the Unique Readability Theorem.

T T F T T T T
T F F F F F T
F T T T F F T
F F T T T F F
Denition 1.6. A valuation v satises a formula if v() = T. A formula
that is satised by some valuation is called satisable. A formula that is
satised by no valuation is called a contradiction. A formula that is satised
by all valuations is called a tautology, written as [= .
3
Denition 1.7. A formula is a logical consequence of if for all valuations
v such that v() = T we also have v() = T. We write [= .
Denition 1.8. Let be a set of formulas and a formula. Then is a
logical consequence of if for all valuations v such that v() = T for all
, we also have v() = T. We write [= .
Lemma 1.9. For any formulas and , we have [= i [= ( ). In
fact, for any Form(/), [= i [= ( ).
Denition 1.10. Formulas and are logically equivalent i [= and
[= , i.e. if v() = v() for all valuations v. We write [==[ .
Note. For any formulas , , we have ( ( )) [==[ (( ) )
and ( ) [==[ ( ). Therefore, when we are only interested in formu-
las up to logical equivalence, we will often write

n
i=1
A
i
instead of (A
1

(A
2
. . . (A
n1
A
n
) . . . )). Similarly with . We will also sometimes drop
parentheses in formulas, provided that unique readability is preserved.
Proposition 1.11. The following equivalences hold:
(

n
i=1
A
i
) [==[

n
i=1
A
i
(

n
i=1
A
i
) [==[

n
i=1
A
i
(A B) [==[ (A B)
(A B) [==[ (A B) [==[ ((A B) B)
(A B) [==[ (A B)
(A B) [==[ ((A B) (B A))
Denition 1.12. Let V
n
be the set of partial valuations v

: p
0
, . . . , p
n1

T, F. Then an n-ary truth function is a function J : V
n
T, F.
Denition 1.13. Denote by Form
n
(/) the set of all formulas of / in which
only the rst n propositional variables occur. If Form
n
(/), then
determines an n-ary truth function J

given by v v().
Theorem 1.14. For any n N and any n-ary truth function J there exists
Form
n
(/) such that J

= J.
Proof. If J(v) = F for all v V
n
, then = (p
0
p
0
) works.
Otherwise the set U = v V
n
[ J(v) = T is nonempty. For each v U
and i < n we can dene
v
i
as p
i
if v(p
i
) = T and as p
i
if v(p
i
) = F. Then
dene
v
=

n1
i=0

v
i
, so that u(
v
) = T if and only if u(p
i
) = v(p
i
) for all i,
which is when u = v. Finally if we put =

vU

v
, then u() = T if and
only if u = v for some v U. By the denition of U, that is when J(u) = T.
Therefore J

(u) = u() = J(u) for all u, i.e. J

= J.
4
Denition 1.15. A formula which is a conjunction of p
i
s and p
i
s is called
a conjunctive clause. A formula which is a disjunction of conjunctive clauses
is said to be in disjunctive normal form (DNF). Similarly, a conjunction of
disjunctive clauses is called a conjunctive normal form (CNF).
Note. The above theorem shows that any formula is equivalent to one in dis-
junctive normal form. It can also be shown (using the rst two equivalences
in Proposition (1.11)) that any formula is equivalent to one in conjunctive
normal form.
Denition 1.16. Let S be a set of logical connectives on which the extension
of a valuation is given by a truth table, similarly as in Denition (1.5). Then
/[S] denotes the alphabet consisting of propositional variables, parentheses,
and the connectives in S. Similarly as for / = /[, , , ] we dene
formulas Form(/[S]), with proper parenthesising, so that unique readability
is preserved.
Denition 1.17. A set S of logical connectives is adequate if for any n N
and any n-ary truth function J there exists a formula Form
n
(/[S]) such
that J

= J.
Proposition 1.18. The set , is adequate.
Proof. By Theorem (1.14), the set , , , , is adequate, so for any
truth function J we can nd a formula with J

= J. Using the logical


equivalences from Proposition (1.11), we can nd a logically equivalent for-
mula using only the connectives and . But if [==[ then J

= J

,
so we have found a formula Form(/[, ]) such that J

= J.
2 Deductive System L
0
The deductive system of propositional calculus formalises the concept of a
proof. A proof of a formula will be a derivation from given axioms using
given rules of inference.
Denition 2.1. Let /
0
= /[, ]. The system L
0
is dened as follows.
An axiom of L
0
is any formula of /
0
of the form
( ( )) (A1)
(( ( )) (( ) ( ))) (A2)
(( ) ( )) (A3)
where , , Form(/
0
). The only rule of inference in L
0
will be the modus
ponens rule: from and ( ) we infer .
5
Denition 2.2. Let Form(/
0
) and Form(/
0
). We say is deducible
from the hypoheses if there exists a nite sequence
1
, . . . ,
n
of formulas
of /
0
such that for each i, either

i
is an axiom,

i
, or

i
follows from
j
and
k
by modus ponens (MP) for some j, k < i,
and
n
= . The sequence
1
, . . . ,
n
is called a proof or a derivation of .
(The full sequence of such formulas will usually be called a derivation. Often
we will only prove that such a derivation exists, and we will call that proof
the proof of the formula .) If is deducible from , we write .
Denition 2.3. If , we just write and call a theorem (of L
0
).
Proposition 2.4. For any , Form(/
0
), , .
Proof. We give a full derivation of :
( ) (A1)

( ) MP from 1,2
( ) ( ) (A3)
( ) MP from 1,2

MP from 5,6.
Proposition 2.5. For any , Form(/
0
), the following are theorems.
( )
( ( ))
( ) and ( )
(( ) )
Theorem 2.6 (Soundness Theorem for L
0
). The system L
0
is sound, i.e. if
, then [= .
Proof. Suppose that and let
1
, . . . ,
n
= be a derivation of in L
0
.
Let v be any valuation for which v() = T for all . By induction, we
show that for each i n, v(
i
) = T. Then also v() = T.
It is easy to check that all axioms are tautologies, so if
i
is an axiom,
v(
i
) = T. If
i
, then v(
i
) = T by the assumption on v. Finally, if

i
follows by modus ponens from some
j
,
k
with j, k < i, then WLOG we
can assume
k
= (
j

i
). And since v(
j
) = T and v(
j

i
) = T by
the induction hypothesis, we also get v(
i
) = T.
6
Theorem 2.7 (Deduction Theorem for L
0
). For any Form(/
0
) and
Form(/
0
), if and only if ( ).
Proof. Suppose that and let
1
, . . . ,
n
= be a derivation of
from . By induction on k we can prove that (
k
).
Suppose that (
i
) for all i < k. If
k
is an axiom or is in , we
can proceed as follows:

k
Axiom or
(
k
(
k
)) (A1)
(
k
) MP from 1,2.
If
k
= , it is easy to show that (
k
), since we know from
Proposition (2.5) that ( ). Finally if
k
follows from
i
and
j
by MP (in the derivation of from ), we can WLOG assume that

j
= (
i

k
), and then
(
i
) IH
(
j
) = ( (
i

k
)) IH
(( (
i

k
)) ((
i
) (
k
))) (A2)
(
k
) MP used twice.
Therefore, in any case, (
k
) is provable from . By induction we get
that also (
n
) = ( ).
The converse is easy. If ( ), then following the same derivation
we can prove ( ). But also , and by modus
ponens we get .
Proposition 2.8. If ( ) and ( ), then ( ).
Proof. By following the same derivations as from , we can prove
( ) and ( ). We also have , so using MP
twice, we get . By the deduction theorem, ( ).
Denition 2.9. A subset Form(/
0
) is consistent if for no formula we
have both and .
Note. By the soundness theorem, the empty set is consistent.
Note. By Proposition (2.4), if is inconsistent, then for any formula
Form(/
0
).
Lemma 2.10. if and only if is inconsistent.
Proof. If , then . But also , so
is inconsistent.
7
Conversly, suppose that is inconsistent, so that
and for some . Then
( ) and
( ) by the deduction theorem,
(( ) ( )) (A3)
( ) MP 2,3
( ) by Proposition (2.8) from 1,4
(( ) ) by Proposition (2.5)
MP 5,6.
Lemma 2.11. If is consistent and , then is consistent.
Proof. Suppose that is inconsistent, so that and .
By deduction theorem, we get that ( ) and ( ). But since
, by MP we get and , and hence is inconsistent.
Corollary 2.12. Let be consistent. If , then is consistent,
otherwise is consistent.
Denition 2.13. A subset Form(/
0
) is said to be maximal consistent
if it is consistent, and for all Form(/
0
) either or .
Lemma 2.14. Let Form(/
0
) be a maximal consistent set. Then for all
formulas , Form(/
0
),
i , , and
( ) i either or .
Proof. By consistency of we cannot have both and , and by
maximality we have at most one. Therefore i , .
For the second claim, rst suppose that ( ), but , and
, . Then by maximality, and . But by MP, , which
contradicts consistency of .
Conversely, if , using ( ) from Proposition
(2.5) and MP we get that ( ). And if , axiom 1 says
( ), and from MP we get ( ).
Theorem 2.15. Any maximal consistent set is satisable.
Proof. Dene the valuation v by v(p
i
) = T if p
i
and v(p
i
) = F if p
i
.
It is well-dened by maximality and consistency of .
This serving as the basis, we can prove by induction on the length of
that v() = T if and only if :
If = , then v() = T when v() = F, which is exactly when ,
by the induction hypothesis. By the above lemma this is when = .
8
Similarly if = ( ), then v() = T when v() = F or v() = T,
which by the induction hypothesis is exactly when , or . By the
above lemma this is when ( ) = , which is what we wanted to
prove.
Therefore v() = T exactly for those , for which , in particular
for such that .
Theorem 2.16. If is a consistent set of formulas, then there exists a
maximal consistent set

such that

.
Proof. The set of all formulas Form(/
0
) is countable, so let
1
,
2
, . . . be an
enumeration. Inductively, construct sets
i
by setting

0
= and
n
=


n1

n
if
n1

n

n1

n
if
n1
,
n
.
Using Lemma (2.11) and Lemma (2.10),
n
is consistent for all n.
Now put

n=0

n
. Clearly,

is maximal, in fact for any


Form(/
0
), either or . Also,

is consistent; suppose it was not,


so that

and

for some . Since the proofs of and are of


nite length, they would use only nitely many formulas from

, so there
would exist some n such that all formulas from

they use are actually in

n
. But then
n
would also be inconsistent, which is a contradiction.
Corollary 2.17. If is consistent, it is satisable.
Proposition 2.18. If is inconsistent, it is not satisable.
Proof. If and for some formula , then by the Soundness
theorem also [= and [= . If is satisable by a valuation v, we
would also have v() = T and v() = T, which is a contradiction.
Theorem 2.19 (Completeness Theorem for L
0
). If [= , then .
Proof. If is inconsistent, then immediately for any formula . So
suppose that is consistent, [= but , . Then by Lemma (2.10),
is consistent, so it is satisable. Let v be a satisfying assignment,
so that v() = T for all and also v() = T. But then v() = F,
which is a contradiction to [= .
Theorem 2.20 (Compactnes Theorem for L
0
). A set of formulas
Form(/
0
) is satisable if and only if every nite subset of is satisable.
Proof. Clearly if is satisable, then every its subset is satiable.
If is not satisable, then by Corollary (2.17) it is not consistent, i.e.
there exists such that and . However, since both of these
proofs are nite, there exists a nite subset

such that

and

. By the Soundness theorem,

[= and

[= , so

cannot be
satisable.
9
3 Deductive system SQ
We present an alternative deductive system to L
0
, the sequent calculus SQ.
Denition 3.1. A formula Form(/
0
) is provable from a set of formulas
in the system SQ, if there exists a nite sequence of sequents of the form

SQ
( Form(/
0
) and Form(/
0
)), where each sequent follows
from the previous ones using one of the following rules, and the last sequent
is
SQ
.
(AS) If , we can always infer
SQ
.
(MP) If
SQ
and

SQ
( ), we can infer

SQ
.
(DT) If
SQ
, we can infer
SQ
( ).
(PC) If
SQ
and


SQ
, we can infer

SQ
.
Proposition 3.2. The systems L
0
and SQ are equivalent, i.e. (in L
0
)
if and only if
SQ
.
Note. Using this equivalence, Lemma (2.10) becomes an easy consequence
of the rule (PC) in SQ.
4 Predicate Calculus
The propositional formulas of /
0
are usually not sucient to formalise math-
ematical ideas deeply enough. For this purpose, the rst-order predicate
calculus (FOPC) is introduced.
Denition 4.1. The language /
FOPC
consists of the logical symbols: vari-
ables x
0
, x
1
, . . . (x
i
for i N
0
), connectives and , the universal quantier
, parentheses, a comma, and an equality symbol
.
=, and the non-logical sym-
bols: k-ary predicate symbols P
(k)
n
, k-ary function symbols f
(k)
n
and constant
symbols c
n
for any k N, n N
0
.
Denition 4.2. A string of /
FOPC
is called a term if it is a variable symbol,
a constant symbol, or of the form f
(k)
n
(t
1
, . . . , t
k
), where t
i
are terms.
Denition 4.3. A string of /
FOPC
is called an atomic formula if it is of the
form P
(k)
n
(t
1
, . . . , t
k
) or t
1
.
= t
2
, where all t
i
are terms.
Denition 4.4. A string of /
FOPC
is a formula (of /
FOPC
) if it is an atomic
formula, if it is of the form or ( ) where and are formulas, or
if it is of the form x
i
, where x
i
is a variable and is a formula.
10
Proposition 4.5 (Unique Readability Theorem). Any term, atomic formula
or a formula can be interpreted in a unique way according to the above for-
mation rules, similarly as in the language / of propositional formulas.
Denition 4.6. A rst-order language / is a subset of /
FOPC
containing all
the logical symbols and possibly only some of the non-logical symbols. The
terms, atomic formulas and formulas of / are dened similarly as for /
FOPC
.
The sets of function, predicate and constant symbols of / will be denoted
as Fct(/), Pred(/) and Const(/), respectively. In the following text, by a
language we will automatically mean a rst-order language.
Denition 4.7. Let / be a language. An interpretation of /, or an /-
structure, is a tuple / = A; f
fFct(L)
; P
PPred(L)
; c
cConst(L)
, where
the nonempty set A is the domain of /,
for each f
(k)
n
Fct(/), f
(k)
n
is a function A
k
A,
for each P
(k)
n
Pred(/), P
(k)
n
is a k-ary relation on A, and
for each c
n
Const(/), c A.
Denition 4.8. Let / be a language and / an /-structure. An assignment
in / is a function v : x
i
: i N
0
A.
Denition 4.9. An assignment v

is x
i
-equivalent to an assignment v if
v(x
j
) = v

(x
j
) for all j ,= i.
Denition 4.10. An assignment v in / induces an assignment on the
terms of /, v : Terms(/) A, dened by v(x
i
) = v(x
i
), v(c
i
) = c
i
and
v(f(t
1
, . . . , t
k
)) = f( v(t
1
), . . . , v(t
k
)). Also, v induces a valuation on the for-
mulas of /, v : Form(/) T, F, given by
v(P(t
1
, . . . , t
k
)) = T i P( v(t
1
), . . . , v(t
k
)),
v(t
1
.
= t
2
) = T i v(t
1
) = v(t
2
),
v() = T i v() = F and v( ) = T i v() = F or v() = T,
v(x
i
) = T i

v

() = T for all assignments v

x
i
-equivalent to v.
If v() = T, we also write / [= [v], and say that is true in / under the
assignment v.
Denition 4.11. We will use the following abbreviations:
( ) for ( ),
( ) for ( ),
( ) for (( ) ( )),
x
i
for x
i
.
The behaviour of these with respect to valuations is as we would expect.
11
Denition 4.12. A formula of a language / is logically valid, written as
[= , if / [= [v] for all /-structures / and all assignments v in /. A
formula is satisable if / [= [v] for some / and v.
Denition 4.13. For any Form(/) and Form(/), is a logical
consequence of , written as [= , if for all /-structures / and all assign-
ments v such that / [= [v] for all , / [= [v]. Formulas and are
logically equivalent ( [==[ ) if both [= and [= .
Note. The symbol [= is now used in two dierent meanings, but this should
not cause any trouble.
Denition 4.14. An occurence of a variable x
i
in a formula is called bound
if it is contained in a (sub-)formula of the form x
i
. Otherwise it is called
a free occurence of the variable x
i
. The set of variables occuring free in
will be denoted as Free().
Denition 4.15. A formula with no free occurences of variables is said to
be closed, and is called a statement or a sentence. The set of all sentences of
/ is denoted as Sent(/).
Lemma 4.16. Let / be a language, / an /-structure, a formula of / and
v, v

assignments in / such that v(x


i
) = v

(x
i
) for all variables x
i
with a free
occurence in . Then / [= [v] i / [= [v

].
Proof. We will proceed by induction on the length of . In particular, the
case of atomic formulas is easy, since all occurences of variables are free, so
the assignments and valuations induced by v and v

are the same. The cases


and ( ) are also easy; if v() = v

() and v() = v

(), then
v() = v

() and v( ) = v

( ).
The last case is = x
i
, where by the induction hypothesis the lemma
holds for the formula . Suppose rst that / [= x
i
[v]. Then for any
assignment v

x
i
-equivalent to v, / [= [v

]. By the induction hypothesis,


for any v

agreeing with v

on Free(), / [= [v

]. Therefore, for any


v

agreeing with v on Free() except possibly for x


i
, / [= [v

]. But
Free() = Free() x
i
, so for any v

agreeing with v on Free() we have


/ [= [v

]. In particular, since x
i
/ Free() and the assignments v and v

agree on Free(), any assignment v

x
i
-equivalent to v

satises the above.


Therefore, / [= x
i
[v

]. The other implication is symmetric.


Corollary 4.17. If is a statement, then / [= [v] i / [= [v

] for any
two assignments v and v

.
Denition 4.18. If is a statement we write / [= if / [= [v] for some
(and thus for all) assignment v in /. We say that is true in / or that /
is a model of . For a set of statements , we say that / is a model of
(/ [= ) if / [= for all .
12
Example. Let / be a language containing a binary function symbol f and
a constant symbol c. Dene the statements

1
= x
0
x
1
x
2
f(x
0
, f(x
1
, x
2
))
.
= f(f(x
0
, x
1
), x
2
)

2
= x
0
x
1
(f(x
0
, x
1
)
.
= c f(x
1
, x
0
)
.
= c)

3
= x
0
(f(x
0
, c)
.
= x
0
f(c, x
0
)
.
= x
0
)
and =
1
,
2
,
3
. Then an /-structure / = A, f, c = A, , e is a
model of i it is a group with e being the identity element.
Corollary 4.19. Let / be a language and , be formulas of /. If x
i
has
no free occurence in , then [= (x
i
( ) ( x
i
)).
Proof. Let / be an /-structure and v an assignment in /, such that / [=
x
i
( )[v] and / [= [v]. We need to show that / [= x
i
[v].
Let v

be an assignment x
i
-equivalent to v. Since x
i
does not belong to
Free(), v and v

agree on Free() and hence by the above lemma / [= [v

].
Since / [= x
i
( )[v], we also have / [= ( )[v

], and therefore
/ [= [v

]. This holds for any v

x
i
-equivalent to v, so / [= x
i
[v].
Denition 4.20. Let / be a language, be a formula in /, t be a term and
x
i
a variable. Then we say that t is free for x
i
in if no free occurence of
x
i
in is quantied over a variable occuring in t. If t is free for x
i
in , we
dene the substitution [t/x
i
] by replacing every free occurence of x
i
in
by the term t.
Lemma 4.21. Let / be a language, / an /-structure, Form(/) and t
a term free for x
i
in . Let v be any assignment in / and dene
v

(x
j
) =

v(x
j
) if j ,= i
v(t) if j = i.
Then / [= [v

] i / [= [t/x
i
][v].
Proof. By easy induction on the length, we can prove that for any term
s,

v

(s) = v(s[t/x
i
]). For atomic formulas this immediately shows that

() = v([t/x
i
]), i.e. / [= [v

] i / [= [t/x
i
][v].
For arbitrary formulas , we proceed by induction on the length of .
The cases and ( ) are again trivial, so suppose that = x
j
. We
have to distinguish two cases.
If j = i, then x
i
does not appear free in , so [t/x
i
] = . Moreover, v
and v

agree on Free(), so by Lemma (4.16), / [= [v

] i / [= [v], which
is the same as / [= [t/x
i
][v].
If j ,= i, suppose rst that / [= x
j
[v

]. Let v

be any assignment
x
j
-equivalent to v, we need to show that / [= [t/x
i
][v

]. Dene
v

(x
k
) =

(x
k
) if k ,= i

(t) if k = i.
13
Then v

agrees with v

only possibly at x
j
and x
i
. However, since t does not
contain x
j
(t was free for x
i
in ),

v

(t) = v(t), and hence v

(x
i
) = v

(x
i
).
Therefore, in fact, v

is x
j
-equivalent to v

. So / [= x
j
[v

] implies / [=
[v

], and by the induction hypothesis, / [= [t/x


i
][v

] (since t is still free


for x
i
in ), which is what we wanted to show.
The converse goes similarly. Suppose that / [= x
j
[t/x
i
][v], and let v

be x
j
-equivalent to v

, so that we need to show that / [= [v

]. Now dene
v

(x
k
) =

(x
k
) if k ,= i
v(x
i
) if k = i.
Then v

and v are x
j
-equivalent, and hence / [= [t/x
i
][v

]. Moreover, it is
the case that
v

(x
k
) =

(x
k
) if k ,= i
v

(x
i
) = v(t) =

v

(t) if k = i,
since t does not contain x
j
. Therefore we can use the induction hypothesis
to infer that / [= [v

].
Corollary 4.22. If is a formula and t is a term free for x
i
in , then
[= (x
i
[t/x
i
]).
Proof. Let / be an /-structure and v be an assignment in /. Assume that
/ [= x
i
[v]. Then, in particular, if we dene
v

(x
j
) =

v(x
j
) if j ,= i
v(t) if j = i,
then v

is x
i
-equivalent to v and hence / [= [v

]. By the above lemma, this


implies that / [= [t/x
i
][v].
5 Deductive System K
Denition 5.1. To each rst-order language / we associate the formal sys-
tem K(/), consisting of the axioms
( ( )) (A1)
(( ( )) (( ) ( ))) (A2)
(( ) ( )) (A3)
(x
i
[t/x
i
]) if t is free for x
i
in (A4)
(x
i
( ) ( x
i
)) if x
i
/ Free() (A5)
x
i
(x
i
.
= x
i
) (A6)
(x
i
.
= x
j
(

)) where is atomic and

is obtained
from by replacing some occurences of x
i
by x
j
, (A7)
and the two rules of inference:
14
(MP) From and ( ) infer .
() From infer x
i
. This is called the generalisation rule.
(In all of the axioms and rules of inference, , , are arbitrary formulas of
/, t is an arbitrary term and x
i
, x
j
are arbitrary variables.)
Denition 5.2. As before, we say that a formula of / is a theorem of
K(/) if there exists a nite sequence of formulas
1
, . . . ,
n
= , such that
each
k
is either an axiom or follows from the previous
i
s by one of the two
deduction rules.
However, for the denition of a formula being derivable from a set
of formulas , we need to modify the generalisation rule and introduce an
additional rule of inference. We say that is derivable from , and write
, if there exists a nite sequence
1

1
, . . . , =
n

n
= , such
that each
k
is either an axiom, belongs to
k
, or follows from the previous

i
s by one of the three deduction rules:
(MP) from and ( ) infer ,
() if x
i
does not appear free in , then from infer x
i
,
(TR) if and

, then

. This is called the thinning rule.


Theorem 5.3 (Soundness Theorem for K(/)). For any rst-order language
/, the system K(/) is sound, i.e. if then [= .
Proof. Suppose that . Just as in the case of the system L
0
, we will
proceed by induction on the length of the proof of .
It is easy to see that any formula that is an axiom of the form (A1), (A2)
or (A3) is logically valid, i.e. that it is true in any /-structure under any
assignment. The validity of (A4) and (A5) has been proven in Corollaries
(4.22) and (4.19). The validity of (A6) is seen easily.
For (A7), let / be an /-structure and let v be any assignment in / such
that / [= x
i
.
= x
j
[v] (i.e. v(x
i
) = v(x
j
)). By induction on terms we can
show that for any term t, if t

is obtained by replacing some occurences of


x
i
by x
j
, then v(t) = v(t

). But then v(P(t


1
, . . . , t
k
)) = v(P(t

1
, . . . , t

k
)) and
v(t
1
.
= t
2
) = v(t

1
.
= t

2
), so also / [= implies / [=

for any atomic .


The modus ponens rule remains valid just as for propositional formulas.
To justify the generalisation rule, suppose that [= , i.e. that for any /-
structure / and any valuation v such that / [= [v] for all , / [= [v].
Fix any such / and v. Suppose further that x
i
does not occur free in any
, so that also / [= [v

] for any v

which is x
i
-equivalent to v. Since
[= , also / [= [v

]. Therefore / [= x
i
[v] and hence [= x
i
.
Finally, the thinning rule is easily justied; suppose that

and
, so that [= . Then / [= for all

implies that / [= for all


, which in turn implies that / [= . So

[= .
15
Theorem 5.4 (Deduction Theorem for K(/)). For any rst-order language
/, Form(/) and Form(/), if and only if ( ).
Proof. With occasional use of the thinning rule (which is easy in L
0
), most
of the forward direction of the proof is the same as for the system L
0
, we
only have to handle two extra cases that of the generalisation rule and
the thinning rule. If
k
has been obtained in the proof by the
generalisation rule from
j
for some j < k, then
k
= x
i

j
and x
i
does not appear free in nor in any formula of . By the induction
hypothesis we also know that (
j
), and hence
x
i
(
j
) By , x
i
/ Free()
(x
i
(
j
) ( x
i

j
)) (A5), x
i
/ Free()
( x
i

k
) MP from 1,2.
Similarly, if


k
has been obtained by the thinning rule from

k
(where

), then (
k
) by the IH and hence

(
k
) by the thinning rule.
Using the thinning rule, the converse is just as easy as in L
0
.
Denition 5.5. If Form
n
(/
0
) is a tautology of propositional calculus
and
1
, . . . ,
n
are formulas of a rst-order language /, then the formula

obtained from by replacing each p


i
by
i
is called a tautology of /.
Proposition 5.6. If

is a tautology of /, then / in K(/).


Proof. If

is a tautology of / obtained from the tautology Form


n
(/
0
)
as described above, then by the completeness theorem of L
0
,
L
0
. But
since the axioms (A1), (A2) and (A3) and the modus ponens rule are all in
K(/), we also have
K(L)

; following the same proof as that of , just with


p
i
replaced everywhere by
i
.
6 Godels Completeness Theorem
The proof of the completeness theorem for rst-order predicate calculus is
somewhat similar to the proof of the completeness theorem for propositional
calculus. We will only present a proof for sentences, although the theorem is
also true for general formulas. For the start, we will also assume there is no
equality symbol in our formulas.
Denition 6.1. A set of sentences is consistent if for no sentence we
have both and
Denition 6.2. A set Sent(/) is called maximal consistent if it is
consistent and for any sentence , either or .
16
Denition 6.3. A set Sent(/) is called witnessing if for all formulas
with no free variables other than x
i
, and such that x
i
, there exists a
constant c
j
Const(/) such that [c
j
/x
i
].
Denition 6.4. Let / be a rst-order language without the equality sign and
let be a set of sentences of /. Then the term model of is the /-structure
/ whose domain is the set A = t Terms(/) : t is closed, the function
interpretations are given by f(t
1
, . . . , t
k
) = f(t
1
, . . . , t
k
), the constant inter-
pretations by c = c, and the predicate interpretations by P(t
1
, . . . , t
k
) i
P(t
1
, . . . , t
k
).
Lemma 6.5. Let / be the term model of Sent(/) and let v be an
assignment in / given by v(x
i
) = s
i
. Then for any term u, v(u) = u[s/x].
Proof. (Note that by u[s/x] we mean replacing each x
i
by s
i
simultaneously.)
The proof is by induction on (the length of) u. If u is a constant the
claim is trivial, if it is a variable x
i
then v(x
i
) = v(x
i
) = s
i
= x
i
[s/x].
If u is of the form f(t
1
, . . . , t
k
), then using the induction hypothesis on
t
i
s we get v(f(t
1
, . . . , t
k
)) = f( v(t
1
), . . . , v(t
1
))) = f(t
1
[s/x], . . . , t
k
[s/x]) =
f(t
1
, . . . , t
k
)[s/x].
Lemma 6.6. Let / be a rst-order language without the equality sign. Let
/ be the term model of a maximal consistent witnessing set Sent(/) and
let v be an assignment in / given by v(x
i
) = s
i
. Then for any formula of
/, / [= [v] if and only if [s/x].
Proof. (By by [s/x] we mean doing the usual substitutions [s
i
/x
i
] simulta-
neously. Note that each s
i
is free for x
i
in , since s
i
are all closed terms.)
The proof is by induction. If is atomic, then = P(t
1
, . . . , t
k
) since
there are no equality signs. Then / [= [v] i v() i P( v(t
1
), . . . , v(t
k
)),
which is the same as P(t
1
[s/x], . . . , t
k
[s/x]) by the above lemma. By the def-
inition of the term model, that is if and only if P(t
1
[s/x], . . . , t
k
[s/x]) =
P(t
1
, . . . , t
k
)[s/x] = [s/x].
If = , then / [= [v] i not / [= [v], which is by the induction
hypothesis if and only if not [s/x]. Since is maximal consistent, that
is exactly when [s/x] = [s/x].
If = ( ), then / [= [v] i / [= [v] or / [= [v], which is
by the IH i [s/x] or [s/x]. In either case we can prove using a
tautology and MP that ([s/x] [s/x]) = ( )[s/x].
The nal case is = x
i
. First suppose that / [= x
i
[v] but not
x
i
[s/x]. (Denote by

the formula with x


j
replaced by s
j
except
for j = i, so that x
i
[s/x] = x
i

.) Since is maximal, we must have


x
i

, from which it is easy to prove (using deduction theorem and


tautologies) that also x
i

= x
i

. Since is witnessing, we
must also have

[c/x
i
] for some constant c. If we now dene
s

j
=

s
j
if j ,= i
c if j = i
and v

(x
j
) = s

j
,
17
then

[c/x
i
] is exactly [s

/x]. By the induction hypothesis,

[c/x
i
] =
[

/x] implies / [= [v

]. But v

is x
i
-equivalent to v, so this is a
contradiction to / [= x
i
[v].
Conversely, suppose that / ,[= x
i
[v]. Then there exists at least one
x
i
-equivalent assignment v

to v, such that / ,[= [v

], i.e. / [= [v

].
Dening
s

j
= v

(x
j
) =

s
j
if j ,= i
v

(x
i
) if j = i,
we get by the induction hypothesis that [s

/x]. If we again dene

to be the formula with x


j
replaced by s
j
except for j = i, we get

[v

(x
i
)/x
i
]. But then x
i

(otherwise x
i

by the maximality
of and then

[v

(x
i
)/x
i
] using A4 and MP). From the denition of

this is the same as x


i
[s/x], which implies that , x
i
[s/x]. This
completes the proof.
Corollary 6.7. Let / be a rst-order language without the equality sign and
let / be the term model of a maximal consistent witnessing set Sent(/).
Then / [= , i.e. / is really a model of .
Proof. For any and for any closed terms s
i
, [s/x] = since is
just a sentence. Trivially , so by the above lemma, / [= [v] for any
valuation v, and hence / [= . This holds for any , so / [= .
Lemma 6.8. For any , Form(/) such that x
i
/ Free() we have
(x
i
( ) (x
i
).
Proof. We have
x
i
( ) ( ) by (A4) and MP,
x
i
( ) ( ) by tautology and MP,
x
i
( ) x
i
( ) by (),
x
i
( ) ( x
i
) by (A5) and MP,
x
i
( ) (x
i
) by tautology and MP,
the result follows by the deduction theorem.
Lemma 6.9. Let Form(/) and Form(/) with only x
i
occurring free
in . If c
j
is a constant symbol not occurring in nor , and [c
j
/x
i
],
then .
Proof. The proof [c
j
/x
i
] only uses a nite subset

of formulas from
. If x
k
is a variable not occuring in

nor in the proof of [c


j
/x
i
] from

, it is easy to see by induction on the proof that also

[x
k
/x
i
]. By
generalisation on x
k
, (A4) and MP we get that

[x
i
/x
k
][x
k
/x
i
] = .
(Note that x
i
is free for x
k
in [x
k
/x
i
].) By the thinning rule also .
18
Lemma 6.10. If Sent(/) is consistent, x
i
Sent(/), x
i
, and
c
j
does not occur in nor in , then [c
j
/x
i
] is consistent.
Proof. Suppose that [c
j
/x
i
] is not consistent, so that [c
j
/x
i
]
and [c
j
/x
i
] for some formula . By the deduction theorem, we
get that ([c
j
/x
i
] ) and ([c
j
/x
i
] ). Since from and
we can deduce any formula, we can assume that is a sentence and
that c
j
does not occur in . Then the above lemma applies and we get that
( ) and ( ).
Since Sent(/), we can use the generalisation rule to infer
x
i
( ) and x
i
( ). Since also Sent(/), we can use
Lemma (6.8) and MP to get that (x
i
) and (x
i
).
By hypothesis, we have x
i
, therefore also and . This is
a contradiction to the consistency of .
Lemma 6.11. If Sent(/) is a consistent and Sent(/), then either
or is consistent.
Proof. This follows easily from Lemma (2.11) and Lemma (2.10), since all
the deductions in L
0
apply in K(/).
Theorem 6.12. Let / be a rst-order language without the equality sign.
Then every consistent set of sentences of / has a model.
Proof. Let Sent(/) be consistent, and for convenience assume that it
contains no odd-indexed constants c
2m+1
. If it does, just relabel the constants
c
j
c
2j
and observe that the relabeled set is still consistent, and if the
relabeled set has a model, then also does. Denote /

= / c
i

iN
0
and
let
1
,
2
, . . . be an enumeration of Sent(/

).
Dene
0
= , noting that
0
is consistent by the assumption on .
For any n N, assuming that
n1
is consistent, dene
n
as follows.
Let

n1/2
=


n1

n
if
n1

n
is consistent,

n1

n
otherwise.
Using Lemma (6.11), this is well-dened and
n1/2
is consistent. If

n1/2
=
n1

n
or
n
,= x
i
, let just
n
=
n1/2
. However,
if
n

n1/2
with
n
= x
i
for some formula , then choose m large
enough so that c
2m+1
does not occur in any formula in
n1/2
and
let
n
=
n1/2
[c
2m+1
/x
i
]. By Lemma (6.10),
n
is consistent.
Now let

nN

n
. Similarly as in the argument for propositional
calculus,

is consistent, and by construction it is also maximal and witness-


ing. Then by Corollary (6.7), it has a model /, but since

, / is also
a model of .
19
Theorem 6.13 (Completeness Theorem for K(/), reduced version). Let
/ be a rst-order language without the equality sign, let Sent(/) and
Sent(/). If [= , then .
Proof. If is inconsistent, the claim is trivial, so suppose is consistent.
Since [= , does not have a model, and hence is
inconsistent. By Corollary (2.12) (which applies just as well in K(/) as in
L
0
), or using the tautology (( ) (( ) )), we get that
.
Theorem 6.14 (G odels Completeness Theorem, 1930). Let / be a rst-
order language, let Form(/) and Form(/). If [= , then .
Theorem 6.15 (Compactness Theorem for K(/)). Let / be a rst-order
language and Sent(/). Then has a model if and only if every nite
subset of has a model.
Proof. The forward direction is trivial. Conversely suppose that does not
have a model, so that [= for every Form(/), i.e. it is inconsistent.
Taking such that and , these two proofs only use a nite
subset

of . But this means that

and

, so that

is also
inconsistent. Therefore

does not have a model either.


Theorem 6.16 (Lowenheim-Skolem Theorem). If Sent(/) is consistent,
then it has a model with a countable domain.
Proof. If / does not contain the equality sign, this follows easily from Corol-
lary (6.7) and Theorem (6.12): there are only countably many closed terms
of /, so the term model is countable. If we include the equality sign, the
proof of the above results is slightly more technical; we need to factor the
elements of the term model up to equality
.
=.
References
[1] Jochen Koenigsmann, Logic Lectures, given at the Mathematical Insti-
tute, University of Oxford, 2007.
[2] A. G. Hamilton, Logic for Mathematicians, Cambridge University Press,
1988.
These lecture notes are based on the lectures of Dr. Jochen Koenigsmann
and are made available with his kind permission. However, the lecturer has
not endorsed them in any way and their content remains the responsibility
of the author.
20

You might also like