Predicate Logic Lecture 7.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Inference Rules Universal Instantiation Existential Generalization
The Foundations: Logic and Proofs
1 A formula in predicate logic An atom is a formula. If F is a formula then (~F) is a formula. If F and G are Formulae then (F /\ G), (F \/ G), (F → G),
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Standard Logical Equivalences
Resolution.
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
Logic Use mathematical deduction to derive new knowledge.
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
CAS LX 502 8a. Formal semantics Truth and meaning The basis of formal semantics: knowing the meaning of a sentence is knowing under what conditions.
Valid Arguments An argument is a sequence of propositions. All but the final proposition are called premises. The last statement is the conclusion. The.
Automated reasoning and theorem proving Introduction: logic in AI Automated reasoning: ResolutionUnificationNormalization.
Using Predicate Logic Chapter 5.
Knowledge Representation Methods
Inference and Resolution for Problem Solving
First Order Logic (chapter 2 of the book) Lecture 3: Sep 14.
Propositional logic It represents real-world facts as logical propositions in well formed formulas. It presented as an atomic propositions, and complex.
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
FIRST ORDER LOGIC Levent Tolga EREN.
Predicates and Quantifiers
UNIVERSITI TENAGA NASIONAL 1 CSNB234 ARTIFICIAL INTELLIGENCE Chapter 3 Propositional Logic & Predicate Logic Chapter 3 Propositional Logic & Predicate.
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
Word Problem Consider the following problem: To register, you will need either a yellow card or a note from the Dean. To obtain a note from the Dean you.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
Propositional Logic Predicate Logic
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
Predicates and Quantifiers Dr. Yasir Ali. 1.Predicates 2.Quantifiers a.Universal Quantifiers b.Existential Quantifiers 3.Negation of Quantifiers 4.Universal.
1 Example: The following knowledge is given :The following knowledge is given : 1. Marcus was a man. 2. Marcus was a Pompeian. 3. All Pompeians were Romans.
CIT 856 – Artificial Intelligence
1-1 An Introduction to Logical Programming Sept
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Predicate Logic Although Propositional Logic is complete... It is still inadequate.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
Chapter 3 Propositional calculus Predicate calculus Artificial Intelligence Dr.Hassan Al-Tarawneh.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
Propositional Calculus
Chapter 7. Propositional and Predicate Logic
Knowledge Representation and Reasoning
Automated reasoning and theorem proving
A I (Artificial Intelligence)
The function of knowledge representation scheme is
Introduction to Prolog
Knowledge Representation
Artificial Intelligence
The Foundations: Logic and Proofs
The Ontological Argument
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
CS201: Data Structures and Discrete Mathematics I
Logic Use mathematical deduction to derive new knowledge.
The Ontological Argument
First Order Logic Rosen Lecture 3: Sept 11, 12.
Horn Clauses and Unification
Back to “Serious” Topics…
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Discrete Mathematics Lecture 3: Predicate and Quantifier
Chapter 7. Propositional and Predicate Logic
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Predicates and Quantifiers
CSNB234 ARTIFICIAL INTELLIGENCE
This Lecture Substitution model
CS201: Data Structures and Discrete Mathematics I
Teorie assiomatico-deduttive (calcolo dei predicati)
Logical and Rule-Based Reasoning Part I
The Foundations: Logic and Proofs
Rules of inference Section 1.5 Monday, December 02, 2019
Presentation transcript:

Predicate Logic Lecture 7

Limitations of Prepositional Logic The prepositional calculus has its limitations that you cannot deal properly with general statements of the form “All men are mortal” You can not derive from the conjunction of this and “Socrates is a man” that “Socrates is mortal”

Limitations If All men are mortal = P Socrates is a Man = Q Socrates is mortal = R Then (P & Q)  R is not valid To do this, you need to analyze propositions into predicates and arguments, and deal explicitly with quantification

Expressions of the Form For all x, x has the property F For some x, x has the property F And so on Predicate Logic provides a formalism for performing this analysis of prepositions and additional methods for reasoning with quantified expressions

Predicate Logic The term predicate logic derives from the fact that we analyze prepositions into predicate-argument compositions Thus instead of representing the preposition that an object, a has some property, F by the prepositional constant P; we typically represent it by placing the predicate in front of the thing that it is predicated of; Fa

Representation A similar relationship applies to the expression of a relationship R between n objects R a1,…,an A predicate is a function that returns either the value true or false for example Is_a_bird(x) Is a function of the variable x, which is true if x is a bird or false otherwise

Power of Predicate Logic Relations can take any number of arguments for example Lives(Ali, Islamabad) represents Ali lives in Islamabad The real power of predicate logic becomes apparent when we wish to represent more general statements such as Bashir gave Marium Everything The translation into predicate logic is (all x (gave Bashir Marium X)) I.e For any thing, lets call it x, Bashir gave it to Marium

Quantifiers The variable x is understood to range over some domain of appropriate objects The fact that it is governed by the operator “all” signifies that it is universally quantified The embedded expression, gave(Bashir Marium x) is said to be within the scope of the quantifier “all”

Quantifiers Contrast this with another kind of quantifier as in Bashir gave Marium something Translation into predicate logic is (some x(gave Bashir Marium x)) I.e there is something, let us call it x such that Bashir gave it to Marium Here, the variable x still ranges over a domain of appropriate objects but the fact that it is governed by the operator “some” signifies that it is “existentially quantified”

Example Consider the problem of representing the hopefully obvious fact that Every father is Male This can be done using prepositional Logic without writing out a preposition for each father asserting maleness What makes it difficult to convert the content of this sentence into prepositional logic is that it contains the idea that for each person it is possible to decide if they are a father, and therefore that they are male

Example This idea of a yes/no decision can be captured as a predicate function or simply a predicate A predicate is a function that returns either the value true or value false e.g Is_a_Father(x) Is a function of the variable x, which is true if x is a father and false otherwise The statement “All fathers are male can now be represented as” Is_a_father(x) is_a_male(x) That is “if x is a father then x is male”

Proof using Unification and Resolution Proof procedure in predicate logic are similar to those used in prepositional logic One complication is that it might be necessary to give variables particular values to deduce the conclusion

Example 1 Parent_of(x,y)child_of(y,x) If x is parent of y then y is a child of x 2 Child_of(y,x) AND Male(y) son(y,x) If y is a child of x and is male then y is a son of x 3 Child_of(y,x) AND female(y)Daughter(y,x) If y is a child of x and is female then y is a daughter of x 4 parent_of(Ahmad,Hina) Ahmad is Hina’s parent 5 female(Hina) Hina is female

Example We can deduce daughter(Hina,Ahmad) by way of the following steps If we substitute Ahmad for x and Hina for y in 1 and then use Modus Ponens with 4 Child(Hina,Ahmad) AND female(Hina)daughter(Hina, Ahmad)

Using Resolution Proof in predicate logic is composed of a variety of processes including modus ponens, chain rule, substitution, matching etc However we have to take variables into account e.g parent_of(Ahmad, Bilal) AND Not Parent_of(Ahmad, Khurram) can not be resolved In other words the resolution method has to look inside predicates to discover if they can be resolved

Unification This substitution of variables to make resolution possible is called Unification and proof in predicate logic can be based on this joint method of Unification and resolution Let us rework the proof of daughter(Hina,Ahmad)

Convert first to Clausal form 1 Not parent_of(x,y) or child_of(y,x) 2 Not child_of(y,x) or not male(y) or son(y,x) 3 Not child_of(y,x) or Not female(y) or daughter(y,x) 4 parent of (Ahmad,Hina) 5 female (Hina)

Example 7 not child(ahmad,hina) or female (hina) By substituting Ahmad for x and Hina for y in 3 and resolving with 6 8 Not Parent(Ahmad,Hina) or Not Female(Hina) by substituting Ahmad for x and Hina for y in 1 and resolving with 7 9 Not Parent(Ahmad,Hina) by resolving 8 with 5 10 null clause by resolving 9 with 4

Writing facts in Predicate Logic Marcus was a man

Fact 1 Man(Marcus) Doesn’t capture past tense Marcus was a Pompeian

Fact 2 Pompeian(Marcus) All Pompeians were Romans X:Pompeian(x)Roman(x) All Romans were either loyal to Caesar or hated him

Fact 3 Inclusive OR X:Roman(x) loyalto(x,Caesar) V hate(x, Caesar) Exclusive OR X:Roman(x)  [(loyalto(x,Caesar) V hate(x,Caesar)) AND ~(loyalto(x,Caesar) AND hate(x,Caesar))] Everyone is loyal to someone

Fact 4 X: y: loyalto(x,y) Meaning that for each person their exists someone to whom he or she is loyal, possibly a different someone for everyone Y: x: loyalto(x,y) There exists someone to whom everyone is loyal People only try to assassinate rulers they are not loyal to

Fact 5 X: y: person(x) AND ruler(y) AND tryassassinate(x,y) ~loyalto(x,y)