0% found this document useful (0 votes)
51 views12 pages

AI-08-First Order Logic

First-order logic (FOL) represents knowledge about objects and their relations. FOL has constants, functions, predicates, equality, and quantifiers as basic elements. FOL can represent concepts like universal and existential quantification, and properties of quantifiers like order independence and duality.

Uploaded by

pany p.g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views12 pages

AI-08-First Order Logic

First-order logic (FOL) represents knowledge about objects and their relations. FOL has constants, functions, predicates, equality, and quantifiers as basic elements. FOL can represent concepts like universal and existential quantification, and properties of quantifiers like order independence and duality.

Uploaded by

pany p.g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Introduction to Artificial Intelligence

First Order Logic

By: 1

Boreshban [email protected]
Outline
• Why FOL?

• Syntax and semantics of FOL

• Using FOL
Propositional Logic Pros and cons of
 Propositional logic is declarative
 Propositional logic allows partial/disjunctive/negated
information
▫ (unlike most data structures and databases)
Propositional logic is compositional:
-meaning of B1,1  P1,2 is derived from meaning of B1,1 and of P1,2
 Propositional logic has very limited expressive power
▫ (unlike natural language)
▫ E.g., cannot say “students play football or basketball“
 except by writing one sentence for each student
First-order logic
• Whereas propositional logic assumes the world
contains facts,
• First-order logic (like natural language) assumes
the world contains
▫ Objects: people, houses, numbers, colors, baseball
games, wars, …
▫ Relations: red, round, prime, brother of, bigger
than, part of, comes between, …
▫ Functions: father of, best friend, one more than,
plus, …
Syntax of FOL: Basic elements
• Constants KingJohn, 2, NUS,...
• Predicates Brother, >,...
• Functions Sqrt, LeftLegOf,...
• Variables x, y, a, b,...
• Connectives , , , , 
• Equality =
• Quantifiers , 
Models for FOL: Example
Universal quantification
• <variables> <sentence>

Everyone at Sharif is smart:


x At(x, Sharif )  Smart(x)

Roughly speaking, equivalent to the conjunction of


instantiations of P

At(P1, Sharif)  Smart(P1)


 At(P2, Sharif)  Smart(P2)
 At(P3, Sharif )  Smart(P3)
 ...
Existential quantification
• <variables> <sentence>

• Someone at Sharif is smart:


• x At(x, Sharif)  Smart(x)

• Roughly speaking, equivalent to the disjunction of


instantiations of P

At(P1, Sharif)  Smart(P1)
 At(P2, Sharif)  Smart(P2)
 At(P3, Sharif)  Smart(P3)
 ...
Properties of quantifiers
• x y is the same as y x
• x y is the same as y x

• x y is not the same as y x


• x y Loves(x,y)
▫ “There is a person who loves everyone in the world”
• y x Loves(x,y)
▫ “Everyone in the world is loved by at least one person”

• Quantifier duality: each can be expressed using the other


• x Likes(x,IceCream) x Likes(x,IceCream)
• x Likes(x,Broccoli) x Likes(x,Broccoli)
Using FOL
The kinship domain:
• Brothers are siblings
x,y Brother(x,y)  Sibling(x,y)

• One's mother is one's female parent


m,c Mother(c) = m  (Female(m)  Parent(m,c))

• “Sibling” is symmetric
x,y Sibling(x,y)  Sibling(y,x)
Example
• Every student pass the course of Artificial
Intelligence.
x Student(x)  pass(x, AI)
• At least one student pass the course of Artificial
Intelligence.
 x Student(x)  pass(x, AI)
 No student does not pass the course of Artificial
Intelligence.
 x Student(x)  pass(x, AI) or
x Student(x)  pass(x, AI)
Summary
• First-order logic:
▫ objects and relations are semantic primitives
▫ syntax: constants, functions, predicates, equality,
quantifiers

You might also like