03 -1 Lecture 03 First-Order Predicate Logic Topics –Syntax –Formal Semantics –Denotational Semantics –Formal Inference –Resolution.

Slides:



Advertisements
Similar presentations
Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Advertisements

Biointelligence Lab School of Computer Sci. & Eng.
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Artificial Intelligence
Models and Propositional Logic In propositional logic, a model in general simply fixes the truth value – true or false – for every proposition symbol.
We have seen that we can use Generalized Modus Ponens (GMP) combined with search to see if a fact is entailed from a Knowledge Base. Unfortunately, there.
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 20
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.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Logic.
Resolution in Propositional and First-Order Logic.
Predicate Calculus Russell and Norvig: Chapter 8,9.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
RESOLUTION: A COMPLETE INFERENCE PROCEDURE. I Then we certainly want to be able to conclude S(A); S(A) is true if S(A) or R(A) is true, and one of those.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
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
Knowledge Representation I (Propositional Logic) CSE 473.
Knoweldge Representation & Reasoning
Inference in First-Order Logic
Formal Aspects of Computer Science – Week 12 RECAP Lee McCluskey, room 2/07
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
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.
CSE PredLogic 1 Knowledge Representation with Logic: First Order Predicate Calculus Outline –Introduction to First Order Predicate Calculus (FOPC)
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 19, 2012.
1 Knowledge Based Systems (CM0377) Lecture 4 (Last modified 5th February 2001)
UIUC CS 497: Section EA Lecture #3 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
LECTURE LECTURE Propositional Logic Syntax 1 Source: MIT OpenCourseWare.
9/30/98 Prof. Richard Fikes Inference In First Order Logic Computer Science Department Stanford University CS222 Fall 1998.
CS6133 Software Specification and Verification
Propositional Logic Predicate Logic
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
1 Knowledge Based Systems (CM0377) Lecture 6 (last modified 20th February 2002)
Knowledge Repn. & Reasoning Lec. #5: First-Order Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
Albert Gatt LIN3021 Formal Semantics Lecture 3. Aims This lecture is divided into two parts: 1. We make our first attempts at formalising the notion of.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
3. The Logic of Quantified Statements Summary
Knowledge Representation and Reasoning
Resolution in the Propositional Calculus
The Propositional Calculus
Logical Inference: Through Proof to Truth
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 20
Biointelligence Lab School of Computer Sci. & Eng.
CS 416 Artificial Intelligence
Back to “Serious” Topics…
CSNB234 ARTIFICIAL INTELLIGENCE
Presentation transcript:

03 -1 Lecture 03 First-Order Predicate Logic Topics –Syntax –Formal Semantics –Denotational Semantics –Formal Inference –Resolution

03 -2 Syntax Atomic Sentence –Predicate(term 1, term 2, …, term n ) –Term Constant Variable Function –Predicate must be constant –Classmate(Jack, x, Brother(Allen)) Function –Fun-name(term 1, term 2, …, term n ) –Fun-name : function name must be constant Cardinality –Classmate(Jack, x) vs Classmate(Jack, x, Brother(Allen))

03 -3 Syntax Connectives –NOT  / AND  / OR  / Imply → –Example:  Classmate(x, Allen)  Classmate(x, Jack)  Classmate(x, Andy) → Classmate(x, Aho) Quantifiers –Universal quantifier  ForAll  –Existential quantifier  ThereExist  –Example:  x Classmate(Adam, x) →  y Like(x, y) Well formed sentence (wff, or Sentence)

03 -4 Formal Semantics Atomic sentence –True (T)/ False (F) –Example: Classmate(x, Jack)= T Connectives –Truth tables –Identity Example: S1→S2 ≡  S1  S2 Quantifiers –  x S(x)=T IF S(x 1 )  S(x 2 )  …  S(x n )=T –  x S(x)=T IF S(x 1 )  S(x 2 )  …  S(x n )=T Truth functional: The formal semantics of a sentence can be determined by the formal semantics of its components

03 -5 Denotational Semantics Denotational mappings to objects and relationships (Physical meaning) Atomic sentence –Constant denotes a named object –Variable denotes some unnamed object –Function indirectly denotes an object –Predicate denote a relationship –Atomic sentence denotes a fact –Example: Classmate(x, Jack) Denotes the fact that some unnamed man denoted by x is a classmate of an object named Jack

03 -6 Denotational Semantics Connectives –  S denotes that the fact denoted by S isn’t existent –S1  S2 denotes that the fact denoted by S1 and the fact denoted by S2 are co-existent –S1  S2 denotes that one or both of the facts denoted by S1 and by S2 are existent –S1 → S2 denotes that if the fact denoted by S1 exists, the fact denoted by S2 will exist

03 -7 Denotational Semantics Quantifiers – –  x S denotes the fact that every object in the system can make the fact of S existent –  x S denotes the fact that there is at least one object in the system which can make the fact of S existent The denotational semantics of a sentence contains the set of denotational mappings of its constituents.

03 -8 Formal Inference Reason about the formal semantics of a new sentence only according to syntactical structure –From KB={Classmate(Adam, Allen)  Classmate(Allen, Andy)}= T we derive Classmate(Adam, Allen) = T without consulting the underlying physical meanings Problem: How can we guarantee that under all denotational semantics, the above inference is correct? Or the denotational semantics of the derived sentence holds?

03 -9 Formal Inference Key: Make the inference independent of denotation semantics How: Make the inference sound and complete Definition of “Model” –Give a denotational semantics M, M is a model of KB={S|S:wff}, denoted as M KB, if M makes the formal semantics of KB true.

Formal Inference Definition of “Entailment” –Given KB={S|S:wff} and a is a wff, if every M KB is also M a, then we say a is entailed by KB (or KB entails a ), denoted as KB ┝ a –Example: KB={S1=Classmate(Adam, Allen)  S2=Classmate(Allen, Andy)} then KB ┝ S1; KB ┝ S2; KB ┝ KB All M KB are also M 1 and M 2 KB={S1  S2}S2S1 F F F F {M 20 }: T F {M 10 }: T F F {M KB }: T{M 1 }: T{M 2 }: T

Formal Inference Definitions of Soundness and Completeness –Suppose KB ┝ a. Given i a formal inference mechanism, if i can derive b from KB, denoted as KB├ i b, then i is sound, iff {b}  {a}, i is complete, iff {b}  {a}, and i is sound and complete, iff {b} = {a}

Formal Inference Sound and complete inference mechanisms –A sound inference mechanism only derives wff’s that are entailed by the original KB; that is, no matter what models are used to interpret the derived wff’s they are CORRECT. –A complete inference mechanism can derive all entailed wff’s.

Formal Inference Example of formal inference mechanisms –ae, a formal inference, defined as  {S 1  S 2  …  S n }├ ae S i, i =1,2…, n Example: –KB ┝ {KB={S 1  S 2 }, S1, S2} (P. 9) –KB├ ae {S1, S2}  {KB, S1, S2} –ae is sound Is ae complete? –In general, NO, if KB contains other connectives than  Find a sound and complete formal inference mechanism for First-Order Logic?

Resolution Canonical form –Clause l 1  …  l j  …  l m, where L i is a literal Literal: positive or negative atomic sentence –CNF (Conjunctive Normal Form) KB={l 1  …  l j  …  l m, L 1  …   L k  …  L n } Horn Clause: at most one positive literal in a sentence First-Order Definite Clause: exactly one positive literal in a sentence

Resolution Resolution, denoted by res, as a formal inference mechanism on CNF –{l 1  …  l j  …  l m, L 1  …  L k  …  L n } ├ res  ( , l 1  …  l j-1  l j+1  …  l m  L 1  …  L k-1  L k+1  …  L n )  = Unify(l j, L k ), a substitution  is a substitution application function

Resolution Illustration of ├ res –KB={  Classmate(x, Allen)  Like(x, Joyce), Classmate(Adam, Allen)} –Resolution procedure 1.  = Unify(Classmate(x, Allen), Classmate(Adam, Allen))={x/Adam} 2. KB={  Classmate(x, Allen)  Like(x, Joyce), Classmate(Adam, Allen)} 3.  ({x/Adam}, Like(x, Joyce))= Like(Adam, Joyce)

Resolution ├ res is sound on CNF All First-Order Logic KBs can be converted to CNF ├ res is a sound formal inference mechanism for First-Order Logic ├ res is refutationally complete on CNF and First-Order Logic –Given any C with KB ┝ C, resolution can prove KB  C contains contradiction –Proof by contradiction

Resolution Application –Conversion of wffs to CNF –Control strategies Set-of-support resolution strategy with unit preference –Automated theorem prover –System verification Related languages –Horn clause/ First-order definite clause/ Prolog/ Rule/ Attribute-based language/ Planning language/ Frame/ Description Logic