• Aucun résultat trouvé

with Constraints Laurent Vigneron Novembre 1993

N/A
N/A
Protected

Academic year: 2022

Partager "with Constraints Laurent Vigneron Novembre 1993"

Copied!
25
0
0

Texte intégral

(1)

RECHERCHE en

INFORMATIQUE de

NANCY

Campus Scientique B^atiment LORIA Bo^te Postale 239

54506 Vanduvre-les-Nancy Cedex Telephone: ( + 33) 83.59.20.00

Telecopie: ( + 33) 83.41.30.79

Associative-Commutative Deduction with Constraints

Laurent Vigneron

CRIN 93-R-196 Novembre 1993

Presented at CADE'12, Nancy, June 1994 [Vig94a]

(2)
(3)

Associative-Commutative Deduction with Constraints

Laurent Vigneron

CRIN-CNRS & INRIA-Lorraine

BP 239, 54506 Vanduvre-les-Nancy Cedex, France E-mail : Laurent.Vigneron@loria.fr

Abstract

Associative-commutative equational reasoning is known to be highly complex for theorem proving.

Hence, it is very important to focus deduction by adding constraints, such as unication and ordering, and to dene ecient strategies, such as the basic requirements a la Hullot. Constraints are formulas used for pruning the set of ground instances of clauses deduced by a theorem prover. We propose here an extension of AC-paramodulation and AC-superposition with these constraint mechanisms ; we do not need to compute AC-uniers anymore. The method is proved to be refutationally complete, even with simplication. The power of this approach is exemplied by a very short proof of the equational version of SAM's Lemma usingDATAC, our implementation of the strategy.

Keywords : Automated Deduction, Associative and Commutative Theories, Resolution, Paramo- dulation, Superposition, Basic Strategy, Symbolic Constraints.

Contents

1 Introduction 2

2 Related Work and Motivations 2

3 Notations and Denitions 4

4 Inference Rules 4

4.1 Paramodulation Strategy : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4 4.2 Superposition Strategy : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 7 4.3 Lifting Lemma : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 8

5 Simplication Rules 9

5.1 Constrained Subsumption : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 9 5.2 Constrained Simplication : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 10 5.3 Special Subsumption and Simplication : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 11 5.4 Some Particular Simplication Rules : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 11

6 Refutational Completeness 12

7 Example of Resolution : SAM's Lemma 12

8 Conclusion and Further Works 14

References 14

A Proof of Refutational Completeness 17

A.1 Proof Technique : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 17 A.2 Proof of Completeness : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 19

This work is partially supported by the GDR Programmationand the Esprit Basic Research working group 6028, CCL.

(4)

1 Introduction

Automated deduction with equality and associative-commutative (AC) operators, i.e. binary operators f satisfying the axioms f(f(x;y);z)'f(x;f(y;z)) and f(x;y)'f(y;x), has been a long standing open problem. Our solution for dealing with AC axioms is to work in the AC-congruence classes and to use associative and commutative identity equality, matching and unication. This idea of replacing axioms by ad-hoc mechanisms such as unication algorithms and inference rules was rst proposed by Plotkin in [Plo72], and has been extended to term rewriting systems including associativity and commutativity in [PS81, JK86].

The paramodulation rule has been extended to AC theories in [RV91, Pau92, Wer92] and in [RV93], where we have proposed an inference system based on the ordered paramodulation strategy. In this paper, we add important restrictions in the line of [NR92a, BGLS92] for obtaining a basic strategy for AC-paramodulation and AC-superposition. The principle of the basic strategy, extension of the basic narrowing of [Hul80], is to forbid paramodulation in terms introduced by a substitution in a previous deduction. For instance, considering the paramodulation step (with the unierfx7!a; y7!cg)

(f(a;y)'b) P(f(x;c))_Q(x;b) P(b)_Q( a ;b)

f(x;c) is replaced by b, assuming that f(a;c)6b and P(f(a;c))6Q(a;b). The subterm a of the deduced clause is blocked (framed) to show that no more paramodulation step is allowed in it. A renement of this strategy is to block in addition the replacing term in the deduced clause (i.e. b in P(b)). This renement is not valid for the superposition strategy [Rus91].

In the following, we rene and extend this strategy by associating to each clause a set of constraints as in [KKR90]. Then, when a new clause is generated, it inherits the constraints of its ancestors and also the AC-unication constraints (not computed) and ordering constraints produced by the last inference step. When we apply this technique to the previous example, we get :

(f(a;y)'b) j[T1]j P(f(x;c))_Q(x;b) j[T2]j P(z)_Q(x;b) j[T1^T2^T3]j

where T3 consists in the AC-unication constraints f(x;c)=ACf(a;y) and z =ACb (the last one corresponds to the basic strategy), and the ordering constraints f(a;y)b and P(f(x;c))Q(x;b) for simulating an ordered strategy.

In a rst version of this work1, we had to compute AC-uniers in a very restrictive case. Later Nieuwenhuis and Rubio [NR94] have proposed a very close result where no AC-unier was needed (but with other drawbacks). In this paper, we have been able to get rid of the last few AC-uniers needed by a very simple trick, inspired by the proof technique of Nieuwenhuis and Rubio. After discussion with them, this trick is compatible with their method.

Related works on the basic strategy and constraints are detailed in Section 2 ; we describe there our motivations for applying such techniques to deduction in AC theories. Our notations are described in the third section. Section 4 presents inference rules and the lifting lemma. Section 5 introduces several important simplication rules that are compatible with our inference rules. The method for proving the refutational completeness is explained in Section 6 and the detailed proof is given in the Appendix A.

The last Section 7 details the proof of SAM's Lemma, which was produced by our implementation of the method described in this paper.

2 Related Work and Motivations

The notion of basic strategy was rst introduced by Slagle [Sla74] with the denition ofblocked inferences, i.e. inferences using substitutions which do not contain a reducible term, in the sense of term rewriting.

This concept was extended to theories with permutative axioms (including AC axioms) by Ballantyne and Lankford [BL79]. In another setting but with close ideas, Kapur, Musser and Narendran [KMN85]

1Presented at the 2nd Workshop CCL, La Escala, Spain, September 1993.

(5)

have dened theprime superposition, which takes into account that many superpositions are useless in the Knuth-Bendix completion procedure. But, the rst strategy including the main ideas of the basic strategy is the modication methodof Brand [Bra75].

In his thesis, Hullot [Hul80] has introduced a related concept calledbasic narrowing, which consists in forbidding narrowing steps in subterms introduced by previous inference steps. It was extended tobasic superpositionand basic paramodulation by Nieuwenhuis and Rubio [NR92a], and Bachmair, Ganzinger, Lynch and Snyder [BGLS92]. Both these works apply the model construction technique of [BG90] to derive the refutational completeness of the strategy. In [NR92a], subterms where superpositions are forbidden never appear explicitly, since they are handled by unication constraints, while in [BGLS92], uniers are computed and the blocked subterms are replaced by variables and appear in a substitution associated to a clause. To compare the basic superposition and paramodulation strategies, the rst one permits to restrict to left-hand sides of equations, while the second one permits to block the right-hand sides when they replace subterms of a clause.

In this paper, we extend the basic paramodulation and superposition to AC theories. We use explicit constraints as in [NR92b] to get an homogeneous framework with ordering and unication constraints at the same level.

Such ordering constraints were used by Peterson [Pet90] and Martin and Nipkow [MN90] to orient equations like the commutativity axiom : x:y!y :x if x > y. But, constraints are also fundamental to trace the chosen orientations. Indeed, when an equation (s't) is oriented as s!t, it has to be coherent with further inference steps. This coherence is imposed by keeping the constraint s > t which is added to the deduced clause.

A second kind of constraints we consider are AC-unication constraints. They permit to limit the number of generated clauses. Consider for instance the paramodulation from the equation (xxxx'x) into the clause P(y1y2y3y4), where is AC ; a clause will be generated for each most general AC-unier, but there are 34359607481 of them. Using an AC-unication constraint, only one clause is deduced : P(x)j[xxxx=ACy1y2y3y4]j . The advantage of such constraints was already pointed out in [KK89, KKR90] and in [Bur91].

The main result of this paper is the denition of a refutationally complete set of inference rules, compatible with simplication, for deduction with constraints in AC theories. These inference rules are non-trivial renements of rules dened in [RV93], by including constraints of

AC-unication, to express the basic strategy and limit the number of deduced clauses,

Ordering, to express the orientation of equations and the ordered strategy, which consists in always applying inference steps between maximal literals of clauses.

The additional renements dened in [RV93] remain complete, such as the maximalpositions requirement, which consists in forbidding paramodulations at non maximal positions of AC-operators. Moreover, we never use the AC axioms explicitly ; they are handled though AC-unication constraints and the inference rules application.

Nieuwenhuis and Rubio [NR92b] have dened a complete set of inference rules based on superposition, with ordering and unication constraints. Their work deals with the empty theory. They have recently extended this result to AC theories [NR94]. However, we have important renements on the rules named contextual paramodulation and extended paramodulation (Denitions 5 and 7) they do not have.

Both systems had the same problem : to keep the completeness property, the basic strategy has to be weakened by keeping the possibility of applying indirectly a paramodulation (or superposition) in the constraint part (Example 6). First, we wanted to avoid such inference steps, and we dened an inference system which had to compute some AC-uniers. But, a nicer solution is to never compute AC-unier and also to permit some paramodulations in constraints as proposed by Nieuwenhuis and Rubio in [NR94].

So, the inference system presented in this paper is a light transformation of our rst system : no nore AC-uniers are needed, and we show that paramodulations in constraints have to be allowed only in very restrictive cases (Denition 5) which can be tested with a very simple control. For these special cases, we used a trick inspired by the proof technique of Nieuwenhuis and Rubio. We conjecture that we have obtained an optimal version of basicness.

Last, our method is implemented and we report experiments on non-trivial problems.

(6)

3 Notations and Denitions

This section introduces the basic notions relevant to our work, based on the standard notations and denitions for term rewriting and unication given in [DJ90, JK91].

We assume that the operators from a given subsetFACofF are associative and commutative, which means that for f 2FAC the axioms f(f(x;y);z)'f(x;f(y;z)) and f(x;y)'f(y;x) are implicit in the theory to be considered. The congruence onT(F;X), generated by these AC axioms, is called AC-equality and written =AC. We have to mention that, in this paper, we do not use the atten representation for terms. The set ofAC-matchersfrom a term s into a term t is denoted by AC matchfs;tg.

The relation@AC represents the subterm property modulo AC, i.e. u@ACv if there is a term v0, AC-equal to v, such that u is a strict subterm of v0. uvACv if u@ACv or u=ACv. For instance, ab@ACb(ac), whereis AC. This relation is extended to sets of terms : fs1;:::;smgvACft1;:::;tng

if 8i; 9j; sivACtj .

We denote by\AC(resp.[ACandAC) the intersection (resp. union and inclusion) of sets, using the AC-equality for comparing objects, i.e. terms or atoms. For example,fab;b;cg\ACfba;c;dg=fab;cg,

fabg[ACfba;cg=fab;cg and fab;cgACfba;b;cg, whereis AC. The extension ofAC to multisets is denoted byAC. For instance, fab;c;cgACfba;c;b;cg, but fab;c;cg6ACfba;b;cg.

MPos(t) denotes the set of all non variable positions p in t such that eitherHead(tjp)62FAC, or, if p'p0:i ,Head(tjp) andHead(tjp0) are not the same AC-operator.

Given a term t and an AC-operator f,Hterms(t;f) is the multiset of the subterms below f at the root of t ; For instance, Hterms(a((ax)g(b));) isfa;a;x;g(b)g.

Our ordered paramodulation strategy is based on acomplete simplication orderingon terms and atoms, total on ground AC-congruence classes (see denition in [RV93]) and AC-compatible [NR91, RN93]. By overloading of notation, given a literal L and a clause D, LD (resp. LD) means that the atom corresponding to L is greater than each (resp. less than one) atom of D.

In the following, we useconstrained clauses, denoted by Cj[T ]jas in [NR92b], where C is a clause in the rst-order logic and T is a conjunction of constraints, atomic formulas of type s=ACt or st, for terms or atoms s and t. The solutions of a set of constraints T are the ground substitutions dened by :

? Sol(c^c0) = Sol(c) \ Sol(c0)

? Sol(s=ACt) = fjs and t are AC-equalg

? Sol(st) = fjs t g

Some other constraints are used to test emptiness of the intersection of sets of terms, and to test inclusion of multisets of terms. Cj[ ]j will denote a shorthand of Cj[Vx2Dom()x=ACx ]j. A set of constraints T issatisableif it admits at least one solution.

4 Inference Rules

Before dening our inference rules, let us recall the main ideas of our theorem proving strategies. First, the ordered strategy forces the application of inference rules between maximal literals of clauses. Second, the AC-unication constraints, which are never evaluated, simulate the basic strategy.

When a clause is deduced by an inference step, we do not specify that its set of constraints has to be satisable. Indeed, there are two strategies : to check the satisability of the constraints either at each step, or only when the empty clause is generated. The rst solution is costly, but it avoids further useless deductions. So, the choice of the strategy is left to the user.

4.1 Paramodulation Strategy

We dene in the following 6 inference rules, presented as fractions with the initial clauses on top and the deduced clause below. We illustrate their application on an example, whereis an AC-operator, and P >pQ >p'>p>pg >pa >pb >pc >pd >pe is the precedence on operators. Ordering constraints will be simplied as much as possible thanks to the previous precedence, and AC-unication constraints will be simplied by decomposition, as in [JK91].

(7)

Denition 1

(Constrained AC-Factoring) L1_:::_Ln_D j[T1]j

L1_D j[T1^T2]j whereT2 is L1=AC:::=ACLn ^ L1D

Example 1

If we apply this AC-factoring rule to the clause P(x1y)_P(bx)_Q(x;y) j[x1=ACa]j, we obtain P(x1y) _Q(x;y) j[T ]j , where T is simplied to x1=ACa ^ x1y =ACbx, since the ordering constraint P(x1 y) Q(x;y) is trivially satised and the AC-unication constraint

P(x1y)=ACP(bx) can be decomposed into x1y =ACbx .

Denition 2

(Constrained AC-Resolution) A1_D1 j[T1]j :A2_D2 j[T2]j

D1_D2 j[T1^T2^T3]j where T3 is A1=ACA2 ^ A1D1_D2

Example 2

An AC-resolution step between clauses P(x1y)_Q(y) j[x1=ACa]j and :P(x2x)_ Q(x) j[x2=ACb]j produces the clause Q(y)_Q(x) j[T ]j, where T is simplied to x1=ACa^x2=ACb^

x1y =ACx2x .

The next rule simulates a resolution step with the reexivity axiom (x'x).

Denition 3

(Constrained AC-Reexion)

:(s't)_D j[T1]j

D j[T1^T2]j whereT2 is s=ACt ^ (s't)D

Example 3

By applying this AC-reexion rule to the clause :(x1y'bx)_(xy'c) j[x1=ACa]j, we deduce (xy'c) j[T ]j, where T is x1=ACa ^ x1y =ACbx ^ (x1y'bx)(xy'c).

The previous two inference rules are the only ones for generating the empty clause (denoted 2), i.e. a clause with no literals and a satisable set of constraints.

The next two inference rules are the paramodulation and the contextual paramodulation.The rst one is well known, but the second one is specic to AC theories ; this rule and the extended paramodulation, dened later, simulate the associativity axiom. The experienced reader will remark that these rules simulate the use of extensions of clauses [PS81]. An example of contextual paramodulation (without constraints) is :

(ab'c) P((ad)b) P(cd)

where the contextual paramodulation is applied in the subterm (ad)b, which is AC-equal to (ab)d, and the term d is what we call the context of the paramodulation step.

In the next two rules, the position p, where the paramodulation is applied, has to be non-variable and maximalfor AC-operators (see denition ofMPos in Section 3). Indeed, if a (contextual) paramodulation can be applied at a non-maximal position of an AC-operator f, a contextual paramodulation at the corresponding maximalposition of f is equivalent. For instance, applying a paramodulation (or contextual paramodulation) in the subterm f(t1;t2) of the clause P(f(f(t1;t2);t3)) is equivalent to a contextual paramodulation in the subterm f(f(t1;t2);t3) where t3 is in the context.

Denition 4

(Constrained AC-Paramodulation) (l'r)_D1 j[T1]j L_D2 j[T2]j

L[xr]p_D1_D2 j[T1^T2^T3]j wherexr is a new variable,p2MPos(L)

and T3 is Ljp=ACl ^ xr=ACr ^ lr ^ (l'r)D1 ^ LD2

Note that in the deduced clause, the termr is replaced by a new variable (xr) to avoid further paramodu- lation steps inside.

(8)

Example 4

An AC-paramodulation from (x1 y'c) _(g(y)'d) j[x1=ACa]j into P(x2 z)_ Q(z) j[x2=ACb]j, in the subterm x2z, produces the clause P(xr)_(g(y)'d)_Q(z) j[T ]j where T is transformed into the constraints x1=ACa ^ x2=ACb ^ x1y =ACx2z ^ xr=ACc.

In the next rule, we use a new kind of variables, called extension variables and indexed by an AC- operator, for representing the context of contextual paramodulation steps. These special variables imple- ment the same notion of irreducibility subterms used by Nieuwenhuis and Rubio in [NR94], and we detail their purpose in the following.

Denition 5

(Constrained AC-Contextual Paramodulation) (l'r)_D1 j[T1]j L_D2 j[T2]j

L[f(xr;zf)]p_D1_D2 j[T1^T2^T3^T30]j wherexr is a new variable,p2MPos(L),

zf is a new extension variable for the AC-operatorf ,

and T3 is Ljp=ACf(l;zf) ^ xr=ACr ^ lr ^ (l'r)D1 ^ LD2 and T30 is the conjunction of the constraints Hterms(l;f)6ACHterms(t;f) , for

each term tin Hterms(Ljp;f) which is not an extension variable forf.

This rule allows to replace only parts of the subterm at position p of the literal L, provided that the operator at pis AC. So, the idea is thatL is divided in two parts : the rst one has to be AC-uniable with l, and the second one (referred by zf) is the context. The constraints on Hterms mean that we did not apply a paramodulation into a non-extension variable ofL, assuming we forget the use of maximal positions of AC-operators ; moreover, they guarantee that the root operator ofl isf.

Example 5

If we apply a contextual paramodulation from the clause (x1b'c)_(g(b)'d) j[x1=ACa]j into the clause P(x2(ud))_Q(u) j[x2=ACb]j, in the subterm x2(ud), we deduce P(xrz)_ (g(b)'d)_Q(u) j[T ]j . The set of constraints T can be simplied to x1=ACa ^ x2=ACb ^ x1

z=ACud ^ xr=ACc ^ fa;bg6ACHterms(u;) .

The role of extension variables zf is important but does not need a strong control. Indeed, in other inference rules, they are considered as other variables. But, in a contextual paramodulation, we do not put back the context, i.e. the non-used subterms, in the deduced clause and it produces the loss of completeness as shown in the next example. To correct this, we allow further contextual paramodulations nding the term to be replaced in this context, marked by an extension variable. This is the reason why the condition onHterms is not applied to extension variables. As mentioned earlier, extension variables implement the same notion of irreducibility as in [NR94]. Indeed, in the proof of completeness, each term appearing in the constraints is assumed to be irreducible ; but, when a ground term t is associated to an extension variable zf, the irreducibility is required only for the terms ofHterms(t;f).

Example 6

Given three clauses (ab'c) (1) , P((aa)(bb)) (2) and :P(cc) (3) , we can prove that they form an AC-inconsistent system in the following way :

A contextual paramodulation from (1) into (2) at the subterm (aa)(bb) produces the clause P(xz)j[x=ACc ^ z=ACab]j (4) ; then, another contextual paramodulation from (1) into (4) at the subterm xz permits to deduce P(yz0)j[z =ACab ^ z0=ACc ^ y =ACc]j (5) . Then, a resolution between (3) and (5) produces the empty clause 2j[z =ACab ^ z0=ACc]j.

If the condition onHterms was generalized to variables of extension, we could not deduce the clause (5) and nd a contradiction since the left-hand side ab of the equation would be found in a variable.

But, this is the only role of such extension variables and the next rule has the highest priority.

Denition 6

(Deletion of Extension Variables) If there is an extension variablezf in the constraints T of a clause Cj[T ]j which does not appear in C, this clause has to be replaced byCj[T ]j, where is the substitution fzf 7!zgandz is a new variable.

This denition is motivated by the following properties :

(9)

1. If an extension variable zf appears only in the constraints of a clause, it cannot be used by a contextual paramodulation step and also loses its special interest.

2. Any extension variable zf has a single occurrence in a clause : it is created by the contextual paramodulation rule, and, to be duplicated, it has to instantiate another variable. But, since uniers are not computed, variables are never instantiated and also an extension variable cannot appear twice in a clause.

3. As a consequence, an extension variable may only appear in a clause under the AC-operator for which it is dened.

In the last two inference rules,a further renement can be dened. If the literal L is a negative equation

:(s't), and if the position of the (contextual) paramodulation is in the term s, we can add the ordering constraint st, specifying that this inference step has to be applied in the maximal side of the equation.

The following extended paramodulation rule can be viewed as a mutual contextual paramodulation between two clauses, at the head of the left-hand side of their maximal equation.

Denition 7

(Constrained AC-Extended Paramodulation) (l1'r1)_D1 j[T1]j (l2'r2)_D2 j[T2]j (f(xr1;z1)'f(xr2;z2))_D1_D2 j[T1^T2^T3]j where xr1,xr2,z1 and z2 are new variables, f 2FAC

and T3 isf(l1;z1)=ACf(l2;z2) ^ xr1=ACr1 ^ xr2=ACr2

^l1r1 ^ l2r2 ^ (l1'r1)D1 ^ (l2'r2)D2

^Hterms(l1;f) \AC Hterms(l2;f) 6= ;

^Hterms(z1;f) \AC Hterms(z2;f) ' ;

In the deduced clause, the terms r1 and r2 and the contexts z1 and z2 are replaced by variables ; it is dierent from the contextual paramodulation where the context is marked by an extension variable ; indeed, our proof technique for completeness (transnite semantic trees) has shown that paramodulations in these contexts were useless. The last constraints force the existence of a maximal overlap between l1 and l2. In other words, we have to consider the maximal set of shared subterms between l1 and l2.

Example 7

If we apply an extended paramodulation between the constrained clauses (x1b'c)_ (g(b)'d) j[x1=ACa]j and (ax2'e)_(g(x2)'b) j[x2=ACd]j, the deduced clause is (xr1z1'xr2

z2)_(g(b)'d)_(g(x2)'b) j[T ]j, and the simplied form of T is x1=ACa ^ x2=ACd ^ xr1=ACc ^

xr2=ACe ^ z1=ACd ^ z2=ACb .

So, we have dened a set of inference rules that drastically limits the number of possible deductions, thanks to the ordering and AC-unication constraints, but particularly because we never compute any AC-unier ; we need only to check the AC-uniability. In the following, we show that our results also apply to the superposition strategy.

4.2 Superposition Strategy

The previous inference rules can be rened for the superposition strategy. The main dierence between superposition and paramodulation is that superposition is only applied into maximal sides of equatio- nal literals. So, the three paramodulation rules are replaced by rules ofConstrained AC-Superposition, Constrained AC-Contextual SuperpositionandConstrained AC-Extended Superposition. Their denitions dier from the paramodulation ones by :

1. If a (contextual) superposition is applied from an equation (l'r) into the term s of a positive equational literal (s't), the constraints st and (s't)(l'r) are added.

2. In inference rules, the constraints representing the maximality of an equational literal (l'r) or

:(l'r) (where l is assumed to be greater than r) in a clause have to be modied :

(l'r) is maximal in a clause (l'r)_D if (l'r)L for any positive literal L of D and,

(10)

ls and lt for any negative literal:(s't) of D.

:(l'r) is maximal in a clause :(l'r)_D if (l'r):L for any negative literal L of D and, (l'l)L for any positive literal L of D.

3. The right-hand sides are no more replaced by new variables ; they appear explicitly in the deduced clause.

For completeness, a new rule has to be added :

Denition 8

(Constrained AC-Equational Factoring) (u1'v1)_(u2'v2)_D j[T1]j

(u1'v1)_:(v1'v2)_D j[T1^T2]j

whereT2 is u1=ACu2 ^ u1v1 ^ (u1'v1)(u2'v2)_D

This inference rule transforms a clause so that it does no more contain two positive equational literals with the same left-hand side.

Nieuwenhuis and Rubio have dened a similar system of inference rules for superposition [NR94]. Both inference systems do not compute any AC-unier and permit l to be in a variable of Ljp for the contextual superposition rule. But, they do not restrict it to extension variables. So, they allow useless inference steps which consist in applying a superposition step in a variable, as exemplied by the following :

Example 8

Given the following system,

((aa)x'ax) (1) (bc'c) (2) P((ab)(ac)) (3)

we can deduce the clause P(ax)j[x=ACbc]j(4) by a superposition from (1) into (3). Then they allow a contextual superposition from (2) into (4) which produces P(cy)j[y =ACa]j(5) . If we forget that we are working at maximal positions of AC-operators, this last step corresponds to a superposition from (2) into the variable x, which is well-known to be useless. With our constraints, we forbid it and a similar clause can be derived by a contextual superposition from (2) into (3) which produces P(cz)j[z=ACaa]j(40) and a superposition from (1) into (40) which produces P(ax)j[x=ACc]j(50) .

The clauses (5) and(50) are apparently dierent, but if we use the propagation of constrained subterms in both sequences of deduction, the terms a and c appeared in the constraints. So, the deduced clauses

should be P(yx)j[x=ACc ^ y =ACa]j(500) .

Moreover, Nieuwenhuis and Rubio do not have our restrictions onHterms for the contextual and exten- ded superpositions.

Now, we have to introduce the lifting lemma for our inference rules, since the proof of completeness, based on transnite semantic trees, is rst obtained in the ground case (see Section 6).

4.3 Lifting Lemma

The purpose of a lifting lemma is to show that inferences on ground clauses are instances of inferences on the corresponding general clauses. But, lifting a paramodulation step may be impossible, when it replaces a subterm introduced by the substitution which makes the clause ground. The solution of [Pet83] is to restrict paramodulation to ground clauses where variables are substituted by irreducible terms w.r.t.

a term rewriting system. The technique has been applied to prove the AC-completeness of inference rules described in [RV93], and we are going to generalize it for the constrained paramodulation and superposition strategies.

The next proposition is a consequence of the stability property of the ordering.

Proposition 9

LetAand B be two objects. If AB for a substitution , then A6B . A consequence of this proposition is :

(11)

Corollary 10

Let be a ground AC-unier of objects A1;:::;Am, and B1 and B2 be two objects such that :B1B2. There exists an AC-mgu ofA1;:::;Am such that : B1 6B2.

This corollary permits to lift ordering constraints, and the substitution , dened by = (for a ground substitution ), allows us to lift the AC-unication constraints.

We have to check that whenever the conditions for applying inference rules to the ground level are sa- tised, they are also valid at the general level. These conditions are (for paramodulation and superposition rules) :

1. p is a non-variable position in L

2. The constraints onHterms are satisable

The rst condition remains valid at the general level since it concerns an occurrence in C (for a constrai- ned clause Cj[T ]j). For the second ones, using the substitutions , and dened above, and given two terms s and t, if the constraint Hterms(s;f)6ACHterms(t;f) is satised, the constraint

Hterms(s;f)6ACHterms(t;f) is satisable by , since = .

The reasoning is the same if we test emptiness or non-emptiness of the intersection betweenHterms(s;f) andHterms(t;f). So, all these constraints are satisable at the general level and we can state the main lemma :

Lemma 11

(Lifting Lemma)LetC1j[T1]j;:::;Cnj[Tn]j be clauses anda ground solution of all theTi, i = 1:::n. If an inference ruleRapplies toC1j[ ]j;:::;Cnj[ ]jand produces a clause Cj[c]j, the same inference ruleRapplies to clausesC1j[T1]j;:::;Cnj[Tn]jand generates a clause Dj[T ]jsuch thatC and D are AC-equal, and c is a solution ofT.

5 Simplication Rules

In this section, we dene subsumption and simplication rules compatible with the constrained inference rules described in the previous section. But, these rules have strong conditions to be applied ; we also propose new ones which are more often applicable. These rules are fundamental for the eciency of our theorem prover, since they allow us to delete redundant clauses.

5.1 Constrained Subsumption

The purpose of subsumption is to eliminate clauses which are redundant. In the classical denition, a clause C1 subsumes a clause C2 if there is a substitution such that C1 C2. Since clauses are considered as multisets, C2 has at least as many literals as C1. It is extended to :

Denition 12

(Constrained AC-Subsumption) A constrained clause C1j[T1]j subsumes a constrained clauseC2j[T2]jif there is a solution1 ofT1such that : for each solution2 ofT2, there is a substitution such that C11is a subset of C22, i.e. 912Sol(T1) ; 822Sol(T2) ; 9 ; C11ACC22

The standard way for applying this rule consists in the deletion of the strictly subsumed clauses, i.e.

of clauses which are subsumed by a clause, but which do not subsume this clause. However, in our case, this causes the loss of the completeness. Indeed, as shown in [BGLS92], it may happen when the terms of the range of 1, Ran(1), are not included in those of 2, Ran(2). So, rst, we check that this condition is satised.

Denition 13

(Application of the Strict Constrained AC-Subsumption)If a clause C1j[T1]j subsumes strictly a clauseC2j[T2]jand if Ran(1)vACRan(2), the clause C2j[T2]jis deleted.

This denition has to be modied for taking into account the extension variables introduced by the contextual paramodulationand superposition rules (Denition 5). The only modication is in the calculus of Ran(i) in previous denition : if zf is an extension variable appearing under the AC-operator f in Ci, the set of termsHterms(zfi;f) will replace zfi inRan(i).

From now on, whenever we will talk about the range of a substitution, it will refer to this new denition.

Références

Documents relatifs

Using her mind power to zoom in, Maria saw that the object was actually a tennis shoe, and a little more zooming revealed that the shoe was well worn and the laces were tucked under

Then, the author proposed a complete type inference algorithm for Wand's system [Rem89], but it was formalized only in the case of a nite set of labels (a previous solution given

A coordinating conjunction 'coordinates' two equivalent elements in a sentence, that is, words belonging to the same grammatical category (nouns + nouns, verbs + verbs,

• How does the proposed algorithm behave if the t faulty processes can exhibit a malicious behavior. ⋆ a malicious process can disseminate wrong

Keywords: Behavioural Science, Behavioural Economics, Health Promotion, Public Health, Nudge.. David McDaid is Senior Research Fellow at LSE Health and Social Care and at

S everal years ago, at the urging of some nonmedical friends, a small group of physicians and our spouses created a new board game called “Diagnosis.” Each player was a

2 Until a refrigerator-stable vaccine becomes available, however, varicella vac- cine will not be incorporated into the recommend- ed immunization schedule in Canada, as most

Health care professionals and patients can access informa- tion and support from the CCS three ways: by calling the Cancer Information Service (CIS) at 1-888-939-3333, by visit- ing