First Order Logic
First Order Logic
Lecturer
Rabiya Tahir
[email protected]
Rabiya Tahir
Lecture # 11
First Order Logic
(FOL)
Limitation of PL
variables
represent any object: likes(X, apples)
functions
transform objects:
likes(john,
fruit_of(apple_tree))
• Operate on these symbols using PL operators.
FOL Provides
• Variable symbols
• E.g., x, y, foo
• Connectives
• Same as in PL: not (), and (), or (), implies (), if
and only if (biconditional )
• Quantifiers
• Universal x or (Ax)
• Existential x or (Ex)
7
Example
• Universal quantification
• (x)P(x) means that P holds for all
values of x in the domain associated
with that variable
• E.g., (x) dolphin(x) mammal(x)
Quantifiers • Existential quantification
• ( x)P(x) means that P holds for some
value of x in the domain associated
with that variable
• E.g., ( x) mammal(x) lays-eggs(x)
• Permits one to make a statement
about some object without naming it
9
( ∃ x) (Person (x) ∧ father
(x, Ahmed) ).
Example
nice.
Quantifier
Similarly, you can switch the order of existential
Scope quantifiers:
(x)(y)P(x,y) ↔ (y)(x) P(x,y)
14
x y is the same as y x
x y is the same as y x
• x y Loves(x, y)
Properties • “There is a person who loves
of everyone in the world”
Quantifiers • y x Loves(x, y)
• “Everyone in the world is loved by
at least one person”