1 Introduction

Equations occur frequently in many areas of mathematics, logics, and computer science. Equational theorem proving  [6, 8, 19, 22] is, in general, concerned with proving mathematical or logical statements in first-order clause logic with equality. While resolution [24] has been successful for theorem proving for first-order clause logic without equality, it has some limitations to deal with the equality predicate. For example, when dealing with the equality predicate using resolution, one must add the congruence axioms explicitly for each predicate and function symbol in order to express the properties of equality [8, 22].

Paramodulation [23] is based on the replacement of equals by equals, in order to improve the efficiency of resolution in equational theorem proving. However, paramodulation, in general, often produces a large amount of unnecessary clauses, so the search space for a refutation expands very rapidly. Therefore, various improvements have been developed for paramodulation. For example, it was shown that the functional reflexivity equations used by the traditional paramodulation rule [23] are not needed, and paramodulation into variables does not need to be allowed (see [8]).

Basic paramodulation [9, 20] restricts paramodulation by forbidding paramodulation at (sub)terms introduced by substitutions from previous inference steps, and uses orderings on terms and literals in order to further restrict paramodulation inferences. In [21, 26], basic paramodulation had been extended to basic paramodulation modulo associativity and commutativity (AC) axioms. (See [25] also for basic paramodulation modulo the associativity (A) axiom.) Basic paramodulation modulo AC uses the symbolic constraints, overcoming a drawback of traditional paramodulation modulo AC (see [7, 27]) that often generates many slightly different permuted variants of clauses. For example, more than a million conclusions can possibly be generated by paramodulating the equation \(x + x + x = x\) into the clause \(P(y_1 + y_2 + y_3 + y_4)\) for which + is an AC symbol, since a minimal complete set of AC-unifiers for \(x + x + x\) and \(y_1 + y_2 + y_3 + y_4\) contains more than a million AC-unifiers [21, 26]. On the other hand, one only needs a single conclusion \(P(x)\,||\, x+ x +x \approx _{AC}^? y_1 + y_2 + y_3 + y_4\) for the above inference using basic paramodulation modulo AC with an equality constraint.

In this paper, we present a new basic paramodulation calculus modulo equational theories E (including \(E=AC\)) parameterized by a suitable E-compatible ordering \(\succ \). Our main inference rule for basic paramodulation modulo E is given (roughly) as follows:

figure a

The equality constraints are inherited and the accumulated E-unification problems are kept in the constraint part of conclusion. Instead of generating as many conclusions as minimal and complete E-unifiers of two terms s and \(s^\prime \), a single conclusion is generated with its constraint keeping the E-unification problem of s and \(s^\prime \). Another key inference rule in our basic paramodulation calculus modulo E is the Generalized E-Parallel (or E-Parallel) rule, adapted from our recent work on basic narrowing modulo [18]. This rule allows our basic paramodulation calculus to adapt the free case (i.e. \(E=\emptyset \)) to the modulo E case (i.e. \(E\ne \emptyset \)).Footnote 1 For example, suppose that we have three clauses \(1: a+b \approx c\), \(2: a+(b+x) \approx c+x\), and \(3:(a+a)+(b+b) \not \approx c+c\), where + is an AC symbol with \(+\succ a \succ b \succ c\). We use the E-Parallel rule from clause 1 and 2 and obtain the clause \(4: a+(b+(a+b)) \approx c+c\), which derives a contradiction with clause 3 because \(a+(b+(a+b)) \approx _{AC} (a+a)+(b+b)\) (i.e. the equality constraint is satisfiable). The details of this inference rule are discussed in Section 4.

Throughout this paper, we assume that (i) we are given an E-compatible reduction ordering \(\succ \) on terms with the subterm property that is E-total on ground terms, (ii) E has a finitary and complete unification algorithm, and (iii) E-congruence classes are finite. (If E satisfies condition (i), then E is necessarily regular [2].) With these assumptions of E, we can deal uniformly with different equational theories E in our framework and show that our inference system including our contraction rules is refutationally complete.

The known practical theories satisfying the above assumptions of E are AC and finite permutation theories [1, 17]. (For example, if one considers an ACI symbol + using our approach, then AC should be a modulo E part and the idempotency axiom (\(I\,{:}\,x+x\approx x\)) should be a part of the input formulas.) Although associative (A)-unification is infinitary, our approach is also applicable to the case where \(E=A\) in practice, since there is a tool for A-unification which is guaranteed to terminate with a finite and complete set of A-unifiers for a significantly large class of A-unification problems (see [14]).

The longer version of this paper is found in [16].

2 Preliminaries

We assume that the reader has some familiarity with rewrite systems [3] (including the extended rewrite system for R modulo E (i.e. RE) [11, 15]) and unification [4]. We use the standard terminology of paramodulation [6, 9, 22].

We denote by \(T(\mathcal {F}, \mathcal {X})\) the set of terms over a finite set of function symbols \(\mathcal {F}\) and a denumerable set of variables \(\mathcal {X}\). An equation is an expression \(s\approx t\), where s and t are (first-order) terms built from \(T(\mathcal {F}, \mathcal {X})\). A literal is either an equation L (a positive literal) or a negative equation \(\lnot L\) (a negative literal). A clause is a finite multiset of literals, written as a disjunction of literals \(\lnot A_1 \vee \cdots \vee \lnot A_m \vee B_1 \vee \cdots \vee B_n\) or as an implication \(\varGamma \rightarrow \varDelta \), where the multiset \(\varGamma \) is called the antecedent and the multiset \(\varDelta \) is called the succedent of the clause. (Recall that a multiset is an unordered collection with possible duplicate elements.)

An equational theory is a set of equations. (In this paper, an equational theory and a set of axioms are used interchangeably.) We denote by \(\approx _{E}\) the least congruence on \(T(\mathcal {F}, \mathcal {X})\) that is closed under substitutions and contains a set of equations E. If \(s\approx _E t\) for two terms s and t, then s and t are E-equivalent.

A (strict) ordering \(\succ \) on terms is monotonic if \(s\succ t\) implies \(u[s]_p \succ u[t]_p\) for all s, t, u and positions p. An ordering \(\succ \) on terms is stable under substitutions if \(s\succ t\) implies \(s\sigma \succ t\sigma \) for all st, and substitutions \(\sigma \). An ordering \(\succ \) on terms is a rewrite ordering if it is monotonic and stable under substitutions. A well-founded rewrite ordering is a reduction ordering. An ordering \(\succ \) on terms has the subterm property if \(t[s]_p \succ s\) for all s, t, and \(p\ne \lambda \). (In this paper, \(\lambda \) denotes the top position.) A simplification ordering is a rewrite ordering with the subterm property. An ordering \(\succ \) on terms is E-compatible if \(s\succ t\), \(s\approx _E s^\prime \), and \(t\approx _E t^\prime \) implies \(s^\prime \succ t^\prime \) for all \(s,s^\prime ,t\) and \(t^\prime \). An ordering \(\succ \) on ground terms is E-total if \(s\not \approx _E t\) implies \(s \succ t\) or \(t\succ s\) for all ground terms s and t.

Given a multiset S and an E-compatible ordering \(\succ \) on S, we say that x is maximal (resp. strictly maximal) in S if there is no \(y\in S\) (resp. \(y \in S\setminus \{x\})\) with \(y\succ x\) (resp. \(y \succeq x\)).

Clauses may also be considered as multisets of occurrences of equations. An occurrence of an equation \(s\approx t\) in the antecedent of a clause is the multiset \(\{\{s,t\}\}\), and in the succedent it is the multiset \(\{\{s\}, \{t\}\}\). We denote ambiguously all those orderings on terms, equations and clauses by \(\succ \).

An equational theory is permutative if each equation in the theory contains the same symbols on both sides with the same number of occurrences. The depth of a term t is defined as \(depth(t) = 0\) if t is a variable or a constant and \(depth(f(s_1,\ldots ,s_n)) = 1 + \text {max}\{depth(s_i)\,|\,1\le i\le n\}\). We say that an equational theory has maximum depth at most k if the maximum depth of all terms in the equations in the theory is less than or equal to k.

A (Herbrand) interpretation I is a congruence on ground terms. I satisfies (is a model of) a ground clause \(\varGamma \rightarrow \varDelta \), denoted by \(I\models \varGamma \rightarrow \varDelta \), if \(I \not \supseteq \varGamma \) or \(I \cap \varDelta \ne \emptyset \). In this case, we say that \(\varGamma \rightarrow \varDelta \) is true in I. A ground clause C follows from a set of ground clauses \(\{C_1, \ldots , C_k\} \models C\) if C is true in every model of \(\{C_1, \ldots , C_k\}\).

3 Constrained Clauses

Definition 1

(Constrained clauses) [22, 26] A constrained clause is a pair \(C\,||\,\phi \), where C is a clause and \(\phi \) is an equality constraint consisting of a conjunction of the form \(s \approx _E^? t\) for terms s and t. The set of solutions of a constraint \(\phi \), denoted by \(Sol(\phi )\), is the set of the ground substitutions defined inductively as:

$$Sol(\phi _1 \wedge \phi _2) = Sol(\phi _1) \cap Sol(\phi _2),$$
$$Sol(s\approx _E^? t) = \{\sigma \,|\,s\sigma \text { and } t\sigma \text { are } E\text {-equivalent}\},$$

A constraint \(\phi \) is satisfiable if it admits at least one solution.

A constrained clause with an unsatisfiable constraint is a tautology. If every ground substitution with domain \(Vars(\phi )\) of \(C\,||\,\phi \) is a solution of \(\phi \), then \(\phi \) is a tautological constraint. An unconstrained clause can also be considered as a constrained clause with a tautological constraint.

The main technical difficulties in lifting a reduced ground inference to an inference at the clause level in a basic paramodulation inference system involve a ground clause of the form \(C\sigma := D\sigma \vee x\sigma \approx t\sigma \) with \(C:= D \vee x \approx t\,||\,\phi \) and \(\sigma \in Sol(\phi )\), where \(x\sigma \Rightarrow t\sigma \in R\) for a given ground rewrite system R. This motivates the following definition of irreducibility to lift a reduced ground inference to an inference at the clause level in our inference system. (See [9] also for order-irreducibility in the free case.)

Definition 2

(Order-irreducibility) Given a ground rewrite system R and an equational theory E, a ground literal \(L[l^\prime ]_p\) is order-reducible (at position p) by RE with \(l\Rightarrow r \in R\) if \(l^\prime \approx _E l, l \succ r\) and \(L \succ l \approx r\). A literal L[s] is order-irreducible in s by RE if L[s] is not order-reducible at any position of s.

In Definition 2, the condition \(L\succ l\approx r\) is always true when L is a negative literal or else \(l^\prime \) does not occur at the top (i.e. \(p=\lambda \)) of the largest term of L.

Definition 3

(Reduced ground instances) Given a ground rewrite system R and an equational theory E, \(C\sigma \) is a ground instance of \(C\,||\,\phi \) if \(\sigma \) is a solution of \(\phi \) (i.e. \(\sigma \in Sol(\phi )\)). It is a reduced ground instance of \(C\,||\,\phi \) w.r.t. RE if \(\sigma \) is a solution of \(\phi \) and each ground literal \(L[x\sigma ]\) in \(C\sigma \) is order-irreducible in \(x\sigma \) by RE for each variable \(x \in Vars(C)\). In this case, \(\sigma \) is a reduced solution of \(C\,||\,\phi \) w.r.t. RE.

Definition 4

(A model of a constrained clause) An interpretation I satisfies (is a model of) a constrained clause \(C\,||\,\phi \), denoted by \(I\models C\,||\,\phi \), if it satisfies every ground instance of \(C\,||\,\phi \) (i.e. every \(C\sigma \) for which \(\sigma \) is a solution of \(\phi \)).

Definition 5

(Reductiveness, weak reductiveness, semi-reductiveness, and weak maximality) An equation \(s \approx t\) is reductive (resp. weakly reductive) for \(C\,||\,\phi :=D \vee s \approx t\,||\,\phi \) if there exists a ground instance \(C\sigma \) such that \(s\sigma \approx t\sigma \) is strictly maximal (resp. maximal) in \(C\sigma \) with \(s\sigma \succ t\sigma \). The clause \(C\,||\,\phi \) is simply called reductive if there exists a reductive equation \(s\approx t\) for \(C\,||\,\phi \). A negative equation \(u\not \approx v\) is semi-reductive (resp. weakly reductive) for \(C\,||\,\phi :=D \vee u\not \approx v\,||\,\phi \) if there exists a ground instance \(C\sigma \) such that \(u\sigma \succ v\sigma \) (resp. \(u\sigma \succ v\sigma \) and \(u\sigma \not \approx v\sigma \) is maximal in \(C\sigma \)). A literal L is weakly maximal for \(C\,||\,\phi :=D \vee L\,||\,\phi \) if there exists a ground instance \(C\sigma \) such that \(L\sigma \) is maximal in \(C\sigma \).

4 Inference Rules

The inference rules in our inference system are parameterized by a selection function \(\mathcal {S}\) and an E-compatible reduction ordering \(\succ \) with the subterm property that is E-total on ground terms, where \(\mathcal {S}\) selects at most one (occurrence of a) negative literal in the clause part C of each (constrained) clause \(C\,||\,\phi \). For technical convenience, if a literal L is selected in C, then we also say that L is selected in \(C\,||\,\phi \). In our inference rules, a literal in a clause \(C\,||\,\phi \) is involved in some inference if it is selected in C (by \(\mathcal {S}\)) or nothing is selected and it is maximal in C (cf. [8]). The following Basic Paramodulation rule is our main inference rule for equational theorem proving modulo E, where only the maximal sides of literals in clauses are involved in inferences by this rule. We rename variables in the premises in our inference rules if necessary so that no variable is shared between premises (i.e. standardized apart).

$$\mathbf{Basic \ \ Paramodulation}$$
figure b
  1. 1

    \(s^\prime \) is not a variable,

  2. 2

    \(s\approx t\) is reductive for the left premise, and C contains no selected literal,

  3. 3

    either one of the following three conditions is met:

    1. (a)

      L is selected in the right premise, and

      L is of the form \(u[s^\prime ] \not \approx v\) and is semi-reductive for the right premise.

    2. (b)

      nothing is selected in the right premise, and

      L is of the form \(u[s^\prime ] \approx v\) and is reductive for the right premise.

    3. (c)

      nothing is selected in the right premise, and

      L is of the form \(u[s^\prime ] \not \approx v\) and is weakly reductive for the right premise.

$$\mathbf{Equality \ \ Resolution}$$
figure c

\(s\not \approx t\) is selected, or else nothing is selected and \(s\not \approx t\) is weakly maximal for the premise.

$$\mathbf{E}\text {-}{} \mathbf{Factoring}$$
figure d

\(s\approx t\) is weakly reductive for the premise, and C contains no selected literal.

$$\mathbf{E}\text {-}{} \mathbf{Completion}$$
figure e
  1. 1

    \(e_1[s^\prime ]_p \approx e_2 \in E\) and \( p \ne \lambda \), where \(s^\prime \) is not a variable,

  2. 2

    \(s\approx t\) is reductive for the premise, and C contains no selected literal.

The above E-Completion rule is an adaptation of the E-closure [27] rule using equality constraints (cf. E-extension [5]).

$$\mathbf{E}\text {-}{} \mathbf{Parallel}$$
figure f
  1. 1

    \(s \approx t\) is reductive for the left premise, and C contains no selected literal,

  2. 2

    \(l\approx r\) is reductive for the right premise, and D contains no selected literal,

  3. 3

    both l and s are not variables,

  4. 4

    \(\sigma \,\text {=}\, \{x \mapsto s\}\) and \(\theta \,\text {=}\, \{x \mapsto t\}\) for some variable \(x \in Vars(l) \cap Vars(r)\) with \(x \notin Vars(\phi _2)\),

  5. 5

    there is a term \(u^\prime \) with \(u^\prime \approx _{E}l\sigma \), such that \(u^\prime \) is RE-reducible with \(R=\{ l\Rightarrow r, s\Rightarrow t\}\) only at the top position (i.e. no strict subterm of \(u^\prime \) is RE-reducible).

$$\mathbf{Generalized \ \ E}\text {-}{} \mathbf{Parallel}$$
figure g
  1. 1

    \(s \approx t\) is reductive for the left premise, and C contains no selected literal,

  2. 2

    \(l\approx r\) is reductive for the right premise, and D contains no selected literal,

  3. 3

    both l and s are not variables,

  4. 4

    \(e_1[u] \approx e_2 \in E\), where u is not a variable,

  5. 5

    \(\sigma = \{x \mapsto u[s]_p\}\) and \(\theta = \{x \mapsto u[t]_p\}\) for some variable \(x \in Vars(l) \cap Vars(r)\) with \(x \notin Vars(\phi _2)\) and some position p,

  6. 6

    there is a term \(u^\prime \) with \(u^\prime \approx _{E}l\sigma \), such that \(u^\prime \) is RE-reducible with \(R=\{ l\Rightarrow r, s\Rightarrow t\}\) only at the top position.

We mark each clause produced by the Generalized E-Parallel (or E-Parallel) rule as “protected” so that it is protected from our contraction rules discussed in Section 5. (We simply say each marked clause is a protected clause.) Protected clauses behave the same way as other clauses in our inference rules, but our contraction rules are not applied to protected clauses (see Section 5 for details).

We may also use predicate terms [6] \(P(t_1,\ldots , t_n)\) in our inference system, where a predicate term cannot be a proper subterm of any term. Note that a predicate term \(P(t_1,\ldots , t_n)\) can be expressed as an equation \(P(t_1,\ldots , t_n) \approx \top \), where \(\top \) is a special constant symbol minimal in the ordering \(\succ \) and P is considered as a function symbol. (In this sense, \(\lnot P(t_1,\ldots , t_n)\) can be expressed as \(P(t_1,\ldots , t_n) \not \approx \top \).) In the remainder of this paper, by \(\mathcal {BP}\) we denote the inference system consisting of the Basic Paramodulation, Equality Resolution, E-Factoring, E-Completion, and the Generalized E-Parallel rule. If E is a permutative theory with maximum depth at most 2 (e.g. \(E=A, C\), or AC), then we use the simpler E-Parallel rule instead of the Generalized E-Parallel rule in \(\mathcal {BP}\) (see Lemma 6).

Example 1

Let + be an AC symbol (in infix notation) with \(+ \succ a \succ b \succ 0\) and consider the following inconsistent set of clauses 1: \(x + 0 \approx x\), 2: \(a + a \approx 0\), 3: \(b + b \approx 0\), and 4: \( (a + b) + (a + b) \not \approx 0\). Now we show how the empty clause (with a satisfiable constraint) is derived:

5: \((x+y)+z \approx x + 0\,||\, y+z \approx _{AC}^? a+a\) (E-Completion with 2 using the associativity axiom \(x+(y+z) \approx (x+y)+z\).)

6: \(((b+b)+y) + z \approx 0+0\,||\, y+z \approx _{AC}^? a+a\) (E-Parallel with 3 into 5. In condition  of the E-Parallel rule, term \(u^\prime \) corresponds to \((b+y)+(b+z)\) here.)

7: \(0+0 \not \approx 0 \,||\, ((b+b)+y) + z \approx _{AC}^? (a+b)+(a+b) \,\wedge \, y+z \approx _{AC}^? a+a\) (Basic Paramodulation with 6 into 4)

8: \(x\not \approx 0 \,||\, x+0 \approx _{AC}^? 0+0\,\wedge \, ((b+b)+y) + z \approx _{AC}^? (a+b)+(a+b)\,\wedge \, y+z \approx _{AC}^? a+a\) (Basic Paramodulation with 1 into 7)

9: \(\square \,||\, x\approx _{AC}^? 0\,\wedge \, x+0 \approx _{AC}^? 0+0\,\wedge \, ((b+b)+y) + z \approx _{AC}^? (a+b)+(a+b)\wedge y+z \approx _{AC}^? a+a\) (Equality Resolution on 8)

In contrast, the existing approaches for basic paramodulation modulo AC [21, 26] use clauses 2 and 4, for example, and produce clause \(5^\prime \text {:} \ 0+x \not \approx 0\,||\,x\approx _{AC}^? b+b\) and then clause \(6^\prime \text {:} \ 0+y \not \approx 0\,||\,x\approx _{AC}^?b{+}b\,\wedge \,y\approx _{AC}^? 0\) by their inference rules. Then \(6^\prime \) is used to derive a contradiction with 1. It can be viewed that \(6^\prime \) is obtained from \(5^\prime \) by an indirect paramodulation with 3 in the constraint part. In our approach, we simply block clauses like \(5^\prime \) from further inferences (see Definition 12), and no direct or indirect paramodulation is allowed in the constraint part of any clause.

Example 2

Consider \(S = \{f(g(x)) \approx x, a\approx b, c \not \approx g(b)\}\) and \(E=\{f(g(g(a))) \approx c\}\) with \(f\succ g\succ a\succ b\), where E is a regular theory with maximum depth 3. The Generalized E-Parallel rule with premises \(f(g(x)) \approx x\) and \(a\approx b\) produces the conclusion \(f(g(g(a))) \approx g(b)\). (Choose l as f(g(x)), s as a, and u as g(a) in the Generalized E-Parallel rule.) Then it is used to derive a contradiction with clause \(c \not \approx g(b)\) since \(f(g(g(a))) \approx _E c\).

In the above example, a suitable E-compatible reduction ordering \(\succ \) on ground terms is obtained in such a way that given two ground terms, we rewrite each occurrence of c in each ground term into f(g(g(a))) at the same position with (the occurrence of) c and then use the standard lexicographic path ordering [3, 22] for comparing (rewritten) ground terms without any occurrence of c. Then we may compare terms with variables by considering ground substitutions and using this ordering on ground terms.

In what follows, by the Parallel rule we mean the E-Parallel or the Generalized E-Parallel rule. First, observe that we cannot derive a contradiction in both Examples 1 and 2 using inference rules in \(\mathcal {BP}\) without the Parallel rule. The intuition behind the Parallel rule is that above all, a reductive ground clause corresponds to a reductive ground conditional rewrite rule [19] with positive and negative conditions. Therefore, roughly speaking, the premises of the Parallel rule are reductive conditional rewrite rules with positive and negative conditions. (The Parallel rule applies to only reductive clauses.) Now the conclusion of the Parallel rule combines two steps: (i) instantiating a “problematic” variable in a special and restricted way, and (ii) selectively rewriting an instantiated term if conditions are met. (Therefore, conditions C is included in the conclusion.) A problematic variable is often determined by a built-in equational theory E. It is mostly a variable produced by an E-Completion inference (see Example 1) for AC cases, which is the counterpart of an extension variable for AC-extension [7, 27].

Observe that the Generalized E-Parallel rule is more general than the E-Parallel rule. If p is always the top position for the Generalized E-Parallel rule, then they are equivalent. This is the case for permutative theories with maximum depth at most 2 (e.g. \(E=A, C\), or AC).

Lemma 6

If E is a permutative theory with maximum depth at most 2, then the E-Parallel rule and the Generalized E-Parallel rule are equivalent, i.e., they generate the same conclusion for the same input premises.

Note that the E-Completion and the Parallel rule are not always needed for every built-in equational theory E. The following example is a simple variant of the reachability problem [15] modulo a permutation theory [1, 17], where \(\lnot P(f(c,b,b,d,e))\) is the query from the initial configuration P(f(abcde)). We may view E in the following example as all permutations of variables \(x_1, x_2, x_3, x_4\), and \(x_5\), since the symmetric group \(S_5\) is generated by two cycles \((1\,2)\) and \((1\,2\,3\,4\,5)\).

Example 3

Let \(E=\{f(x_1, x_2, x_3, x_4, x_5) \approx f(x_2, x_1, x_3, x_4, x_5), f(x_1, x_2, x_3, x_4,x_5) \approx f(x_2, x_3, x_4, x_5, x_1)\}\) with \(P\succ f\succ a\succ b\succ c\succ d \succ e\) and consider the following set of clauses 1: \(\lnot P(f(c,b,b,d,e))\), 2: P(f(abcde)), and 3: \(f(a,b,x,y,z)\approx f(b,b,x,y,z)\). Basic Paramodulation with 3 into 2 yields clause 4: \(P(f(b, b, x, y,z))\,||\,f(a,b,x,y,z)\approx _E^? f(a,b,c,d,e)\). By applying Basic Paramodulation with 1 and 4 (using \(P(f(c,b,b,d,e))\not \approx \top \) and \(P(f(b, b, x, y,z))\approx \top \,||\,f(a,b,x,y,z)\approx _E^? f(a,b,c,d,e)\)) and then applying Equality Resolution, we have clause 5: \(\square \,||\, f(b,b,x,y,z)\approx _E^? f(c,b,b,d,e)\wedge f(a,b,x,y,z)\approx _E^? f(a,b,c,d,e)\). The equality constraint in 5 is satisfiable and we have a contradiction. Note that clause 4 schematizes the set of ground clauses \(\{P(f(b,b,c,d,e)), P(f(b,b,c,e,d)), P(f(b,b,d,c,e)), P(f(b,b,d,e,c)), P(f(b,b,e,c,d)),P(f(b,b,e,d,c))\}\).

5 Redundancy Criteria and Contraction Techniques

Definition 7

(Relative reducibility) Given an equational theory E, a ground instance \(C\sigma _1\) of \(C\,||\,\phi _1\) is reduced relative to a ground instance \(D\sigma _2\) of \(D\,||\,\phi _2\) if for any rewrite system R, \(C\sigma _1\) is a reduced ground instance of \(C\,||\,\phi _1\) w.r.t. RE whenever \(D\sigma _2\) is a reduced ground instance of \(D\,||\,\phi _2\) w.r.t. RE.

In what follows, the relation \(\trianglelefteq \) on terms represents the subterm relation, i.e., \(s \trianglelefteq t\) if s is a subterm of t. The relation \(\sqsubseteq \) on sets of terms is defined as follows: \(\{s_1,\ldots , s_m\} \sqsubseteq \{t_1,\ldots , t_n\}\) if for all \(1\le i \le m\), there is some \(1\le j \le n\) such that \(s_i\trianglelefteq t_j\), and \(\emptyset \sqsubseteq X\) for any set of terms X. Given a clause \(C\,||\,\phi \), we denote by \(Ran(\sigma |_{Vars(C)})\) for some \(\sigma \in Sol(\phi )\) the range of the restriction of \(\sigma \) to the set of variables Vars(C) if \(Vars(C) \ne \emptyset \). If C is a ground clause with a tautological constraint (e.g. the empty constraint), then we set \(Ran(\sigma |_{Vars(C)})=\emptyset \). (Note that any ground substitution is a solution of a tautological constraint.)

We say that a clause \(C\,||\,\phi \) is a clause with a succedent top variable [21] w.r.t. \(\sigma \in Sol(\phi )\) if there is a variable \(x \in Vars(C)\cap Vars(\phi )\) only appearing in equations \(x \approx t\) of the succedent of C with \(x\sigma \succ t\sigma \) for some t. The following lemma, which directly follows from Definition 7, is a sufficient syntactic condition for \(C\sigma _1\) being reduced relative to \(D\sigma _2\) in Definition 7 if \(D\,||\,\phi _2\) is not a clause with a succedent top variable w.r.t. \(\sigma _2\). If \(D\,||\,\phi _2\) is a clause with a succedent top variable x w.r.t. some \(\sigma _2 \in Sol(\phi _2)\), then one may (partially) instantiate x in D with \(\sigma _2\) if possible, so that one may use the syntactic condition for checking whether \(C\sigma _1\) is reduced relative to \(D\sigma _2\) as in the following lemma.

Lemma 8

Given an equational theory E, a ground instance \(C\sigma _1\) of \(C\,||\,\phi _1\) is reduced relative to a ground instance \(D\sigma _2\) of \(D\,||\,\phi _2\) if \(Ran(\sigma _1|_{Vars(C)}) \sqsubseteq Ran(\sigma _2|_{Vars(D)})\) and \(D\,||\,\phi _2\) is not a clause with a succedent top variable w.r.t. \(\sigma _2\).

In what follows, we denote by \(E^{\prec C}\) (resp. \(R^{\prec C}\)) the set of ground instances of equations in E (resp. the set of ground rewrite rules in R) smaller than the ground clause C (w.r.t. \(\succ \)), and by S modulo E a set of clauses S with a built-in equational theory E.

Definition 9

(Redundancy) A clause \(C\,||\,\phi \) is redundant in S modulo E (w.r.t. relative reducibility) if for every ground instance \(C\sigma \), there exist ground instances \(C_1\sigma _1,\ldots , C_k\sigma _k\) of clauses \(C_1\,||\,\phi _1, \ldots , C_k\,||\,\phi _k\) in S reduced relative to \(C\sigma \), such that \(C\sigma \succ C_i\sigma _i\), \(1\le i \le k\), and \(\{C_1\sigma _1,\ldots , C_k\sigma _k\}\cup R^{\prec C\sigma }\cup E^{\prec C\sigma } \models C\sigma \) for any ground rewite system R contained in \(\succ \). (In this case, we also say that each \(C\sigma \) is redundant in S modulo E (w.r.t. relative reducibility).)

Definition 10

(Basic E-simplification) An equation \(l\approx r\) simplifies a clause \(C \vee L[l^\prime ]_p\,||\,\phi \) into \(C \vee L[r\rho ]_p \,||\,\phi \) if the following conditions are met:

  1. (i)

    p is a non-variable position;

  2. (ii)

    there is a substitution \(\rho \) such that \(l\rho \approx _E l^\prime \), \(L[l^\prime ]\succ l\rho \approx r\rho \), \(Vars(l\rho ) \supseteq Vars(r\rho )\), \(l\rho \succ r\rho \), and \(C \vee L[l^\prime ]_p\,||\,\phi \) is neither protected nor a clause with a succedent top variable w.r.t. any \(\sigma \in Sol(\phi )\).

Lemma 11

If an equation \(l\approx r\) simplifies a clause \(C \vee L[l^\prime ]_p\,||\,\phi \) into \(C \vee L[r\rho ]_p \,||\,\phi \) as in Definition 10, then \(C \vee L[l^\prime ]_p \,||\,\phi \) is redundant in S modulo E, where \(S=\{l\approx r, C\vee L[r\rho ]_p \,||\,\phi \}\).

The following definition extends the blocking rule in the free case (see [9]) to the modulo case, where a blocked clause does not contribute to finding a refutation during a theorem proving derivation w.r.t. \(\mathcal {BP}\) (see Definition 16) starting with an initial set of unconstrained clauses.

Definition 12

(Basic E-blocking) A clause \(C \,||\,\phi \) is blocked in S modulo E if the following conditions are met:

  1. (i)

    \(C \,||\,\phi \) is not a clause with a succedent top variable w.r.t. any \(\tau \in Sol(\phi )\);

  2. (ii)

    there is a variable \(x\in Vars(C) \cap Vars(\phi )\) such that for every \(\sigma \in Sol(\phi )\), there exist ground instances \(C_1\sigma _1,\ldots , C_k\sigma _k\) of clauses \(C_1\,||\,\phi _1,\ldots , C_k\,||\,\phi _k\) in S reduced relative to \(C\sigma \), such that \(C\sigma \succ C_i\sigma _i, 1\le i \le k\), and \(\{C_1\sigma _1,\ldots ,C_k\sigma _k\}\cup E^{\prec C\sigma }\models x\sigma \approx s\) with \(x\sigma \succ s\) for some ground term s.

Definition 13

(Basic E-instance)

A clause \(C \,||\,\phi \) is a basic E-instance in S modulo E if the following conditions are met:

  1. (i)

    \(C \,||\,\phi \) is protected;

  2. (ii)

    there is a protected clause \(D\,||\,\psi \in S\) such that for every ground instance \(C\sigma \) (resp. \(D\tau \)) of \(C \,||\,\phi \) (resp. \(D\,||\,\psi \)), there is a ground instance \(D\tau \) (resp. \(C\sigma \)) of \(D\,||\,\psi \) (resp. \(C \,||\,\phi \)) such that they are reduced relative to each other with \(C\sigma =D\tau \).

Observe that protected clauses are produced in a restricted way (e.g. see condition  in the E-Parallel rule) and if two protected clauses are the same up to variable renaming, then they are basic E-instances of each other and they do not need to be distinguished.

Definition 14

(Redundancy of an inference) An inference \(\pi \) with conclusion \(D\,||\,\phi \) is redundant in S modulo E (w.r.t. relative reducibility) if \(D\,||\,\phi \) is blocked or a basic E-instance in S modulo E, or for every ground instance \(\pi \sigma \) with maximal premise C and conclusion \(D\sigma \), there exist ground instances \(C_1\sigma _1,\ldots , C_k\sigma _k\) of clauses \(C_1\,||\,\phi _1, \ldots , C_k\,||\,\phi _k\) in S reduced relative to \(D\sigma \), such that \(C \succ C_i\sigma _i\), \(1\le i \le k\), and \(\{C_1\sigma _1,\ldots , C_k\sigma _k\} \cup R^{\prec C} \cup E^{\prec C} \models D\sigma \) for any ground rewrite system R contained in \(\succ \).

The following lemma immediately follows from Definition 9 and the observation that if \(\{C_1\sigma _1,\ldots , C_k\sigma _k\}\cup E^{\prec C\sigma } \models C\sigma \), then \(\{C_1\sigma _1,\ldots , C_k\sigma _k\}\cup R^{\prec C\sigma }\cup E^{\prec C\sigma } \models C\sigma \) for any ground rewite system R contained in \(\succ \), which serves as a sufficient condition for redundancy of clauses. Also, if an (unconstrained) clause C properly subsumes an (unconstrained) clause \(C^\prime \vee D\) in the classical sense, where C and \(C^\prime \) are the same up to variable renaming, then it is easy to see that \(C^\prime \vee D\) is redundant in \(\{C\}\) modulo E.

Lemma 15

A clause \(C\,||\,\phi \) is redundant in S modulo E if for every ground instance \(C\sigma \), there exist ground instances \(C_1\sigma _1,\ldots , C_k\sigma _k\) of clauses \(C_1\,||\,\phi _1, \ldots , C_k\,||\,\phi _k\) in S reduced relative to \(C\sigma \), such that \(C\sigma \succ C_i\sigma _i\), \(1\le i \le k\), and \(\{C_1\sigma _1,\ldots , C_k\sigma _k\}\cup E^{\prec C\sigma } \models C\sigma \).

Definition 16

(Theorem proving derivation) A theorem proving derivation is a sequence of sets of clauses \(S_0 = S, S_1,\ldots \) such that:

  1. (i)

    Deduction: \(S_i = S_{i-1} \cup \{C\,||\,\phi \}\) for some \(C\,||\,\phi \) if it can be deduced from premises in \(S_{i-1}\) by applying an inference rule in \(\mathcal {BP}\) or basic E-simplification.

  2. (ii)

    Deletion: \(S_i = S_{i-1} \setminus \{D\,||\,\psi \}\) for some \(D\,||\,\psi \) if it is not protected, and is redundant or blocked in \(S_{i-1}\) modulo E.

The set \(S_{\infty }\) of persistent clauses is defined as \(\bigcup _{i}(\bigcap _{j\ge i}S_j)\), which is called the limit of the derivation. A theorem proving derivation \(S_0, S_1, S_2,\ldots \) is fair [6] w.r.t. the inference system \(\mathcal {BP}\) if every inference \(\pi \) by \(\mathcal {BP}\) with premises in \(S_{\infty }\) is redundant in \(\bigcup _jS_j\) modulo E.

Definition 17

(Saturation w.r.t. relative reducibility) Given an equational theory E, we say that S modulo E is saturated under \(\mathcal {BP}\) w.r.t. relative reducibility if every inference by \(\mathcal {BP}\) with premises in S is redundant in S modulo E.

In what follows, we say that a clause \(C\,||\,\phi \) is non-protected redundant (resp. non-protected blocked) in S modulo E if it is not protected and is redundant (resp. blocked) in S modulo E. (If \(C\,||\,\phi \) is non-protected redundant in S modulo E, then we also say that each ground instance \(C\sigma \) of \(C\,||\,\phi \) is non-protected redundant in S modulo E.)

Lemma 18

(i) If \(S \subseteq S^\prime \), then any clause which is non-protected redundant or non-protected blocked in S modulo E is also non-protected redundant or non-protected blocked in \(S^\prime \) modulo E.

(ii) Let \(S \subseteq S^\prime \) such that all clauses in \(S^\prime \setminus S\) are non-protected redundant or non-protected blocked in \(S^\prime \) modulo E. Then (ii.1) any clause which is non-protected redundant or non-protected blocked in \(S^\prime \) modulo E is also non-protected redundant or non-protected blocked in S modulo E, and (ii.2) any inference which is redundant in \(S^\prime \) modulo E is also redundant in S modulo E.

Lemma 19

Let \(S_0, S_1,\ldots \) be a fair theorem proving derivation w.r.t. \(\mathcal {BP}\) such that \(S_0\) is a set of unconstrained clauses. Then \(S_{\infty }\) modulo E is saturated under \(\mathcal {BP}\) w.r.t. relative reducibility.

Proof

If \(S_{\infty }\) contains the empty clause, then it is immediate that \(S_{\infty }\) modulo E is saturated under \(\mathcal {BP}\) w.r.t. relative reducibility, so we assume that the empty clause is not in \(S_{\infty }\).

If a clause \(C\,||\,\phi \) is deleted in a theorem proving derivation, then we see that it is non-protected redundant or non-protected blocked in some \(S_j\) modulo E. It is also non-protected redundant or non-protected blocked in \(\bigcup _jS_j\) modulo E by Lemma 18(i). Similarly, every clause in \(\bigcup _jS_j\setminus S_\infty \) is non-protected redundant or non-protected blocked in \(\bigcup _jS_j\) modulo E.

Now by fairness of the derivation, every inference \(\pi \) by \(\mathcal {BP}\) with premises in \(S_{\infty }\) is redundant in \(\bigcup _jS_j\) modulo E. Then by Lemma 18(ii.2) and the above, \(\pi \) is also redundant in \(S_{\infty }\) modulo E. Thus, \(S_{\infty }\) modulo E is saturated under \(\mathcal {BP}\) w.r.t. relative reducibility.   \(\square \)

6 Refutational Completeness

The soundness of \(\mathcal {BP}\) (w.r.t. a fair theorem proving derivation) is straightforward, i.e., \(S_i \cup E \models S_{i+1} \cup E\) for all \(i\ge 0\). If the empty clause is in some \(S_j\), then \(S_0 \cup E\) is unsatisfiable by the soundness of \(\mathcal {BP}\). The following theorem states that \(\mathcal {BP}\) with our contraction rules (i.e. basic E-simplification and basic E-blocking) is refutationally complete. In order to prove the following theorem, we adapt a variant of model construction techniques [7,8,9, 21, 27]. In this section, we assume that the equality is the only predicate by expressing other predicates (i.e. predicate terms) as (predicate) equations as discussed in Section 4.

Theorem 20

Let \(S_0, S_1,\ldots \) be a fair theorem proving derivation w.r.t. \(\mathcal {BP}\) such that \(S_0\) is a set of unconstrained clauses. Then \(S_0 \cup E\) is unsatisfiable if and only if the empty clause is in some \(S_j\).

Definition 21

(Model construction) Let S be a set of (constrained) clauses. We use induction on \(\succ \) to define the sets \(Rules_C\), \(R_C\), \(E_C\), and \(I_C\), for all ground instances C of clauses in S. Let C be such a ground instance of a clause in S and suppose that \(Rules_{C^\prime }\) has been defined for all ground instances \(C^\prime \) of clauses in S for which \(C \succ C^\prime \). Then we define by \(R_C=\bigcup _{C\succ C^\prime } Rules_{C^\prime }\) and by \(E_C\) the set of ground instances \(e_1 \approx e_2\) of equations in E, such that \(C \succ e_1 \approx e_2\), and \(e_1\) and \(e_2\) are both irreducible by \(R_C\). We also define by \(I_C\) the interpretation \((R_C\cup E_C)^*\) (i.e. the least congruence containing \(R_C\cup E_C\)).

Now let \(C:=D \vee s\approx t\) be a reduced ground instance of a clause in S w.r.t. \(R_C\) such that C is not an instance of a clause with a selected literal. Then C produces the set of ground rewrite rules \(Rules_C=\{u\Rightarrow t\,|\, u \approx _E s\) and u is irreducible by \(R_C\}\) if the following conditions are met: (1) \(I_C \not \models C\) (resp. \(I_C \not \models D\)) if C is an instance of a non-protected clause (resp. protected clause), (2) \(I_C \not \models t \approx t^\prime \) for every \(s^\prime \approx t^\prime \) in D with \(s^\prime \approx _E s\), (3) \(s\approx t\) is reductive for C, and (4) there exists u with \(u \approx _E s\) for which u is irreducible by \(R_C\). We say that C is productive and produces \(Rules_C\) if it satisfies all of the above conditions. Otherwise, \(Rules_C = \emptyset \). Finally, we define \(R_S = \bigcup _C R_C\), \(E_S = \bigcup _C E_C\), and \(I_S = (R_S \cup E_S)^*\).

We may include the special non-productive ground clause \(tt \approx tt\) in S for the above (inductive) definition, where \(tt \approx tt\) is assumed to be greater than all ground instances of clauses in \(S\cup E\) w.r.t. \(\succ \) other than \(tt \approx tt\) itself (see [21, 27]). (If C is the strictly maximal ground instance among ground instances of clauses in S and is productive, then \(R_S\) may not include \(Rules_C\) by the above inductive definition of \(R_C\) without \(tt\approx tt\).) In what follows, we say that a ground instance \(\pi \sigma \) of an inference \(\pi \) with premises in S is reduced if each premise and conclusion of \(\pi \sigma \) is a reduced ground instance of a clause in \(S\cup E\) w.r.t. \(R_S,E_S\).

Definition 22

(Redundancy w.r.t. \(R_S,E_S\)) A clause \(C \,||\,\phi \) is redundant in S modulo E w.r.t. \(R_S,E_S\) if for every reduced ground instance \(C\sigma \) w.r.t. \(R_S,E_S\), there exist reduced ground instances \(C_1\sigma _1,\ldots , C_k\sigma _k\) of clauses \(C_1\,||\,\phi _1 \ldots C_k\,||\,\phi _k\) in S w.r.t. \(R_S,E_S\), such that \(C\sigma \succ C_i\sigma _i\), \(1\le i \le k\), and \(\{C_1\sigma _1,\ldots , C_k\sigma _k\}\cup R_S^{\prec C\sigma }\cup E^{\prec C\sigma }\models C\sigma \). (In this case, we also say that each \(C\sigma \) is redundant in S modulo E w.r.t. \(R_S,E_S\).)

An inference \(\pi \) with conclusion \(D\,||\,\phi \) is redundant in S modulo E w.r.t. \(R_S,E_S\) if \(D\,||\,\phi \) is blocked or a basic E-instance in S modulo E, or for every reduced ground instance \(\pi \sigma \) with maximal premise C and conclusion \(D\sigma \), there exist reduced ground instances \(C_1\sigma _1,\ldots , C_k\sigma _k\) of clauses \(C_1\,||\,\phi _1, \ldots , C_k\,||\,\phi _k\) in S w.r.t. \(R_S,E_S\), such that \(C \succ C_i\sigma _i\), \(1\le i \le k\), and \(\{C_1\sigma _1,\ldots , C_k\sigma _k\}\cup R_S^{\prec C} \cup E^{\prec C}\models D\sigma \).

Definition 23

(Saturation w.r.t. \(R_S,E_S\)) Given an equational theory E, we say that S modulo E is saturated under \(\mathcal {BP}\) w.r.t. \(R_S,E_S\) if every inference by \(\mathcal {BP}\) with premises in S is redundant in S modulo E w.r.t. \(R_S, E_S\).

Lemma 24

(i) There are no overlaps among the left-hand sides of rules in \(R_S\).

(ii) A term t is reducible by \(R_S\) if and only if it is reducible by \(R_S,E_S\) at the same position.

(iii) For every \(l \Rightarrow r, s \Rightarrow t \in R_S\), if \(l \approx _{E} s\), then r and t are the same term.

(iv) \(R_S/E_S\) is terminating.

(v) For ground terms u and v, if \(I_S \models u \approx v\), then \(u \downarrow _{R_S,E_S}v\).

(vi) If a ground instance \(C\theta :=D\theta \vee l\theta \approx r\theta \) of a clause \(C \,||\,\phi :=D\vee l\approx r \,||\,\phi \) is productive, then it is a reduced ground instance of \(C \,||\,\phi \) w.r.t. \(R_S,E_S\).

The proofs of (i), (ii), and (iii) in Lemma 24 follow from the construction of \(R_S\) in Definition 21. For (iv), since \(R_S\) is contained in an E-compatible reduction ordering \(\succ \) on terms that is E-total on ground terms, \(R_S/E_S\) is terminating. Meanwhile, Lemma 24(v) describes the ground Church-Rosser property [19] of \(R_S, E_S\). Since \(R_S/E_S\) is terminating by (iv), this shows that \(R_S,E_S\) is ground convergent modulo \(E_S\). In the following, we assume that any saturated clause set under \(\mathcal {BP}\) is obtained from an initial set of clauses without constraints.

Lemma 25

Let S modulo E be saturated under \(\mathcal {BP}\) w.r.t. \(R_S,E_S\) not containing the empty clause and let C be a reduced ground instance of a clause in S w.r.t. \(R_S, E_S\) or a ground instance of an equation in E. Then C is true in \(I_S\). More specifically,

  1. (i)

    C is not an instance of a blocked clause in S modulo E.

  2. (ii)

    If C is redundant in S modulo E w.r.t. \(R_S,E_S\), then it is true in \(I_S\).

  3. (iii)

    If C is an instance of a clause with a selected literal, then it is true in \(I_S\).

  4. (iv)

    If C contains a maximal negative literal (w.r.t. \(\succ \)) and is not an instance of a clause with a selected literal, then it is true in \(I_S\).

  5. (v)

    If C is an instance of an equation in E, then it is true in \(I_S\).

  6. (vi)

    If C is an instance of a protected clause or a basic E-instance of it, then it is true in \(I_S\).

  7. (vii)

    If C is non-productive, then it is true in \(I_S\).

  8. (viii)

    If \(C:=C^\prime \vee s\approx t\) is productive and produces \(Rules_C\) with \(s\Rightarrow t \in Rules_C\), then \(C^\prime \) is false and C is true in \(I_S\).

We leave it to the reader to verify the following lemma using the definitions of redundancy of an inference w.r.t. relative reducibility and w.r.t. \(R_S,E_S\), along with Lemma 19.

Lemma 26

Let \(S_0, S_1,\ldots \) be a fair theorem proving derivation w.r.t. \(\mathcal {BP}\) such that \(S_0\) is a set of unconstrained clauses. Then \(S_{\infty }\) modulo E is saturated under \(\mathcal {BP}\) w.r.t. \(R_{S_\infty }, E_{S_\infty }\).

Theorem 27

Let \(S_0, S_1,\ldots \) be a fair theorem proving derivation w.r.t. \(\mathcal {BP}\) such that \(S_0\) is a set of unconstrained clauses. If \(S_{\infty }\) does not contain the empty clause, then \(I_{S_{\infty }} \models S_0\cup E\) (i.e., \(S_0\cup E\) is satisfiable).

Proof

By Lemma 26, we know that \(S_{\infty }\) modulo E is saturated under \(\mathcal {BP}\) w.r.t. \(R_{S_\infty }, E_{S_\infty }\). Let C be a ground instance of an equation in E or a ground instance of a clause \(C^\prime \) in \(S_0\). By Lemma 25(v), if C is a ground instance of an equation in E, then it is true in \(I_{S_\infty }\). Therefore, we assume that C is not a ground instance of an equation in E. Suppose first that \(C:=C^\prime \sigma ^\prime \) is a reduced ground instance of \(C^\prime \in S_0\) w.r.t. \(R_{S_\infty }, E_{S_\infty }\). Then there are two cases to consider. If \(C^\prime \in S_{\infty }\), then C is true in \(I_{S_\infty }\) by Lemma 25. Otherwise, if \(C^\prime \not \in S_{\infty }\), then \(C^\prime \) is (non-protected) redundant in some \(S_j\) modulo E w.r.t. relative reducibility because \(C^\prime \in S_0\) (with the empty constraint) is neither protected nor can it be a blocked clause in some \(S_j\) modulo E. Thus, \(C^\prime \) is (non-protected) redundant in \(\bigcup _j S_j\) modulo E w.r.t. relative reducibility, and hence is (non-protected) redundant in \(S_\infty \) modulo E w.r.t. relative reducibility by Lemma 18. It follows that there exist ground instances \(C_1\sigma _1,\ldots , C_k\sigma _k\) of clauses \(C_1\,||\,\phi _1, \ldots , C_k\,||\,\phi _k\) in \(S_\infty \) reduced relative to C, such that \(C \succ C_i\sigma _i\), \(1\le i \le k\), and \(\{C_1\sigma _1,\ldots , C_k\sigma _k\} \cup R^{\prec C}\cup E^{\prec C} \models C\) for any ground rewrite system R contained in \(\succ \). Since C is a reduced ground instance of \(C^\prime \) w.r.t. \(R_{S_\infty }, E_{S_\infty }\), we see that \(C_i\sigma _i\), \(1\le i \le k\), are also reduced ground instances w.r.t. \(R_{S_\infty }, E_{S_\infty }\) by Definition 7 and are true in \(I_{S_\infty }\) by Lemma 25. Similarly, \(R_{S_\infty }^{\prec C}\) and \(E^{\prec C}\) are true in \(I_{S_\infty }\) by Lemma 25, and hence we may infer that C is also true in \(I_{S_\infty }\).

Now suppose that \(C:=C^\prime \sigma ^\prime \) is a reducible ground instance of \(C^\prime \in S_0\) w.r.t. \(R_{S_\infty }, E_{S_\infty }\). Let \(\sigma ^{\prime \prime }\) be a ground substitution such that \(x\sigma ^{\prime \prime }=x\sigma ^\prime {\downarrow _{R_{S_\infty }, E_{S_\infty }}}\) for each \(x \in Vars(C^\prime )\). Since \(C^\prime \sigma ^{\prime \prime }\) is a reduced ground instance of \(C^\prime \in S_0\) w.r.t. \(R_{S_\infty }, E_{S_\infty }\), \(C^\prime \sigma ^{\prime \prime }\) is true in \(I_{S_\infty }\) by the previous paragraph, and hence C is also true in \(I_{S_\infty }\).   \(\square \)

We may now present the proof that \(\mathcal {BP}\) with our contraction rules is refutationally complete.

Proof of Theorem

 20 Let \(S_0, S_1,\ldots \) be a fair theorem proving derivation w.r.t. \(\mathcal {BP}\) such that \(S_0\) is a set of unconstrained clauses. If the empty clause is in some \(S_j\), then \(S_0 \cup E\) is unsatisfiable by the soundness of \(\mathcal {BP}\). Otherwise, if the empty clause is not in \(S_k\) for all k, then by the soundness of \(\mathcal {BP}\), \(S_{\infty }\) does not contain the empty clause, and hence \(S_0 \cup E\) is satisfiable by Theorem 27.   \(\square \)

7 Conclusion

We have presented a basic paramodulation calculus modulo and provided a framework for equational theorem proving modulo equational theories E satisfying some properties of E using constrained clauses, where a constrained clause may schematize a set of unconstrained clauses by keeping E-unification problems in its constraint part. Our results imply that we can deal uniformly with different equational theories E in our equational theorem proving modulo framework. We only need a single refutational completeness proof for our basic paramodulation calculus modulo E for different equational theories E.

Our contraction techniques (i.e. basic E-simplification and basic E-blocking) for constrained clauses can also be applied uniformly for different equational theories E satisfying some properties of E in our equational theorem proving modulo framework. Since a constrained clause may schematize a set of unconstrained clauses, the simplification or deletion of a constrained clause may correspond to the simplification or deletion of a set of unconstrained clauses. We have proposed a saturation procedure for constrained clauses based on relative reducibility and showed the refutational completeness of our inference system using a saturated clause set (w.r.t. \(\succ \)).

Some possible improvements remain to be done. One of the main issues is the broadening the scope of our equational theorem proving modulo E to more equational theories E. This can be achieved by dropping or weakening some ordering requirements of \(\succ \) (e.g. monotonicity of \(\succ \)) for a basic paramodulation calculus modulo E, while maintaining the refutational completeness of the calculus (cf. [10]). This can also be achieved by finding suitable E-compatible orderings for more equational theories E. In fact, we provided an E-compatible simplification ordering \(\succ \) on terms that is E-total on ground terms for finite permutation theories E in [17], which allows us to provide a refutationally complete equational theorem proving with built-in permutation theories using the results of this paper. Since permutations play an important role in mathematics and many fields of science including computer science, we believe that developing applications for equational theorem proving with built-in permutation theories is another promising future research direction.