Abstract
We propose a new calculus SCL(EQ) for firstorder logic with equality that only learns nonredundant clauses. Following the idea of CDCL (Conflict Driven Clause Learning) and SCL (Clause Learning from Simple Models) a ground literal model assumption is used to guide inferences that are then guaranteed to be nonredundant. Redundancy is defined with respect to a dynamically changing ordering derived from the ground literal model assumption. We prove SCL(EQ) sound and complete and provide examples where our calculus improves on superposition.
Keywords
 Firstorder logic with equality
 Term rewriting
 Modelbased reasoning
Download conference paper PDF
1 Introduction
There has been extensive research on sound and complete calculi for firstorder logic with equality. The current prime calculus is superposition [2], where ordering restrictions guide paramodulation inferences and an abstract redundancy notion enables a number of clause simplification and deletion mechanisms, such as rewriting or subsumption. Still this “syntactic” form of superposition infers many redundant clauses. The completeness proof of superposition provides a “semantic” way of generating only nonredundant clauses, however, the underlying ground model assumption cannot be effectively computed in general [31]. It requires an ordered enumeration of infinitely many ground instances of the given clause set, in general. Our calculus overcomes this issue by providing an effective way of generating ground model assumptions that then guarantee nonredundant inferences on the original clauses with variables.
The underlying ordering is based on the order of ground literals in the model assumption, hence changes during a run of the calculus. It incorporates a standard rewrite ordering. For practical redundancy criteria this means that both rewriting and redundancy notions that are based on literal subset relations are permitted to dynamically simplify or eliminate clauses. Newly generated clauses are nonredundant, so redundancy tests are only needed backwards. Furthermore, the ordering is automatically generated by the structure of the clause set. Instead of a fixed ordering as done in the superposition case, the calculus finds and changes an ordering according to the currently easiest way to make progress, analogous to CDCL (Conflict Driven Clause Learning) [11, 21, 25, 29, 34].
Typical for CDCL and SCL (Clause Learning from Simple Models) [1, 14, 18] approaches to reasoning, the development of a model assumption is done by decisions and propagations. A decision guesses a ground literal to be true whereas a propagation concludes the truth of a ground literal through an otherwise false clause. While propagations in CDCL and propositional logic are restricted to the finite number of propositional variables, in firstorder logic there can already be infinite propagation sequences [18]. In order to overcome this issue, model assumptions in SCL(EQ) are at any point in time restricted to a finite number of ground literals, hence to a finite number of ground instances of the clause set at hand. Therefore, without increasing the number of considered ground literals, the calculus either finds a refutation or runs into a stuck state where the current model assumption satisfies the finite number of ground instances. In this case one can check whether the model assumption can be generalized to a model assumption of the overall clause set or the information of the stuck state can be used to appropriately increase the number of considered ground literals and continue search for a refutation. SCL(EQ) does not require exhaustive propagation, in general, it just forbids the decision of the complement of a literal that could otherwise be propagated.
For an example of SCL(EQ) inferring clauses, consider the three firstorder clauses
with a KnuthBendix Ordering (KBO), unique weight 1, and precedence \(d\prec c\prec b\prec a \prec g \prec h \prec f\). A Superposition Left [2] inference between \(C_2\) and \(C_3\) results in
For SCL(EQ) we start by building a partial model assumption, called a trail, with two decisions
where \(\sigma := \{x\mapsto a\}\). Decisions and propagations are always ground instances of literals from the firstorder clauses, and are annotated with a level and a justification clause, in case of a decision a tautology. Now with respect to \(\varGamma \) clause \(C_3\) is false with grounding \(\sigma \), and rule Conflict is applicable; see Sect. 3.1 for details on the inference rules. In general, clauses and justifications are considered variable disjoint, but for simplicity of the presentation of this example, we repeat variable names here as long as the same ground substitution is shared. The maximal literal in \(C_3\sigma \) is \((f(x) \not \approx h(x))\sigma \) and a rewrite refutation using the ground equations from the trail results in the justification clause
where for the refutation justification clauses and all otherwise inferred clauses we use the grounding \(\sigma \) for guidance, but operate on the clauses with variables. The respective ground clause is smaller than \((f(x) \not \approx h(x))\sigma \), false with respect to \(\varGamma \) and becomes our new conflict clause by an application of our inference rule ExploreRefutation. It is simplified by our inference rules EqualityResolution and Factorize, resulting in the finally learned clause
which is then used to apply rule Backtrack to the trail. Observe that \(C_4\) is strictly stronger than \(C'_4\) the clause inferred by superposition and that \(C_4\) cannot be inferred by superposition. Thus SCL(EQ) can infer stronger clauses than superposition for this example.
Related Work: SCL(EQ) is based on ideas of SCL [1, 14, 18] but for the first time includes a native treatment of firstorder equality reasoning. Similar to [14] propagations need not to be exhaustively applied, the trail is built out of decisions and propagations of ground literals annotated by firstorder clauses, SCL(EQ) only learns nonredundant clauses, but for the first time conflicts resulting out of a decision have to be considered, due to the nature of the equality relation.
There have been suggested several approaches to lift the idea of an inference guiding model assumption from propositional to full firstorder logic [6, 12, 13, 18]. They do not provide a native treatment of equality, e.g., via paramodulation or rewriting.
Baumgartner et al. describe multiple calculi that handle equality by using unit superposition style inference rules and are based on either hyper tableaux [5] or DPLL [15, 16]. Hyper tableaux fix a major problem of the wellknown free variable tableaux, namely the fact that free variables within the tableau are rigid, i.e., substitutions have to be applied to all occurrences of a free variable within the entire tableau. Hyper tableaux with equality [7] in turn integrates unit superposition style inference rules into the hyper tableau calculus.
Another approach that is related to ours is the model evolution calculus with equality (\(\mathcal {ME_E}\)) by Baumgartner et al. [8, 9] which lifts the DPLL calculus to firstorder logic with equality. Similar to our approach, \(\mathcal {ME_E}\) creates a candidate model until a clause instance contradicts this model or all instances are satisfied by the model. The candidate model results from a socalled context, which consists of a finite set of nonground rewrite literals. Roughly speaking, a context literal specifies the truth value of all its ground instances unless a more specific literal specifies the complement. Initially the model satisfies the identity relation over the set of all ground terms. Literals within a context may be universal or parametric, where universal literals guarantee all its ground instances to be true. If a clause contradicts the current model, it is repaired by a nondeterministic split which adds a parametric literal to the current model. If the added literal does not share any variables in the contradictory clause it is added as a universal literal.
Another approach by Baumgartner and Waldmann [10] combined the superposition calculus with the Model Evolution calculus with equality. In this calculus the atoms of the clauses are labeled as “split atoms” or “superposition atoms”. The superposition part of the calculus then generates a model for the superposition atoms while the model evolution part generates a model for the split atoms. Conversely, this means that if all atoms are labeled as “split atom”, the calculus behaves similar to the model evolution calculus. If all atoms are labeled as “superposition atom”, it behaves like the superposition calculus.
Both the hyper tableaux calculus with equality and the model evolution calculus with equality allow only unit superposition applications, while SCL(EQ) inferences are guided paramodulation inferences on clauses of arbitrary length. The model evolution calculus with equality was revised and implemented in 2011 [8] and compares its performance with that of hyper tableaux. Model evolution performed significantly better, with more problems solved in all relevant TPTP [30] categories, than the implementation of the hyper tableaux calculus.
Plaisted et al. [27] present the Ordered Semantic HyperLinking (OSHL) calculus. OSHL is an instantiation based approach that repeatedly chooses ground instances of a nonground input clause set such that the current model does not satisfy the current ground clause set. A further step repairs the current model such that it satisfies the ground clause set again. The algorithm terminates if the set of ground clauses contains the empty clause. OSHL supports rewriting and narrowing, but only with unit clauses. In order to handle nonunit clauses it makes use of other mechanisms such as Brand’s Transformation [3].
InstGen [22] is an instantiation based calculus, that creates ground instances of the input firstorder formulas which are forwarded to a SAT solver. If a ground instance is unsatisfiable, then the firstorder set is as well. If not then the calculus creates more instances. The InstGenEQ calculus [23] creates instances by extracting instantiations of unit superposition refutations of selected literals of the firstorder clause set. The ground abstraction is then extended by the extracted clauses and an SMT solver then checks the satisfiability of the resulting set of equational and nonequational ground literals.
In favor of examples and explanations we omit all proofs. They are available in an extended version published as a research report [24]. The rest of the paper is organized as follows. Section 2 provides basic formalisms underlying SCL(EQ). The rules of the calculus are presented in Sect. 3. Soundness and completeness results are provided in Sect. 4. We end with a discussion of obtained results and future work, Sect. 5. The main contribution of this paper is the SCL(EQ) calculus that only learns nonredundant clauses, permits subset based redundancy elimination and rewriting, and its soundness and completeness.
2 Preliminaries
We assume a standard firstorder language with equality and signature \(\varSigma = (\varOmega , \emptyset )\) where the only predicate symbol is equality \(\approx \). N denotes a set of clauses, C, D denote clauses, L, K, H denote equational literals, A, B denote equational atoms, t, s terms from \(T(\varOmega ,\mathcal {X})\) for an infinite set of variables \(\mathcal {X}\), f, g, h function symbols from \(\varOmega \), a, b, c constants from \(\varOmega \) and x, y, z variables from \(\mathcal {X}\). The function comp denotes the complement of a literal. We write \(s\not \approx t\) as a shortcut for \(\lnot (s \approx t)\). The literal \(s\,\#\, t\) may denote both \(s\approx t\) and \(s\not \approx t\). The semantics of firstorder logic and semantic entailment \(\models \) is defined as usual.
By \(\sigma ,\tau ,\delta \) we denote substitutions, which are total mappings from variables to terms. Let \(\sigma \) be a substitution, then its finite domain is defined as \(dom(\sigma ) := \{x \mid x\sigma \not = x\}\) and its codomain is defined as \(codom(\sigma ) = \{t \mid x\sigma = t, x \in dom (\sigma )\}\). We extend their application to literals, clauses and sets of such objects in the usual way. A term, literal, clause or sets of these objects is ground if it does not contain any variable. A substitution \(\sigma \) is ground if \(codom(\sigma )\) is ground. A substitution \(\sigma \) is grounding for a term t, literal L, clause C if \(t\sigma \), \(L\sigma \), \(C\sigma \) is ground, respectively. By \(C\cdotp \sigma \), \(L\cdotp \sigma \) we denote a closure consisting of a clause C, literal L and a grounding substitution \(\sigma \), respectively. The function gnd computes the set of all ground instances of a literal, clause, or clause set. The function \({\text {mgu}}\) denotes the most general unifier of terms, atoms, literals, respectively. We assume that mgus do not introduce fresh variables and that they are idempotent.
The set of positions \(\mathrm {pos}(L)\) of a literal (term \(\mathrm {pos}(t)\)) is inductively defined as usual. The notion \(L_p\) denotes the subterm of a literal L (\(t_p\) for term t) at position \(p\in {\text {pos}}(L)\) (\(p\in {\text {pos}}(t)\)). The replacement of a subterm of a literal L (term t) at position \(p\in {\text {pos}}(L)\) (\(p\in {\text {pos}}(t)\)) by a term s is denoted by \(L[s]_p\) (\(t[s]_p\)). For example, the term f(a, g(x)) has the positions \(\{\epsilon , 1, 2, 21\}\), \(f(a,g(x))_{21} = x\) and \(f(a,g(x))[b]_2\) denotes the term f(a, b).
Let R be a set of rewrite rules \(l \rightarrow r\), called a term rewrite system (TRS). The rewrite relation \(\rightarrow _R \subseteq T(\varOmega , \mathcal {X})\times T(\varOmega , \mathcal {X})\) is defined as usual by \(s\rightarrow _R t\) if there exists \((l\rightarrow r)\in R\), \(p\in {\text {pos}}(s)\), and a matcher \(\sigma \), such that \(s_p=l\sigma \) and \(t = s[r\sigma ]_p.\) We write \(s=t{\downarrow _R}\) if s is the normal form of t in the rewrite relation \(\rightarrow _R\). We write \(s\,\#\, t =(s'\,\#\, t'){\downarrow _R}\) if s is the normal form of \(s'\) and t is the normal form of \(t'\). A rewrite relation is terminating if there is no infinite descending chain \(t_0\rightarrow t_1\rightarrow ...\) and confluent if \(t ^{*}\leftarrow s \rightarrow ^* t'\) implies \(t \leftrightarrow ^* t'\). A rewrite relation is convergent if it is terminating and confluent. A rewrite order is a irreflexive and transitive rewrite relation. A TRS R is terminating, confluent, convergent, if the rewrite relation \(\rightarrow _R\) is terminating, confluent, convergent, respectively. A term t is called irreducible by a TRS R if no rule from R rewrites t. Otherwise it is called reducible. A literal, clause is irreducible if all of its terms are irreducible, and reducible otherwise. A substitution \(\sigma \) is called irreducible if any \(t\in codom(\sigma )\) is irreducible, and reducible otherwise.
Let \(\prec _T\) denote a wellfounded rewrite ordering on terms which is total on ground terms and for all ground terms t there exist only finitely many ground terms \(s \prec _T t\). We call \(\prec _T\) a desired term ordering. We extend \(\prec _T\) to equations by assigning the multiset \(\{s,t\}\) to positive equations \(s\approx t\) and \(\{s,s,t,t\}\) to inequations \(s\not \approx t\). Furthermore, we identify \(\prec _T\) with its multiset extension comparing multisets of literals. For a (multi)set of terms \(\{t_1,\ldots ,t_n\}\) and a term t, we define \(\{t_1,\ldots ,t_n\} \prec _T t\) if \(\{t_1,\ldots ,t_n\} \prec _T \{t\}\). For a (multi)set of Literals \(\{L_1,\ldots ,L_n\}\) and a term t, we define \(\{L_1,\ldots ,L_n\} \prec _T t\) if \(\{L_1,\ldots ,L_n\} \prec _T \{\{t\}\}\). Given a ground term \(\beta \) then \({\text {gnd}}_{\prec _T\beta }\) computes the set of all ground instances of a literal, clause, or clause set where the groundings are smaller than \(\beta \) according to the ordering \(\prec _T\). Given a set (sequence) of ground literals \(\varGamma \) let \({\text {conv}}(\varGamma )\) be a convergent rewrite system out of the positive equations in \(\varGamma \) using \(\prec _T\).
Let \(\prec \) be a wellfounded, total, strict ordering on ground literals, which is lifted to clauses and clause sets by its respective multiset extension. We overload \(\prec \) for literals, clauses, clause sets if the meaning is clear from the context. The ordering is lifted to the nonground case via instantiation: we define \(C \prec D\) if for all grounding substitutions \(\sigma \) it holds \(C\sigma \prec D\sigma \). Then we define \(\preceq \) as the reflexive closure of \(\prec \) and \(N^{\preceq C} := \{D \mid D\in N \;\text {and}\; D\preceq C\}\) and use the standard superposition style notion of redundancy [2].
Definition 1
(Clause Redundancy). A ground clause C is redundant with respect to a set N of ground clauses and an ordering \(\prec \) if \(N^{\preceq C} \models C\). A clause C is redundant with respect to a clause set N and an ordering \(\prec \) if for all \(C'\in gnd(C)\), \(C'\) is redundant with respect to gnd(N).
3 The SCL(EQ) Calculus
We start the introduction of the calculus by defining the ingredients of an SCL(EQ) state.
Definition 2
(Trail). A trail \(\varGamma :=[L_1^{i_1:C_1\cdotp \sigma _1},...,L_n^{i_n:C_n\cdotp \sigma _n}]\) is a consistent sequence of ground equations and inequations where \(L_j\) is annotated by a level \(i_j\) with \(i_{j1}\le i_j\), and a closure \(C_j\cdotp \sigma _j\). We omit the annotations if they are not needed in a certain context. A ground literal L is true in \(\varGamma \) if \(\varGamma \models L\). A ground literal L is false in \(\varGamma \) if \(\varGamma \models comp(L)\). A ground literal L is undefined in \(\varGamma \) if \(\varGamma \not \models L\) and \(\varGamma \not \models comp(L)\). Otherwise it is defined. For each literal \(L_j\) in \(\varGamma \) it holds that \(L_j\) is undefined in \([L_1,...,L_{j1}]\) and irreducible by \({\text {conv}}(\{L_1,...,L_{j1}\})\).
The above definition of truth and undefinedness is extended to clauses in the obvious way. The notions of true, false, undefined can be parameterized by a ground term \(\beta \) by saying that L is \(\beta \)undefined in a trail \(\varGamma \) if \(\beta \prec _T L\) or L is undefined. The notions of a \(\beta \)true, \(\beta \)false term are restrictions of the above notions to literals smaller \(\beta \), respectively. All SCL(EQ) reasoning is layered with respect to a ground term \(\beta \).
Definition 3
Let \(\varGamma \) be a trail and L a ground literal such that L is defined in \(\varGamma \). By \({\text {core}}(\varGamma ;L)\) we denote a minimal subsequence \(\varGamma ' \subseteq \varGamma \) such that L is defined in \(\varGamma '\). By \({\text {cores}}(\varGamma ;L)\) we denote the set of all cores.
Note that \(core(\varGamma ;L)\) is not necessarily unique. There can be multiple cores for a given trail \(\varGamma \) and ground literal L.
Definition 4
(Trail Ordering). Let \(\varGamma :=[L_1,...,L_n]\) be a trail. The (partial) trail ordering \(\prec _\varGamma \) is the sequence ordering given by \(\varGamma \), i.e., \(L_i\prec _\varGamma L_j\) if \(i < j\) for all \(1\le i,j\le n\).
Definition 5
(Defining Core and Defining Literal). For a trail \(\varGamma \) and a sequence of literals \(\varDelta \subseteq \varGamma \) we write \(max_{\prec _\varGamma }(\varDelta )\) for the largest literal in \(\varDelta \) according to the trail ordering \(\prec _\varGamma \). Let \(\varGamma \) be a trail and L a ground literal such that L is defined in \(\varGamma \). Let \(\varDelta \in cores(\varGamma ;L)\) be a sequence of literals where \(max_{\prec _\varGamma }(\varDelta ) \preceq _\varGamma max_{\prec _\varGamma }(\varLambda )\) for all \(\varLambda \in cores(\varGamma ;L)\), then \(\max _\varGamma (L) := \max _{\prec _\varGamma }(\varDelta )\) is called the defining literal and \(\varDelta \) is called a defining core for L in \(\varGamma \). If \(cores(\varGamma ;L)\) contains only the empty core, then L has no defining literal and no defining core.
Note that there can be multiple defining cores but only one defining literal for any defined literal L. For example, consider a trail \(\varGamma :=[f(a)\approx f(b)^{1:C_1\cdotp \sigma _1},a\approx b^{2:C_2\cdotp \sigma _2},b\approx c^{3:C_3\cdotp \sigma _3}]\) with an ordering \(\prec _T\) that orders the terms of the equations from left to right, and a literal \(g(f(a))\approx g(f(c))\). Then the defining cores are \(\varDelta _1 :=[a\approx b,b\approx c]\) and \(\varDelta _2 :=[f(a)\approx f(b),b\approx c]\). The defining literal, however, is in both cases \(b\approx c\). Defined literals that have no defining core and therefore no defining literal are literals that are trivially false or true. Consider, for example, \(g(f(a))\approx g(f(a))\). This literal is trivially true in \(\varGamma \). Thus an empty subset of \(\varGamma \) is sufficient to show that \(g(f(a))\approx g(f(a))\) is defined in \(\varGamma \).
Definition 6
(Literal Level). Let \(\varGamma \) be a trail. A ground literal \(L \in \varGamma \) is of level i if L is annotated with i in \(\varGamma \). A defined ground literal \(L\not \in \varGamma \) is of level i if the defining literal of L is of level i. If L has no defining literal, then L is of level 0. A ground clause D is of level i if i is the maximum level of a literal in D.
The restriction to minimal subsequences for the defining literal and definition of a level eventually guarantee that learned clauses are smaller in the trail ordering. This enables completeness in combination with learning nonredundant clauses as shown later.
Lemma 7
Let \(\varGamma _1\) be a trail and K a defined literal that is of level i in \(\varGamma _1\). Then K is of level i in a trail \(\varGamma :=\varGamma _1,\varGamma _2\).
Definition 8
Let \(\varGamma \) be a trail and \(L\in \varGamma \) a literal. L is called a decision literal if \(\varGamma = \varGamma _0,K^{i:C\cdotp \tau }, L^{i+1:C'\cdotp \tau '}, \varGamma _1\). Otherwise L is called a propagated literal.
In our above example \(g(f(a))\approx g(f(c))\) is of level 3 since the defining literal \(b\approx c\) is annotated with 3. \(a\not \approx b\) on the other hand is of level 2.
We define a wellfounded total strict ordering which is induced by the trail and with which nonredundancy is proven in Sect. 4. Unlike SCL [14, 18] we use this ordering for the inference rules as well. In previous SCL calculi, conflict resolution automatically chooses the greatest literal and resolves with this literal. In SCL(EQ) this is generalized. Coming back to our running example above, suppose we have a conflict clause \(f(b)\not \approx f(c)\vee b\not \approx c\). The defining literal for both inequations is \(b\approx c\). So we could do paramodulation inferences with both literals. The following ordering makes this nondeterministic choice deterministic.
Definition 9
(Trail Induced Ordering). Let \(\varGamma :=[L_1^{i_1:C_1\cdotp \sigma _1},...,L_n^{i_n:C_n\cdotp \sigma _n}]\) be a trail, \(\beta \) a ground term such that \(\{L_1,...,L_n\}\prec _T \beta \) and \(M_{i,j}\) all \(\beta \)defined ground literals not contained in \(\varGamma \,\cup \, comp(\varGamma )\): for a defining literal \(max_\varGamma (M_{i,j}) = L_i\) and for two literals \(M_{i,j}\), \(M_{i,k}\) we have \(j<k\) if \(M_{i,j} \prec _T M_{i,k}\). The trail induces a total wellfounded strict order \(\prec _{\varGamma ^*}\) on \(\beta \hbox {} defined \) ground literals \(M_{k,l}, M_{m,n}\), \(L_i\), \(L_j\) of level greater than zero, where

1.
\(M_{i,j}\prec _{\varGamma ^*} M_{k,l}\) if \(i<k\) or (\(i=k\) and \(j<l\))

2.
\(L_i\prec _{\varGamma ^*} L_j\) if \(L_i\prec _\varGamma L_j\)

3.
\(comp(L_i)\prec _{\varGamma ^*} L_j\) if \(L_i\prec _\varGamma L_j\)

4.
\(L_i\prec _{\varGamma ^*} comp(L_j)\) if \(L_i\prec _\varGamma L_j\) or \(i = j\)

5.
\(comp(L_i)\prec _{\varGamma ^*} comp(L_j)\) if \(L_i\prec _\varGamma L_j\)

6.
\(L_i\prec _{\varGamma ^*} M_{k,l}\), \({\text {comp}}(L_i)\prec _{\varGamma ^*} M_{k,l}\) if \(i\le k\)

7.
\(M_{k,l}\prec _{\varGamma ^*} L_i\), \(M_{k,l}\prec _{\varGamma ^*} {\text {comp}}(L_i)\) if \(k<i\)
and for all \(\beta \hbox {} defined \) literals L of level zero:

8.
\(\prec _{\varGamma ^*} := \prec _T\)

9.
\(L\prec _{\varGamma ^*} K\) if K is of level greater than zero and K is \(\beta \hbox {} defined \)
and can eventually be extended to \(\beta \hbox {} undefined \) ground literals K, H by

10.
\(K \prec _{\varGamma ^*} H\) if \(K\prec _T H\)

11.
\(L \prec _{\varGamma ^*} H\) if L is \(\beta \hbox {} defined \)
The literal ordering \(\prec _{\varGamma ^*}\) is extended to ground clauses by multiset extension and identified with \(\prec _{\varGamma ^*}\) as well.
Lemma 10
(Properties of \(\prec _{\varGamma ^*}\) ).

1.
\(\prec _{\varGamma ^*}\) is welldefined.

2.
\(\prec _{\varGamma ^*}\) is a total strict order, i.e. \(\prec _{\varGamma ^*}\) is irreflexive, transitive and total.

3.
\(\prec _{\varGamma ^*}\) is a wellfounded ordering.
Example 11
Assume a trail \(\varGamma := [a\approx b^{1:C_0\cdotp \sigma _0}, c\approx d^{1:C_1\cdotp \sigma _1}, f(a')\not \approx f(b')^{1:C_2\cdotp \sigma _2}]\), select KBO as the term ordering \(\prec _T\) where all symbols have weight one and \(a\prec a'\prec b\prec b'\prec c\prec d\prec f\) and a ground term \(\beta := f(f(a))\). According to the trail induced ordering we have that \(a\approx b\prec _{\varGamma ^*} c\approx d\prec _{\varGamma ^*} f(a')\not \approx f(b')\) by 9.2. Furthermore we have that
\(a\approx b\prec _{\varGamma ^*} a\not \approx b\prec _{\varGamma ^*} c\approx d\prec _{\varGamma ^*} c\not \approx d\prec _{\varGamma ^*} f(a')\not \approx f(b')\prec _{\varGamma ^*} f(a')\approx f(b')\)
by 9.3 and 9.4. Now for any literal L that is \(\beta \hbox {} defined \) in \(\varGamma \) and the defining literal is \(a\approx b\) it holds that \(a\not \approx b\prec _{\varGamma ^*} L\prec _{\varGamma ^*} c\approx d\) by 9.6 and 9.7. This holds analogously for all literals that are \(\beta \hbox {} defined \) in \(\varGamma \) and the defining literal is \(c\approx d\) or \(f(a')\not \approx f(b')\). Thus we get:
where \(K_i\) are the \(\beta \hbox {} undefined \) literals and \(L_j\) are the trivially defined literals.
Definition 12
(Rewrite Step). A rewrite step is a fivetuple \((s\# t\cdotp \sigma , s\# t\vee C\cdotp \sigma , R, S, p)\) and inductively defined as follows. The tuple \((s\# t\cdotp \sigma , s\# t\vee C\cdotp \sigma , \epsilon , \epsilon , \epsilon )\) is a rewrite step. Given rewrite steps R, S and a position p then \((s\# t\cdotp \sigma , s\# t\vee C\cdotp \sigma , R, S, p)\) is a rewrite step. The literal \(s\# t\) is called the rewrite literal. In case R, S are not \(\epsilon \), the rewrite literal of R is an equation.
Rewriting is one of the core features of our calculus. The following definition describes a rewrite inference between two clauses. Note that unlike the superposition calculus we allow rewriting below variable level.
Definition 13
(Rewrite Inference). Let \(I_1 := (l_1\approx r_1\cdotp \sigma _1,l_1\approx r_1\vee C_1\cdotp \sigma _1, R_1,L_1, p_1)\) and \(I_2 := (l_2\# r_2\cdotp \sigma _2,l_2\# r_2\vee C_2\cdotp \sigma _2, R_2, L_2, p_2)\) be two variable disjoint rewrite steps where \(r_1\sigma _1\prec _T l_1\sigma _1\), \((l_2\# r_2)\sigma _2_p = l_1\sigma _1\) for some position p. We distinguish two cases:

1.
if \(p\in {\text {pos}}(l_2\# r_2)\) and \(\mu := {\text {mgu}}((l_2\# r_2)_p,l_1)\) then \((((l_2\# r_2)[r_1]_{p})\mu \cdotp \sigma _1\sigma _2,\) \(((l_2\# r_2)[r_1]_{p})\mu \vee C_1\mu \vee C_2\mu \cdotp \sigma _1\sigma _2,I_1,I_2,p) \) is the result of a rewrite inference.

2.
if \(p\not \in {\text {pos}}(l_2\# r_2)\) then let \((l_2\# r_2)\delta \) be the most general instance of \(l_2\# r_2\) such that \(p\in {\text {pos}}((l_2\# r_2)\delta )\), \(\delta \) introduces only fresh variables and \((l_2\# r_2)\delta \sigma _2\rho = (l_2\# r_2)\sigma _2\) for some minimal \(\rho \). Let \(\mu := {\text {mgu}}((l_2\# r_2)\delta _p,l_1)\). Then \(((l_2\# r_2)\delta [r_1]_{p}\mu \cdotp \sigma _1\sigma _2\rho , (l_2\# r_2)\delta [r_1]_{p}\mu \vee C_1\mu \vee C_2\delta \mu \cdotp \sigma _1\sigma _2\rho , I_1, I_2,p) \) is the result of a rewrite inference.
Lemma 14
Let \(I_1 := (l_1\approx r_1\cdotp \sigma _1,l_1\approx r_1\vee C_1\cdotp \sigma _1, R_1, L_1, p_1)\) and \(I_2 := (l_2\# r_2\cdotp \sigma _2,l_2\# r_2\vee C_2\cdotp \sigma _2, R_2, L_2, p_2)\) be two variable disjoint rewrite steps where \(r_1\sigma _1\prec _T l_1\sigma _1\), \((l_2\# r_2)\sigma _2_p = l_1\sigma _1\) for some position p. Let \(I_3 := (l_3\# r_3\cdotp \sigma _3,l_3\# r_3\vee C_3\cdotp \sigma _3, I_1, I_2, p)\) be the result of a rewrite inference. Then:

1.
\(C_3\sigma _3 = (C_1\vee C_2)\sigma _1\sigma _2\) and \(l_3\# r_3\sigma _3 = (l_2\# r_2)\sigma _2[r_1\sigma _1]_p\).

2.
\((l_3\# r_3)\sigma _3\prec _T (l_2\# r_2)\sigma _2\)

3.
If \(N\models ( l_1\approx r_1\vee C_1) \wedge (l_2\# r_2\vee C_2)\) for some set of clauses N, then \(N\models l_3\# r_3\vee C_3\)
Now that we have defined rewrite inferences we can use them to define a reduction chain application and a refutation, which are sequences of rewrite steps. Intuitively speaking, a reduction chain application reduces a literal in a clause with literals in \(conv(\varGamma )\) until it is irreducible. A refutation for a literal L that is \(\beta \hbox {} false \) in \(\varGamma \) for a given \(\beta \), is a sequence of rewrite steps with literals in \(\varGamma ,L\) such that \(\bot \) is inferred. Refutations for the literals of the conflict clause will be examined during conflict resolution by the rule ExploreRefutation.
Definition 15
(Reduction Chain). Let \(\varGamma \) be a trail. A reduction chain \(\mathcal {P}\) from \(\varGamma \) is a sequence of rewrite steps \([I_1,...,I_m]\) such that for each \(I_i = (s_i\# t_i\cdotp \sigma _i, s_i\# t_i\vee C_i\cdotp \sigma _i, I_j, I_k, p_i)\) either

1.
\(s_i\# t_i^{n_i:s_i\# t_i\vee C_i\cdotp \sigma }\) is contained in \(\varGamma \) and \(I_j = I_k = p_i = \epsilon \) or

2.
\(I_i\) is the result of a rewriting inference from rewrite steps \(I_j, I_k\) out of \([I_1,...,I_m]\) where \(j, k < i\).
Let \((l\,\#\, r)\delta ^{o:l\,\#\, r \vee C \cdotp \delta }\) be an annotated ground literal. A reduction chain application from \(\varGamma \) to \(l\,\#\, r\) is a reduction chain \([I_1,...,I_m]\) from \(\varGamma ,(l\,\#\, r)\delta ^{o:l\,\#\, r \vee C \cdotp \delta }\) such that \(l\delta {\downarrow _{{\text {conv}}(\varGamma )}} = s_m\sigma _m\) and \(r\delta {\downarrow _{{\text {conv}}(\varGamma )}} = t_m\sigma _m\). We assume reduction chain applications to be minimal, i.e., if any rewrite step is removed from the sequence it is no longer a reduction chain application.
Definition 16
(Refutation). Let \(\varGamma \) be a trail and \((l\,\#\, r)\delta ^{o:l\,\#\, r \vee C \cdotp \delta }\) an annotated ground literal that is \(\beta \hbox {} false \) in \(\varGamma \) for a given \(\beta \). A refutation \(\mathcal {P}\) from \(\varGamma \) and \(l\,\#\, r \) is a reduction chain \([I_1,...,I_m]\) from \(\varGamma ,(l\,\#\, r)\delta ^{o:l\,\#\, r \vee C \cdotp \delta }\) such that \((s_m\# t_m)\sigma _m = s \not \approx s\) for some s. We assume refutations to be minimal, i.e., if any rewrite step \(I_k\), \(k<m\) is removed from the refutation, it is no longer a refutation.
3.1 The SCL(EQ) Inference Rules
We can now define the rules of our calculus based on the previous definitions. A state is a sixtuple \((\varGamma ; N; U; \beta ; k; D)\) similar to the SCL calculus, where \(\varGamma \) a sequence of annotated ground literals, N and U the sets of initial and learned clauses, \(\beta \) is a ground term such that for all \(L\in \varGamma \) it holds \(L\prec _T \beta \), k is the decision level, and D a status that is \(\top \), \(\bot \) or a closure \(C\,\cdotp \sigma \). Before we propagate or decide any literal, we make sure that it is irreducible in the current trail. Together with the design of \(\prec _{\varGamma ^*}\) this eventually enables rewriting as a simplification rule.
Propagate
\((\varGamma ; N; U; \beta ; k;\top )\) \(\Rightarrow _{\text {SCL(EQ)}}\) \((\varGamma ,s_m\# t_m\sigma _m^{{k:(s_m\# t_m\vee C_m)\cdotp \sigma _m}}; N; U; \beta ; k;\top )\)
provided there is a \(C \in (N \cup U)\), \(\sigma \) grounding for C, \(C = C_0 \vee C_1 \vee L\), \(\varGamma \models \lnot C_0\sigma \), \(C_1\sigma = L\sigma \vee ... \vee L\sigma \), \(C_1 = L_1 \vee ... \vee L_n\), \(\mu = mgu(L_1,..., L_n, L)\) \(L\sigma \) is \(\beta \hbox {} undefined \) in \(\varGamma \), \((C_0 \vee L)\mu \sigma \prec _T \beta \), \(\sigma \) is irreducible by \(conv(\varGamma )\), \([I_1,\ldots ,I_m]\) is a reduction chain application from \(\varGamma \) to \(L\sigma ^{k:(L\vee C_0)\mu \cdotp \sigma }\) where \(I_m = (s_m\# t_m\cdotp \sigma _m, s_m\# t_m\vee C_m\cdotp \sigma _m, I_j, I_k, p_m)\).
Note that the definition of Propagate also includes the case where \(L\sigma \) is irreducible by \(\varGamma \). In this case \(L = s_m\# t_m\) and \(m=1\). The rule Decide below, is similar to Propagate, except for the subclause \(C_0\) which must be \(\beta \hbox {} undefined \) or \(\beta \hbox {} true \) in \(\varGamma \), i.e., Propagate cannot be applied and the decision literal is annotated by a tautology.
Decide
\((\varGamma ; N; U; \beta ; k;\top )\) \(\Rightarrow _{\text {SCL(EQ)}}\) \((\varGamma ,s_m\# t_m\sigma _m^{{k+1:(s_m\# t_m\vee comp(s_m\# t_m))\cdotp \sigma _m}};N;U;\beta ;k+1;\top )\)
provided there is a \(C \in (N \cup U)\), \(\sigma \) grounding for C, \(C = C_0 \vee L\), \(C_0\sigma \) is \(\beta \hbox {} undefined \) or \(\beta \hbox {} true \) in \(\varGamma \), \(L\sigma \) is \(\beta \hbox {} undefined \) in \(\varGamma \), \((C_0 \vee L)\sigma \prec _T \beta \), \(\sigma \) is irreducible by \(conv(\varGamma )\), \([I_1,\ldots ,I_m]\) is a reduction chain application from \(\varGamma \) to \(L\sigma ^{k+1:L\vee C_0\cdotp \sigma }\) where \(I_m = (s_m\# t_m\cdotp \sigma _m, s_m\# t_m\vee C_m\cdotp \sigma _m, I_j, I_k, p_m)\).
Conflict
\((\varGamma ; N; U; \beta ; k;\top )\)\(\Rightarrow _{\text {SCL(EQ)}}\) \((\varGamma ; N; U; \beta ; k; D)\)
provided there is a \(D' \in (N \cup U)\), \(\sigma \) grounding for \(D'\), \(D'\sigma \) is \(\beta \hbox {} false \) in \(\varGamma \), \(\sigma \) is irreducible by \(conv(\varGamma )\), \(D =\bot \) if \(D'\sigma \) is of level 0 and \(D = D'\cdotp \sigma \) otherwise.
For the nonequational case, when a conflict clause is found by an SCL calculus [14, 18], the complements of its firstorder ground literals are contained in the trail. For equational literals this is not the case, in general. The proof showing D to be \(\beta \hbox {} false \) with respect to \(\varGamma \) is a rewrite proof with respect to \({\text {conv}}(\varGamma )\). This proof needs to be analyzed to eventually perform paramodulation steps on D or to replace D by a \(\prec _{\varGamma ^*}\) smaller \(\beta \hbox {} false \) clause showing up in the proof.
Skip
\((\varGamma ,K^{l:C\cdotp \tau },L^{k:C'\cdotp \tau '}; N; U; \beta ; k; D\,\cdotp \sigma )\)\(\Rightarrow _{\text {SCL(EQ)}}\) \((\varGamma ,K^{l:C\cdotp \tau }; N; U; \beta ; l; D\,\cdotp \sigma )\) if \(D\sigma \) is \(\beta \hbox {} false \) in \(\varGamma ,K^{l:C\cdotp \tau }\).
The ExploreRefutation rule is the FOL with Equality counterpart to the resolve rule in CDCL or SCL. While in CDCL or SCL complementary literals of the conflict clause are present on the trail and can directly be used for resolution steps, this needs a generalization for FOL with Equality. Here, in general, we need to look at (rewriting) refutations of the conflict clause and pick an appropriate clause from the refutation as the next conflict clause.
ExploreRefutation
\((\varGamma ,L; N; U; \beta ; k;(D\vee s\,\#\,t)\cdotp \sigma ))\) \(\Rightarrow _{\text {SCL(EQ)}}\) \((\varGamma ,L; N; U; \beta ; k;(s_j\# t_j\vee C_j)\cdotp \sigma _j\))
if \((s\,\#\,t)\sigma \) is strictly \(\prec _{\varGamma ^*}\) maximal in \((D\vee s\,\#\,t)\sigma \), L is the defining literal of \((s\,\#\,t)\sigma \), \([I_1,...,I_m]\) is a refutation from \(\varGamma \) and \((s\,\#\,t)\sigma \), \(I_j = (s_j\# t_j\cdotp \sigma _j, (s_j\# t_j\vee C_j)\cdotp \sigma _j, I_l, I_k, p_j)\), \(1\le j\le m\), \( (s_j\,\#\,t_j\vee C_j)\sigma _j \prec _{\varGamma ^*} (D\vee s\,\#\,t)\sigma \), \((s_j\# t_j\vee C_j)\sigma _j\) is \(\beta \hbox {} false \) in \(\varGamma \).
Factorize
\((\varGamma ;N;U;\beta ;k;(D\vee L \vee L')\cdot \sigma )\) \(\Rightarrow _{\text {SCL(EQ)}}\) \((\varGamma ;N;U;\beta ;k;(D\vee L)\mu \cdot \sigma )\)
provided \(L\sigma = L'\sigma \), and \(\mu ={\text {mgu}}(L,L')\).
EqualityResolution
\((\varGamma ; N; U;\beta ; k; (D \vee s\not \approx s')\cdotp \sigma )\)\(\Rightarrow _{\text {SCL(EQ)}}\) \( (\varGamma ; N; U;\beta ; k; D\mu \,\cdotp \sigma )\)
provided \(s\sigma = s'\sigma \), \(\mu =mgu(s,s')\).
Backtrack
\((\varGamma ,K,\varGamma ';N;U;\beta ;k;(D\vee L)\cdot \sigma )\) \(\Rightarrow _{\text {SCL(EQ)}}\) \((\varGamma ;N;U\cup \{D\vee L\};\beta ;ji;\top )\)
provided \(D\sigma \) is of level \(i'\) where \(i'<k\), K is of level j and \(\varGamma ,K\) the minimal trail subsequence such that there is a grounding substitution \(\tau \) with \((D\vee L)\tau \) \(\beta \)false in \(\varGamma ,K\) but not in \(\varGamma \); \(i=1\) if K is a decision literal and \(i=0\) otherwise.
Grow
\((\varGamma ;N;U; \beta ;k;\top )\) \(\Rightarrow _{\text {SCL(EQ)}}\) \((\epsilon ;N;U; \beta '; 0;\top )\)
provided \(\beta \prec _T \beta '\).
In addition to soundness and completeness of the SCL(EQ) rules their tractability in practice is an important property for a successful implementation. In particular, finding propagating literals or detecting a false clause under some grounding. It turns out that these operations are NPcomplete, similar to firstorder subsumption which has been shown to be tractable in practice.
Lemma 17
Assume that all ground terms t with \(t\prec _T \beta \) for any \(\beta \) are polynomial in the size of \(\beta \). Then testing Propagate (Conflict) is NPComplete, i.e., the problem of checking for a given clause C whether there exists a grounding substitution \(\sigma \) such that \(C\sigma \) propagates (is false) is NPComplete.
Example 18
(SCL(EQ) vs. Superposition: Saturation). Consider the following clauses:
where again we assume a KBO with all symbols having weight one, precedence \(d\prec c\prec b\prec a\prec g\prec f\) and \(\beta := f(f(g(a)))\). Suppose that we first decide \(c\approx d\) and then propagate \(a\approx b\): \(\varGamma = [c\approx d^{1:c\approx d\vee c\not \approx d}, a\approx b^{1:C_2}]\). Now we have a conflict with \(C_3\). ExploreRefutation applied to the conflict clause \(C_3\) results in a paramodulation inference between \(C_3\) and \(C_2\). Another application of EqualityResolution gives us the new conflict clause \(C_4 := c\not \approx d\vee g(c)\not \approx g(d)\). Now we can Skip the last literal on the trail, which gives us \(\varGamma = [c\approx d^{1:c\approx d\vee c\not \approx d}]\). Another application of the ExploreRefutation rule to \(C_4\) using the decision justification clause followed by EqualityResolution and Factorize gives us \(C_5 := c\not \approx d\). Thus with SCL(EQ) the following clauses remain:
where we derived \(C'_1\) out of \(C_1\) by subsumption resolution [33] using \(C_5\). Actually, subsumption resolution is compatible with the general redundancy notion of SCL(EQ), see Lemma 25. Now we consider the same example with superposition and the very same ordering (\(N_i\) is the clause set of the previous step and \(N_0\) the initial clause set N).
Thus superposition ends up with the following clauses:
The superposition calculus generates more and larger clauses.
Example 19
(SCL(EQ) vs. Superposition: Refutation). Suppose the following set of clauses: \(N := \{C_1 := f(x)\not \approx a\vee f(x)\approx b, C_2 := f(f(y))\approx y, C_3 := a\not \approx b\}\) where again we assume a KBO with all symbols having weight one, precedence \(b\prec a\prec f\) and \(\beta := f(f(f(a)))\). A long refutation by the superposition calculus results in the following (\(N_i\) is the clause set of the previous step and \(N_0\) the initial clause set N):
The shortest refutation by the superposition calculus is as follows:
In SCL(EQ) on the other hand we would always first propagate \(a\not \approx b,f(f(a))\approx a\) and \(f(f(b))\approx b\). As soon as \(a\not \approx b\) and \(f(f(a))\approx a\) are propagated we have a conflict with \(C_1\{x\rightarrow f(a)\}\). So suppose in the worst case we propagate:
Now we have a conflict with \(C_1\{x\rightarrow f(a)\}\). Since there is no decision literal on the trail, \( Conflict \) rule immediately returns \(\bot \) and we are done.
4 Soundness and Completeness
In this section we show soundness and refutational completeness of SCL(EQ) under the assumption of a regular run. We provide the definition of a regular run and show that for a regular run all learned clauses are nonredundant according to our trail induced ordering. We start with the definition of a sound state.
Definition 20
A state \((\varGamma ; N; U; \beta ; k; D)\) is sound if the following conditions hold:

1.
\(\varGamma \) is a consistent sequence of annotated literals,

2.
for each decomposition \(\varGamma = \varGamma _1, L\sigma ^{i:(C \vee L)\cdotp \sigma }, \varGamma _2\) where \(L\sigma \) is a propagated literal, we have that \(C\sigma \) is \(\beta \hbox {} false \) in \(\varGamma _1\), \(L\sigma \) is \(\beta \hbox {} undefined \) in \(\varGamma _1\) and irreducible by \(conv(\varGamma _1)\), \(N\cup U \models (C \vee L)\) and \((C \vee L) \sigma \prec _T \beta \),

3.
for each decomposition \(\varGamma = \varGamma _1, L\sigma ^{i:(L\vee comp(L))\cdotp \sigma }, \varGamma _2\) where \(L\sigma \) is a decision literal, we have that \(L\sigma \) is \(\beta \hbox {} undefined \) in \(\varGamma _1\) and irreducible by \(conv(\varGamma _1)\), \(N\cup U \models (L\vee comp(L))\) and \((L \vee comp(L))\sigma \prec _T \beta \),

4.
\(N \models U\),

5.
if \(D = C\,\cdotp \sigma \), then \(C\sigma \) is \(\beta \hbox {} false \) in \(\varGamma \), \(N \cup U\models C\),
Lemma 21
The initial state \((\epsilon ; N; \emptyset ; \beta ; 0; \top )\) is sound.
Definition 22
A run is a sequence of applications of SCL(EQ) rules starting from the initial state.
Theorem 23
Assume a state \((\varGamma ;N;U;\beta ;k;D)\) resulting from a run. Then \((\varGamma ;N;U;\beta ;k;D)\) is sound.
Next, we give the definition of a regular run. Intuitively speaking, in a regular run we are always allowed to do decisions except if

1.
a literal can be propagated before the first decision and

2.
the negation of a literal can be propagated.
To ensure nonredundant learning we enforce at least one application of Skip during conflict resolution except for the special case of a conflict after a decision.
Definition 24
(Regular Run). A run is called regular if

1.
the rules \( Conflict \) and \( Factorize \) have precedence over all other rules,

2.
If \(k=0\) in a state \((\varGamma ; N;U;\beta ;k;D)\), then \( Propagate \) has precedence over \( Decide \),

3.
If an annotated literal \(L^{k:C\cdotp \sigma }\) could be added by an application of Propagate on \(\varGamma \) in a state \((\varGamma ; N;U;\beta ;k;D)\) and \(C\in N\cup U\), then the annotated literal \(comp(L)^{k+1:C'\cdotp \sigma '}\) is not added by Decide on \(\varGamma \),

4.
during conflict resolution \( Skip \) is applied at least once, except if \( Conflict \) is applied immediately after an application of \( Decide \).

5.
if \( Conflict \) is applied immediately after an application of \( Decide \), then Backtrack is only applied in a state \((\varGamma ,L'; N;U;\beta ;k;D\cdotp \sigma )\) if \(L\sigma = comp(L')\) for some \(L\in D\).
Now we show that any learned clause in a regular run is nonredundant according to our trail induced ordering.
Lemma 25
(NonRedundant Clause Learning). Let N be a clause set. The clauses learned during a regular run in SCL(EQ) are not redundant with respect to \(\prec _{\varGamma ^*}\) and \(N \cup U\). For the trail only nonredundant clauses need to be considered.
The proof of Lemma 25 is based on the fact that conflict resolution eventually produces a clause smaller then the original conflict clause with respect to \(\prec _{\varGamma ^*}\). All simplifications, e.g., contextual rewriting, as defined in [2, 20, 33, 35,36,37], are therefore compatible with Lemma 25 and may be applied to the newly learned clause as long as they respect the induced trail ordering. In detail, let \(\varGamma \) be the trail before the application of rule Backtrack. The newly learned clause can be simplified according to the induced trail ordering \(\prec _{\varGamma ^*}\) as long as the simplified clause is smaller with respect to \(\prec _{\varGamma ^*}\).
Another important consequence of Lemma 25 is that newly learned clauses need not to be considered for redundancy. Furthermore, the SCL(EQ) calculus always terminates, Lemma 33, because there only finitely many nonredundant clauses with respect to a fixed \(\beta \).
For dynamic redundancy, we have to consider the fact that the induced trail ordering changes. At this level, only redundancy criteria and simplifications that are compatible with all induced trail orderings may be applied. Due to the construction of the induced trail ordering, it is compatible with \(\prec _T\) for unit clauses.
Lemma 26
(Unit Rewriting). Assume a state \((\varGamma ;N;U;\beta ;k;D)\) resulting from a regular run where the current level \(k>0\) and a unit clause \(l\approx r\in N\). Now assume a clause \(C\vee L[l']_p \in N\) such that \(l' = l\mu \) for some matcher \(\mu \). Now assume some arbitrary grounding substitutions \(\sigma '\) for \(C\vee L[l']_p\), \(\sigma \) for \(l\approx r\) such that \(l\sigma =l'\sigma '\) and \(r\sigma \prec _T l\sigma \). Then \( (C\vee L[r\mu \sigma \sigma ']_p)\sigma '\prec _{\varGamma ^*} (C\vee L[l']_p)\sigma '\).
In addition, any notion that is based on a literal subset relationship is also compatible with ordering changes. The standard example is subsumption.
Lemma 27
Let C, D be two clauses. If there exists a substitution \(\sigma \) such that \(C\sigma \subset D\), then D is redundant with respect to C and any \(\prec _{\varGamma ^*}\).
The notion of redundancy, Definition 1, only supports a strict subset relation for Lemma 27, similar to the superposition calculus. However, the newly generated clauses of SCL(EQ) are the result of paramodulation inferences [28]. In a recent contribution to dynamic, abstract redundancy [32] it is shown that also the nonstrict subset relation in Lemma 27, i.e., \(C\sigma \subseteq D\), preserves completeness.
If all stuck states, see below Definition 28, with respect to a fixed \(\beta \) are visited before increasing \(\beta \) then this provides a simple dynamic fairness strategy.
When unit reduction or any other form of supported rewriting is applied to clauses smaller than the current \(\beta \), it can be applied independently from the current trail. If, however, unit reduction is applied to clauses larger than the current \(\beta \) then the calculus must do a restart to its initial state, in particular the trail must be emptied, as for otherwise rewriting may result generating a conflict that did not exist with respect to the current trail before the rewriting. This is analogous to a restart in CDCL once a propositional unit clause is derived and used for simplification. More formally, we add the following new Restart rule to the calculus to reset the trail to its initial state after a unit reduction.
Restart
\((\varGamma ;N;U; \beta ;k;\top )\) \(\Rightarrow _{\text {SCL(EQ)}}\) \((\epsilon ;N;U; \beta ; 0;\top )\)
Next we show refutation completeness of SCL(EQ). To achieve this we first give a definition of a stuck state. Then we show that stuck states only occur if all ground literals \(L\prec _T\beta \) are \(\beta \hbox {} defined \) in \(\varGamma \) and not during conflict resolution. Finally we show that conflict resolution will always result in an application of Backtrack. This allows us to show termination (without application of Grow) and refutational completeness.
Definition 28
(Stuck State). A state \((\varGamma ;N;U;\beta ;k;D)\) is called stuck if \(D\ne \bot \) and none of the rules of the calculus, except for Grow, is applicable.
Lemma 29
(Form of Stuck States). If a regular run (without rule Grow) ends in a stuck state \((\varGamma ;N;U;\beta ;k;D)\), then \(D=\top \) and all ground literals \(L\sigma \prec _T \beta \), where \(L\vee C\in (N\cup U)\) are \(\beta \hbox {} defined \) in \(\varGamma \).
Lemma 30
Suppose a sound state \((\varGamma ; N;U;\beta ;k; D)\) resulting from a regular run where \(D\not \in \{\top ,\bot \}\). If Backtrack is not applicable then any set of applications of \( Explore\hbox {}Refutation \), Skip, \( Factorize \), \( Equality\hbox {}Resolution \) will finally result in a sound state \((\varGamma '; N;U;\beta ;k;D')\), where \(D' \prec _{\varGamma ^*} D\). Then Backtrack will be finally applicable.
Corollary 31
(Satisfiable Clause Sets). Let N be a satisfiable clause set. Then any regular run without rule Grow will end in a stuck state, for any \(\beta \).
Thus a stuck state can be seen as an indication for a satisfiable clause set. Of course, it remains to be investigated whether the clause set is actually satisfiable. Superposition is one of the strongest approaches to detect satisfiability and constitutes a decision procedure for many decidable firstorder fragments [4, 19]. Now given a stuck state and some specific ordering such as KBO, LPO, or some polynomial ordering [17], it is decidable whether the ordering can be instantiated from a stuck state such that \(\varGamma \) coincides with the superposition model operator on the ground terms smaller than \(\beta \). In this case it can be effectively checked whether the clauses derived so far are actually saturated by the superposition calculus with respect to this specific ordering. In this sense, SCL(EQ) has the same power to decide satisfiability of firstorder clause sets than superposition.
Definition 32
A regular run terminates in a state \((\varGamma ; N;U;\beta ;k; D)\) if \(D=\top \) and no rule is applicable, or \(D = \bot \).
Lemma 33
Let N be a set of clauses and \(\beta \) be a ground term. Then any regular run that never uses Grow terminates.
Lemma 34
If a regular run reaches the state \((\varGamma ;N;U;\beta ;k;\bot )\) then N is unsatisfiable.
Theorem 35
(Refutational Completeness). Let N be an unsatisfiable clause set, and \(\prec _T\) a desired term ordering. For any ground term \(\beta \) where \(gnd_{\prec _T\beta }(N)\) is unsatisfiable, any regular \(\text {SCL(EQ)}\) run without rule Grow will terminate by deriving \(\bot \).
5 Discussion
We presented SCL(EQ), a new sound and complete calculus for reasoning in firstorder logic with equality. We will now discuss some of its aspects and present ideas for future work beyond the scope of this paper.
The trail induced ordering, Definition 9, is the result of letting the calculus follow the logical structure of the clause set on the literal level and at the same time supporting rewriting at the term level. It can already be seen by examples on ground clauses over (in)equations over constants that this combination requires a layered approach as suggested by Definition 9, see [24].
In case the calculus runs into a stuck state, i.e., the current trail is a model for the set of considered ground instances, then the trail information can be effectively used for a guided continuation. For example, in order to use the trail to certify a model, the trail literals can be used to guide the design of a lifted ordering for the clauses with variables such that propagated trail literals are maximal in respective clauses. Then it could be checked by superposition, if the current clause is saturated by such an ordering. If this is not the case, then there must be a superposition inference larger than the current \(\beta \), thus giving a hint on how to extend \(\beta \). Another possibility is to try to extend the finite set of ground terms considered in a stuck state to the infinite set of all ground terms by building extended equivalence classes following patterns that ensure decidability of clause testing, similar to the ideas in [14]. If this fails, then again this information can be used to find an appropriate extension term \(\beta \) for rule Grow.
In contrast to superposition, SCL(EQ) does also inferences below variable level. Inferences in SCL(EQ) are guided by a false clause with respect to a partial model assumption represented by the trail. Due to this guidance and the different style of reasoning this does not result in an explosion in the number of possibly inferred clauses but also rather in the derivation of more general clauses, see [24].
Currently, the reasoning with solely positive equations is done on and with respect to the trail. It is wellknown that also inferences from this type of reasoning can be used to speed up the overall reasoning process. The SCL(EQ) calculus already provides all information for such a type of reasoning, because it computes the justification clauses for trail reasoning via rewriting inferences. By an assessment of the quality of these clauses, e.g., their reduction potential with respect to trail literals, they could also be added, independently from resolving a conflict.
The trail reasoning is currently defined with respect to rewriting. It could also be performed by congruence closure [26].
Towards an implementation, the aspect of how to find interesting ground decision or propagation literals for the trail can be treated similar to CDCL [11, 21, 25, 29]. A simple heuristic may be used from the start, like counting the number of instance relationships of some ground literal with respect to the clause set, but later on a bonus system can focus the search towards the structure of the clause sets. Ground literals involved in a conflict or the process of learning a new clause get a bonus or preference. The regular strategy requires the propagation of all ground unit clauses smaller than \(\beta \). For an implementation a propagation of the (explicit and implicit) unit clauses with variables to the trail will be a better choice. This complicates the implementation of refutation proofs and rewriting (congruence closure), but because every reasoning is layered by a ground term \(\beta \) this can still be efficiently done.
References
Alagi, G., Weidenbach, C.: NRCL  a model building approach to the BernaysSchönfinkel fragment. In: Lutz, C., Ranise, S. (eds.) FroCoS 2015. LNCS (LNAI), vol. 9322, pp. 69–84. Springer, Cham (2015). https://doi.org/10.1007/9783319242460_5
Bachmair, L., Ganzinger, H.: Rewritebased equational theorem proving with selection and simplification. J. Log. Comput. 4(3), 217–247 (1994)
Bachmair, L., Ganzinger, H., Voronkov, A.: Elimination of equality via transformation with ordering constraints. In: Kirchner, C., Kirchner, H. (eds.) CADE 1998. LNCS, vol. 1421, pp. 175–190. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0054259
Bachmair, L., Ganzinger, H., Waldmann, U.: Superposition with simplification as a decision procedure for the monadic class with equality. In: Gottlob, G., Leitsch, A., Mundici, D. (eds.) KGC 1993. LNCS, vol. 713, pp. 83–96. Springer, Heidelberg (1993). https://doi.org/10.1007/BFb0022557
Baumgartner, P.: Hyper tableau — the next generation. In: de Swart, H. (ed.) TABLEAUX 1998. LNCS (LNAI), vol. 1397, pp. 60–76. Springer, Heidelberg (1998). https://doi.org/10.1007/3540697780_14
Baumgartner, P., Fuchs, A., Tinelli, C.: Lemma learning in the model evolution calculus. In: Hermann, M., Voronkov, A. (eds.) LPAR 2006. LNCS (LNAI), vol. 4246, pp. 572–586. Springer, Heidelberg (2006). https://doi.org/10.1007/11916277_39
Baumgartner, P., Furbach, U., Pelzer, B.: Hyper tableaux with equality. In: Pfenning, F. (ed.) CADE 2007. LNCS (LNAI), vol. 4603, pp. 492–507. Springer, Heidelberg (2007). https://doi.org/10.1007/9783540735953_36
Baumgartner, P., Pelzer, B., Tinelli, C.: Model evolution with equalityrevised and implemented. J. Symb. Comput. 47(9), 1011–1045 (2012)
Baumgartner, P., Tinelli, C.: The model evolution calculus with equality. In: Nieuwenhuis, R. (ed.) CADE 2005. LNCS (LNAI), vol. 3632, pp. 392–408. Springer, Heidelberg (2005). https://doi.org/10.1007/11532231_29
Baumgartner, P., Waldmann, U.: Superposition and model evolution combined. In: Schmidt, R.A. (ed.) CADE 2009. LNCS (LNAI), vol. 5663, pp. 17–34. Springer, Heidelberg (2009). https://doi.org/10.1007/9783642029592_2
Biere, A., Heule, M., van Maaren, H., Walsh, T. (eds.): Handbook of Satisfiability, Frontiers in Artificial Intelligence and Applications, vol. 185. IOS Press, Amsterdam (2009)
Bonacina, M.P., Furbach, U., SofronieStokkermans, V.: On FirstOrder ModelBased Reasoning. In: MartíOliet, N., Ölveczky, P.C., Talcott, C. (eds.) Logic, Rewriting, and Concurrency. LNCS, vol. 9200, pp. 181–204. Springer, Cham (2015). https://doi.org/10.1007/9783319231655_8
Bonacina, M.P., Plaisted, D.A.: SGGS theorem proving: an exposition. In: Schulz, S., Moura, L.D., Konev, B. (eds.) PAAR2014. 4th Workshop on Practical Aspects of Automated Reasoning. EPiC Series in Computing, vol. 31, pp. 25–38. EasyChair (2015)
Bromberger, M., Fiori, A., Weidenbach, C.: Deciding the BernaysSchoenfinkel fragment over bounded difference constraints by simple clause learning over theories. In: Henglein, F., Shoham, S., Vizel, Y. (eds.) VMCAI 2021. LNCS, vol. 12597, pp. 511–533. Springer, Cham (2021). https://doi.org/10.1007/9783030670672_23
Davis, M., Logemann, G., Loveland, D.: A machine program for theoremproving. Commun. ACM 5(7), 394–397 (1962)
Davis, M., Putnam, H.: A computing procedure for quantification theory. J. ACM (JACM) 7(3), 201–215 (1960)
Dershowitz, N., Plaisted, D.A.: Rewriting. In: Robinson, A., Voronkov, A. (eds.) Handbook of Automated Reasoning, vol. I, chap. 9, pp. 535–610. Elsevier (2001)
Fiori, A., Weidenbach, C.: SCL clause learning from simple models. In: Fontaine, P. (ed.) CADE 2019. LNCS (LNAI), vol. 11716, pp. 233–249. Springer, Cham (2019). https://doi.org/10.1007/9783030294366_14
Ganzinger, H., de Nivelle, H.: A superposition decision procedure for the guarded fragment with equality. In: LICS, pp. 295–304 (1999)
Gleiss, B., Kovács, L., Rath, J.: Subsumption demodulation in firstorder theorem proving. In: Peltier, N., SofronieStokkermans, V. (eds.) IJCAR 2020. LNCS (LNAI), vol. 12166, pp. 297–315. Springer, Cham (2020). https://doi.org/10.1007/9783030510749_17
Bayardo, R.J., Schrag, R.: Using CSP lookback techniques to solve exceptionally hard SAT instances. In: Freuder, E.C. (ed.) CP 1996. LNCS, vol. 1118, pp. 46–60. Springer, Heidelberg (1996). https://doi.org/10.1007/3540615512_65
Korovin, K.: InstGen – a modular approach to instantiationbased automated reasoning. In: Voronkov, A., Weidenbach, C. (eds.) Programming Logics. LNCS, vol. 7797, pp. 239–270. Springer, Heidelberg (2013). https://doi.org/10.1007/9783642376511_10
Korovin, K., Sticksel, C.: iProverEq: an instantiationbased theorem prover with equality. In: Giesl, J., Hähnle, R. (eds.) IJCAR 2010. LNCS (LNAI), vol. 6173, pp. 196–202. Springer, Heidelberg (2010). https://doi.org/10.1007/9783642142031_17
Leidinger, H., Weidenbach, C.: SCL(EQ): SCL for firstorder logic with equality (2022). arXiv: 2205.08297
Moskewicz, M.W., Madigan, C.F., Zhao, Y., Zhang, L., Malik, S.: Chaff: engineering an efficient SAT solver. In: Proceedings of the Design Automation Conference, pp. 530–535. ACM (2001)
Nelson, G., Oppen, D.C.: Fast decision procedures based on congruence closure. J. ACM 27(2), 356–364 (1980)
Plaisted, D.A., Zhu, Y.: Ordered semantic hyperlinking. J. Autom. Reason. 25(3), 167–217 (2000)
Robinson, G., Wos, L.: Paramodulation and theoremproving in firstorder theories with equality. In: Meltzer, B., Michie, D. (eds.) Machine Intelligence 4, pp. 135–150 (1969)
Silva, J.P.M., Sakallah, K.A.: GRASP  a new search algorithm for satisfiability. In: International Conference on Computer Aided Design, ICCAD, pp. 220–227. IEEE Computer Society Press (1996)
Sutcliffe, G.: The TPTP problem library and associated infrastructure  from CNF to th0, TPTP v6.4.0. J. Autom. Reasoning 59(4), 483–502 (2017)
Teucke, A.: An approximation and refinement approach to firstorder automated reasoning. Doctoral thesis, Saarland University (2018)
Waldmann, U., Tourret, S., Robillard, S., Blanchette, J.: A comprehensive framework for saturation theorem proving. In: Peltier, N., SofronieStokkermans, V. (eds.) IJCAR 2020. LNCS (LNAI), vol. 12166, pp. 316–334. Springer, Cham (2020). https://doi.org/10.1007/9783030510749_18
Weidenbach, C.: Combining superposition, sorts and splitting. In: Robinson, A., Voronkov, A. (eds.) Handbook of Automated Reasoning, vol. 2, chap. 27, pp. 1965–2012. Elsevier (2001)
Weidenbach, C.: Automated reasoning building blocks. In: Meyer, R., Platzer, A., Wehrheim, H. (eds.) Correct System Design. LNCS, vol. 9360, pp. 172–188. Springer, Cham (2015). https://doi.org/10.1007/9783319235066_12
Weidenbach, C., Wischnewski, P.: Contextual rewriting in SPASS. In: PAAR/ESHOL. CEUR Workshop Proceedings, vol. 373, pp. 115–124. Australien, Sydney (2008)
Weidenbach, C., Wischnewski, P.: Subterm contextual rewriting. AI Commun. 23(2–3), 97–109 (2010)
Wischnewski, P.: Effcient Reasoning Procedures for Complex FirstOrder Theories. Ph.D. thesis, Saarland University, November 2012
Acknowledgments
This work was partly funded by DFG grant 389792660 as part of TRR 248, see https://perspicuouscomputing.science. We thank the anonymous reviewers and Martin Desharnais for their thorough reading, detailed comments, and corrections.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
Copyright information
© 2022 The Author(s)
About this paper
Cite this paper
Leidinger, H., Weidenbach, C. (2022). SCL(EQ): SCL for FirstOrder Logic with Equality. In: Blanchette, J., Kovács, L., Pattinson, D. (eds) Automated Reasoning. IJCAR 2022. Lecture Notes in Computer Science(), vol 13385. Springer, Cham. https://doi.org/10.1007/9783031107696_14
Download citation
DOI: https://doi.org/10.1007/9783031107696_14
Published:
Publisher Name: Springer, Cham
Print ISBN: 9783031107689
Online ISBN: 9783031107696
eBook Packages: Computer ScienceComputer Science (R0)