Chapter 2 Logic 2.1
Total Page:16
File Type:pdf, Size:1020Kb
Chapter 2 Logic 2.1 Proposition and logical operations Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math theory, but also in the real world any time someone is trying to convince you of something. To analyze an argument, we break it down into smaller pieces: statements, logical connectives and quantifiers. Statements • A statement is a declarative sentence that is either true or false (but not both at the same time) • A compound statement consists of simple statements combined using logical connectives like and, or, not, if…then. • The negation of a statement must have the opposite truth value to the original statement Connectives and Symbols Type of Connective Symbol Statement and Ù conjunction or Ú disjunction not ~ negation Quantifiers • Universal quantifier: all, every, each. Statement is true if the claim is true for every object it is referring to. • Existential quantifier: some, there exists, for at least one. Statement is true if the claim is true for al least one object it is referring to. Negations of Quantified Statements Statement Negation Some do not All do Not all do None do Some do All do not Truth Tables • Shows truth value of a compound statement for all possible truth values of the component statements • If there are n component statements, then the truth table has 2n rows Conjunction p q p Ù q T T T T F F F T F F F F Disjunction p q p Ú q T T T T F T F T T F F F Negation p ~p T F F T Logical connectives • Connectives are used to create a compound proposition from two or more propositions – Negation (denote ¬ or !) $\neg$ – And or logical conjunction (denoted Ù) $\wedge$ – Or or logical disjunction (denoted Ú) $\vee$ – XOR or exclusive or (denoted Å) $\xor$ – Implication (denoted Þ or ®) $\Rightarrow$, $\rightarrow$ – Biconditional (denoted Û or «) $\LeftRightarrow$, $\leftrightarrow$ • We define the meaning (semantics) of the logical connectives using truth tables Precedence of Logical Operators • As in arithmetic, an ordering is imposed on the use of logical operators in compound propositions • However, it is preferable to use parentheses to disambiguate operators and facilitate readability ¬ p Ú q Ù ¬ r º (¬p) Ú (q Ù (¬r)) • To avoid unnecessary parenthesis, the following precedences hold: 1. Negation (¬) 2. Conjunction (Ù) 3. Disjunction (Ú) 4. Implication (®) 5. Biconditional («) Terminology: Tautology, Contradictions, Contingencies • Definitions – A compound proposition that is always true, no matter what the truth values of the propositions that occur in it is called a tautology – A compound proposition that is always false is called a contradiction – A proposition that is neither a tautology nor a contradiction is a contingency • Examples – A simple tautology is p Ú ¬p – A simple contradiction is p Ù ¬p Equivalent Statements • Two statements are equivalent if they have the same truth value for every possible situation, and we write p ≡ q • De Morgan’s Laws: ~(p Ù q) ≡ ~p Ú ~q ~(p Ú q) ≡ ~p Ù ~q Logical Equivalences: Definition • Definition: Propositions p and q are logically equivalent if p « q is a tautology. • Informally, p and q are equivalent if whenever p is true, q is true, and vice versa • Notation: p º q (p is equivalent to q), p « q, and p Û q • Alert: º is not a logical connective $\equiv$ Logical Equivalences: Example 1 • Are the propositions (p ® q) and (¬p Ú q) logically equivalent? • To find out, we construct the truth tables for each: p q p®q ¬p ¬pÚq 0 0 0 1 1 0 1 1 The two columns in the truth table are identical, thus we conclude that (p ® q) º (¬p Ú q) Example: Constructing a Truth Table Construct the truth table for: p ˄ (~ p ˅ ~ q) A logical statement having n component statements will have 2n rows in its truth table. 22 = 4 rows p q ~ p ~ q ~ p ˅ ~ q p ˄ (~ p ˅ ~ q) T T F T F F F T T F F T Example: Constructing a Truth Table Construct the truth table for: p ˄ (~ p ˅ ~ q) A logical statement having n component statements will have 2n rows in its truth table. 22 = 4 rows p q ~ p ~ q ~ p ˅ ~ q p ˄ (~ p ˅ ~ q) T T F F T F F T F T T F F F T T Example: Constructing a Truth Table Construct the truth table for: p ˄ (~ p ˅ ~ q) A logical statement having n component statements will have 2n rows in its truth table. 22 = 4 rows p q ~ p ~ q ~ p ˅ ~ q p ˄ (~ p ˅ ~ q) T T F F F T F F T T F T T F T F F T T T Example: Constructing a Truth Table Construct the truth table for: p ˄ (~ p ˅ ~ q) A logical statement having n component statements will have 2n rows in its truth table. 22 = 4 rows p q ~ p ~ q ~ p ˅ ~ q p ˄ (~ p ˅ ~ q) T T F F F F T F F T T T F T T F T F F F T T T F Examples .