Chapter 5: Section 5-1 Mathematical Logic

Similar documents
Section 3.1 Statements, Negations, and Quantified Statements

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

CSC Discrete Math I, Spring Propositional Logic

1.1 Language and Logic

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

Compound Propositions

DISCRETE STRUCTURES WEEK5 LECTURE1

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Logic and Propositional Calculus

Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

Today s Topic: Propositional Logic

Discrete Structures of Computer Science Propositional Logic I

EECS 1028 M: Discrete Mathematics for Engineers

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

Discrete Mathematics

1.1 Language and Logic

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

THE LOGIC OF COMPOUND STATEMENTS

CSE 240 Logic and Discrete Mathematics

MAT 101 Exam 2 Logic (Part I) Fall Circle the correct answer on the following multiple-choice questions.

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

Logic. Def. A Proposition is a statement that is either true or false.

Propositional Languages

Logic and Truth Tables

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

DISCRETE MATHEMATICS BA202

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

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

~ p is always false. Based on the basic truth table for disjunction, if q is true then p ~

A Statement; Logical Operations

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

Chapter 1: Formal Logic

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

Section L.1- Introduction to Logic

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

2 Conditional and Biconditional Propositions

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

Homework 1. 10(b) A useful denial of the statement We will win the first game or the second one is We will lose the first two games.

Mathematical Reasoning (Part I) 1

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies

Introduction to Theoretical Computer Science

LOGIC CONNECTIVES. Students who have an ACT score of at least 30 OR a GPA of at least 3.5 can receive a college scholarship.

Basic Logic and Proof Techniques

Intro to Logic and Proofs

Section 1.1: Logical Form and Logical Equivalence

TRUTH TABLES LOGIC (CONTINUED) Philosophical Methods

Discrete Structures for Computer Science

The statement calculus and logic

PROPOSITIONAL CALCULUS

Proofs. Joe Patten August 10, 2018

Boolean Logic. CS 231 Dianna Xu

CSE 20: Discrete Mathematics

Section A (not in the text) Which of the following are statements? Explain. 3. The President of the United States in 2089 will be a woman.

Section 1.1 Propositional Logic. proposition : true = T (or 1) or false = F (or 0) (binary logic) the moon is made of green cheese

Overview. 1. Introduction to Propositional Logic. 2. Operations on Propositions. 3. Truth Tables. 4. Translating Sentences into Logical Expressions

ECOM Discrete Mathematics

MA103 STATEMENTS, PROOF, LOGIC

Bachelor s Degree Programme Discrete Mathematics (Valid from 1st January, 2013 to 31st December, 2013.)

Introduction to Metalogic

Sec$on Summary. Propositions Connectives. Truth Tables. Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional

Chapter 1 Elementary Logic

Logic, Human Logic, and Propositional Logic. Human Logic. Fragments of Information. Conclusions. Foundations of Semantics LING 130 James Pustejovsky

Statements and Quantifiers

PHI Propositional Logic Lecture 2. Truth Tables

GENERAL MATHEMATICS 11

CHAPTER 2 INTRODUCTION TO CLASSICAL PROPOSITIONAL LOGIC

Foundation of proofs. Jim Hefferon.

CSE 20 DISCRETE MATH. Fall

Implications, Quantifiers, and Venn Diagrams. Implications Logical Quantifiers Venn Diagrams. Different Ways of Stating Implications

Lecture 02: Propositional Logic

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

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

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

COT 2104 Homework Assignment 1 (Answers)

Discrete Mathematics and Applications COT3100

ICS141: Discrete Mathematics for Computer Science I

Connectives Name Symbol OR Disjunction And Conjunction If then Implication/ conditional If and only if Bi-implication / biconditional

DERIVATIONS AND TRUTH TABLES

Introduction to Sets and Logic (MATH 1190)

1.5 MATHEMATICAL LANGUAGE

Chapter 1 Logic Unit Math 114

ARTIFICIAL INTELLIGENCE

Logic and Truth Tables

LECTURE 1. Logic and Proofs

Math Real Analysis

Discrete Mathematics and Its Applications

Propositions. Frequently, we will use the word statement instead of proposition.

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

Exclusive Disjunction

Section 3.1. Statements and Logical Connectives. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

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

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

PS10.3 Logical implications


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

CSCI Homework Set 1 Due: September 11, 2018 at the beginning of class

UNIT-I: Propositional Logic

Inductive Reasoning. Inductive Reasoning. Inductive Reasoning. Inductive Reasoning. Logic (with Truth Tables) If-Then Statements

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

(b) Follow-up visits: December, May, October, March. (c ) 10, 4, -2, -8,..

Transcription:

Chapter 5: Section 5-1 Mathematical Logic D. S. Malik Creighton University, Omaha, NE D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 1 / 29

Mathematical Logic Intuitively, logic is the discipline that considers the methods of reasoning. It provides the rules and techniques for determining whether an argument is valid or not. In everyday life, we use reasoning to prove different points. For example, to prove to our parents that we passed an exam, we might show the test and the score. Similarly, in mathematics, mathematical logic (or logic) is used to prove results. To be specific, in mathematics, we use logic or logical reasoning to prove theorems. D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 2 / 29

Statements (Proposition) Definition A statement or a proposition is a declarative sentence that is either true or false, but not both. Example Consider the following sentences. (i) 4 is an integer. (ii) 5 is an integer. (iii) Washington, DC, is the capital of the USA. Each of these sentences is a declarative sentence. The sentence (i) is true, (ii) is not true, and (iii) is true. Hence, these are examples of statements.. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 3 / 29

We use lowercase letters, with or without subscripts, such as p, q, and r, to denote sentences or statements. For example, we can write p : 4 is an integer. q : 5 is an integer. r : Washington, DC, is the capital of the U.S.A. Example Consider the following sentences: p : 5 is greater than 3. q : 7 is an even integer. Both p and q are declarative sentences. Thus, p and q are statements. Moreover, p is true and q is false.. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 4 / 29

Example Consider the following sentences. p : Will you go? q : Shall we enjoy the lovely weather? Here the sentences p and q are not declarative sentences, so these are not statements.. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 5 / 29

A statement is a declarative sentence that can be classified as true or false, but not both. One of the values truth or false that is assigned to a statement is called its truth value. We abbreviate truth to T or 1 and false to F or 0. If a statement p is true, we say that the (logical) truth value of p is true and write p is T (or p is 1); otherwise, we say the (logical) truth value of p is false and write p is F (or p is 0). D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 6 / 29

Compound Statements Consider the following statements. 1 I will not go to the basketball game today. 2 I paid my bill in the morning and I went to the gym in the evening. 3 You can go to Chicago or you can go to Paris. 4 If I win the competition, then I will win the scholarship money. 5 Study hard and get good grades, or lose the scholarship. These are examples of compound statements. Moreover, not, and, or, and, if... then are called logical connectives or simply connectives. D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 7 / 29

Example (i) Consider the statement 4 is a prime number. The negation of this statement is 4 is not a prime number. Hence, 4 is not a prime number is a compound statement. (iii) You can borrow the car and buy the groceries. This is a compound statement because it contains the connective and. (iv) If ABC is a right-angled triangle, then one of its angle is 90 o. This is a compound statement because it contains the connective if... then. (v) I invested in the Smith and Barney company. This is not a compound statement. The word and is part of the name of the company.. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 8 / 29

Negation Definition Let p be a statement. The negation of p, written p, is the statement obtained by negating the statement p. The truth value of p and p are opposite. The symbol is called not. We read p as not p. If p is a statement, then its negation is formed by writing it is not the case that p. For example, if then p : 2 is positive, p : it is not the case that 2 is positive. Sometimes, p is also written as follows: p : 2 is not positive.. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 9 / 29

By the definition of the negation of a statement p, the truth value of p is opposite to the truth value of p, i.e., if p is T, then p is F and if p is F, then p is T. We record this in a table, called a truth table, as follows: p p T F F T Example Consider the statement The negation of this statement is The Rockie Mountains are in Colorado. The Rockie Mountains are not in Colorado.. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 10 / 29

Conjunction Consider the following statements: Now consider the sentence p : 2 is an even integer. q : 7 divides 14. r : 2 is an even integer and 7 divides 14. Because r is true, r is a statement. Such a statement r is called the conjunction of p and q. D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 11 / 29

Conjunction Definition Let p and q be statements. The conjunction of p and q, written p q, is the statement formed by joining the statements p and q using the word and. The statement p q is true if both p and q are true; otherwise p q is false. The symbol is called and. Let p and q be statements. The truth table of p q is given by: p q p q T T T T F F F T F F F F. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 12 / 29

Example (i) Let p : Washington, DC, is the capital of the USA and q : The USA is in North America. Then p q is the statement: p q : Washington, DC, is the capital of the USA and the USA is in North America. Notice that p q is T. (ii) Let p : 2 divides 4 and q : 3 is greater than 5. Then p q is the statement: p q : 2 divides 4 and 3 is greater than 5. Because p is T and q is F, it follows that p q is F. (iii) Let r : 2 divides 4 and s : 2 divides 6. Then r s is the statement: r s : 2 divides 4 and 2 divides 6. Because r is T and s is T, it follows that r s is T.. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 13 / 29

Consider the statements, r : 2 divides 4 and s : 2 divides 6, in the previous example. The statement r s is: r s : 2 divides 4 and 2 divides 6. Sometimes, the statement r s is written r s : 2 divides both 4 and 6. D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 14 / 29

Disjunction Given two statements p and q, we can form the statement p or q by putting the word or between the statements such that the statement p or q is true if at least one of the statements p or q is true. For example, suppose we have the statements: p : 2 is an integer. q : 3 is greater than 5. Then we can form the statement. r : 2 is an integer or 3 is greater than 5. Because p is T, it follows that r is true. The statement r is called the disjunction of p and q. D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 15 / 29

Disjunction Definition Let p and q be statements. The disjunction of p and q, written p q, is the statement formed by putting the statements p and q together using the word or. The truth value of the statement p q is T if at least one of the statements p or q is true. The symbol is called or. For statements p and q, the truth table of p q is given by: p q p q T T T T F T F T T F F F. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 16 / 29

Example Let p be the statement You can pay me now and q be the statement You can pay me tomorrow with a 10% penalty. Then p q is the statement: You can pay me now or you can pay me tomorrow with a 10% penalty. Example Let p : 2 2 + 3 3 is an even integer and q : 2 2 + 3 3 is an odd integer. Then p q : 2 2 + 3 3 is an even integer or 2 2 + 3 3 is an odd integer. Sometimes for better readability, we write p q as: p q : Either 2 2 + 3 3 is an even integer or 2 2 + 3 3 is an odd integer. or p q : 2 2 + 3 3 is an even integer or an odd integer.. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 17 / 29

Implication In every day life, we encounter statements such as If it is cold, then I will wear a jacket. If I get a bonus, then I will buy a car. If I work, then I must pay taxes. Similarly, in mathematics, we frequently encounter statements such as: If ABC is a triangle, then A + B + C = 180 0. If 49301 is divisible by 6, then 49301 is divisible by 3. In each of these statements, two statements are connected by If... then to form a new statement. D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 18 / 29

Implication Definition Let p and q be two statements. Then if p then q is a statement called an implication or a condition, written p q. The statement p q can also be read as or or or p implies q p is suffi cient for q q if p q whenever p. In the implication p q, p is called the hypothesis (or antecedent) and q is called the conclusion (or consequent).. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 19 / 29

Let us consider the following implication: If I pass Monday s math test, then I will take you out for dinner. Let p represent the statement I pass Monday s math test and q represent the statement I will take you out for dinner. Suppose p is true and q is true. Then because I told the truth, the statement p q is true. Suppose p is true but q is false. In this case, I lied. So the statement p q is false. Suppose p is false but q is true. In this case, even though I did not pass the test, but I still took you out for dinner. Note that I did not say anything about dinner and failing the test. Therefore, I did not lie. So the statement p q is true. Suppose p is false and q is false. In this case, I did not pass the test and I did not take you out for dinner. I cannot be held responsible for not taking you out for dinner because I promised to take you out for dinner only if I passed the test. Therefore, I did not lie. So the statement p q is true. D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 20 / 29

The truth table of the implication p q is given by: p q p q T T T T F F F T T F F T Example Let p be the statement It rains today, and q be the statement The game will be postponed. Then the statement p q is the statement If it rains today, then the game will be postponed.. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 21 / 29

Evaluating Logical Expressions Consider the statements: p = 2 is an even integer q = 6 is a prime number Then the truth value of p is true (T ) and the truth value of q is false (F ). Now p, ( p) q, p ( q) are also statements. Suppose that we want to know the truth values of these statements. To find the truth value of these statements, we substitute the values of the variables p and q and then use the rules of evaluating the logical connectives. For example, Thus, the truth value of p is F. p = T = F. D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 22 / 29

Similarly, ( p) q = ( T ) F = F F, because T = F = F, and p ( q) = T ( F ) = T T = T. D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 23 / 29

To avoid the use of so many parentheses (and brackets) in a statement formula we adopt the following conventions: 1. We omit the outer pair of parentheses in a statement. For example, we write p for ( p). 2. If there is a statement of the form ( p) ( q), then we write it as p q. 3. Similarly, we write ( p) ( q) as p q, ( p) ( q) as p q, ( p) as p, and so on. D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 24 / 29

Precedence of Logical Connectives (Operators) In a compound statement without parentheses that contains logical connectives, the logical connectives are evaluated in the following order, i.e., the precedence of logical connectives is: highest second highest third highest fourth highest D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 25 / 29

Example Let p be a true (T ) statement, q be a false (F ) statement, and r be a true (T ) statement. (i) p ( r q) = T ( T F ) = T (F F ) = T F = T. (ii) ( p q) ( q r) = ( T F ) ( F T ) = (F F ) (T T ) = F T = T.. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 26 / 29

Example Let p be a true (T ) statement, q be a false (F ) statement, and r be a true (T ) statement. (i) p r = T T = T F = F. (ii) r ( p q) = T ( T F ) = T (F T ) = T T = T.. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 27 / 29

Exercise: Write the negation of each of the following statements: (i) 2 is an odd integer; (ii) 7 + 5 > 13; (iii) p 7; (iv) I am taking the applied mathematics course. Solution: (i) 2 is not an odd integer; (ii) 7 + 5 13 (iii) p > 7; (iv) I am not taking the applied mathematics course. D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 28 / 29

Exercise: Let p be true, q be false, and r be true. Find the truth value of the following statements. (i) p (q r) (ii) [(p q) r)] (iii) (p q) ( q r) Solution: (i) p (q r) = T (F T ) = T T = T (ii) (iii) [(p q) r] = [(T F ) T ] = [(T T ) F ] = [T F ] = F = T (p q) ( q r) = (T F ) ( F T ) = T (T T ) = F T = T D. S. Malik Creighton University, Omaha, NE Chapter () 5: Section 5-1 Mathematical Logic 29 / 29