Firstorder logic
Chapter 8
Chapter 8
1
Outline
♦
Why FOL?
♦
Syntax and semantics of FOL
♦
Fun with sentences
♦
Wumpus world in FOL
Chapter 8
2
Pros and cons of propositional logic
Propositional logic is
declarative
: pieces of syntax correspond to facts
Propositional logic allows partial/disjunctive/negated information
(unlike most data structures and databases)
Propositional logic is
compositional
:
meaning of
B
1
,
1
∧
P
1
,
2
is derived from meaning of
B
1
,
1
and of
P
1
,
2
Meaning in propositional logic is
contextindependent
(unlike natural language, where meaning depends on context)
Propositional logic has very limited expressive power
(unlike natural language)
E.g., cannot say “pits cause breezes in adjacent squares”
except by writing one sentence for each square
Chapter 8
3
Firstorder logic
Whereas propositional logic assumes world contains
facts
,
firstorder logic (like natural language) assumes the world contains
•
Objects
: people, houses, numbers, theories, Ronald McDonald, colors,
baseball games, wars, centuries
. . .
•
Relations
: red, round, bogus, prime, multistoried
. . .
,
brother of, bigger than, inside, part of, has color, occurred after, owns,
comes between,
. . .
•
Functions
: father of, best friend, third inning of, one more than, end of
. . .
Chapter 8
4
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Logics in general
Language
Ontological
Epistemological
Commitment
Commitment
Propositional logic
facts
true/false/unknown
Firstorder logic
facts, objects, relations
true/false/unknown
Temporal logic
facts, objects, relations, times
true/false/unknown
Probability theory
facts
degree of belief
Fuzzy logic
facts + degree of truth
known interval value
Chapter 8
5
Syntax of FOL: Basic elements
Constants
KingJohn,
2
, UCB, . . .
Predicates
Brother, >, . . .
Functions
Sqrt, LeftLegOf, . . .
Variables
x, y, a, b, . . .
Connectives
∧∨¬ ⇒ ⇔
Equality
=
Quantifiers
∀∃
Chapter 8
6
Atomic sentences
Atomic sentence =
predicate
(
term
1
, . . . , term
n
)
or
term
1
=
term
2
Term =
function
(
term
1
, . . . , term
n
)
or
constant
or
variable
E.g.,
Brother
(
KingJohn, RichardTheLionheart
)
>
(
Length
(
LeftLegOf
(
Richard
))
, Length
(
LeftLegOf
(
KingJohn
)))
Chapter 8
7
Complex sentences
Complex sentences are made from atomic sentences using connectives
¬
S,
S
1
∧
S
2
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '09
 Chan
 Logic, Artificial Intelligence, Data Structures, Databases, Quantification, Firstorder logic, FOL

Click to edit the document details