Lecture6-2018_AI
Lecture6-2018_AI
Lecture 6
Davide Grossi
7 December 2018
Introduction to Logic (AI)
Lecture 6
Davide Grossi
7 December 2018
∀x (Need(you, x ) → Love(x ))
Overview
I Every
I Many
I Some
I No
I Few
I Most
Quantifiers in English
I Everyone is valuable.
I Every student is at least 18 years old.
I Many students work hard.
I Some exams are doable.
I No book is perfect.
I Few books are dull.
I Most students like logic.
Some complex quantified expressions in English
∀
Read ∀x as: “For every object x , . . . ”
Universal quantifier
∀
Read ∀x as: “For every object x , . . . ”
∃
Read ∃x as: “There is at least one object x such that . . .”
Existential quantifier
∃
Read ∃x as: “There is at least one object x such that . . .”
Example:
Example:
Example:
Example:
Proof strategies
Aristotle of Stagira (384–322 v.C.): Syllogisms
Every S is a P
Some S is a P
No S is a P
Some S is not a P
First application of quantifiers: syllogisms
Some S is a P
No S is a P
Some S is not a P
First application of quantifiers: syllogisms
No S is a P
Some S is not a P
First application of quantifiers: syllogisms
No S is a P ∀x (S(x ) → ¬P(x ))
Some S is not a P
First application of quantifiers: syllogisms
No S is a P ∀x (S(x ) → ¬P(x ))
No S is a P ∀x (S(x ) → ¬P(x ))
Proof strategies
Pay attention when translating “some P’s are Q’s”
Proof strategies
Domain of discourse and objects satisfying a formula
Domain of discourse
The domain of discourse is the (nonempty ) collection of objects
that the quantifiers quantify over.
Domain of discourse and objects satisfying a formula
Domain of discourse
The domain of discourse is the (nonempty ) collection of objects
that the quantifiers quantify over.
Definition of satisfaction
Given a formula P(x ), where x is the only unbound variable that
occurs in P(x ). An object d satisfies P(x ) if d has the property
expressed by P(x ) .
Semantics of ∀, ∃
Now we are ready to define the semantics for quantified sentences:
Truth of universal sentence
A formula ∀x P(x ) is true if and only if
every object in the domain of discourse satisfies P(x ).
Semantics of ∀, ∃
Now we are ready to define the semantics for quantified sentences:
Truth of universal sentence
A formula ∀x P(x ) is true if and only if
every object in the domain of discourse satisfies P(x ).
Falsehood
A sentence is false if and only if Abelard can win the game, no
matter how Eloise plays.
Game rule for the universal quantifier ∀
Mnemonics: ∀BELARD
Checking truth of a sentence with ∀ in a situation
Is the following sentence true or false in the world below?
Find out by playing the Hintikka game.
∀x (¬ Cube(x) ∨ Between(d,e,x) ∨ Between(c,d,x))
Checking truth of a sentence with ∀ in a situation
Answer: Abelard can win the game for the sentence below by
choosing object c, so the sentence is false.
∀x (¬ Cube(x) ∨ Between(d,e,x) ∨ Between(c,d,x))
Game rule for the existential quantifier exists
Mnemonics: ∃LOISE
Checking truth of a sentence with ∃ in a situation
Are the following sentences true or false in the world below?
Find out by playing the Hintikka game
∃x ((Large(x) ∨ Medium(x)) ∧ Tet(x) ∧¬(a=b))
∃x ((Large(x) ∨ Medium(x)) ∧ Tet(x) ∧¬(x=e))
Checking truth of a sentence with ∃ in a situation
Proof strategies
Summary of proof rules: Reiteration
..
.
j. P Justification (or premise)
..
.
k. P Reit: j
..
.
= Introduction
..
.
k. a=a = Intro
..
.
= Elimination
..
.
i. P(a) Justification (or premise)
..
.
j. a=b Justification (or premise)
..
.
k. P(b) =Elim: i,j
..
.
..
.
i. P1 Justification (or premise)
⇓
j. Pn Justification (or premise)
..
.
k. P1 ∧ . . . ∧ Pn ∧ Intro: i,. . . , j
..
.
∧ Elimination (general)
..
.
i. P1 ∧ . . . ∧ Pn Justification (or premise)
..
.
k. Pj ∧ Elim: i
..
.
¬ Introduction
..
.
..
.
i. P
..
.
j. ⊥ (Justification)
k. ¬P ¬ Intro: i–j
..
.
¬ Elimination
..
.
i. ¬¬P Justification (or premise)
..
.
k. P ¬ Elim: i
..
.
⊥ Introduction
..
.
i. P Justification (or premise)
..
.
j. ¬P Justification (or premise)
..
.
k. ⊥ ⊥ Intro: i, j
..
.
⊥ Elimination
..
.
i. ⊥ Justification (or premise)
..
.
k. P ⊥ Elim: i
..
.
∨ Introduction (general)
..
.
i. Pj Justification (or premise)
..
.
k. P1 ∨ . . . ∨ Pn ∨ Intro: i
..
.
∨ Elimination (general)
..
.
l. R (Justification)
⇓
m. Pn
..
.
n. R (Justification)
k. R ∨ Elim: i, j–l,. . . ,m–n
..
.
→ Introduction
..
.
..
.
i. P
..
.
j. Q (Justification)
..
.
k. P → Q → Intro: i–j
..
.
→ Elimination
..
.
i. P→Q Justification (or premise)
..
.
j. P Justification (or premise)
..
.
k. Q → Elim: i, j
..
.
↔ Introduction
..
.
..
.
i. P
..
.
j. Q (Justification)
m. Q
..
.
n. P (Justification)
k. P ↔ Q ↔ Intro: i–j,m–n
..
↔ Elimination
..
.
i. P ↔ Q or: Q ↔ P Justification (or premise)
..
.
j. P Justification (or premise)
..
.
k. Q ↔ Elim: i,j
..
.
About subproofs
..
.
i. ∀xP(x ) Justification (or premise)
..
.
k. P(c) ∀ Elim: i
..
.
..
.
i. c
..
.
j. P(c)
∀xP(x ) ∀ Intro: i–j
c
..
.
c=c
∀x (x = x )
Overview
Example
a is a small cube
There exists a small cube.
Cube(a) ∧ Small(a)
∃x (Cube(x ) ∧ Small(x ))
Formal proof rule:
Existential quantifier introduction / ∃ Intro
..
.
i. P(c) Justification (or premise)
..
.
k. ∃xP(x ) ∃ Intro: i
..
.
Formal proof rule:
Existential quantifier introduction / ∃ Intro
..
.
i. P(c) Justification (or premise)
..
.
k. ∃xP(x ) ∃ Intro: i
..
.
Compare with
P(c)
P(a) ∨ P(b) ∨ P(c) ∨ P(d) ∨ . . . ∨ Intro
Overview
..
.
i. ∃xP(x )
j. c P(c)
..
.
k. Q
Q ∃ Elim: i, j–k
c does not occur outside the subproof where it is introduced.
(So in particular, c does not occur in Q.)
Formal proof rule:
Existential quantifier elimination / ∃ Elim
..
.
i. ∃xP(x )
j. c P(c)
..
.
k. Q
Q ∃ Elim: i, j–k
c does not occur outside the subproof where it is introduced.
(So in particular, c does not occur in Q.)
This warrants that c is indeed chosen arbitrarily.
∃ Elimination reminds of ∨ Elimination
.. ..
. .
k. Q k. Q
Q m. P(b)
..
.
n. Q
Q
Overview