Propositional Logic: Review

Similar documents
Artificial Intelligence Knowledge Representation I

Propositional and First-Order Logic

Logic. (Propositional Logic)

Propositional and First-Order Logic

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

Inference in Propositional Logic

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

Advanced Topics in LP and FP

Intelligent Systems. Propositional Logic. Dieter Fensel and Dumitru Roman. Copyright 2008 STI INNSBRUCK

Artificial Intelligence. Propositional logic

Artificial Intelligence. Propositional Logic. Copyright 2011 Dieter Fensel and Florian Fischer

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

15414/614 Optional Lecture 1: Propositional Logic

Knowledge based Agents

CS 7180: Behavioral Modeling and Decision- making in AI

Propositional Logic Part 1

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

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

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

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

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

Propositional Logic. Logic. Propositional Logic Syntax. Propositional Logic

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

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

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

CS 380: ARTIFICIAL INTELLIGENCE

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

Learning Goals of CS245 Logic and Computation

Logical Agents. September 14, 2004

Language of Propositional Logic

Propositional logic II.

Proof Methods for Propositional Logic

CSCI-495 Artificial Intelligence. Lecture 17

Propositional Logic: Models and Proofs

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

AI Programming CS S-09 Knowledge Representation

02 Propositional Logic

MAI0203 Lecture 7: Inference and Predicate Calculus

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

Logic: Propositional Logic (Part I)

Propositional logic (revision) & semantic entailment. p. 1/34

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

Logical Agents (I) Instructor: Tsung-Che Chiang

PROPOSITIONAL CALCULUS

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

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

Natural Deduction for Propositional Logic

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

Introduction to Metalogic

Intelligent Agents. Pınar Yolum Utrecht University

Logic and Inferences

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

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

Deliberative Agents Knowledge Representation I. Deliberative Agents

cis32-ai lecture # 18 mon-3-apr-2006

Propositional Logic: Logical Agents (Part I)

Propositional Logic Language

CS 771 Artificial Intelligence. Propositional Logic

Inference Methods In Propositional Logic

Inference in first-order 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.

First Order Logic: Syntax and Semantics

Logical Agents. Chapter 7

Logical Agent & Propositional Logic

KB Agents and Propositional Logic

Deductive Systems. Lecture - 3

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

Logic. Propositional Logic: Syntax

Artificial Intelligence Chapter 7: Logical Agents

Description Logics. Deduction in Propositional Logic. franconi. Enrico Franconi

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

Logical Agent & Propositional Logic

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim

Inference Methods In Propositional Logic

Chapter 3: Propositional Calculus: Deductive Systems. September 19, 2008

Artificial Intelligence

03 Propositional Logic II

Propositional Logic: Syntax

Logical agents. Chapter 7. Chapter 7 1

Agents that reason logically

Propositional Logic Arguments (5A) Young W. Lim 11/8/16

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

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

Revised by Hankui Zhuo, March 21, Logical agents. Chapter 7. Chapter 7 1

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

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Convert to clause form:

Artificial Intelligence

Propositional Logic Arguments (5A) Young W. Lim 10/11/16

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

Artificial Intelligence Knowledge Representation I

Propositional Resolution Introduction

6. Logical Inference

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

Propositional Reasoning

Class Assignment Strategies

PL: Truth Trees. Handout Truth Trees: The Setup

Logic. Propositional Logic: Syntax. Wffs

Transcription:

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 [conjunction] [disjunction]...implies [implication / conditional]..is equivalent [biconditional]...not [negation] Literal: atomic sentence or negated atomic sentence

Examples of PL sentences (P Q) R If it is hot and humid, then it is raining Q P If it is humid, then it is hot Q It is humid. A better way: Ho = It is hot Hu = It is humid R = It is raining

Propositional logic (PL) A simple language useful for showing key ideas and definitions User defines a set of propositional symbols, like P and Q. User defines the semantics of each propositional symbol: P means It is hot Q means It is humid R means It is raining A sentence (well formed formula) is defined as follows: A symbol is a sentence If S is a sentence, then S is a sentence If S is a sentence, then (~ S) is a sentence If S and T are sentences, then (S T), (S T), (S T), and (S T) are sentences A sentence results from a finite number of applications of the above rules

Some terms The meaning or semantics of a sentence determines its interpretation. Given the truth values of all symbols in a sentence, it can be evaluated to determine its truth value (True or False). A model for a KB is a possible world (assignment of truth values to propositional symbols) in which each sentence in the KB is True.

More terms A valid sentence or tautology is a sentence that is True under all interpretations, no matter what the world is actually like or what the semantics is. Example: It s raining or it s not raining. An inconsistent sentence or contradiction is a sentence that is False under all interpretations. The world is never like what it describes, as in It s raining and it s not raining. P entails Q, written P = Q, means that whenever P is True, so is Q. In other words, all models of P are also models of Q.

The five logical connectives: Truth tables A complex sentence:

Models of complex sentences

Which one do you remember? Equivalences

Inference rules Logical inference is used to create new sentences that logically follow from a given set of predicate calculus sentences (KB). An inference rule is sound if every sentence X produced by an inference rule operating on a KB logically follows from the KB. (That is, the inference rule does not create any contradictions) An inference rule is complete if it is able to produce every expression that logically follows from (is entailed by) the KB. (Note the analogy to complete search algorithms.)

Sound rules of inference Here are some examples of sound rules of inference A rule is sound if its conclusion is true whenever the premise is true Each can be shown to be sound using a truth table RULE PREMISE CONCLUSION Modus Ponens A, A B B And Introduction A, B A B And Elimination A B A Double Negation A A Unit Resolution A B, B A Resolution A B, B C A C

Proving things A proof is a sequence of sentences, where each sentence is either a premise or a sentence derived from earlier sentences in the proof by one of the rules of inference. The last sentence is the theorem (also called goal or query) that we want to prove. Example for the weather problem given above. 1 Hu Premise It is humid 2 Hu Ho Premise If it is humid, it is hot 3 Ho Modus Ponens(1,2) It is hot 4 (Ho Hu) R Premise If it s hot & humid, it s raining 5 Ho Hu And Introduction(1,3) It is hot and humid 6 R Modus Ponens(4,5) It is raining

Entailment and derivation Entailment: KB = Q Q is entailed by KB (a set of premises or assumptions) if and only if there is no logically possible world in which Q is false while all the premises in KB are true. Or, stated positively, Q is entailed by KB if and only if the conclusion is true in every logically possible world in which all the premises in KB are true. Derivation: KB - Q We can derive Q from KB if there is a proof consisting of a sequence of valid inference steps starting from the premises in KB and resulting in Q

Two important properties for inference Soundness: If KB - Q then KB = Q If Q is derived from a set of sentences KB using a given set of rules of inference, then Q is entailed by KB. Hence, inference produces only real entailments, or any sentence that follows deductively from the premises is valid. Completeness: If KB = Q then KB - Q If Q is entailed by a set of sentences KB, then Q can be derived from KB using the rules of inference. Hence, inference produces all entailments, or all valid sentences can be proved from the premises.

Quick and dirty: Resolution 1) Transform set of formulae into conjunctive normal form => set of clauses 2) Add the negated goal/query 3) Apply resolution rule until either - no more application possible or - the empty clause is derived If empty clause can be derived, then the goal follows from the set of formulae!

Propositional logic is a weak language Hard to identify individuals (e.g., Mary, 3) Can t directly talk about properties of individuals or relations between individuals (e.g., Bill is tall ) Generalizations, patterns, regularities can t easily be represented (e.g., all triangles have 3 sides ) First-Order Logic (abbreviated FOL or FOPC) is expressive enough to concisely represent this kind of information FOL adds relations, variables, and quantifiers, e.g., Every elephant is gray : x (elephant(x) gray(x)) There is a white alligator : x (alligator(x) ^ white(x))

Propositional logic: Summary The process of deriving new sentences from old one is called inference. Sound inference processes derives true conclusions given true premises Complete inference processes derive all true conclusions from a set of premises A valid sentence is true in all worlds under all interpretations If an implication sentence can be shown to be valid, then given its premise its consequent can be derived Different logics make different commitments about what the world is made of and what kind of beliefs we can have regarding the facts Logics are useful for the commitments they do not make because lack of commitment gives the knowledge base engineer more freedom Propositional logic commits only to the existence of facts that may or may not be the case in the world being represented It has a simple syntax and simple semantics. It suffices to illustrate the process of inference Propositional logic quickly becomes impractical, even for very small worlds