You are on page 1of 42

2022-2023 Inleiding Logica (KI1V13001)

dr. Johannes Korbmacher dr. Colin Caret

Department of Philosophy and Religious Studies

11-10

305/346
Overview

Rehash

10. Tableaux for First-Order Logic


10.1 Overview
10.2 Simple Tableaux
10.3 Tableaux with Identity
10.4 Tableaux with Functions
10.5 Innite Tableaux and Decidability

306/346
Rehash

I A model interprets the signature by assigning denotation to


every constant, a function to every function symbol, and an
n-ary relation to every n-ary relation symbol.

I An assignment in a model tells us what the variables denote. It


plays the role of the context in natural language.

I We can recursively calculate the denotation of arbitrary terms


in a model under an assignment.

I We can recursively calculate the truth-value of a formula


relative to a model under an assignment.

I Validity is dened as in every logic as truth-preservation across


models.

I The Deduction Theorem holds for rst-order logic but doesn't


lead to decidability.

307/346
© https://xkcd.com/447/ , CC BY-NC 2.5

308/346
10.1 Overview
I (10.1.1) Things work very similar to how they work in
propositional logic:

Γφ i Γ ∪ {¬φ} is unsatisable

I (10.1.2) However, things don't work quite as algorithmically as


before:
I We might get innite tableaux.
I (10.1.3) First-order logic is undecidable:
I Theorem (Church and Turing 1935/36). There exists no
eective algorithm that for every inference after nitely many
steps correctly determines whether the premises entail the
conclusion in rst-order logic.
I (10.1.4) We proceed in steps:
I Ÿ10.2 Simple Tableaux
I Ÿ10.3 Tableaux with Identity
I Ÿ10.4 Tableaux with Functions
309/346
Reminder

¬¬φ φ ∧ ψ ¬(φ ∧ ψ) φ∨ψ ¬(φ ∨ ψ)

φ φ ¬φ ¬ψ φ ψ ¬φ

ψ ¬ψ

¬(φ → ψ) φ→ψ φ↔ψ ¬(φ ↔ ψ)

φ ¬φ ψ φ ¬φ φ ¬φ

¬ψ ψ ¬ψ ¬ψ ψ

310/346
(10.2.2) Parameters
I We need to talk about arbitrary objects. For this purpose, we
introduce parameters:
Par = {p, q, r , p1 , p2 , . . .}
I Don't confuse them with sentence letters!

I They work just like constants:

∀x(P(x) → ∃y (R(x, y ) ∧ R(y , p))

I They also get interpreted like constants:

pM ∈ D M

I Nothing to see in the truth-conditions either:

M, α  P(p) i pM ∈ P M
311/346
(10.2.4) Quantier Rules

¬∀xϕ ¬∃xϕ

∃x¬ϕ ∀x¬ϕ

∃xϕ ∀xϕ

(ϕ)[x := p]† (ϕ)[x := a]‡

†: where p ∈ Par is any parameter not on the branch already.


‡: where a ∈ C ∪ Par is any constant or parameter already on the
branch, or an arbitrary fresh parameter if there are none.

312/346
(10.2.5) The ∃ Rule

I You need a fresh parameter every time:


∃x∃yR(x, y )

∃yR(p, y )

R(p, q)
I Idea: If ∃xφ is true, all we know is that some object satises φ.
Since we don't know which one, we pick a new parameter.

313/346
(10.2.6) The ∀ Rule
I The rule needs to be applied to every term on the branch:
∀xP(x)
Q(a)
R(q, b)

P(a)

P(q)

P(b)
I Even if they pop up later:

∀xP(x)
∃yR(a, y )

P(a)

R(a, p)

P(p)
314/346
(10.2.7) Fresh Parameters
I Idea: Each term on the branch denotes something, so if ∀xφ is
true, then also that thing is φ.
I If there are no constants or parameters around, we need to
introduce them:

∀xP(x)
∀x(P(x) → Q(x))

P(p)

P(p) → Q(p)

¬P(p) Q(p)
I This is because domains are non-empty.

315/346
(10.2.9) Remaining Denitions

I A branch B is closed i there is some


R(t1 , . . . , tn ), ¬R(t1 , . . . , tn ) ∈ B ; otherwise B is open.

I A tableau is closed i every branch is closed; otherwise it's


open.

I Γ`φ i the complete tableau for Γ ∪ {¬φ} is closed.

316/346
(10.2.10.i) Example

∀xP(x) ` ∃xP(x)
∀xP(x)
¬∃xP(x)

∀x¬P(x)

¬P(p)

P(p)
7

317/346
(10.2.10.ii) Example
∃x(P(x) ∧ Q(x)) ` ∃xP(x) ∧ ∃xQ(x)
∃x(P(x) ∧ Q(x))
¬(∃xP(x) ∧ ∃xQ(x))

P(p) ∧ Q(p)

P(p)

Q(p)

¬∃xP(x) ¬∃xQ(x)

∀x¬P(x) ∀x¬Q(x)

¬P(p) ¬Q(p)
7 7
318/346
(10.2.10.iv) Example
∀xP(x) ∨ ∀xQ(x) ` ∀x(P(x) ∨ Q(x))
∀xP(x) ∨ ∀xQ(x)
¬∀x(P(x) ∨ Q(x))

∃x¬(P(x) ∨ Q(x))

¬(P(p) ∨ Q(p))

¬P(p)

¬Q(p)

∀xP(x) ∀xQ(x)

P(p) Q(p)
7 7
319/346
(10.2.10.v) Example
∃x∀yR(x, y ) ` ∀y ∃xR(x, y )
∃x∀yR(x, y )
¬∀y ∃xR(x, y )

∀yR(p1 , y )

∃y ¬∃xR(x, y )

¬∃xR(x, p2 )

∀x¬R(x, p2 )

R(p1 , p2 )

¬R(p1 , p2 )
7
320/346
(10.2.10.vii) Example
` ¬∃x(K (x) ∧ ∀y (¬S(y , y ) ↔ S(x, y )))
¬¬∃x(K (x) ∧ ∀y (¬S(y , y ) ↔ S(x, y )))

∃x(K (x) ∧ ∀y (¬S(y , y ) ↔ S(x, y )))

∃x(K (x) ∧ ∀y (¬S(y , y ) ↔ S(x, y )))

(K (p) ∧ ∀y (¬S(y , y ) ↔ S(p, y )))

K (p)

∀y (¬S(y , y ) ↔ S(p, y )))

¬S(p, p) ↔ S(p, p)

¬S(p, p) S(p, p)

S(p, p) ¬S(p, p)
7 7

321/346
(10.2.11) Underivaibility
Γ0φ i the tableau for Γ ∪ {¬φ} contains an open branch.

∀x(P(x) ∨ Q(x)) 0 ∀xP(x) ∨ ∀xQ(x)


∀x(P(x) ∨ Q(x))
¬(∀xP(x) ∨ ∀xQ(x))

¬∀xP(x)

¬∀xQ(x)

∃x¬P(x)

∃x¬Q(x)

¬P(p)

¬Q(q)

P(p) ∨ Q(p)

P(q) ∨ Q(q)

P(p) Q(p)

7 P(q) Q(q)
7
322/346
(10.2.12) Associated Models

I For B an open branch of a complete tableau, we dene MB


by:
(i) D MB = {a ∈ C ∪ Par : a occurs on B}
(ii) aMB = a for all a ∈ C ∪ Par
(iii) R MB = {(a1 , . . . , an ) : R(a1 , . . . , an ) ∈ B}
I This is a term model, the objects in the domain are terms.

323/346
(10.2.13.i) Example
∀x(P(x) ∨ Q(x)) 0 ∀xP(x) ∨ ∀xQ(x)
∀x(P(x) ∨ Q(x))
¬(∀xP(x) ∨ ∀xQ(x))

¬∀xP(x)

¬∀xQ(x)

∃x¬P(x)
D MB = {p, q}
∃x¬Q(x)
p MB = p
¬P(p) q MB = q
¬Q(q) P MB = {q}
P(p) ∨ Q(p) Q MB = {p}
P(q) ∨ Q(q)

P(p) Q(p)

7 P(q) Q(q)
7

324/346
(10.2.13.ii) Example

∀x∀y (R(x, y ) → R(y , x)) 0 ∀xR(x, x)


∀x∀y (R(x, y ) → R(y , x))
¬∀xR(x, x)

∃x¬R(x, x)

¬R(p, p)
D MB = {p}
p MB = p
∀y (R(p, y ) → R(y , p))
R MB = ∅
R(p, p) → R(p, p)

¬R(p, p) R(p, p)
7

325/346
(10.2.13.iii) Example

∃x(P(c) → P(x)) 0 ¬(P(c) → ∀xP(x))


∃x(P(c) → P(x))
¬(P(c) → ∀xP(x))

P(c)

¬∀xP(x)
D MB = {c, p}
p MB = p
∃x¬P(x)
c MB = c
¬P(p)
P MB = {c}
P(c) → P(p)

¬P(c) P(p)
7

326/346
(10.2.13.iv) Example

0 ∀x∀y (R(x, y ) → R(y , x))


¬∀x∀y (R(x, y ) → R(y , x))

∃x¬∀y (R(x, y ) → R(y , x)) D MB = {p, q}


¬∀y (R(p, y ) → R(y , p)) p MB = p
∃y ¬(R(p, y ) → R(y , p))
q MB = q
¬(R(p, q) → R(q, p))
R MB = {(q, p)}

¬R(p, q) R(q, p)

327/346
10.3 Tableaux with Identity

I With identity, we need two new rules:

.
.
. a=b
σ ‡ [x := a]
a = a†
σ[x := b]
†: a any parameter or constant already on the branch, or an
arbitrary fresh one.
‡: σ here is any atomic formula, i.e. a formula of the form
R(t1 , . . . , tn ) or t1 = t2 .

328/346
The a = a Rule

¬∀x(x = x)

∃x¬x = x

¬p = p

p=p
7

I We use this rule only to close branches or at the very end.

I Use is often left implicit.

329/346
The Substitution Rule
` ∀x∀y (P(x) ∧ x = y → P(y ))
¬∀x∀y (P(x) ∧ x = y → P(y ))

∃x¬∀y (P(x) ∧ x = y → P(y ))

¬∀y (P(p) ∧ p = y → P(y ))

∃y ¬(P(p) ∧ p = y → P(y ))

¬(P(p) ∧ p = q → P(q))

P(p) ∧ p = q

¬P(q)

P(p)

p=q

P(q)
7

330/346
The Substitution Rule
I Proper uses are not super easy to gure out formally:
P(p) = (P(x))[x := p]
P(q) = (P(x))[x := q]
I But intuitively they are: if you have a = b, then replace a with
b in every atomic formula.

a = b, b = c ` a = c
a=b
b=c
a 6= c

a=c
7

331/346
(10.3.4.ii) Example
a = b 0 ∀x∃y (P(y ) ∧ x = y )
a=b
¬∀x∃y (P(y ) ∧ x = y )

∃x¬∃y (P(y ) ∧ x = y )

¬∃y (P(y ) ∧ p = y )

∀y ¬(P(y ) ∧ p = y )

¬(P(p) ∧ p = p)

¬(P(a) ∧ p = a)

¬(P(b) ∧ p = b)

¬P(p) p 6= p

¬P(a) p 6= a

¬P(b) p 6= b ¬P(b) p 6= b

p=p
7

332/346
Associated Models

I The domain of the associated model of an open branch in a


complete tableau are equivalence classes:
a ∼B b i a=b∈B
[a]∼B = {b : a ∼B b}
I We set:
I MB
D = {[a]∼B : a occurs in B}
I aMB = [a]∼B , for all a ∈ C ∪ Par
I R MB = {([a1 ]∼B , . . . , [an ]∼B ) : R(a1 , . . . , an ) ∈ B}

333/346
(10.3.4.ii) Example
a = b 0 ∀x∃y (P(y ) ∧ x = y )
a=b
¬∀x∃y (P(y ) ∧ x = y )

∃x¬∃y (P(y ) ∧ x = y )

¬∃y (P(y ) ∧ p = y )
D MB =
∀y ¬(P(y ) ∧ p = y )
{[a]∼B , [b]∼B , [p]∼B } =
¬(P(p) ∧ p = p) {{a, b}, {p}}
¬(P(a) ∧ p = a) aMB = [a]∼B = {a, b}
¬(P(b) ∧ p = b) b MB = [b]∼B = {a, b}
¬P(p) p 6= p
p MB = [p]∼B = {p}
P MB = ∅
¬P(a) p 6= a

¬P(b) p 6= b ¬P(b) p 6= b

p=p
7

334/346
Lemma 10.3.9

Let B be an open branch of a complete tableau and MB the


associated model. Then, if a = b ∈ B, then MB  a = b .

Proof:
I Assume that a = b ∈ B.
I W.t.s. [a]∼B = {c : a = c} = [b]∼B = {c : b = c}.
I So, suppose that c ∈ [a]∼B .
I It follows that a = c ∈ B.
I Since a = b, a = c ∈ B , by substitution, b = c ∈ B.
I So, b ∈ [b]∼B
I The other direction is analogous.

335/346
10.4 Tableaux with Functions

When functions are there, we have ground terms in our formulas.


.
.
∀xϕ . s=t
σ ‡ [x := s]
(ϕ)[x := t]† t = t†
σ[x := t]

†: where t ground term already on the branch, or an arbitrary


is any
fresh ground term if there are none.
‡: σ here is any atomic formula, i.e. a formula of the form
R(t1 , . . . , tn ) or t1 = t2 .

336/346
(10.4.2) Term Models with Functions

I In order to dene associated models, we need to extend our


domain:

(
{u : t = u ∈ B} if t occurs in B
[t]∼B =
{t} otherwise

I Then, we say:
I MB
D = {[t]∼B : t ∈ T }
I aMB = [a]∼B , for a ∈ C ∪ Par
I R MB = {([t1 ]∼B , . . . , [tn ]∼B ) : R(t1 , . . . , tn ) ∈ B}
I And, crucially, we set:

f MB ([t1 ]∼B , . . . , [tn ]∼B ) = [f (t1 , . . . , tn )]∼B

337/346
(10.4.3) Example

¬∀x∀y (f (x) = f (y ) → x = y )

∃x¬∀y (f (x) = f (y ) → x = y )

¬∀y (f (p) = f (y ) → p = y ) D MB = {[t]∼B : t ∈ T }


p MB = [p]∼B = {p}
∃y ¬(f (p) = f (y ) → p = y ) q MB = [p]∼B = {q}
f MB (p MB ) = [f (p)]MB = {f (p), f (q)}
¬(f (p) = f (q) → p = q) f MB (q MB ) = [f (q)]MB = {f (p), f (q)}

f (p) = f (q)

p 6= q

338/346
10.5.1 Innite Tableaux and Decidability
So far, we have avoided innite tableaux, but they exist:

¬∃x∀yR(x, y )

∀x¬∀yR(x, y )

¬∀yR(p1 , y )

∃y ¬R(p1 , y )

¬R(p1 , p2 )

¬∀yR(p2 , y )

∃y ¬R(p2 , y )

¬R(p2 , p3 )

.
.
.

339/346
Quantier Feedback Loops

I Every time we instantiate ∀x¬∀yR(x, y ), we're forced to


introduce a new parameter for y in ∃y ¬R(pi , y ) for which we
have to re-instantiate ∀x¬∀yR(x, y ), which . . . .
I (10.5.2) Obviously, we can never completely write down this
tableau. But that doesn't mean that it doesn't exists as a
mathematical entity.

I (10.5.3) Every innite tableau shows that something is


underivable. Our example shows that 0 ∃x∀yR(x, y ):
I If a tableau closes, it does so after nitely many steps.
I Our tableau provably never closes: we only ever have
¬∀yR(pi , y ), ∃y ¬R(pi , y ), and ¬R(pi , pi+1 ). There cannot be
an atom and it's negation among those.

340/346
(10.5.4) Example
∀x∃yR(x, y ) 0 ∃y ∀xR(x, y )
∀x∃yR(x, y )
¬∃y ∀xR(x, y )

∀y ¬∀xR(x, y )

∃yR(p1 , y )

¬∀xR(x, p1 )

∃x¬R(x, p1 ) I This tableau is open!

R(p1 , p2 ) I All atoms are R(pi , p2i ), ¬R(p2i+1 , pi ).


¬R(p3 , p1 ) I Since i 6= 2i + 1, there can never be
φ, ¬φ ∈ B .
∃yR(p2 , y )

¬∀xR(x, p3 )

∃yR(p3 , y )

¬∀xR(x, p2 )

341/346
.
.
(10.5.5) Models for Innite Tableaux

¬∃x∀yR(x, y )

∀x¬∀yR(x, y )

¬∀yR(p1 , y )

∃y ¬R(p1 , y )
I D MB = {pi : i ∈ N}
¬R(p1 , p2 )
I piMB = pi
¬∀yR(p2 , y )
I R MB = ∅
∃y ¬R(p2 , y )

¬R(p2 , p3 )

.
.
.

342/346
(10.5.5) Models for Innite Tableaux
∀x∃yR(x, y ) 0 ∃y ∀xR(x, y )
∀x∃yR(x, y )
¬∃y ∀xR(x, y )

∀y ¬∀xR(x, y )

∃yR(p1 , y )

¬∀xR(x, p1 )

∃x¬R(x, p1 )
D MB = {pi : i ∈ N}
R(p1 , p2 )
piMB = pi
¬R(p3 , p1 )
R MB = {(pi , p2i ) : i ∈ N}
∃yR(p2 , y )

¬∀xR(x, p3 )

∃yR(p3 , y )

¬∀xR(x, p2 )

343/346
.
.
(10.5.6) Innite Tableaux and Decidability

I Because of innite tableaux, we don't get decidability from


soundness and completeness (which we do get).
I That's one algorithm that doesn't work.
I In fact, no algorithm works, but we can't prove that here.

I The proof involves Turing machines, the so-called Halting


Problem, and complicated formalizations.
I That's for another course.

344/346
Core Ideas (Lecture Version)
I Tableaux for rst-order logic work in similar way as
propositional tableaux. Underlying is always the idea that an
inference is valid i the premises and negation of conclusion
are jointly unsatisable.

I We have three tiers of tableau systems: simple tableaux,


tableaux with identity, and tableaux with identity and
functions. We successively add rules for those.

I There is also a concept of an associated model, which in


rst-order logic is a term model, i.e. a model based on the
syntactic strings as the objects in the domain.

I First-order tableaux can turn out to be innite, in which case


we need to prove that they are open and complete.
I The existence of innite tableaux destroys our hopes for an
easy decidability proof.

I Alas, rst-order logic is actually provably undecidable.

345/346
Thanks!

346/346

You might also like