• Nem Talált Eredményt

Resolution tableaux

Gergely Kovásznai a , Gábor Kusper b

3. Resolution tableaux

The aim is to introduce a general method for combining resolution calculi and tableaux. This is why a general way of representing resolution calculi is required.

We regard a resolution calculus as a set of inference rules, which act on clauses.

Each resolution inference rule is represented as a function which can assign a clause to one or more clauses. Every time when applying such a rule, it is needed to specify a clause set (denoted byI and called theinput clause set) and a sequence of clauses (denoted bydand called theresolution derivation).

Definition 3.1 (Resolution Inference Rule). Aresolution inference rule is a func-tionresI,d:Dom7→ C, where

• I is a finite set of clauses;

• dis a finite sequence of clauses;

• Cis the set of all the clauses;

• Dom⊆P(C).

Let us illustrate by examples how well-known resolution calculi can be repre-sented in this form. Of course, other resolution calculi could be reprerepre-sented in a similar way2.

Example 3.2 (Binary Resolution). The resolution calculus, as was introduced by Robinson [13], can be represented by the set of the following resolution inference rules [1]:

(1)Binary Resolution:

binresI,d A∨C , ¬B∨D

= (C∨D)σ

where σis the most general unifier (MGU) of the atomic formulasAandB.

(2)(Positive) Factoring:

f actorI,d C∨A∨B

= (C∨A)σ where σis the MGU of the atomic formulasA andB.

2It is to be remarked thatImay be defined as a clause sequence (instead of a clause set) in the case of some resolution calculi, where the order of input clauses should not be neglected, like in SLD-resolution [10] and in lock resolution [4, 1, 5].

Introducing general redundancy criteria for clausal tableaux. . . 89 Example 3.3 (Linear Input Resolution). The linear input resolution calculus [5]

can be represented by the same resolution inference rules as binary resolution, but the rule “Binary Resolution” is restricted as follows:

• one of the clausesC∨AandD∨ ¬B must be the last element ofd;

• the other one must be an element ofI.

Example 3.4 (Hyper-Resolution). The (positive) hyper-resolution calculus, as was introduced by Robinson [14], can be represented by the following resolution inference rule:

hypresI,d(A1∨C1, . . . , An∨Cn , ¬B1∨. . .∨ ¬Bn∨D) k

(C1∨. . .∨Cn∨D)σ where

• n>1;

• Ci is a positive or empty clause (i= 1, . . . , n);

• Dis a positive or empty clause;

• Ai andBi are atomic formulas (i= 1, . . . , n);

• σis the MGU of(A1, B1), . . . ,(An, Bn).

When a resolution calculus (as a set of resolution inference rules) is given, an appropriate tableau can be constructed for a given input clause set I. Such a tableau is called aresolution tableau, and can be constructed in a quite simple way.

In every deduction steps, some clauses are to be selected, each either from a given branch of the tableau or from the input clause set I. To the selected clauses a resolution inference rule is applied, resulting in a clauseD. FirstD must be split into independent subclauses, and then these subclauses are attached to the given branch, forming distinct new branches.

Let us define resolution tableaux inductively, as follows:

Definition 3.5 (Resolution Tableaux). Let Rbe a set of resolution inference ru-les. Let I be a clause set.

(1) One single vertex labeled with⊤is aresolution tableau forI w.r.t. R. (2) – LetT be a resolution tableau forI w.r.t.R.

– LetB be a branch of T.

– LetC1, . . . , Cn benew instances of clauses inI ∪B.

– Letres∈ Rsuch thatresI,B is defined onC1, . . . , Cn, and let D=resI,B(C1, . . . , Cn)

90 G. Kovásznai, G. Kusper – LetD=D1∨. . .∨Dksuch that each distinctDiandDj areindependent

clauses (i, j= 1, . . . , k).3

The tableau that can be seen in Figure 2 is aresolution tableauforI w.r.t.R.

T B

D1 D2 . . . Dk

Figure 2: Attaching a clause to a branchB of a resolution tableauT.4

Let us point out that it is mandatory to generatenew instances of the clauses which have been selected. Note that resolution tableau branches can be regarded (and are used) as separate resolution derivations.

A tableau calculus is regarded sound and complete in the following case: any clause set I is unsatisfiable iff a closed tableau exists for I. A closed resolution tableau is defined as follows:

Definition 3.6 (Closed Resolution Tableaux). A resolution tableau is closed iff each of its branches contains⊥.

Assume a resolution calculus R which is sound and complete in first-order logic (or in a fragment of first-order logic). It is quite obvious that the resolution tableau calculus applying R inherits soundness and completeness. For example, since resolution is sound and complete in first-order logic, so is the hyper-resolution tableau calculus5. The linear input resolution tableau calculus6is sound and complete in Horn logic.

Theorem 3.7. If a resolution calculusRis sound and complete (in a fragment of first-order logic), then so is the resolution tableau calculus applying R.

Proof. Soundness: It is to show that if there is a closed resolution tableau forI w.r.t. R, then I is unsatisfiable.

IfRis sound, then each inference ruleres∈ Rpreserves satisfiability. Let res(C1, . . . , Cn) =D1∨. . .∨Dk

where each distinctDiandDj are independent. It can be seen that for any model M:

3Furthermore, one can additionally demand that noDican further be split into independent subclauses (i= 1, . . . , k). In this case, decomposition of clauses is unique, and can easily be solved algorithmically.

4New vertices labeled withD1, . . . , Dkare attached to the leaf ofB.

5I.e., the resolution tableau calculus applying hyper-resolution.

6I.e., the resolution tableau calculus applying linear input resolution.

Introducing general redundancy criteria for clausal tableaux. . . 91 ifM |=C1, . . . , Cn, thenM |=D1∨. . .∨Dk.

Because of independence:

∀(D1∨. . .∨Dk)∼ ∀D1∨. . .∨ ∀Dk

Summing up, for any modelM:

ifM |=C1, . . . , Cn, thenM |=D1or M |=D2or . . . orM |=Dk. Hence, ifI was satisfiable, then at least one branch could not be closed.

Completeness: It is to show that if I is unsatisfiable, then there is a closed resolution tableau for I w.r.t. R. This fact is even more obvious than in the case of soundness. Since Ris complete, there is a resolution refutation from I. Each tableau branch can actually be regarded as a “simplified” variant of that refutation, i.e., only subclauses occuring in the refutation can occur in the branch. Since ⊥ is deduced in the refutation and all literals of the clauses can be resolved out,

obviously⊥can occur in each branch.

Note that the fact thatD1, . . . , Dkare pairwise independent has been employed only in the soundness proof.

Example 3.8 (Linear Input Resolution Tableaux). Consider the following input clause set:

In Figure 3, a closed resolution tableau forI w.r.t. linear input resolution (c.f.

Example 3.3) can be seen.

First, the input clauses¬P(x)∨ ¬M(y, z, u)∨ ¬D(x, u)∨D(x, y)∨D(x, v)and

¬D(a, b)are selected; the atomic formulasD(x, y)and D(a, b)are resolved upon by MGU {x/a, y/b}. As can be seen, the resolvent is split into four independent subclauses. Three branches can obviously get closed by resolving with the unit input clausesP(a)and¬D(a, b).

Let us focus on the branch which contains¬M(b, z, u)∨ ¬D(a, u). Since the basis is linear input resolution, this clause (as the label of the last vertex in the branch) must be resolved with an input clause. Currently, that input clause is M(x, x, s(x))∨D(y, x). The resolvent is split into two subclauses.

The consequent steps can be similarly performed.

92 G. Kovásznai, G. Kusper

¬P(a)

¬M(b, z, u)∨ ¬D(a, u) D(a, v)

¬D(a, s(b)) ⊥

¬M(a, y′′, s(b))

D(y, b)

1

2

3

Selected input clauses:

1: M(x, x, s(x))∨D(y, x)

2: ¬M(x, y, z)∨D(x, z)

3: M(a, s(c), s(b))

Figure 3: Closed linear input resolution tableau.