Teorie assiomatico-deduttive (calcolo dei predicati)

Slides:



Advertisements
Similar presentations
Some Prolog Prolog is a logic programming language
Advertisements

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.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 06 : First Order Logic Resolution Prove.
Standard Logical Equivalences
Automated Reasoning Systems For first order Predicate Logic.
AR: clausal logic The step to Resolution. A deeper study: Modus ponens Ground Horn Logic Unification Horn Logic Resolution Clausal Logic Clausal Logic.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Resolution
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Chapter 6 Logical Reasoning Xiu-jun GONG (Ph. D) School of Computer Science and Technology, Tianjin University
KNOWLEDGE REASONING & INFERENCE KNOWLEDGE REASONING & INFERENCE 1 Dr. Abbas Fadhil M. A. AL-Juboori Computer Science Dept. – Kerbala University
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
Automated reasoning and theorem proving Introduction: logic in AI Automated reasoning: ResolutionUnificationNormalization.
Using Predicate Logic Chapter 5.
Predicate Logic Terms represent specific objects in the world and can be constants, variables or functions. Predicate Symbols refer to a particular relation.
1 Automated Reasoning Introduction to Weak Methods in Theorem Proving 13.1The General Problem Solver and Difference Tables 13.2Resolution Theorem.
Inference and Resolution for Problem Solving
Methods of Proof Chapter 7, second half.
Artificial Intelligence
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
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.
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
UBI517 Expert Systems 1 Lecture 2 Knowledge Representation.
SAT-solving An old AI technique becomes very popular in modern A.I.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Automated reasoning and theorem proving Introduction: logic in AI Automated reasoning: ResolutionUnificationNormalization.
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
SAT-solving Introduction: logic in AI SAT-solving techniques: Unit-propagationLocal-search.
UNIVERSITI TENAGA NASIONAL 1 CSNB234 ARTIFICIAL INTELLIGENCE Chapter 3 Propositional Logic & Predicate Logic Chapter 3 Propositional Logic & Predicate.
1 Chapter 8 Inference and Resolution for Problem Solving.
Computation. Binary Numbers Decimal numbers Binary numbers.
Logical Representations and Resolution. Boolean Logic Conjunctive normal form Resolution.
Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,
Logical Reasoning:Proof Prove the theorem using the basic axioms of algebra.
1 Logical Agents Chapter 7. 2 A simple knowledge-based agent The agent must be able to: –Represent states, actions, etc. –Incorporate new percepts –Update.
Automated Reasoning Systems For first order Predicate Logic.
Prolog Conversion to clause form Reference: Artificial Intelligence, by Elaine Rich and Kevin Knight.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
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
Answer Extraction To use resolution to answer questions, for example a query of the form  X C(X), we must keep track of the substitutions made during.
Chapter 3 Propositional calculus Predicate calculus Artificial Intelligence Dr.Hassan Al-Tarawneh.
Copyright 1999Paul F. Reynolds, Jr. Foundations of Logic Programming.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Module 4 KNOWLEDGE AND REASONING. Knowledge based agent We design agents that can form representations of the world Agents that use a process of inference.
Knowledge Representation
Resolution in the Propositional Calculus
Automated reasoning and theorem proving
A I (Artificial Intelligence)
Knowledge Representation
Predicate Logic Lecture 7.
Logical Inference 2 Rule-based reasoning
Logical Inference: Through Proof to Truth
Inference in First-Order Logic Chapter 9
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Logic Use mathematical deduction to derive new knowledge.
Artificial Intelligence
Biointelligence Lab School of Computer Sci. & Eng.
Artificial Intelligence: Agents and Propositional Logic.
Artificial Intelligence
Biointelligence Lab School of Computer Sci. & Eng.
Methods of Proof Chapter 7, second half.
CSNB234 ARTIFICIAL INTELLIGENCE
Quiz Nov Logic.
Quiz Nov Logic.
Resolution Preliminaries
Logical Inference 4 wrap up
Presentation transcript:

Teorie assiomatico-deduttive (calcolo dei predicati) LOGICA DEI PREDICATI DEL PRIMO ORDINE Simboli ed espressioni non interpretati Interpretazione SINTASSI SEMANTICA Correttezza DIMOSTRAZIONE DI TEOREMI CONSEGUENZA LOGICA Teorie assiomatico-deduttive (calcolo dei predicati) Completezza Dimostrazione automatica di teoremi PRINCIPIO DI RISOLUZIONE clausole PROGRAMMAZIONE LOGICA clausole di Horn

Prolog: Non completo, perché applica strategia depth-first con backtracking Non corretto, per assenza occur-check nell'algoritmo di unificazione p(X,X). ?-p(Y,f(Y)). yes Y=f(f(f(.......))) Regola di selezione left-most non safe (negazione)

Example: The following knowledge is given : 1. Marcus was a man. 2. Marcus was a Pompeian. 3. All Pompeians were Romans. 4. Caesar was a ruler. 5. All Romans were either loyal to Caesar or hated him. 6. Everyone is loyal to someone. 7. People only try to assassinate rulers to whom they are not loyal. 8. Marcus tried to assassinate Caesar. Can we automatically answer the following questions? Was Marcus loyal to Caesar? Did Marcus hate Caesar?

Conversion to the First Order Logic: Representation of facts: 1. Marcus was a man. man(Marcus) 2. Marcus was a Pompeian. Pompeian(Marcus) 4. Caesar was a ruler. ruler(Caesar) 8. Marcus tried to assassinate Caesar. try_assassinate(Marcus, Caesar)

Conversion to the First Order Logic (2): General representation (representation of rules): 3. All Pompeians were Romans. x Pompeian(x)  Roman(x) 5. All Romans were either loyal to Caesar or hated him. ( )  ~(loyal_to(x,Caesar)  hates(x,Caesar)) XOR x Roman(x)  loyal_to(x,Caesar)  hates(x,Caesar) 6. Everyone is loyal to someone. x y loyal_to(x,y) 7. People only try to assassinate rulers to whom they are not loyal. xy person(x)  ruler(y)  try_assassinate(x,y)  ~loyal_to(x,y)

The “theorem” ? Was Marcus loyal to Caesar? Try, for example, to prove that he was not : ~loyal_to(Marcus,Caesar) Did Marcus hate Caesar? Prove that he did: hates(Marcus,Caesar)

A proof by refutation using resolution: Facts 1. , 2. , 4. and 8. were already o.k. (clauses) To show: hates(Marcus,Caesar) Negation: ~hates(Marcus,Caesar) 1. man(Marcus) 2. Pompeian(Marcus) 4. ruler(Caesar) 8 try_assassinate(Marcus, Caesar)

Marcus example: RESOLUTION (clauses) 3. x Pompeian(x)  Roman(x) : o.k. ! 6. x y loyal_to(x,y) x loyal_to(x,f(x)) loyal_to(x,f(x)) 7. xy man(x)  ruler(y)  try_assassinate(x,y)  ~loyal_to(x,y) xy ~(man(x)  ruler(y)  try_assassinate(x,y))  ~loyal_to(x,y) xy ~man(x)  ~ruler(y)  ~try_assassinate(x,y)  ~loyal_to(x,y) false  man(x)  ruler(y)  try_assassinate(x,y)  loyal_to(x,y)

Axioms in Normal form: 1. man(Marcus) 2. Pompeian(Marcus) 3. Roman(x)  Pompeian(x) 4. ruler(Caesar) 5. loyal_to(x,Caesar)  hates(x,Caesar)  Roman(x) 6. loyal_to(x,f(x)) 7. false  man(x)  ruler(y)  try_assassinate(x,y)  loyal_to(x,y) 8. try_assassinate(Marcus,Caesar)

Axioms in Normal form (Horn clauses): 1. man(Marcus) 2. Pompeian(Marcus) 3. Roman(x)  Pompeian(x) 4. ruler(Caesar) 5. loyal_to(x,Caesar)  hates(x,Caesar)  Roman(x) 6. loyal_to(x,f(x)) 7. false  man(x)  ruler(y)  try_assassinate(x,y)  loyal_to(x,y) 8. try_assassinate(Marcus,Caesar) To show: hates(Marcus,Caesar) Negation: ~hates(Marcus,Caesar) Normal Form: false  hates(Marcus,Caesar)

Resolution proof (1): (linear-input strategy) false  hates(Marcus,Caesar) loyal_to(x,Caesar)  hates(x,Caesar)  Roman(x) loyal_to(Marcus,Caesar)  Roman(Marcus) {x/Marcus} 5. Roman(x)  Pompeian(x) loyal_to(Marcus,Caesar)  Pompeian(Marcus) {x/Marcus} 3. Pompeian(Marcus) loyal_to(Marcus,Caesar) {} 2.

Resolution proof (2) 7. 1. 4. 8. loyal_to(Marcus,Caesar) false  man(x)  ruler(y)  try_assassinate(x,y)  loyal_to(x,y) false  man(Marcus)  ruler(Caesar)  try_assassinate(Marcus,Caesar) 7. {x/Marcus,y/Caesar} man(Marcus) false  ruler(Caesar)  try_assassinate(Marcus,Caesar) 1. {} ruler(Caesar) false  try_assassinate(Marcus,Caesar) 4. {} try_assassinate(Marcus,Caesar) false  8. {}