CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Similar documents
Chapter 1: The Logic of Compound Statements. January 7, 2008

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

The Logic of Compound Statements cont.

MACM 101 Discrete Mathematics I. Exercises on Propositional Logic. Due: Tuesday, September 29th (at the beginning of the class)

PROPOSITIONAL CALCULUS

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

CSC Discrete Math I, Spring Propositional Logic

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

Proposition logic and argument. CISC2100, Spring 2017 X.Zhang

Where are my glasses?

DISCRETE MATHEMATICS BA202

THE LOGIC OF COMPOUND STATEMENTS

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

DISCRETE MATH: LECTURE 3

Propositional Logic. Spring Propositional Logic Spring / 32

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

software design & management Gachon University Chulyun Kim

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

Compound Propositions

Logic and Proofs. Jan COT3100: Applications of Discrete Structures Jan 2007

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

An Introduction to Logic 1.1 ~ 1.4 6/21/04 ~ 6/23/04

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

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

Chapter 1 Elementary Logic

Artificial Intelligence: Knowledge Representation and Reasoning Week 2 Assessment 1 - Answers

Logic Overview, I. and T T T T F F F T F F F F

Propositional Logic. Fall () Propositional Logic Fall / 30

Discrete Structures of Computer Science Propositional Logic I

2.2: Logical Equivalence: The Laws of Logic

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

A Quick Lesson on Negation

A. Propositional Logic

PHI Propositional Logic Lecture 2. Truth Tables

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

1.1 Statements and Compound Statements

2 Conditional and Biconditional Propositions

Rules of Inference. Arguments and Validity

Section 1.1: Logical Form and Logical Equivalence

Chapter 2: The Logic of Compound Statements

Outline. Rules of Inferences Discrete Mathematics I MATH/COSC 1056E. Example: Existence of Superman. Outline

1) Let h = John is healthy, w = John is wealthy and s = John is wise Write the following statement is symbolic form

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

CS250: Discrete Math for Computer Science. L6: CNF and Natural Deduction for PropCalc

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

1 The Foundation: Logic and Proofs

Formal Logic. Critical Thinking

Definition 2. Conjunction of p and q

The statement calculus and logic

ANS: If you are in Kwangju then you are in South Korea but not in Seoul.

ECOM Discrete Mathematics

Propositional Logic. Argument Forms. Ioan Despi. University of New England. July 19, 2013

Section 1.2: Propositional Logic

Analyzing Arguments with Truth Tables

15414/614 Optional Lecture 1: Propositional Logic

1 The Foundations. 1.1 Logic. A proposition is a declarative sentence that is either true or false, but not both.

1 The Foundation: Logic and Proofs

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Logic, Sets, and Proofs

Section 1.2: Conditional Statements

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Intro to Logic and Proofs

CSE 20 DISCRETE MATH. Winter

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:

CS 2336 Discrete Mathematics

The Logic of Compound Statements. CSE 2353 Discrete Computational Structures Spring 2018

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

What is the decimal (base 10) representation of the binary number ? Show your work and place your final answer in the box.

1.1 Language and Logic

Deductive and Inductive Logic

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Language of Propositional Logic

THE LOGIC OF COMPOUND STATEMENTS

DERIVATIONS AND TRUTH TABLES

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

Methods of Proof. 1.6 Rules of Inference. Argument and inference 12/8/2015. CSE2023 Discrete Computational Structures

Logic and Proof. Aiichiro Nakano

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

We last time we began introducing equivalency laws.

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Test 1 Solutions(COT3100) (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology:

Packet #1: Logic & Proofs. Applied Discrete Mathematics

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

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

Section 1.3: Valid and Invalid Arguments

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

Predicate Logic & Quantification

CSE 20 DISCRETE MATH. Fall

03 Propositional Logic II

COM S 330 Homework 02 Solutions. Type your answers to the following questions and submit a PDF file to Blackboard. One page per problem.

THE LOGIC OF COMPOUND STATEMENTS

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Transcription:

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS 1.1 - Logical Form and Logical Equivalence Definition. A statement or proposition is a sentence that is either true or false, but not both. ex. 1 + 2 = 3 IS a statement 1 + 4 = 7 IS a statement x + 4 > 9 IS NOT a statement Let p and q be statements. Definition. The negation of p, denoted p is the statement It is not the case that p. ex. Let p = today is Saturday p = it is not Saturday ex. Let p = At least 10 inches of rain fell today p = less than 10 inches of rain fell today Definition. The conjunction of p and q, denoted p q is the statement p and q. [it is true when both p and q are true and false otherwise.] Definition. The disjunction of p and q, denoted p q is the statement p or q. [it is true when at least one of p, q is true and false otherwise.] ex. Let p = today is Friday, q = it is raining today, r = it is January ; p q = p q = p r = Definition. A statement form is an expression made up of statement variables (such as p, q) and logical connectives (such as,, ) that becomes a statement when actual statements are substituted for the compound statement. 1

2 CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS ex. p q is a statement form. The order of operations is that is performed first: So p q is equivalent to ( p) q Let p = Jim is tall and q = Jim is heavy Translate: Jim is tall, but he is not heavy into logic: Translate: Jim is neither tall, nor is he heavy into logic: Note: p but q means p q and neither p nor q means ( p) ( q) Statements are always either true or false, so let s consider a truth table for an arbitrary p and q. p q p q p q p q p ( p) q Definition. The exclusive or of p and q, denoted p q is the statement that is true when exactly one of p, q is true and is false otherwise. ex. Let p = Jim is tall and q = Jim is heavy p q =

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS 3 p q p q p q (p q) (p q) (p q) p q Two statement forms are logically equivalent if and only if they have identical truth tables. If P and Q are logically equivalent, we write P Q. So p q (p q) (p q). p q p ( p) p q (p q) q p q Let p = it is January and q = the bus is late (p q) is It is January and the bus is late but what is (p q)? p q p q (p q) p q p q So (p q) p q and the above can be written as it is not January or the bus is not late. DeMorgan s Laws: (1) (p q) p q (2) (p q) p q ex. Use DeMorgan s Laws to write the negation of 1 < x 4

4 CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS Let p = 1 < x and q = x 4 Then p q = 1 < x 4 And (p q) p q is 1 x or x 4 or simply 1 x or x > 4 Definition. A tautology is a statement that is always true and a contradiction is a statement that is always false. p p p p p p Let t be a tautology and c be a contradiction. p t p t c p c ex. (1.1, 25) Are (p q) r and p (q r) logically equivalent? To show two statements are not logically equivalent, we simply need to find one instance where the truth values differ: p q r p q (p q) r q r p (q r)

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS 5 1.2 - Conditional Statements Definition. If p, q are statements, then p q is a conditional statement that means if p then q. ex. If it is raining, then I will stay home. ex. Let p = I will win the lottery tomorrow and q = I will buy you all cars So p q means If I win the lottery tomorrow, then I will buy you all cars.. When is p q true? p q p q With p q, we typically call p the hypothesis or antecedent and q the conclusion or consequence. If the hypothesis is false, then the conditional statement is vacuously true. In terms of order of operations, is always performed first and is always performed last. ex. Is p q p true or false? p q q p q p p q p ex. Show p q p q. p q p q p p q Let p = You do not get to work on time and q = you are fired Then p q is If you do not get to work on time, then you are fired.

6 CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS And p q is You get to work on time or you are fired. And (p q) is... (p q) ( p q) from above ( p) q DeMorgan p q simplified This is an alternate way to show a logical equivalence (but we could have used a truth table). Consider q p: p q p q q p So p q q p. Definition. The contrapositive of a conditional statement p q is the statement q p. The converse of p q is q p [note p q q p]. The inverse of p q is p q [note p q p q]. ex. If x is even, then x 2 is even. Contrapositive: If x 2 is not even, then x is not even. Converse: If x 2 is even, then x is even. Inverse: If x is not even, then x 2 is not even. Note: If p then q is equivalent to both p only if q and if not q then not p. ex. If it is raining then I will stay home is equivalent to it is raining only if I stay home. This is NOT the same as It is raining if I stay home. p only if q means p can take place only if q takes place also. If q does not take place, then p cannot take place. Definition. The biconditional statement p if and only if q, denoted p q, is true if both p, q have the same truth value and false otherwise. In other words: p q (p q) (q p).

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS 7 p q p q q p (p q) (q p) p q Sometimes we abbreviate if and only if with iff. p q means if p then q and also means p is a sufficient condition for q. p q means if not p then not q and also means p is a necessary condition for q. So p if and only if q means p is a necessary and sufficient condition for q. ex. (1.2, 40) Rewrite (p r) (q r) without using or. (p r) (q r) ( p r) ( q r) [ ] ( p r) ( q r) [( q r) ( p r) ] [ ] [ ] ( p r) ( q r) ( q r) ( p r) (p r) ( q r) (q r) ( p r) Definition. 1.3 - Valid and Invalid Arguments An argument is a sequence of statements, and an argument form is a sequence of statement forms. All statements in an argument and all statement forms in an argument for, except for the final one, are called premises or assumptions or hypotheses. The final statement or statement form is called the conclusion. An argument form is valid if no matter what statements are substituted for the statement variables in the premises, if the resulting premises are true, then the conclusion is also true. Note: In an argument, the word therefore is often abbreviated as ex. Here is an invalid argument: If it is raining, then I will stay home. I own a car. I will stay home. ex. Here is an example of a valid argument: p (q r) r p q.

8 CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS p q r q r p (q r) r p r T T T T T F T F T T F F F T T F T F F F T F F F The rows are the critical rows - where the premises are both true and the conclusion must then be true to have the argument valid. Definition. An argument form consisting of two premises and a conclusion is called a syllogism. A syllogism of the form below is called modus ponens (method of affirming): If p then q If sin(2π) = 0 then sin(4π) = 0 p sin(2π) = 0 q. sin(4π) = 0. p q p q p q T T T F F T F F The row is the critical row. It is the row in which both premises are true and the conclusion in that row is also true. Hence the argument is valid. Definition. The modus tollens (method of denying) argument form is as follows: If p then q If sin(2π) = 0 then sin(4π) = 0 q sin(4π) 0 p. sin(2π) 0. It uses the logical equivalence: p q q p.

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS 9 A rule of inference is a form of argument that is valid (such as modus ponens and modus tollens). Here are some examples of rules of inference: generalization: p q p q p q specialization: p q p q p q elimination: p q p q q p p q transitivity: division into cases: p q q r p r p q p r q r r Contradiction Rule: If you can show that the supposition that statement p is false leads logically to a contradiction, then you can conclude that p is true. What does this means? Suppose p is some statement and we wish to determine whether p is true or false. We begin by assuming that p is false. If that leads to a contradiction, then the assumption was incorrect. Let c be a contradiction. p p c p c p T F F F So we have another rule of inference: contradiction rule: p c p

10 CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS Ex. Suppose there is an island containing two types of people: knights who always tell the truth and knaves who always lie. You visit the island and are approached by two natives who speak to you as follows: A says B is a knight B says A and I are of opposite type. (1) Suppose A is a knight. (2) what A says is true. (3) B is also a knight. (4) what B says is true. (5) A and B are of opposite types. (6) We have a contradiction as A and B are both knights. (7) our original assumption was false. (8) A is not a knight. (9) A is a knave. (10) what A says is false. (11) B is not a knight. (12) B is a knave. Ex. (1.3, 6) Use a truth table to determine whether the argument form is valid: p q q p p q p q p q q p p q The argument is invalid.

Ex. (1.3, 38) You are now approached by two new natives: A says Both of us are knights B says A is a knave CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS 11 (1) Suppose A is a knight. (2) what A says is true. (3) B is a knight. (4) what B says is true. (5) A is a knave. (6) we have a contradiction. (7) our original assumption, that A is a knight, was false. (8) A is a knave. (9) what A says is false. (10) both A and B are not knights. (11) what B said was true. (12) B is a knight.