ruth ellers, Liars, and Propositional Logic Reading: EC 1.3 Peter J. Haas INO 150 all Semester 2018 Lecture 3 1/ 17
ruth ellers, Liars, and Propositional Logic Smullyan s Island Propositional Logic ruth ables for ormal Propositions Logical Equivalence he Big Honking heorem Lecture 3 2/ 17
Smullyan s Island You meet two inhabitants of Smullyan s Island. A says exactly one of us is lying. B says at least one of us is telling the truth. Who (if anyone) is telling the truth? Strategy: ocus on the statements, not on who said them Lecture 3 3/ 17
ruth able Analysis Notation I p = A is truthful I q = B is truthful Statement 1: Statement 2: p q Exactly one is lying At least one is truthful * Answer: Both A and B are liars Lecture 3 4/ 17
Another Smullyan s Island Example he statements I A: Exactly one of use is telling the truth I B: We are all lying I C: he other two are lying x Statement 1: Statement 2: Statement 3: p q r Exactly one truthful All lying A & B lying * Answer: A is truthful; B and C are liars Lecture 3 5/ 17
Inconclusive or a Paradox p Statement 1: Iamtellingthetruth * * p Statement 1: Iamlying Inconclusive than more row one works A paradox ng rows work Lecture 3 6/ 17
' Propositional Logic Notation. &9 examples Definitions Proposition: A sentence that is unambiguously true or false I Propositional variable: Represents a proposition (= or ) ormal proposition: Proposition written in formal logic notation Rules of formal propositions (Ps) 1. Any propositional variable is an P 2. p and q are Ps ) p ^ q is an P (p and q are true) 3. p and q are Ps ) p _ q is an P (p or q or both are true) 4. p is an P ) p is an P (not p) p, q, r in previous Example: (p _ q) ^ (p _ q) is a formal proposition Precedence: highest, then ^, then_ (like,, and +) I Ex: p ^ q _ p = ( p) ^ ( q) _ p Yay xx ) 4 t Y : X t 43 ) Lecture 3 7/ 17
. Vaq Logic Notation: Examples Example 1: p = A is truthful and q = B is truthful I A is lying: 7 Example 2: e = Sue is an English major and j = Sue is a Junior I Sue is a Junior English major: p I At least one of us is truthful: pug v I Either B is lying or A is: p ( pm Cn pre ) q) I Exactly one of us is lying (exclusive or): tip u ng In Gp mg ) end I Sue is either an English major or she is a Junior: I Sue is a Junior, but she is not an English major: I Sue is neither an English major nor a Junior: evj I Sue is exactly one of the following: an English major or a Junior: ( emj ) ul en 's ) cevjjr Cen ; ) Lecture 3 8/ 17 > er j me rn j or 7 u fevj )
ruth ables for ormal Propositions p q p ^ q p q p _ q p p Lecture 3 9/ 17
ruth able Examples: Complex ormulas Example 1: p ^ q I b p q q p ^ q Example 2: (p _ q) ^ (p ^ q) I exclusive on ). p q p ^ q (p ^ q) p _ q (p _ q) ^ (p ^ q) f f f f s f f f Lecture 3 10/ 17
Negation and Inequalities Example 1 I p = ammy has more than two children " at most I has two or fewer children or p =: ammy I If c = number of children, then, mathematically, p = ( c > h ) p = 4523 Example 2 I Someone tells us that the value of c is three I What does this mean? I Which is true: p or p? ammy has three children p is true 2 children " Lecture 3 11/ 17
Negation and Logical Equivalence Definition wo statements are logically equivalent if they have the same truth value for for every row of the truth table Example: Sue is neither an English major nor a Junior j e j _ e (j _ e) j e j e j ^ e f f f f f f f q A Lecture 3 12/ 17
DeMorgan s Laws and Negation Proposition (DeMorgan s Laws) Let p and q be any propositions. hen 1. (p _ q) is logically equivalent to p ^ q 2. (p ^ q) is logically equivalent to p _ q proof by truth table Proof: Via truth tables Example I Sue is not both a Junior and an English major : (j ^ e) I Use DeMorgan s laws to given an equivalent statement: Sue j v e is not a junior or sue is not an english major Lecture 3 13/ 17
. It. he Double Negative Property Proposition (Double Negative Property) Let p be any proposition. hen ( p) p. Proof: w I p p ( p) Example: Negate Sue is a Junior but not an English major two ways ( j n n e ), and j nee ) is not true that sue is a Junior but not English ' v j nee ) = j v e Either : sue is not a junior or is an sue english major Example: John got a B on the test = (g 80) ^ (g < 90) [where g =Johnsscore] I Write the negation in math and English: 7kg 380 ) Alga90 ) ) = rigs so ) V 7cg 290 ) = ( ga 80 ) v C 9390 ) Either Johns grade was a 80 or 390 Lecture 3 14/ 17
. autology and Contradiction Definition 1. A tautology is a proposition where every row of the truth table is true 2. A contradiction is a proposition where every row of the truth table is false p q p q p _ q p _ q (p _ q) _ ( p _ q) I f t f p x tautology p p p ^ p f f contradiction Lecture 3 15/ 17
U he Big Honking heorem (BH) of Propositions heorem Let p, q and r stand for any propositions. Let t indicate a tautology and c indicate a proposition. hen: (a) Commutive p ^ q q ^ p p _ q q _ p (b) Associative (p ^ q) ^ r p ^ (q ^ r) (p _ q) _ r p _ (q _ r) (c) Distributive p ^ (q _ r) (p ^ q) _ (p ^ r) p _ (q ^ r) (p _ q) ^ (p _ r) (d) Identity p ^ t p p _ c p (e) Negation p _ p t p ^ p c (f) Double negative ( p) p (g) Idempotent p ^ p p p _ p p (h) DeMorgan s laws (p ^ q) p _ q (p _ q) p ^ q (i) Universal bound p _ t t p ^ c c (j) Absorption p ^ (p _ q) p p _ (p ^ q) p (k) Negations of t and c t c c t 5specially ol ' values with it lol Does this look familiar? my and Vet, sets Cto be a evened ) i v and A = A Substitution Rule: You can replace a formula with a logically equivalent one Lecture 3 16/ 17
Proving Logical Equivalences Ex: Use BH plus substitution to prove that p _ ( p ^ q) p _ q p _ ( p ^ q) =(p _ p) ^ (p _ q) (c) Distributive = t ^ (p _ q) (e) Negation =(p _ q) ^ t (a) Commutative = p _ q (d) Identity Lecture 3 17/ 17
Another Example Ex: Use BH plus substitution to prove that p ^ ( p _ q) p ^ q a Distribuk 've ) =pry vlpnq (Prg = ) Vc Ldl Identity c Negation pntpvqflpmpjvfp.iq = ) caicommutative Lecture 3 18/ 18