Chapter 7 Propositional and Predicate Logic

Similar documents
Propositional Logic: Review

Chapter 22 Lecture. Essential University Physics Richard Wolfson 2 nd Edition. Electric Potential 電位 Pearson Education, Inc.

Revised Dynamic Optimal Training of Three-Layer Neural Network

Chapter 1 Linear Regression with One Predictor Variable

THE LOGIC OF COMPOUND STATEMENTS

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

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

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.

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

Learning Goals of CS245 Logic and Computation

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:

Logic. Propositional Logic: Syntax

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

Digital Integrated Circuits Lecture 5: Logical Effort

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Propositional logic. First order logic. Alexander Clark. Autumn 2014

0 0 = 1 0 = 0 1 = = 1 1 = 0 0 = 1

Chapter 6. Series-Parallel Circuits ISU EE. C.Y. Lee

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

Linear Regression. Applied Linear Regression Models (Kutner, Nachtsheim, Neter, Li) hsuhl (NUK) SDA Regression 1 / 34

生物統計教育訓練 - 課程. Introduction to equivalence, superior, inferior studies in RCT 謝宗成副教授慈濟大學醫學科學研究所. TEL: ext 2015

22c:145 Artificial Intelligence

First Order Logic: Syntax and Semantics

Differential Equations (DE)

EXPERMENT 9. To determination of Quinine by fluorescence spectroscopy. Introduction

Logic - recap. So far, we have seen that: Logic is a language which can be used to describe:

Logic. Propositional Logic: Syntax. Wffs

授課大綱 課號課程名稱選別開課系級學分 結果預視

Propositional Logic: Syntax

Predicate Logic. Andreas Klappenecker

MAI0203 Lecture 7: Inference and Predicate Calculus

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning

Logic. (Propositional Logic)

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

Finite Interval( 有限區間 ) open interval ( a, closed interval [ ab, ] = { xa x b} half open( or half closed) interval. Infinite Interval( 無限區間 )

02 Propositional Logic

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

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

14-A Orthogonal and Dual Orthogonal Y = A X

Logic: The Big Picture

Natural Deduction for Propositional Logic

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

First Order Logic (1A) Young W. Lim 11/18/13

GSAS 安裝使用簡介 楊仲準中原大學物理系. Department of Physics, Chung Yuan Christian University

5.5 Using Entropy to Calculate the Natural Direction of a Process in an Isolated System

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

Logic. Part I: Propositional Logic. Max Schäfer. Formosan Summer School on Logic, Language, and Computation 2010

台灣大學開放式課程 有機化學乙 蔡蘊明教授 本著作除另有註明, 作者皆為蔡蘊明教授, 所有內容皆採用創用 CC 姓名標示 - 非商業使用 - 相同方式分享 3.0 台灣授權條款釋出

邏輯設計 Hw#6 請於 6/13( 五 ) 下課前繳交

Artificial Intelligence. Propositional logic

Propositional Calculus - Hilbert system H Moonzoo Kim CS Division of EECS Dept. KAIST

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

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

Proseminar on Semantic Theory Fall 2013 Ling 720 Propositional Logic: Syntax and Natural Deduction 1

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

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

First-Order Logic (FOL)

Advanced Topics in LP and FP

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning

Propositional Logic Arguments (5A) Young W. Lim 2/23/17

Statistics and Econometrics I

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

相關分析. Scatter Diagram. Ch 13 線性迴歸與相關分析. Correlation Analysis. Correlation Analysis. Linear Regression And Correlation Analysis

Glossary. Mathematics Glossary. Elementary School Level. English Traditional Chinese

Completeness for FOL

1 The Foundation: Logic and Proofs

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

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

國立中正大學八十一學年度應用數學研究所 碩士班研究生招生考試試題

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

Artificial Intelligence Knowledge Representation I

第 3 章有機化學反應種類及酸鹼有機反應. 一 ) 有機化反應的種類及有機反應機制 (organic reactions and their mechanism)

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

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

PHIL 50 - Introduction to Logic

tan θ(t) = 5 [3 points] And, we are given that d [1 points] Therefore, the velocity of the plane is dx [4 points] (km/min.) [2 points] (The other way)

基因演算法 學習速成 南台科技大學電機系趙春棠講解

1 The Foundation: Logic and Proofs

Candidates Performance in Paper I (Q1-4, )

Formal Logic Lecture 11

pseudo-code-2012.docx 2013/5/9

Logic: Propositional Logic (Part I)

數位系統設計 Digital System Design

Statistical Intervals and the Applications. Hsiuying Wang Institute of Statistics National Chiao Tung University Hsinchu, Taiwan

PHI 120 Introductory Logic Consistency of the Calculus

Logical Agents (I) Instructor: Tsung-Che Chiang

PHI7470 Topics in Applied Philosophy: The Philosopher and Sociology

Bound and Free Variables. Theorems and Proofs. More valid formulas involving quantifiers:

Agents that reason logically

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

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

1 dx (5%) andˆ x dx converges. x2 +1 a

原子模型 Atomic Model 有了正確的原子模型, 才會發明了雷射

03 Propositional Logic II

Language of Propositional Logic

Artificial Intelligence Chapter 7: Logical Agents

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.

= lim(x + 1) lim x 1 x 1 (x 2 + 1) 2 (for the latter let y = x2 + 1) lim

185.A09 Advanced Mathematical Logic

Transcription:

Chapter 7 Propositional and Predicate Logic 1

What is Artificial Intelligence? A more difficult question is: What is intelligence? This question has puzzled philosophers, biologists and psychologists for centuries. Artificial Intelligence is easier to define, although there is no standard, accepted definition. 星艦戰將與蝸蟲的學習 In my opinion: weak sub? strong 記憶評判搜尋解答邏輯推理控制學習創作 Fuzzy,NN,GA 2

Chapter 7 Contents What is Logic? Logical Operators Translating between English and Logic Truth Tables Complex Truth Tables Tautology Equivalence Propositional Logic Deduction Predicate Calculus Quantifiers and Properties of logical systems Abduction and inductive reasoning (Modal logic) 3

What is Logic? Reasoning about the validity of arguments. An argument is valid if its conclusions follow logically from its premises even if the argument doesn t actually reflect the real world: All lemons are blue Mary is a lemon Therefore, Mary is blue. 4

Logical Operators And Λ Or V Not Implies (if then ) Iff (if and only if) 5

Translating between English and Logic Facts and rules need to be translated into logical notation. For example: It is Raining and it is Thursday: R Λ T R means It is Raining, T means it is Thursday. 6

Translating between English and Logic More complex sentences need predicates. E.g.: It is raining in New York: R(N) Could also be written N(R), or even just R. It is important to select the correct level of detail for the concepts you want to reason about. 7

Truth Tables Tables that show truth values for all possible inputs to a logical operator. For example: A truth table shows the semantics of a logical operator. 8

Complex Truth Tables We can produce truth tables for complex logical expressions, which show the overall value of the expression for all possible combinations of variables: 9

Tautology ( 恆真式 ) The expression A v A is a tautology. This means it is always true, regardless of the value of A. A is a tautology: this is written A tautology is true under any interpretation. An expression which is false under any interpretation is contradictory. 一切數學證明的動作來自 : (P ^(P Q) Q) 或者強調那是動作的結果 : P ^(P Q) Q 10

Equivalence Two expressions are equivalent if they always have the same logical value under any interpretation: A Λ B B Λ A Equivalences can be proven by examining truth tables. 11

A v A A A Λ A A Some Useful Equivalences A Λ (B Λ C) (A Λ B) Λ C A v (B v C) (A v B) v C A Λ (B v C) (A Λ B) v (A Λ C) A Λ (A v B) A A v (A Λ B) A A Λ true A A v true true A Λ false false A v false A 12

Propositional Logic ( 命題邏輯 ) Propositional logic is a logical system. It deals with propositions. Inference (what results from assumptions?) Reasoning (is it true or not?) Propositional Calculus is the language we use to reason about propositional logic. A sentence in propositional logic is called a well-formed formula (wff). Wff: English logic sentence 13

Propositional Logic The following are wff s: P, Q, R true, false (A) A A Λ B A v B A B A B 定義 P Q P V Q ( 真值表比對 ) e.g. Tall ^ Strong Ball_Player (Tall ^ Strong) V Ball_Player Tall V Strong V Ball_Player 14

Recall: Chapter 7 Contents What is Logic? Logical Operators Translating between English and Logic Truth Tables Complex Truth Tables Tautology Equivalence Propositional Logic Deduction Predicate Calculus Quantifiers and Properties of logical systems Abduction and inductive reasoning (Modal logic) 15

Deduction The process of deriving a conclusion from a set of assumptions. Use a set of rules, such as: A A B 7.11(p.191 ~ p.195) B (modus ponens 拉丁文 : 推論法 ) If we deduce a conclusion C from a set of assumptions, we write: {A 1, A 2,, A n } C 16

Deduction - Example (1) 以推導方式取代真值表驗證, 更簡單而有意義 ; (2) 但盲目的推導方法類似盲目搜尋, 在 chap 8 有改良的方法 17

Predicate Calculus ( 述語推算 ) Predicate Calculus extends the syntax of propositional calculus with predicates and quantifiers: P(X) P is a predicate. First Order Predicate Calculus (FOPC) allows predicates to apply to objects or terms, but not functions or predicates. 18

Quantifiers and -For all: xp(x) is read For all x es, P (x) is true. -There Exists: x P(x) is read there exists an x such that P(x) is true. Relationship between the quantifiers: x P(x) ( x) P(x) If There exists an x for which P holds, then it is not true that for all x P does not hold. x Like(x, War) ( x) Like(x, War) 19

Deduction over FOPC --- Search Dog(X) ^ Meets(X,Y)^Dislikes(X,Y) Barks_at(X,Y) Close_to(Z, DormG) Meets(Snoopy, Z) Man(W) Dislikes(Snoopy, W) Man(John), Dog(Snoopy), Close_to(John,DormG) {John/W} Dog(X) ^ Meets(X,Y)^Dislikes(X,Y) Barks_at(X,Y) Close_to(Z, DormG) Meets(Snoopy, Z) Dislikes(Snoopy, John) Dog(Snoopy), Close_to(John,DormG)?? Barks_at(Snoopy,John) 20

Recall: Deduction over FOPC --- Goal Tree Barks_at(Snoopy,John)? {Snoopy/X} {John/Y} {John/Y} Dog(Snoopy) Meets(Snoopy,John) Dislikes(Snoopy,John) {John/Z} {John/W} Yes Close_to(John,DormG) Man(John) Other_Resons Yes Yes 21

Properties of Logical Systems Soundness( 可靠 ): Is every theorem valid? Completeness( 週延 ): Is every tautology a theorem? Decidability( 可推導 ): Does an algorithm exist that will determine if a wff is valid? Monotonicity( 不受破壞 ): Can a valid logical proof be made invalid by adding additional premises or assumptions? 22

Abduction and Inductive Reasoning Abduction: B A B A 過度演繹 Not logically valid, BUT can still be useful. In fact, it models the way humans reason all the time: Every non-flying bird I ve seen before has been a penguin; hence that non-flying bird must be a penguin. Not valid reasoning, but likely to work in many situations. 23

Skip: Modal logic Modal logic is a higher order logic. Allows us to reason about certainties, and possible worlds. If a statement A is contingent then we say that A is possibly true, which is written: A If A is non-contingent, then it is necessarily true, which is written: A cf. fuzzy logic to appear later 24