Logic Logic is study of abstract reasoning, specifically, concerned with whether reasoning is correct. Logic focuses on relationship among statements as opposed to the content of any particular statement. 1 Example Seuence of statements: 1 All students take Math 112. 2 Anyone who takes Math 112 is a Math major. 3 herefore, all students are Math majors. If 1 and 2 were true, then logic would assure that 3 is true. 2 Outline of logic topics Simple Statements Compound Statements Conditional Statements Quantified Statements Valid and Invalid Arguments for all kind of statements Logical Statements Definition: A statement is a sentence that is true or false but not both. Examples: 3+5=8 true statement t t oday is riday false statement Note: x>y is not a statement 4 Logical Connectives Operator Symbol Usage Negation not Conjunction and Disjunction or Exclusive or xor Conditional if, then Biconditional iff Logical Connectives or given statements p and : Negation of p: ~p not p Conjunction of p and : p p and p Disjunction of p and : p or Lecture 1 5 6
ruth table for negation ruth table for conjunction p ~p rue only if both statements are true p p 7 8 ruth table for disjunction alse only if both statements are false p p 9 Statement form Expression made up of statement variables such as p,and logical connectives becomes a statement when actual statements are substituted for the variables. Example: Exclusive Or p ~ p p 10 ruth able for a Statement orm Ex: ruth table for ~ p p p ~p p ~ p p Conditional Implication English usage of if, then or implies DE: p is true if is true, or if p and are both false. Semantics: p implies is true if one can mathematically derive from p. 11 Lecture 1 12
Conditional -- truth table p p Conditional Q: Does this makes sense? Let s try examples for each row of truth table: 1. If pigs like mud then pigs like mud. 2. If pigs like mud then pigs can fly. 3. If pigs can fly then pigs like mud. 4. If pigs can fly then pigs can fly. Lecture 1 13 Lecture 1 14 Bi-Conditional -- truth table or p to be true, p and must have the same truth value. Else, p is false: p p Bi-Conditional A : has exactly the opposite truth table as. his means that we could have defined the bi-conditional in terms of other previously defined d symbols, so it is redundant. d In fact, only really need negation and disjunction to define everything else. Extra operators are for convenience. Q : Which operator is the opposite of? 15 Lecture 1 16 Logical euivalence Statements P and Q are logically euivalent: P Q if and only if they have identical truth values for each substitution of their component statement variables. Ex: xyyx Verifying logical euivalence Ex: ~ p ~ p~ p ~p ~ p ~ p ~ p ~ 17 18
Important Logical Euivalences Double negation: ~ ~ p p De Morgan s laws: ~ p ~ p ~ ~ p ~ p ~ Ex: negation of -5 < x < 7 is x 5 or x 7 autologies and Contradictions autology is a statement form which is true for all values of statement variables. Eg E.g., x ~x is a tautology: x ~ x t Contradiction is a statement form which is false for all values of statement variables. E.g., x ~x is a contradiction: x ~ x c 19 20 More Logical Euivalences Commutative laws: p p p p Associative laws: Distributive laws: Absorption laws: p r p r p r p r p r p p r p r p p r p p p p p p Simplifying Statement orms ~ p ~ p ~ p p by De Morgan' s law ~ p p by distributive law t by negation law by identity law 21 22 SEAWORK Write on a piece of yellow paper 23 24
1 Let p and be the propositions he election is decided and he votes have been counted, respectively. Express each of these compound propositions as an English sentence. a p b p c p d p e p f p g p h p 2 Let p,, and r be the propositions p :You get an A on the final exam. :You do every exercise in this book. r :You get an A in this class. Write these propositions using p,, and r and logical connectives including negations. a You get an A in this class, but you do not do every exercise in this book. 25 26 b You get an A on the final, you do every exercise in this book, and you get an A in this class. c o get an A in this class, it is necessary for you to get an A on the final. d You get an A on the final, but you don t do every exercise in this book; nevertheless, you get an A in this class. e Getting an A on the final and doing every exercise in this book is sufficient for getting an A in this class. 27 3 Construct a truth table for each of these compound propositions. a p p b p c p p d p p 28