pro pres 1

Upload: rajeevrajkumar

Post on 07-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Pro Pres 1

    1/41

    Propres1.doc:1998/04/04:page 1 of 41

    The Resolution Proof Systemin Propositional Logic

    While the Hilbert proof system has the property thatit reflects the methods by which humans commonlydo mathematics, it is ill suited for use in automatedreasoning, because of the infinite number of axiomwhich may be generated from an axiom schema.

    The resolution proof system is the most successfulattempt to provide an alternate system which ismore suited to the task of automated reasoning bycomputer.

  • 8/3/2019 Pro Pres 1

    2/41

    Propres1.doc:1998/04/04:page 2 of 41

    The number of semantically distinct formulas:

    Call two wffs 1 and 2 semantically distinct if

    ~ ((12)) holds.

    Observation: Let / be a propositional logic with a

    finite number n of distinct proposition names P ={A1, A2, .., An}. Then there are 22

    n

    semanticallydistinct wffs over L.Proof: The truth table for such a wff has 2

    nrows,

    and the entry in for each row may be 0 or 1.

    Despite this, observe that WF(/) is an infinite set,

    even if there is only one proposition name.

    If we want a proof system which admitsalgorithmic construction of proofs, it would be a

    great advantage to have just a finite number offormulas. (In view of the above result, only 22

    n

    are needed.)

  • 8/3/2019 Pro Pres 1

    3/41

    Propres1.doc:1998/04/04:page 3 of 41

    Clauses:

    Definition: A clause is a wff which is a disjunction of

    literals.

    Examples: (A1A2 A3A4) is a clause. (A1A3 A3A4) is a clause which is

    always true. is taken to be a clause of with no literals, and

    is always false.Motivation: A clause is true iff at least one of itsliterals is true. Since contains no literals, itmust always be false.

    Observation: Let /be a propositional logic having a

    finite number n of distinct proposition names. Then

    the number of distinct clauses over / is finite, theexact number being 4n.Proof: For each proposition name A, there are fourpossibilities for a clause :

    A is a disjunct of . (A) is a disjunct of . Both A and (A) are disjuncts of . Neither A nor (A) are disjuncts of .

    From this observation, the result followsimmediately.

  • 8/3/2019 Pro Pres 1

    4/41

    Propres1.doc:1998/04/04:page 4 of 41

    From a practical point of view, a clause whichcontains a complementary pair of literals isuninteresting, because it is always true.

    Call a clause trivialif it contains a complementarypair of literals. Clearly, a trivial clause is true in anyinterpretation, and thus all such clauses aresemantically equivalent.

    Observation: Let /be a propositional logic a finite

    number n of distinct proposition names. Then thenumber of distinct nontrivial clauses over / is finite,

    the exact number being 3n.Proof: Similar to the above with the possibility thatboth A and (A) being disjuncts of the same clauseexcluded.

    Remark: It is probably useful to keep one clausearound which is always true, in which case thenumber of interesting clauses will be 3n + 1.

  • 8/3/2019 Pro Pres 1

    5/41

    Propres1.doc:1998/04/04:page 5 of 41

    Resolution:Definition: Resolution is the following proof rule:

    (1 p), (2p)(12)

    In this rule, p is bound to a proposition name, and1 and 2 are to be bound to clauses.

    Note that the result of resolution is also a clause,

    called the resolventof the components from which itis built. More formally, if 1 = 11 and2 = 22 are clauses with {1, 2} acomplementary pair of literals, then 12 is calledthe resolvent of (1, 2) with respect to (1, 2).The set of all resolvents of {1, 2} is denotedRes(1, 2).

    Example: Let 1 = A B and 2 = A B. ThenRes(1, 2) = { A A, B B}. Note that only onepair of complementary literals may be deleted. Res(1, 2).

    Example: Let 1 = A B and 2 = A. ThenRes(1, 2) = {B }.

    Example: Let 1 = A and 2 = A. ThenRes(1, 2) = {}.

  • 8/3/2019 Pro Pres 1

    6/41

    Propres1.doc:1998/04/04:page 6 of 41

    Example: Let 1 = A B and 2 = A C. ThenRes(1, 2) = ; there are no resolvents. Notecarefully that Res(1, 2) = {} and

    Res(1, 2) = do not mean the same thing.

    Example: Let 1 = A B C and2 = A B C. Then Res(1, 2) = {B C}.

    Proposition: Resolution is sound. That is, if 1 and

    2 are clauses, and Res(1, 2), then{1, 2} ~.Proof: Without loss of generality, suppose that1 = 1 A and 2 = 2A, with A a propositionname. Let v Mod({1, 2}). Then either

    v Mod(1) or else v Mod(2), since v- cannot be

    true on both A and A. Thus, v- Mod(12), aswas to be proved.

    Resolution also has a completeness property, butdiscusion of it will be deferred until use of thispowerful tool has been examined more completely.

  • 8/3/2019 Pro Pres 1

    7/41

    Propres1.doc:1998/04/04:page 7 of 41

    Proofs using resolution:

    The resolution proof rule defines a proof system

    5HVin which there are no axiom schemata, andonly one proof rule, resolution. Since the resolutionproof rule operates only on clauses, the whole proofsystem operates only on them.

    Since this system is so important, it is worth writingout the definition of a proof in detail.

    A proofin 5HV of the clause from the set ofclauses is a sequence 1, 2, .., n of clauses,with the following properties.(a) Each i is either:

    (i) A member of ;(ii) A member of Res(j, k), where

    1 j, k < i.(b) n = .

    d5HV denotes that is provable from in 5HV.

    Notice how much simpler this definition is than thecorresponding one for the Hilbert system.

  • 8/3/2019 Pro Pres 1

    8/41

    Propres1.doc:1998/04/04:page 8 of 41

    Example: Let1 = A B D2 = A B C D

    3 = B C4 = A = C

    The task is to show that {1, 2, 3, 4 } d5HV.

    1. A B D [hypothesis 1]

    2. A B C D [hypothesis 2]

    3. A B C [res. on 1, 2 with D, D]

    4. B C [hypothesis 3]

    5. A C [res. on 3, 4 with B, B]

    6. A [hypothesis 4]

    7. C [res. on 5, 6 with A, A]

    This proof may also be represented graphically:

    A B D A B C D

    A B C

    B C

    A C

    A

    C

  • 8/3/2019 Pro Pres 1

    9/41

    Propres1.doc:1998/04/04:page 9 of 41

    For direct inference, resolution is not complete,even when the goal is a simple clause.

    Example: Let 1 = A and let = A B. Then it isclear that {1} ~, yet Res(1, 2).

    However, resolution is complete for refutation, i.e.,proofs of . To solve the above example, negatethe goal and add it to the hypotheses. The negatedgoal is ( A B), which is not a clause. However, a

    simple application de Morgans identity yields

    ( A B) (A B).

    (A B) is not a clause, but it may bedecomposed into two clauses, A and B. Theproblem of establishing that

    {A} ~ A Bis thus reduced to the problem of establishing that

    {A, A, B } ~.The latter is a trivial resolution.

    1. A [hypothesis]

    2. A [hypothesis]

    3. [res. 1, 2]

  • 8/3/2019 Pro Pres 1

    10/41

    Propres1.doc:1998/04/04:page 10 of 41

    The previous proof may be converted similarly.

    Example: Let

    1 = A B D2 = A B C D3 = B C4 = A = C

    The task is show that {1, 2, 3, 4, } d5HV

    1. A B D [hypothesis 1]2. A B C D [hypothesis 2]3. A B C [res. on 1, 2 with D, D]4.B C [hypothesis 3]5. A C [res. on 3, 4 with B, B]6.A [hypothesis 4]7. C [res. on 5, 6 with A, A]8.C [hypothesis ]9. [res. on 7, 8]

    A B D A B C D

    A B C

    B C

    A C

    A

    C

    C

  • 8/3/2019 Pro Pres 1

    11/41

    Propres1.doc:1998/04/04:page 11 of 41

    Adequacy of clauses and CNF:

    In problem solving, it will not always be the case

    that the hypotheses and the conclusion will beclauses.

    For resolution to be viewed as a generalprocedure, it must be possible to begin withhypotheses and goals expressed as arbitrarywffs.

    The solution is to use a normal form calledconjunctive normal form (CNF). Every wff maybe converted to one in CNF.

  • 8/3/2019 Pro Pres 1

    12/41

    Propres1.doc:1998/04/04:page 12 of 41

    It is not the case that every wff is equivalent to aclause. For example, there is no clause which isequivalent to the wff (A B). However, there is a

    result which turns out to be just as useful.

    Definition: A wff is said to be in conjunctivenormal form(CNF) if it is of the form12 .. k, with each i a clause.

    Example: The formula

    = (A1A2 A3A4) (A1A3 A3A4)is in CNF.

    Fact: Every wff is semantically equivalent to aformula in CNF. In fact, there is an algorithm whichwill convert an arbitrary wff into one in CNF.

    Proof: The proof is very similar to that forconversion to DNF. The key difference is that,instead of using the distributive identity whichdistributes over , we use the dual, whichdistributes over . Formally, the following stepsneed to be taken.

    Step 1: Eliminate .

    Step 2: Eliminate.Step 3: Use de Morgans laws to move s in toatoms.Step 4: Eliminate double negatives (implicit).

    Step 5: Distribute over .

  • 8/3/2019 Pro Pres 1

    13/41

    Propres1.doc:1998/04/04:page 13 of 41

    Example:((A1 A2) (A3 (A4 A1)))

    Steps 1 and 2:(((A1 A2) (A1A2))) (A3(A4 A1)))

    Note: Rather than substituting((A1 A2) (A2 A1))

    for (A1 A2), it is more productive to use

    ((A1 A2) (A1A2)).

    Steps 3 and 4:((A1 A2) (A1A2)) (A3 (A4 A1))

    ((A1 A2) (A1A2)) (A3 (A4A1))

    ((A1A2) (A1 A2) (A3 (A4A1))

    Step 5:((A1A2) (A1 A2)) ((A3 A4) (A3A1))

    (A1A2 A3 A4) (A1A2 A3A1) (A1 A2 A3 A4) (A1 A2 A3A1)

    Simplify:(A1A2 A3 A4) (A1A2 A3) (A1 A2 A3 A4)

  • 8/3/2019 Pro Pres 1

    14/41

    Propres1.doc:1998/04/04:page 14 of 41

    Problem solving using resolution:

    Recall that, for direct inference, resolution is not

    complete, even when the goal is a simple clause.

    Example: Let 1 = A and 2 = B. Let = A B.Then it is clear that {1, 2} ~, yet Res(1, 2).

    However, resolution is complete when the goal is

    the empty clause . If {1, 2, .., n} is a finite set ofclauses, then {1, 2, .., n} ~ iff there is asequence of resolutions which may be applied to{1, 2, .., n} to yield the empty clause. This willbe made more precise, and the result proved, later.For now we look at how some examples are solve.

    Example: Recall that a proof of ~ () withinthe Hilbert system was surprisingly difficult. In theresolution system, it is trivial. () is equivalentto (). To prove the validity of this formula,convert its negation to CNF: () reduces to(), which is represented by the set {, } ofclauses. It is trivial to resolve this set to .

  • 8/3/2019 Pro Pres 1

    15/41

    Propres1.doc:1998/04/04:page 15 of 41

    Example: We return to the party example, which isExample 2.4 of the textbook. The premises of theproblem consist of the following three statements.

    = {(J Y), (Y (S C)), (J S)}.The conclusion is the single proposition C.

    The first step is to convert the elements of toclauses. This is quite easy. (J Y) is already a clause. (Y (S C)) is equivalent to the the clause

    (Y S C). (J S) is equivalent to the clause (J S). The negation of the goal is the clause C.

    Thus, the set of clauses to work with is

    = {(J Y), (Y S C), (J S), (C)}.

    From examination of this problem under other proofmethods, we know that the conclusion does notfollow from the hypotheses. In this case, what canresolution tell us?

    Under these finite circumstances, the number of

    resolvents is finite. Thus, once no new resolventscan be discovered, the process has completed.

  • 8/3/2019 Pro Pres 1

    16/41

    Propres1.doc:1998/04/04:page 16 of 41

    Here is the resolution graph for this problem.Duplicates (which are discarded) are shown withdashed boxes and arrows.

    Since an exhaustive search does not yield the

    empty clause, must be satisfiable.

    Since the number of clauses over a finite number ofproposition letters is finite, the process ofgenerating resolvents until none further exist isguraranteed to terminate.

    (J Y) (Y S C) (J S) (C)

    (J S C) (Y S)

    (J S) (J S)

  • 8/3/2019 Pro Pres 1

    17/41

    Propres1.doc:1998/04/04:page 17 of 41

    A blocks world example:

    This example uses the domain of the simple blocks

    world, introduced on the introductory slides.

    The goal is to prove that if B2 is atop B1, then eitherP1 or else P2 must be on the table. In theassociated propositional logic, this is expressed asfollows:

    On[B2,B1] (On_table[P1] On_table[P2])

    This is the goal of the problem. In a resolutionsolution, it must be negated. This negation yieldsthree atomic clauses:

    (1) On[B2,B1]

    (2) On_table[P1](3) On_table[P2]}

    To convert all of the first-order sentences describingthe constraints on the blocks world to propositionalwffs would be a huge task. So, we will select justthe ones that we need.

    No object can rest atop a pyramid.(x)(y)((Is_pyramid(x) On(y,x)))

    We need:(4) On(P1,P1)(5) On(P1,P2)(6) On(P2,P1)(7) On(P2,P2)

  • 8/3/2019 Pro Pres 1

    18/41

    Propres1.doc:1998/04/04:page 18 of 41

    At most one object can rest atop another object.(x)(y)(z) ((On(y,x) On(z,x)) y=z))

    (On[B2,B1] On[P1,B1])(On[B2,B1] On[P2,B1])(On[P1,B2] On[P2,B2])

    which are represented by the following clauses:

    (8) (On[B2,B1] On[P1,B1])

    (9) (On[B2,B1] On[P2,B1])(10) (On[P1,B2] On[P2,B2])

    Every object is either on the table or else atopanother object.(x)(y)(On_table(x) On(x,y)))

    (11) (Ontable[P1] On[P1,B1] On[P1,B2] On[P1,P1] On[P1,P2])

    (12) (Ontable[P2] On[P2,B1] On[P2,B2] On[P2,P1] On[P2,P2])

  • 8/3/2019 Pro Pres 1

    19/41

    Propres1.doc:1998/04/04:page 19 of 41

    So, here is the database of clauses necessary toperform the deduction:

    (1) On[B2,B1]

    (2) On_table[P1],

    (3) On_table[P2]

    (4) On(P1,P1)

    (5) On(P1,P2)

    (6) On(P2,P1)

    (7) On(P2,P2)

    (8) (On[B2,B1] On[P1,B1])

    (9) (On[B2,B1] On[P2,B1])

    (10) (On[P1,B2] On[P2,B2])

    (11) (Ontable[P1] On[P1,B1] On[P1,B2]

    On[P1,P1] On[P1,P2])

    (12) (Ontable[P2] On[P2,B1] On[P2,B2] On[P2,P1] On[P2,P2])

  • 8/3/2019 Pro Pres 1

    20/41

    Propres1.doc:1998/04/04:page 20 of 41

    (Ontable[P1] On[P1,B1] On[P1,B2] On[P1,P1] On[P1,P

    (On[P1,B1] On[P1,B2] On[P1,P1] On[P1,P2]) O

    (On[P1,B1] On[P1,B2] On[P1,P2]) On(P1,P2)

    (On[P1,B1] On[P1,B2])(On[B2,B1] On[P1,B

    On[P1,B1]

    On[P1,B2]

  • 8/3/2019 Pro Pres 1

    21/41

    Propres1.doc:1998/04/04:page 21 of 41

    (Ontable[P2] On[P2,B1] On[P2,B2] On[P2,P1] On[P2,P2

    (On[P2,B1] On[P2,B2] On[P2,P1] On[P2,P2]) On

    (On[P2,B1] On[P2,B2] On[P2,P1]) On(P2,P1)

    (On[P2,B1] On[P2,B2])

    (On[B2,B1] On[P2,B

    On[P2,B1]

    On[P2,B2]On[P2,B2] (On[P1,B2] On[

    On[P2,B2]

  • 8/3/2019 Pro Pres 1

    22/41

    Propres1.doc:1998/04/04:page 22 of 41

    Simplification Strategies:

    In general, when a resolution is performed, the

    clauses which were resolved may not be discarded,since they may be needed again in a subsequentresolution.

    Example: Let = { A B, B C, C A, A B C, A B C }.It is easy to see that is unsatisfiable, as illustrated

    by the following resolution proof graph.

    However, note that there are three clauses whichare used in each of two distinct resolutions. Ingeneral, this multiple use of clauses cannot beavoided.

    A BB C C A A B C A B C

    A B

    B

    CA C

    AA

  • 8/3/2019 Pro Pres 1

    23/41

    Propres1.doc:1998/04/04:page 23 of 41

    Definition: A clause 1 is a subclauseof clause 2 ifevery literal of 1 is also a literal of 2. If, inaddition, 2 contains some literal which is not in 1,

    then 1 is a proper subclauseof clause 2.

    Examples: A C is a proper subclause of A B C

    A C is a subclause of itself, but not proper.

    is a subclause of every clause, and a propersubclause of every clause except itself.

    A C is not a subclause of A B C. It is theliterals, and not just the associated atoms, whichmust satisfy the containment condition.

    Observation: Let 1 be a subclause of clause 2.Then

    {1} ~2.

    This observation may be translated into a practicalsimplification strategy for the resolution process.

    Terminology: If 1 is a (proper) subclause of clause2, then 2 is a (proper) superclause of 1.

    Simplification strategy: Suppose that is a set ofclauses. Then each clause which is a superclauseof some other clause of may be removed withoutchanging whether or not resolution will find a

    refutation of .

  • 8/3/2019 Pro Pres 1

    24/41

    Propres1.doc:1998/04/04:page 24 of 41

    Example: Suppose thatA C, A B C, A D, B D .

    We will illustrate why A B C (which is a

    superclause of A C), may be removed withoutcompromising the resolution process.

    First consider the following two resolutions, in whichthe first resolvee of the pair on the left is asuperclause of the corresponding one on the right.Note further that the literal of resolution is contained

    in both clauses. In this case, the result of the firstresolution is a superclause of the result of thesecond.

    Now suppose that the literal of resolution iscontained only in the superclause. No resolution ispossible for the right pair, but the result of the leftresolution is a superclause of the first clause on theright.

    In both cases, the resolution involving thesuperclause adds nothing useful. The clauseA B C may be discarded!

    A B C A D

    B C D

    A C A D

    C D

    A B C B D

    A C D

    A C B D

  • 8/3/2019 Pro Pres 1

    25/41

    Propres1.doc:1998/04/04:page 25 of 41

    Here is a more formal statement.

    Let be a set of clauses. Define Base() to be the

    subset of obtained by deleting each clause whichis a superclause of some other member of .

    Example: Let = { A B, B C, C A, A B C,

    A B C, A C, A B }.Then

    Base() = { A B, B C, C A,A C, A B }.

    Observation: Let be a set of clauses. Then~ iff Base() ~.

    We already know that resolution is sound, and we

    will soon see that resolution is complete, so that~ iff d5HV.

    Thus: Let be a set of clauses. Thend5HV iff Base() d5HV.

    The process of removing superclauses from thedatabase of clauses may even be performed on thefly.

  • 8/3/2019 Pro Pres 1

    26/41

    Propres1.doc:1998/04/04:page 26 of 41

    For example, in the proof on slide 22, which isreproduced here:

    A B C may be deleted from the clause basewhen as A C is derived. A B C may be deleted from the clause

    base when A B is derived. A B and A B may be deleted from the

    clause base when B is derived. B C may be deleted from the clause base

    when C is derived. C A may be deleted from the clause basewhen A is derived. A C may be deleted from the clause base

    when A is derived.

    This will simplify the search process for new

    resolvents greatly!

    A BB C C A A B C A B C

    A B

    B

    C A C

    AA

  • 8/3/2019 Pro Pres 1

    27/41

    Propres1.doc:1998/04/04:page 27 of 41

    Unit and Input Resolution:

    A unit clauseis one which consists of a single

    literal.

    A unit resolutionis one in which one of the clauseswhich are resolved is a unit clause.

    A unit refutationof a set of clauses is a refutationproof d5HV in which each resolution is a unit

    resolution.

    Example: The previous blocks-world proof is a unitrefutation.

    Given a set of clauses, an input resolutionwithrespect to is a resolution in which one of the

    clauses to be resolved is an element of .

    An input refutationof a set of clauses is arefutation proof d5HV in which each resolutionis an input resolution.

    Example:Let

    = {A, A B, B C D, D E, E, C}.

    Here are three distinct refutations of , with distinctproperties.

  • 8/3/2019 Pro Pres 1

    28/41

    Propres1.doc:1998/04/04:page 28 of 41

    A unit refutation which is not an input refutation:

    An input refutation which is not a unit refutation:

    A A B B C D D E E

    B

    C D

    C

    D

    C

    A A B B C D D E E

    B

    C D

    C

    C

    C E

  • 8/3/2019 Pro Pres 1

    29/41

    Propres1.doc:1998/04/04:page 29 of 41

    A refutation which is neither unit nor input:

    A A B B C D D E E

    A C

    C

    C

    A C D D

  • 8/3/2019 Pro Pres 1

    30/41

    Propres1.doc:1998/04/04:page 30 of 41

    Despite the differences, the following remarkableresult holds.

    Theorem: A set of clauses has a unit refutation iffit has a input refutation.

    Q: Why are unit resolution and input resolutionimportant?

    A: For these forms of resolution, very efficientalgorithms exist. Although they are not complete,they can solve a very large class of interestingsubproblems. Sometimes, a tradeoff ofcompleteness for efficiency is warranted.

    Important: There are sets of clauses which are

    inconsistent, yet which admit no input or unitrefutation.

    Example: {A B, A B, A B, A B}.

    Clearly, this set cannot have a unit resolution (sinceit has no unit clauses), so by the above result, itcannot have an input refutation either.

    Let us now examine the complexity of unitresolution more closely.

  • 8/3/2019 Pro Pres 1

    31/41

    Propres1.doc:1998/04/04:page 31 of 41

    The Complexity of Unit Refutation:

    Observation: Let 1 be any clause, let 2 be a unit

    clause, and suppose that 1 and 2 are resolvable.Then the (unique) resolvent of 1 and 2 is asubclause of 1.

    Example: Let 1 = A B C;2 = C.

    The resolvent is A B, which is a subclause of

    1.

    Definition:(a) Let be a clause. Define Length() to be thenumber of literals in .(b)Let be a set of clauses. Define Length() tobethe sum of the lengths of its elements.

    Example: Let = {A, A B, B C D, D E, E, C}.

    Then Length() = 10.

    Observation: Let be a set of clauses. Ifsuperclauses are discarded at each step, then the

    total number of unit resolutions which may beapplied to is bounded by Length().

    The number of (unrestricted) resolutions which maybe applied to is (2Length()) in the worst case, sothe number of possible unit resolutions is muchsmaller than the total number of possible

    resolutions.

  • 8/3/2019 Pro Pres 1

    32/41

    Propres1.doc:1998/04/04:page 32 of 41

    A Comparison to Semantic Tableaux:

    Semantic Tableaux:

    The basic input unit is a conjunction of literals. A general input must be in DNF. Satisfiability is established when one of the

    conjunctions of literals is found to be satisfiable. Unsatisfiability is established only when all

    conjunctions of literals are found to be

    unsatisfiable. Most of the complexity is emodied in convertingthe problem to a DNF representation.

    Resolution:

    The basic input unit is a disjunction of literals(clause). A general input must be in CNF. Unsatisfiability is established when a proof of the

    empty clause is found. Satisfiability is established only when all

    resolvents are computed, and the empty clause isnot amongst them.

    Many problem statements are naturally in CNF, orsomething close. The complexity lies in theresolution process.

  • 8/3/2019 Pro Pres 1

    33/41

    Propres1.doc:1998/04/04:page 33 of 41

    Some implementation issues surroundingresolution:

    The implementation of a resolution-based theoremprover is a course in itself. However, there aresome simple points which should be emphasized.

    Data structures which capture the followinginformation must be maintained:

    The pairs of clauses, with the associated literals,which have already been resolved. (Note that apair of clauses may have more than oneresolvent.)

    The collection of all hypotheses and resolventswhich have been found.

    These structures are necessary in order that it maybe determined:

    that no more resolvents may be obtained.

    that a given pair of clauses has already been

    resolved on a given literal pair.

    That resolution of a given pair of clauses on agiven pair of literals will generate a clause whichhas already been found.

  • 8/3/2019 Pro Pres 1

    34/41

    Propres1.doc:1998/04/04:page 34 of 41

    The Completeness of Resolution:

    A thorough, formal proof of the completeness of the

    resolution principle will now be presented. Notethat such a proof is not presented in the textbook.

    Recall that resolution is(a) a clause-based procedure, and(b) a refutation procedure.

    Thus, the result which is to be established is thefollowing.

    Theorem: Let = {1, 2, .., n} be a finite set ofclauses. Then

    ~ implies d5HV.

  • 8/3/2019 Pro Pres 1

    35/41

    Propres1.doc:1998/04/04:page 35 of 41

    Convention: Throughout this proof, it is assumedthat all clauses are taken over a fixed finite

    propositonal logic /3&$in which

    3{A1, A2, .., An}. Furthermore, it will be assumedthat these proposition letters have an order imposedupon them

    (A1, A2, .., An)The actual ordering is of no consequence; any willdo.

    Definition: The semantic treecorresponding to isthe full binary tree T whose edges are labelled as

    follows:(i) The left edge from any node at level r is

    labelled with Ar.(ii) The right edge from any node at level r is

    labelled with Ar.

    In a picture:

    A1

    A1

    A2

    A2

    A3

    A3

    A3

    A3

    A2

    A2

    A3

    A3

    A3A3

  • 8/3/2019 Pro Pres 1

    36/41

    Propres1.doc:1998/04/04:page 36 of 41

    Definition: A partial function f: Xt Y is a function

    which may be defined only on some of the elementsof X. An ordinary function, which is defined on all

    elements of X, is a special case of a partial function.

    Definition: Let N be a node in T. Define the partial

    function

    Definition: A partial functionw: Pt {0,1}

    Is called a partial interpretation (of /).

    Definition: Let w be a partial interpretation, and let

    WF(/).(a) If w has an extension w$ : 3t {0,1} Mod(),

    then w is called a partial modelof .

    (b) If, for each , w has an extension w$ : P t{0,1} Mod(), then w is called a weak partialmodelof .

    Observation: Clearly, every weak partial model is apartial model. However, the converse is false.Examples: Let = {A B, A B}. Then f : 3t {0,1} : A x 1; B x undefined is a partial

    model.

    g : 3t {0,1} : Ax 0; B x undefined is a weak

    partial model, but not a partial model.

    =

    otherwise.undefined

    N.torootthefrompaththeonisAif0

    N.torootthefrompaththeonisAif1

    )A)(,N( j

    j

    j

  • 8/3/2019 Pro Pres 1

    37/41

    Propres1.doc:1998/04/04:page 37 of 41

    Definition: Let be a finite set of clauses. A nodeN in T is, with respect to :

    (a) a safe nodeif ( N,) is a weak partial model of;(b) an inference nodeif it is a safe node, but no

    descendant of it is a safe node;(c) a failure nodeif it is not a safe node, but every

    ancestor of it is a safe node.

    Example: Let = {A1 A2, A1A2, A2A3}.The failure nodes are labelled with Xs.The inference nodes are labelled with boxes.

    A1

    A1

    A2

    A2

    A3

    A3

    A3

    A3

    A2

    A2

    A3

    A3

    A3A3

  • 8/3/2019 Pro Pres 1

    38/41

    Propres1.doc:1998/04/04:page 38 of 41

    Proposition: Let be a finite set of clauses, and letN be an inference node for in the tree T. Let Qand Q be the children of N. Select such

    that (Q,) cannot be extended to a model of .(Such a must exist by the definition of a failurenode.) Similarly, select with the propertythat (Q,) cannot be extended to a model of .Let Aj be the proposition name on which Q and Qbranch, as illustrated in the figure below. Then,(N,) cannot be extended to a model of theresolvent of and on (Aj, Aj).

    Proof: It is clear that = Aj, and that = Aj, for clauses and , since Q and Qare failure nodes. Let = {1, 2, .., j-1} be theliterals along the path from the root to N. Let

    = {1, 2, ..,

    j-1} be the set of complementsof . Then must be a disjunction of some of the

    elements of , else Q could not be failure node.Similarly, must be a disjunction of elements of. But then N must be a failure node for ,which is precisely the resolvent of and on(Aj, Aj).

    Aj

    Aj

    N

    Q Q

  • 8/3/2019 Pro Pres 1

    39/41

    Propres1.doc:1998/04/04:page 39 of 41

    Definition: Let be a finite set of clauses. DefineRes() to be the closure of under the operationof resolution.

    Lemma: Let be a finite set of unsatisfiableclauses. Then every node of T is a failure node

    with respect to Res().Proof: Suppose, to the contrary, that T contains a

    safe node N. This node N cannot be a leaf, else(N,) would be a model for . Let M be a safe

    node which is furthest from the root. Then M mustbe an inference node, else one of its children wouldbe safe, contradicting the assumption that is a safenode which is furthest from the root. Since it is aninference node, the preceding proposition assertsthat it is a failure node for an element of Res().This is a contradiction, and so no such M can exist.

    Hence every node of T is a failure node withrespect to Res().

    Theorem: Resolution is complete as a refutationprocedure: If be a finite set of unsatisfiableclauses, then

    ~ implies d5HV.Proof: In view of the above lemma, the root node ofT must be a failure node with respect to Res().This can only happen if Res().

  • 8/3/2019 Pro Pres 1

    40/41

    Propres1.doc:1998/04/04:page 40 of 41

    Summary:

    Note that soundness of resolution states that

    ~ implies d5HV,which holds in particular when is . Thus, in viewof the preceding theorem, the following combinationresult holds.

    Corollary: Resolution is sound and complete as a

    refutation procedure: If be a finite set ofunsatisfiable clauses, then

    ~ iff d5HV.

    It must be emphasized that this result does not hold

    for general inference on clause. The last line of thecorollary cannot be replaced by

    ~ iff d5HV.

  • 8/3/2019 Pro Pres 1

    41/41

    Finiteness Issues:

    Oservation: It is possible to implement d5HVas a

    decision procedure. That is, for the problemd5HV

    it is possible it implement the inference engine insuch as way that either

    (a) It establishes that d5HV holds, by finding aproof, from , of the empty clause .

    (b) It establishes that d5HV does not hold, by

    generating the resolution closure of andnoting that it does not contain the emptyclause.

    Note that this is not possible with the Hilbertsystem. Since the axiom schemata of the Hilbertsystem allow one to generate an infinite number ofaxioms, it is alwayspossible to generate somethingnew, so the analog of condition (b) above cannot berealized.