first order logic (fol) first order predicate calculus

14
First order logic (FOL) first order predicate calculus

Upload: anabel-robinson

Post on 21-Dec-2015

252 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: First order logic (FOL) first order predicate calculus

First order logic (FOL)

first order predicate calculus

Page 2: First order logic (FOL) first order predicate calculus

D Goforth - COSC 4117, fall 2006 2

Why another system? procedural / declarative difference

algorithmic vs data representation

BUT propositional logic is inadequate

representation weak, too specific, lacks expressive power

reasoning inference is OK but brittle to real world

conditions (errors, assumptions, unknowns)

Page 3: First order logic (FOL) first order predicate calculus

D Goforth - COSC 4117, fall 2006 3

First order logic vs propositional basis of reasoning

propositional logic: statements first order logic: OBJECT-ORIENTED

objects relations functions statements about objects, relations and

functions possible values of statements

true, false, unknown

Page 4: First order logic (FOL) first order predicate calculus

D Goforth - COSC 4117, fall 2006 4

Other systems of logic

extensions of first order logic temporal: facts are true/false/unknown

for a period of time probabilistic: facts are true or false but

known with a certain probability fuzzy logic: facts are partially true meta-systems: higher order logics –

reasoning about logic systems

Page 5: First order logic (FOL) first order predicate calculus

D Goforth - COSC 4117, fall 2006 5

FOL

Domain of objects Functions of objects (other objects -

Domain is closed) Relations among objects Properties of objects (unary relations) Statements about objects, relations and

functions

Page 6: First order logic (FOL) first order predicate calculus

D Goforth - COSC 4117, fall 2006 6

Objects in FOL

Constants – names of specific objects E.g., Doreen, Gord, William, 32

Functions – Father(Doreen), Age(Gord), Max(23,44)

variables – a, b, c, … for statements about unidentified objects or general statements

Page 7: First order logic (FOL) first order predicate calculus

D Goforth - COSC 4117, fall 2006 7

FOL - example Domain {Art, Bill, Carol, Doreen} Functions of objects:

Mother(Art) identifies an object Relations:

Siblings (Bill, Carol) true or false Properties of objects (unary relations)

IsStudent(Carol) true or false Statements about domain:

Mother(Bill) = Mother(Carol) true or false

Page 8: First order logic (FOL) first order predicate calculus

Formal Definitionof

FOL

Relation or property

Reference to an object

Statement about relation or property OR Equivalence of objects

Statements about sets of

objects

Page 9: First order logic (FOL) first order predicate calculus

D Goforth - COSC 4117, fall 2006 9

Propositional logic vs. FOL

Propositional

Propositions (t/f)Connectives sentences

FOLObjects, functionsRelations on objects (t/f)Connectives sentencesQuantifiers

Page 10: First order logic (FOL) first order predicate calculus

D Goforth - COSC 4117, fall 2006 10

symbols in FOL objects (constants), functions, predicates

BIGGEST PROBLEM LEARNING FOL: DIFFERENCE BETWEEN FUNCTIONS AND PREDICATES

interpretations specify meaning of each symbol (intended interpretation)

models determine truth of sentences e.g. if symbols Doreen and Mother(Art) refer to

same object then statementMother(Art) = Doreen is true

Page 11: First order logic (FOL) first order predicate calculus

D Goforth - COSC 4117, fall 2006 11

The quantifiers

allow statements about many objects apply to sentence containing variable

universal : true for all substitutions for the variable

existential : true for at least one substitution for the variable

Page 12: First order logic (FOL) first order predicate calculus

D Goforth - COSC 4117, fall 2006 12

The quantifiers

examples: x: Mother(Art) = x x y: Mother(x)=Mother(y) => Sibling(x,y) y x: Mother(y) = x x y: Mother(y) = x (not! nest carefully)

Page 13: First order logic (FOL) first order predicate calculus

D Goforth - COSC 4117, fall 2006 13

Manipulating quantifiers

de Morgan’s laws existential is generalized “OR”

~x: S(x) <=> x: ~S(x) universal is generalized “AND”

~ x: S(x) <=> x: ~S(x)

Page 14: First order logic (FOL) first order predicate calculus

D Goforth - COSC 4117, fall 2006 14

Example domain - kinship objects – people functions

Mother(x), Father(x) predicates

Female(x), Parent(x,y), Spouse(x,y) definitions (compound sentences in KB)

x: Male(x) <=> ~ Female(x) [depends on domain!] x y : y = Mother(x) <=> Female(y)^Parent(y,x) x y : y = Father(x) <=> Male(y)^Parent(y,x)

define these: child, grandparent, sibling, brother