1
Foundations of Artificial Intelligence
First-Order Logic
CS472 – Fall 2007
Thorsten Joachims
First-Order Logic
•
Idea:
–
Don’t treat propositions as “atomic” entities.
•
First-Order Logic:
–
Objects: cs472, fred, ph219, emptylist …
–
Relations/Predicates: is_Man(fred), Located(cs472, ph219) …
•
Note: Relations typically correspond to verbs
–
Functions: Pair(search,Pair(learning,Pair(kbsystems, emptylist)))
– Connectives:
∧
,
∨
,
¬
,
⇒
,
⇔
– Quantifiers:
• Universal:
∀
x: ( is_Man(x)
⇒
is_Mortal(x) )
• Existential:
∃
y: ( is_Father(y, fred) )
Example:
Representing Facts in First-Order Logic
1.
Lucy* is a professor
2.
All professors are people.
3.
Fuchs is the dean.
4.
Deans are professors.
5.
All professors consider the dean a friend or don’t know him.
6.
Everyone is a friend of someone.
7.
People only criticize people that are not their friends.
8.
Lucy criticized Fuchs.
* Name changed for privacy reasons.
Example: Proof
Knowledge base:
•
is-prof(lucy)
•
∀
x ( is-prof(x)
→
is-person(x) )
•
is-dean(fuchs)
•
∀
x (is-dean(x)
Æ
is-prof(x))
•
∀
x (
∀
y ( is-prof(x)
∧
is-dean(y)
→
is-friend-of(y,x)
∨
¬
knows(x, y) ) )
•
∀
x (
∃
y ( is-friend-of (y, x) ) )
•
∀
x (Vy (is-person(x)
∧
is-person(y)
∧
criticize (x,y)
→
¬
is-friend-of (y,x)))
•
criticize(lucy,fuchs)
Question: Is Fuchs no friend of Lucy?
¬
is-friend-of(fuchs,lucy)
Knowledge Engineering
1.
Identify the task.
2.
Assemble the relevant knowledge.
3.
Decide on a vocabulary of predicates, functions, and
constants.
4.
Encode general knowledge about the domain.
5.
Encode a description of the specific problem instance.
6.
Pose queries to the inference procedure and get answers.
7.
Debug the knowledge base.
Inference Procedures: Theoretical Results
•
There exist complete and sound proof procedures for propositional
and FOL.
–
Propositional logic
•
Use the definition of entailment directly. Proof procedure is
exponential in
n
, the number of symbols.
•
In practice, can be much faster…
•
Polynomial-time inference procedure exists when KB is expressed
as
Horn clauses
:
where the
P
i
and
Q
are non-negated atoms.
–
First-Order logic
•
Godel’s completeness theorem showed that a proof procedure
exists…
•
But none was demonstrated until Robinson’s 1965
resolution
algorithm
.
•
Entailment in first-order logic is
semidecidable
.

This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*