74.419 Artificial Intelligence 2004 - First-Order Predicate Logic - First-Order Predicate Logic (FOL or FOPL), also called First-Order Predicate Calculus.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Predicate Logic Colin Campbell. A Formal Language Predicate Logic provides a way to formalize natural language so that ambiguity is removed. Mathematical.
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
ICE1341 Programming Languages Spring 2005 Lecture #6 Lecture #6 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
Artificial Intelligence
First Order Logic Resolution
Artificial Intelligence University Politehnica of Bucharest Adina Magda Florea
Natural Language Processing - Formal Logic - Propositional Calculus/Logic (PropLog) First-Order Predicate Logic/Calculus (FOL or FOPL) Formal Language.
AI - Week 13 Knowledge Representation, Logic, Semantic Web Lee McCluskey, room 2/07
Artificial Intelligence First-Order Predicate Logic -
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Natural Language Processing  First-Order Predicate Logic - Predicates  Short Introduction to Description Logics  PowerLoom.
Artificial Intelligence Modal Logic
Logic. Propositional Logic Logic as a Knowledge Representation Language A Logic is a formal language, with precisely defined syntax and semantics, which.
Introduction to Semantics To be able to reason about the meanings of utterances, we need to have ways of representing the meanings of utterances. A formal.
9/28/98 Prof. Richard Fikes First-Order Logic Knowledge Interchange Format (KIF) Computer Science Department Stanford University CS222 Fall 1998.
Knowledge Representation using First-Order Logic (Part II) Reading: Chapter 8, First lecture slides read: Second lecture slides read:
Predicate Calculus.
03 -1 Lecture 03 First-Order Predicate Logic Topics –Syntax –Formal Semantics –Denotational Semantics –Formal Inference –Resolution.
1 Knowledge Representation and Reasoning. 2 Knowledge Representation & Reasoning How knowledge about the world can be represented How knowledge about.
1 © Copyright 2010 Dieter Fensel and Florian Fischer Intelligent Systems Predicate Logic.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
First Order Logic Chapter 7. PL is a Weak Representational Language §Propositional Logic (PL) is not a very expressive language because: §Hard to identify.
CSE PredLogic 1 Knowledge Representation with Logic: First Order Predicate Calculus Outline –Introduction to First Order Predicate Calculus (FOPC)
1st-order Predicate Logic (FOL)
Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.
Pattern-directed inference systems
1 CMSC 471 Fall 2002 Class #10/12–Wednesday, October 2 / Wednesday, October 9.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 28– Interpretation; Herbrand Interpertation 30 th Sept, 2010.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
First Order Logic Dr. Rogelio Dávila Pérez Professor - Researcher Information Technologies Department ITESM, Campus Guadalajara.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 12 Friday, 17 September.
9/30/98 Prof. Richard Fikes Inference In First Order Logic Computer Science Department Stanford University CS222 Fall 1998.
Bertram Ludäscher Department of Computer Science & Engineering University of California, San Diego CSE-291: Ontologies in Data Integration.
Intelligent Systems Predicate Logic. Outline Motivation Technical Solution – Syntax – Semantics – Inference Illustration by Larger Example Extensions.
CS6133 Software Specification and Verification
Artificial Intelligence 2004 Non-Classical Logics Non-Classical Logics Specific Language Constructs added to classic FOPL Different Types of Logics.
Artificial Intelligence Chapter 15 The Predicate Calculus Artificial Intelligence Chapter 15 The Predicate Calculus Biointelligence Lab School of Computer.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
Artificial Intelligence “Introduction to Formal Logic” Jennifer J. Burg Department of Mathematics and Computer Science.
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
LDK R Logics for Data and Knowledge Representation First Order Logics (FOL) Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
lamsweerde Chap.4: Formal Requirements Specification © 2009 John Wiley and Sons Fundamentals of RE Chapter 4 Requirements.
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.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
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.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
1 First Order Logic CS 171/271 (Chapter 8) Some text and images in these slides were drawn from Russel & Norvig’s published material.
An Introduction to Classical Logic (propositional and Predicate Logic)
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
Artificial Intelligence 2004 Planning: Situation Calculus Review STRIPS POP Hierarchical Planning Situation Calculus (John McCarthy) situations.
1 Chapter 2.1 Chapter 2.2 Chapter 2.3 Chapter 2.4 All images are copyrighted to their respective copyright holders and reproduced here for academic purposes.
Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:
Propositional Logic. Assignment Write any five rules each from two games which you like by using propositional logic notations.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Announcements  Upcoming due dates  Thursday 10/1 in class Midterm  Coverage: everything in lecture and readings except first-order logic; NOT probability.
Logics for Data and Knowledge Representation
Back to “Serious” Topics…
Logics for Data and Knowledge Representation
CSNB234 ARTIFICIAL INTELLIGENCE
Artificial Intelligence 2004 Non-Classical Logics
Logics for Data and Knowledge Representation
Presentation transcript:

Artificial Intelligence First-Order Predicate Logic - First-Order Predicate Logic (FOL or FOPL), also called First-Order Predicate Calculus Formal Language Semantics through Interpretation Function Axioms Inference System

FOPL - Formal Language / Syntax -

Formal Language A Formal Language is specified as L = (NT, T, P, S) NT Set of Non-Terminal Symbols T Set of Terminal Symbols P Set of Production or Grammar Rules S Start Symbol (top-level node in syntax tree / parse tree) A formal language specifies the syntactically correct or well-formed expressions of a language.

Terminals and Non-Terminals NT Non-Terminals wff (well-formed formula), atomic-formula; Predicate, Term, Function, Constant, Variable; Quantifier, Connective T Terminals Predicate (Symbols)P, Q, married,..., T, F Function (Symbols)f, g, father-of,... Variablesx, y, z,... ConstantsSally, block-1, c Connectives , , ,  Negation Symbol  Quantifiers ,  Equality Symbol= Parentheses(, ) Other Symbols: Domain Specifc General

Non-terminal Rules wff ::= atomic-formula | (wff) |  wff | wff Connective wff | Quantifier Variable wff atomic-formula ::= Predicate (Term,...)* | Term = Term Term ::= Function (Term,...)* | Variable | Constant Terminal Rules Connective ::=  |  |  |  Quantifier ::=  |  *Note: n-ary functions and predicates go with n terms Production / Grammar Rules

Terminal Rules for the specific Domain Predicate ::= on(_,_) | near(_,_) |... Function ::= distance(_,_) | location(_) |... Variable ::= x | y |... Constant ::= Flakey | John-Bear | Karen | Alan-Alder | The-File | Kurt Domain-Specific Terminal Rules

Quantifiers and Binding A variable in a formula can be bound by a quantifier. bound variable  x: married (Sally, x) open formula: a variable in the formula is not bound by a quantifier  x: married (Sally, x)  happy (y) closed formula: all variables in the formula are bound by quantifiers:  x  y: married (x, y) Most authors regard quantified formulas only as wffs if all quantified variables appear in the formula. Some authors regard quantified formulas only as wffs if all variables are bound by quantifiers.

FOPL - Semantics / Interpretation -

Semantics - Overview Define the Semantics of FOPL expressions (formulae): 1. Interpretation – Maps symbols of the formal language (predicates, functions, variables, constants) onto objects, relations, and functions of the “world” (formally: Domain, relational Structure, or Universe) 2.Valuation - Assigns domain objects to variables* 3.Constructive Semantics – Determines the semantics of complex expressions inductively, starting with basic expressions * The Valuation function can be used for describing value assignments and constraints in case of nested quantifiers. The Valuation function otherwise determines the satisfaction of a formula only in case of open formulae.

Semantics – Domain, Interpretation I Domain, relational Structure, Universe Dset of Objects R, S,...set of Relations over D f, g,...set of Functions in D Basic Mapping / Interpretation constantsI [c] = d  D functions I [f] = F: D n →DFunction predicates I [P] = R  D n Relation (set of n-tuples) Valuation V variablesV(x) = d  D

Semantics –Interpretation Next, determine the semantics for complex terms and formulae constructively - regarding the syntax - from the basic interpretation above.

Semantics - Interpretation II Term with function I [f(t 1,...,t n )) = I [f] (I [t 1 ],..., I [t n ]) = F(I [t 1 ],..., I [t n ])  D atomic Formula I [P(t 1,...,t n )]true if (I [t 1 ],..., I [t n ])  I [P] = R negated Formula I [  ]true if I [  ] is not true complex Formula I [  ] true if I [  ] or I [  ] true I [  ] true if I [  ] and I [  ] true I [  ]if I [  ] not true or I [  ] true

Semantics - Interpretation III quantified Formula(relative to Valuation function) I [  x.  ] true if  is true with V’(x)=d for some d  D where V’ is otherwise identical to the prior V. I [  x.  ] true if  is true with V’(x)=d for all d  D and where V’ is otherwise identical to the prior V. Note: The order of quantifiers plays a role for the semantic interpretation and evaluation:  x  y.  is different from  y  x.  In the first case, we go through all values for x, and for each value of x we pick a suitable value for y. In the second case, we have to find one value for y which is good for all values of x.

Semantics - Model Model Given a set of formulae  and a domain D with an interpretation I. Then D is a model of  if I[  ] is true for all   * That means the interpretation I into the domain D makes every formula  in  true. * for every possible valuation, in case  has open formulae.

Semantics – Logical Consequence Logical Consequence Given a set of formulae  and a formula α. α is a logical consequence of  if α is true in every model of . Notation:  |= α That means that for every model (interpretation into a domain) in which  is true, α must also be true.

FOPL - Inference System - Axioms & Inference Rules

FOPL Axioms A1      A2      A3        A4(    )  ((    )  (    )) A5  x:  (x)   (y) A6  (x)   y:  (y)

Formal Inference - Overview Derive new formulae by syntactic manipulation of existing formulae: given set of formulae   describes your KB, or a Theory,... (FOPL axioms + your own "proper" axioms) apply inference rule (based on  ) new formula α is derived add new formula to KB or Theory new KB or Theory is  α

Formal Inference Formal Inference, Theorem Given a set of formulae  and a set of inference rules IR. A new formula α can be generated based on  using inference rules in IR. We say that α is formally inferred or derived from  or α is a Theorem (of  ) Notation:  |– α

IR Modus Ponens Modus Ponens   ,   States that  can be concluded provided we know that the formulae    and  are true in our knowledge base.

IR Universal Instantiation Universal Instantiation  x:  (x)  (c) where  (x) is any formula containing the variable x, and  (c) is the formula  (x) where every occurrence of the quantified variable x is substituted with the arbitrary constant c.

IR Existential Generalization Existential Generalization  (c)  x:  (x) where  (c) is any formula containing the arbitrary constant c, and  (x) is the same formula as  (c) but with every occurrence of the constant c replaced by a variable x.

Replacement Rules                 (    )  (    )    IR Replacement Rules

FOPL Inference System The Axioms and the Inference Rules above constitute a formal inference system for FOPL. This system - we call it FS1 - is complete and sound.

Soundness and Completeness Soundness An Inference System is sound iff  |– α   |= α every formula which can be derived by formal inference from  is a also logical consequence of . Completeness An Inference System is complete iff  |= α   |– α every formula which is a logical consequence of  can be derived by formal inference from .

FOPL - Sound and Complete 2 The above inference system for FOPL is sound and complete. Thus, every formula which can be derived in FOPL using FS1 (  |– α) is also a logical consequence of the given axioms (  |= α) :  |– αiff  |= α Thus, there is a correspondence between formal Inference and semantic Interpretation.

Semantics - Example A1 Predicate Logic Language constantsBill-1, John-3, Sally-1, Mary-1, Mary-2 predicateshappy-together, hate-each-other Structure D objects: Uncle-Bill, Uncle-John, Aunt-Sally, The-woman-I-don't-like, Mary relations: Married, Divorced (Uncle-Bill, Aunt-Sally)  Married, (Uncle-John, Mary)  Married (Uncle-John, The-woman-I-don't-like)  Divorced Interpretation I(Bill-1)=Uncle-Bill, I(John-3)=Uncle-John, I(Sally-1)=Aunt-Sally, I(Mary-1)=The- woman-I-don't-like, I(Mary-2)=Mary I(happy-together)=Married, I(hate-each-other)=Divorced True or false? hate-each-other (Bill-1, John-3) happy-together(Bill-1, Sally-1) hate-each-other(John-3, Mary-1) happy-together(John-3, Mary-2)

Semantics -Example A2 Structure D objects: Uncle-Bill, Uncle-John, Aunt-Sally, The-woman-I-don't-like, Mary relations: Married, Divorced (Uncle-John, The-woman-I-don't-like)  Divorced (Uncle-Bill, Aunt-Sally)  Married, (Uncle-John, Mary)  Married (or: {(Uncle-Bill, Aunt-Sally), (Uncle-John, Mary)} = Married) Interpretation I I(Bill-1) = Uncle-Bill, I(John-3) = Uncle-John, I(Sally-1) = Aunt-Sally, I(Mary-1) = Mary, I(Mary-2) = The-woman-I-don't-like I(happy-together) = Married, I(hate-each-other) = Divorced True or false? hate-each-other (Bill-1, John-3)  hate-each-other (John-3, Mary-1) happy-together (Bill-1, Sally-1)  happy-together (John-3, Mary-2)  x: happy-together(Uncle-Bill, x))  x,y,z: happy-together(x,y)  hate-each-other (x,z) What if you want to add a formula?  x,y: happy-together(x,y)  happy-together(y,x)

Additional References Frost, Richard: Introduction to Knowledge Base Systems. Collins Professional and Technical Books, William Collins Sons & Co. Ltd, London, Nilsson, Nils J.: Artificial Intelligence - A new synthesis. Morgan Kaufmann Publishers, San Francisco, CA, 1998.