Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.

Slides:



Advertisements
Similar presentations
Chapter 3 Direct Proof and Proof by Contrapositive
Advertisements

Chapter 2 Fundamentals of Logic Dept of Information management National Central University Yen-Liang Chen.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
Elementary Number Theory and Methods of Proof
CS128 – Discrete Mathematics for Computer Science
Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd.
Discrete Mathematics Math 6A Instructor: M. Welling.
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Mathematical Induction Assume that we are given an infinite supply of stamps of two different denominations, 3 cents and and 5 cents. Prove using mathematical.
Adapted from Discrete Math
Predicates and Quantifiers
Methods of Proof & Proof Strategies
Propositions and Truth Tables
Chapter 3 Section 4 – Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Review I Rosen , 3.1 Know your definitions!
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
Chapter 5 Existence and Proof by contradiction
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
Predicates and Quantified Statements
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
Chapter 2 The Logic of Quantified Statements. Section 2.1 Intro to Predicates & Quantified Statements.
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
LOGIC AND QUANTIFIERS. INTRODUCTION Many algorithms and proofs use logical expressions such as: “IF p THEN q” or “If p1 AND p2, THEN q1 OR q2” Therefore.
Chapter 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
CS104:Discrete Structures Chapter 2: Proof Techniques.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Discrete Math by R.S. Chang, Dept. CSIE, NDHU1 Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems.
Chapter 1 Logic and proofs
Chapter 1 Logic and Proof.
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
Introduction to Logic © 2008 Pearson Addison-Wesley.
Logic.
2. The Logic of Compound Statements Summary
3. The Logic of Quantified Statements Summary
DISCRETE MATHEMATICS CHAPTER I.
CSNB 143 Discrete Mathematical Structures
Lecture 1 – Formal Logic.
Truth Tables and Equivalent Statements
6/20/2018 Arab Open University Faculty of Computer Studies M131 - Discrete Mathematics 6/20/2018.
(CSC 102) Discrete Structures Lecture 2.
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
CMSC Discrete Structures
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
Information Technology Department
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley.
CHAPTER 1: LOGICS AND PROOF
Discrete Mathematics and Its Applications Kenneth H
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley.
Cs Discrete Mathematics
Predicates and Quantifiers
Foundations of Discrete Mathematics
Presentation transcript:

Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications 2.6 The Biconditional 2.7 Tautologies and Contradictions 2.8 Logical Equivalence 2.9 Some Fundamental Properties of Logical Equivalence 2.10 Quantifies Statements

2.1 Statements A statement is a declarative sentence or assertion that is true or false (but not both). Example: The integer 2 is even. The integer -4 is postive. Every statement has a true value: true (T), or false (F). We often use P, Q and R to denote statements, or perhaps P 1, P 2, …, P n if several statements are involved. For example: P 1: The integer 2 is even. P 2: The integer - 4 is positive. P 1 and P 2 are both statements, where P 1 has truth value T and P 2 has truth value F.

Sentences That are Not Statements The following sentences are NOT statements: Commands: Example: Divide 4x by the number 2 Questions: Example: Is the integer 3 even? Exclamatory: Example: What a difficult problem!

Open Sentence Example: Is “the number x is an integer” a statement? An open sentence is a declarative sentence that satisfies the following properties: It contains one or more variables, each variable representing a value in some prescribed set, called the domain of the variable; It becomes a statement when values from their respective domain are substituted for these variables. Example: The open sentence “x+4=10” is an open sentence. It is true only when x=6.

Representation An open sentence that contains a variable x is represented by P(x), Q(x), or R(x). If P(x) is an open sentence, where the domain of x is S, then we say P(x) is an open sentence over the domain S. Here P(x) is a statement for each x  S. Example: the open statement P(x): 0<x-3<5 over the domain Z is a true statement when x  {4, 5, 6, 7}, and it is a false statement otherwise.

Truth Table The possible true values of a statement are often given in a table, called a true table. Example: True table for P is P, the truth table for Q is Q T T F F The truth table for two statements P and Q is P Q T T T F F T F F What is the truth table for three statements P, Q and R? In general, a truth table involving n statements contains 2 n possible combinations of truth values for these statements.

Section 2.2 The Negation of a Statement We are interested in investigating the truth or falseness of new statements that can be produced from one or more given statements by performing certain operations on them. The negation of a statement P is the statement: not P, and is denoted by  P. Although  P could always be expressed as “It is not the case that P”. Example: P: The integer 4 is even.  P: The integer 4 is not even, or the integer is odd. P: The number e is a rational number.  P: The number e is not a rational number, or the integer e is a irrational number.

Truth Table for Negation The negation of a true statement is always false, and the negation of a false statement is always true. Here is the true table for  P (in terms of the possible truth values of P). P  P T F F T

Section 2.3 The Disjunction and Conjunction of Statements The disjunction of the statements P and Q is the statement: P or Q, and is denoted by P  Q. The disjunction is true if at least one of P and Q is true; otherwise, P  Q is false. Therefore, P  Q is true if exactly one of P and Q is true or both P and Q are true. Example: P 1: The integer 4 is even. P 2 : The integer 10 is prime. P 1  P 2: Either 4 is even or 10 is prime. It is true since at least one of P 1 and P 2 is true.

Truth Table for Disjunction For two statements P and Q, the truth table for P  Q is P Q P  Q T T T T F T F T T F F F

Conjunction of Statements The conjunction of the statement P and Q is the statement: P and Q, and is denoted by P  Q. Example: P 1: The integer 4 is even. P 2 : The integer 10 is prime. P 1  P 2: 4 is even and 10 is prime. It is false since at P 2 is false.

Truth Table for Conjunction The conjunction P  Q is true only when both P and Q are true; otherwise, P  Q is false. For two statements P and Q, the truth table for P  Q is P Q P  Q T T T T F F F T F F F F

Section 2.4 The Implication For statements P and Q, the implication is the statement: If P, then Q, and is denoted by P  Q. In addition to the wording “if P, then Q”, we also express P  Q in words as “P implies Q”. Example: P 1 : The integer 4 is even. P 2 : The integer 10 is prime. P 1  P 2 : If 4 is even, then 10 is prime. (It is false.) P 2  P 1: If 10 is prime, then 4 is even. (It is true, however.) Example: The teacher promised If you earn an A on the final exam (P), then you receive an A for your final grade (Q). Note: If P is false and Q is true, P  Q is still true since you may get an A from other reasons. If P is false and Q is false, P  Q is still true since the teacher promised nothing if you didn’t get an A on the final exam.

Truth Table for Implication Note that the only situation for P  Q is false is when P is true and Q is false, and P  Q is true otherwise. For two statements P and Q, the truth table for P  Q is P Q P  Q T T T T F F F T T F F T

Expression of the Implication The implication P  Q can be expressed a the following: If P, then Q. Q if P. P implies Q. P only if Q. P is sufficient for Q. Q is necessary for P.

Section 2.5 More on Implications Just as new statements can be formed from statements P and Q by negation, disjunction, conjunction, or implication, new open statements can be constructed from open statements in the same manner.

Example Example: Consider the open sentences P 1 : x=-2 and P 2 : |x|=2, where x  R. We can form the following open sentences.  P 1 (x): x  -2. P 1 (x)  P 2 (x): x=-2 or |x|=2. P 1 (x)  P 2 (x): x=-2 and |x|=2. P 1 (x)  P 2 (x): If x=-2, then |x|=2. For each given value of x  R, the truth value of each resulting statement can be determined.  P 1 (3) is true; P 1 (2)  P 2 (2) is true; P 1 (2)  P 2 (2) is false; P 1 (x)  P 2 (x) is true for all x  R. Why?

Example In general, the sentence P in the implication P  Q is referred to as the hypothesis or premise of P  Q, while Q is called the conclusion of P  Q. Example: Let S={2, 3, 5} and let P(n): n-1 is even, and Q(n): n+3 is odd. be open sentences over the domain S. Determine the truth or falseness of the implication for each n  S. Solution: P(2)  Q(2) is ? P(3)  Q(3) is ?

Section 2.6 The Biconditional For statement (or open sentences) P and Q, the implication P  Q is called the converse of P  Q. Example: P 1 : The integer 4 is even. P 2 : The integer 10 is prime. The converse of the implication P 1  P 2 : If 4 is even, then 10 is prime. Is the implication P 2  P 1: If 10 is prime, then 4 is even. For statements (or open sentences) P and Q, the conjunction (P  Q)  (Q  P) is called the biconditional of P and Q, is denoted by P  Q.

Truth Table for the Biconditional The truth table for the biconditional P  Q is P Q P  Q T T T T F F F T F F F T Why? We see that P  Q is true precisely when P and Q have the same truth values. The biconditional P  Q is often stated as P is equivalent to Q or P is and only if Q or P is necessary and sufficient condition for Q

Example For statements P and Q, it then follows that the biconditional “P if and only if Q” is true only when P and Q have the same truth values. Example: Consider the open sentences P 1 : x=-2 and P 2 : |x|=2, where x  R. P 1 (x)  P 2 (x): If x=-2, then |x|=2. Then P 1 (x)  P 2 (x) is false when x=2, and is true for all other real numbers x. Why? Example: Let P(x, y): |x|=|y| and Q(x, y):x=y, where (x, y)  {(6, 6), (2, -2)}. Solution: P(6, 6) is true and Q(6, 6) is true, so P(6, 6)  Q(6, 6) is true; P(2, -2) is true and Q(2, -2) is false, so P(2, -2)  Q(2, -2) is false.

Section 2.7 Tautologies and Contradictions The symbols , , , , and  are sometimes referred to as logical connectives. A compound statement is a statement composed of one or more given statements, and at least one logical connective. Example: P  (  P) is a compound statement. Furthermore, it is true regardless of the truth value of P. A compound statement S is called a tautology if it is true for all possible combinations of truth values of the component statements that comprise S. Example: P  (  P), and (  Q)  (P  Q) are both tautologies. Verify them. Example: Let P: 4 is even, then P  (  P): 4 is even or 4 is not even is always true.

Contradictions On the other hand, a compound statement S is called a contradiction if it is false for all possible combination of truth values of the component statements that are used to form S. Example: P  (  P) and (P  Q)  (Q  (  P)) are both contradictions. Verify them. Indeed, if a compound statement is a tautology, then its negation  S is a contradiction.

2.8 Logical Equivalence Give a truth table for the two statements: P  Q and (  P)  Q. If two (compound) statements R and S have the same truth values for combinations of truth values of their component statements, then we say that R and S are logically equivalent and indicate this by writing R  S. Example: P  Q  (  P)  Q.

Logically Equivalence and Tautology Suppose R and S are logically equivalent compound statements. Then by the definition, the biconiditional R  S is true for all possible combinations of truth values of their component statements and hence R  S is a tautology. Conversely, if R  S is a tautology, then R and S are logically equivalent. Theorem Let P and Q be two statements. Then P  Q and (  P)  Q. are logically equivalent. P  Q can be expressed as “P if and only if Q”, and “P is necessary and sufficient for Q”.

Section 2.9 Some Fundamental Properties of Logical Equivalence Verify the following by means of a truth table. P   (  P) Theorem For statements P, Q and R, 1.Commutative Laws (a)P  Q  Q  P (b) P  Q  Q  P 2. Associative Laws (a)P  (Q  R)  (P  Q)  R (b)P  (Q  R)  (P  Q)  R 3. Distributive Laws (a)P  (Q  R)  (P  Q)  (P  R) (b)P  (Q  R)  (P  Q)  (P  R)

Theorem 4. De Morgan’s Laws (a)  (P  Q)  (  P)  (  Q) (b)  (P  Q)  (  P)  (  Q) Each part of the theorem can be verifies by means of a truth table. The laws given here, together with other known logical equivalences, can be used to good advantage at times to prove other logical equivalences (without introducing a truth table). Theorem: For statements P and Q, (a)  (P  Q)  (P)  (  Q) (b)  (P  Q)  ((P)  (  Q))  ((Q)  (  P))

Section 2.10 Quantified Statements There is a method that an open sentence can be converted into a statement, called quantification. Let P(x) be an open sentence over a domain S. Adding the phrase “For every x  S” to P(x) produces a statement called a quantified statement. The phrase “for every” is referred to as the universal quantifier and is denoted by the symbol . Other ways to express the universal quantifier are “for each” and “for all”.

Universal Quantifier This quantified statement is expressed in symbols by  x  S, P(x) (1) and is expressed in words by For every x  S, P(x). The quantified statement (1) is true if P(x) is true for every x  S; while the quantified statement (1) is false if P(x) is false for at least one element x  S.

Examples Note that the quantified statement  x  S, P(x) can be expressed as If x  S, then P(x). Example:  x  R, x 2 ≥0 can be expressed as For every real number, x 2 ≥0. or If x is a real number, then x 2 ≥0. Notices that  x  R, x 2 ≥0 is true since x 2 ≥0 is true for every real number x. Example:  x  R, x 2 >0 is false when x=0.

Existential Quantifier Another way to convert an open sentence P(x) over a domain S into a statement is by a quantifier called an existential quantifier. Each of the phrases “there exists”, “there is”, “for some”, and for “at least one” is referred to as an existential quantifier and is denoted by the symbol . This quantified statement is expressed in symbols by  x  S, P(x) (1) and is expressed in words by There exists x  S such that P(x). The quantified statement (1) is true if P(x) is true for at least one element x  S; while the quantified statement (1) is false if P(x) is false for all x  S.

Examples Example:  x  R, x 2 >0 is true, but  x  R, x 2 <0 false. Generally, if we are considering an open sentence P(x) over a domain S, then  (  x  S, P(x))   x  S,  P(x). And  (  x  S, P(x))   x  S,  P(x). Example:  (  x  R, x 2 ≤0)   x  R, x 2 >0). Example:  (  x  R, 3x=12)   x  R, 3x≠12.

Example The statement There exists a real number x such that x 2 =3. Express this using a quantifier.  x  R, x 2 =3. Is it true or false? True. Express in word the negation of the statement. For every real number x, x 2 ≠3. Express the negation of the statement in symbols.  x  R, x 2 ≠3. False.

Generalized Case Let P(x, y) be an open sentence, where the domain of the variable x in S and domain of the variable y is T. The quantified statement For all x  S and y  T, P(x, y). Can be expressed symbolically as  x  S,  y  T, P(x, y). (1) The negation of the statement  (  x  S,  y  T, P(x, y))   x  S,  y  T,  P(x, y).