CH 5 Handout
CH 5 Handout
CH 5 Handout
Models, Tableaux
November 3, 2008
Outline
3 5.3 Interpretations
R ⊆ Dn = D
| ×D× {z. . . × D}
n times
R⊆D
Examples
(a) Binary relation < on N:
<= {(0, 1), (0, 2), . . . , (1, 2), (1, 3), . . . , (2, 3), . . .}
Figure: Graph G
r = {(a, a), (b, b), (c, c), (d, d), (e, e),
(a, b), (b, a), (a, c), (c, a), (b, c), (c, b), (d, e), (e, d)}
• We can think of an n-ary function
(x1 , x2 , . . . , xn ) 7→ f (x1 , x2 , . . . , xn )
(x1 , x2 , . . . , xn , f (x1 , x2 , . . . , xn ))
f : D n → {T, F}
R(d1 , d2 , . . . , dn ) = T ⇐⇒ (d1 , d2 , . . . , dn ) ∈ R
5.2 Predicate Formulas
Definition
Suppose A is a predicate formula. An occurrence of a variable
x in A is a free variable of A if it is not within the scope of any
quantifier ∀x or ∃x.
Examples
(a) ∃y p(x, y )
x-free, y -not free
(b) p(x, y )
x, y -free
(c) ∀x∃yp(x, y )
neither x nor y are free
(d) ∀xp(x) ∨ q(x)
the first occurrence of x is not free while the second
occurrence is
• A variable which is not free is said to be bound.
• If we write
A(x1 , x2 , . . . , xn ),
we mean that the free variables of the formula A are
among x1 , x2 , . . . , xn .
5.3 Interpretations
• U: a set of formulas
• {p1 , p2 , . . . , pm }: all predicate symbols appearing in U
• {a1 , a2 , . . . , ak }: all constant symbols appearing in U
Definition
An interpretation I of U is a triple
where
• D is a non-empty set (domain of I)
• Ri are ni -ary relations on D.
• di are some fixed elements of D.
pi 7→ Ri i = 1, 2, . . . , m
aj 7→ dj j = 1, 2, . . . , k
Example
Consider the formula
∀x p(a, x)
Some of its possible interpretations are:
Suppose:
• A - formula.
• I - an interpretation for A.
• σI - an assignment
We define vσI (A), the truth value of A under σI , inductively:
(a) If A = p(c1 , c2 , . . . , cn ) is an atomic formula, where each ci
is either a variable xj or a constant symbol aj , then
Theorem
If A is a closed formula, then vσI (A) does not depend on σI .
In that case, we write
vI (A)
Theorem
Let A0 = A(x1 , x2 , . . . , xn ) be a non-closed formula and let I be
an interpretation. Then:
(a) vσI (A0 ) = T for assignment σI iff
Definition
A closed formula A is true in I, or I is a model for A, if vI (A) = T.
I |= A
Definition
A closed formula A is satisfiable if, for some interpretation I,
I |= A
I |= A
A1 ≡ A2
vI (A) = T.
Examples
(a) ∀x A(x) ≡ ¬∃x ¬A(x)
(b) ∃x A(x) ≡ ¬∀x¬A(x)
(c) ∀x∀y A(x, y ) ≡ ∀y ∀x A(x, y )
(d) ∃x∃y A(x, y ) ≡ ∃y ∃x A(x, y )
(e) ∃x∀yA(x, y ) 6≡ ∀y ∃xA(x, y )
To see that these two formulas are not equivalent, consider
I = (Z, {≤}).
Clearly,
I 6|= ∃x∀y x ≤ y , I |= ∀y ∃x x ≤ y
Theorem
(a) A ≡ B if and only if |= A ↔ B.
(b) Suppose
U = {A1 , A2 , . . . , An }
U |= A if and only if |= A1 ∧ A2 ∧ . . . An → A.
Examples
The following are valid formulas
(a) ∃x(A(x) ∨ B(x)) ↔ ∃x A(x) ∨ ∃x B(x)
(b) ∀x(A(x) ∧ B(x)) ↔ ∀x A(x) ∧ ∀x B(x)
(c) ∃x(A(x) ∧ B) ↔ ∃x A(x) ∧ B, if x is not free in B.
(d) ∀x(A(x) ∨ B) ↔ ∀x A(x) ∨ B, if x is not free in B.
(e) ∃x(A(x) → B(x)) ↔ (∀x A(x) → ∃x B(x))
(f) ∀x(A(x) → B(x)) ↔ (∃x A(x) → ∀x B(x))
[For more pairs of equivalent formulas, see Fig. 5.2 in Section
5.4]
Proof.
(e)
I |= ∃x∀y A(x, y ).
I |= ∀y A(a, y )
So,
I |= ∀y (∃x A(x, y ))
which proves that, for every I,
Example
We will try to show that
is a valid formula
∀x(p(x) ∨ q(x))
∀x p(x)
∀x p(x), p(a)
Using these guidelines, if we construct a correct tableau for he
formula from the previous example (exercise!), we notice that
one branch ends with the open leaf
In fact, this leaf gives us a model for this satisfiable formula; the
domain is
D = {a, b}
and the unary relations are subsets
p = {a}, q = {b}
A1 = ∀x∃y p(x, y )
A2 = ∀x¬p(x, x)
A3 = ∀x∀y ∀z(p(x, y ) ∧ p(y , z) → p(x, z))
Check whether
A = A1 ∧ A2 ∧ A3
is a satisfiable formula and, if so, find one model for A.
Solution: We will first construct a semantic tableau for the
formula:
∀x∃y p(x, y ), A2 , A3
..
.
We see that the tableau does not terminate; namely, every time
we drop the universal or an existential quantifier, we can
introduce a new constant symbol ai , to get an infinite sequence
of constants:
a1 , a2 , . . . , an , . . .
I = (N, {<})
A = A1 ∧ A2 ∧ A3
γ γ(a) δ δ(a)
∀x A(x) A(a) ∃x A(x) A(a)
¬∃x A(x) ¬A(a) ¬∀x A(x) ¬A(a)
Theorem
(Soundness) Suppose A is a predicate formula and T its
semantic tableau. If T closes, then A is unsatisfiable.
Theorem
(Completeness) Suppose A is a valid formula. Then, the
systematic semantic tableau for A terminates and is closed.
• Systematic tableau: a tableau in which every node is
labeled
W (l) = (U(l), C(l))
where U(l) is a list of formulas and C(l) is the list of all
constant symbols appearing in U(l).
• In a systematic tableau, if using a γ-rule, we do the
following: suppose {γ1 , . . . , γm } are all γ-formulas in U(l)
and
C(l) = {a1 , . . . , ak }
The new node l 0 will be labeled
Theorem
(Löwenheim) If a formula is satisfiable, then it is satisfiable in a
countable model.
Theorem
(Löwenheim - Skolem) If a countable set of predicate formulas
is satisfiable, then it is satisfiable in a countable model.
Theorem
(Compactness Theorem) Let U be a countable set of formulas.
If all finite subsets of U are satisfiable, then so is U.
5.8 Undecidability of the Predicate
Logic
• Turing machines can be viewed as devices which compute
functions on natural numbers; i.e. given a Turing machine
T , we can associate to it a function
fT : N → N
so that fT (n) = m if T halts with the tape consisting of m
1’s when started on the tape with the input of n
consecutive 1’s. If T never halts on the input of n
consecutive 1’s, then fT (n) is undefined.
Theorem
(Church) It is undecidable whether a Turing machine, started on
a blank tape, will halt.
• In other words, it is undecidable, given a Turing machine T ,
whether fT (0) is defined.
Two-Register Machines
Definition
Two-register machine (or, a Minsky machine) M consists of a
pair of registers (x, y ) which can store natural numbers, and a
program P = {L0 , L1 , . . . , Ln }, which is a sequential list of
instructions. Ln is always the command “halt”, and for
0 ≤ i < n, Li has one of the two forms
1 r := r + 1, for r ∈ {x, y }
2 if r = 0 then go to Lj else r := r − 1, for r ∈ {x, y },
0 ≤ j ≤ n.
• Execution of M: sequence of states
sk = (Li , x, y )
• If
sk = (Ln , x, y ), for some k
then M halts and
y = f (m)
is computed by M.
Theorem
For every Turing machine T that computes f : N → N, a
two-register machine M can be constructed which computes
the same function.
Corollary
It is undecidable whether, given a two-register machine M,
whether fM (0) exists or not.
Theorem
(Church) Validity in predicate calculus is undecidable.
Sketch of the Proof.
To each two-register machine M, we associate a predicate
formula SM such that
P = {L0 , L1 , . . . , Ln }
is started at the initial state (L0 , 0, 0), then the computation will
halt with the values at the registers being (z1 , z2 ), for some
natural numbers z1 , z2 .
|= SM
or not.
Church’s Theorem is also true for some restricted classes of
predicate logic:
1 Formulas containing only a finite number of binary
predicate symbols, one unary function symbol, and one
constant symbol.
2 Formulas written as Prolog programs.
3 Formulas with no function symbols.