KR: First Order Logic - Intro

Size: px
Start display at page:

Download "KR: First Order Logic - Intro"

Transcription

1 KR: First Order Logic - Intro First order logic (first order predicate calculus, predicate calculus) is a higherlevel logic than propositional logic The basic components of FOL are 1. Objects 2. Relations among the objects 3. Functions FOL allows for the representation of general rules about the objects that make up the world FOL does not make ontological commitments to time, categories, events,... It is a general language, similar to SQL in databases It can be used to represent any domain in a manner suitable to the agent/user It is the most studied and best understood KR language devised 1

2 KR: First Order Logic - Syntax The syntax of FOL is specified by the following BNF diagram: Sentence AtomicSentence ComplexSentence AtomicSentence P redicatesymbol P redicatesymbol(t erm,...) T erm = T erm ComplexSentence (Sentence) [Sentence] Sentence Sentence Sentence Sentence Sentence Sentence Sentence Sentence Sentence Quantif ier V ariable,... Sentence T erm F unctionsymbol(t erm,...) ConstantSymbol V ariable Quantif ier ConstantSymbol Symbol P redicatesymbol T rue F alse Symbol F unctionsymbol Symbol Symbol U pperletter LetterOrDigit... V ariable LowerLetter LetterOrDigit... LetterOrDigit Letter Digit Letter U pperletter LowerLetter U pperletter A B C... Z LowerLetter a b c... z Digit Precedence: () 2

3 Alternate representations KR: First Order Logic - Syntax N ot, Sentence And Sentence Sentence, Sentence&Sentence Or Sentence + Sentence, Sentence Sentence Implication Sentence Sentence, Sentence Sentence Biconditional Sentence Sentence, Sentence Sentence Quantif ication Quantif ier V ariable, Quantif ier V ariable,... Sentence Quantif ier (V ariable,...) Sentence (Quantif ier V ariable), (Quantif ier V ariable),... Sentence (Quantif ier V ariable... )Sentence 3

4 Models and interpretations KR: First Order Logic - Semantics A model in the FOL represents a possible world A model consists of a set of objects The domain of the model is the set of objects that the model contains These objects are called the domain elements domain 1 An interpretation I over domain D is a mapping of the constant, predicate, and function symbols to objects of D, relations that exist among those objects, and functions on those objects The mappings are the denotations of the symbols Models differ in terms of how many objects they contain, and the mappings of symbols Given a model with m constant symbols and n objects, there are m n interpretations for the model In FOL, the number of models is infinite Hence, model checking cannot be used for entailment Constant symbols Represent entities/objects in the domain of a model Some objects in the domain may not have symbols mapped to them, other objects may have several symbols mapped to them 4

5 KR: First Order Logic - Semantics (2) Function symbols Represent an anonymous/generic object from domain D Map D n D Syntactically, represented like function calls in most programming languages Object from D returned by the mapped function based on the values of its arguments assigned under I The arity of a function is the number of arguments it takes Function of arity n represented by n + 1 tuples: < t 1, t 2,..., t n, t n+1 > t i, 1 i n are arguments: objects (terms - see below) from D t n+1 is value of the function Functions in FOL are total functions They must return an object for all sets of arguments For sets that do not map to objects in the domain, there is a special object returned that represents the object for which this set of objects does not have a mapping Under normal usage, this issue can be ignored Variable symbols Mapped to objects in D Unlike other symbols, the mapping of these symbols are not fixed They are free to represent any and all domain elements Variable symbols may only appear in quantified expressions (see below) Terms These are expressions that refer to domain elements (e.g., constant symbols, variable symbols, or function expressions) Ground term has no variables in it 5

6 KR: First Order Logic - Semantics (3) Sentences, or Well Formed Formuli (wff) Sentences represent truth values 1. Atomic sentences (a) Predicate symbols Represent relations among objects Each predicate symbol of arity n is mapped to a relation with n arguments from D Predicate of arity n represented by n-tuples: < t 1, t 2,..., t n > A predicate expression predicate symbol(t 1, t 2,..., t n ) is true in a model if the relation to which the predicate symbol is mapped holds among the objects represented by its arguments D n T, F (b) Equality: t 1 = t 2 = is a special predicate More properly written as = (t 1, t 2 ) Is true if arguments represent the same object Represents the set of all 2-tuples in the domain whose values are the same: {< o 1, o 1 >, < o 2, o 2 >,...} 2. Complex sentences Semantics (same as for propositional logic): P Q P P Q P Q P Q P Q T T F T T T T T F F F T F F F T T F T T F F F T F F T T 6

7 KR: First Order Logic - Semantics (4) 3. Quantified sentences: Quantifiers are statements regarding collections of objects In the sentence Quantifier V ariable,... Sentence V ariable is quantified over Sentence is in the scope of the quantifier If all variables in the sentence are quantified over, the sentence is a closed sentence V ariable is mapped to any or all objects in the domain Universal quantification ( ) x P (x) is true in a given model D if P is true for all values of x D under all possible entended interpretations constructed from the interpretations given in the model, where each extended interpretation specifies a domain element to which x refers i.e., P (o 1 ) P (o 2 )... P (o n ) for all objects o i D under I Existential quantification ( ) x P (x) is true in a given model D if P is true for at least one value of x D under all possible entended interpretations constructed from the interpretations given in the model i.e., P (o 1 ) P (o 2 )... P (o n ) for all objects o i D under I De Morgan s laws for quantifiers: x P (x) x P (x) x P (x) x P (x) x P (x) x P (x) x P (x) x P (x) 7

8 Consider the following: KR: First Order Logic - Database Semantics P arent(f red, P ebbles) P arent(w ilma, P ebbles) This does not sufficiently represent the fact that P ebbles parents are F red and W ilma Must specify that W ilma and F red do not represent the same object: F red W ilma Must specify that W ilma and F red are the ONLY parents: x P arent(x, P ebbles) (x = F red x = W ilma) While the above is precise, it is getting a bit complex to represent something that is relatively simple Database semantics is an alternative semantics intended to simplify representation It involves the following: 1. Unique names assumption Every constant symbol represents a unique object This would preclude the need for stating F red W ilma above 2. Closed world assumption Atomic sentences whose truth values are not known are assumed to be false 3. Domain closure The only objects in the domain are those named by constants This and the closed world assumption would preclude the need for stating x P arent(x, P ebbles) (x = F red x = W ilma) Given database semantics, the original sentence above specifies a world in which only three objects exist: F red, W ilma and P ebbles Since there are nine possible two-element tuples (corresponding to the P arent relation), there are 2 9 models 8

9 KR: First Order Logic - Writing FOL Sentences To represent knowledge in FOL, must id 1. Constants 2. Functions 3. Predicates Predicates represent the rules that allow inferences to be made An axiom is a basic fact A definition specifies equivalence between 2 facts Specified in terms of biconditionals/logical equivalence Definitions are a subset of axioms Not all axioms represent definitions Simple facts are often expressed by atomic sentences Characteristics or properties about classes of objects are expressed using quantifiers A theorem is anything inferred from KB Adding theorems to the KB does not add new info They can always be inferred from the axioms/theorems from which they were derived What they do is decrease the amount of inference required to perform additional inferencing An independent axiom is one that cannot be derived from others 9

10 KR: First Order Logic - Writing FOL Sentences (2) Quantification - Writing facts about groups of objects 1. Universal These sentences used to represent general facts of the form If something is a P, then that something is Q e.g., All P are Q Written as x P (x) Q(x) The above is true if it is true for every object in the domain: P (o 1 ) Q(o 1 ) P (o 2 ) Q(o 2 )... P (o n ) Q(o n ) where o i represent all objects in the domain The above can be rewritten as P (o 1 ) Q(o 1 ) P (o 2 ) Q(o 2 )... P (o n ) Q(o n ) Remember, if P (o i ) is true, we can infer Q(q i ) using modus ponens, and P (o i ) Q(o i ) is true for x = o i If P (o j ) is false, P (o j ) Q(o j ) is still true Hence the above conjunction is true for all objects in the universe Common error: using instead of : Represents (x) (P (x) Q(x)) P (o 1 ) Q(o 1 ) P (o 2 ) Q(o 2 )... P (o n ) Q(o n ) If one object does not satisfy P (x), the above conjunction is false 10

11 2. Existential KR: First Order Logic - Writing FOL Sentences (3) Represent facts of the form There is a P that is Q Written as x P (x) Q(x)) Represents P (o 1 ) Q(o 1 ) P (o 2 ) Q(o 2 )... P (o n ) Q(o n ) True as long as one object satisfies one of the disjuncts Common error: using instead of Represents True for all objects in KB 3. Nesting quantifiers If x is P, and y is Q, then x R y Parentheses emphasize scope: x P (x) Q(x)) P (o 1 ) Q(o 1 ) P (o 2 ) Q(o 2 )... P (o n ) Q(o n ) x y P (x) Q(y) R(x, y) x( y (P (x) P (y) R(x, y))) Mixing universal and existential is tricky Order makes a difference x y s y x s Cannot collapse quantifiers for mixed quantification; e.g., x y s x, y s x y s x, y s Strongly recommended that use unique variable for each quantifier when nesting Note that variables cannot appear in a wff unless quantified 11

12 Representing percepts KR: First Order Logic - Writing FOL Sentences (4) P ercept(percept list, time); e.g., Actions P ercept([sunny, 65], 7) Action, or Action(Arg 1, Arg 2,...); e.g., P utdown, P ickup(r) Deriving facts from percepts This representation specifies that we can infer a fact when a particular stimulus is sensed t, s 1, s 2,... P ercept([s 1, s 2,..., StimulusOfConcern,...], t) P redicate(t); e.g., t, s 1, b 1, g, b 2, s 2 P ercept([s 1, Breeze, g, b 2, s 2 ], t) Breezy(t) Reflex behavior t P redicate(t) BestAction(Action, t); e.g., t Glitter(t) BestAction(Grab, t) The BestAction(Action, t) predicate represents the action that should be taken at time t Locations Use an array-like representation for grid-based environments; e.g., [x, y] Representing adjacency: x, y, a, b Adjacent([x, y], [a, b]) (x = a (y = b 1 y = b + 1)) (y = b (x = a 1 x = a + 1)) Representing the agent s location: At(Agent, [x, y], t) Representing the fact that something cannot be at two locations at once: x, s 1, s 2, t At(x, s 1, t) At(x, s 2, t) (s 1 = s 2 ) Associating a predicate with a location: s, t At(Agent, s, t) SensoryP redicate(t) SensoryDescriptionP redicate(s); e.g., s, t At(Agent, s, t) Breeze(t) Breezy(s) 12

13 Syntactic sugar KR: First Order Logic - Writing FOL Sentences (5) This refers to extensions to the basic syntax of FOL in order to make it easier to write or understand sentences For example, 1. Using x = y instead of = (x, y) or Equals(x, y) 2. Using x + 1 instead of Successor(x) Such extensions are acceptable as long as the semantics are unaffected The proper syntax can always be substituted back in the sentences for the sugar The KB Want KB to be as small as possisble to make inference efficient Minimal KB contains only independent axioms Adding some superfluous axioms may enhance inference as discussed above re theorems 13

14 KR: First Order Logic - Interacting with the KB To install facts into the KB, use T ELL: T ELL(KB, sentence); e.g., T ELL(KB, ( x Holding(x) HandEmpty)) These are called assertions To ask a question, use ASK: ASK(KB, sentence); e.g., ASK(KB, On(R, G, 5)), or ASK(KB, ( x Holding(x, 5)) Such queries will return true or false (yes/no) This is OK for the first query, but not the second, where the user most likely would want to know the value of x that satisfies the query The ASKV ARS function is used for this purpose: ASKV ARS(KB, sentence); e.g., ASKV ARS(KB, ( x Holding(x, 5)) ASKV ARS returns a binding list, or substitution of the form {var/binding}; e.g., {x/r} This signifies that object R when substituted for x makes the query sentence true 14

15 KR: First Order Logic - Knowledge Engineering KE is the process of constructing the KB A knowledge engineer determines the concepts in the domain that need to be represented Basic steps: 1. Id the task Determine the kinds of queries that will be posed Determine the kinds of knowledge that support the queries 2. Assemble the relevant knowledge This stage is known as knowledge acquisition The engineer must understand how the domain works and the knowledge relevant to the problem If the engineer is not an expert in the domain, an expert is usually consulted 3. Decide on a vocabulary of predicates, functions, and constants Decide on a set of symbols to be used Determine the mappings from the domain to the symbols This defines the ontology of the domain: The kinds of things that exist in the modeled domain 4. Encode general knowledge about the domain Specify the axioms 5. Encode a description of a problem instance 6. Pose queries 7. Debug the KB Most likely there will need to be additional axioms, inference rules (implications) will need to be added or rewritten, etc., in order to be able to make proper inferences 15

16 KR: First Order Logic and Higher Logics Predicate logic called first order because can quantify over first order entities (objects) Higher-order logics allow quantification over higher order entities (e.g., functions and predicates) For example: (x, y) (x = y) (p) (p(x) p(y))) (2 objects are equivalent if all of their properties are equivalent) Higher-order logics can represent more information than those of lower orders Inference mechanisms for higher-order logics not well understood 16

First Order Logic (FOL)

First Order Logic (FOL) First Order Logic (FOL) CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2013 Soleymani Course material: Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter

More information

J Propositional logic is declarative J Propositional logic is compositional: q meaning of B 1,1 P 1,2 is derived from meaning of B 1,1 and of P 1,2

J Propositional logic is declarative J Propositional logic is compositional: q meaning of B 1,1 P 1,2 is derived from meaning of B 1,1 and of P 1,2 Propositional logic First-Order Logic Russell and Norvig Chapter 8 J Propositional logic is declarative J Propositional logic is compositional: meaning of B 1,1 P 1,2 is derived from meaning of B 1,1 and

More information

First Order Logic (FOL)

First Order Logic (FOL) First Order Logic (FOL) CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2015 Soleymani Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 8 Why FOL?

More information

Artificial Intelligence. Propositional logic

Artificial Intelligence. Propositional logic Artificial Intelligence Propositional logic Propositional Logic: Syntax Syntax of propositional logic defines allowable sentences Atomic sentences consists of a single proposition symbol Each symbol stands

More information

Artificial Intelligence Knowledge Representation I

Artificial Intelligence Knowledge Representation I Artificial Intelligence Knowledge Representation I Agents that reason logically knowledge-based approach implement agents that know about their world and reason about possible courses of action needs to

More information

Logical Agents (I) Instructor: Tsung-Che Chiang

Logical Agents (I) Instructor: Tsung-Che Chiang Logical Agents (I) Instructor: Tsung-Che Chiang tcchiang@ieee.org Department of Computer Science and Information Engineering National Taiwan Normal University Artificial Intelligence, Spring, 2010 編譯有誤

More information

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring 109 7 LOGICAL AGENS We now turn to knowledge-based agents that have a knowledge base KB at their disposal With the help of the KB the agent aims at maintaining knowledge of its partially-observable environment

More information

First-Order Logic. Propositional logic. First Order logic. First Order Logic. Logics in General. Syntax of FOL. Examples of things we can say:

First-Order Logic. Propositional logic. First Order logic. First Order Logic. Logics in General. Syntax of FOL. Examples of things we can say: Propositional logic First-Order Logic Russell and Norvig Chapter 8 Propositional logic is declarative Propositional logic is compositional: meaning of B 1,1 P 1,2 is derived from meaning of B 1,1 and of

More information

First-order logic. First-order logic. Logics in general. Outline. Syntax of FOL: Basic elements. Pros and cons of propositional logic

First-order logic. First-order logic. Logics in general. Outline. Syntax of FOL: Basic elements. Pros and cons of propositional logic First-order logic Whereas propositional logic assumes world contains facts, first-order logic (like natural language) assumes the world contains First-order logic Chapter 8 Objects: people, houses, numbers,

More information

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19. Intelligent Agents First Order Logic Ute Schmid Cognitive Systems, Applied Computer Science, Bamberg University last change: 19. Mai 2015 U. Schmid (CogSys) Intelligent Agents last change: 19. Mai 2015

More information

Logical Agents. September 14, 2004

Logical Agents. September 14, 2004 Logical Agents September 14, 2004 The aim of AI is to develop intelligent agents that can reason about actions and their effects and about the environment, create plans to achieve a goal, execute the plans,

More information

Propositional Logic Not Enough

Propositional Logic Not Enough Section 1.4 Propositional Logic Not Enough If we have: All men are mortal. Socrates is a man. Does it follow that Socrates is mortal? Can t be represented in propositional logic. Need a language that talks

More information

Knowledge-based Agents. CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents. Outline. Knowledge-based Agents

Knowledge-based Agents. CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents. Outline. Knowledge-based Agents Knowledge-based Agents CS 331: Artificial Intelligence Propositional Logic I Can represent knowledge And reason with this knowledge How is this different from the knowledge used by problem-specific agents?

More information

CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents

CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents CS 331: Artificial Intelligence Propositional Logic I 1 Knowledge-based Agents Can represent knowledge And reason with this knowledge How is this different from the knowledge used by problem-specific agents?

More information

First-Order Logic. Chapter 8

First-Order Logic. Chapter 8 First-Order Logic Chapter 8 Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL Pros/cons of propositional logic Propositional logic is declarative (recall

More information

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P. First-Order Logic Syntax The alphabet of a first-order language is organised into the following categories. Logical connectives:,,,,, and. Auxiliary symbols:.,,, ( and ). Variables: we assume a countable

More information

CS 380: ARTIFICIAL INTELLIGENCE FIRST ORDER LOGIC. Santiago Ontañón

CS 380: ARTIFICIAL INTELLIGENCE FIRST ORDER LOGIC. Santiago Ontañón CS 380: ARTIFICIAL INTELLIGENCE FIRST ORDER LOGIC Santiago Ontañón so367@drexel.edu Pros and cons of propositional logic Propositional logic is declarative: pieces of syntax correspond to facts Propositional

More information

Announcements. Today s Menu

Announcements. Today s Menu Announcements Reading Assignment: > Nilsson chapters 13-14 Announcements: > LISP and Extra Credit Project Assigned Today s Handouts in WWW: > Homework 10-13 > Outline for Class 26 > www.mil.ufl.edu/eel5840

More information

Agents that reason logically

Agents that reason logically Artificial Intelligence Sanguk Noh Logical Agents Agents that reason logically A Knowledge-Based Agent. function KB-Agent (percept) returns an action Tell(KB, Make-Percept-Sentence(percept,t)) action Ask(KB,

More information

Propositional Logic: Review

Propositional Logic: Review Propositional Logic: Review Propositional logic Logical constants: true, false Propositional symbols: P, Q, S,... (atomic sentences) Wrapping parentheses: ( ) Sentences are combined by connectives:...and...or

More information

AI Programming CS S-09 Knowledge Representation

AI Programming CS S-09 Knowledge Representation AI Programming CS662-2013S-09 Knowledge Representation David Galles Department of Computer Science University of San Francisco 09-0: Overview So far, we ve talked about search, which is a means of considering

More information

First-Order Logic. Chapter 8

First-Order Logic. Chapter 8 First-Order Logic Chapter 8 1 Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL 2 Pros and cons of propositional logic Propositional logic is declarative

More information

Logic. (Propositional Logic)

Logic. (Propositional Logic) Logic (Propositional Logic) 1 REPRESENTING KNOWLEDGE: LOGIC Logic is the branch of mathematics / philosophy concerned with knowledge and reasoning Aristotle distinguished between three types of arguments:

More information

First-Order Logic. Chapter 8

First-Order Logic. Chapter 8 First-Order Logic Chapter 8 Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL Pros and cons of propositional logic Propositional logic is declarative

More information

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof

More information

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim INF5390 Kunstig intelligens Logical Agents Roar Fjellheim Outline Knowledge-based agents The Wumpus world Knowledge representation Logical reasoning Propositional logic Wumpus agent Summary AIMA Chapter

More information

Logical Agents. Administrative. Thursday: Midterm 1, 7p-9p. Next Tuesday: DOW1013: Last name A-M DOW1017: Last name N-Z

Logical Agents. Administrative. Thursday: Midterm 1, 7p-9p. Next Tuesday: DOW1013: Last name A-M DOW1017: Last name N-Z Logical Agents Mary Herchenhahn, mary-h.com EECS 492 February 2 nd, 2010 Administrative Thursday: Midterm 1, 7p-9p DOW1013: Last name A-M DOW1017: Last name N-Z Next Tuesday: PS2 due PS3 distributed---

More information

Knowledge Representation using First-Order Logic (Part III)

Knowledge Representation using First-Order Logic (Part III) Knowledge Representation using First-Order Logic (Part III) This lecture: R&N Chapters 8, 9 Next lecture: Chapter 13; Chapter 14.1-14.2 (Please read lecture topic material before and after each lecture

More information

Propositions. c D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 5.1, Page 1

Propositions. c D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 5.1, Page 1 Propositions An interpretation is an assignment of values to all variables. A model is an interpretation that satisfies the constraints. Often we don t want to just find a model, but want to know what

More information

Knowledge Representation and Reasoning

Knowledge Representation and Reasoning Knowledge Representation and Reasoning Geraint A. Wiggins Professor of Computational Creativity Department of Computer Science Vrije Universiteit Brussel Objectives Knowledge Representation in Logic The

More information

Propositional Logic Part 1

Propositional Logic Part 1 Propositional Logic Part 1 Yingyu Liang yliang@cs.wisc.edu Computer Sciences Department University of Wisconsin, Madison [Based on slides from Louis Oliphant, Andrew Moore, Jerry Zhu] slide 1 5 is even

More information

Knowledge Representation Logic and Inference Propositional Logic First-order logic Vumpus World

Knowledge Representation Logic and Inference Propositional Logic First-order logic Vumpus World Knowledge Representation Logic and Inference Propositional Logic First-order logic Vumpus World 1 Assume that We design an intelligent agent (travel agent, driving agent, ) What is an intelligent agent?

More information

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof

More information

First Order Logic: Syntax and Semantics

First Order Logic: Syntax and Semantics CS1081 First Order Logic: Syntax and Semantics COMP30412 Sean Bechhofer sean.bechhofer@manchester.ac.uk Problems Propositional logic isn t very expressive As an example, consider p = Scotland won on Saturday

More information

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1 Přednáška 12 Důkazové kalkuly Kalkul Hilbertova typu 11/29/2006 Hilbertův kalkul 1 Formal systems, Proof calculi A proof calculus (of a theory) is given by: A. a language B. a set of axioms C. a set of

More information

First-Order Logic Chap8 1. Pros and Cons of Prop. Logic

First-Order Logic Chap8 1. Pros and Cons of Prop. Logic Chapter8 First-Order Logic 20070503 Chap8 1 Pros and Cons of Prop. Logic PL is declarative Knowledge and inference are separate and inference is entirely domain-independent. PL is compositional Meaning

More information

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows. Chapter 1 Logic 1.1 Introduction and Definitions Definitions. A sentence (statement, proposition) is an utterance (that is, a string of characters) which is either true (T) or false (F). A predicate is

More information

Proseminar on Semantic Theory Fall 2013 Ling 720 First Order (Predicate) Logic: Syntax and Natural Deduction 1

Proseminar on Semantic Theory Fall 2013 Ling 720 First Order (Predicate) Logic: Syntax and Natural Deduction 1 First Order (Predicate) Logic: Syntax and Natural Deduction 1 A Reminder of Our Plot I wish to provide some historical and intellectual context to the formal tools that logicians developed to study the

More information

THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16)

THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16) THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16) FOL: A language to formulate knowledge Logic is the study of entailment relationslanguages, truth conditions and rules of inference. FOL or Predicate

More information

Discrete Mathematics and Its Applications

Discrete Mathematics and Its Applications Discrete Mathematics and Its Applications Lecture 1: The Foundations: Logic and Proofs (1.3-1.5) MING GAO DASE @ ECNU (for course related communications) mgao@dase.ecnu.edu.cn Sep. 19, 2017 Outline 1 Logical

More information

(Part II) Reading: R&N Chapters 8, 9

(Part II) Reading: R&N Chapters 8, 9 Knowledge Representation using First-Order Logic (Part II) Reading: R&N Chapters 8, 9 Outline Review: KB = S is equivalent to = (KB S) So what does {} = S mean? Review: Follows, Entails, Derives Follows:

More information

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Description Logics. Foundations of Propositional Logic.   franconi. Enrico Franconi (1/27) Description Logics Foundations of Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester (2/27) Knowledge

More information

CS 380: ARTIFICIAL INTELLIGENCE PREDICATE LOGICS. Santiago Ontañón

CS 380: ARTIFICIAL INTELLIGENCE PREDICATE LOGICS. Santiago Ontañón CS 380: RTIFICIL INTELLIGENCE PREDICTE LOGICS Santiago Ontañón so367@drexeledu Summary of last day: Logical gents: The can reason from the knowledge they have They can make deductions from their perceptions,

More information

Predicate Logic: Sematics Part 1

Predicate Logic: Sematics Part 1 Predicate Logic: Sematics Part 1 CS402, Spring 2018 Shin Yoo Predicate Calculus Propositional logic is also called sentential logic, i.e. a logical system that deals with whole sentences connected with

More information

CS 380: ARTIFICIAL INTELLIGENCE INFERENCE IN PROPOSITIONAL LOGIC

CS 380: ARTIFICIAL INTELLIGENCE INFERENCE IN PROPOSITIONAL LOGIC CS 380: ARTIFICIAL INTELLIGENCE INFERENCE IN PROPOSITIONAL LOGIC 11/11/2013 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2013/cs380/intro.html Summary of last day: Logic:

More information

CS 380: ARTIFICIAL INTELLIGENCE

CS 380: ARTIFICIAL INTELLIGENCE CS 380: RTIFICIL INTELLIGENCE PREDICTE LOGICS 11/8/2013 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2013/cs380/intro.html Summary of last day: Logical gents: The can

More information

CS 4700: Artificial Intelligence

CS 4700: Artificial Intelligence CS 4700: Foundations of Artificial Intelligence Fall 2017 Instructor: Prof. Haym Hirsh Lecture 12 Prelim Tuesday, March 21 8:40-9:55am Statler Auditorium Homework 2 To be posted on Piazza 4701 Projects:

More information

Knowledge based Agents

Knowledge based Agents Knowledge based Agents Shobhanjana Kalita Dept. of Computer Science & Engineering Tezpur University Slides prepared from Artificial Intelligence A Modern approach by Russell & Norvig Knowledge Based Agents

More information

Propositional Logic: Logical Agents (Part I)

Propositional Logic: Logical Agents (Part I) Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter 7.1-7.4 (this lecture, Part I) Chapter 7.5 (next lecture, Part II) Next lecture topic: First-order

More information

MAI0203 Lecture 7: Inference and Predicate Calculus

MAI0203 Lecture 7: Inference and Predicate Calculus MAI0203 Lecture 7: Inference and Predicate Calculus Methods of Artificial Intelligence WS 2002/2003 Part II: Inference and Knowledge Representation II.7 Inference and Predicate Calculus MAI0203 Lecture

More information

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001 Logic Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001 Last Lecture Games Cont. α-β pruning Outline Games with chance, e.g. Backgammon Logical Agents and thewumpus World

More information

Reasoning. Inference. Knowledge Representation 4/6/2018. User

Reasoning. Inference. Knowledge Representation 4/6/2018. User Reasoning Robotics First-order logic Chapter 8-Russel Representation and Reasoning In order to determine appropriate actions to take, an intelligent system needs to represent information about the world

More information

First Order Logic. Philipp Koehn. 8 October 2015

First Order Logic. Philipp Koehn. 8 October 2015 First Order Logic Philipp Koehn 8 October 2015 Wittgenstein: Tractatus Logico-Philosophicus 1 1. The world is everything that is the case. 2. What is the case (a fact) is the existence of states of affairs.

More information

G52DOA - Derivation of Algorithms Predicate Logic

G52DOA - Derivation of Algorithms Predicate Logic G52DOA - Derivation of Algorithms Predicate Logic Venanzio Capretta Predicate Logic So far, we studied propositional logic, in which we started with unspecified propositional variables A, B, C, and combined

More information

First-order logic. Chapter 8. Chapter 8 1

First-order logic. Chapter 8. Chapter 8 1 First-order logic Chapter 8 Chapter 8 1 Outline Why FOL? Syntax and semantics of FOL Fun with sentences Wumpus world in FOL Chapter 8 2 Pros and cons of propositional logic Propositional logic is declarative:

More information

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) B.Y. Choueiry 1 Instructor s notes #12 Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) Introduction to Artificial Intelligence CSCE 476-876, Fall 2018 URL: www.cse.unl.edu/ choueiry/f18-476-876

More information

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference quantifiers x P(x) P(x) is true for every x in the domain read as for all x, P of x x P x There is an x in the

More information

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic CS 103 Discrete Structures Chapter 1 Propositional Logic Chapter 1.1 Propositional Logic 1 1.1 Propositional Logic Definition: A proposition :is a declarative sentence (that is, a sentence that declares

More information

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017 3. The Logic of Quantified Statements Summary Aaron Tan 28 31 August 2017 1 3. The Logic of Quantified Statements 3.1 Predicates and Quantified Statements I Predicate; domain; truth set Universal quantifier,

More information

Logical Agents. Santa Clara University

Logical Agents. Santa Clara University Logical Agents Santa Clara University Logical Agents Humans know things Humans use knowledge to make plans Humans do not act completely reflexive, but reason AI: Simple problem-solving agents have knowledge

More information

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier Section 1.4 Section Summary Predicate logic Quantifiers Universal Quantifier Existential Quantifier Negating Quantifiers De Morgan s Laws for Quantifiers Translating English to Logic Propositional Logic

More information

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR Last time Expert Systems and Ontologies oday Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof theory Natural

More information

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14 0/0/4 Knowledge based agents Logical Agents Agents need to be able to: Store information about their environment Update and reason about that information Russell and Norvig, chapter 7 Knowledge based agents

More information

Propositional and First-Order Logic

Propositional and First-Order Logic Propositional and First-Order Logic Chapter 7.4 7.8, 8.1 8.3, 8.5 Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer Logic roadmap overview Propositional logic (review) Problems with

More information

Logical Agents. Outline

Logical Agents. Outline Logical Agents *(Chapter 7 (Russel & Norvig, 2004)) Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability

More information

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B Discrete Math Review Discrete Math Review (Rosen, Chapter 1.1 1.7, 5.5) TOPICS Sets and Functions Propositional and Predicate Logic Logical Operators and Truth Tables Logical Equivalences and Inference

More information

Logic. Stephen G. Ware CSCI 4525 / 5525

Logic. Stephen G. Ware CSCI 4525 / 5525 Logic Stephen G. Ware CSCI 4525 / 5525 Logic How can we represent knowledge about the world in a general, reusable way? How can we use existing knowledge to gain new knowledge? Problem Solving Approaches

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Bernhard Nebel Albert-Ludwigs-Universität Freiburg May 17, 2016

More information

CSC242: Intro to AI. Lecture 11. Tuesday, February 26, 13

CSC242: Intro to AI. Lecture 11. Tuesday, February 26, 13 CSC242: Intro to AI Lecture 11 Propositional Inference Propositional Inference Factored Representation Splits a state into variables (factors, attributes, features, things you know ) that can have values

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard, Maren Bennewitz, and Marco Ragni Albert-Ludwigs-Universität Freiburg Contents 1 Agents

More information

Principles of Intelligent Systems: Situation Calculus

Principles of Intelligent Systems: Situation Calculus Principles of Intelligent Systems: Situation Calculus Lecture 11 These slides are based on Chapters 8 and 10 of Russell and Norvig s Artificial Intelligence: A modern approach (http://aima.eecs.berkeley.edu/slides-pdf/)

More information

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference Outline Logical Agents ECE57 Applied Artificial Intelligence Spring 007 Lecture #6 Logical reasoning Propositional Logic Wumpus World Inference Russell & Norvig, chapter 7 ECE57 Applied Artificial Intelligence

More information

CS 771 Artificial Intelligence. Propositional Logic

CS 771 Artificial Intelligence. Propositional Logic CS 771 Artificial Intelligence Propositional Logic Why Do We Need Logic? Problem-solving agents were very inflexible hard code every possible state E.g., in the transition of 8-puzzle problem, knowledge

More information

First-Order Logic. Michael Rovatsos. University of Edinburgh R&N: February Informatics 2D

First-Order Logic. Michael Rovatsos. University of Edinburgh R&N: February Informatics 2D First-Order Logic R&N: 8.1-8.3 Michael Rovatsos University of Edinburgh 4 February 2016 Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Pros and cons of propositional logic Propositional

More information

Automated Reasoning Lecture 5: First-Order Logic

Automated Reasoning Lecture 5: First-Order Logic Automated Reasoning Lecture 5: First-Order Logic Jacques Fleuriot jdf@inf.ac.uk Recap Over the last three lectures, we have looked at: Propositional logic, semantics and proof systems Doing propositional

More information

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system): Logic Knowledge-based agents Inference engine Knowledge base Domain-independent algorithms Domain-specific content Knowledge base (KB) = set of sentences in a formal language Declarative approach to building

More information

Propositional Logic: Logical Agents (Part I)

Propositional Logic: Logical Agents (Part I) Propositional Logic: Logical Agents (Part I) First Lecture Today (Tue 21 Jun) Read Chapters 1 and 2 Second Lecture Today (Tue 21 Jun) Read Chapter 7.1-7.4 Next Lecture (Thu 23 Jun) Read Chapters 7.5 (optional:

More information

7.5.2 Proof by Resolution

7.5.2 Proof by Resolution 137 7.5.2 Proof by Resolution The inference rules covered so far are sound Combined with any complete search algorithm they also constitute a complete inference algorithm However, removing any one inference

More information

Lecture 8: (Predicate) First Order Logic

Lecture 8: (Predicate) First Order Logic Lecture 8: (Predicate) First Order Logic CS 580 (001) - Spring 2018 Amarda Shehu Department of Computer Science George Mason University, Fairfax, VA, USA April 04, 2018 Amarda Shehu (580) 1 1 Outline of

More information

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom. Knowledge representation Introduction Knowledge is the progression that starts with data which s limited utility. Data when processed become information, information when interpreted or evaluated becomes

More information

Predicate Calculus lecture 1

Predicate Calculus lecture 1 Predicate Calculus lecture 1 Section 1.3 Limitation of Propositional Logic Consider the following reasoning All cats have tails Gouchi is a cat Therefore, Gouchi has tail. MSU/CSE 260 Fall 2009 1 MSU/CSE

More information

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional) Discrete Math Review Discrete Math Review (Rosen, Chapter 1.1 1.6) TOPICS Propositional Logic Logical Operators Truth Tables Implication Logical Equivalence Inference Rules What you should know about propositional

More information

Inference in Propositional Logic

Inference in Propositional Logic Inference in Propositional Logic Deepak Kumar November 2017 Propositional Logic A language for symbolic reasoning Proposition a statement that is either True or False. E.g. Bryn Mawr College is located

More information

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit: Three days of interesting talks & workshops from industry experts across Australia Explore new computing topics Network with students & employers in Brisbane Price: $25 (incl. T-Shirt, morning tea and

More information

Introduction to Sets and Logic (MATH 1190)

Introduction to Sets and Logic (MATH 1190) Introduction to Sets Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics Statistics York University Sept 18, 2014 Outline 1 2 Tautologies Definition A tautology is a compound proposition

More information

Logic Background (1A) Young W. Lim 12/14/15

Logic Background (1A) Young W. Lim 12/14/15 Young W. Lim 12/14/15 Copyright (c) 2014-2015 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any

More information

Lecture Overview [ ] Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 6. Motivation. Logical Agents

Lecture Overview [ ] Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 6. Motivation. Logical Agents Lecture Overview [7.1-7.4] COMP 3501 / COMP 4704-4 Lecture 6 Prof. JGH 318 Logical Agents Wumpus World Propositional Logic Inference Theorem Proving via model checking Motivation Existing techniques help

More information

First-order logic. Chapter 8. Chapter 8 1

First-order logic. Chapter 8. Chapter 8 1 First-order logic Chapter 8 Chapter 8 1 (Slides borrowed from Stuart Russel: http://aima.eecs.berkeley.edu/slides-tex/) Chapter 8 2 First-order logic Whereas propositional logic assumes world contains

More information

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018

More information

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes: Logic Logic is a discipline that studies the principles and methods used in correct reasoning It includes: A formal language for expressing statements. An inference mechanism (a collection of rules) to

More information

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook) Lecture 2 Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits Reading (Epp s textbook) 2.1-2.4 1 Logic Logic is a system based on statements. A statement (or

More information

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel Foundations of AI 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard and Bernhard Nebel Contents Agents that think rationally The wumpus world Propositional logic: syntax and semantics

More information

Propositional Logic: Part II - Syntax & Proofs 0-0

Propositional Logic: Part II - Syntax & Proofs 0-0 Propositional Logic: Part II - Syntax & Proofs 0-0 Outline Syntax of Propositional Formulas Motivating Proofs Syntactic Entailment and Proofs Proof Rules for Natural Deduction Axioms, theories and theorems

More information

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas. 1 Chapter 1 Propositional Logic Mathematical logic studies correct thinking, correct deductions of statements from other statements. Let us make it more precise. A fundamental property of a statement is

More information

Computational Logic. Recall of First-Order Logic. Damiano Zanardini

Computational Logic. Recall of First-Order Logic. Damiano Zanardini Computational Logic Recall of First-Order Logic Damiano Zanardini UPM European Master in Computational Logic (EMCL) School of Computer Science Technical University of Madrid damiano@fi.upm.es Academic

More information

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics CSC 224/226 Notes Packet #2: Set Theory & Predicate Calculus Barnes Packet #2: Set Theory & Predicate Calculus Applied Discrete Mathematics Table of Contents Full Adder Information Page 1 Predicate Calculus

More information

RN, Chapter 8 Predicate Calculus 1

RN, Chapter 8 Predicate Calculus 1 Predicate Calculus 1 RN, Chapter 8 Logical Agents Reasoning [Ch 6] Propositional Logic [Ch 7] Predicate Calculus Representation [Ch 8] Syntax, Semantics, Expressiveness Example: Circuits Inference [Ch

More information

Guest Speaker. CS 416 Artificial Intelligence. First-order logic. Diagnostic Rules. Causal Rules. Causal Rules. Page 1

Guest Speaker. CS 416 Artificial Intelligence. First-order logic. Diagnostic Rules. Causal Rules. Causal Rules. Page 1 Page 1 Guest Speaker CS 416 Artificial Intelligence Lecture 13 First-Order Logic Chapter 8 Topics in Optimal Control, Minimax Control, and Game Theory March 28 th, 2 p.m. OLS 005 Onesimo Hernandez-Lerma

More information

Introduction to Intelligent Systems

Introduction to Intelligent Systems Logical Agents Objectives Inference and entailment Sound and complete inference algorithms Inference by model checking Inference by proof Resolution Forward and backward chaining Reference Russel/Norvig:

More information

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic Propositional logic Logical connectives Rules for wffs Truth tables for the connectives Using Truth Tables to evaluate

More information