9/28/98 Prof. Richard Fikes First-Order Logic Knowledge Interchange Format (KIF) Computer Science Department Stanford University CS222 Fall 1998.

Slides:



Advertisements
Similar presentations
Nested Quantifiers Section 1.4.
Advertisements

Artificial Intelligence
First-Order Logic Chapter 8.
SCL: A Logic Standard for Semantic Integration Christopher Menzel Philosophy Department Texas A&M University
1/31/01 Professor Richard Fikes Frame Representation of Electronic Circuit Example Computer Science Department Stanford University CS222 Winter 2001 Knowledge.
Predicate Logic Colin Campbell. A Formal Language Predicate Logic provides a way to formalize natural language so that ambiguity is removed. Mathematical.
Predicate Logic Second Term Fourth Year (10 CS) 1.
REPRESENTAÇÃO DO CONHECIMENTO Terças – 13 hs – sala 512 RDC.
Knowledge Representation I Suppose I tell you the following... The Duck-Bill Platypus and the Echidna are the only two mammals that lay eggs. Only birds.
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.
Logic. Propositional Logic Logic as a Knowledge Representation Language A Logic is a formal language, with precisely defined syntax and semantics, which.
Discrete Structures Chapter 1 Part B Fundamentals of Logic Nurul Amelina Nasharuddin Multimedia Department 1.
Discrete Mathematics Math 6A Instructor: M. Welling.
CS 4700: Foundations of Artificial Intelligence
Predicate Calculus.
Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site.
Propositional Calculus Math Foundations of Computer Science.
FIRST ORDER LOGIC Levent Tolga EREN.
Adapted from Discrete Math
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
Knowledge Interchange Format Michael Gruninger National Institute of Standards and Technology
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
Logic Specification and Z Schema 3K04 McMaster. Basic Logic Operators Logical negation ( ¬ ) Logical conjunction ( Λ or & ) Logical disjunction ( V or.
Ming Fang 6/12/2009. Outlines  Classical logics  Introduction to DL  Syntax of DL  Semantics of DL  KR in DL  Reasoning in DL  Applications.
LDK R Logics for Data and Knowledge Representation Modeling First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia.
Declarative vs Procedural Programming  Procedural programming requires that – the programmer tell the computer what to do. That is, how to get the output.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean.
Pattern-directed inference systems
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.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Predicate Logic.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 11 of 41 Wednesday, 15.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
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.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
CS6133 Software Specification and Verification
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.
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
1 CSC384: Intro to Artificial Intelligence Lecture 5.  Knowledge Representation.
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.
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.
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
EEL 5937 Content languages EEL 5937 Multi Agent Systems Lecture 10, Feb. 6, 2003 Lotzi Bölöni.
Lecture 8-2CS250: Intro to AI/Lisp What do you mean, “What do I mean?” Lecture 8-2 November 18 th, 1999 CS250.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Computing & Information Sciences Kansas State University Monday, 18 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 18 September.
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
Logic Gates.
Propositional Calculus: Boolean Functions and Expressions
Knowledge and reasoning – second part
The function of knowledge representation scheme is
Notes 8: Predicate logic and inference
Propositional Calculus: Boolean Functions and Expressions
Semantics In propositional logic, we associate atoms with propositions about the world. We specify the semantics of our logic, giving it a “meaning”. Such.
Knowledge and reasoning – second part
Predicates and Quantifiers
Representations & Reasoning Systems (RRS) (2.2)
Presentation transcript:

9/28/98 Prof. Richard Fikes First-Order Logic Knowledge Interchange Format (KIF) Computer Science Department Stanford University CS222 Fall 1998

2 Knowledge Systems Laboratory, Stanford University Language 1 Language 2 Language n K I F KB Library... Interlingua for Multi-Use Knowledge KIF u Knowledge Interchange Format (KIF) ä First order predicate logic with set theory ä Logically comprehensive ä Model-theoretic semantics

3 Knowledge Systems Laboratory, Stanford University KR Language Components logical formalism u A logical formalism ä Syntax for wffs ä Vocabulary of logical symbols ä Interpretation semantics for the logical symbols E.g., (=> (Person ?x) (= (Gender (Mother ?x)) Female))) ontology u An ontology ä Vocabulary of non-logical symbols › Relations, functions, constants ä Axioms restricting the interpretations of the symbols E.g., (=> (Person ?x) (= (Gender (Mother ?x)) Female))) proof theory u A proof theory ä Specification of the reasoning steps that are logically sound E.g., (=> S 1 S 2 ) and S 1 entails S 2

4 Knowledge Systems Laboratory, Stanford University ConceptualizationConceptualization u Universe of discourse Set of objects about which knowledge is being expressed u Object ä Concrete Clyde, my car ä Abstract Justice, 2 ä Primitive Resister ä Composite Electric circuit ä Fictional Sherlock Holmes

5 Knowledge Systems Laboratory, Stanford University a b c d e Blocks World Objects - a, b, c, d, e, table

6 Knowledge Systems Laboratory, Stanford University Relations and Functions u Relation ä Set of finite lists of objects E.g., Parent: {(Richard Earl) (Richard Polly) (Debbie Don) … }  Mapping:  u Function ä Relation that associates a unique nth element with a given n-1 elements E.g, +: {(1 3 4) ( ) ( ) …} ä Referred to as (arg1, arg2, …,argk, value)  Mapping: 

7 Knowledge Systems Laboratory, Stanford University a b c d e Blocks World u Objects a, b, c, d, e, table u Relations ä Above: {(a b) (a c) (b c) (d e)} ä Clear: {(a) (d)} ä Table: {(c) (e)} u Functions ä On: {(a b) (b c) (d e)}

8 Knowledge Systems Laboratory, Stanford University Predicate Calculus - KIF u Knowledge Base - Collection of sentences u Sentence - Expression denoting a statement u Term - Expression denoting an object u Objects always in the conceptualization ä Words ä Complex numbers lists ä All finite lists of objects sets ä All sets of objects   (bottom)

9 Knowledge Systems Laboratory, Stanford University Declarative Semantics u Interpretation -     (  ) u Variable assignment -    Semantic value -  ä Defined in terms of an interpretation and variable assignment  Truth value -  {true, false} ä Defined in terms of an interpretation and variable assignment u Version of a variable assignment V’ is a version of a variable assignment V with respect to variables var 1,…,var n if and only if V’ agrees with V on all variables except for var 1,…,var n.

10 Knowledge Systems Laboratory, Stanford University Constants, Individual Variables, Function Terms u Constant - Word E.g., Fred, Block-A, Justice S IV ( ) = I( ) u Individual Variable - Word beginning with “?” E.g, ?x, ?The-Murderer S IV ( ) = V( ) u Function Term ä ( * [ ]) E.g., (plus 2 3) (Father-Of Richard) ä S IV ((fn term 1 … term n )) = I(fn)[S IV (term 1 ) … S IV (term n )] ä S IV ((fn term 1 … term = I(fn)[S IV (term 1 ) … S IV (term n ) |

11 Knowledge Systems Laboratory, Stanford University List Terms and Set Terms u List Term ä (listof * [ ]) E.g., (listof A B C) (listof A  S IV ((listof term 1 … term n )) =  S IV (term 1 ), …, S IV (term n )  ä S IV ((listof term 1 … term =  S IV (term 1 ), …, S IV (term n ) |  u Set Term ä (setof * [ ]) E.g., (setof A B C) (setof A  S IV ((setof term 1 … term n )) =  S IV (term 1 ), …, S IV (term n )} ä S IV ((setof term 1 … term =  S IV (term 1 ), …,S IV (term n )} U {x | (  i) x = S IV i))}

12 Knowledge Systems Laboratory, Stanford University Logical Terms u (if [ ]) E.g, (if (Above A B) A B) ä S IV ((if sent term)) = › S IV (term) when T IV (sent) = true ›  otherwise ä S IV ((if sent term 1 term 2 )) = › S IV (term 1 ) when T IV (sent) = true › S IV (term 2 ) otherwise u (cond ( ) … ( )) E.g., (cond ((Above A B) A) ((Above B A) B)) ä S IV ((cond (sent 1 term 1 ) … (sent n term n ))) = › S IV (term 1 ) when T IV (sent 1 ) = true... › S IV (term n ) when T IV (sent n ) = true ›  otherwise

13 Knowledge Systems Laboratory, Stanford University Quantified Terms u Set-Forming Term - (setofall ) E.g, (setofall ?block (Above ?block A)) ä S IV ((setofall term sent)) = {S IV’ (term) | T IV’ (sent) = true} for all versions V’ of V wrt the variables in term u Designator - (the ) E.g., (the ?block (Above ?block A)) ä S IV ((the term sent)) = › S IV’ (term) when V’ is a version of V wrt the variables in term, and T IV’ (sent) = true, and S IV’’ (term) = S IV’ (term) for all versions V’’ of V such that T IV’’ (sent) = true ›  otherwise

14 Knowledge Systems Laboratory, Stanford University Logical Constants, Equations, Inequalities u Logical constant ä T iv (constant) = I(constant) ä T iv (true) = true ä T iv (false) = false u Equations - (= ) E.g, (= (Father Richard) Earl) (= A B) ä T IV ((= term 1 term 2 )) = › true when S IV (term 1 ) and S IV (term 2 ) are the same object › false otherwise u Inequalities - (/= ) E.g, (/= (Father Richard) (Father Bob)) (/= A B) ä T IV ((/= term 1 term 2 )) = T IV ((not (= term 1 term 2 )))

15 Knowledge Systems Laboratory, Stanford University Relational Sentences u ( * [ ]) E.g, (Parent Richard Earl) (Clear A) (Set-Partition ä T IV ((rel term 1 … term n )) = › true when I(rel)[S IV (term 1 ), …, S IV (term n )] is true › false otherwise ä T IV ((rel term 1 … term = › true when I(rel)[S IV (term 1 ), …, S IV (term n ) | S IV is true › false otherwise u ( * ) E.g, (Father Richard Earl) (Plus 2 5 7) ä T IV ((fun arg 1 … arg n val)) = › true when I(fun)[S IV (arg 1 ), …, S IV (arg n )] = S IV (val) › false otherwise

16 Knowledge Systems Laboratory, Stanford University Logical Sentences: not, and, or u Negation - (not ) E.g., (not (On A D)) (not (On B B)) ä T IV ((not sent)) = › true when T IV (sent) is false › false otherwise u Conjunction - (and *) E.g., (and (On A B) (On B C)) ä T IV ((and sent 1 … sent n )) = › true when T IV (sent i ) is true for all i=1,…,n › false otherwise u Disjunction - (or *) E.g., (or (On A D) (On A B)) ä T IV ((or sent 1 … sent n )) = › true when T IV (sent i ) is true for some i=1,…,n › false otherwise

17 Knowledge Systems Laboratory, Stanford University Logical Sentences: => Logical Sentences: => u Implication - (=> * ) E.g., (=> (On A B) (On B C)) ä T IV ((=> ante 1 … ante n conse)) = › true when: T IV (ante i ) is false for some i=1,…,n; or T IV (conse) is true › false otherwise E.g., (=> (On A D) (On D D)) ä T IV ((=> a 1 … a n c)) = T IV ((or (not a 1 ) … (not a n ) c)) u Implication - ( *) u Equivalence - ( ) ä T IV ((sent 1 sent 2 )) = › true when T IV (sent 1 ) = T IV (sent 2 ) › false otherwise ä T IV (( s 1 s 2 )) = T IV ((and (=> s 1 s 2 ) (=> s 2 s 1 )))

18 Knowledge Systems Laboratory, Stanford University Universally Quantified Sentences u (forall ) E.g, (forall ?b (not (On ?b ?b))) ä T IV ((forall ?var sent)) = › true when T IV’ (sent) = true for all versions V’ of V with respect to variable ?var › false otherwise u (forall ( *) ) E.g., (forall (?b 1 ?b 2 ) (=> (On ?b 1 ?b 2 ) (Above ?b 1 ?b 2 ))) ä T IV ((forall (?var 1 … ?var n ) sent)) = › true when T IV’ (sent) = true for all versions V’ of V with respect to ?var 1 … ?var n › false otherwise

19 Knowledge Systems Laboratory, Stanford University Existentially Quantified Sentences u (exists ) E.g, (forall ?b1 (or (on ?b1 table) (exists ?b2 (On ?b1 ?b2)))) ä T IV ((exists ?var sent)) = › true when T IV’ (sent) = true for some version V’ of V with respect to variable ?var › false otherwise u (exists ( *) ) E.g., (exists (?b 1 ?b 2 ) (and (On ?b 1 ?A) (Above ?A ?b 2 ))) ä T IV ((exists (?var 1 … ?var n ) sent)) = › true when T IV’ (sent) = true for some version V’ of V with respect to ?var 1 … ?var n › false otherwise u forall not in the scope of an exists may be omitted E.g, (or (on ?b1 table) (exists ?b2 (On ?b1 ?b2)))

20 Knowledge Systems Laboratory, Stanford University Digital Circuit C 1 Russell and Norvig, Figure 8.1 Sum Out Carry Out Addends In Carry In

21 Knowledge Systems Laboratory, Stanford University Domain Conceptualization u Objects ä Circuits ä Terminals ä Signals ä Gates ä Gate types ä Signal values u Relations ä Connected: ( ) u Functions  Type:   In: ( )   Out: ( )   Signal: 

22 Knowledge Systems Laboratory, Stanford University Electronic Circuit Domain Theory u Connected terminals have the same signal (=> (Connected ?t1 ?t2) (= (Signal ?t1) (Signal ?t2))) u Signal at terminal is either on or off (or (= (Signal ?t) On) (= (Signal ?t) Off)) (or (Signal ?t On) (Signal ?t Off))) (not (= On Off)) u Connected is commutative ( (Connected ?t1 ?t2) (Connected ?t2 ?t1))

23 Knowledge Systems Laboratory, Stanford University OR and AND Gates u OR gate’s output is on when any of its inputs are on (=> (= (Type ?g) OR) ( (= (Signal (Out 1 ?g)) On) (exists ?i (= (Signal (In ?i ?g)) On))) u AND gate’s output is off when any of its inputs are off (=> (= (Type ?g) AND) ( (= (Signal (Out 1 ?g)) Off) (exists ?i (= (Signal (In ?i ?g)) Off)))

24 Knowledge Systems Laboratory, Stanford University XOR and NOT Gates u XOR gate’s output is on when its inputs are different (=> (= (Type ?g) XOR) ( (= (Signal (Out 1 ?g)) On) (not (= (Signal (In 1 ?g) (Signal (In 2 ?g)))))) u NOT gate’s output is different from its inputs (=> (= (Type ?g) NOT) (not (= (Signal (Out 1 ?g)) (Signal (In 1 ?g)))))

25 Knowledge Systems Laboratory, Stanford University Circuit C 1 Representation u Gates (= (Type X 1 ) XOR)(= (Type X 2 ) XOR) (= (Type A 1 ) AND)(= (Type A 2 ) AND) (= (Type O 1 ) OR) u Connections (Connected (Out 1 X 1 ) (In 1 X 2 ))(Connected (In 1 C 1 ) (In 1 X 1 )) (Connected (Out 1 X 1 ) (In 2 A 2 ))(Connected (In 1 C 1 ) (In 1 A 1 )) (Connected (Out 1 A 2 ) (In 1 O 1 ))(Connected (In 2 C 1 ) (In 2 X 1 )) (Connected (Out 1 A 1 ) (In 2 O 1 ))(Connected (In 2 C 1 ) (In 2 A 1 )) (Connected (Out 1 X 2 ) (Out 1 C 1 ))(Connected (In 3 C 1 ) (In 2 X 2 )) (Connected (Out 1 O 1 ) (Out 2 C 1 ))(Connected (In 3 C 1 ) (In 1 A 2 ))

26 Knowledge Systems Laboratory, Stanford University Readings for 10/5 u Proofs and inference rules for first order logic u Primary Readings ä Russell and Norvig › Inference in First-Order Logic