ftpllncs2605

11
On Arbitrary Selection Strategies for Basic Superposition Vadimir Aleksic and Anatoli Degtyarev Department of Computer Science, King’s College, Strand, London WC2R 2LS, U.K. {vladimir,anatoli}@dcs.kcl.ac.uk Abstract.  For rst-order Horn clauses without equality, resolution is complete with an arbitrary selection of a single literal in each clause [dN 96]. Here we extend this result to the case of clauses with equality for superposition-based inference systems. Our result is a generalization of the result given in [BG 01]. We answer their question about the completeness of a superposition-based system for general clauses with an arbitrary selection strategy, provided there exists a refutation without applications of the factoring inference rule. 1 In tr oduction Since the appearance of paramodulation as a development of resolution for rst- order logic with equality, there has been a lot of research in the direction of im- proving the eciency of paramodulation-based inference systems. It resulted in numerous renements of paramodulation, which all aimed at restricting the ap- plicability of the paramodulatio n infe renc e rule. In this paper, we deal with one such renement, namely superposition on constrained clauses with constraint inheritance [NR 95], hence with basic superposition. It is possible to further reduce the search space by applying selection strategies. The key idea is to restrict the application of inference rules by allowing infer- ence only on selected literals. Some of the known complete selection strategies for basic superposition are the maximal strategy (where only maximal literals are selected in each clause) and the positive strategy (where a single negative literal is selected, whenever there is one in a clause). There has been a few attempts to generalize the completeness results for dierent selection strategies (for example, see [DV 95]). The latest result is the one of Boll and Godoy [BG 01], where they prove that arbitrary selection strategies are complete for a basic superposition calculus on Horn clauses, if it is compatible with the positive strategy. Here we strengthen up their result (and answer a question they posed) by proving that a basic superposition calculus for general rst-order clauses is complete with arbitrary selection strategies, provided that there exists a refutation without factoring inferences. A similar result, under the same restriction for factoring inferences, was proved in [dN 96] (Theorem

Transcript of ftpllncs2605

Page 1: ftpllncs2605

8/15/2019 ftpllncs2605

http://slidepdf.com/reader/full/ftpllncs2605 1/11

Page 2: ftpllncs2605

8/15/2019 ftpllncs2605

http://slidepdf.com/reader/full/ftpllncs2605 2/11

6.7.4) for resolution calculi, and our result means its generalization to basicsuperposition calculi.

2 Preliminaries

Here we present only notions and definitions necessary for understanding the

paper. For a more thorough overview, see [NR 01]. It is assumed that the readerhas a basic knowledge in substitution and unification.

All formulae are constructed over a fixed signature Σ containing at least oneconstant and a binary predicate symbol ≈. In order to distinguish equality fromidentity, we use = to denote the latter. By X we denote a set of variables. Theset of all terms over the signature Σ with variables from X is denoted by T Σ (X )and the set of ground terms T Σ (∅) by T Σ .

An equation is an expression denoted by t1 ≈ t2 or equivalently t2 ≈ t1. For

dealing with non-equality predicates, atoms P (t1, . . . , tn), where P is a predi-cate symbol of arity n and t1, . . . , tn are terms, can be expressed by equationsP (t1, . . . , tn) ≈ true, where true is a new symbol. A literal is a positive or anegative equation.

The expression A[s] indicates that an expression A contains s as a subexpres-sion. A[t] is a result of replacing the occurrence of s in A by t. An instance Aσ

of A is the result of applying the substitution σ to A.

A clause is a disjunction of literals, denoted by a formula L1, L2, . . . , Lm. Thisdefinition allows for multiple occurrences of identical literals, i.e. for treating a

clause as a multiset of literals. Sometimes, especially in examples, to improvereadability we use the sequent notation by which a clause ¬A1, . . . , ¬Ak, B1, . . . Bl

is represented as A1, . . . , Ak → B1, . . . , Bl.

A constraint is a possibly empty conjunction of atomic equality constraints s = t

or atomic ordering constraints s t or s t. The empty constraint is denotedby .

A constrained clause is a pair consisting of a clause C and a constraint T , writtenas C | T . The part C will be referred to as the clause part and T the constraint

part of

C |

T . A constrained clause

C | will be identified with the uncon-strained clause C .

A substitution σ is said to be a solution of an atomic equality constraint s = t, if sσ and tσ are syntactically equivalent. It is a solution of an ordering constraint

Page 3: ftpllncs2605

8/15/2019 ftpllncs2605

http://slidepdf.com/reader/full/ftpllncs2605 3/11

s t (with respect to a reduction ordering > which is total on ground terms),if sσ > tσ, and a solution of s t if it is a solution of s t or s = t. Generally,a substitution σ is a solution of a constraint T , if it is a simultaneous solutionto all its atomic constraints. A constraint is satisfiable if it has a solution.

A ground instance of a constrained clause C | T is any ground clause Cσ, such

that σ is a ground substitution and σ is a solution to T .

A contradiction is a constrained clause | T , with the empty clause part suchthat the constraint T is satisfiable. A constrained clause is called void if its con-straint is unsatisfiable. Void clauses have no ground instances and therefore areredundant.

A set of constrained clauses is satisfiable if the set of all its ground instances issatisfiable.

A derivation of a constrained clause C from a set of constrained clauses S isa sequence of constrained clauses C 1, . . . , C m such that C = C m and each con-strained clause C i is either an element of S or else the conclusion by an inferencerule applied to constrained clauses from premises C 1, . . . , C i−1. A derivation of the contradiction is called a refutation .

A selection strategy is a function from a set of clauses, that maps each clauseto its sub-multiset. If a clause is non-empty, then the selected sub-multiset isnon-empty too. A derivation is compatible with a selection strategy if all theinferences are performed on the selected literals, i.e. all the literals involved inthe inferences are selected.

We will often just write “clause” instead of “constrained clause” if it is clearfrom the context.

3 Completeness for refutations without factoring

In this section we prove that basic superposition is complete with arbitraryselection strategies, provided that there exists a refutation without factoring in-ferences. Our result is given for the following system BS for constrained clauses,

which is motivated by strict superposition given in [NR 95]. We drop their fac-toring inference rule and, for left and right superposition inferences, the literalordering requirements.

Left superposition

Page 4: ftpllncs2605

8/15/2019 ftpllncs2605

http://slidepdf.com/reader/full/ftpllncs2605 4/11

Γ 1, l ≈ r | T 1 Γ 2, s[l] ≈ t | T 2

Γ 1, Γ 2, s[r] ≈ t | T 1 ∧ T 2 ∧ l = l ∧ l r ∧ s t

where l is not a variable.

Right superposition

Γ 1, l ≈ r | T 1 Γ 2, s[l] ≈ t | T 2

Γ 1, Γ 2, s[r] ≈ t | T 1 ∧ T 2 ∧ l = l ∧ l r ∧ s t

where l is not a variable.

Equality solution

Γ, s ≈ t | T Γ | T ∧ s = t

Further in the paper we assume that derivations are tree-like , that is, no clauseis used more than once as an premise for an inference rule; we may make copiesof the clauses in the derivation in order to make it tree-like.We prove our result by applying so called permutation rules to transform deriva-tion trees. A similar approach is used in [dN 96], but for derivations by resolu-tion. For basic superposition calculi, in [BG 01] the authors use a transformationmethod to prove their result on arbitrary selection on Horn clauses. However,

our transformation is essentially different from the one used in [BG 01], fortwo reasons. First, we address derivations from general clauses, whereas theyrestrict themselves to the Horn case. Secondly, their transformation methodis constrained by the condition that a superposition-based calculus is completewith the positive selection strategy, while we don’t assume any such requirement.

The permutation rules are applied to derivation trees, and their effect is invertingthe order of two consecutive inferences. Depending on the inferences involved,they fall into three categories. The permutations we define apply to:

– two superposition inferences,

– two equality solutions,– a superposition inference and an equality solution.

More in detail, the permutation rules are defined as follows. Wherever the symbol is used, it can represent either ≈ or ≈.

Page 5: ftpllncs2605

8/15/2019 ftpllncs2605

http://slidepdf.com/reader/full/ftpllncs2605 5/11

s-es rule – Superposition followed by equality solution

Γ 1, l1 ≈ r1 | T 1 Γ 2, s ≈ t, l2[l] r2 | T 2

Γ 1, Γ 2, s ≈ t, l2[r1] r2 | T 3(s)

Γ 1, Γ 2, l2[r1] r2 | T 3 ∧ s = t (es)

where T 3 stands for T 1 ∧ T 2 ∧ l = l1 ∧ l1 r1 ∧ l2 r2. This sequence of

applications of inference rules permutes into:

Γ 1, l1 ≈ r1 | T 1

Γ 2, s ≈ t, l2[l] r2 | T 2

Γ 2, l2[l] r2 | T 2 ∧ s = t (es)

Γ 1, Γ 2, l2[r1] r2 | T 1 ∧ T 2 ∧ s = t ∧ l = l1 ∧ l1 r1 ∧ l2 r2(s)

Note that, in order for the permutation to be possible, it is essential that theliterals s ≈ t and l2 r2 are distinct (in the multiset context). In case theywere not, the equality solution in the original derivation would be possibleonly after the superposition, and therefore the two inferences would never bepossible to swap.

es-s rule – Equality solution followed by superposition. This rule is defined asthe converse of s-es, and its application is always possible.

es-es rule – Two equality solution inferences occur immediately after oneanother

Γ, s1 ≈ t1, s2 ≈ t2 | T

Γ, s1 ≈ t1 | T ∧ s2 = t2(es)

Γ | T ∧ s2 = t2 ∧ s1 = t1(es)

Since they take place on different literals, they trivially swap.

Γ, s1 ≈ t1, s2 ≈ t2 | T

Γ, s2 ≈ t2 | T ∧ s1 = t1(es)

Γ | T ∧ s1 = t1 ∧ s2 = t2(es)

s-s rule – Two superposition inferences appear one immediately after another

Γ 1, l1 ≈ r1 | T 1 Γ 2, s2[l] t2, l2 ≈ r2 | T 2

Γ 1, Γ 2, s2[r1] t2, l2 ≈ r2 | T 4(s)

Γ 3, s3[l] t3 | T 3

Γ 1, Γ 2, Γ 3, s2[r1] t2, s3[r2] t3 | T 3 ∧ T 4 ∧ l = l2 ∧ l2 r2 ∧ s3 t3(s)

where T 4 represents T 1 ∧ T 2 ∧ l1 = l ∧ l1 r1 ∧ s2 t2. Permutation can be

done resulting in:

Γ 1, l1 ≈ r1 | T 1

Γ 2, s2[l] ≈ t2, l2 ≈ r2 | T 2 Γ 3, s3[l] ≈ t3 | T 3

Γ 2, Γ 3, s2[l] ≈ t2, s3[r2] ≈ t3 | T 4

(s)

Γ 1, Γ 2, Γ 3, s2[r1] ≈ t2, s3[r2] ≈ t3 | T 1 ∧ T 4 ∧ l = l1 ∧ l1 r1 ∧ s2 t2(s)

Page 6: ftpllncs2605

8/15/2019 ftpllncs2605

http://slidepdf.com/reader/full/ftpllncs2605 6/11

where T 4

is stands for T 2 ∧ T 3 ∧ l = l2 ∧ l2 r2 ∧ s3 t3.

Similarly like at the s-es rule, it is important to point out scenarios in whichthis rule can not be applied. A problem would appear if the literal s2 t2from the negative premise of the top superposition was used later as the”from” literal, instead of l2 ≈ r2. Luckily, in the consideration below this

case will never be met, and we can neglect it at this point.

It could seem that it is necessary to introduce another rule of the type s-s,where the superposition inferences to be swapped inferences take place intothe same occurence of a literal, but into different positions. However this rulewould be redundant in our proof of completeness.

Lemma 1. The above permutation rules modify BS derivations into BS deriva-

tions.

Proof. Every permutation rule defines a way of inverting the order of two adja-

cent inference rules in a derivation tree. After changing positions, the inferencesstill take place with the same literals at the same positions in terms as it wasin the original derivation. Also, all ordering constraints are kept. Therefore, theresulting derivation is a valid BS derivation.

Before proving our main result (see the theorem below), we show by an examplethe way a refutation can be modified, using the permutation rules, so that itbecomes compatible with a chosen selection strategy.

Example 1. Consider the following refutation:

a ≈ b a ≈ b, b ≈ c

b ≈ b, b ≈ c

(s1)

b ≈ cb ≈ b, c ≈ c (s2)

b ≈ b (es1)

(es2)

Lets now “apply” an arbitrary selection strategy to the clauses in the refutation.The selected clauses are underlined, while the framed ones are actually used inthe inferences. Note that in unit clauses no literal is boxed nor framed, becauseby our definition of selection, they are selected by default.

a ≈ b a ≈ b , b ≈ c

b ≈ b, b ≈ c

(s1)

b ≈ c

b ≈ b, c ≈ c(s2)

b ≈ b (es1)

(es2)

Page 7: ftpllncs2605

8/15/2019 ftpllncs2605

http://slidepdf.com/reader/full/ftpllncs2605 7/11

Page 8: ftpllncs2605

8/15/2019 ftpllncs2605

http://slidepdf.com/reader/full/ftpllncs2605 8/11

Assume that Ω contains misused clauses and that it is of the form:

Ω 5C 5

Ω 1C 1

Ω 2C 2

C 3(s1)

....C 4

C 6(s2)

....

such that C 1 is misused and there are no misused clauses in Ω 1. This is withouta loss of generality, and represents only one of a number of essentially similarscenarios in which misused clauses can appear. Assume that the clause C 1 isΓ 1, s1[l] ≈ t1, l1 ≈ r1 | T 1, such that the selected literal is s1[l] ≈ t1 and theone used in the inference is l1 ≈ r1. Also assume that the clause C 5 be of theform Γ 5, l2 ≈ r2 | T 5. Let the inference s2 take place with the literal s1[l] ≈ t1and assume that there are no other inferences with the same literal betweens1 and s2 (therefore there are no inferences into different positions of the sameliteral). The last assumption makes it possible to apply the permutation rulesfrom the inference s2 towards the inference s1, each time moving the applicationof the clause C 5 one inference up the derivation tree. This way, the derivationΩ transforms to Ω :

Ω 5C 5

Ω 1C 1

C 3

(s1) Ω 2

C 2

C 4

(s2)

....

C

6....

where C 6 and C 6

are variants.

Since no permutation rule is applied to an inference that has a well-used clause asits conclusion, the transformation has not changed the property to be well-usedof any clause from Ω . In addition it has made the clause C 1 well-used. Finally,the transformation has not added to the number of clauses in the refutation andtherefore the induction hypothesis applies.

Since in the case of derivations with Horn clauses the factoring inference neverappears, the following statement easily follows from the previous theorem.

Corollary 1. Basic superposition with equality and ordering constraints for

Horn clauses is complete with arbitrary selection.

Page 9: ftpllncs2605

8/15/2019 ftpllncs2605

http://slidepdf.com/reader/full/ftpllncs2605 9/11

This result can not be generalized for arbitrary clauses. In the case where allrefutations involve factoring, incompleteness for arbitrary selection strategiesalready appears in the propositional case (see [Ly 97]).

4 Conclusion and future work

Our transformations, the same as the transformations in [BG 01], are basedon the use of an inference system with inherited constrains. However, there isanother representation of the basic strategy introduced in [BGLS 95], whichuses closure substitutions instead of constraints. Clauses with closure substitu-tions are called closures . The main difference is that the systems of constrainedclauses allow for ordering constraints inheritance. In [Ly 97] the completenessof arbitrary selection strategy for Horn clauses with closure substitutions wasproved using the model generation technique. Unfortunately, as it was noticedin [BG 01], some severe flaws in this completeness proof were discovered. Theexample below shows that under the weaker ordering inheritance strategy de-

termined by closures, our transformation technique can not be applied, andTheorem 1 may not hold.

Example 2. Let BS denote a basic superposition inference system over closures,s and es denote superposition and equality solution inference rules, respectively.

Consider the following BS-derivation over closures: This is a correct BS-derivation

u ≈ g(v) · [u → h(u1)] p(x, y) ≈ p(g(z), h(z)), h(x) ≈ g(y) · [x → g(y1), y → h(x1)]

p(x, y) ≈ p(g(z), h(z)), g(v) ≈ g(y) · [x → g(y1), y → h(x1)] (s)

p(x, y) ≈ p(g(z), h(z)) · [x → g(y1), y → h(x1)] (es)

· ε (es)

for every reduction ordering .

Let p(x, y) ≈ p(g(z ), h(z )) be a selected literal. If we transform this deriva-tions in the style suggested in the previous section, the following derivation isobtained: This is a BS-derivation iff g(h(z )) h(g(z )). If we define to be

u ≈ g(v) · [u → h(u1)]

p(x, y) ≈ p(g(z), h(z)), h(x) ≈ g(y) · [x → g(y1), y → h(x1)]

h(x) ≈ g(y) · [x → g(z), y → h(z)] (es)

g(v) ≈ g(y) · [y → h(z)] (s)

· ε (es)

the lexicographic path ordering where the precedence is g > h, this derivationis not a BS-derivation because of the violation of the ordering conditions. At

Page 10: ftpllncs2605

8/15/2019 ftpllncs2605

http://slidepdf.com/reader/full/ftpllncs2605 10/11

the same time a correct BS-derivation for g > h can be obtained if the lastsuperposition is performed from g(v) ≈ u instead of u ≈ g(v). By modifyingthis example, we can construct a derivation which is a correct BS-derivationfor any reduction ordering and the result of our swap transformation is not acorrect BS-derivation under any reduction ordering.

In case we apply a selection strategy by which only equality literals are selectedsome tautologies have to be kept, as it has been shown by the example from[Ly 97] given below. Following [Ly 97] we use the sequent notation for clauses.

Example 3. Suppose we have:

→ P (c,b,b)P (c,c,b), P (c,b,c) → b ≈ c

P (x,y,y) → P (x,y,x)P (x,y,y) → P (x,x,y)P (c,c,c) →

Let us assume that b c. It is possible to make only two superposition inferences,and in either case a tautology is derived.However, this set of clauses can be transformed to a logically equivalent set of clauses, where all arguments of predicate clauses are variables ( flat clauses ).

x ≈ c, y ≈ b → P (x,y,y)x ≈ c, y ≈ b, P (x,x,y), P (y , x , y) → b ≈ c

P (x,y,y) → P (x,y,x)

P (x,y,y) → P (x,x,y)x ≈ c, P (x,x,x) →

In case we apply the same selection strategy to the modified set of clauses, theempty clause can be derived without tautologies, as shown below.

In the following we underline selected literals. Even if the selection function issuch that it produces the original (non-flat) set of clauses (from which the emptyclause can not be derived without tautologies), it also enables the introductionof some other clauses that are to be used in a refutation which is tautology-free.

1. x ≈ c, y ≈ b → P (x , y , y)2. x ≈ c, y ≈ b, P (x,x,y), P (y,x,y) → b ≈ c

3. P (x , y , y) → P (x , y , x)4. P (x , y , y) → P (x,x,y)5. x ≈ c, P (x,x,x) →

Page 11: ftpllncs2605

8/15/2019 ftpllncs2605

http://slidepdf.com/reader/full/ftpllncs2605 11/11

Guided by the selection function we obtain the following set of clauses:

6. y ≈ b → P (c , y , y) [es 1]7. y ≈ b, P (c,c,y), P (y , c , y) → b ≈ c [es 2]8. P (c,c,b), P (b,c,b) → b ≈ c [es 7]9. y ≈ c, P (c,c,b), P (b,c,b) → P (c , y , y) [s 8, 7]

10. P (c,c,b), P (b,c,b) → P (c,c,c) [es 9]11. P (c,c,c) → [es 5]12. → P (c,b,b) [es 6]

Now we can see that the Horn subset consisting of the “relational” clauses3, 4, 10, 11 and 12 is unsatisfiable, i.e. is refuted by resolution without tautolo-gies under arbitrary selection function.

Note. Throughout this example, it is assumed that if the initial set is Hornwith respect to relational literals, then arbitrary selection can be applied to theclauses that do not contain equality literals.

Bearing in mind what this example shows, the question arises – is it possibleto eliminate all tautologies from derivations from flat clauses if the selectionstrategy picks only equality literals from each clause?

5 Acknowledgements

We thank anonymous referees for their helpful comments and suggestions.

References

[BGLS 95] L.Bachmair,H.Ganzinger,C.Lynch and W.Snyder. Basic paramodulation. Information

and Computation , vol.121, No.2,172–192, 1995.[BG 01] L. Bofill, G. Godoy. On the completeness of arbitrary selection strategies for paramodulation.

In Proceedings ICALP 2001, pages 951–962, 2001.[DV 95] A. Degtyarev, Y. Koval and A. Voronkov. Handling Equality in Logic Programming via

Basic Folding. Technical report 101, Uppsala University, Computing Science Department, 1995.[dN 96] H. de Nivelle. Ordering refinements of resolution. Dissertation, Technische Universiteit Delft,

Delft , 1996.[Ly 97] C. Lynch. Oriented Equational Logic Programming is Complete. Journal of Symbolic Com-

putations , 23(1):23–45, 1997.[NR 95] R. Nieuwenhuis and A. Rubio. Theorem proving with ordering and equality constrained

clauses. Journal of Symbolic Computations , 19:321–351, 1995.[NR 01] R. Nieuwenhuis and A. Rubio. Paramodulation-based theorem proving. In A. Robinson

and A. Voronkov, editors, Handbook of Automated Reasoning , pages 3–73, 2001. Elsevier SciencePublishers B.V.