170 likes | 309 Vues
This chapter introduces the concepts of logical form and logical equivalence in compound statements. It explains what constitutes a statement, distinguishing between statements and non-statements. The chapter covers logical operators, including conjunction (AND), disjunction (OR), and negation (NOT), along with their symbolic representations. Examples illustrate how to construct compound statements and truth tables for various operators, illustrating their truth values. Additionally, it discusses logical equivalence, DeMorgan's Laws, tautologies, and contradictions. A quiz is scheduled, and homework is due soon.
E N D
Chapter 1 The Logic of Compound Statements
Section 1.1 Logical Form and Logical Equivalence
Statements • A statement is a sentence that is either true or false, but not both. • Statements: • It is raining. • I am carrying an umbrella. • Not statements • He has a driver’s license. • Are you there? • x + y > 0
Logical Operators • Binary operators • Conjunction – “and”. • Disjunction – “or”. • Unary operator • Negation – “not”. • Other operators • XOR – “one or the other but not both”” • NAND – “not both” • NOR – “neither”
Logical Symbols • Statements are represented by letters: p, q, r, etc. • means “and”. • means “or”. • means “not”.
Examples • Basic statements • p = “It is raining.” • q = “I am carrying an umbrella.” • Compound statements • pq = “It is raining and I am carrying an umbrella.” • pq = “It is raining or I am carrying an umbrella.” • p = “It is not raining.”
Examples • But compound statements • “it is not hot but it is sunny.” • but in this case is ^ “and” • p = “it is not hot” • q = “it is sunny” • expression: p ^ q • “it is not hot and it is not sunny”
Truth Table of an Expression • Make a column for every variable. • List every possible combination of truth values of the variables. • Make one more column for the expression. • Write the truth value of the expression for each combination of truth values of the variables.
Truth Table for “AND” • pq is true if p is true and q is true. • pq is false if p is false or q is false.
Truth Table for “OR” • p q is true if p is true or q is true. • p q is false if p is false and q is false.
Truth Table for “not” • p is true if p is false. • p is false if p is true.
Example: Truth Table • Truth table for the statement (p) (q r ).
Logical Equivalence • Two statements are logically equivalent if they have the same truth values for all combinations of truth values of their variables.
Example: Logical Equivalence • (p q) (p q) (p q) (p q)
DeMorgan’s Laws • (pq) (p) (q) • (pq) (p) (q) • It is not true that “John is short and he is fat”, then it is true that “John is not short or John is not fat”. • If it is not true that x 5 or x 10, then it is true that x > 5 and x < 10.
Tautologies and Contradictions • A tautology is a statement that is logically equivalent to T. • A contradiction is a statement that is logically equivalent to F. • Some tautologies: • pp • pq (pq) • Some contradictions: • pp • pq (pq)
Wrapup • Quiz on Tuesday (Chapter 1) • Homework due Thursday