Understanding Propositional Logic Fundamentals

Slide Note
Embed
Share

Exploring the key concepts in propositional logic including conditional statements, converse, contrapositive, inverse, biconditionals, logical equivalence, operator precedence, and truth tables. Learn about the importance of truth values and logical equivalences in compound propositions.


Uploaded on Sep 22, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. CS 220: Discrete Structures and their Applications Propositional Logic (cont) Section 1.3-1.5 in zybooks

  2. Conditional statements The conditional statement p q means p implies q or p is sufficient for q This is different from an if statement! p T T F F q T F T F p q T F T T The expression p implies q is true if p = false or q = true Think of implies as a contract: the only way for the contract to be broken is that the condition is true but the consequence is false. p q is the same as p q Why? Build the truth table for p q

  3. The converse, contrapositive, and inverse p T T F F q T F T F p q T F T T A few statements related to p q: The converse of p q is q p. The contrapositive of p q is q p. The inverse of p q is p q. One of the three is equivalent to the original conditional, WHICH ONE? How do you know?

  4. The converse, contrapositive, and inverse p T T F F q T F T F p q T F T T A few statements related to p q: The converse of p q is q p. The contrapositive of p q is q p. The inverse of p q is p q. The contrapositive is equivalent to the original conditional. The converse and inverse are equivalent to each other.

  5. Biconditionals The biconditional statement p q means p if and only if q or p iff q p T T F F q T F T F p q T F F T p q has the same truth value as (p q) (q p)

  6. Conditionals and operator precedence Conditionals have lower precedence than conjunction and disjunction. Operator precedence: Negation Conjunction Disjunction Conditional Bi-conditional 1. 2. 3. 4. 5. Be smart, use parentheses!

  7. Logical equivalence Compound propositions that have the same truth values in all cases are called logically equivalent ( ). Example: p q p q p T T F F q T F T F p F F T T p q T F T T p q T F T T

  8. Equivalence of propositions using truth tables p q p q q p (p q) p q (q p) T F F T T T F F T F T F T F T T T T F T T F F T The last two columns have the same values, so the propositions are logically equivalent

  9. Tautology and Contradiction A tautology is a compound proposition that is always true. A contradiction is a compound proposition that is always false. A contingency is neither a tautology nor a contradiction.

  10. Examples p p p p p p T F T F F T T F Which is a tautology and which is a contradiction?

  11. Logical equivalence revisited Compound propositions that have the same truth values in all cases are called logically equivalent Propositions s and r are logically equivalent if and only if the proposition s r is a tautology.

  12. De Morgans Laws ( ( ) ) De Morgan s Laws: p q p q p q p q Very useful for logical reasoning and manipulating logical statements! p and q is false iff p is false or q is false p or q is false iff p is false and q is false

  13. Equivalence of (p q) and p q Proof of logical equivalence using a truth table: p q p q p q (p q) p q T T F F T F F T F F T F T T F T T F F T T F F T T F T T

  14. Idempotent laws: Associative laws: Commutative laws: Distributive laws: Identity laws: Domination laws: Double negation law: Complement laws: De Morgan's laws: Absorption laws: Conditional identities: p -> q p q p p p ( p q ) r p ( q r ) ( p q ) r p ( q r ) p q q p p ( q r ) ( p q ) ( p r ) p ( q r ) ( p q ) ( p r ) p F p p T p p F F p T T p p p p F p p T F T T F ( p q ) p q ( p q ) p q p (p q) p p (p q) p p p p p q q p p q ( p q ) ( q p )

  15. p qr ( ) p q ( ) p r ( ) The distributive law (p q) (p r) F F p q r q r p (q r) p q p r F F F F F T F F F F F F F T F T F F F F F F F T T T T T F F T T T F T F T T F F F T T T T T T T T T T T T T T T T T T T T T

  16. More equivalences for conditionals/biconditionals p q p q p q q p p q ( ) p q ( ) q p ( ) p q p q p q p q p q ( ) p q

  17. Biconditional equivalence p q p q (p q) p q T T T F F T F F T T F T F T T F F T F F

  18. Simplifying propositions using laws of propositional logic Prove that: (p q) ( p q) p Proof. (p q) ( p q) De Morgan s law ( p q) ( p q) distributive law p ( q q) complement law p T identity law p

  19. Using equivalences to prove new facts prove: is a tautology definition of implies (p q) (p q) ( p q) (p q) ( p p) ( q q) T T T De Morgan s law the commutative law the complement law

  20. English to Logic Consider the propositions: p Grizzly bears have been seen in the area q Hiking is safe on the trail r Berries are ripe along the trail Translate from English to logic: Berries are ripe along the trail, but grizzly bears have not been seen in the area

  21. English to Logic Consider the propositions: p Grizzly bears have been seen in the area q Hiking is safe on the trail r Berries are ripe along the trail Translate from English to logic: If berries are ripe along the trail, hiking is safe if and only if grizzly bears have not been seen in the area

  22. English to Logic Consider the propositions: p Grizzly bears have been seen in the area q Hiking is safe on the trail r Berries are ripe along the trail Translate from English to logic: Hiking is not safe on the trail whenever grizzly bears have been seen in the area and berries are ripe along the trail

Related