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

Similar documents
Logic: Propositional Logic Truth Tables

Logic: Propositional Logic Tableaux

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

Logic: Propositional Logic (Part I)

Chapter 4: Classical Propositional Semantics

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

Learning Goals of CS245 Logic and Computation

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

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

Tecniche di Verifica. Introduction to Propositional Logic

15414/614 Optional Lecture 1: Propositional Logic

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

10 Propositional logic

Language of Propositional Logic

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

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

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

PL: Truth Trees. Handout Truth Trees: The Setup

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Logical Structures in Natural Language: First order Logic (FoL)

UNIT-I: Propositional Logic

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

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

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

Ling 130 Notes: Syntax and Semantics of Propositional Logic

Automated Reasoning Lecture 2: Propositional Logic and Natural Deduction

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

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

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

EXERCISE 10 SOLUTIONS

Propositional Logic Language

22c:145 Artificial Intelligence

CITS2211 Discrete Structures. Propositional Logic

Propositional Logic: Syntax

CS156: The Calculus of Computation

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Logical Agents. September 14, 2004

It is not the case that ϕ. p = It is not the case that it is snowing = It is not. r = It is not the case that Mary will go to the party =

First Order Logic: Syntax and Semantics

Natural Deduction for Propositional Logic

LING 106. Knowledge of Meaning Lecture 3-1 Yimei Xiang Feb 6, Propositional logic

03 Propositional Logic II

Logic. Propositional Logic: Syntax

Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading

Advanced Topics in LP and FP

Introduction to Metalogic 1

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Section 1.1: Logical Form and Logical Equivalence

Logic for Computer Science - Week 4 Natural Deduction

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

Propositional Logic (2A) Young W. Lim 11/8/15

Propositional Logic. Yimei Xiang 11 February format strictly follow the laws and never skip any step.

Propositional Logic: Models and Proofs

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Propositional Logic: Review

CSE 20. Lecture 4: Introduction to Boolean algebra. CSE 20: Lecture4

PHIL 50 - Introduction to Logic

Propositional Logic and Semantics

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

TRUTH TABLES LOGIC (CONTINUED) Philosophical Methods

A brief introduction to Logic. (slides from

Logic: First Order Logic

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

Truth-Functional Logic

Logic Background (1A) Young W. Lim 5/14/18

Compound Propositions

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

Propositional Logic. Logic. Propositional Logic Syntax. Propositional Logic

Logic & Logic Agents Chapter 7 (& background)

Propositional Logic. CS 3234: Logic and Formal Systems. Martin Henz and Aquinas Hobor. August 26, Generated on Tuesday 31 August, 2010, 16:54

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

Inference in Propositional Logic

Knowledge Representation. Propositional logic

Normal Forms of Propositional Logic

Proofs Propositions and Calculuses

Logic. Propositional Logic: Syntax. Wffs

Semantics and Pragmatics of NLP

Logic and Inferences

Propositional Logic Logical Implication (4A) Young W. Lim 4/21/17

For all For every For each For any There exists at least one There exists There is Some

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

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

Practice assignment 2

First Order Logic: Syntax and Semantics

Propositional Language - Semantics

Proofs. Joe Patten August 10, 2018

Propositional Logic Part 1

SAT Solvers: Theory and Practice

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

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Knowledge Representation. Propositional logic.

We last time we began introducing equivalency laws.

MCS-236: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, Methods of Proof

Introduction to Intelligent Systems

Logica e Linguaggio. Raffaella Bernardi. March 22, University of Trento

Logic for Computer Science - Week 2 The Syntax of Propositional Logic

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

Mathematical Logic. Introduction to Reasoning and Automated Reasoning. Hilbert-style Propositional Reasoning. Chiara Ghidini. FBK-IRST, Trento, Italy

CHAPTER 2 INTRODUCTION TO CLASSICAL PROPOSITIONAL LOGIC

Transcription:

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning Raffaella Bernardi Università degli Studi di Trento e-mail: bernardi@disi.unitn.it

Contents 1 What we have said last time................................ 4 2 Remind: Propositional Logic: Basic Ideas.................... 5 3 Remind: Language of Propositional Logic.................... 6 4 Reminder: From English to Propositional Logic............... 7 5 Reminder: Semantics: Intuition............................. 8 6 Reminder: Interpretation Function.......................... 9 7 Reminder: Truth Tables.................................... 10 8 Reminder: Model.......................................... 11 9 A formula: Tautology, Contradiction, Satisfiable, Falsifiable..... 12 9.1 Example........................................... 13 10 Tautologies and Contradictions.............................. 14 11 Reminder: exercises....................................... 15 12 An argumentation: Validity................................. 16 13 Example of argumentations................................. 17 13.1 Example........................................... 19 13.2 Exercises.......................................... 20 14 Counter-example.......................................... 21

15 Reminder: exercises....................................... 22 16 Summary of key points..................................... 23

1. What we have said last time Logic Language: syntax, semantics. Reasoning Semantics Meaning of a sentence = Truth value Compositional meaning: truth-functional connectives Interpretation Function: FORM {true, f alse} Reasoning: P remises = α iff W (P remises) W (α) Today we look more into Propositional Logic (PL)

2. Remind: Propositional Logic: Basic Ideas Statements: The elementary building blocks of propositional logic are atomic statements that cannot be decomposed any further: propositions. E.g., The box is red The proof of the pudding is in the eating It is raining and logical connectives and, or, not, by which we can build propositional formulas.

3. Remind: Language of Propositional Logic Alphabet The alphabet of PL consists of: A countable set of propositional symbols: p, q, r,... The logical connectives : (NOT), (AND), (OR), (implication), (double implication). Parenthesis: (,) (they are used to disambiguate the language) Well formed formulas (wff) They are defined recursively 1. a propositional symbol is a wff: 2. if A is a wff then also A is a wff 3. if A and B are wff then also (A B), (A B), (A B) and (A B) are wff 4. nothing else is a wff.

4. Reminder: From English to Propositional Logic Eg. If you don t sleep then you will be tired. Keys: p = you sleep, q= you will be tired. Formula: p q. Exercise I: 1. If it rains while the sun shines, a rainbow will appear 2. Charles comes if Elsa does and the other way around 3. If I have lost if I cannot make a move, then I have lost. 1. (rain sun) rainbow 2. elsa charles 3. ( move lost) lost Use: http://www.earlham.edu/~peters/courses/log/transtip.htm

5. Reminder: Semantics: Intuition Atomic propositions can be true T or false F. The truth value of formulas is determined by the truth values of the atoms (truth value assignment or interpretation). Example: (a b) c: If a and b are false and c is true, then the formula is not true.

6. Reminder: Interpretation Function The interpretation function, denoted by I, can assign true (T) or false (F) to the atomic formulas; for the complex formula they obey the following conditions. Given the formulas P, Q of L: a. I( P ) = T iff I(P ) = F b. I(P Q) = T iff I(P ) = T e I(Q) = T c. I(P Q) = F iff I(P ) = F e I(Q) = F d. I(P Q) = F iff I(P ) = T e I(Q) = F e. I(P Q) = F iff I(P ) = I(Q)

7. Reminder: Truth Tables φ φ I 1 T F I 2 F T (1) φ ψ φ ψ I 1 T T T I 2 T F F I 3 F T F I 4 F F F (1) φ ψ φ ψ I 1 T T T I 2 T F T I 3 F T T I 4 F F F (1) φ ψ φ ψ I 1 T T T I 2 T F F I 3 F T T I 4 F F T (1)

8. Reminder: Model A model consists of two pieces of information: which collection of atomic propositions we are talking about (domain, D), and for each formula which is the appropriate semantic value, this is done by means of a function called interpretation function (I). Thus a model M is a pair: (D, I).

9. A formula: Tautology, Contradiction, Satisfiable, Falsifiable Recall, a formula P is: tautology if for all the interpretations I, I(P ) = T rue (it s always true) contradiction if for all the interpretations I, I(P ) = F alse (is always false) A formula P is: satisfiabiliy if there is at least an interpretation I such that I(P ) = T rue falsifiable if there is at least an interpretation I such that I(P ) = F alse A formula that is false in all interpretation is also called unsatisfiable.

9.1. Example P P P P I 1 T F T I 2 F T T P P is a tautology.

10. Tautologies and Contradictions Build the truth table of p p. It s a contradiction: always false. Build the truth table of (p q) (q p). It s a tautology: always true.

11. Reminder: exercises Build the truth tables for the following formulas and decide whether they are satisfiable, or a tautology or a contradiction. ( A B) ( A B) P (Q R)

12. An argumentation: Validity {P 1,..., P n } = C a valid deductive argumentation is such that its conclusion cannot be false when the premises are true. In other words, there is no interpretation for which the conclusion is false and the premises are true. W (P remise), the set of interpretations for which the premises are all true, and W (C) the set of interpretations for which the conclusion is true: W (P remises) W (C)

13. Example of argumentations Today is Monday or today is Thursday P v Q Today is not Monday not P ================= ===== Today is Thursday Q If today is Thursday, then today I ve a lecture Q --> R Today is Thursday Q =============== ======= Today I ve a lecture R P Q, P = Q Q R, Q = R

Try to build truth tables to verify: P Q, P = Q P Q P Q P Q I 1 T T T F T I 2 T F T F F I 3 F T T T T I 4 F F F T F W (P remesse) W (Q) {I 3 } {I 1, I 3 }

13.1. Example P Q P Q P Q I 1 T T T F T I 2 T F T F F I 3 F T T T T I 4 F F F T F W (P remesse) W (Q) {I 3 } {I 1, I 3 }

13.2. Exercises Check whether the following arguments are valid: If the temperature and air pressure remained constant, there was no rain. The temperature did remain constant. Therefore, if there was rain then the air pressure did not remain constant. If Paul lives in Dublin, he lives in Ireland. Paul lives in Ireland. Therefore Paul lives in Dublin. (i) Give the keys of your formalization using PL; (ii) represent the argument formally, and (iii) Apply the truth table method to prove or disprove the validity of the argument.

14. Counter-example Counterexample an interpretation in which the reasoning does not hold. In other words, an interpretation such that the premises are true and the conclusion is false. Exercise: together Take the previous exercise and build a counter-example if the argumentation is not valid If the temperature and air pressure remained constant, there was no rain. The temperature did remain constant. Therefore, if there was rain then the air pressure did not remain constant. If Paul lives in Dublin, he lives in Ireland. Paul lives in Ireland. Therefore Paul lives in Dublin. Exercises: alone See printed paper (pl3)

15. Reminder: exercises Build the truth tables for the following entailments and decide whether they are valid 1. P Q = Q 2. P Q, Q R = P R 3. P Q, Q = P 4. P Q = (Q P )

16. Summary of key points. Tomorrow bring the solutions for the exercises. Today key concepts Syntax of PL: atomic vs. complex formulas Semantics of PL: truth tables Formalization of simple arguments Interpretation function Domain Model Entailment Satisfiability