Propositional Logic: Semantics and an Example

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

Propositional Logic: Bottom-Up Proofs

Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs

Reasoning Under Uncertainty: Introduction to Probability

Logic: Resolution Proofs; Datalog

Reasoning Under Uncertainty: Introduction to Probability

Logic: Bottom-up & Top-down proof procedures

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

Chapter 5: Propositions and Inference. c D. Poole, A. Mackworth 2010, W. Menzel 2015 Artificial Intelligence, Chapter 5, Page 1

Chapters 2&3: A Representation and Reasoning System

Reasoning Under Uncertainty: Belief Network Inference

Contents Chapters 2 & 3

Logic: Top-down proof procedure and Datalog

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

Announcements. Assignment 5 due today Assignment 6 (smaller than others) available sometime today Midterm: 27 February.

Individuals and Relations

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Logic: Propositional Logic (Part I)

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

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

Logic: Intro & Propositional Definite Clause Logic

Reasoning Under Uncertainty: Conditional Probability

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

Propositional Logic: Review

Künstliche Intelligenz

Inference in Propositional Logic

Agents that reason logically

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

CSCI 5582 Artificial Intelligence. Today 9/28. Knowledge Representation. Lecture 9

Logic I - Session 22. Meta-theory for predicate logic

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

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

Artificial Intelligence. Propositional logic

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

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

AMTH140 Lecture 8. Symbolic Logic

How to determine if a statement is true or false. Fuzzy logic deal with statements that are somewhat vague, such as: this paint is grey.

Foundations of Artificial Intelligence

Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World

CS 730/730W/830: Intro AI

Knowledge based Agents

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

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010

First Order Logic: Syntax and Semantics

Logical Inference. Artificial Intelligence. Topic 12. Reading: Russell and Norvig, Chapter 7, Section 5

Logical Agents. Santa Clara University

Introduction to Intelligent Systems

Propositional Logic: Models and Proofs

KB Agents and Propositional Logic

Introduction to Artificial Intelligence. Logical Agents

Logical Agents (I) Instructor: Tsung-Che Chiang

Chapter 4: Classical Propositional Semantics

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

Logical Agents. September 14, 2004

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

Propositional Logic Part 1

Introduction to Intelligent Systems

Advanced Topics in LP and FP

First Order Logic: Syntax and Semantics

Intelligent Agents. Pınar Yolum Utrecht University

DISCRETE STRUCTURES WEEK5 LECTURE1

Logic for Computer Science - Week 4 Natural Deduction

PL: Truth Trees. Handout Truth Trees: The Setup

Propositional logic II.

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

Kecerdasan Buatan M. Ali Fauzi

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World

Tecniche di Verifica. Introduction to Propositional Logic

CS 4700: Artificial Intelligence

Overview. I Review of natural deduction. I Soundness and completeness. I Semantics of propositional formulas. I Soundness proof. I Completeness proof.

Logical Agents. Outline

Propositional Logic: Methods of Proof (Part II)

CS156: The Calculus of Computation

Propositional Logic: Logical Agents (Part I)

Learning Goals of CS245 Logic and Computation

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Equational Logic and Term Rewriting: Lecture I

a. ~p : if p is T, then ~p is F, and vice versa

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz )

2 Truth Tables, Equivalences and the Contrapositive

A brief introduction to Logic. (slides from

Logic: Propositional Logic Truth Tables

Propositional Logic: Methods of Proof (Part II)

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Propositional Logic: Methods of Proof. Chapter 7, Part II

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

Propositional Resolution Part 1. Short Review Professor Anita Wasilewska CSE 352 Artificial Intelligence

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

CS 771 Artificial Intelligence. Propositional Logic

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

Logic I - Session 10 Thursday, October 15,

Rule-Based Classifiers

Semantics and Pragmatics of NLP

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

Deductive Systems. Lecture - 3

Artificial Intelligence Chapter 7: Logical Agents

Propositional Logic 1

Recitation Week 3. Taylor Spangler. January 23, 2012

Transcription:

Propositional Logic: Semantics and an Example CPSC 322 Logic 2 Textbook 5.2 Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 1

Lecture Overview 1 Recap: Syntax 2 Propositional Definite Clause Logic: Semantics 3 Using Logic to Model the World 4 Proofs Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 2

Propositional Definite Clauses: Syntax Definition (atom) An atom is a symbol starting with a lower case letter Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 3

Propositional Definite Clauses: Syntax Definition (atom) An atom is a symbol starting with a lower case letter Definition (body) A body is an atom or is of the form b 1 b 2 where b 1 and b 2 are bodies. Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 3

Propositional Definite Clauses: Syntax Definition (atom) An atom is a symbol starting with a lower case letter Definition (body) A body is an atom or is of the form b 1 b 2 where b 1 and b 2 are bodies. Definition (definite clause) A definite clause is an atom or is a rule of the form h b where h is an atom and b is a body. (Read this as h if b. ) Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 3

Propositional Definite Clauses: Syntax Definition (atom) An atom is a symbol starting with a lower case letter Definition (body) A body is an atom or is of the form b 1 b 2 where b 1 and b 2 are bodies. Definition (definite clause) A definite clause is an atom or is a rule of the form h b where h is an atom and b is a body. (Read this as h if b. ) Definition (knowledge base) A knowledge base is a set of definite clauses Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 3

Lecture Overview 1 Recap: Syntax 2 Propositional Definite Clause Logic: Semantics 3 Using Logic to Model the World 4 Proofs Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 4

Propositional Definite Clauses: Semantics Semantics allows you to relate the symbols in the logic to the domain you re trying to model. Definition (interpretation) An interpretation I assigns a truth value to each atom. Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 5

Propositional Definite Clauses: Semantics Semantics allows you to relate the symbols in the logic to the domain you re trying to model. Definition (interpretation) An interpretation I assigns a truth value to each atom. We can use the interpretation to determine the truth value of clauses and knowledge bases: Definition (truth values of statements) A body b 1 b 2 is true in I if and only if b 1 is true in I and b 2 is true in I. A rule h b is false in I if and only if b is true in I and h is false in I. A knowledge base KB is true in I if and only if every clause in KB is true in I. Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 5

Models and Logical Consequence Definition (model) A model of a set of clauses is an interpretation in which all the clauses are true. Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 6

Models and Logical Consequence Definition (model) A model of a set of clauses is an interpretation in which all the clauses are true. Definition (logical consequence) If KB is a set of clauses and g is a conjunction of atoms, g is a logical consequence of KB, written KB = g, if g is true in every model of KB. we also say that g logically follows from KB, or that KB entails g. In other words, KB = g if there is no interpretation in which KB is true and g is false. Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 6

Example: Models p q. KB = q. r s. p q r s I 1 true true true true Which interpretations are models? I 2 false false false false I 3 true true false false I 4 true true true false I 5 true true false true Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 7

Example: Models p q. KB = q. r s. p q r s I 1 true true true true is a model of KB I 2 false false false false not a model of KB I 3 true true false false is a model of KB I 4 true true true false is a model of KB I 5 true true false true not a model of KB Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 7

Example: Models p q. KB = q. r s. p q r s I 1 true true true true is a model of KB I 2 false false false false not a model of KB I 3 true true false false is a model of KB I 4 true true true false is a model of KB I 5 true true false true not a model of KB Which of the following is true? KB = q, KB = p, KB = s, KB = r Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 7

Example: Models p q. KB = q. r s. p q r s I 1 true true true true is a model of KB I 2 false false false false not a model of KB I 3 true true false false is a model of KB I 4 true true true false is a model of KB I 5 true true false true not a model of KB Which of the following is true? KB = q, KB = p, KB = s, KB = r KB = q, KB = p, KB = s, KB = r Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 7

Lecture Overview 1 Recap: Syntax 2 Propositional Definite Clause Logic: Semantics 3 Using Logic to Model the World 4 Proofs Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 8

User s view of Semantics 1 Choose a task domain: intended interpretation. 2 Associate an atom with each proposition you want to represent. 3 Tell the system clauses that are true in the intended interpretation: axiomatizing the domain. 4 Ask questions about the intended interpretation. 5 If KB = g, then g must be true in the intended interpretation. 6 The user can interpret the answer using their intended interpretation of the symbols. Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 9

Computer s view of semantics The computer doesn t have access to the intended interpretation. All it knows is the knowledge base. The computer can determine if a formula is a logical consequence of KB. If KB = g then g must be true in the intended interpretation. If KB = g then there is a model of KB in which g is false. This could be the intended interpretation. Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 10

Electrical Environment cb 1 outside power s 1 w 1 s 2 w 2 s 3 w 0 w 4 w 3 w 6 w 5 cb 2 off circuit breaker switch on two-way switch l 1 l 2 p 2 light p 1 power outlet Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 11

Representing the Electrical Environment light l 1. light l 2. down s 1. up s 2. up s 3. ok l 1. ok l 2. ok cb 1. ok cb 2. live outside. live l 1 live w 0 live w 0 live w 1 up s 2. live w 0 live w 2 down s 2. live w 1, live w 3 up s 1. live w 2 live w 3 down s 1. live l 2 live w 4. live w 4 live w 3 up s 3. live p 1 live w 3. live w 3 live w 5 ok cb 1. live p 2 live w 6. live w 6 live w 5 ok cb 2. live w 5 live outside. Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 12

Role of semantics In user s mind: l2 broken: light l2 is broken sw3 up: switch is up power: there is power in the building unlit l2: light l2 isn t lit lit l1: light l1 is lit In Computer: l2 broken sw3 up power unlit l2. sw3 up. power lit l1. unlit l2. lit l1. Conclusion: l2 broken The computer doesn t know the meaning of the symbols The user can interpret the symbols using their meaning Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 13

Lecture Overview 1 Recap: Syntax 2 Propositional Definite Clause Logic: Semantics 3 Using Logic to Model the World 4 Proofs Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 14

Proofs A proof is a mechanically derivable demonstration that a formula logically follows from a knowledge base. Given a proof procedure, KB g means g can be derived from knowledge base KB. Recall KB = g means g is true in all models of KB. Definition (soundness) A proof procedure is sound if KB g implies KB = g. Definition (completeness) A proof procedure is complete if KB = g implies KB g. Propositional Logic: Semantics and an Example CPSC 322 Logic 2, Slide 15