logic as a tool chapter 1 understanding propositional
play

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 - PowerPoint PPT Presentation

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies Valentin Goranko Stockholm University September 2016 Goranko Propositions Proposition: statement which can be


  1. Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies Valentin Goranko Stockholm University September 2016 Goranko

  2. Propositions Proposition: statement which can be assigned a (unique) truth value : true or false. Some examples of propositions: • “The Sun is hot.” • The Moon is made of cheese. • “Two plus two equals twenty two.” • “The 1001st decimal digit of the number π is 7.” Some non -examples: • “Are you bored?” • “Please, don’t go away!” • “She loves me.” • “ x is an integer.” • “This sentence is false.” Goranko

  3. Propositional logical connectives • not , called negation, denoted by ¬ ; • and , called conjunction, denoted by ∧ (or, sometimes by &); • or , called disjunction, denoted by ∨ ; • if . . . then . . . , called implication, or conditional, denoted by → ; • . . . if and only if . . . , called equivalence, or biconditional , denoted by ↔ . Goranko

  4. Building composite propositions Using the propositions “ Two plus two equals five ” and “ The sun is hot ” and the propositional connectives, we can produce: • “It is not the case that two plus two equals five” • “Two plus two equals five and the sun is hot” • “Two plus two equals five or the sun is hot” • “If two plus two equals five then the sun is hot” • “Two plus two equals five if and only if the sun is hot” Likewise, using the propositions “ Logic is fun ”, “ Logic is boring ”, “ Logic is easy ” we can produce the composite proposition: “Logic is not fun or, if Logic is easy then Logic is fun and Logic is not boring.” Goranko

  5. The propositional connectives as truth value functions Each propositional connective acts on the truth values of the component propositions in a precise way: • ¬ A is true if and only if A is false. • A ∧ B is true if and only if both A and B are true. • A ∨ B is true if and only if either of A or B (possibly both) is true. • A → B is true if and only if the truth of A implies the truth of B , i.e., iff A is false or B is true. • A ↔ B is true if and only if A and B have the same truth-values. Goranko

  6. Truth tables These rules can be summarized in the following truth tables, where T stands for ‘true’ and stands for ’false’: p ¬ p T F F T p q p ∧ q p ∨ q p → q p ↔ q T T T T T T T F F T F F F T F T T F F F F F T T Goranko

  7. Applying the truth tables Given that ‘ Two plus two equals five ’ is false and ‘ The Sun is hot ’ is true, using the truth-tables we obtain that: “ It is not the case that two plus two equals five ” is true; “ Two plus two equals five and the Sun is hot ” is false; “ Two plus two equals five or the Sun is hot ” is true; “ If two plus two equals five, then the Sun is hot ” is true. “ Two plus two equals five if and only if the Sun is hot ” is false. Goranko

  8. Some comments on the truth tables • Conjunction is commutative: A ∧ B is equally true as B ∧ A . But, these do not always mean the same! Compare “ Bill pulled the trigger and Jack dropped dead ” with “ Jack dropped dead and Bill pulled the trigger ”. • Disjunction is non-exclusive : “ I shall win or I shall die ” is still true if I both win and die. Compare also with “ I shall win unless I die ”. • Implication is the most confusing of all. Why should “False imply true” and “False imply false” be true? Because there is no good reason to declare them false! The implication A → B claims the truth of B only if A is true, else no claim is made. Thus, the implication A → B is false in only one case: when A is true and yet B is false . Goranko

  9. Some equivalent forms of the implication The implication is the most important and versatile propositional connective. It can appear in variety of phrases: • If A then B • A implies B • A only if B • B whenever A • B if A • A is sufficient for B • B is necessary for A Goranko

  10. Computing the truth value of a proposition Suppose that “ Logic is fun. ”: T ; “ Logic is boring. ”: F ; “ Logic is easy. ”: T ; To compute the truth value of the composite proposition: “ Logic is not fun or, if Logic is easy then Logic is fun and Logic is not boring. ” we first write it in a symbolic form. For that, we first analyse and clarify it syntax, by placing auxiliary parentheses to indicate the order of applying the logical connectives: “(Logic is not fun) or (if Logic is easy then (Logic is fun and Logic is not boring)).” Goranko

  11. Computing the truth value of a proposition, cont’d We now introduce symbolic names for the atomic propositions occurring in it, e.g: A : “ Logic is fun. ” B : “ Logic is boring. ” C : “ Logic is easy. ” Then, the proposition can be written symbolically as: ( ¬ A ) ∨ ( C → ( A ∧ ¬ B )) Now, we compute its truth value step by step, applying the truth-tables of the respective logical connectives: ( ¬ T ) ∨ ( T → ( T ∧ ¬ F )) = F ∨ ( T → ( T ∧ T )) = F ∨ ( T → T ) = F ∨ T = T . Goranko

  12. Propositional formulae Propositional constants: ⊤ which represents a true proposition, and ⊥ which represents a false proposition. Propositional variables: variables that range over propositions. Usually denoted by p , q , r , possibly with indices. Inductive definition of propositional formulae: 1. Every propositional constant and every propositional variable is a propositional formula. 2. If A is a propositional formula then ¬ A is a propositional formula. 3. If A , B are propositional formulae then ( A ∨ B ), ( A ∧ B ) , ( A → B ), ( A ↔ B ) are propositional formulae. Examples: ⊤ , ¬⊤ , p , ¬ p , ¬¬ p , ¬ q , ( p ∨ ¬ q ) , ¬ ( p 1 ∧ ¬ ( p 2 → ¬ p 1 )) , . . . Outermost pairs of parentheses will often be omitted. Goranko

  13. Construction trees, subformulae, main connectives Construction tree: a tree with nodes labelled with propositional constants, variables, and propositional connectives, such that: 1. Every leaf is labelled by a propositional constant or variable. 2. Propositional constants and variables label only leaves. 3. Every node labelled with ¬ has exactly one successor node. 4. Every node labelled with any of ∧ , ∨ , → , ↔ has exactly two successor nodes - left and right successor. Every construction tree defines a formula C , built starting from the leaves and going towards the root, by applying at every node the formula construction rule corresponding to the label at that node. Goranko

  14. Construction tree of a formula Leaves: propositional variables or constants unary connective ( ¬ ) binary connective ( ∨ , ∧ , → , ↔ ) the main connective The formulae constructed in the process are the subformulae of C . The connective labelling the root of the construction tree of a formula C is the main connective of C . Goranko

  15. Construction tree: example Formula: ( p ∨ ¬ ( q ∧ ¬ r )) → ¬¬ r Construction tree r q ¬ r ∧ ¬ p ¬ ¬ ∨ → Goranko

  16. Parsing tree of a formula The parsing tree of a formula looks the same as the construction tree, but is produced in inverse order, starting from the main connective (of any), drawing edges to all main components, and then recursively producing the parsing trees for each of them. Leaves: propositional variables or constants unary connective ( ¬ ) binary connective ( ∨ , ∧ , → , ↔ ) the main connective Goranko

  17. Parsing tree: example Formula: ( p ∨ ¬ ( q ∧ ¬ r )) → ¬¬ r Parsing tree r q ¬ r ∧ ¬ p ¬ ¬ ∨ → Goranko

  18. Truth tables of propositional formulae Example: ( p ∨ ¬ ( q ∧ ¬ r )) → ¬¬ r ¬ ( q ∧ ¬ r ) p ∨ ¬ ( q ∧ ¬ r ) ( p ∨ ¬ ( q ∧ ¬ r )) → ¬¬ r ¬ r ¬¬ r q ∧ ¬ r p q r T T T F T F T T T T T F T F T F T F T F T F T F T T T T F F T F F T T F F T T F T F T T T F T F T F T F F T F F T F F F Goranko

  19. Simplified truth tables p q r ( p ∨ ¬ ( q ∧ ¬ r )) → ¬ ¬ r T T T T T T T F F T T T F T T T F T T F T T T F F F T F T F T T T T F F F T T T F T T F F T T T F F T F F F T F F T T F T T T F F T T T F T F T F F F F T T T F T F T F F F T F F F Goranko

  20. Tautologies Tautology (or, propositionally valid formula): a formula that obtains truth value T for every assignment of truth values to the occurring variables. Notation: | = A . Examples: | = p ∨ ¬ p , | = ¬ ( p ∧ ¬ p ), | = (( p ∧ ( p → q )) → q ) Testing tautologies with truth-tables: p q p → q p ∧ ( p → q ) ( p ∧ ( p → q )) → q T T T T T T F F F T F T T F T F F T F T Goranko

  21. Contradictions, satisfiable formulae Contradiction is a formula that always takes truth value F . Examples: p ∧ ¬ p , ¬ (( p ∧ q ) → p ) Thus, the negation of a tautology is a contradiction and the negation of a contradiction is a tautology. A formula is satisfiable if it is not a contradiction. Example: p , p ∧ ¬ q , etc. Goranko

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