Certified Equational Reasoning via Ordered Completion

On the one hand, equational reasoning is a fundamental part of automated theorem proving with ordered completion as a key technique. On the other hand, the complexity of corresponding, often highly optimized, automated reasoning tools makes implementations inherently error-prone. As a remedy, we provide a formally verified certifier for ordered completion based techniques. This certifier is code generated from an accompanying Isabelle/HOL formalization of ordered rewriting and ordered completion incorporating an advanced ground joinability criterion. It allows us to rigorously validate generated proof certificates from several domains: ordered completion, satisfiability in equational logic, and confluence of conditional term rewriting.


Introduction
Equational reasoning constitutes a main area of automated theorem proving in which completion has evolved as a fundamental technique [8]. Completion aims to transform a given set of equations into a terminating and confluent rewrite system that induces the same equational theory. Thus, on success, such a rewrite system can be used to decide equivalence of terms with respect to the initial set of equations. The original completion procedure may fail due to unorientable equations. As a remedy to this problem, ordered completionalso known as unfailing completion-was developed [3]. As the name suggests, unfailing completion always yields a result (which may however be infinite and thus take infinitely many inference steps to compute). This time, the result is an ordered rewrite system (given by a ground total reduction order, a set of rules which are oriented with respect to this order, and a set of equations) that is still terminating, but in general only ground confluent (that is, confluent on ground terms). Thus, the resulting system can be used to decide equivalence of ground terms with respect to the initial set of equations. This suffices for many practical purposes: A well-known success story of ordered completion is the This work is supported by Austrian Science Fund (FWF) projects T789 and P27502.
solution of the long-standing Robbins conjecture [10], followed by applications to other problems from (Boolean) algebra [11]. More recent applications include the use of ordered completion in algebraic data integration [14] and in confluence proofs of conditional term rewrite systems [20].
As an introductory example, let us illustrate ordered completion on the following set of equations describing a group where all elements are self-inverse: Using ordered completion, the tool MaedMax [24] transforms it into the following rules (→) and equations (≈), together with a suitable ground total reduction order > that orients all rules from left to right.
This ordered rewrite system can be used to decide a given equation between ground terms, by checking whether the unique normal forms (with respect to ordered rewriting using >) of both terms coincide.
Automated reasoning tools are highly sophisticated pieces of software, not only because they implement complex calculi, but also due to their high degree optimization. Consequently, their implementation is inherently error-prone.
To improve their trustability we follow a two-staged certification approach and (1) add the relevant concepts and results regarding ordered completion to a formal library using the proof assistant Isabelle/HOL [12], and from there (2) code generate [5] a trusted certifier that is correct by construction. Our formalization strengthens the originally proposed procedure [3] by using a relaxed version of the inference system, while incorporating a stronger ground joinability criterion [9]. Our certifier allows us to rigorously validate generated proof certificates from several domains: ordered completion, satisfiability in equational logic, and confluence of conditional term rewriting.
More specifically, our contributions are as follows: • We extend the existing Isabelle Formalization of Rewriting 1 (IsaFoR for short) by ordered rewriting and a generalization of the ordered completion calculus oKB [3], and prove the latter correct for finite completion runs with respect to ground total reduction orders (Section 3). • We establish ground totality of the Knuth-Bendix order and the lexicographic path order in IsaFoR (Section 3). • We formalize two criteria for ground joinability [3,9] known from the literature, that allow us to apply our previous results to concrete completion runs (Section 4). In fact, we present a slightly more powerful version of the latter, and fix an error in its proof, as described below.
• We apply ordered completion to satisfiability in equational logic and infeasibility of conditions in conditional rewriting (Section 5). • We extend the XML-based certification problem format (CPF for short) [17] by certificates for ordered completion and formalize corresponding executable check functions that verify the supplied derivations (Section 6). • Finally, we extend the completion tool MaedMax [24], as well as the confluence tool ConCon [20] by certificate generation and evaluate our approach on existing benchmarks (Section 7).
As a result, CeTA (the certifier accompanying IsaFoR) can now certify (a) ordered completion proofs and (b) satisfiability proofs of equational logic produced by the tool MaedMax, as well as (c) conditional confluence proofs by ConCon where infeasibility of critical pairs is established via equational logic. To the best of our knowledge, CeTA constitutes the first proof checker in all of these domains.
In the remainder we provide hyperlinks (marked by ) to an HTML rendering of our formalization.
This work is an extension of an earlier workshop paper [19]. Further note that the IsaFoR formalization of the results in this paper is, apart from very basic results on (ordered) rewriting, entirely disjoint from our previous formalization together with Hirokawa and Middeldorp [6]. On the one hand, we consider a relaxed completion inference system where more inferences are allowed. This is possible since we are only interested in finite completion runs. On the other hand, we employ a stronger ground joinability criterion. Another major difference is that our new formalization enables actual certification of ordered completion based techniques, which is not the case for our work with Hirokawa and Middeldorp.

Preliminaries
In the sequel, we use standard notation from term rewriting [2]. Let T (F, V) denote the set of all terms over a signature F and an infinite set of variables V, and T (F) the set of all ground terms over F (that is, terms without variables). A substitution σ is a mapping from variables to terms. As usual, we write tσ for the application of σ to the term t. A variable permutation (or renaming) π is a bijective substitution such that π(x) ∈ V for all x ∈ V. Given an equational system (ES) E, we write E ↔ to denote its symmetric closure E ∪ {t ≈ s | s ≈ t ∈ E}. A reduction order is a proper and well-founded order on terms which is closed under contexts and substitutions. It is F-ground total if it is total on T (F). In the remainder we often focus on the Knuth-Bendix order (KBO), written > kbo , and the lexicographic path order (LPO), written > lpo . Given a reduction order > and an ES E, the term rewrite system (TRS) E > consists of all rules sσ → tσ such that s ≈ t ∈ E ↔ and sσ > tσ.
Given a reduction order >, an extended overlap consists of two variable-disjoint variants 1 ≈ r 1 and 2 ≈ r 2 of equations in E ↔ such that p ∈ Pos F ( 2 ) and 1 and 2 | p are unifiable with most general unifier µ. An extended overlap which in addition satisfies r 1 µ > 1 µ and r 2 µ > 2 µ gives rise to the extended critical pair equations in E. A relation on terms is (ground) complete, if it is terminating and confluent (on ground terms). A TRS R is (ground) complete whenever the induced rewrite relation → R is. Finally, we say that a TRS R is a presentation of an ES E, whenever ↔ * E = ↔ * R (that is, their equational theories coincide). A substitution σ is grounding for a term t if σ(x) ∈ T (F) for all x ∈ Var(t). Two terms s and t are called ground joinable over a rewrite system R, denoted s ↓ g R t if sσ ↓ R tσ for all substitutions σ that are grounding for s and t.
For any complete rewrite relation →, we denote the (necessarily unique) normal form of a term t (that is, the term u such that we have t → * u but u → v for all terms v) by t↓. By an ordered rewrite system we mean a pair (E, R), consisting of an ES E and a TRS R, together with a reduction order >. Then, ordered rewriting is rewriting with respect to the TRS R ∪ E > . Note that ordered rewriting is always terminating if R ⊆ >. Take commutativity x * y ≈ y * x for example, which causes nontermination when used as a rule in a TRS. Nevertheless, the ordered rewrite system ({x * y ≈ y * x }, ∅) together with KBO, say with precedence * > a > b, is terminating and we can for example rewrite a * b to b * a since applying the substitution {x → a, y → b} to the commutativity equation results in a KBO-oriented instance.

Formalized Ordered Completion
Ordered completion is commonly presented as a set of inference rules, parameterized by a fixed reduction order >. This way of presentation conveniently leaves a lot of freedom to implementations. We use the following inference system, with some differences to the original formulation [3] that we discuss below.
Definition 1 (Ordered Completion ). The inference system oKB of ordered completion operates on pairs (E, R) of equations E and rules R over a common signature F. It consists of the following inference rules, where S abbreviates R ∪ E > and π is a renaming.
is obtained from (E, R) by employing one of the above inference rules. A finite sequence of inference steps is called a run. Definition 1 differs from the original formulation of ordered completion [3] (as well as the formulation in our previous work together with Hirokawa and Middeldorp [6]) in two ways. First, collapse and simplify do not have an encompassment condition. 2 This omission is possible since we only consider finite runs. Second, we allow variants of rules and equations to be added. This relaxation tremendously simplifies certificate generation in tools, where facts are renamed upon generation to avoid the maintenance and processing of many renamed versions of the same equation or rule. Also note that the deduce rule admits the addition of equations that originate from arbitrary peaks. In practice, tools usually limit its application to extended critical pairs. The following two results establish that the rules resulting from a finite oKB run are oriented by the reduction order > and that the induced equational theories before and after completion coincide.
If the employed reduction order is F-ground total then the above two results imply the following conversion equivalence involving ordered rewriting with respect to the final system.
This result is a key ingredient to our correctness results in Section 4. In order to apply it, however, we need ground total reduction orders. To this end, we formalized the following two results in IsaFoR.

Lemma 4 ( ).
If > is a total precedence on F then > kbo is F-ground total.
Lemma 5 ( ). If > is a total precedence on F then > lpo is F-ground total.
In addition, we proved that for any given KBO > kbo (LPO > lpo ) defined over a total precedence > there exists a minimal constant, that is, a constant c such that t kbo c (t lpo c) holds for all t ∈ T (F) (which will be needed in Section 4). In earlier work by Becker et al. [4] ground totality of a lambda-free higher-order variant of KBO is formalized in Isabelle/HOL. However, for our purposes it makes sense to work with the definition of KBO that is already widely used in IsaFoR.
By Lemma 3, any two ground terms convertible in the initial equational theory are convertible with respect to ordered rewriting in the system obtained from an oKB run. The remaining key issue is to decide when the current ordered rewrite system is ground confluent, such that a tool implementing oKB can stop. Instead of defining a fairness criterion as done by Bachmair et al. [3], we use the following criterion for correctness involving ground joinability.
E> then E is ground confluent with respect to >. Note that the symmetry condition on E above is just a convenient way to express the split of E into rewrite rules with fixed orientation, and equations applicable in both directions, which allows us to treat an ordered rewrite system as a single set of equations. Lemmas 3 and 6 combine to the following correctness result.
is ground complete and ↔ * E0 = ↔ * S holds for conversions between terms in T (F). Before we can apply this result in order to obtain ground completeness we need to be able to discharge its ground joinability assumption on extended critical pairs. This is the topic of the next section.

Formalized Ground Joinability Criteria
In general, ground joinability is undecidable even for terminating rewrite systems [7]. Below, we formalize two sufficient criteria.

A Simple Criterion
We start with the criterion that Bachmair et al. [3] proposed when they introduced ordered completion.
Lemma 7 ( ). Suppose > is a ground total reduction order over F with a minimal constant. Then, E > is F-ground complete whenever for all A minimal constant c is needed to turn arbitrary ordered rewrite steps into ordered rewrite steps over T (F): when performing an ordered rewrite step using an equation u ≈ v with V = Var(v) \ Var(u) = ∅, a step over T (F) is obtained by instantiating all variables in V to c. We illustrate the criterion on an example. Example 1. The following equational system E 0 is derived by ConCon while checking infeasibility of a critical pair of the conditional rewrite system Cops #361: In an ordered completion run, MaedMax transforms E 0 into the following rules R and equations E: Ground confluence of this system can be established by means of Lemma 7. For example, the extended overlap between the first two equations gives rise to the extended critical pair 0, y ≈ s(x ), y , which is just an instance of the second equation (and similarly for the other extended critical pairs).

Ground Joinability via Order Closures
The criterion discussed in Subsection 4.1 is rather weak. For instance, it cannot handle associativity and commutativity, as illustrated next [9, Example 1.1].
Example 2. Consider the system E consisting of the three equations and the reduction order > kbo with w 0 = 1 and w( * ) = 0. The first equation can be oriented from left to right, whereas the other ones are unorientable. We obtain the following extended critical peak from equations (2) and (1): The resulting extended critical pair is neither an instance of an equation in E nor joinable. Thus the criterion of Lemma 7 does not apply. However, this extended critical pair is ground joinable, which we show in the following. The reduction order > kbo is contained in an F -ground total one on any extension of the signature F ⊇ F (using the well-order theorem and incrementality of KBO). Thus, for any grounding substitution σ the terms x σ, yσ, and z σ are totally ordered. Suppose for instance that x σ > z σ > yσ. Then there is an ordered rewrite sequence witnessing joinability: If, on the other hand, x σ = yσ > z σ holds, there is a joining sequence as well: By ensuring the existence of a joining sequence for all possible relationships between x σ, yσ, and z σ, ground joinability can be established. Using this approach to show that all extended critical pairs are ground joinable, it can be verified that E is in fact ground complete.
The ground joinability test by Martin and Nipkow [9] is based on the idea illustrated in Example 2 above: perform a case analysis by considering ordered rewriting using all extensions of > to instantiations of variables. Below, we give the corresponding formal definitions used in IsaFoR. For any relation R on terms, let σ(R) denote the relation such that sσ σ(R) tσ holds if and only if s R t.
Definition 2 ( ). A closure C is a mapping between relations on terms that satisfies the following properties: (1) If s C(R) t then sσ C(σ(R)) tσ, for all relations R, substitutions σ, and terms s and t.
(2) If R ⊆ R then C(R) ⊆ C(R ), for all relations on terms R and R .
The closure C is compatible with a relation on terms R if C(R) ⊆ R holds.
In the remainder of this section we assume F to be the signature of the input problem, we consider an F-ground total reduction order > as well as a closure C that is compatible with >. Furthermore, we assume for every finite set of variables V ⊆ V and every equivalence relation ≡ on V a representation function rep ≡ such that for any Definition 3 ( ). Given an ES E and a reduction order >, terms s and t are C-joinable, written s ↓ C E t, if for all equivalence relations ≡ on Var(s, t) and every order on the equivalence classes of ≡ it holds that Example 3. For instance, consider the terms s = z * (x * y) and t = x * (y * z ) from Example 2. One possible equivalence relation ≡ on Var(s, t) = {x , y, z } is given by the equivalence classes {x , y} and {z }; one possible order on these is≡(x ) ≡(z ) (corresponding to the second example for an order on the instantiations x σ and z σ in Example 2). By taking C to be the KBO closure (see Definition 5 below), we have x * z C( ) z * x and x * (z * x ) C( ) z * (x * x ). Using the ES E from Example 2 we thus obtain the ordered rewrite sequence Ground joinability follows from C-joinability. Since this is the key result for the ground joinability criterion of this subsection, we also sketch its proof.
Proof. We assume s ↓ C E t and consider a grounding substitution σ to show sσ ↓ E> tσ. There is some equivalence relation ≡ on Var(s, t) such that x ≡ y holds if and only if σ(x) = σ(y) for all x, y ∈ Var(s, t). Note that this implies sσ = s≡σ and tσ = t≡σ.
From Definition 2(1) we can show that u → E C( ) v implies uσ → E C(σ( )) vσ for all terms u and v. So using the assumption s ↓ C E t we can apply σ to a conversion of the form (1) to obtain Ordered rewriting is monotone with respect to the order, and hence C(σ( )) ⊆ > implies → E C(σ( )) ⊆ → E> . Thus (2) implies the existence of a conversion where the ↔ E> step exists as any two F-ground terms are comparable in >.
Note that the proof above uses the monotonicity assumption for closures (Definition 2(2)), which is not present in [9]. The following counterexample illustrates that monotonicity is indeed necessary.

Example 4. Consider the ES E = {f(x) ≈ a} and suppose that
and t = f(c). Any order as in Definition 3 is empty since Var(s, t) = ∅. As C is not required to be monotone, the relation C( ) may contain (f(b), a) and (f(c), a). Then s → E C( ) a and t → E C( ) a imply s ↓ C E t even though s ↓ g E> t does not hold. Below, we define an inductive predicate gj which is used to conclude ground joinability of a given equation.

Definition 4 ( ).
Given an ES E and a reduction order >, gj is defined inductively by the following rules: This test differs from the one due to Martin and Nipkow [9] by the two rewrite rules, which were added to allow for more efficient checks, as illustrated next.
together with a KBO that can orient the second equation (for instance, one can take as precedence g > f > c and let all function symbol weights as well as w 0 be 1). Then gj(f(x ), f(z )) holds by the step rule, gj(g(x , y), f(z )) follows by an application of rewrite left, and gj(g(x , y), g(z , w ))) by rewrite right. By Lemma 9 below it thus follows that the equation g(x , y) ≈ g(z , w ) is ground joinable. However, the criterion by Martin and Nipkow [9] lacks the rewrite steps. Hence ground joinability of g(x , y) ≈ g(z , w ) can only be established by applying the closure rule. This amounts to checking ground joinability with respect to 81 relations between the four variables. Since the number of variable relations is in general exponential, the criterion stated in Definition 4 can in practice be exponentially more efficient than the test by Martin and Nipkow [9].
Using Lemma 8 it is not hard to show the following correctness results.
E> then E is ground confluent with respect to >. This test can not only handle Example 2 but also the group theoretic problem from the introduction. Moreover, it subsumes Lemma 7 since whenever for some equation s ≈ t we have s ↓ g E> t by Lemma 7 then gj(s, t) holds.
Closures for Knuth-Bendix Orders. Definition 2 requires abstract properties on closures. In the following we define closures for KBO as used in IsaFoR/CeTA. Similar to the already existing definition of KBO in IsaFoR [16] we define the closure > R kbo as follows. Definition 5 ( ). Let R be a relation on terms, > a precedence on F, and (w, w 0 ) a weight function. The KBO closure > R kbo is a relation on terms inductively defined as follows: s > R kbo t if s R t, or |s| x |t| x for all x ∈ V and either (a) w(s) > w(t), or (b) w(s) = w(t) and one of (1) s ∈ V and t ∈ V, or (2) s = f (s 1 , . . . , s n ), t = g(t 1 , . . . , t m ) and f > g, or (3) s = f (s 1 , . . . , s n ), t = f (t 1 , . . . , t n ) and there is some i n such that s j = t j for all 1 j < i and s i > R kbo t i Note that even though Definition 5 resembles the usual definition of KBO, it defines a closure of a relation R in a KBO-like way rather than a reduction order. For instance, if x z , as in Example 3, then x * z > kbo z * x holds.
We prove that > R kbo is indeed a closure that is compatible with > kbo based on the same weight function and precedence.
Lemma 11. Let R be a relation on terms, > a precedence on F, and (w, w 0 ) a weight function. Then all of the following hold: (a) If s > kbo t then s > R kbo t for all terms s and t.
kbo tσ, for all substitutions σ, and terms s and t. (d) The closure > R kbo is compatible with > kbo .

Applications
Ground complete rewrite systems can be used to decide equivalence of ground terms with respect to their induced equational theory. Here we highlight applications of this decision problem.
Deciding Ground Equations. Suppose we obtain the ordered rewrite system (E, R) and the reduction order > by applying ordered completion to an initial set of equations E 0 . Then it is easy to decide whether two ground terms s and t are equivalent with respect to E 0 (that is, whether s ↔ * E0 t): it suffices to check if the (necessarily unique) normal forms of s and t with respect to R ∪ E > coincide. Also if all variables of a non-ground goal equation are universally quantified, the goal can be decided by substituting fresh constants for its variables.
Equations with Existential Variables. Also the case where all variables are existentially quantified can be reduced to the ground case using a trick already noted by Bachmair et al. [3].
Consider a set of equations E and a goal equation s ≈ t where all variables are existentially quantified. This corresponds to the question whether there is a substitution σ such that sσ ↔ * E tσ holds. We employ three fresh function symbols eq, true, and false, and define E eq s,t to denote E extended by the equations If a ground complete system equivalent to E eq s,t is found-for instance discovered by ordered completion-then it can be used to decide the goal, as stated next.
Lemma 12 ( ). Suppose s, t, and E are all over the signature F and let S be a ground complete TRS such that ↔ * E eq s,t ⊆ ↔ * S on T (F). If sσ ↔ * E tσ then true↓ S = false↓ S .
Proof. If sσ ↔ * E tσ then there is also a conversion sσ ↔ * E eq s,t tσ by construction of E eq s,t , and moreover (by appealing to an earlier formalization about signature extensions [18], we obtain that) there exists an F-grounding substitution τ such that sτ ↔ * E eq s,t tτ . So we have s,t false and by the assumed conversion inclusion an S-conversion between true and false. Now, by several applications of ground confluence of S we obtain joinability of true↓ S and false↓ S . However, both true↓ S and false↓ S are normal forms and thus they coincide.

Infeasibility of Conditions.
A decision procedure for ground equations can also be harnessed to prove infeasibility of conditions in conditional term rewriting. Here a condition c is a sequence of pairs of terms s 1 ≈ t 1 , . . . , s k ≈ t k and wesay that c is infeasible whenever there is no substitution such that s i σ → * R t i σ holds for all 1 i k. Now, it is obviously a sound overapproximation to ensure that there is no σ such that s i σ ↔ * R t i σ for all 1 i k. This suggests that completion methods might be applicable.
But there are still two complications before we are able to achieve an infeasibility check: (1) the rules of a conditional term rewrite system (CTRS for short) R may be guarded by conditions, making R an unsuitable input for ordered completion, and (2) the conditions c are most of the time not ground. As is conventional when adopting TRS methods to conditional rewriting, we solve (1) by dropping all conditions from the rules of R, resulting in the unconditional TRS R u whose rewrite relation overapproximates the one of R. Of course if we can establish that there is no σ such that s i σ → * Ru t i σ for all 1 i k, then we also obtain infeasibility of c with respect to the CTRS R. In order to solve (2) we use a fresh function symbol c and apply Lemma 12 to decide the equation s = c(s 1 , . . . , s k ) ≈ c(t 1 , . . . , t k ) = t by applying ordered completion to R u eq s,t . If s ↔ * Ru eq s,t t we can conclude infeasibility of c.
Checking for infeasibility is for example useful when analyzing the confluence of a conditional rewrite system, since whenever we encounter a conditional critical pair whose conditions are infeasible, we can ignore it entirely. Since 2019 the Confluence Competition (CoCo) 3 also features a dedicated infeasibility category.

Certification
In this section we describe the proof certificates for the different certifiable properties and summarize the corresponding Isabelle/HOL check functions.
Here, check functions are the formal connection between general, abstract results and concrete certificates. For example, a check function for a KBO termination proof takes a certificate, containing a concrete TRS, a specific precedence, and fixed weight functions, as input. It checks that the KBO instance is admissible and that all rules of the TRS are oriented from left to right. By appealing to the abstract result that compatibility of a TRS with an admissible KBO implies termination, it then concludes termination of the concrete instance.
In order to be usable in the certifier, a check function has to be executable and proven sound. The latter means that success of the check function implies a concrete instance of the corresponding general result (for our example this means that success proves termination of the TRS in the certificate). In case of failure it is customary for CeTA check functions to give a human readable error message that indicates why a certificate is rejected.

Ordered Completion Certificates
For ordered completion proofs, the certificate consists of • a set of initial equations E 0 , • an ordered completion result (E, R) together with a reduction order >, and • a sequence of inference steps according to Definition 1.
The corresponding check function verifies that (1) the inference steps form a valid run (E 0 π, ∅) * (E, R) for some renaming π, (2) all extended critical pairs are joinable, by default according to Lemma 10,and (3) the reduction order is admissible, in case of KBO.
Next, we illustrate such an ordered completion proof by an example.
Example 6. The certificate corresponding to Example 1 contains the equations E 0 , the resulting system (E, R), and the reduction order > kbo with precedence > > s > > true > − > ÷ > ·, · > 0, w 0 = 1, and w(0) = 2, w(÷) = w(true) = w(s) = 1, and all other symbols having weight 0. In addition, a sequence of inference steps explains how (E, R) is obtained from E 0 : The first collapse step using rule ( ) above illustrates our relaxed inference rule, it would not have been possible according to the original inference system [3] due to the encompassment condition since s(s(x )) > s(s(y)) · s(s(x )) > s(s(y)).
We briefly comment on the differences to the certification of standard Knuth-Bendix completion as already present in CeTA [16]. For standard completion, the certificate contains the initial set of equations E 0 , the resulting TRS R together with a termination proof, and stepwise E 0 -conversions from to r for each rule → r ∈ R. The certifier first checks the termination proof to guarantee termination of R. Then, confluence of R can be guaranteed by ensuring that all critical pairs are joinable. At this point it is easy to verify the inclusion ↔ * E0 ⊆ ↔ * R : for each equation s ≈ t ∈ E 0 the R-normal forms of s and t are computed and checked for syntactic equality. The converse inclusion ↔ * R ⊆ ↔ * E0 is taken care of by the provided E 0 -conversions. Overall, we obtain that R is a complete presentation of E 0 without mentioning a specific inference system. Unfortunately, the same approach does not work for ordered completion: The inclusion ↔ * E0 ⊆ ↔ * R∪E> cannot be established by rewriting equations in E 0 to normal form, since they may contain variables but R ∪ E > is only ground confluent. Moreover, since ground joinability is undecidable no complete check can be performed. Therefore, we instead ask for certificates that contain explicit inference steps, as described above.

Equational Satisfiability Certificates
Here we use the term "satisfiability" of unit equality problems in line with the terminology of TPTP [22]: given a set of input equations E 0 and a ground goal inequality s ≈ t, we want to show that this axiomatization is satisfiable. To this end, completion-based tools try to find a ground complete presentation S of E 0 and verify that s↓ S = t↓ S .
A certificate for this application extends an ordered completion certificate by the goal terms. The corresponding check function verifies that • the presented ordered completion proof is valid as described above, • the goal inequality is ground, • the signature of E 0 , E, and R is included in the signature of >, and • the terms in the goal have different normal forms.
We chose the symbols mentioned by the reduction order to be the considered signature F. In comparison to picking the signature of E 0 , this has the advantage that it is easy to add additional function symbols. Moreover, since KBO precedences in the CPF input are lists of function symbols, no additional checks are required to ensure F-ground totality of the constructed reduction order.
As a side note, unsatisfiability proofs are much easier to certify: a tool only needs to output a conversion between the two goal terms. Support for the corresponding certificates has already been added to CeTA earlier [21].

Infeasibility Certificates
Actually we check (generalized) nonreachability [15] of a target t from a source s with respect to a TRS R, that is, the property that, given a TRS R and two terms s and t, there is no substitution σ such that sσ → * R tσ. The corresponding certificates list function symbols eq, true, and false, together with an equational satisfiability certificate. The check function first constructs, using eq, true, and false from the certificate the TRS R eq s,t and then verifies that the equation true ≈ false is not satisfiable according to the supplied equational satisfiability certificate with R eq s,t as initial set of equations.

Experiments
Below we summarize experiments with our certifier on different problem sets. More details are available from the accompanying website. 4 Ordered Completion. Martin and Nipkow [9] give 10 examples where the criterion corresponding to Lemma 10 with KBO applies in 7 cases. Indeed MaedMax produces proofs for these 7 problems, 6 of which are certified by CeTA. The missing example uses a trick also used by Waldmeister [1]: certain redundant equations need not be considered for critical pair computation. This simplification is not yet supported by CeTA.
We also ran MaedMax on the 138 problems [13] for standard completion collected from the literature. Using KBO, MaedMax can complete 55 of them, and 52 of those are certified. (Using LPO and KBO, 91 are completed.) For the three remaining (AC) group examples, MaedMax uses a stronger criterion [23] which is currently not supported by CeTA. Overall, this amounts to 58% certification coverage of all ordered completion proofs by MaedMax.
Satisfiable Unit Equality Problems. There are 144 unit equality problems (UEQ) in the TPTP 7.2.0 [22] benchmark that are classified as satisfiable, of which MaedMax using KBO only can prove 11. All these proofs are certified by CeTA. With its general strategy MaedMax can handle 14 problems, but two of those require duplicating rules, such that KBO is not applicable, and one has multiple goals, which is currently not supported by CeTA.
Infeasibility Problems. There are 148 oriented CTRSs in version 807 of the Cops 5 benchmark (that is, the version of Cops where the highest problem number is 807) of CoCo. Here oriented means that a condition s ≈ t is satisfied by a substitution σ, whenever sσ → * R tσ. (This is the class of systems ConCon is specialized to, hence we restrict our experiments to the above 148 systems.) Out of those 148 CTRSs, the previous version of ConCon (1.7) can prove (non)confluence of 109 with and of 112 without certification. The new version of ConCon (1.8), extended by infeasibility checks via ordered completion with MaedMax, can handle 111 CTRSs with and 114 without certification. We thus obtain two new certified proofs, namely for Cops #340 and #361.

Conclusion
We presented our Isabelle/HOL formalization of ordered completion and two accompanying ground joinability criteria-now part of IsaFoR 2.36. It comes with check functions for ordered completion proofs, equational satisfiability proofs, and infeasibility proofs for conditional term rewriting. Formalizing soundness of these check functions allowed us to add support for corresponding certificates to the certifier CeTA that is code generated from IsaFoR. To the best of our knowledge, CeTA constitutes the first proof checker for ordered completion proofs. Indeed, it already helped us to detect a soundness error in MaedMax, where in certain corner cases some extended critical pairs were ignored. Our experiments show that we can certify 58% of ordered completion proofs (corresponding to 94% of the KBO proofs) and 85% of the satisfiability proofs produced by MaedMax (100% for KBO). The number of certified proofs of ConCon increased by two.
Moreover, CeTA is the only certifier used in the Confluence Competition; by certifying infeasibility proofs our work thus helps to validate more tool output. Regarding the recent CoCo 2019, certification currently covers roughly 83% of the benchmarks in the two categories (CTRS and TRS) that have certified counterparts (CPF-CTRS and CPF-TRS).
In the future, we plan to add support for closures of LPO and extend our certifier to verify proofs of pure, not necessarily unit, equality formulas, as well as ground confluence proofs by tools participating in the confluence competition.