8 BCH 8
8 BCH 8
8 BCH 8
def:predlan Definition 1
By a predicate language L we understand a triple
L = (A, T, F), (1) pl
1
symbols, F a set of functions symbols, and C a set of constant symbols. We
assume that all of the sets defining the alphabet are disjoint.
Predicate Variables V AR
We assume that we always have a countably infinite set V AR of predicate
variables, called usually variables. We denote variables by x, y, z, ..., with
indices, if necessary, what we often express by writing
V AR = {x1 , x2 , ....}.
Parenthesis P AR
As in the propositional case, we adopt the signs ( and ) for our parenthesis., i.e.
we define the set P AR as
P AR = {(, )}.
Quantifiers Q
We adopt two quantifiers; ∀ (for all, the universal quantifier) and ∃ (there exists,
the existential quantifier), i.e. we have the following set of quantifiers
Q = {∀, ∃}.
In a case of the classical logic and the logics that extend it, it is possible to adopt
only one quantifier and to define the other in terms of it and propositional con-
nectives. It is impossible in a case of many non-classical logics, for example the
intuitionistic logic. But even in the case of classical logic two quantifiers express
2
better the common intuition, so we assume that we have two of them.
Predicate symbols P
Predicate symbols represent relations. We assume that we have an non empty,
finite or countably infinite set bf P of predicate, or relation symbols. We denote
predicate symbols by P, Q, R, ..., with indices, if necessary, what we often express
by writing
P = {P1 , P2 , ...}.
Function symbols F
We assume that we have a finite (may be empty) or countably infinite set F of
function symbols. When the set F is empty we say that we deal with a language
without functional symbols. We denote functional symbols by f, g, h, ..., with
indices, if necessary, what we often express by writing
F = {f1 , f2 , ...}.
Constant symbols C
We also assume that we have a finite (may be empty) or countably infinite set
C of constant symbols. The elements of C are denoted by c, d, e..., with indices,
if necessary, what we often express by writing
C = {c1 , c2 , ...}.
When the set C is empty we say that we deal with a language without constant
symbols.
Sometimes the constant symbols are defined as 0-ary function symbols, i.e.
C ⊆ F. We single them out as a separate set for our convenience.
Observe that what distinguishes now one predicate language L form the pother
is the choice of the components CON , and P, F, C of its alphabet A. We
hence will write
3
to denote the predicate language L determined by P, F, C and the set of propo-
sitional connectives CON .
2. Terms T
The set T of terms of a predicate language L(P, F, C) is defined as follows.
Example 1
Let f ∈ F, #f = 1, i.e. f is a one place function symbol. Let x, y be predicate
variables, c, d constants, i.e. x, y ∈ V AR, c, d ∈ C. The following expressions
are terms:
x, y, f (x), f (y), f (c), f (d), f (f (x), ) f (f (y)), f f ((c)), f (f (d)), ...etc.
Example 2
If F = ∅, C = ∅, then the set T of terms consists of variables only, i.e.
T = V AR = {x1 , x2 , ....}.
4
From the above we get the following observation.
Remark 1
For any predicate language L(P, F, C), the set T of its terms is always non-
empty.
Example 3
If f ∈ F, #f = 1, g ∈ F, #g = 2, x, y ∈ V AR, c, d ∈ C, then some of the
terms are the following:
f (g(x, y)), f (g(c, x)), g(f (f (c)), g(x, y)), g(c, g(x, f (c))).
From time to time, the logicians are and we may be informal about how we
write terms. For instance, if we denote a two place function symbol g by +, we
may write x + y instead +(x, y). Because in this case we can think of x + y as
an unofficial way of designating the ”real” term +(x, y), or even g(x, y).
2. Formulas F
Before we define the set of formulas, we need to define one more set; the set of
atomic, or elementary formulas. They are the ”smallest” formulas as were the
propositional variables in the case of propositional languages.
Atomic formulas
An atomic formula of a predicate language L(P, F, C) is any element of the
alphabet A∗ of the form
R(t1 , t2 , ..., tn ),
where R ∈ P, #R = n, i.e. R is n-ary relational symbol and t1 , t2 , ..., tn are
terms. The set of all atomic formulas is denoted by AF and is defines as
Example 4
Consider a language
L(∅, {P }, ∅),
for #P = 1, i.e. a language without neither functional, nor constant symbols,
and with one, one-place predicate symbol P . The set of atomic formulas contains
all formulas of the form P (x), for x any variable, i.e.
AF = {P (x) : x ∈ V AR}.
5
Example 5
Let now
L = L({f, g}, {R}, {c, d}),
for #f = 1, #g = 2 , #R = 2, i.e. L has two functional symbols: one -place
symbol f and two-place symbol g; one two-place predicate symbol R, and two
constants: c,d. Some of the atomic formulas in this case are the following.
R(c, d), R(x, f (c)), R(f (g(x, y)), f (g(c, x))), R(y, g(c, g(x, f (c)))).
AF ⊆ F;
if A ∈ F, 5 ∈ C1 , then 5 A ∈ F;
if A ∈ F, 5 ∈ C2 , then (A ◦ B) ∈ F;
6
Example 6
Let L be a language with with the set {∩, ∪, ⇒, ¬} of connectives and with
two functional symbols: one -place and one two-place, one two-place predicate
symbol, and two constants. We write L as
R(c, f (d)), ∃xR(x, f (c)), ¬R(x, y), ∀z(∃xR(x, f (c)) ⇒ ¬R(x, y)),
modal Example 7
Let L be a language with with the set {¬, , ♦, ∩, ∪, ⇒} of connectives and P,
F, and C the same as in previous exercise, i.e.
where #f = 1, #g = 2 , #R = 2.
L is now a language of some first order modal logic. Some of the formulas of
L are the following.
♦¬R(c, f (d)), ♦∃xR(x, f (c)), ¬♦R(x, y), ∀z(∃xR(x, f (c)) ⇒ ¬R(x, y)),
7
1. Some formulas are without quantifiers.
For example formulas R(c1 , c2 ), R(x, y), (R(y, d) ⇒ R(a, z)). A formula with-
out quantifiers is called an open formula.
Variables x, y in R(x, y) are called free variables. The variables y in R(y, d)
and z in R(a,z) are also free.
2. Quantifiers bind variables within formulas.
The variable x is bounded by ∃x in the formula ∃xR(x, y), the variable y is
free. The variable y is bounded by ∀y in the formula ∀yR(x, y), the variable
y is free.
3. The formula ∃x∀yR(x, y) does not contain any free variables, neither does
the formula R(c1 , c2 ). A formula without any free variables is called a closed
formula or a sentence.
Sometimes in order to distinguish more easily which variable is free and which
is bound in the formula we might use the bold face type for the quantifier
bound variables and write the formulas as follows.
Observe that the formulas ∃yP (y), (∀x(P (x) ⇒ ∃yQ(x, y))) are closed. We
call a close formula a sentence.
Example 8
Consider atomic formulas: P (y), Q(x, c), R(z), P1 (g(x, y), z). Here are some
non atomic formulas formed out of them.
1. (P (y) ∪ ¬Q(x, c)) ∈ F. This is an open formula A with two free variables
x,y. We denote A this as formula A(x, y).
2. ∃x(P (y) ∪ ¬Q(x, c)) ∈ F. We write x to denote that x is a bound variable.
The variable y is free. This is a formula B with one free variable y. We denote
B as a formula B(y).
3. ∀y(P (y) ∪ ¬Q(x, c)) ∈ F. The variable y is bound, the variable x is free.
We denote this formula by for example A1 (x).
4. ∀y∃x(P (y) ∪ ¬Q(x, c)) ∈ F has no free variables. It is a closed formula
called also a sentence.
Exercise 1
Given the following formulas of L:
P (x, f (c, y)), ∃cP (x, f (c, y)), ∀xf (x, P (c, y)), ∃xP (x, f (c, y)) ⇒ ∀yP (x, f (c, y)).
8
1. Indicate whether they are, or are not well formed formulas of F. For those
which are not in F write a correct formula.
2. For each correct, or corrected formula identify all components: connectives,
quantifiers, predicate and function symbols, and list all its terms.
3. For each formula identify its s free and bound variables. State which are open
and which are closed formulas (sentences), if any.
Solution
Formula A1 = P (x, f (c, y)).
It is a correct atomic formula. P is a 2 argument predicate symbol, f is a
2 argument function symbol, c is a constant. We write it symbolically: P ∈
P, f ∈ F, c ∈ C. It is an open formula with two free variables x,y. We denote
it by A1 (x, y). It has no bound variables.
Formula A2 = ∃cP (x, f (c, y)).
It is a not a correct formula, i.e. ∃cP (x, f (c, y)) 6∈ F. The expression ∃c has no
meaning because c is a constant, not a variable.
The corrected formulas are: B1 = ∃xP (x, f (c, y)), B2 = ∃yP (x, f (c, y)), and
formulas B = ∃zP (z, f (c, y)) for any variable z different then x and y.
None of the correct formulas are open. Variable y is free in B1 = B1 (y), variable
x is free in B2 = B2 (x), both variables x and y are free in all formulas B =
B(x, y). All formulas are nether close, nor open. The terms appearing in any
of them are the same as in A1 = P (x, f (c, y)) and are: x, y, c, f (c, y).
Formula A3 = ∀xf (x, P (c, y)).
It is a not a correct formula, i.e. ∀xf (x, P (c, y)) 6∈ F. The function symbol f in
front f (x, P (c, y)) indicate a term and terms are not formulas. Moreover, the
atomic formula P (c, y) can’t be put inside a term!
Formula A4 = ∃xP (x, f (c, y)) ⇒ ∀yP (x, f (c, y)).
It is a not a correct formula. The correct formula is A = (∃xP (x, f (c, y)) ⇒
∀yP (x, f (c, y))). It has two free variables x and y and we write it as A = A(x, y).
Informally, in the formula P (x, y) both variables x and y are called free vari-
ables. They are not in the scope of any quantifier. The formula of that type
(without quantifiers) is an open formula.
The formal definition of the set of free variables of a formula is the following.
9
2. for any unary propositional connective, i.e any 5 ∈ C1 ,
F V (5A)= F V (A),
i.e. the free variables of 5A are the free variables of A;
3. for any binary propositional connective, i.e any ◦ ∈ C2 ,
F V (A ◦ B)= F V (A) ∪ F V (B),
i.e. the free variables of (A ◦ B) are the free variables of A together with
the free variables of B;
4. F V (∀xA) = F V (∃xA) = F V (A) − {x},
i.e. the free variables of ∀xA and ∃xA are the free variables of A, except
for x.
Example 9 The formulas ∃xQ(c, g(x, d)), ¬∀x(P (x) ⇒ ∃y(R(f (x), y)∩¬P (c)))
are sentences. The formulas Q(c, g(x, d)), ¬(P (x) ⇒ (R(f (x), y) ∩ ¬P (c)))
are open formulas. The formulas ∃xQ(c, g(x, y)), ¬(P (x) ⇒ ∃y(R(f (x), y) ∩
¬P (c))) are neither sentences nor open formulas. They contain some free and
some bound variables; the variable y is free in the first formula, the variable x
is free in the second.
The definition 1 defines a predicate language L = LCON (P, F, C) (3) with its
sets of predicate, function and constant symbol possibly countably infinite sets.
We use its most general case with sets of predicate, function and constant symbol
all countably infinite sets for defining all relevant notions concerning provability
and semantics. In particular, we will define in detail the classical semantics for
this most general form of L and prove the completeness theorem for classical
predicate logic based on it.
When we deal with formal theory Th(SA) with a set SA of specific axioms
we restrict the language LCON (P, F, C) to the symbols characteristic for that
theory. We hence introduce the following definition.
langtheory Definition 5
Given a language LCON (P, F, C) = (A, T, F).
Let F0 ⊆ F be a non-empty, finite subset of formulas of L. Denote by P0 , F0 , C0
the sets of all predicate, function, and constant symbols appearing in the formu-
las from the set F0 . The language
LCON (P0 , F0 , C0 )
10
is called a language defined by the set F0 of formulas.
to indicate that F V (A) ⊆ {x1 , x2 , ..., xn } without implying that all of x1 , x2 , ..., xn
are actually free in A. This is similar to the practice in algebra of writing
p(x1 , x2 , ..., xn ) for a polynomial p in the variables x1 , x2 , ..., xn without imply-
ing that all of them have nonzero coefficients.
11
termfree Definition 7 (Term t free for y in A)
If A ∈ F and t is a term, then t is said to be free for y if no free occurrence of
y lies within the scope of any quantifier bounding variables in t.
respectively. The term t = f (x, y) is free for x and is not free for y in A. The
term t = f (x, z) is free for x and z in B. The term t = y is not free neither for
x nor for z in A, B.
Example 12
Let A be a formula
The term t1 = f (x) is not free for x in A; the term t2 = g(x, z) is free for z
only, term t3 = h(x, y) is free for y only because x occurs as a bound variable
in A; term t4 .
Definition 8 (Replacement)
If A(x), A(x1 , x2 , ..., xn ) ∈ F and t, t1 , t2 , ..., tn ∈ T , then A(x/t), A(x1 /t1 , x2 /t2 , . . . , xn /tn )
or, more simply just
A(t), A(t1 , t2 , ..., tn )
denotes the result of replacing all occurrences of the free variables x, x1 , x2 , ..., xn ,
by the terms t, t, t1 , t2 , ..., tn , respectively, assuming that t, t1 , t2 , ..., tn are free
for all theirs variables in A.
We often use logic symbols, while writing mathematical statements. For exam-
ple mathematicians in order to say ”all natural numbers are greater then zero
and some integers are equal 1” often write it as
Some of them, who are more ”logic oriented”, would also write it as
∀x∈N x ≥ 0 ∩ ∃y∈Z y = 1,
or even as
(∀x∈N x ≥ 0 ∩ ∃y∈Z y = 1).
12
None of the above symbolic statements are formulas of the predicate language
L. These are mathematical statement written with mathematical and logic
symbols. They are written with different degree of ”logical precision”, the last
being, from a logician point of view the most precise.
Observe that the quantifiers in ∀x∈N and ∃y∈Z used in all of them are not
the one used in the predicate language L, which admits only quantifiers ∀x
and ∃y, for any variables x, y ∈ V AR. The quantifiers ∀x∈N , ∃y∈Z are called
quantifiers with restricted domain. The first is restricted to the domain of
natural numbers, the second to the integers. The restriction of the quantifier
domain can, and often is given by more complicated statements. For example
we say ”for all x > 2” and write ∀x>2 , or we say ”exists x > 2 and at same time
x + 2 < 8” and write symbolically ∃(x>2∩x+2<8) .
Our goal now is to correctly ”translate ” mathematical and natural language
statement into formulas of the predicate language L of the classical predicate
logic with the the set {¬.∩, ∪, ⇒} of propositional connectives. We say ”classical
predicate logic” to express that we define all notions for the classical semantics
to be defined formally in the next section 2. One can extend these notions to
non-classical logics, but we describe and will talk only about classical case. We
introduce the quantifiers with restricted domain into the classical predicate logic
language by expressing them within the language L as follows.
def:rq Definition 9
Given a classical predicate logic language
The quantifiers ∀A(x) , ∃A(x) are called quantifiers with restricted domain,
or restricted quantifiers, where A(x) ∈ F is any formula with any free vari-
able x ∈ V AR.
A formula ∀A(x) B(x) is an abbreviation of a formula ∀x(A(x) ⇒ B(x)) ∈ F.
We write it symbolically as
Exercise 2
13
Given a mathematical statement S written with logical symbols
(∀x∈N x ≥ 0 ∩ ∃y∈Z y = 1)
1. Translate it into a proper logical formula with restricted domain quantifiers
i.e. into a formula of L that uses the restricted domain quantifiers.
2. Translate your restricted domain quantifiers logical formula into a correct
logical formula without restricted domain quantifiers, i.e. into a formula of L.
Solution
We proceed to write this and other similar problems solutions in a sequence of
steps.
STEP 4. We apply (7) and (8) to the formula from STEP 3. and obtain a
formula A of L as a representation of the given mathematical statement S.
14
Here is a perfectly acceptable short solution. We presented the long solution in
order to explain all steps needed to be performed when one writes a solution.
Short Solution
The basic statements in S are: x ∈ N, x ≥ 0, y ∈ Z, y = 1. The corresponding
atomic formulas of L are: N (x), G(x, c1 ), Z(y), E(y, c2 ), respectively.
The statement S becomes becomes a restricted quantifiers formula
(∀N (x )G(x, c1 ) ∩ ∃Z(y) E(y, c2 )). Applying restricted quantifiers definition 9
and transformation rules (7), (8) we get a following formula A ∈ F
2 Classical Semantics
sec:clsem
The notion of predicate tautology is much more complicated then that of the
propositional. Predicate tautologies are also called valid formulas, or laws of
quantifiers to distinguish them from the propositional case. The formulas of a
predicate language L have meaning only when an interpretation is given for all
its symbols. We define an interpretation I by interpreting predicate, functional
symbols as a concrete relation, function defined in a certain set U 6= ∅, and
constants symbols as elements of the set U. The set U is called the universe
of the interpretation I. These two items specify a structure M = (U, I) for the
language L.
.
The semantics for a first order language L in general, and for the first order
classical logic in particular, is defined, after Tarski (1936) in terms of the struc-
ture M = [U, I], an assignment s of L, and a satisfaction relation (M, s) |= A
between structures, assignments and formulas of L.
M = [U, I],
15
1. I assigns to any predicate symbol P ∈ P a relation PI defined in the
universe U . I.e. for any P ∈ P, if #P = n, then
PI ⊆ U n .
fI : U n −→ U.
Example 13
Let L be a language with one two-place predicate symbol, two functional symbols:
one -place and one two-place, and two constants, i.e.
where #R = 2, #f = 1, #g = 2, and c, d ∈ C.
We define a structure M = [U, I] as follows. We take as the universe the set
U = {1, 3, 5, 6}. The predicate R is interpreted as ≤, what we write as RI : ≤.
We interpret f as a function fI : {1, 3, 5, 6} −→ {1, 3, 5, 6} such that fI (x) = 5
for all x ∈ {1, 3, 5, 6}, and we put gI : {1, 3, 5, 6} × {1, 3, 5, 6} −→ {1, 3, 5, 6}
such that gI (x, y) = 1 for all x ∈ {1, 3, 5, 6}. The constant c becomes cI = 3,
and dI = 6. We write the structure M as
M = [{1, 3, 5, 6} ≤, fI , gI , cI = 3, dI = 6]
Exercise 3
Given a language
L = L({R}, {g}, ∅, )
where #R = 2, #g = 2 . Define two structures for L, both with infinite universe:
one infinitely countable and one uncountable.
Solution
There are many such structures. Here are two of the very simple.
M1 = [N, , ≤, +], where N is the set of natural numbers, and for example
M2 = [R, , ≤, +], where R is the set of real numbers.
16
assign Definition 11 (Assignment)
Given a first order language L = L(P, F, C) with the set V AR of variables. Let
M = [U, I] be a structure for L with the universe U 6= ∅.
An assignment of L in M = [U, I] is any function
s : V AR −→ U (9) assing
17
Exercise 4
Consider a language
for # P = # R = 2, #f = # g=1, # h= 2.
Let M = [{0, 1}, I], where the interpretation I is defined as follows.
PI = {(0, 0)}, RI = {(0, 0), (1, 1)},
fI (0) = 0, fI (1) = 0, gI (0) = 1, gI (1) = 1, hI is given by a formula
hI (x, y) = x for all (x, y) ∈ {0, 1} × {0, 1}, and cI = 1, dI = 0.
Solution
First we evaluate terms that are variables and constants of L using the formulas
1. and 2. of definition 12: sI (x) = s(x), sI (c) = cI , respectively and obtain:
sI (z) = s(z) = 1, sI (y) = s(y) = 1, sI (x) = s(x) = 1, sI (c) = cI = 1, sI (d) =
dI = 2. We use the formula sI (f (t1 , t2 , . . . , tn )) = fI (sI (t1 ), sI (t2 ), . . . , sI (tn )
to evaluate the rest of terms in T0 and obtain:
sI f (c) = fI (sI (c)) = fI (cI )) = fI (1) = 0, sI f (x) = fI (sI (x)) = fI (1) = 0
sI g(z) = gI (sI (c)) = gI (1) = 1, sI (f (g(d)) = fI (sI (f (g(d))) = fI (gI (sI (d))) =
fI (gI (cI )) = fI (gI (1)) = fI (1) = 0,
sI g(f (g(z)) = gI (fI (gI (sI (z)))) = gI (fI (gI (1))) = gI (fI (1)) = gI (0) = 1,
sI (h(c, f (g(d)))) = hI (sI (c), sI (f (g(d)))) = hI (cI , fI (gI (sI (d))))
= hI (1, fI (gI (0))) = hI (1, fI (1)) = hI (1, 0) = 1,
sI (h(f (x), g(z))) = hI (fI (sI (x)), gI (sI (x))) = hI (fI (1), gI (1)) = hI (0, 1) = 0.
Example 14
Consider a language
L = L({P, R}, {f, h}, ∅ )
18
for # P = # R = 2, #f = 1, # h= 2.
Let M = [Z, I], where Z is the set on integers and the interpretation I for
elements of F and C is as follows.
fI : Z −→ Z is given by formula f (m) = m + 1 for all m ∈ Z.
hI : Z × Z −→ Z is given by formula f (m, n) = m + n for all m, n ∈ Z.
Let s : V AR −→ Z be any assignment such that s(x) = −5, s(y) = 2 and
t1 , t2 ∈ T be t1 = h(y, f (f (x))) and t2 = h(f (x), h(x, f (y)).
We evaluate:
sI (t1 ) = sI (h(y, f (x)) = hI (sI (y), fI (sI (x))) = +(2, fI (−5)) = 2 − 4 = −2,
sI (t2 ) = sI (h(f (x), h(x, f (y))) = +(fI (−5), +(−5, 3)) = −4 + (−5 + 3) = −6.
t(x1 , x2 , . . . , xn ).
Observation 1
For any term t(x1 , x2 , . . . , xn ) ∈ T, any structure M = [U, I] and any assign-
ments s, s0 of L in M, the following holds.
If s(x) = s0 (x) for all x ∈ {x1 , x2 , . . . , xn }, i.e the assignments s, s0 agree on
all variables appearing in t, then, sI (t) = s0 I (t).
Given a first order (predicate) language L = LCON (P, F, C). The satisfaction
relation (M, s) |= A between structures, assignments and formulas of L is de-
fined by induction on the complexity of formulas of L. It is the satisfaction
relation (M, s) |= A that allows us to distinguish one semantics for a given L
from the other, and consequently one logic from the other. We define now only
a classical satisfaction and the notion of classical predicate tautology.
19
def:sat Definition 13 (Classical Satisfaction)
Given a classical predicate (first order) language
(M, s) |= A
(ii) A is not atomic formula and has one of connectives of L as the main
connective.
(M, s) |= ¬A if and only if (M, s) 6|= A,
(M, s) |= (A ∩ B) if and only if (M, s) |= A and (M, s) |= B,
(M, s) |= ∃xA if and only if there is s0 such that s, s0 agree on all variables
except on x, and (M, s0 ) |= A,
(M, s) |= ∀xA if and only if for all s0 such that s, s0 agree on all variables
except on x, and (M, s0 ) |= A.
Observe that that the truth or falsity of (M, s) |= A depends only on the values
of s(x) for variables x which are actually free in the formula A. This is why we
often write the condition (iii) as
(iii)’ A(x) is not atomic formula (with a free variable x) and begins with one
of the quantifiers.
(M, s) |= ∃xA(x) if and only if there is s0 such that s(y) = s0 (y) for all
y ∈ V AR − {x}, and (M, s0 ) |= A(x),
(M, s) |= ∀xA if and only if for all s0 such that s(y) = s0 (y) for all
y ∈ V AR − {x}, and (M, s0 ) |= A(x).
20
sat Exercise 5
For the structures Mi , find assignments si , s0 i (1 ≤ i ≤ 4), such that
The structures Mi are defined as follows (the interpretation I for each of them
is specified only for symbols in the formula Q(x, c), and N denotes the set of
natural numbers.
Solution
Consider M1 = [{1}, QI :=, cI : 1]. Observe that all s : V AR −→ {1} must
be defined by a formula s(x) = 1 for all x ∈ V AR. We evaluate (definition 12),
sI (x) = 1, sI (c) = cI = 1. By definition 13, (M1 , s) |= Q(x, c) if and only if
(sI (x), sI (c)) ∈ QI , i.e. (1, 1) ∈= what is true as 1 = 1. We have proved
21
Consider M4 = [N, QI :≥, cI : 1]. Let s : V AR −→ N be any assignment, such
that s(x) = 5. We evaluate sI (x) = 5, sI (c) = 1. Observe that the condition
(sI (x), sI (c)) ∈ QI holds as 5 ≥ 1 and hence
(M4 , s) |= Q(x, c).
Let now s0 be any assignment s0 : V AR −→ N , such that s0 (x) = 0. The the
condition (s0 I (x), s0 I (c)) ∈ QI does not holds as 0 6≥ 1 and
(M4 , s0 ) 6|= Q(x, c).
sat1 Example 15
Let Mi (1 ≤ i ≤ 4) be structures in defined the exercise 5 and let corresponding
assignments si be as defined as its solutions.
1. (M1 , s) |= Q(x, c), (M1 , s) |= ∀xQ(x, c), (M1 , s) |= ∃xQ(x, c).
2. (M2 , s) |= Q(x, c), (M2 , s) 6|= ∀xQ(x, c), (M1 , s) |= ∃xQ(x, c).
3. (M3 , s) |= Q(x, c), (M3 , s) |= ∀xQ(x, c), (M3 , s) |= ∃xQ(x, c).
4. (M4 , s) |= Q(x, c), (M4 , s) 6|= ∀xQ(x, c), (M4 , s) |= ∃xQ(x, c).
We define now a very important semantic notion. It has different names: logi-
cal consequence, logical implication, semantic consequence, logical (semantical)
entailment. We use a name logical consequence and define it as follows.
22
Directly from the model definition 14 we get the following.
sentence Fact 1
For any formula A of L,
If A is a sentence, then if there s such that (M, s) |= A, then M is a model for
A, i.e. M |= A
cA Definition 17 (Closure)
Given a formula A of L.
By the closure of A we mean the formula obtained from A by prefixing in
universal quantifiers all variables the are free in A. If A does not have free
variables (i.e. is a sentence), the closure if A is defined to be A itself.
23
models Example 16
Let Q ∈ P, #Q = 2 and c ∈ C Consider formulas
tf Example 17
Let M1 − M4 be structures defined in example 5.
1. Formulas Q(x, c), ∀xQ(x, c), ∃xQ(x, c) are all true in the structures M1
and M3 .
2. Formula ∃xQ(x, c) is also true in M2 and in M3 .
3. Formulas ¬Q(x, c), ¬∀xQ(x, c), ¬∃xQ(x, c) are all false in the structures
M1 and M3 .
4. Formula ¬∃xQ(x, c) is also false in M2 and in M3 .
24
5. Formulas (Q(x, c) ∩ ¬Q(x, c)), (¬∀xQ(x, c) ∩ ∀xQ(x, c)), and the formula
(∃xQ(x, c) ∩ ¬∃xQ(x, c)) are all false in all structures M1 − M4 .
6. The formula ∀xQ(x, c) is false in a structure M5 = [N, QI :<, cI : 0].
P3. It is not the case that both M |= A and M |= ¬A, i.e. no formula of L
can be both true and false in M, i.e. there is no formula A, such that M |= A
and M =| A.
P4. If M |= A and M |= (A ⇒ B), then M |= B.
P5. (A ⇒ B) is false in M if and only if M |= A and M |= ¬B, i.e.
25
We write
|=p A
when there is a need to stress a distinction between propositional and predicate
tautologies, otherwise we will use the symbol |= .
Predicate tautologies are also called laws of quantifiers.
Following the notation T for the set of all propositional tautologies (chapter ??)
we denote by Tp the set of all predicate tautologies, i.e.
Directly from the definition 18, the tautology definition 19 we get the following
basic properties of logical consequence as defined by definition 15.
logcons Property 2
For any A, B ∈ F and any set Γ ⊆ F of formulas of L,
P1. A |= B if and only if |= (A ⇒ B).
P2. If A |= B and A is true in M, then B is true in M.
P2. If Γ |= B and if all formulas in Γ are true in M, then B is true in M.
def:notaut Definition 20
For any formula A of predicate language L,
A is not a predicate tautology (6|= A) if and only if there is a structure
M = (U, I) for L, such that M 6|= A.
We call such structure M a counter-model for A.
26
We denote it as =| A and write symbolically
=| A if and only if M=| A, for all structures M.
When there is a need to distinguish between propositional and predicate contra-
dictions we also use symbol
=|p A,
where ”p” stands for ”predicate”.
Following the notation C for the set of all propositional contradictions (chap-
ter ??) we denote by Cp the set of all predicate contradictions, i.e.
Cp = {A of L{¬,∩,∪,⇒,¬} (P, F, C) : =|p A}. (14) Cp
Directly from the definition 18 and Property 1 we have the following duality
property, the same as the one for propositional logic.
Fact 2
For any formula A of predicate a language L,
A ∈ Tp if and only if ¬A ∈ Cp ,
A ∈ Cp if and only if ¬A ∈ Tp .
Obviously, the formulas (Q(x, c) ∩ ¬Q(x, c)), (¬∀xQ(x, c) ∩ ∀xQ(x, c)), and the
formula (∃xQ(x, c) ∩ ¬∃xQ(x, c)) defined in example 17 are not only false in
the structures M1 − M4 , but are false in all structures M for L. By definition
21 they all are predicate contradictions. Observe that they all are substitutions
of propositional contradictions (a ∩ ¬a) or (¬a ∩ a). By the same argument the
formulas (Q(x, c)∪¬Q(x, c)), (¬∀xQ(x, c)∪∀xQ(x, c)), (∃xQ(x, c)∩¬∃xQ(x, c))
are predicate tautologies as they are substitutions of propositional tautologies
(a ∪ ¬a) or (¬a ∪ a).
We put these examples and observations in a following theorems that establish
relationship between propositional and predicate tautologies and contradictions.
We write now |=, =| do denote respectively propositional tautologies and con-
tradiction, and |=p , =|p for predicate tautologies and contradictions. We first
formalize and prove (theorem 1) the intuitively obvious fact: if a formula A is
a propositional tautology (contradiction), then replacing propositional variables
in A by any formulas of a predicate language we obtain a formula which is a
predicate tautology (contradiction).
Example 18
Let consider the following example of a propositional tautology and a proposi-
tional contradiction.
|= ((a ⇒ b) ⇒ (¬a ∪ b)) and =| ((a ∪ ¬a) ⇒ (¬b ∩ b)).
27
Substituting ∃xP (x, z) for a, and ∀yR(y, z) for b, we obtain, by theorem 1, that
|=p ((∃xP (x, z) ⇒ ∀yR(y, z)) ⇒ (¬∃xP (x, z) ∪ ∀yR(y, z))) and
We put it all in a more formal and more general and precise language as follows.
Given a propositional language L0 = L{¬,∩,∪,⇒,¬} with the set F0 of formulas
and a predicate languageL = L{¬,∩,∪,⇒,¬} (P, F, C) with the set F of formulas.
Let A(a1 , a2 , . . . , an ) ∈ F0 and A1 , A2 , . . . , An ∈ F. We denote by
thm:sub1 Theorem 1
Given a propositional language L0 with the set F0 of formulas and a predicate
language L with the set F of formulas.
For any A(a1 , a2 , . . . an ) ∈ F0 and any A1 , A2 , . . . An ∈ F the following holds.
1. If |= A(a1 , a2 , . . . , an ), then |=p A(a1 /A1 , a2 /A2 , . . . , an /An ).
2. If =| A(a1 , a2 , . . . , an ), then =|p A(a1 /A1 , a2 /A2 , . . . , an /An ).
Proof 1. follows directly from satisfaction definition 13. 2. follows from defini-
tion 13, property 1, and definition 21.
Some predicate tautologies are, by theorem 1, substitutions of propositional
formulas. Visibly a predicate formula (∀x A(x) ⇒ ∃x A(x)) can not be obtained
as a substitution of a propositional formula. We prove now that it is a predicate
tautology.
p1 Fact 3
For any formula A(x) of L,
Proof
Assume that 6|= (∀x A(x) ⇒ ∃x A(x)). By definition 20 there is a structure
M = (U, I) and s : V AR −→ U, such that (M, s) 6|= (∀x A(x) ⇒ ∃x A(x)).
By definition 13, (M, s) |= ∀x A(x) and (M, s) 6|= ∃x A(x). It means that
(M, s0 ) |= A(x) for all s0 such that s, s0 agree on all variables except on x,
and it is not true that there is s0 such that s, s0 agree on all variables except
28
on x, and (M, s0 ) |= A(x). This is impossible and this contradiction proves
|= (∀x A(x) ⇒ ∃x A(x)).
Given a set F of formulas of a predicate language L. We denote by OF set of all
open formulas of L, i.e. formulas without quantifiers. We prove that any open
formula in order to be predicate tautologies must be a substitution definied in
theorem 1 of a propositional tautology. I.e. we have the following substitution
theorem.
thm:sub2 Theorem 2
Any open formula A of a predicate language L is a predicate tautology if and
only if it is a substitution of a propositional tautology as defined in theorem 1.
Proof
Observe that every open formula from A ∈ OF is a form
B(a1 /A1 , a2 /A2 , . . . , an /An ) for certain propositional formula B(a1 , a2 , . . . an ),
where A1 , A2 , . . . , An are predicate atomic formulas from the set AF as defined
in (5). Theorem 2 follows directly from the following.
lemsub2 Lemma 1
Let σ be a one to one mapping from the set V0 of propositional variables of
propositional language L0 into the set AF of the atomic formulas of the predicate
language L. For any A(a1 , a2 , . . . an ) ∈ F0 ,
Proof of lemma
The implication ”if |= A(a1 , a2 , . . . , an ), then
|=p A(a1 /σ(a1 ), . . . , an /σ(an ))” holds as a particular case of theorem 2. We
prove now the converse implication by proving its opposite
if 6|= A(a1 , a2 , . . . , an ), then 6|=p A(a1 /σ(a1 ), . . . , an /σ(an )). (16) opp
29
We have that for every atomic formula P (t1 , t2 , . . . tn ) there is exactly one propo-
sitional variable a, such that P (t1 , t2 , . . . tn ) = σ(a). We define now that PI as
follows.
(t1 , t2 , . . . tn ) ∈ PI if and only if P (t1 , t2 , . . . tn ) = σ(a) and v(a) = T .
(t1 , t2 , . . . tn ) 6∈ PI if and only if P (t1 , t2 , . . . tn ) = σ(a) and v(a) = F .
We assumed that v : V0 −→ {T, F } is such that v ∗ (A(a1 , a2 , . . . , an )) = F .
Directly form definition of the assignment s and the interpretation I we have
that ([T, I], s) 6|= A(a1 /σ(a1 ), . . . , an /σ(an )). It end the roof of lemma 1 and
hence the proof of theorem 2.
Fact 4
The converse implication to (3) is not a predicate tautology, i.e. there is a
formula A of L, such that
6|= (∃x A(x) ⇒ ∀x A(x)). (17) p2
Proof
Observe that to prove (17) we have to provide an example of an instance of a
formula A(x) and construct a counter-model M = (U, I) for it. Let A(x) be an
atomic formula P (x, c), for any P ∈ P, #P = 2. The instance is
(∃x P (x, c) ⇒ ∀x P (x, c)).
We take as M = (N, PI :<, cI : 3) for N set of natural numbers. Let s be any
assignment s : V AR −→ N. We show now (M, s) |= ∃x P (x, c). Take any s0
such that s0 (x) = 2 and s0 (y) = s(y) for all y ∈ V AR−{x}. We have (2, 3) ∈ PI ,
as 2 < 3 and hence there exists s0 that agrees with s on all variables except on x,
and (M, s0 ) |= P (x, c). But (M, s) 6|= ∀x P (x, c) as for example for s0 such that
s0 (x) = 5 and s0 (y) = s(y) for all y ∈ V AR − {x}, (2, 3) 6∈ PI , as 5 6< 3. This
proves that M = (N, PI :<, cI : 3) is a counter model for ∀x P (x, c). Hence
6|= (∃x A(x) ⇒ ∀x A(x)).
The ”shorthand” solution is: the formula (∃x P (x, c) ⇒ ∀x P (x, c)) becomes
in M = (N, PI :<, cI : 3) a mathematical statement (written with logical
symbols): ∃n n < 3 ⇒ ∀n n < 3. It is an obviously false statement in the set
N of natural numbers, as there is n ∈ N , such that n < 3, for example n = 2,
and it is not true that all natural numbers are smaller then 3.
We have to be very careful when we deal with quantifiers with restricted
domain (definition 9). We adopt the following definition for restricted domain
quantifiers.
30
quantifies ∀B(x) , ∃B(x) we define
The most basic predicate tautology (3) fails when we use the quantifiers with
restricted domain. We show now that
as follows. We take M = (N, I), where N is the set of real numbers and the
interpretation I is defined as QI :<, PI :>, cI : 0. The ”shorthand” solution is
as follows. The formula 19) becomes a mathematical statement
This statement is a false in the set N of natural numbers because the statement
n < 0 is false for all natural numbers and F ⇒ B is a true implication for
any logical value of B, so ∀n (n < 0 ⇒ n > 0) is a true statement and
∃n (n < 0 ∩ n > 0) is obviously false in the set N of natural numbers.
The restricted quantifiers law corresponding to the predicate tautology (3) is:
31
3 Predicate Tautologies
sec:predtaut
We have already proved in Fact 3 the basic predicate tautology
S2 Let t be free for x in A(x). A(t) is a results from A(x) by replacing t for
all free occurrences of x in A(x), i.e. A(t) = A(x/t). Let s : V AR −→ U and
s0 be obtained from s by replacing s(x) by sI (u). We use (24) and induction on
the number of connectives and quantifiers in A(x) and prove
S3 Directly from definition 13 and (25) we get that for any M = (U, I) and
any s : V AR −→ U ,
This proves that (∀x A(x) ⇒ A(t)) is a predicate tautology. Observe that a
term x is free for x in A(x), so we also get as a particular case of t = x that
|= (∀x A(x) ⇒ A(x)).
Proof of (23) follows from (22), theorem 1, property 1, theorem 5, and defin-
ability law (49). We carry it as follows. First we observe that by theorem 1 we
32
have that |= ((∀x¬A(x) ⇒ ¬A(t)) ⇒ (A(t) ⇒ ¬∀x¬A(x))) as a substitution of
propositional tautology ((a ⇒ ¬b) ⇒ (b ⇒ ¬a)). By just proved (22) we have
that |= (∀x¬A(x) ⇒ ¬A(t)) for A(x) being a formula ¬A(x). By P 4 in property
1, we get |= (A(t) ⇒ ¬∀x¬A(x)). We apply the existential quantifier definability
law (49) and equivalence substitution theorem 5 and get |= (A(t) ⇒ ∃x A(x)).
This ends the proof of (22).
Remark the restrictions in (22) and (23) are essential. Here is a simple example
explaining why they are needed in (22). The example for (23) is similar.
Let A(x) be a formula ¬∀y P (x, y), for P ∈ P. Notice that a term t = y is not
free for y in A(x). Consider (22) A(x) = ¬∀y P (x, y) and t = y.
Distributivity 1
33
For any formulas A(x), B(x), A, B of L, such that A , B does not contain any
free occurrences of x,
The restrictions that the formulas A, B do not contain any free occurrences of
x is essential for both Generalization and Distributivity 1 tautologies.
Here is a simple example explaining why they are needed in (29). The relaxation
of the assumption that A, B do not contain any free occurrences of x would lead
to the following disaster. Let A and B(x) be both atomic formula P(x). Thus x
is free in A and we have the following instance of (29).
Observe that ∀x(P (x) ⇒ P (x)) is a predicate tautology. Take M = [N, I] for
I such that PI = ODD, where ODD ⊆ N is the set of odd numbers. Let
s : V AR −→ N . By definition if I, sI (x) ∈ PI if and only if sI (x) ∈ ODD.
Then obviously (M, s) 6|= ∀x P (x) and M = [N, I] is a counter model for (29)
as (M, s) |= ∀x(P (x) ⇒ P (x)).
The examples for (30), (31), and (29) similar.
Distributivity 2
For any formulas A(x), B(x) of L,
34
Take M = [R, I] where R is the set of real numbers, and the interpretation I is
QI :>, PI :<, cI : 0. The particular case formula becomes an obviously false
mathematical statement
((∃x∈R x > 0 ∩ ∃x∈R x < 0) ⇒ ∃x∈R (x > 0 ∩ x < 0)).
Consider (36). We take as Let A(x), B(x) be atomic formulas Q(x, c), R(x, c).
The particular case of (36 ) is now a formula
(∀xQ(x, c) ∪ R(x, c)) ⇒ (∀xQ(x, c) ∪ ∀xR(x, c))).
Take M = (R, I) where R is the set of real numbers and QI :≥, RI :<, cI : 0.
The particular formula becomes an obviously false mathematical statement
(∀x∈R (x ≥ 0 ∪ x < 0) ⇒ (∀x∈R x ≥ 0 ∪ ∀x∈R x < 0)).
De Morgan
For any formulas A(x), B(x) of L,
|= (¬∀xA(x) ⇒ ∃x¬A(x)), (38) 1mall
|= (¬∃xA(x) ⇒ ∀x¬A(x)), (39) 1mex
|= (∃x¬A(x) ⇒ ¬∀xA(x)), (40) 2mall
|= (∀x¬A(x)) ⇒ ¬∃xA(x)). (41) 1mex
We prove (38) as an example.The proofs of all other laws are similar. As-
sume that (38) does not hold. By definition 16 there is M = (U, I) and
s : V AR −→ U, such that (M, s) |= ¬∀xA(x)) and (M, s) 6|= ∃x¬A(x).
Consider (M, s) |= ¬∀xA(x). By satisfaction definition 13, (M, s) 6|= ∀xA(x).
This holds only if for all s0 , such that s, s0 agree on all variables except on x,
(M, s0 ) 6|= A(x).
Consider (M, s) 6|= ∃x¬A(x). This holds only if there is no s0 , such that
(M, s0 ) |= ¬A(x), i.e. there is no s0 , such that (M, s0 ) 6|= A(x). This means
that for all s0 , (M, s0 ) |= A(x). Contradiction with (M, s0 ) 6|= A(x).
Quantifiers Alternations
For any formula A(x, y) of L,
|= (∃x∀yA(x, y) ⇒ ∀y∃xA(x, y)). (42) qalt
35
3.1 Equational Laws of Quantifiers
The most frequently used laws of quantifiers have a form of a logical equivalence,
symbolically written as ≡. This not a new logical connective. This is a very
useful symbol. It has the same properties as the equality = and can be used in
the same way we use the equality symbol =.
Note that we use the same equivalence symbol ≡ and the tautology symbol
|= for propositional and predicate languages and semantics when there is no
confusion. Formally we define the predicate equivalence as follows.
def2:peq Definition 24
For any formulas A, B ∈ F of the predicate language L,
Directly from the theorem 3 and logical equivalence definition 23 we get that
the following is true.
36
e2 Example 19
Consider the following propositional logical equivalence:
(a ⇒ b) ≡ (¬a ∪ b).
Substituting ∃xP (x, z) for a, and ∀yR(y, z) for b, we get from theorem 4 that
the following equivalence holds:
B1 = A1 (A/B).
Directly from the Dictum de Omi (22) and the Generalization (27) tautologies
we get the proof of the following theorem 6 useful for building new logical
equivalences from the old, known ones.
thm3 Theorem 6
For any formulas A(x), B(x) of L.
e3 Example 20
We know from the example 19 that the formulas (∃xP (x, z) ⇒ ∀yR(y, z)) and
(¬∃xP (x, z) ∪ ∀yR(y, z)) are logically equivalent. We get, as the direct conse-
quence of the theorem 6 the following equivalences:
37
Exercise 6
Prove that for any formulas A(x), B(x) of L
Solution
By the substituting A(x) for a, and any formula B(x) for b, in the propositional
de Morgan Law: ¬(a ∪ b) ≡ (¬a ∩ ¬b), we get via theorem 4 that
We know, from the propositional logic, that for any propositional variables a, b,
a ≡ b if and only if ¬a ≡ ¬b. Substituting ∀x¬(A(x) ∪ B(x)) and ∀x(¬A(x) ∩
¬B(x)) for a and b, respectively, we get that
if and only if
¬∀x¬(A(x) ∪ B(x)) ≡ ¬∀x(¬A(x) ∩ ¬B).
But we have proved that ∀x¬(A(x)∪B) ≡ ∀x(¬A(x)∩¬B) holds, so we conclude
that the equivalence (45) also holds.
e4 Exercise 7
Prove that for any formulas A(x), B of L
Solution
By the substituting A(x) for a, and any formula B for b, in the propositional
de Morgan law: ¬(a ∪ b) ≡ (¬a ∩ ¬b), we get that
38
We concentrate now only on these laws which have a form of a logical equiva-
lence.They are called the equational laws for quantifiers.
Directly from the definition 23 and the de Morgan tautologies (38)-(41) we get
one of the most important equational laws, called also De Morgan Laws.
De Morgan Laws
¬∀xA(x) ≡ ∃x¬A(x) (46) mall
¬∃xA(x) ≡ ∀x¬A(x) (47) mexists
Now we will apply them to show that the quantifiers can be defined one by the
other i.e. that the following Definability Laws hold.
Definability Laws
∀xA(x) ≡ ¬∃x¬A(x) (48) q1
∃xA(x) ≡ ¬∀x¬A(x) (49) q2
The law (48) is often used as a definition of the universal quantifier in terms of
the existential one (and negation), the law (49) is a definition of the existential
quantifier in terms of the universal one (and negation).
Proof of (48)
Substituting any formula A(x) for a variable a in the propositional equivalence
a 𠪪a we get by theorem 4 that A(x) 𠪪A(x). Applying the theorem 6
to the above we obtain ∃xA(x) ≡ ∃x¬¬A(x). By the de Morgan Law (46)
∃x¬¬A(x) ≡ ¬∀x¬A(x) and hence ∃xA(x) ≡ ¬∀x¬A(x), what ends the proof.
Proof of (49)
We obtain ∀xA(x) ≡ ∀¬¬A(x) in a similar way as above. By the de Morgan
Law (47), ∀¬¬A(x) ≡ ¬∃¬A(x) and hence ∀xA(x) ≡ ¬∃¬A(x), what ends the
proof.
Other important equational laws are the following introduction and elimination
laws. We prove later the first two of them. We show that the laws (52) - (57) can
be deduced from laws (50) and (51), the de Morgan laws (46), (47), definability
laws (48), (49), propositional tautologies and theorems 3, 4, and theorem 5.
Introduction and Elimination Laws
If B is a formula such that B does not contain any free occurrence of x,
then the following logical equivalences hold.
39
∃x(A(x) ⇒ B) ≡ (∀xA(x) ⇒ B) (55) 6
∀x(B ⇒ A(x)) ≡ (B ⇒ ∀xA(x)) (56) 7
40
We can write this proof in a shorter, symbolic way as follows:
law 49
∃x(A(x) ∪ B) ≡ ¬∀x¬(A(x) ∪ B)
thm 3, 4
≡ ¬∀x(¬A(x) ∩ ¬B)
law 51
≡ ¬(∀x¬A(x) ∩ ¬B)
(46), thm 5
≡ (¬∀x¬A(x) ∪ ¬¬B)
thm 5
≡ (∃xA(x) ∪ B)
Distributivity Laws
Let A(x), B(x) be any formulas with a free variable x.
Law of distributivity of universal quantifier over conjunction
¬∀B(x) A(x) ≡ ∃B(x) ¬A(x), ¬∃B(x) A(x) ≡ ∀B(x) ¬A(x). (64) RdeMorgan
Here is a poof of first equality. The proof of the second one is similar and is left
as an exercise.
41
≡ ∃x (¬¬B(x) ∩ ¬A(x)) ≡ ∃x (B(x) ∩ ¬A(x)) ≡ ∃B(x) ¬A(x)).
The proofs are similar to the proof of the restricted de Morgan Laws.
The similar generalization of the other Introduction and Elimination Laws (51),
(52), (55), (57) for restricted domain quantifiers fails. We can easily follow the
proof of (18) and construct proper counter-models proving the following.
res2 Example 21
The restricted quantifiers version of (51) is the following.
42
4 Proof Systems: Soundness and Completeness
We adopt now general definitions from chapter ?? concerning proof systems to
the case of classical first order (predicate) logic.
We refer the reader to chapters ?? and ?? for a great array of examples, exercises,
homework problems explaining in a great detail all notions we introduce here
for the predicate case. The examples and exercises we provide here are not
numerous and restricted to the laws of quantifiers.
Given a language L = L{¬,∩,∪,⇒,¬} (P, F, C). Any proof system
Remark 2
We use symbols |=p , Tp to stress the fact that we talk about predicate lah=nguage
and classical predicate tautologies.
43
where P1 .P2 , . . . , Pm , C ∈ F.
(i) We say that the rule (r) is sound if and only if the following condition
holds for all structures M = [U, I] for L.
(ii) The rule (r) is not sound if and only if there is a structure M = [U, I],
such that
M |= {P1 , P2 , .Pm } and M |6 = C. (72) n-s
In order to prove that the rule (r) is sound we have to show the implication
(71). It means, by definitions 14, 18, we have to show that that if all premisses
of the rule (r) are true in M = [U, I], so is its conclusion. This also justifies
correctness of the definition 25; sound rules do preserve the truthfulness as it
is defined in our semantics.
r1 Exercise 8
Prove the soundness of the rule
¬∀xA(x)
(r1) . (73) r1
∃x¬A(x)
Proof
Assume that the soundness condition (71) does not hold for for all structures
M = [U, I]. It means we assume that there is a structure M = [U, I], such that
M |= ¬∀xA(x) and M 6|= ∃x¬A(x).
Let M |= ¬∀xA(x). By definition 14, for all s : V AR −→ U we have (M, s) |=
¬∀xA(x)). Hence by satisfaction definition 13, (M, s) 6|= ∀xA(x). This holds
only if for all s0 , such that s, s0 agree on all variables except on x, (M, s0 ) 6|= A(x).
Observe that M 6|= ∃x¬A(x) only if there is no s0 , such that (M, s0 ) |= ¬A(x),
i.e. there is no s0 , such that (M, s0 ) |= A(x). This means that for all s0 ,
(M, s0 ) |= A(x). Contradiction with (M, s0 ) 6|= A(x).
r2 Exercise 9
Prove the soundness of the rule
∀xA(x)
(r2) . (74) r2
∃xA(x)
Proof
Assume that the soundness condition (71) does not hold for for all structures
M = [U, I]. It means we assume that there is a structure M = [U, I], such that
M |= ∀xA(x) and M 6|= ∃xA(x).
44
Let M |= ∀xA(x). By definition 14, for all s : V AR −→ U we have (M, s) |=
∀xA(x)).
By definition 13, (M, s) |= ∀x A(x) and (M, s) 6|= ∃x A(x). It means that
(M, s0 ) |= A(x) for all s0 such that s, s0 agree on all variables except on x, and
it is not true that there is s0 such that s, s0 agree on all variables except on x,
and (M, s0 ) |= A(x). This is impossible and this contradiction proves soundness
of (r2).
er3 Exercise 10
Prove that the rule
∃xA(x)
(r3) . (75) r3
∀xA(x)
is not sound.
Proof
Observe that to prove that the rule (75) is not sound we have to provide an
example of an instance of a formula A(x) and prove (ii) of definition 25 for it.
Let A(x) be an atomic formula P (x, c), for any P ∈ P, #P = 2. We take as
M = (N, PI :<, cI : 3) for N set of natural numbers. Let s be any assignment
s : V AR −→ N. Obviously (M, s) |= ∃x P (x, c).
Take any s0 such that s0 (x) = 2 and s0 (y) = s(y) for all y ∈ V AR − {x}. We
have (2, 3) ∈ PI , as 2 < 3 and hence there exists s0 that agrees with s on all
variables except on x, and (M, s0 ) |= P (x, c). But (M, s) 6|= ∀x P (x, c) as for
example for s0 such that s0 (x) = 5 and s0 (y) = s(y) for all y ∈ V AR − {x},
(2, 3) 6∈ PI , as 5 6< 3.
This proves that M = (N, PI :<, cI : 3) is a model for (∃x P (x, c) and hence
6|= ∀x A(x)).
The ”shorthand” solution is: the formula (∃x P (x, c) becomes in M = (N, PI :<
, cI : 3) a true mathematical statement (written with logical symbols): ∃n n <
3. The formula (∀x P (x, c) becomes a mathematical frmula ∀n n < 3 which is
an obviously false statement in the set N of natural numbers, as there is n ∈ N ,
such that n < 3, for example n = 2, and it is not true that all natural numbers
are smaller then 3. So the rule (r3) is not sound.
45
M |= {P1 , P2 , .Pm } if and only if M |=C. (76) sseq
P1 ∩ P2 ∩ . . . ∩ Pm ≡ C. (77) ss-equiv
Example 22
The sound rule (73)
¬∀xA(x)
(r1)
∃x¬A(x)
is strongly sound by De Morgan Law (46).
The sound rule (75)
∀xA(x)
(r2)
∃xA(x)
is not strongly sound by exercise 10.
We say that the proof system S is sound if the following conditions hold.
(1) LA ⊆ Tp ;
(2) Each rule of inference r ∈ R is sound.
The proof system S is strongly sound if the condition (2) is replaced by the
following condition (2’)
(2’) Each rule of inference r ∈ R is strongly sound under M.
When we define (develop) a proof system S our first goal is to make sure that it
a ”sound” one, i.e. that all we prove in it is true. Proving the following theorem
establishes this goal.
46
thm:Ss Theorem 7 (Soundness Theorem for S)
Given a predicate proof system S.
For any A ∈ F, the following implication holds.
PS ⊆ Tp . (80) Ss
Proof
Observe that if we have already proven that S is sound as stated in the definition
27, the proof of the implication (79) is a straightforward application of the
mathematical induction over the length of the formal proof of the formula A.
It means that in order to prove the Soundness Theorem 7 for a proof system Sit
is enough to verify the two conditions of the definition 27 (1) LA ⊆ Tp and (2)
each rule of inference r ∈ R is sound.
We again refer the reader to chapter ?? for detailed examples, exercises and
problems.
As we can see, proving Soundness Theorem 7 for any proof system we develop
is indispensable and the proof is quite easy. The next step in developing a logic
(classical predicate logic in our case now) is to answer necessary and a difficult
question: Given a proof system S, about which we know that all it proves it
true (tautology). Can we prove all we know to be true (all tautologies)?
Proving the following theorem establishes this goal.
PS = Tp . (82) Scomp
47
always a crucial and very difficult task. There are many methods and techniques
for doing so, even for classical proof systems (logics) alone. Non-classical logics
often require new sometimes very sophisticated methods. We presented two
proofs of the Completeness Theorem for classical propositional Hilbert style
proof system in chapter ??, and a constructive proofs for automated theorem
proving systems for classical propositional logic the chapter ??.
We present a proof of the Completeness Theorem for predicate (first order) logic
in the next chapter ??.
5 Homework Problems
Predicate Languages
A1 = R(x, y, g(c, x)), A2 = ∃xP (x, f (x, y)), A3 = ∃dR(x, y, g(c, d)),
A4 = ∀z(f (x, P (c, y)), A5 = ∃yP (x, f (c, y)) ∪ ∀yP (x, f (c, y)).
(a) Indicate whether they are, or are not well formed formulas of F. For
those which are not in F write a correct formula.
(b) For each correct, or corrected formula identify all components: con-
nectives, quantifiers, predicate and function symbols, and list all its
terms.
(c) For each formula identify its s free and bound variables. State which
are open and which are closed formulas (sentences), if any.
(d) Describe a language defined by the set F0 = {A1 , A2 , . . . A5 } of
formulas that are correct or corrected.
2. For the following mathematical statements write their corresponding for-
mulas of predicate language L.
3. For each of the following formulas (some with restricted quantifiers) write
2 corresponding natural language sentences.
48
(a) ∀x(P (x) ⇒ ∃yQ(x, y)).
(b) ∀x∃y(P (x) ∩ ¬Q(x, y)).
(c) ∀A(x) ∃A(y) B(y).
(d) ∃P (x) ∀N (x) R(x, y).
5. Justify that for any formula A ∈ F and any term t ∈ T the following facts
hold.
(a) A closed tern t, i.e. term with no variables is free for any variable x
in A.
(b) A term t is free for any variable in A if none of the variables in t is
bound in A.
(c) Term t = x is free for x in any formula A.
(d) Any term is free for x in A if A contains no free occurrences of x.
49
Classical Semantics
5. Show that the following formulas are predicate tautologies for any formulas
A, B in L.
(a) (∀x∀yA(x, y) ⇒ ∀y∀xA(x, y)).
(b) (∃x∃yA(x, y) ⇒ ∃y∃xA(x, y)).
(c) (∀x(A(x) ⇒ B(x)) ⇒ (∀xA(x) ⇒ ∀xB(x))).
6. Prove that the following formulas are not predicate tautologies by finding
their proper instances and constructing counter models for them.
50
(a) ((∃xA(x) ∩ ∃xB(x)) ⇒ ∃x (A(x) ∩ B(x))).
(b) (∀x (A(x) ∪ B(x)) ⇒ (∀xA(x) ∪ ∀xB(x))).
(c) ((∀xA(x) ⇒ ∀xB(x)) ⇒ ∀x(A(x) ⇒ B(x))).
7. Prove that the following formulas are predicate tautologies for any for-
mulas A(x), B(x), A, B of L, such that A , B does not contain any free
occurrences of x.
9. Prove that the converse implication to the formulas listed below are pred-
icate tautologies for any formulas A(x), B(x), A, B of L, such that A, B
does not contain any free occurrences of x.
51