1 propositional logic
play

1. Propositional Logic Huixing Fang School of Information - PowerPoint PPT Presentation

1. Propositional Logic Huixing Fang School of Information Engineering Yangzhou University Outline Syntax 1 Semantics(meaning) 2 Satisfiability and Validity 3 Equivalence and Implication 4 Substitution 5 Normal Forms 6 Decision


  1. 1. Propositional Logic Huixing Fang School of Information Engineering Yangzhou University

  2. Outline Syntax 1 Semantics(meaning) 2 Satisfiability and Validity 3 Equivalence and Implication 4 Substitution 5 Normal Forms 6 Decision Procedures for Satisfiability 7 Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 2 / 75

  3. 1 Syntax Syntax of PL: a set of symbols and rules for combining them to form “sentences” (formulae) Symbols 1 Truth symbols: ⊤ (“true”), ⊥ (“false”) 2 Propositional variables: P , Q , P i , Q i , ... 3 Logical connectives: ¬ , ∧ , ∨ , → , ↔ Example 1 1 ¬ P : negation, “not”; 2 P ∧ Q : conjunction, “and”; 3 P ∨ Q : disjunction, “or”; 4 P → Q : implication, “implies”; 5 P ↔ Q : iff, “if and only if”. Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 3 / 75

  4. 1 Syntax Arity of Logical connectives 1 unary: negation( ¬ ) is unary (takes one argument) 2 binary: others( ∧ , ∨ , → , ↔ ) are binary (take two arguments) Antecedent/Consequent The left and right arguments of → are called the antecedent and consequent, respectively. P → Q , in which, P is antecedent, and Q is consequent. Terminology Atom : truth symbol ⊤ , ⊥ or propositional variable P, Q, ... Literal : an atom A or its negation ¬ A . Formula : a literal or the application of a logical connective to formulae. Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 4 / 75

  5. 1 Syntax Formula S is a subformula of formula F if it occurs syntactically within F . Example 2 (Subformula) 1 subformula of P is P ; 2 subformulae of ¬ F : ¬ F and the subformulae of F ; 3 subformulae of F 1 ∧ F 2 : F 1 ∧ F 2 and the subformulae of F 1 and F 2 . Notice that every formula is a subformula of itself. The strict subformulae of a formula are all its subformulae except itself. Example 3 F : ( P ∧ Q ) → ( P ∨ ¬ Q ) , in which, P and Q are propositional variables. Each instance of P and Q is an atom and a literal. ¬ Q is a literal, but not an atom. F has six subformulae: F , P ∧ Q , P ∨ ¬ Q , ¬ Q , P , Q . Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 5 / 75

  6. 1 Syntax Relative Precedence The relative precedence of the logical connectives from highest to lowest: ¬ > ∧ > ∨ > → > ↔ and, → , ↔ associate to the right. Example 4 ( P ∧ Q ) → ( P ∨ ¬ Q ) can be abbreviated to P ∧ Q → P ∨ ¬ Q Example 5 ( P 1 ∧ (( ¬ P 2 ) ∧ ⊤ )) ∨ (( ¬ P 1 ) ∧ P 2 ) can be abbreviated to P 1 ∧ ¬ P 2 ∧ ⊤ ∨ ¬ P 1 ∧ P 2 Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 6 / 75

  7. Outline Syntax 1 Semantics(meaning) 2 Satisfiability and Validity 3 Equivalence and Implication 4 Substitution 5 Normal Forms 6 Decision Procedures for Satisfiability 7 Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 7 / 75

  8. 2 Semantics The semantics of a logic provides its meaning, and is given by the truth values true and false . Definition 6 (Interpretation) An interpretation I assigns to every propositional variable exactly one truth value . Example 7 I : { P �→ true , Q �→ false , ... } is an interpretation assigning true to P and false to Q , where ... elides the (countably infinitely many) assignments that are not relevant to us. Given a PL formula F and an interpretation I , the truth value of F can be computed. Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 8 / 75

  9. Syntax 1 Semantics(meaning) 2 Truth Table Inductive Definition Satisfiability and Validity 3 Equivalence and Implication 4 Substitution 5 Normal Forms 6 Decision Procedures for Satisfiability 7 Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 9 / 75

  10. 2.1 Truth Table The simplest manner of computing the truth value of a PL formula F is via a truth table. How to evaluate each logical connective in terms of its arguments? 1 ¬ F . F ¬ F 0 1 1 0 2 Binary connectives. F 1 F 2 F 1 ∧ F 2 F 1 ∨ F 2 F 1 → F 2 F 1 ↔ F 2 0 0 0 0 1 1 0 1 0 1 1 0 1 0 0 1 0 0 1 1 1 1 1 1 Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 10 / 75

  11. 2.1 Truth Table Example 8 Consider the formula F : P ∧ Q → P ∨ ¬ Q and the interpretation I : { P �→ true , Q �→ false } . To evaluate the truth value of F under I , construct the following table: P Q ¬ Q P ∧ Q P ∨ ¬ Q F 1 0 1 0 1 1 The top row is given by the subformulae of F . I provides values for the first two columns. Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 11 / 75

  12. Syntax 1 Semantics(meaning) 2 Truth Table Inductive Definition Satisfiability and Validity 3 Equivalence and Implication 4 Substitution 5 Normal Forms 6 Decision Procedures for Satisfiability 7 Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 12 / 75

  13. 2.2 Inductive Definition Inductive Definition: 1 defines the meaning of basic elements first, i.e. atoms; 2 then defines a more complex element in terms of these elements. Two symbols: 1 We write I | = F if F evaluates to true under interpretation I 2 and write I �| = F if F evaluates to false . The meaning of truth symbols 1 I | = ⊤ 2 I �| = ⊥ Under any interpretation I , ⊤ has value true , and ⊥ has value false . Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 13 / 75

  14. 2.2 Inductive Definition The meaning of propositional variables 1 I | = P iif I [ P ] = true , P has value true iff the interpretation I assigns P to have value true ; 2 I �| = P iif I [ P ] = false , Assume that formulae F , F 1 , and F 2 have truth values. From these formulae, evaluate the semantics of more complex formulae: Semantics of more complex formulae I | = ¬ F iff I �| = F I | = F 1 ∧ F 2 iff I | = F 1 and I | = F 2 I | = F 1 ∨ F 2 iff I | = F 1 or I | = F 2 I | = F 1 → F 2 iff , if I | = F 1 then I | = F 2 I | = F 1 ↔ F 2 iff I | = F 1 and I | = F 2 , or I �| = F 1 and I �| = F 2 Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 14 / 75

  15. 2.2 Inductive Definition Example 9 Consider the formula F : P ∧ Q → P ∨ ¬ Q and the interpretation I : { P �→ true , Q �→ false } . Compute the truth value of F as follows: 1 . I | = P since I [ P ] = true 2 . I �| = Q since I [ Q ] = false 3 . I | = ¬ Q by 2 and semantics of ¬ 4 . I �| = P ∧ Q by 2 and semantics of ∧ 5 . I | = P ∨ ¬ Q by 1 and semantics of ∨ 6 . I | = F by 4 and semantics of → We considered the distinct subformulae of F according to the subformula ordering: F 1 precedes F 2 if F 1 is a subformula of F 2 . Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 15 / 75

  16. Outline Syntax 1 Semantics(meaning) 2 Satisfiability and Validity 3 Equivalence and Implication 4 Substitution 5 Normal Forms 6 Decision Procedures for Satisfiability 7 Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 16 / 75

  17. 3. Satisfiability and Validity Determining satisfiability and validity of formulae are important tasks in logic. Definition 10 (Satisfiable) A formula F is satisfiable iff there exists an interpretation I such that I | = F . Definition 11 (Valid) A formula F is valid iff for all interpretations I | = F . Satisfiability and validity are dual concepts, and switching from one to the other is easy. F is valid iff ¬ F is unsatisfiable. Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 17 / 75

  18. Syntax 1 Semantics(meaning) 2 Satisfiability and Validity 3 Truth-table method Semantic Argument Method Equivalence and Implication 4 Substitution 5 Normal Forms 6 Decision Procedures for Satisfiability 7 Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 18 / 75

  19. 3.1 Truth-table method Example 12 Consider the formula F : P ∧ Q → P ∨ ¬ Q . Is it valid? P Q P ∧ Q ¬ Q P ∨ ¬ Q F 0 0 0 1 1 1 0 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 Example 13 Consider the formula F : P ∨ Q → P ∧ Q . Is it valid? P Q P ∨ Q P ∧ Q F 0 0 0 0 1 0 1 1 0 0 1 0 1 0 0 1 1 1 1 1 Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 19 / 75

  20. Syntax 1 Semantics(meaning) 2 Satisfiability and Validity 3 Truth-table method Semantic Argument Method Equivalence and Implication 4 Substitution 5 Normal Forms 6 Decision Procedures for Satisfiability 7 Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 20 / 75

  21. 3.2 Semantic Argument Method Semantic Argument 1 begins by assuming that the given formula F is invalid: there is a falsifying interpretation I such that I �| = F ; 2 The proof proceeds by applying the semantic definitions of the logical connectives in the form of proof rules. Proof rule A proof rule has one or more premises (assumed facts) and one or more deductions (deduced facts). An application of a proof rule requires matching the premises to facts already existing in the semantic argument and then forming the deductions. Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 21 / 75

  22. 3.2 Semantic Argument Method Proof rules: According to the semantics of negation: I | = ¬ F I �| = ¬ F I �| = F I | = F According to the semantics of conjunction: I | = F ∧ G I �| = F ∧ G I | = F I �| = F | I �| = G I | = G The latter deduction results in a fork in the proof; each case must be considered separately. Huixing Fang (SIE, Yangzhou University) 1. Propositional Logic 22 / 75

Recommend


More recommend