4. Propositional Logic Using Truth Tables
Total Page:16
File Type:pdf, Size:1020Kb
4. Propositional Logic Using truth tables The lecture Tautology ! In everyday language a person utters a tautology if he or she says something which is true but only because of its form, like It rains or it doesn’t rain. ! A propositional formula is a tautology if its truth value is 1 under any valuation. This can be checked with a truth table. ! Examples ! ∧ (p0 ∨ p1) ! (p1 ∨ p0) ! A∨¬A ! ¬(A∨B) ! (¬A∧¬B) ! ¬(A∧B) ! (¬A∨¬B) ! (A→B) ! (¬A∨B) Last Jouko Väänänen: Propositional logic viewed Satisfiable ! A formula is satisfiable if its truth value is 1 under some valuation. This can be checked with a truth table. ! Examples •(p0→ p1) ∧ ¬ p0 ∧ ¬ p1 ∧ •(p0 ∨ (p1 ∨ p2)) ∧ ¬ p0 ∧ ¬ p2 •¬(p0 ∨ p1)!(¬p0 ∧ p1) Last Jouko Väänänen: Propositional logic viewed Contingent ! A formula is contingent if its truth value is 1 under some valuation and 0 under another valuation. This can be checked with a truth table. ! Examples ! (p0→ p1)∧ ¬ p0 ∧ ¬ p1 ∧ ! ¬(p0 →(p0 → p1)) ! ¬(p0∨p1)!(¬p0 ∧ p1) Last Jouko Väänänen: Propositional logic viewed Refutable ! A formula is refutable if its truth value is 0 under some valuation. This can be checked with a truth table. ! Examples ∧ ! (p0→ p1) ∧ ¬ p0 ∧ ¬ p1 ! ¬(p0 →(p0 → p1)) ! ¬(p0 ∨ p1)!(¬p0 ∧ p1) Last Jouko Väänänen: Propositional logic viewed Contradiction ! In everyday language a person utters a contradiction if he or she says something which is false merely because of its form, like It rains and it doesn’t rain. ! A propositional formula is a contradiction if its truth value is 0 under any valuation. This can be checked with a truth table. ! Examples ∧ ( ∧ ) ! (p0 ∨ p1) ∧ ¬ p1 ∧ ¬ p0 ! A ∧ ¬A 0 ! (A→B) ∧ A ∧ ¬B 1 ! (A ∨ B) ∧ ¬ A ∧ ¬B Last Jouko Väänänen: Propositional logic viewed Categories of propositional formulas ! Every propositional formula is either a Contradictions tautology, a contradiction or contingent. ! Every satisfiable formula Contingencies is either a tautology or contingent. ! Every refutable formula is either a contradiction or Tautologies contingent. Last Jouko Väänänen: Propositional logic viewed Million dollar question ! Given a formula, can you decide in polynomial time whether it is a tautology, contradiction or contingent. ! Polynomial time means: there is a number k such that you perform only nk operations if the input formula has n symbols. ! One million dollars has been promised by the Clay Mathematical Institute in Toronto. Last Jouko Väänänen: Propositional logic viewed The truth table method •In the truth table method we build the truth table of the given propositional formula. •We can read from the truth table whether the formula is a tautology, contingent or a contradiction. •This method is not polynomial time. Last Jouko Väänänen: Propositional logic viewed Equivalence of formulas ! Two propositional formulas A and B are called (logically) equivalent if A!B is a tautology. ! In other words, the formulas have the same truth value in every valuation. ! Equivalence of formulas is used in everyday language and in science all the time, often without paying much attention to it. Last Jouko Väänänen: Propositional logic viewed Equivalent formulas Formula Equivalent Name of the equivalence formula ¬(A ∧ B) ¬A ∨ ¬B De Morgan law ¬(A ∨ B) ¬A ∧ ¬B De Morgan law ¬¬A A Law of double negation A→B ¬A ∨ B A!B (A→B)∧(B→A) A∨(B∨C) (A∨B)∨C Associativity law of disjunction A∧(B∧C) (A∧B)∧C Associativity law of conjunction A∧(B∨C) (A∧B)∨(A∧C) Distributivity law A∨(B∧C) (A∨B)∧(A∨C) Distributivity law A∧A A Law of idempotence of conjunction A∨A A Law of idempotence of disjunction Last Jouko Väänänen: Propositional logic viewed Logical consequence ! A propositional formula B is a logical consequence of the propositional formula A if A"B is a tautology. ! In other words, in every valuation where A gets value 1 also B gets value 1. ! Just like logical equivalence, logical consequence is used in everyday language and in science all the time, often without paying much attention to it. Last Jouko Väänänen: Propositional logic viewed Examples Formula Logical consequence A ∧ B A A ∧ B B A A ∨ B B A ∨ B B A→B ¬A A→B Last viewed 13.