Chapter 3: Basic Propositional Logic. Based on Harry Gensler s book For CS2209A/B By Dr. Charles Ling;

Similar documents
Artificial Intelligence: Valid Arguments and Proof Systems. Prof. Deepak Khemani. Department of Computer Science and Engineering

Logicola Truth Evaluation Exercises

INTERMEDIATE LOGIC Glossary of key terms

Semantic Entailment and Natural Deduction

Logic Appendix: More detailed instruction in deductive logic

Chapter 1. Introduction. 1.1 Deductive and Plausible Reasoning Strong Syllogism

What are Truth-Tables and What Are They For?

Artificial Intelligence Prof. P. Dasgupta Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Chapter 8 - Sentential Truth Tables and Argument Forms

Logic I or Moving in on the Monkey & Bananas Problem

A. Problem set #3 it has been posted and is due Tuesday, 15 November

Module 5. Knowledge Representation and Logic (Propositional Logic) Version 2 CSE IIT, Kharagpur

There are two common forms of deductively valid conditional argument: modus ponens and modus tollens.

Beyond Symbolic Logic

4.1 A problem with semantic demonstrations of validity

Informalizing Formal Logic

Deduction by Daniel Bonevac. Chapter 1 Basic Concepts of Logic

An Introduction to. Formal Logic. Second edition. Peter Smith, February 27, 2019

Introducing truth tables. Hello, I m Marianne Talbot and this is the first video in the series supplementing the Formal Logic podcasts.

Part II: How to Evaluate Deductive Arguments

Revisiting the Socrates Example

2.1 Review. 2.2 Inference and justifications

CHAPTER THREE Philosophical Argument

A Brief Introduction to Key Terms

Reductio ad Absurdum, Modulation, and Logical Forms. Miguel López-Astorga 1

MATH1061/MATH7861 Discrete Mathematics Semester 2, Lecture 5 Valid and Invalid Arguments. Learning Goals

The way we convince people is generally to refer to sufficiently many things that they already know are correct.

The antecendent always a expresses a sufficient condition for the consequent

Rosen, Discrete Mathematics and Its Applications, 6th edition Extra Examples

Artificial Intelligence Prof. P. Dasgupta Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Does Deduction really rest on a more secure epistemological footing than Induction?

Logic. A Primer with Addendum

Announcements. CS243: Discrete Structures. First Order Logic, Rules of Inference. Review of Last Lecture. Translating English into First-Order Logic

Ling 98a: The Meaning of Negation (Week 1)

Lecture 4: Deductive Validity

Announcements. CS311H: Discrete Mathematics. First Order Logic, Rules of Inference. Satisfiability, Validity in FOL. Example.

Testing semantic sequents with truth tables

Paradox of Deniability

LOGIC ANTHONY KAPOLKA FYF 101-9/3/2010

Overview of Today s Lecture

Logic Book Part 1! by Skylar Ruloff!

A romp through the foothills of logic Session 3

PHI 1500: Major Issues in Philosophy

CHAPTER 1 A PROPOSITIONAL THEORY OF ASSERTIVE ILLOCUTIONARY ARGUMENTS OCTOBER 2017

Also, in Argument #1 (Lecture 11, Slide 11), the inference from steps 2 and 3 to 4 is stated as:

1.2. What is said: propositions

Selections from Aristotle s Prior Analytics 41a21 41b5

2.3. Failed proofs and counterexamples

Study Guides. Chapter 1 - Basic Training

KRISHNA KANTA HANDIQUI STATE OPEN UNIVERSITY Patgaon, Ranigate, Guwahati SEMESTER: 1 PHILOSOPHY PAPER : 1 LOGIC: 1 BLOCK: 2

HANDBOOK (New or substantially modified material appears in boxes.)

1 Clarion Logic Notes Chapter 4

Logic and Pragmatics: linear logic for inferential practice

Predicate logic. Miguel Palomino Dpto. Sistemas Informáticos y Computación (UCM) Madrid Spain

Transition to Quantified Predicate Logic

Logic & Proofs. Chapter 3 Content. Sentential Logic Semantics. Contents: Studying this chapter will enable you to:

A Judgmental Formulation of Modal Logic

Today s Lecture 1/28/10

How Gödelian Ontological Arguments Fail

Philosophy 1100: Ethics

Circumscribing Inconsistency

C. Exam #1 comments on difficult spots; if you have questions about this, please let me know. D. Discussion of extra credit opportunities

HANDBOOK. IV. Argument Construction Determine the Ultimate Conclusion Construct the Chain of Reasoning Communicate the Argument 13

GENERAL NOTES ON THIS CLASS

Introduction to Logic. Instructor: Jason Sheley

BonJour Against Materialism. Just an intellectual bandwagon?

Mr Vibrating: Yes I did. Man: You didn t Mr Vibrating: I did! Man: You didn t! Mr Vibrating: I m telling you I did! Man: You did not!!

Chapter 3: More Deductive Reasoning (Symbolic Logic)

Philosophy 1100: Introduction to Ethics. Critical Thinking Lecture 1. Background Material for the Exercise on Validity

(Some More) Vagueness

Exercise Sets. KS Philosophical Logic: Modality, Conditionals Vagueness. Dirk Kindermann University of Graz July 2014

UC Berkeley, Philosophy 142, Spring 2016

Unit 4. Reason as a way of knowing. Tuesday, March 4, 14

Tutorial A03: Patterns of Valid Arguments By: Jonathan Chan

PHIL 115: Philosophical Anthropology. I. Propositional Forms (in Stoic Logic) Lecture #4: Stoic Logic

Scott Soames: Understanding Truth

1. Lukasiewicz s Logic

Logic: Deductive and Inductive by Carveth Read M.A. CHAPTER IX CHAPTER IX FORMAL CONDITIONS OF MEDIATE INFERENCE

b) The meaning of "child" would need to be taken in the sense of age, as most people would find the idea of a young child going to jail as wrong.

16. Universal derivation

Comments on Truth at A World for Modal Propositions

Argument Mapping. Table of Contents. By James Wallace Gray 2/13/2012

Negative Introspection Is Mysterious

Courses providing assessment data PHL 202. Semester/Year

Lecture 3 Arguments Jim Pryor What is an Argument? Jim Pryor Vocabulary Describing Arguments

2. Refutations can be stronger or weaker.

Basic Concepts and Skills!

Ethical Consistency and the Logic of Ought

Class 33: Quine and Ontological Commitment Fisher 59-69

A R G U M E N T S I N A C T I O N

What would count as Ibn Sīnā (11th century Persia) having first order logic?

Unit. Categorical Syllogism. What is a syllogism? Types of Syllogism

Day 3. Wednesday May 23, Learn the basic building blocks of proofs (specifically, direct proofs)

Portfolio Project. Phil 251A Logic Fall Due: Friday, December 7

Logic -type questions

PHILOSOPHY 102 INTRODUCTION TO LOGIC PRACTICE EXAM 1. W# Section (10 or 11) 4. T F The statements that compose a disjunction are called conjuncts.

A Puzzle about Knowing Conditionals i. (final draft) Daniel Rothschild University College London. and. Levi Spectre The Open University of Israel

In Search of the Ontological Argument. Richard Oxenberg

Artificial Intelligence. Clause Form and The Resolution Rule. Prof. Deepak Khemani. Department of Computer Science and Engineering

Chapter 9- Sentential Proofs

Transcription:

Chapter 3: Basic Propositional Logic Based on Harry Gensler s book For CS2209A/B By Dr. Charles Ling; cling@csd.uwo.ca

The Ultimate Goals Accepting premises (as true), is the conclusion (always) true? Is the reasoning process valid? Premises: If you smoke, you can get lung cancer. You do not smoke. Conclusion: you cannot get lung cancer. Premises: If it rains and your tent leaks, your sleeping bag will get wet. Your sleeping bag did not get wet. Your tent leaks. Conclusion: it did not rain. Formalize and automate the deduction process First: how to express premises and conclusions?

3.1 Translation from English to Logic Need a (formal) language to deal with simple statements that may be true and false: use capital letters (P, Q, ) They are called propositions deal with if-then, and, or, not, etc. in NL

Well-Formed Formula (wff) 1. Any capital letter is a wff. 2. The result of prefixing any wff with ~ is a wff. 3. The result of joining any two wffs by or or or and enclosing the result in ( ) is a wff. Examples and usual meaning of connectives in NL

Parentheses are important

Examples of Invalid wff p, p q, p and q (~P), (Q), ((R)) P Q, P Q R, (P Q R) If p then q Logic (including wff) is very precise

Some useful rules in translation Rule: put ( wherever you see both, either, or if.

Rule: Group together parts on either side of a comma.

Rule: have your capital letters stand for whole statements

Exercise (also LogiCola C (EM & ET)) 1. Not both A and B. 2. Both A and either B or C. 3. Either both A and B or C. 4. If A, then B or C. 5. If A then B, or C. 6. If not A, then not either B or C. 7. If not A, then either not B or C. 8. Either A or B, and C. 9. Either A, or B and C. 10. If A then not both not B and not C. 11. If you get an error message, then the disk is bad or it s a Macintosh disk. 12. If I bring my digital camera, then if my batteries don t die then I ll take pictures of my backpack trip and put the pictures on my Web site.

Exercise LogiCola C (EM & ET)

LogiCola C-ET

OK if you use LogiCola notations in assignment and quiz

3.2 Simple truth tables: the meaning/semantics of wff A truth table gives a logical diagram for a wff. It lists all possible truth-value combinations for the letters and says whether the wff is true or false in each case. Define connectives first

Real-life or may have different meanings You can have all-you-can-eat soup or salad and bread. Inclusive or. Exclusive or : A or B but not both = ((A B) ~(A B)) Most logic books treat either A or B as exclusive or but this textbook treats either A or B as (A B)

Some interesting examples of if If A then B does NOT imply A but is often taken otherwise. In Death on the Nile If I did not sleep, if I walked on the deck, I might see who killed her The Conservatives have issued another apology, this time for comments caught on video Wednesday by an assistant to Transport Minister Lawrence Cannon. The exchange was caught on video and broadcast Wed. by the Aboriginal Peoples Television Network. If you behave and you're sober and there's no problems and if you don't do a sit down and whatever, I don't care, said Mr. Cannon's assistant Darlene Lannigan to Mr. Matchewan. Are you calling me an alcoholic? replied Mr. Matchewan. She later added: One of them showed up the other day and was drinking.

3.3 Truth evaluations We can calculate the truth value of a wff if we know the truth value of its letters. LogiCola D (TM & TH)

3.3a Exercise Assume that A=1 and B=1 (A and B are both true) while X=0 and Y=0 (X and Y are both false). Calculate the truth value of each wff below.

3.4 Unknown evaluations We can sometimes figure out a formula s truth value even if we don t know the truth value of some letters. Exercise LogiCola D (UE, UM, & UH) T=1 (T is true), F=0 (F is false), and U=?

3.5 Complex truth tables A formula with n distinct letters has 2 n possible truth-value combinations:

The truth table for (P ~P) is true in all cases which makes the formula a tautology the law of the excluded middle, says that every statement is true or false (no other status, such as maybe true ). This law holds in propositional logic The truth table for (P ~P) is false in all cases which makes the formula a self-contradiction Otherwise, the formula is a contingent (either true of false; we do not know which one). 3.5a Exercise LogiCola D (FM & FH)

Logical Paradox Everything I say is a lie. Is this a lie? Barber paradox: An adult male barber shaves all and only men who do not shave themselves. Does he shave himself? One thing is certain in this world: nothing is certain.

3.6 The truth-table test To prove a propositional argument (given premises and conclusion) Construct a truth table showing the truth value of the premises and conclusion for all possible cases. The argument is valid if and only if for all rows (cases) that the premises are all true, the conclusion is also true. Otherwise, the argument is invalid.

If you re a dog, then you re an animal. You re not a dog. You re not an animal So, cannot conclude (or invalid to deduce) you re not an animal

Short-cut table: do it faster Letter comb P1 P2 P3 C If any Pi is 0, no need to evaluate other P s and C (ignore this row and continue the table) If C is 1, no need to evaluate any Pi (ignore this row and continue the table) If C is 0, must evaluate Ps. If all Pi are 1, stop the table. The argument is invalid. If the above case does not happen when you complete the table, the argument is valid.? 1 0 3.6a Exercise LogiCola D (AE, AM, & AH)

A Note Reasoning (or argument) is valid or invalid, not true or false When valid conclusion cannot be drawn: not the same as drawing the negated conclusion. Previous example: invalid to conclude you are an animal In court, given evidence, if I can prove you are guilty, then you are guilty is true. But if I cannot prove you are guilty, then you can be either guilty or innocent.

3.6a Exercise (selected) 3. If television is always right, then Anacin is better than Bayer. If television is always right, then Anacin isn t better than Bayer. Television isn t always right. [Use T and B.] 4. If it rains and your tent leaks, then your down sleeping bag will get wet. Your tent won t leak. Your down sleeping bag won t get wet. [Use R, L, and W.] 7. If ethics depends on God s will, then something is good because God desires it. Something isn t good because God desires it. (Instead, God desires something because it s already good.) Ethics doesn t depend on God s will. [Use D and B; this argument is from Plato s Euthyphro.] 9. I ll go to Paris during spring break if and only if I ll win the lottery. I won t win the lottery. I won t go to Paris during spring break. [Use P and W.]

If an argument passes the truth-table test, it means that the premises entails the conclusion (in semantics). The truth-table test can get tedious for long arguments. Arguments with 6 letters may need 64 lines and ones with 10 letters need 1024 lines Can we do it based only on syntax? Yes, see 3.10-, Chapter 4,

3.7 The truth-assignment test Take a propositional argument. Set each premise to 1 and the conclusion to 0. The argument is VALID if and only if no consistent way of assigning 1 and 0 to the letters will make this work so we can t make the premises all true and conclusion false. You REFUTE the argument if you can find such an assignment Again, this does not prove the negated conclusion.

Is this method easier than the truth-table test? Exercise LogiCola E (S); E (E)

Read Chapter 3.8 by yourselves Read Chapter 3.9 by yourselves 3.8a Exercise LogiCola C (HM & HT) 3.9a Exercise LogiCola E (F I)

Some extra topics See extra slides posted Adequate set of connectives (set2)

3.10/3.11 S-rules, I-rules Inference rules, which state that certain formulas can be derived with validity from certain other formulas, mechanically Deduce, formally deducible : Will be building blocks for formal proofs Also check mechanically if a proof is valid They reflect common forms of reasoning What we hope to have (see later) Everything that is deduced is indeed valid. Sound Everything that is valid can be deduced. Complete

Each P and Q can match with any wff. E.g., (A (B C)) 3.10a Exercise LogiCola F (SE & SH)

All S-rules Also: P ~ ~ P

Modus Ponens Modus Tolens 3.11a Exercise LogiCola F (IE & IH)

3.12 Combining S- and I-rules 3.12a Exercise LogiCola F (CE & CH)

3.13 Extended inferences

Exercise

Rules you can use

Sound but Incomplete These rules are certainly sound But incomplete Cannot prove these Next chapter: sound and complete proof system

3.14 Logic and computers Boolean Logic: used to design circuits in computers and digital devices Automated logical deduction, automated proof system Logic Programming: a logic-based declarative programming language AI: knowledge representation, reasoning, planning Hoare Logic: correctness of computer programs