propositional logic
play

Propositional Logic Jason Filippou CMSC250 @ UMCP 05-31-2016 - PowerPoint PPT Presentation

Propositional Logic Jason Filippou CMSC250 @ UMCP 05-31-2016 Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 1 / 38 Outline 1 Syntax 2 Semantics Truth Tables Simplifying expressions 3 Inference Valid reasoning Basic rules


  1. Propositional Logic Jason Filippou CMSC250 @ UMCP 05-31-2016 Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 1 / 38

  2. Outline 1 Syntax 2 Semantics Truth Tables Simplifying expressions 3 Inference Valid reasoning Basic rules of inference Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 2 / 38

  3. Propositional Logic: Overview Propositional logic is the most basic kind of Logic we will examine, and arguably the most basic kind of Logic there is. It uses symbols that evaluate to either True or False , combinations of those symbols (which we call compound statements ), as well as a set of equivalences and inference rules . Its simplicity allows it to be implemented in computer hardware! Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 3 / 38

  4. Propositional Logic: Overview We will study Propositional (and “Predicate” logic) in three (unbalanced) steps: Syntax. Semantics. Inference (or “Proof theory”). Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 4 / 38

  5. Syntax Syntax Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 5 / 38

  6. Syntax Syntax Syntax in Propositional Logic is very easy to grasp. Components: The (self-explanatory) constant symbols True and False . A pre-defined vocabulary of propositional symbols which we usually denote P . Those “map” to either True or False . Often-used symbols: p, q, r . . . The negation operator ∼ , applied on propositional symbols in P . Examples: ∼ p (“not” p ), ∼∼ p (“not not p ”). The binary operators of conjunction ( ∧ ) and disjunction ( ∨ ). Examples: p ∧ q , p ∨ ∼ q , q ∧ q . The left and right parentheses ( ( , ) ), used to group terms for prioritization of execution or readability. Examples: ( p ), ((((( . . . ( p ) . . . ))))), ( p ∧ q ) ∨ z , p ∧ ( q ∨ z ). The binary connectives of implication (“if-then”) ( ⇒ ), bi-conditional (“if and only if”, commonly abbrv. iff )( ⇔ ) and logical equivalence : ≡ . Examples: p ⇒ r , p ⇔ ( q ∧ ∼ r ), p ∧ p ≡ p , ( p ∧ q ) ∨ ( p ∧ ∼ q ) ≡ p . Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 6 / 38

  7. Syntax Recap Syntax for Propositional Logic consists of: { True, False, P , ∼ , ∧ , ∨ , ( , ) , ⇒ , ⇔ , ≡} . So what do all of these symbols mean ? Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 7 / 38

  8. Semantics Semantics Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 8 / 38

  9. Semantics Constants / Propositional Symbols True and False should be self-explanatory, intuitive symbols. Without agreement on what they mean, we can go no further. Think about them like the notions of a point and a line in Euclidean Geometry. Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 9 / 38

  10. Semantics Propositional Symbols and Interpretation Think of a Propositional Symbol like a binary variable with domain True, False. Anything that can be either true or false in our world can be modelled by such a symbol. E.g the symbol rain is True if it’s raining today, False otherwise. Probabilities? Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 10 / 38

  11. Semantics Truth Tables Truth Tables Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 11 / 38

  12. Semantics Truth Tables Negation Operator Beginning from the definitions of our truth assignments for constants and propositional symbols, we can assign truth to every compound statement we can build with our syntax. Basic instrument for doing this: Truth Tables . E.g negation operator truth table: p ∼ p False True True False Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 12 / 38

  13. Semantics Truth Tables Conjunction / Disjunction What would the truth table for conjunction and disjunction be? Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 13 / 38

  14. Semantics Truth Tables Conjunction / Disjunction What would the truth table for conjunction and disjunction be? p q p ∧ q p ∨ q F F F F F T F T T F F T T T T T Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 13 / 38

  15. Semantics Truth Tables Binary connectives Implication: Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 14 / 38

  16. Semantics Truth Tables Binary connectives Implication: p q p ⇒ q F F T F T T T F F T T T Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 14 / 38

  17. Semantics Truth Tables Binary connectives Implication: p q p ⇒ q F F T F T T T F F T T T Bi-conditional: Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 14 / 38

  18. Semantics Truth Tables Binary connectives Implication: p q p ⇒ q F F T F T T T F F T T T Bi-conditional: p ⇔ q p q F F T F T F T F F T T T Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 14 / 38

  19. Semantics Truth Tables Natural language examples Let’s convert the following natural language statements to propositional logic: 1 It’s rainy and gloomy. 2 I will pass 250 if I study. 3 I will pass 250 only if I study. 4 THOU SHALT NOT PASS. 5 All work and no play makes Jack a dull boy. Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 15 / 38

  20. Semantics Simplifying expressions Simplifying expressions Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 16 / 38

  21. Semantics Simplifying expressions Take 3 Do the truth tables for ∼ ( p ∧ q ) and ∼ p ∨ ∼ q . What do you observe? Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 17 / 38

  22. Semantics Simplifying expressions De Morgan’s Laws For every p, q ∈ P , we have: ∼ ( p ∧ q ) ≡ ∼ p ∨ ∼ q ∼ ( p ∨ q ) ≡ ∼ p ∧ ∼ q Fundamental result first observed by Augustus De Morgan. Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 18 / 38

  23. Semantics Simplifying expressions Other logical Equivalences Convince yourselves about the following: ∼ p ∨ q ≡ p ⇒ q p ⇒ q ≡ ∼ q ⇒ ∼ p (contrapositive) Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 19 / 38

  24. Semantics Simplifying expressions Tautologies / Contradictions Tautology : A logical statement that is always True , regardless of the truth values of the variables in it. Common notation (also used in Epp): t . E.g: p ∨ ∼ p , p ∨ T Contradiction : A logical statement that is always False , regardless of the truth values of the variables in it. Common notation (also used in Epp): c . E.g: p ∧ ∼ p , p ∧ F Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 20 / 38

  25. Semantics Simplifying expressions Logical Equivalence cheat sheet For (possibly compound) statements p, q, r , tautological statement t and contradicting statement c : Commutativity p ∧ q ≡ q ∧ p p ∨ q ≡ q ∨ p Associativity of binary op- ( p ∧ q ) ∧ r ≡ p ∧ ( q ∧ r ) ( p ∨ q ) ∨ r ≡ p ∨ ( q ∨ r ) erators Distributivity of binary op- p ∧ ( q ∨ r ) ≡ ( p ∧ q ) ∨ ( p ∧ r ) p ∨ ( q ∧ r ) ≡ ( p ∨ q ) ∧ ( p ∨ r ) erators Identity laws p ∧ t ≡ p p ∨ c ≡ p Negation laws p ∨ ∼ p ≡ t p ∧ ∼ p ≡ c Double negation ∼ ( ∼ p ) ≡ p Idempotence p ∧ p ≡ p p ∨ p ≡ p De Morgan’s axioms ∼ ( p ∧ q ) ≡ ∼ p ∨ ∼ q ∼ ( p ∨ q ) ≡ ∼ p ∧ ∼ q Universal bound laws p ∨ t ≡ t p ∧ c ≡ c Absorption laws p ∨ ( p ∧ q ) ≡ p p ∧ ( p ∨ q ) ≡ p Negations of contradictions ∼ c ≡ t ∼ t ≡ c / tautologies Those will be posted on our website as a reference. Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 21 / 38

  26. Semantics Simplifying expressions Practice Using the equivalences we just established, simplify the following expressions: p ∧ ( ∼ p ∨ q ) ∨ ( ∼ ( ∼ ( z ∨ ∼ q ))) ( p ∧ r ) ∨ (( p ∨ s ) ∧ ( p ∨ a )) Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 22 / 38

  27. Inference Inference Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 23 / 38

  28. Inference Valid reasoning Valid reasoning Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 24 / 38

  29. Inference Valid reasoning The role of inference We’ve looked at syntax , or the vocabulary of propositional logic. Semantics helped us combine the members of the vocabulary into sentences ( compound statements ) and the notion of equivalence helped us find equivalent statements , as well as simplify unnecessarily long sentences. We haven’t talked about constructing new knowledge ! That’s where inference , (or proof theory in the context of logic) comes to play. Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 25 / 38

  30. Inference Valid reasoning Valid reasoning All reasoning has to be valid . Intuitively: the knowledge we infer has to obey the constraints of the world defined by the stuff we already know . Formal definition later. Examples: All men are mortal. Socrates is a man. Therefore, Socrates is mortal. All men are mortal. Socrates is mortal. Therefore, Socrates is a man. All men are mortal. Socrates is not mortal. Therefore, Socrates is not a man. Jason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 26 / 38

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