logic
play

Logic 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 of 1 - PowerPoint PPT Presentation

Logic http://localhost/~senning/courses/ma229/slides/logic/slide01.html Logic http://localhost/~senning/courses/ma229/slides/logic/slide02.html Logic prev | slides | next prev | slides | next Propositions A proposition is a statement that is


  1. Logic http://localhost/~senning/courses/ma229/slides/logic/slide01.html Logic http://localhost/~senning/courses/ma229/slides/logic/slide02.html Logic prev | slides | next prev | slides | next Propositions A proposition is a statement that is either true or false, but not both. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Logic 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 of 1 08/26/2003 03:33 PM 1 of 1 08/26/2003 03:33 PM Logic http://localhost/~senning/courses/ma229/slides/logic/slide03.html Logic http://localhost/~senning/courses/ma229/slides/logic/slide04.html Logic Logic prev | slides | next prev | slides | next Propositions: Example Propositions The following statements are propositions: We usually use lowercase letters for propositions: 2 + 2 = 4 p, q, r, ... I am an American my hair is blue Let p be a proposition. The negation of p is written p (or p’ ) and is read "not p ." The following statements are not propositions: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 + 8 Simon says "sit down" Do you want to go to the store? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 of 1 08/26/2003 03:33 PM 1 of 1 08/26/2003 03:34 PM

  2. Logic http://localhost/~senning/courses/ma229/slides/logic/slide05.html Logic http://localhost/~senning/courses/ma229/slides/logic/slide06.html Logic Logic prev | slides | next prev | slides | next Truth Tables Conjunctions A truth table is a useful tool with which to analyse propositions. It Let p and q be propositions. The proposition " p and q ", denoted p works by listing all possible truth values of a set of propositions. q , is true when p and q are both true, otherwise it is false. All possible truth values of the proposition p are listed in the truth We say that p q is the conjunction of p and q . table p : eyes are blue q : hair is brown p p t f p q : eyes are blue and hair is brown. f t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 of 1 08/26/2003 03:34 PM 1 of 1 08/26/2003 03:34 PM Logic http://localhost/~senning/courses/ma229/slides/logic/slide07.html Logic http://localhost/~senning/courses/ma229/slides/logic/slide08.html Logic Logic prev | slides | next prev | slides | next Disjunctions Truth Tables for Conjunctions and Disjunctions Let p and q be propositions. The proposition " p or q ", denoted p q , conjunction disjunction is false when p and q are both false and true otherwise. p q p q p q p q We say that p q is the disjunction of p and q . t t t t t t t f f t f t p : eyes are blue q : hair is brown f t f f t t f f f f f f p q : eyes are blue or hair is brown. Notice how the number of rows depends on the number of 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 propositions. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 of 1 08/26/2003 03:34 PM 1 of 1 08/26/2003 03:34 PM

  3. Logic http://localhost/~senning/courses/ma229/slides/logic/slide09.html Logic http://localhost/~senning/courses/ma229/slides/logic/slide10.html Logic Logic prev | slides | next prev | slides | next Exclusive Or Exclusive Or There are two different types of "or" operations in logic. Let p and q be propositions. The proposition denoted p xor q is the exclusive or of p and q and is true when exactly one of p and q is 1. If you’ve had MA141 or PH121 then you are good at true and the other is false. mathematics. exclusive or 2. You may choose the pizza or the porkchop. p xor q p q The first of these is the disjunction form. The second "or" is an t t f exclusive or ; you can have one or the other but not both. t f t f t t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 f f f 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 of 1 08/26/2003 03:34 PM 1 of 1 08/26/2003 03:34 PM Logic http://localhost/~senning/courses/ma229/slides/logic/slide11.html Logic http://localhost/~senning/courses/ma229/slides/logic/slide12.html Logic Logic prev | slides | next prev | slides | next Implications Implications Implications are also called conditionals and are usually read "if p Let p and q be propositions. The implication p q is the then q ." proposition that is false when p is true and q is false and is true otherwise. It is read " p implies q ." Consider the following statement: Here p is the hypothesis and q is the conclusion . if I can write then I can read. p q implication p q p q When is this true? When is this false? Is it always either true or false? t t t t f f 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 f t t f f t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 of 1 08/26/2003 03:34 PM 1 of 1 08/26/2003 03:34 PM

  4. Logic http://localhost/~senning/courses/ma229/slides/logic/slide13.html Logic http://localhost/~senning/courses/ma229/slides/logic/slide14.html Logic Logic prev | slides | next prev | slides | next Biconditionals Converse and Contrapositive Consider the compound proposition The converse of p q is q p . Note that the the truth value of an implication and its converse are not necessarily the same. ( p q ) ( q p ) The contrapositive of p q is q p . Note that these have the This is called a biconditional and is read " p if and only if q ." We same truth values. denote this proposition with " p q ." p q p q p q q p q p p q p q q p p q t t f f t t t t t t t t t f f t f t f t f f t f f t t f t f t f t t f f f f t t t t t f f t t t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 of 1 08/26/2003 03:34 PM 1 of 1 08/26/2003 03:34 PM Logic http://localhost/~senning/courses/ma229/slides/logic/slide15.html Logic http://localhost/~senning/courses/ma229/slides/logic/slide16.html Logic Logic prev | slides | next prev | slides | next Propositional Equivalences Propositional Equivalences Key Idea A compound proposition is one involving more than one simple proposition. For example p q is a compound proposition made up Replace one proposition by another that is equivalent in order to of the two simple propositions p and q . achieve a desireable goal. A compound proposition is a tautology if it is always true and it is Example: p can always be replaced by ( p ) since a truth table a contradiction if it is always false; otherwise it is called a indicates that both p and ( p ) have the same truth values. contingency . The propositions p and q are logically equivalent if p q is a p p ( p ) tautology. We use the notation p q to denote logical equivalence. t f t f t f 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 of 1 08/26/2003 03:34 PM 1 of 1 08/26/2003 03:34 PM

  5. Logic http://localhost/~senning/courses/ma229/slides/logic/slide17.html Logic http://localhost/~senning/courses/ma229/slides/logic/slide18.html Logic Logic prev | slides | next prev | slides | next Exercises Logical Equivalences Use truth tables to show the following: Equivalence Name p T p 1. p ( q r ) ( p q ) ( p r ). Identity laws p F p 2. p q is logically equivalent to ( p q ) ( p q ). p T T Domination laws 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 p F F p p p Idempotent laws p p p Double negation law ( p) p 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 of 1 08/26/2003 03:34 PM 1 of 1 08/26/2003 03:34 PM Logic http://localhost/~senning/courses/ma229/slides/logic/slide19.html Logic prev | slides | next Logical Equivalences Equivalence Name p q q p Commutative laws p q q p ( p q ) r p ( q r ) Associative laws ( p q ) r p ( q r ) p ( q r ) ( p q ) ( p r ) Distributive laws p ( q r ) ( p q ) ( p r ) ( p q ) p q De Morgan’s laws ( p q ) p q 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 of 1 08/26/2003 03:34 PM

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend