Upload
theresapainter
View
212
Download
0
Embed Size (px)
Citation preview
8/13/2019 Tutorial for First Order Predicate Logic I -Lecture6
http://slidepdf.com/reader/full/tutorial-for-first-order-predicate-logic-i-lecture6 1/5
1
Tutorial for Lecture #6 (First-order Predicate Logic I)
Let predicate fool(X,Y) means that X can fool Y, and suppose that the
universe of discourse is the set of all people in the world.
Express the following English sentences in First-order Predicate Logic
1) Everybody can fool Sompong.
2) Samak can fool everybody.
3) Everybody can fool somebody.
4) There is no one who can fool everybody.
5) Everyone can be fooled by somebody.
6) No one can fool both Taksin and Chuan.
7) Chaovalit can fool exactly two people.
8) There is exactly one person whom everybody can fool.
9) No one can fool himself or herself.
Solutions
1) ∀X fool(X, sompong).
2) ∀X fool(samak, X).
3) ∀X ∃Y fool(X,Y).
4) ¬∃X∀Y fool(X,Y).
5) ∀X ∃Y fool(Y, X).
6) ¬∃X ( fool(X, taksin) ∧ fool(X, chuan) )
7) ∃X,Y [ fool(chaovalit, X) ∧ fool(chaovalit, Y) ∧ X ≠ Y ∧
∀Z ( fool(chaovalit, Z) → ( Z = X ∨ Z = Y ) ) ]
8) ∃X (∀Y1 fool(Y1, X) ) ∧ ∀Z ∀Y2 ( fool(Y2, Z) → Z = X )
9) ¬∃X fool(X,X)
8/13/2019 Tutorial for First Order Predicate Logic I -Lecture6
http://slidepdf.com/reader/full/tutorial-for-first-order-predicate-logic-i-lecture6 2/5
2
FOL Logical Consequences
Examples
Suppose that
The set of constant symbols = { a, b, c },
The set of function symbols = { f, g }.
The set of variable symbols = { X, Y }.
∀ X p(X) |= p(t) for any term t. ( Universal Instantiation)
where p is a predicate.
Why?
Consider interpretation I = ( {0, 1, 2}, { P }, { F, G, 0, 1, 2}) where P, F, G
is assigned to p, f and g , respectively. Elements 0, 1 and 2 in the domain
are assigned to a, b and c, resp. Suppose that F(0) = 0, F(1) = 1 and
F(2) = 2, and similarly for G.
In the model theory,
∀ X p(X) means that for every element d ∈ {0, 1, 2}, P(d).
Thus, P(0), P(1), P(2), P(F(0)), P(F(1)), P(F(2)), P(G(0)), … hold in I .
So, ∀ X p(X) |= p(a)∧ p(b) ∧ p(c) ∧ p(f(a)) ∧ p(f(b)) ∧ p(f(c)) ∧ p(g(a)) ∧
…
Also, ∀ X p(X) |= p(X) ∧ p(Y)
8/13/2019 Tutorial for First Order Predicate Logic I -Lecture6
http://slidepdf.com/reader/full/tutorial-for-first-order-predicate-logic-i-lecture6 3/5
3
This is because any environment must map X and Y to some elements in
{0,1,2}.
• The following is not correct.
∀ X ∃ Y p(X,Y) |= ∃ Y p(Y,Y)
• Variable X is replaced by variable Y which already occurs under the
scope of a quantifier.
Definition
Given that A is a well-formed formula and t is a term. Term t is free for
variable X in A if no free occurrence of X falls within the scope of ∀ Y or
∃ Y where Y occurs in t .
Examplea) Y is not free for X in ∃ Y p(X,Y).
b) Z is free for X in ∃ Y p(X,Y).
• The following is the universal instantiation for general case.
∀ X P(X) |= P(t) for any term t that is free for X in P.
where P stands for any formula.
• The following is called the existential generalization.
p(c) |= ∃ X p(X) for any ground term c (Existential Generalization)
where p is a predicate.
8/13/2019 Tutorial for First Order Predicate Logic I -Lecture6
http://slidepdf.com/reader/full/tutorial-for-first-order-predicate-logic-i-lecture6 4/5
4
Example Valid formulae
a)∀ x ( study(x, english) ∧ study(x, programming) )
↔ ( ∀ x study(x, english) ) ∧ ( ∀ x study(x, programming) )
b) It is not true that
∀ x ( study(x, english) ∨ study(x, programming) )
→ ( ∀ x study(x, english) ) ∨ ( ∀ x study(x, programming) )
Consider the following: D = { john , marry }
study (john, english)
study (marry, programming)
Clearly, ∀ x ( study(x, english) ∨ study(x, programming) ) is true, but
( ∀ x study(x, english) ) ∨ ( ∀ x study(x, programming) ) is not true
c) It is not true that
( ∃ x study(x, english) ) ∧ ( ∃ x study(x, programming) )
→ ∃ x ( study(x, english) ∧ study(x, programming) )
Consider the following:
D = { john , marry }
study ( john, english)
study ( marry, programming)
Clearly, ( ∃ x study(x, english) ) ∧ ( ∃ x study(x, programming) ) is
true, but ∃ x ( study(x, english) ∧ study(x, programming) ) is not true
d) ∃ x ( study(x, english) ∨ study(x, programming) )
↔ ( ∃ x study(x, english) ) ∨ ( ∃ x study(x, programming) )
8/13/2019 Tutorial for First Order Predicate Logic I -Lecture6
http://slidepdf.com/reader/full/tutorial-for-first-order-predicate-logic-i-lecture6 5/5
5
e) ∃ x∀ y p(x,y) → ∀ y∃ x p(x,y)
Consider the following:
∃ x∀ y study(x,y) → ∀ y∃ x study(x,y)
Subject = { english, programming, math }
Students = { john, marry, tom }
study (john, english)
study (john, programming)
study (john, math)
Cleary, ∃ x∀ y study(x,y) is true , so in∀ y∃ x study(x,y) is true
Example Satisfiability
a) ∃ x p(x)
b) ∀ x p(x)
c) ∀ x p(x) ∧ ¬∃ y p(y)
d) ∀ x,y ( p(x,y) → p(x,y) )
e) ¬∀ x∀ y ( ¬ p(x) ∨ p(y) )
Solution
a, b, d is satisfiable
c is not satisfiable
e is satisfiable because the formula is equivalent to
¬ ( ( ∀ x ¬ p(x) ) ∨ ( ∀ y p(y)) )
Consider the following:
D = { a, b }
P(a) holds but P(b) do not where P is assigned to p
Logical Consequence ∀ x p(x) |= ∃ x p(x)