Confluence Criteria for Logically Constrained Rewrite Systems (Full Version)

Numerous confluence criteria for plain term rewrite systems are known. For logically constrained rewrite system, an attractive extension of term rewriting in which rules are equipped with logical constraints, much less is known. In this paper we extend the strongly-closed and (almost) parallel-closed critical pair criteria of Huet and Toyama to the logically constrained setting. We discuss the challenges for automation and present crest, a new tool for logically constrained rewriting in which the confluence criteria are implemented, together with experimental data.


Introduction
Logically constrained rewrite systems constitute a general rewrite formalism with native support for constraints that are handled by SMT solvers.They are useful for program analysis, as illustrated in numerous papers [2,3,5,13].Several results from term rewriting have been lifted to constrained rewriting.We mention termination analysis [6,7,12], rewriting induction [3], completion [12] as well as runtime complexity analysis [13].
In this paper we are concerned with confluence analysis of logically constrained rewrite systems (LCTRSs for short).Only two sufficient conditions for confluence of LCTRSs are known.Kop and Nishida considered (weak) orthogonality in [8].Orthogonality is the combination of left-linearity and the absence of critical pairs, in a weakly orthogonal system trivial critical pairs are allowed.Completion of LCTRSs is the topic of [12] and the underlying confluence condition of completion is the combination of termination and joinability of criticial pairs.In this paper we add two further confluence criteria.Both of these extend known conditions for standard term rewriting to the constrained setting.The first is the combination of linearity and strong closedness of critical pairs, introduced by Huet [4].The second, also due to [4], is the combination of leftlinearity and parallel closedness of critical pairs.We also consider an extension of the latter, due to Toyama [11].
Overview The remainder of this paper is organized as follows.In the next section we summarize the relevant background.Section 3 recalls the existing confluence criteria for LCTRSs and some of the underlying results.The new confluence criteria for LCTRSs are reported in Section 4. In Section 5 the automation challenges we faced are described and we present our prototype implementation crest.Experimental results are reported in Section 6, before we conclude in Section 7.

Preliminaries
We assume familiarity with the basic notions of term rewrite systems (TRSs) [1], but shortly recapitulate terminology and notation that we use in the remainder.In particular, we recall the notion of logically constrained rewriting as defined in [3,8].
We assume a many-sorted signature F and a set V of (many-sorted) variables disjoint from F .The signature F is split into term symbols from F te and theory symbols from F th .The set T (F , V) contains the well-sorted terms over this signature and T (F th ) denotes the set of well-sorted ground terms that consist entirely of theory symbols.We assume a mapping I which assigns to every sort ι occurring in F th a carrier set I(ι), and an interpretation J that assigns to every symbol f ∈ F th with sort declaration ι 1 × • • • × ι n → κ a function f J : I(ι 1 ) × • • • × I(ι n ) → I(κ).Moreover, for every sort ι occurring in F th we assume a set Val ι ⊆ F th of value symbols, such that all c ∈ Val ι are constants of sort ι and J constitutes a bijective mapping between Val ι and I(ι).Thus there exists a constant symbol in F th for every value in the carrier set.The interpretation J naturally extends to a mapping [[•]] from ground terms in T (F th ) to values in Val = ι∈Dom(I) Val ι : [[f (t 1 , . . ., t n )]] = f J ([[t 1 ]], . . ., [[t n ]]) for all f (t 1 , . . ., t n ) ∈ T (F th ).So every ground term in T (F th ) has a unique value.We demand that theory symbols and term symbols overlap only on values, i.e., F te ∩ F th ⊆ Val.A term in T (F th , V) is called a logical term.
Positions are strings of positive natural numbers used to address subterms.The empty string is denoted by ǫ.We write q p and say that p is below q if qq ′ = p for some position q ′ , in which case p\q is defined to be q ′ .Furthermore, q < p if q p and q = p.Finally, positions q and p are parallel, written as q p, if neither q p nor p < q.The set of positions of a term t is defined as Pos(t) = {ǫ} if t is a variable or a constant, and as Pos(t) = {ǫ} ∪ {iq | 1 i n and q ∈ Pos(t i )} if t = f (t 1 , . . ., t n ) with n 1.The subterm of t at position p ∈ Pos(t) is defined as t| p = t if p = ǫ and as t| p = t i | q if p = iq and t = f (t 1 , . . ., t n ).We write s[t] p for the result of replacing the subterm at position p of s with t.We write Pos V (t) for {p ∈ Pos(t) | t| p ∈ V } and Pos F (t) for Pos(t) \ Pos V (t).The set of variables occurring in the term t is denoted by Var(t).A term t is linear if every variable occurs at most once in it.A substitution is a mapping σ from V to T (F , V) such that its domain {x ∈ V | σ(x) = x} is finite.We write tσ for the result of applying σ to the term t.
We assume the existence of a sort bool such that A constrained rewrite rule is a triple ℓ → r [ϕ] where ℓ, r ∈ T (F , V) are terms of the same sort such that root(ℓ) ∈ F te \ F th and ϕ is a logical term of sort bool.If ϕ = true then the constraint is often omitted, and the rule is denoted as ℓ → r.We denote the set Var(ϕ)∪(Var(r)\Var(ℓ)) of logical variables in ρ : ℓ → r [ϕ] by LVar(ρ).We write EVar(ρ) for the set Var(r) \ (Var(ℓ) ∪ Var(ϕ)) of variables that appear only in the right-hand side of ρ.Note that extra variables in right-hand sides are allowed, but they may only be instantiated by values.This is useful to model user input or random choice [3].A set of constrained rewrite rules is called a logically constrained rewrite system (LCTRS for short).
The LCTRS R introduced in the example below computes the maximum of two integers.
Example 1.Before giving the rules, we need to define the term and theory symbols, the carrier sets and interpretation functions: The interpretations for theory symbols follow the usual semantics given in the SMT-LIB theory Ints1 used by the SMT-LIB logic QF_LIA.The LCTRS R consists of the following constrained rewrite rules In later examples we refrain from spelling out the signature and interpretations of the theory Ints.We now define rewriting using constrained rewrite rules.LCTRSs admit two kinds of rewrite steps.Rewrite rules give rise to rule steps, provided the constraint of the rule is satisfied.In addition, theory calls of the form f (v 1 , . . ., v n ) with f ∈ F th \ Val and values v 1 , . . ., v n can be evaluated in a calculation step.In the definition below, a substitution σ is said to respect a rule ρ : ℓ → r [ϕ], denoted by σ ρ, if Dom(σ) = Var(ℓ)∪Var(r)∪Var(ϕ), σ(x) ∈ Val for all x ∈ LVar(ρ), and ϕσ is valid.Moreover, a constraint ϕ is respected by σ, denoted by σ ϕ, if σ(x) ∈ Val for all x ∈ Var(ϕ) and ϕσ is valid.Definition 1.Let R be an LCTRS.A rule step s → ru t satisfies s| p = ℓσ and t = s[rσ] p for some position p and constrained rewrite rule ℓ → r [ϕ] that is respected by the substitution σ.
with a fresh variable y is a calculation rule.The set of all calculation rules is denoted by R ca .The relation → R associated with R is the union of → ru ∪ → ca .
We sometimes write → p | ρ | σ to indicate that the rewrite step takes place at position p, using the constrained rewrite rule ρ with substitution σ.

Confluence
In this paper we are concerned with the confluence of LCTRSs.
u for all terms s, t and u such that t * R ← s → * R u. Confluence criteria for TRSs are based on critical pairs.Critical pairs for LCTRS were introduced in [8].The difference with the definition below is that we add dummy constraints for extra variables in right-hand sides of rewrite rules.Definition 2. An overlap of an LCTRS R is a triple ρ 1 , p, ρ 2 with rules , satisfying the following conditions: 1. ρ 1 and ρ 2 are variable-disjoint variants of rewrite rules in R ∪ R ca , 2. p ∈ Pos F (ℓ 2 ), 3. ℓ 1 and ℓ 2 | p are unifiable with a mgu σ such that σ(x) ∈ Val ∪ V for all x ∈ LVar(ρ 1 ) ∪ LVar(ρ 2 ), 4. ϕ 1 σ ∧ ϕ 2 σ is satisfiable, and 5. if p = ǫ then ρ 1 and ρ 2 are not variants, or Var(r 1 ) Var(ℓ 1 ).
In the following we drop "constrained" and speak of critical pairs.The condition Var(r 1 ) Var(ℓ 1 ) in the fifth condition is essential to correctly deal with extra variables in rewrite rules.The equations (ψ) added to the constraint of a critical pair save the information which variables in a critical pair were introduced by variables only occurring in the right-hand side of a rewrite rule and therefore should only be instantiated by values.Critical pairs as defined in [8,12] lack this information.The proof of Theorem 2 in the next section makes clear why those trivial equations are essential for our confluence criteria, see also Example 9.
Example 3. Consider the LCTRS consisting of the rule The variable z does not occur in the left-hand side and the condition Var(r 1 ) Var(ℓ 1 ) ensures that ρ overlaps with (a variant of) itself at the root position.Note that R is not confluent due to the non-joinable local peak −4 ← f(16) → 4.
Example 4. The LCTRS R of Example 1 admits the following critical pairs: The originating overlap is given on the right, where we number the rewrite rules from left to right in Example 1.
Actually, there are three more overlaps since the position of overlap (ǫ) is the root position.Such overlaps are called overlays and always come in pairs.For instance, max(y, x) ≈ x [x ≥ y ] is the critial pair originating from 3, ǫ, 1 .For confluence criteria based on symmetric joinability conditions of critical pairs (like weak orthogonality and joinability of critical pairs for terminating systems) we need to consider just one critical pair, but this is not true for the criteria presented in the next section.
Logically constrained rewriting aims to rewrite (unconstrained) terms with constrained rules.However, for the sake of analysis, rewriting constrained terms is useful.In particular, since critical pairs in LCTRSs come with a constraint, confluence criteria need to consider constrained terms.The relevant notions defined below originate from [3,8].
if for every substitution γ respecting ϕ there is some substitution δ that respects ψ such that sγ = tδ, and vice versa.Let R be an LCTRS and s [ϕ] a constrained term.If s| p = ℓσ for some constrained rewrite rule ρ : ℓ → r [ψ ], position p, and substitution σ such that σ(x) ∈ Val ∪ Var(ϕ) for all x ∈ LVar(ρ), ϕ is satisfiable and ϕ ⇒ ψσ is valid then is a calculation step.Here x is a fresh variable.We write → R for → ru ∪ → ca and the rewrite relation ∼ → R on constrained terms is defined as Positions in connection with ∼ → R steps always refer to the underlying steps in → R .We give an example of constrained rewriting.
Example 5. Consider again the LCTRS R of Example 1.We have The first step is a calculation step.The second step is a rule step using the rule max(x, y) is trivial if sσ = tσ for every substitution σ with σ ϕ.2A left-linear LCTRS having only trivial critical pairs is called weakly orthogonal.A left-linear TRS without critical pairs is called orthogonal.
The following result is from [8].
Since the conjunction of any two constraints is unsatisfiable, R lacks critical pairs.Hence R is confluent by Theorem 1.
The following result is proved in [12] and forms the basis of completion of LCTRSs.
In combination with Newman's Lemma, the following confluence criterion is obtained.

Corollary 1. A terminating LCTRS is confluent if all critical pairs are joinable.
This is less obvious than it seems.Joinability of a critical pair s ≈ t [ϕ] cannot simply be defined as s as the following example shows.
Example 7. Consider the terminating LCTRS R consisting of the rewrite rules The single critical pair h(g(x, 1 + 1)) ≈ h(g(y, 1 + 1)) should not be joinable because R is not confluent, but we do have due to the equivalence relation ∼ on constrained terms; since x and y do not appear in the constraints, there is no demand that they must be instantiated with values.
The solution is not to treat the two sides of a critical pair in isolation but define joinability based on rewriting constrained term pairs.So we view the symbol ≈ in a constrained equation s ≈ t [ϕ] as a binary constructor symbol such that the constrained equation can be viewed as a constrained term.Steps in s take place at positions 1 whereas steps in t use positions 2. The same is done in completion of LCTRSs [12].
We revisit Example 7.
Example 8.For the critical pair in Example 7 we obtain The converse of Corollary 1 also holds, but note that in contrast to TRSs, joinability of critical pairs is not a decidable criterion for terminating LCTRSs, due to the undecidable triviality condition.Moreover, for the converse to hold, it is essental that critical pairs contain the trivial equations ψ in Definition 2.
Example 9. Consider the LCTRS R consisting of the rules which admits the critical pair g(y ) .This critical pair is joinable as y and y ′ are restricted to values and thus both sides rewrite to a using the second rule.
As R is also terminating, it is confluent by Corollary 1.If we were to drop ψ in Definition 2, we would obtain the non-joinable critial pair g(y) ≈ g(y ′ ) instead and wrongly conclude non-confluence.

Main Results
We start with extending a confluence result of Huet [4] for linear TRSs.Below we write → p to indicate that the position of the contracted redex in the step is below position p.
A binary relation → on terms is strongly confluent if t → * • = ← u for all terms s, t and u with t ← s → u. (By symmetry, also t → = • * ← u is required.)Strong confluence is a well-known sufficient condition for confluence.Huet [4] proved that linear TRSs are strongly confluent if all critical pairs are strongly closed.Below we extend this result to LCTRSs, using the above definition of strongly closed constrained critical pairs.Theorem 2. A linear LCTRS is strongly confluent if all its critical pairs are strongly closed.
We give full proof details in order to illustrate the complications caused by constrained rewrite rules.The following result from [12] plays an important role.
⊓ ⊔ Proof (of Theorem 2).Consider an arbitrary local peak We may assume that ρ 1 and ρ 2 have no variables in common, and consequently Dom(σ 1 ) ∩ Dom(σ 2 ) = ∅.We have Hence both t → * • = ← u and t → = • * ← u.If p 1 and p 2 are not parallel then p 1 p 2 or p 2 < p 1 .Without loss of generality, we consider p 1 p 2 .Let q = p 2 \p 1 .We do a case analysis on whether or not q ∈ Pos F (ℓ 1 ).
The second main result is the extension of Huet's parallel closedness condition on critical pairs in left-linear TRSs [4] to LCTRSs.To this end, we first define parallel rewriting for LCTRSs.Definition 7. Let R be an LCTRS.The relation − → R is defined on terms inductively as follows: We write − → p to indicate that all positions of contracted redexes in the parallel step are below p.In the next definition we add constraints to parallel rewriting.Definition 8. Let R be an LCTRS.The relation − → R is defined on constrained terms inductively as follows: Here we assume that different applications to case 4 result in different fresh variables.The constraint ψ in case 2 collects the assignments introduced in earlier applications of case 4. (If there are none, ψ = true is omitted.)The same holds for ψ 1 , . . ., ψ n .We write In light of the earlier developments, the following definition is the obvious adaptation of parallel closedness for LCTRSs.
Note that the right-hand side t of the constrained equation s ≈ t [ϕ] may change due to the equivalence relation ∼, cf. the statement of Lemma 2. Theorem 3. A left-linear LCTRS is confluent if its critical pairs are parallel closed.
To prove this result, we adapted the formalized proof presented in [10] to the constrained setting.The required changes are very similar to the ones in the proof of Theorem 2.
Example 11.Consider the LCTRS R with rules The single critical pair h(g(a, and the obtained equation is trivial.Hence R is confluent by Theorem 3. Note that the earlier confluence criteria do no apply.
We also consider the extension of Huet's result by Toyama [11], which has a less restricted joinability condition on critical pairs stemming from overlapping rules at the root position.Such critical pairs are called overlays whereas critical pairs originating from overlaps ρ 1 , p, ρ 2 with p > ǫ are called inner critical pairs.Definition 10.An LCTRS R is almost parallel-closed if every inner critical pair is parallel closed and every overlay s ≈ t [ϕ] satisfies for some trivial u ≈ v [ψ ].Again, the formalized proof of the corresponding result for plain TRSs in [10] can be adapted to the constrained setting.
Example 12. Consider the following variation of the LCTRS R in Example 11: The overlay g(b, 2) ≈ g(a, y + y) [x ≥ y ∧ y ≥ x ∧ y = 1] is not parallel closed but one readily confirms that the condition in Definition 10 applies.

Automation
As it is very inconvenient and tedious to test by hand if an LCTRS satisfies one of the confluence criteria presented in the preceding sections, we provide an implementation.The natural choice would be to extend the existing tool Ctrl [9] because it is currently the only tool capable of analyzing confluence of LCTRSs.However, Ctrl is not actively maintained and not very well documented, so we decided to develop a new tool for the analysis of LCTRSs.Our tool is called crest (constrained rewriting software).It is written in Haskell, based on the Haskell term-rewriting3 library and allows the logics QF_LIA, QF_NIA, QF_LRA.
The input format of crest is described on its website. 4After parsing the input, crest checks that the resulting LCTRS is well-typed.Missing sort information is inferred.Next it is checked concurrently whether one of the implemented confluence criteria applies.crest supports (weak) orthogonality, strong closedness and (almost) parallel closedness.The tool outputs the computed critical pairs and a "proof" describing how these are closed, based on the first criterion that reports a YES result.Below we describe some of the challenges that one faces when automating the confluence criteria presented in the preceding sections.
First of all, how can we determine whether a constrained critical pair or more generally a constrained equation s ≈ t [ϕ] is trivial?The following result explains how this can be solved by an SMT solver.Definition 11.Given a constrained equation s ≈ t [ϕ], the formula T (s, t, ϕ) is inductively defined as follows: Proof.First suppose ϕ =⇒ T (s, t, ϕ) is valid.Let σ be a substitution with σ ϕ.Since σ(x) ∈ Val for all x ∈ Var(ϕ), we can apply σ to the formula ϕ =⇒ T (s, t, ϕ).We obtain [[ϕσ]] = ⊤ from σ ϕ.Hence also [[T (s, t, ϕ)σ]] = ⊤.Since T (s, t, ϕ) is a conjunction, the final case in the definition of T (s, t, ϕ) is not used.Hence Pos(s) = Pos(t), s(p) = t(p) for all internal positions p in s and t, and s| p σ = t| p σ for all leaf positions p in s and t.Consequently, sσ = tσ.This concludes the triviality proof of s ≈ t [ϕ].
For the only if direction, suppose s ≈ t [ϕ] is trivial.Note that the variables appearing in the formula ϕ =⇒ T (s, t, ϕ) are those of ϕ.Let σ be an arbitrary assignment such that [[ϕσ]] = ⊤.We need to show [[T (s, t, ϕ)σ]] = ⊤.We can view σ as a substitution with σ(x) ∈ Val for all x ∈ Var(ϕ).We have σ ϕ and thus sσ = tσ by the triviality of s ≈ t [ϕ].Hence T (s, t, ϕ) is a conjunction of equations between values and variables in ϕ, which are turned into identities by σ.Hence [[T (s, t, ϕ)σ]] = ⊤ as desired.

⊓ ⊔
The second challenge is how to implement rewriting on constrained equations in particular, how to deal with the equivalence relation ∼ defined in Definition 3.
over the integers admits two critical pairs: The first one is trivial, but to join the second one, an initial equivalence step is required: The transformation introduced below avoids having to look for an initial equivalence step before a rule becomes applicable.Definition 12. Let R be an LCTRS.Given a term t ∈ T (F , V), we replace values in t by fresh variables and return the modified term together with the constraint that collects the bindings: Applying the transformation tf to the left-hand sides of the rules in R produces Example 14. Applying the transformation tf to the LCTRS R of Example 13 produces the rules The critical pair g(z) ≈ a [z = 3] can now be joined by an application of the modified third rule.Note that the modified rule does not overlap with the second rule because z may not be instantiated with f(x).Hence the modified LCTRS tf(R) is strongly closed and, because it is linear, also confluent.
In the following we show the correctness of the transformation.In particular we prove that the initial rewrite relation is preserved.
For the other direction consider The difference between ℓ ′ and its originating lefthand side ℓ in R is that value positions in ℓ are occupied by fresh variables in ℓ ′ .Because σ ′ respects ϕ ′ = ϕ ∧ ψ, σ ′ substitutes the required values at these positions in ℓ.As σ ℓ ′ → r ′ [ϕ ′ ], there exists a rule ℓ → r [ϕ] which is respected by σ and thus s As the transformation is used in the implementation and rewriting on constrained terms plays a key role, the following result is needed.The proof is similar to the first half of the proof of Lemma 4 and omitted.

Experimental Results
In order to evaluate our tool we performed some experiments.As there is no official database of interesting confluence problems for LCTRSs, we collected We have tested the implementation with 3 well-known SMT solvers: Z3, Yices and CVC5.Among those Z3 gives the best performance regarding time and the handling of non-linear arithmetic.Hence we use Z3 as the default SMT solver in our implementation.In Table 1 we list some interesting systems from this paper and the relevant literature.Full details are available from the website of crest.We choose 5 as the maximum number of steps in the → * parts of the strongly closed and almost parallel closed criteria.From Table 2 the relative power of each implemented confluence criterion on our benchmark can be inferred, i.e., it depicts how many of the 127 problems both methods can prove confluent.This illustrates that the relative applicability in theory (e.g., weakly orthogonal LCTRSs are parallel closed), is preserved in our implementation.We conclude this section with an interesting observation discovered by crest when testing [12,Example 23].
We also tested the applicability of Corollary 1, using the tool Ctrl as a black box for proving termination.Of the 127 problems, Ctrl claims 102 to be terminating and 67 of those can be shown locally confluent by crest, where we limit the number of steps in the joining sequence to 100.It is interesting to note that all of these problems are orthogonal, and so proving termination and finding a joining sequence is not necessary to conclude confluence, on the current set of problems.Of the remaining 35 problems, crest can show confluence of 5 of these by almost parallel closedness.
Example 15.The LCTRS R is obtained by completing a system consisting of four constrained equations: Calling crest on R results in a timeout.As a matter of fact, the LCTRS is not confluent because the critical pair between rules 5 and 6 is not joinable.Inspecting the steps in [12, Example 23] reveals some incorrect applications of the inference rules of constrained completion, which causes rule 6 to be wrong.Replacing it with the correct rule causes crest to report confluence by strong closedness.

Concluding Remarks
In this paper we presented new confluence criteria for LCTRSs as well as a new tool in which these criteria have been implemented.We clarified the subtleties that arise when analyzing joinability of critical pairs in LCTRSs and reported experimental results.For plain rewrite systems many more confluence criteria are known and implemented in powerful tools that compete in the yearly Confluence Competition (CoCo). 5In the near future we will investigate which of these can be lifted to LCTRSs.We will also advance the creation of a competition category on confluence of LCTRSs in CoCo.
Our tool crest has currently no support for termination.Implementing termination techniques in crest is of clear interest.The starting point here are the methods reported in [6,7,12].Many LCTRSs coming from applications are actually non-confluent. 6So developing more powerful techniques for LCTRSs is on our agenda as well.
Acknowledgments.We thank Fabian Mitterwallner for valuable discussions on the presented topics and our Haskell implementation.The detailed comments by the reviewers improved the presentation.Cynthia Kop and Deivid Vale kindly provided us with instructions and a working implementation of Ctrl.
A Proof of Theorems 3 and 4.
Since Theorem 3 is a special case of Theorem 4, we prove the latter.Our proof is based on the proof that has been formalized in Isabelle/HOL for plain TRSs reported in [10].The following definitions and results from [10] are needed in the proof.
Recall that a context is a term with exactly one hole ( ).A multihole context is a term with an arbitrary number of holes.We write C[t 1 , . . ., t n ] for filling the n holes present in the multihole context C from left to right with the terms t 1 , . . ., t n .In order to save space we abbreviate a 1 , . . ., a n to a.It is easy to show that s − → t if and only if s − → C | s t for some multihole context C and terms s.In order to measure the overlap between two parallel steps starting at the same term, the overlapping redexes are collected in a multiset.Definition 14 ([10, Definition 5]).The overlap between two co-initial parallel rewrite steps is defined by the following equations - -The overlap is symmetric: The following technical lemma is needed in the third case of the proof of Theorem 4.
Proof.The statements are obtained by repeated applications of Lemma 2. The key observation, which follows from the proof of [12,Lemma 8], is that positions are preserved when lifting rewrite steps on constrained terms to the unconstrained setting.

⊓ ⊔
The lemma above also holds for rewrite sequences s Proof (of Theorem 4).Consider an arbitrary peak using rewrite rules from R ∪ R ca .We show t − → • * ← − u and t − → * • ← − u by well-founded induction on the amount of overlap between the co-initial parallel steps using the order ⊲ mul and continue with a second induction on the term s using ⊲.If s = x ∈ V then t = u = x.Suppose s = f (s 1 , . . ., s n ).We consider the following four cases.
and thus The inner induction hypothesis yields terms v 1 , . . ., v n , w 1 , . . ., w n such that 2. If C = D = then both steps are root steps and thus single rewrite steps.

Example 10 .
p1 .Since rewriting is closed under contexts, we obtain u → * • = ← t and u → = • * ← t.This completes the proof.⊓ ⊔ Consider the LCTRS R of Example 1 and its critical pairs in Example 4. The critical pair x ≈ max(y, x) [x ≥ y ]
we obtain partitions a 1 , . . ., a n = a and b 1 , . . ., b n = b of a and b with ti Ci | ai ← − s i − → Di | bi u i for all 1 i n.The amount of overlap for each argument position is contained in the amount of overlap of the initial peak according to Lemma 6:

Table 1 .
Specific experimental results.

Table 2 .
Comparison between confluence criteria implemented in crest.The problem files in the latter that contain an equivalence problem of two functions for rewriting induction were split into two separate files.The experiments were performed on an AMD Ryzen 7 PRO 4750U CPU with a base clock speed of 1.7 GHz, 8 cores and 32 GB of RAM.The full set of benchmarks consists of 127 problems of which crest can prove 90 confluent, 11 result in MAYBE and 26 in a timeout.With a timeout of 5 seconds crest needs 141.09 seconds to analyze the set of benchmarks.
several LCTRSs from the literature and the repository of Ctrl.