
06-26264 Reasoning The University of Birmingham Spring Semester 2019 School of Computer Science Volker Sorge 29 January, 2019 Handout 3 Summary of this handout: Soundness — Completeness — Resolution — Satisfiability Checking We finish the previous section by introducing two important theoretical notions: soundness and com- pleteness of a calculus. IV.6 Soundness We first contrast the semantic notion of a tautology, i.e., a semantic consequence that is always valid, against the syntactic notion of a theorem. 19. Theorem in a logical calculus is a formula or sentence, that has a proof in that calculus, or in other words, its validity can be derived using the rules of inference of that formal system. Soundness and completeness now establish a relation between the semantic and the syntactic notion. Informally soundess is the property of a calculus to not enable fallacious derivations. More formally we define it as: Definition 15 (Soundness). Let S be an inference system. We say that S is sound if every sentence that is provable in S is also a valid tautology. `S ' implies that j= ' This effectively means that if a formula has a proof in S it is also valid under all possible interpretations. IV.7 Completeness Completeness is in many ways the dual to soundness. Definition 16 (Completeness). Let S be an inference system. We say S is complete if every tautology of S is also a theorem of S. That is, j= ' implies that `S ' Naturally, when building a logical calculus one wants it to be sound and complete, at least from a theo- retical point of view. In practice, completeness is not always achievable or even deliberately ignored in order to allow for proof strategies that are effective. However, one definitely never wants to relax on the soundness condition! We will see in the following section how these ideas are used in practice. V. Resolution Resolution is an efficient logic calculus that makes use of the Clause Normal Form. It is based on the principle of modus ponens. Let’s first recall the corresponding rule from the ND calculus: PP ! Q !E Q If we rewrite the implication we get the following form of the rule: P :P _ Q Q 17 20. The Resolution Rule effectively expresses the fact that for any interpretation I to satisfy both P and :P _ Q we have to have I(P ) = T. Hence the satisfiability of the second formula only depends on whether I j= Q. We now generalise this to the full resolution principle, which is of the form P _ Q1 _ ::: _ Qn :P _ R1 _ ::: _ Rm Res Q1 _ ::: _ Qn _ R1 _ ::: _ Rm We can also write the rule more conventiently in set notation. Let C1;C2 be clauses, let l be a literal and its negation :l, then we can express the resolution rule as flg [ C1 f:lg [ C2 Res C1 [ C2 While the correctness of the simple rule follows directly from the correctness of modus ponens, the correctness of the extended rule Res is not necessarily obvious. Hence, we have to show it explicility. Theorem 17 (Resolution Rule). The conclusion of Res is satisfiable if and only if the premises of Res are satisfiable. Proof. First, show that if I is a model for the premises, then it is also a model for C1 [ C2. We have 0 0 either I(l) = T or I(:l) = T. If I(l) = T, then there must exist a l 2 C2, such that I(l ) = T. After 0 applying Res l 2 C1 [ C2, ensuring that it is satisfiable under I. We can give a symmetric argument for I(:l) = T. 0 Conversely, let’s assume C1 [ C2 is satisfiable with interpretation I. Then there exists an l 2 C1 [ C2, 0 such that I(l ) = T. Since neither l; :l are in C1 [ C2, they do not yet have a truth value assigned by the 0 model. Hence, we can extend I in the following way: If l 2 C1, then the first premise is satisfied and 0 we choose I(l) = F to ensure that the second premise is satisfied. Likewise, if l 2 C2 then we choose I(l) = T. The conclusion of the resolution rule is generally called the resolvent. Observe that this resolvent can be empty. If n = m = 0 then the application of Res leads to an empty set of literals, or the empty clause, thereby establishing that the original set of premises was unsatisfiable. We will denote the empty clause using a box symbol . 21. The Resolution Procedure can be defined as exhaustive application of the resolution rule until either we have derived or no new clauses can be derived, thus establishing the last resolvent as a new fact. More formally we define the procedure as: 1. Let Φ0 be the initial set of clauses. 2. For Φi; i ≥ 0 choose two clauses C1;C2 2 Φi that have not yet been resolved and that contain one complementary literal. Let C be the resolvent clause. 3. Set Φi+1 = Φi [ fCg. 4. If C = then terminate with Φ unsatisfiable. 5. If Φi+1 = Φi then terminate with Φ satisfiable. 6. Else continue at step 2. One point we have not yet made fully explicit is how to obtain our initial clause set for a proposition that is given in the form of f'1;:::;'ng ` Effectively we can consider the set of premises (or axioms) as a conjunction and use each as an initial set. Later we will also see that the whole proposition can effectively be treated like an implication, i.e., 18 '1 ^:::^'n ! , although there is a clear semantic difference, with regards to the meaning of premises and hypotheses. However, we are interested in building purely syntactic procedures we will not worry about that. Example: Let’s show fP; P ! Q; Q ! Rg `Res R. We build our initial set of clauses from fP; P ! Q; Q ! Rg. Effectively, we can view this as a conjunction Once in clause normal form we get ffP g; f:P; Qg; f:Q; Rgg. We can then perform the following derivation: P :P; Q Res Q :Q; R Res R Soundness of the procedure can be shown quite easily for the resolution procedure, by demonstrating inductively with Theorem 17 that the leaves of the resolution tree are satisfiable if and only if the root is. Unfortunately the resolution procedure is not complete, in that we can not show every semantic conse- quence. For example, we can not show fP ^ Qg ` P _ Q. 22. Refutation To get around this we use resolution not as a proof procedure but as a refutation procedure. That is, instead of trying to prove a theorem using the resolution rule, we are trying to derive for the negation of the theorem using the resolution rule. This exploits the fact that that a sentence is valid if and only if its negation is unsatisfiable. Hence the first step of the resolution proof will always be to negate the formula. For this we now exploit the idea of rewriting a proposition of the form ' ` into the form ' ! and observe the following two equivalences :(' ! ) =∼ :(:' _ ) =∼ ' ^ : hence we also get ∼ :(('1 ^ ::: ^ 'n) ! ) = '1 ^ ::: ^ 'n ^ : Now the problem of showing fP ^ Qg ` P _ Q becomes trivial, as the negation immediately collapses to the empty clause. Example: In order to show that ` (:B ! A) ! ((:B !:A) ! B) holds we are refuting the negation using resolution. So we get :((:B ! A) ! ((:B !:A) ! B)) which simplifies into the clause set ffB; Ag; fB; :Ag; f:Bgg We can then derive the following resolution proof B; :A :B B; A :B Res Res :A A Res In the above proof we have reused the clause f:Bg. In most cases we will need to use clauses multiple times, which makes the use of tree notation rather awkward. We therefore introduce a linear format for resolution proofs. 23. Linear Resolution Proofs are written simply in lines with justifications referring to the clauses a partic- ular line is the resolvent of. For our example we get a six line proof. 1. B; :A 2. B; A 3. :B 4. :A Res 1,3 5. A Res 2,3 6. Res 4,5 19 Note that it would not be strictly necessary to explicility denote the Res rule in the justifications of our lines, as we only have one inference rule in our calculus. However, later when we move to first order logic we will get at least one more rule, thus denoting the rule will make sense. 24. Soundness effectively follows from the soundness of the resolution procedure we have argued earlier. However, instead of having a resolution tree for validity we now have a refutation tree to show unsatisfi- ability. Theorem 18 (Soundness of Propositional Resolution). If there exists a refutation tree for a formula ', then ' is unsatisfiable. 25. Completeness is more difficult to establish. There are several ways to prove the theorem. A common one argues via semantic trees, but we will briefly sketch an induction proof. Theorem 19 (Completeness of Propositional Resolution). If a formula ' is unsatisfiable then ' has a refutation tree. Proof. We show the theorem via induction on the number of variables in '. Let Φ be the CNF of ' Base case: We have one variable P . All possible clauses of Φ are fP g and f:P g. If Φ is unsatisfiable then both clauses occur, and we can derive . Induction hypothesis: Suppose the hypothesis is true for formulas with less than n variables.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages6 Page
-
File Size-