First-Order Logic Semantics Reading: Chapter 8, 9.1-9.2, 9.5.1-9.5.5 FOL Syntax and Semantics read: 8.1-8.2 FOL Knowledge Engineering read: 8.3-8.5 FOL.

Slides:



Advertisements
Similar presentations
First-Order Logic Chapter 8.
Advertisements

First-Order Logic Chapter 8.
Knowledge Representation Methods
Artificial Intelligence Lecture No. 10 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
Logic. Propositional Logic Logic as a Knowledge Representation Language A Logic is a formal language, with precisely defined syntax and semantics, which.
CS 561, Session Midterm format Date: 10/10/2002 from 11:00am – 12:20 pm Location: THH 101 Credits: 35% of overall grade Approx. 4 problems, several.
Knowledge Representation using First-Order Logic (Part II) Reading: Chapter 8, First lecture slides read: Second lecture slides read:
Computing & Information Sciences Kansas State University Lecture 11 of 42 CIS 530 / 730 Artificial Intelligence Lecture 11 of 42 William H. Hsu Department.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Knowledge Representation I (Propositional Logic) CSE 473.
FIRST-ORDER LOGIC FOL or FOPC
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
Predicate Calculus.
03 -1 Lecture 03 First-Order Predicate Logic Topics –Syntax –Formal Semantics –Denotational Semantics –Formal Inference –Resolution.
Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter (this lecture, Part I) Chapter 7.5.
Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site.
FIRST ORDER LOGIC Levent Tolga EREN.
Reading: Chapter 8, , FOL Syntax and Semantics read:
Predicates and Quantifiers
Knowledge Interchange Format Michael Gruninger National Institute of Standards and Technology
First Order Logic Chapter 7. PL is a Weak Representational Language §Propositional Logic (PL) is not a very expressive language because: §Hard to identify.
Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter (this lecture, Part I) Chapter 7.5.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Pattern-directed inference systems
Logical Agents Logic Propositional Logic Summary
1 Last time: Logic and Reasoning Knowledge Base (KB): contains a set of sentences expressed using a knowledge representation language TELL: operator to.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
Computing & Information Sciences Kansas State University Wednesday, 20 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 12 of 42 Wednesday, 20 September.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
Propositional Calculus Knowledge based agent Knowledge is contained in agents in the form of sentences in a knowledge representation language stored in.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
October 17, 2012Introduction to Artificial Intelligence Lecture 11: Knowledge Representation and Reasoning I 1Semantics In propositional logic, we associate.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Artificial Intelligence First-Order Logic (FOL). Outline of this Chapter The need for FOL? What is a FOL? Syntax and semantics of FOL Using FOL.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
11 Artificial Intelligence CS 165A Tuesday, October 30, 2007  Knowledge and reasoning (Ch 7) Propositional logic  First-order logic (Ch 8) 1.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 11 Jim Martin.
First-Order Logic Chapter 8 (not 8.1). Outline Why FOL? Why FOL? Syntax and semantics of FOL Syntax and semantics of FOL Using FOL Using FOL Wumpus world.
First-Order Logic. Outline Why FOL? Syntax and semantics of FOL Using FOL Knowledge engineering in FOL.
LOGIC. Logic in general  Logics are formal languages for representing information such that conclusions can be drawn  Syntax defines the sentences in.
First-Order Logic Reading: C. 8 and C. 9 Pente specifications handed back at end of class.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
1 CS 2710, ISSP 2610 Chapter 8, Part 1 First Order Predicate Calculus FOPC.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Knowledge Representation using First-Order Logic (Part II) Reading: R&N Chapters 8, 9.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
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.
Computing & Information Sciences Kansas State University Monday, 18 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 18 September.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Propositional Logic: Logical Agents (Part I)
Knowledge Representation using First-Order Logic
First-Order Logic Chapter 8.
The Propositional Calculus
Notes 8: Predicate logic and inference
Knowledge Representation using First-Order Logic
Semantics In propositional logic, we associate atoms with propositions about the world. We specify the semantics of our logic, giving it a “meaning”. Such.
First-Order Logic Chapter 8.
Back to “Serious” Topics…
Chapter 1: Propositional and First-Order Logic
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
First-Order Logic Chapter 8.
First-Order Logic Chapter 8.
Presentation transcript:

First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL Inference read: Chapter , (Please read lecture topic material before and after each lecture on that topic)

Outline Propositional Logic is Useful --- but has Limited Expressive Power First Order Predicate Calculus (FOPC), or First Order Logic (FOL). –FOPC has greatly expanded expressive power, though still limited. New Ontology –The world consists of OBJECTS (for propositional logic, the world was facts). –OBJECTS have PROPERTIES and engage in RELATIONS and FUNCTIONS. New Syntax –Constants, Predicates, Functions, Properties, Quantifiers. New Semantics –Meaning of new syntax. Knowledge engineering in FOL Inference in FOL

You will be expected to know FOPC syntax and semantics –Syntax: Sentences, predicate symbols, function symbols, constant symbols, variables, quantifiers –Semantics: Models, interpretations De Morgan’s rules for quantifiers –connections between  and  Nested quantifiers –Difference between “ x  y P(x, y)” and “ x  y P(x, y)” – x  y Likes(x, y) – x  y Likes(x, y) Translate simple English sentences to FOPC and back – x  y Likes(x, y)  “Everyone has someone that they like.” – x  y Likes(x, y)  “There is someone who likes every person.”

Outline Review: KB |= S is equivalent to |= (KB  S) –So what does {} |= S mean? Review: Follows, Entails, Derives –Follows: “Is it the case?” –Entails: “Is it true?” –Derives: “Is it provable?” Semantics of FOL (FOPC) –Model, Interpretation

FOL (or FOPC) Ontology: What kind of things exist in the world? What do we need to describe and reason about? Objects --- with their relations, functions, predicates, properties, and general rules. Reasoning Representation A Formal Symbol System Inference Formal Pattern Matching Syntax What is said Semantics What it means Schema Rules of Inference Execution Search Strategy

Review: KB |= S means |= (KB  S) KB |= S is read “KB entails S.” –Means “S is true in every world (model) in which KB is true.” –Means “In the world, S follows from KB.” KB |= S is equivalent to |= (KB  S) –Means “(KB  S) is true in every world (i.e., is valid).” And so: {} |= S is equivalent to |= ({}  S) So what does ({}  S) mean? –Means “True implies S.” –Means “S is valid.” –In Horn form, means “S is a fact.” p. 256 (3 rd ed.; p. 281, 2 nd ed.) Why does {} mean True here, but False in resolution proofs?

Review: (True  S) means “S is a fact.” By convention, –The null conjunct is “syntactic sugar” for True. –The null disjunct is “syntactic sugar” for False. –Each is assigned the truth value of its identity element. For conjuncts, True is the identity: (A  True)  A For disjuncts, False is the identity: (A  False)  A A KB is the conjunction of all of its sentences. –So in the expression: {} |= S We see that {} is the null conjunct and means True. –The expression means “S is true in every world where True is true.” I.e., “S is valid.” –Better way to think of it: {} does not exclude any worlds (models). In Conjunctive Normal Form each clause is a disjunct. –So in, say, KB = { (P Q) (Q R) () (X Y Z) } We see that () is the null disjunct and means False.

Side Trip: Functions AND, OR, and null values (Note: These are “syntactic sugar” in logic.) function AND(arglist) returns a truth-value return ANDOR(arglist, True) function OR(arglist) returns a truth-value return ANDOR(arglist, False) function ANDOR(arglist, nullvalue) returns a truth-value /* nullvalue is the identity element for the caller. */ if (arglist = {}) then return nullvalue if ( FIRST(arglist) = NOT(nullvalue) ) then return NOT(nullvalue) return ANDOR( REST(arglist) )

Side Trip: We only need one logical connective. (Note: AND, OR, NOT are “syntactic sugar” in logic.) Both NAND and NOR are logically complete. –NAND is also called the “Sheffer stroke” –NOR is also called “Pierce’s arrow” (NOT A) = (NAND A TRUE) = (NOR A FALSE) (AND A B) = (NAND TRUE (NAND A B)) = (NOR (NOR A FALSE) (NOR B FALSE)) (OR A B) = (NAND (NAND A TRUE) (NAND B TRUE)) =(NOR FALSE (NOR A B))

Review: Schematic for Follows, Entails, and Derives If KB is true in the real world, then any sentence  entailed by KB and any sentence  derived from KB by a sound inference procedure is also true in the real world. Sentences Sentence Derives Inference

Schematic Example: Follows, Entails, and Derives Inference “Mary is Sue’s sister and Amy is Sue’s daughter.” “Mary is Amy’s aunt.” Representation Derives Entails Follows World MarySue Amy “Mary is Sue’s sister and Amy is Sue’s daughter.” “An aunt is a sister of a parent.” Sister Daughter Mary Amy Aunt “Mary is Amy’s aunt.” Is it provable? Is it true? Is it the case?

Review: Models (and in FOL, Interpretations) Models are formal worlds in which truth can be evaluated We say m is a model of a sentence α if α is true in m M(α) is the set of all models of α Then KB ╞ α iff M(KB)  M(α) –E.g. KB, = “Mary is Sue’s sister and Amy is Sue’s daughter.” –α = “Mary is Amy’s aunt.” Think of KB and α as constraints, and of models m as possible states. M(KB) are the solutions to KB and M(α) the solutions to α. Then, KB ╞ α, i.e., ╞ (KB  a), when all solutions to KB are also solutions to α.

Semantics: Worlds The world consists of objects that have properties. –There are relations and functions between these objects –Objects in the world, individuals: people, houses, numbers, colors, baseball games, wars, centuries Clock A, John, 7, the-house in the corner, Tel-Aviv, Ball43 –Functions on individuals: father-of, best friend, third inning of, one more than –Relations: brother-of, bigger than, inside, part-of, has color, occurred after –Properties (a relation of arity 1): red, round, bogus, prime, multistoried, beautiful

Semantics: Interpretation An interpretation of a sentence (wff) is an assignment that maps –Object constant symbols to objects in the world, –n-ary function symbols to n-ary functions in the world, –n-ary relation symbols to n-ary relations in the world Given an interpretation, an atomic sentence has the value “true” if it denotes a relation that holds for those individuals denoted in the terms. Otherwise it has the value “false.” –Example: Kinship world: Symbols = Ann, Bill, Sue, Married, Parent, Child, Sibling, … –World consists of individuals in relations: Married(Ann,Bill) is false, Parent(Bill,Sue) is true, …

Truth in first-order logic Sentences are true with respect to a model and an interpretation Model contains objects (domain elements) and relations among them Interpretation specifies referents for constant symbols → objects predicate symbols → relations function symbols → functional relations An atomic sentence predicate(term 1,...,term n ) is true iff the objects referred to by term 1,...,term n are in the relation referred to by predicate

Semantics: Models An interpretation satisfies a wff (sentence) if the wff has the value “true” under the interpretation. Model: A domain and an interpretation that satisfies a wff is a model of that wff Validity: Any wff that has the value “true” under all interpretations is valid Any wff that does not have a model is inconsistent or unsatisfiable If a wff w has a value true under all the models of a set of sentences KB then KB logically entails w

Models for FOL: Example

FOL (or FOPC) Ontology: What kind of things exist in the world? What do we need to describe and reason about? Objects --- with their relations, functions, predicates, properties, and general rules. Reasoning Representation A Formal Symbol System Inference Formal Pattern Matching Syntax What is said Semantics What it means Schema Rules of Inference Execution Search Strategy

Summary First-order logic: –Much more expressive than propositional logic –Allows objects and relations as semantic primitives –Universal and existential quantifiers Syntax: constants, functions, predicates, equality, quantifiers Nested quantifiers Translate simple English sentences to FOPC and back