Logic of Sentences (Propositional Logic) is interested only in true or false statements; does not go inside.

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

Compound Propositions

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

CSC Discrete Math I, Spring Propositional Logic

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

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

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

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

Cambridge University Press How to Prove it: A Structured Approach: Second edition Daniel J. Velleman Excerpt More information

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

The statement calculus and logic

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

1.1 Language and Logic

Chapter 1 Logic Unit Math 114

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

Definition 2. Conjunction of p and q

Unit 1 Logic Unit Math 114

1.1 Language and Logic

ICS141: Discrete Mathematics for Computer Science I

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

EECS 1028 M: Discrete Mathematics for Engineers

Propositional Logic. Spring Propositional Logic Spring / 32

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

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.

Recitation Week 3. Taylor Spangler. January 23, 2012

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

Unit 1 Logic Unit Math 114

LOGIC. Name: Teacher: Pd: Page 1

Logic and Propositional Calculus

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:

Section 3.1 Statements, Negations, and Quantified Statements

1.1 Statements and Compound Statements

Topic 1: Propositional logic

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

Unit 6 Logic Math 116

Mat 243 Exam 1 Review

MAT2345 Discrete Math

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

Math.3336: Discrete Mathematics. Propositional Equivalences

A Quick Lesson on Negation

Deduction by Daniel Bonevac. Chapter 3 Truth Trees

8. TRANSFORMING TOOL #1 (the Addition Property of Equality)

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

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

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

CITS2211 Discrete Structures Proofs

Propositional Languages

Logic and Proofs. (A brief summary)

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

Chapter 3: Logic. Diana Pell. A statement is a declarative sentence that is either true or false, but not both.

G E O M E T R Y CHAPTER 2 REASONING AND PROOF. Notes & Study Guide CHAPTER 2 NOTES

Mathematical Reasoning (Part I) 1

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

Logic, Sets, and Proofs

Supplementary Logic Notes CSE 321 Winter 2009

30. TRANSFORMING TOOL #1 (the Addition Property of Equality)

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

Boolean Logic. CS 231 Dianna Xu

GEOMETRY. 2.1 Conditional Statements

DISCRETE MATHEMATICS BA202

Homework assignment 1: Solutions

Proposition/Statement. Boolean Logic. Boolean variables. Logical operators: And. Logical operators: Not 9/3/13. Introduction to Logical Operators

Chapter 1: Formal Logic

Introduction to Decision Sciences Lecture 2

Section 1.2: Conditional Statements

CS 173: Discrete Mathematical Structures, Spring 2008 Homework 1 Solutions

Discrete Mathematics. Instructor: Sourav Chakraborty. Lecture 4: Propositional Logic and Predicate Lo

Introducing Proof 1. hsn.uk.net. Contents

Logic. Quantifiers. (real numbers understood). x [x is rotten in Denmark]. x<x+x 2 +1

Discrete Mathematics and Its Applications

Propositional Equivalence

CISC-102 Winter 2016 Lecture 17

1 Propositional Logic

FORMAL PROOFS DONU ARAPURA

Chapter 1 Elementary Logic

UNIT-I: Propositional Logic

Discrete Mathematics

The Logic of Compound Statements cont.

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

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

Truth-Functional Logic

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.

Propositional and Predicate Logic

2.2: Logical Equivalence: The Laws of Logic

Propositional and First-Order Logic

Proving logical equivalencies (1.3)

CHAPTER 6 - THINKING ABOUT AND PRACTICING PROPOSITIONAL LOGIC

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

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

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

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

1 Propositional Logic

THE LOGIC OF COMPOUND STATEMENTS

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

Equivalence and Implication

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1

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

Propositional and Predicate Logic

Intermediate Logic. Natural Deduction for TFL

Predicate Logic & Quantification

Transcription:

You are a mathematician if 1.1 Overview you say to a car dealer, I ll take the red car or the blue one, but then you feel the need to add, but not both. --- 1. Logic and Mathematical Notation (not in the textbook) Introduce some basic mathematical notation that will allow us to express arguments mathematically. Translate and evaluate arguments into truth tables. Use the equivalencies learned in the truth tables to do proofs. Logic of Sentences (Propositional Logic) is interested only in true or false statements; does not go inside. Logic of Objects ( Predicate Logic) can accommodate variables and quantifiers; There exists at least one black sheep in every family. 1

1.2 Deductive reasoning and logical connectives Example 1: I am smart or very lucky. I am not smart. Therefore, I am very lucky. Sentence = True or False but not both. Do you get it?, Ask questions! are not mathematical sentences. Argument = We arrive at true conclusions based on the assumption that the premises are true. In example 1 there are 2 premises: I am smart or very lucky. and I am not smart. and 1 conclusion: I am very lucky. Is the conclusion true in my case? No. I am not very lucky. In my case the conclusion is false; however, so is the first or second premise. So if some or all premises are false then the conclusion(s) may be false as well and all of that does not invalidate the argument. Indeed, as we will see, although I am not very lucky, my argument is valid. Rule: An argument is valid if when the premises are true the conclusion(s) must also be true. Is the following argument valid? Example 2: Either Miss Scarlet is guilty or Mr. Green is guilty. Either Mr. Green is guilty or Mrs. Peacock is guilty. Therefore, either Miss Scarlet or Mrs. Peacock is guilty. 2

Lets assume the premises are true. Must the conclusion be true? No, there is a counter-example: Only Mr. Green is guilty. In this case true premises would not lead to a true conclusion. So my counter-example makes this argument in example 2 invalid (= we can show that it is possible that the premises are true and the conclusion (s) are false.) This is a very important point and will guide our thinking on how to do proofs: (1) if in all cases where the premises are true, the conclusion is also true, then an ARGUMENT IS VALID; (2) if in at least one case where the premises are true and the conclusion is false, then an ARGUMENT IS INVALID. NOTE: Consider the following example, is it a valid argument?: Either Miss Scarlet is guilty or Mr. Green is guilty. Either Mr. Green is guilty or Mrs. Peacock is guilty. Either Miss Scarlet guilty or Mrs. Peacock is guilty. Therefore, YOU ARE GUILTY!!! 3

Notice that you cannot make a counter-example so that all three premises are true and the conclusion is false!! (3) if the premises cannot be all true, an ARGUMENT itself is VALID! So far, we ve been writing everything out using words. This can get a little confusing because of the large number of words. Often, it is convenient to use symbols to represent concepts. Reconsider Example 1. Suppose we let P represent very lucky and Q represent smart. Then this argument has the form: P or Q not Q Therefore, P. Just as we can use letters like P and Q to represent concepts that are TRUE of FALSE, we can also introduce some other symbolic notation. Therefore, P v Q means P or Q, P ^ Q means P and Q, and P is the negation of P. 4

Note that just as with math symbols, placement of brackets is crucial. Reducing complex statements to letters and symbolic notation, allows us to strip things down just to the argument. Then we can judge a statement by its argument without getting distracted by the phrasing. Exercise 3: Write the following in logical notation: It is not true that Abby and Bill are both telling the truth. A = Abby is telling truth; B = Bill is telling truth: ( A ^ B ) Did you see it? It just fell by itself. Exercise 4: Write the following in logical notation: Either Abby or Bill is telling the truth. A = Abby is telling truth; B = Bill is telling truth: (A v B) ^ ( A ^ B ) (Abby or Bill is telling the truth but not both.) 5

1.3 Truth Tables Recall that an argument is valid if the premises cannot all be true without the conclusion also being true. Truth tables can be very helpful in determining whether an argument is valid. First we ll show how to construct truth tables. Then we ll show how to use them to evaluate arguments. Statement (premise or conclusion): (a) P (b) P ^ Q (c) P v Q Truth Table: P P P Q P ^ Q P Q P v Q F T F F F F F F T F F T F F T T T F F T F T Note that tables list all possible T T T T T T combinations of simple statements (P and Q in the examples above), each can either be true or false. Exercise 5 Make the truth table for (P v Q). Exercise 6 Make the truth table for (P ^ Q) v R 6 P Q (P v Q) F F F F T T T F F T T F P Q R (P ^ Q) v R F F F T F F T T F T F T F T T T T F F T T F T F T T F T T T T T

Go back to Example 1 from earlier. Make a truth table and use it to analyze whether the argument is valid. Recall that we decided that the form of this argument was: P v Q (1 st premise: very lucky or smart) Q (2 nd premise: not smart) P (Conclusion: very lucky) Use a Truth Table to decide whether this argument is valid. P Q P v Q Q P F F F T F F T T F F T F T T T <= This line decides validity T T T F T of this example (1st premise) (2nd premise) (Conclusion) (When both premises are T, conclusion must be T.) Recall that the requirement for an ARGUMENT to be NOT VALID is that the premises can be all true, but the conclusion can be false. Observe that in all lines where the premises are all (both) true, the conclusion is also true. Therefore, we have shown symbolically that this argument is valid. 7

Exercise 7 Use a truth table to determine whether the following argument is valid: Either John isn t stupid and he is lazy, or he s stupid. John is stupid. Therefore, John isn t lazy. S=Stupid; L=Lazy: Exercise 8 Use a truth table to determine whether the following argument is valid: The butler and the cook are not both innocent. Either the butler is lying or the cook is innocent. Therefore, the butler is either lying or guilty. B=Butler innocent C=Cook innocent L=Butler lying B=Butler guilty Pr.2 Premise 1 Conclusion S L [( S^L)vS]^ [( S^L)^S] L F F F T F T T F T F T T ok. T T T F oups! This is not a valid argument! Premise 1 Premise 2 Conclusion B C L (B^C) (LvC)^ (L^C) (Lv B)^ (L^ B) F F F T F T F F T T T F NOT VALID F T F T T T ok. F T T T F F T F F T F F T F T T T T ok. T T F F T F T T T F F T This is not a valid argument 8

1.4 Equivalencies Exercise 9 Use the truth table to show that statement: I am not stupid and I am not lazy is equivalent to statement It is not true that I am stupid or lazy. S L S^ L (S v L) F F T T F T F F T F F F T T F F Many times, logical statements can be simplified, making the truth tables easier and faster to calculate. This is because symbolic logic follows many of the same properties as typical math. Commutative laws: P v Q is equivalent to Q v P P ^ Q is equivalent to Q ^ P Associative laws: P v (Q v R) is equivalent to (P v Q) v R P ^ (Q ^ R) is equivalent to (P ^ Q) ^ R Idempotent laws: P v P is equivalent to P P ^ P is equivalent to P Distributive laws: P ^ (Q v R) is equivalent to (P ^ Q) v (P ^ R) P v (Q ^ R) is equivalent to (P v Q) ^ Double negation law: ( P) is equivalent to P DeMorgan s laws: (P ^ Q) is equivalent to P v Q and (P v Q) is equivalent to P ^ Q 9 (P v R) Using truth tables, you can (and should be able to) show that the above are equivalent.

Exercise 10 Find a simpler (=shorter) equivalent formula: ( P v Q) ( P v Q ) use double negative ( ( P) v Q ) use DeMorgan s law ( ( P ^ Q)) use double negative P ^ Q Exercise 11 Find a simpler equivalent formula: ( Q ^ P) v P ( Q ^ P ) v P use De Morgan s law ( Q v ( P)) v P use double negative ( Q v P ) v P use associative law Q v( P v P ) P v P is always true Q v T Q v T is always true T Formulas that are always True (T), such as P v P, are called tautologies. Formulas that are always False (F), such that P ^ P are called contradictions. 10

1.5 Conditional (Implication) and Biconditional (Equivalency) Connectives A very important set of words in arguements are of the form if...then. Following example shows this type of argument. P Q is read as if P then Q. This is called a conditional statement. P is the antecedent and Q is the consequent. Consider the following example: Example 12 If today is Sunday, then I don t have to go to work. S W Today is Sunday. S Therefore, I don t have to work today. W Definition of Conditional Statement: P Q P Q T T T T F F F T T! F F T! Exercise 13 Put in logical form: If it s raining and I don t have my umbrella, then I ll get wet. R = rain U = have umbrella W= get wet (R ^ U) W 11

Exercise 14 Put in logical form: If Mary solved her homework problem, then the teacher won t collect it, and if she didn t then he ll collect it and ask her to present the solution on the blackboard. S = Solved homework C = Collect homework B = present on the Blackboard (S C) ^ [ S (C ^ B)] Exercise 15 Create a truth tables for : Mary did not solve her homework or class was cancelled. and for : If Mary solved her homework then class was cancelled. H C H H v C H C F F T T T F T T T T T F F F F T T F T T Hopefully you found that the last two columns are the same and thus ( H v C) and (H C) are equivalent statements: ( H v C) (H C) Here is another common example of equivalency: Don t come late or you will be grounded! You will be grounded if you come late! ( L v G) (L G) 12

Note: An argument is actually a conditional statement with premises being antecedents and conclusion being consequent. Conditional that is never false is a valid argument. Recall Example 1: It will rain or snow tomorrow. It is too warm for snow. Therefore, it will rain. and add a column of the following conditional statement into your truth table: If it rains or snows tomorrow, and if it is too warm for snow, then it will rain. P Q P v Q Q P ((P v Q)^ Q) P F F F T F T F T T F F T T F T T T T T T T F T T (1st premise) (2nd premise) (Conclusion) (True Conditional Statement) Exercise 16: Suppose that Q is TRUE and that given Q=T an argument [( P ^ Q) Q] is valid (= it is a TRUE conditional). Use a truth table to find out if P is true or false. P Q P ^ Q Q ( P ^ Q) Q F F F T T Q is false here F T T F F Conditional is false here T F F T T Q is false here T T F F T => P is false and thus P is TRUE True conditional [( P ^ T) F] is called Proof of P by contradiction. 13

1.6 Contrapositive versus Converse Converse of a statement (L G) is (G L) If you are grounded then you were late. Contrapositive of a statement (L G) is Exercise 17: Write the following in logical notation: (a) (b) TTT T T T T 14 ( G L) If you aren t grounded then you weren t late. If it s raining or snowing, then the game has been canceled. (R v S ) C If the game hasn t been canceled, then it s not raining and it s not snowing. C ( R ^ S ) or C (R v S ) (c) If the game has been canceled then it s raining or snowing. C (R v S ) Fill in (a) or (b) or (c): ( b ) is a contrapositive of ( a ) and ( c ) is a converse of ( a ) and ( b ) Show that the above contrapositives have the same truth tables, and that they differ from the converse. RSC R v S (R v S ) C C (R v S ) C (R v S ) FFF F T T T FFT F T T F FTF T F F T FTT T T T T TFF T T T T TFT T T T T TTF T F F T

1.7 Variables and Sets So far, we ve symbolized statements using simple letters. We have not accounted for the fact that a statement might include variables. Consider the statement, x is a prime number. Let x be a variable. We can write this statement as P(x). By writing this in this way, rather than just P, we are accounting for the fact that x can take on different values. If a statement includes more than one variable, all variables should be shown: eg, D(x, y). Exercise 18 : x is a prime number and x+1 is not a prime number. P(x) ^ P(x+1) Exercise 19 : Write out the following in symbolic notation: if x likes y and y likes z then z and x do not like each other. Let L(a, b) be True if a likes b and False otherwise. [ L(x,y) ^ L(y,z) ] [ L(x,z) ^ L(z,x) ] With dealing with statements without variables, a statement is always either true or false. This is not the case when a statement includes variables; the truth of a statement depends on the value that the variable takes. In our Exercise 18, P(7) is true while P(9) is false. We deal with this through the introduction of truth sets. A truth set is the set of values of x for which P(x) is true. We will introduce basic set theory later 15

1.8 Last bits of notation: iff and Quantifiers iff : (Q P) is a biconditional statement, it is a shorthand for [(P Q) ^ ( Q P)]. or (using the contrapositive) for [(P Q) ^ ( P Q)]. This is translated as if P then Q and if not P then not Q or Q if P and Q only if P Q if and only if P or Q iff P or P is sufficient and necessary for Q for all, any, every : [ x: P(x)] means for all values of x, P(x) is true All players were tall., Every player was tall. there exists, at least one : [ x: Q(x)] means there exists a value of x, such that Q(x) is true There exists a player who was tall., At least one player was tall. Note that negation switches the quantifiers: [ x: P(x)] [ x: P(x)] (It is not true that all players were tall.) (At least one player was short (=not tall.)) and that [ x: P(x)] [ x: P(x)] (It is not true that there was at least one tall player.) (All player were short (=not tall.)) Exercise 20: Read and simplify the following statement: [ x: y s.t. y= 1/x] (s.t.=such that) [ x: y s.t. y = 1/x ] It is not true that for every x there exists y such that y=1/x. x s.t. y : y 1/x There exists an x such that for any y, y 1/x. 16

Exercise 21: Analyze the following statements. Are some equivalent? (use (S 10) for students; L for lecture) 1. If at least 10 students are here, then the lecture is being given. 2. If less then 10 students are here then lecture is not being given. 17 (S 10) L (S 10) L 3. Only if the lecture is being given then at least 10 students are here. (S 10) L 4. Only if at least 10 students are here then the lecture is being given L (S 10) 5. If an only if at least 10 students are here then the lecture is being given. (S 10) L 6. Having at least 10 students here is a SUFFICIENT condition for the lecture being given. (S 10) L 7. Having at least 10 students here is a NECESSARY condition for the lecture being given. L (S 10) 8. The lecture being given is a NECESSARY condition for having at least 10 students here. (S 10) L 9. The lecture being given is a SUFFICIENT and NECESSARY condition for having at least 10 students here. (S 10) L 10. Having at least 10 students here is a SUFFICIENT and NECESSARY condition for the lecture being given. (S 10) L [1] [3] [6] [8]; [2] [4] [7]; [5] [9] [10];