Introduction
Term orders are a fundamental tool in termination analysis of term rewrite systems, and they also underlie completion-based automated theorem proving. Classical examples include the Knuth–Bendix order (KBO) [32 ] and the lexicographic path order (LPO) [33 ] , along with numerous variants and generalizations. Typically, these orders are used as so-called reduction orders > > > , which characterize termination of term rewrite systems R \mathcal{R} R by orientability ℓ > r \ell> r ℓ > r of all rules ℓ → r ∈ R \ell\to r \in\mathcal{R} ℓ → r ∈ R .
The semantic path order (SPO) was introduced by Kamin and Lévy alongside the LPO in their unpublished but celebrated note [33 ] . It generalizes the precedence of the LPO (used to compare function symbols) to relations on terms, thereby allowing semantic ingredients to be used in term comparison. Despite its expressive power for termination analysis, the SPO does not necessarily satisfy the monotonicity property required of reduction orders. Building on Geser’s work [21 , 22 ] , Borralleras, Ferreira, and Rubio [6 , 9 ] introduced a reduction-order version of the SPO dubbed the monotonic semantic path order (MSPO). Their work paved the way to automated termination analysis with the SPO [11 ] .
The motivation of this article lies in making the (M)SPO more effective in termination analysis and theorem proving. This raises the following three questions.
Key words and phrases: term rewriting, termination, weighted path order, semantic path order.
This research was supported by JSPS KAKENHI Grant Numbers JP22K11900 and JP25KJ1363.
Under what conditions is an MSPO ground total ? This property means that ground terms are totally ordered, and it is a standard requirement for the refutational completeness of theorem proving procedures, such as ordered completion [5 ] and superposition calculus [7 ] .
Can terms be compared by an MSPO efficiently ? This is also important for theorem proving, where term comparisons are performed frequently. For classical orders such as the KBO and the LPO, efficient comparison algorithms have been studied, for instance, in [37 , 38 ] .
Can MSPOs be formulated as reduction pairs (a more general form of reduction orders)? Such a formulation (based on pairs of quasi-orders and well-founded orders on terms) is needed for their effective use in termination proving based on the dependency pair method [AG00].
The technical key lies in the weighted path order (WPO) [57 ] , another generalization of the LPO and also the KBO. It combines a semantic comparison based on an interpretation (e.g., a polynomial interpretation [36 ] ) with a syntactic comparison based on a precedence. Regarding the three questions above, more is known about the WPO than about the MSPO. First, there is a reasonable sufficient condition for a WPO to be a ground-total reduction order. Second, the WPO admits a subclass with an efficient implementation, namely the KBO [37 ] . Third, WPOs have been formulated as reduction pairs [57 ] and used successfully in automated termination provers [56 Sch20] . In our previous work [43 ] , we showed that WPOs formulated as reduction orders can be represented as MSPOs. This connection suggests that the aforementioned features of the WPO might be transferred to the MSPO.
To this end, we introduce a generalization of the WPO dubbed the generalized weighted path order (GWPO). The definition shares the same recursion structure as the WPO, but the parameters of the WPO are generalized from an algebra and a precedence to reduction triples, which are basic ingredients of the MSPO [9 ] . By definition, the WPO and the (M)SPO are immediate special cases of the GWPO.
Using the GWPO, the issues of ground totality and efficiency are addressed as follows. As with the WPO, there is a reasonable sufficient condition for a GWPO to be a ground-total reduction order, and the GWPO admits an efficient subclass analogous to the KBO. These results can then be transferred to the MSPO by using a simulation result that every GWPO formulated as a reduction order can be represented as an MSPO. As a byproduct, this implies that the GWPO and the MSPO coincide as classes of reduction orders.
Following the WPO, we also formulate GWPOs as reduction pairs. In this formulation, WPOs and (M)SPOs again arise as immediate special cases. Interestingly, the aforementioned simulation result for reduction orders does not fully carry over to the reduction-pair setting, which implies that the GWPO is of independent interest. We also evaluate the resulting reduction pairs on standard benchmark problems for automated termination proving [50 ] .
This article is based largely on the first author’s PhD thesis [41 ] , and substantially extends our conference paper [43 ] . More precisely, the main result of the conference paper that WPOs are (M)SPOs is a special case of Theorem 3.33 , which states that GWPOs are SPOs. The other results are new with respect to the conference paper.
The remainder of the paper is organized as follows. Section 2 collects basic facts about orders, term rewriting, and interpretation methods. The next two sections are devoted to the main results of this article, and begin with a brief overview of their subsections. Section 3 is devoted to GWPOs as reduction orders, and § 4 to GWPOs as reduction pairs. The article concludes with § 5 , which discusses related and future work.
Preliminaries
Orders and Order Pairs
A strict order > > > on a set X X X is called a well-founded order if it is well-founded, i.e., there is no infinite descending sequence x 0 > x 1 > ⋯ x_0 > x_1 > \cdots x 0 > x 1 > ⋯ . A quasi-order ⪰ \succeq ⪰ on a set X X X is well-founded if its strict part is well-founded. For example, the standard strict order > N >_{\mathbb{N}} > N and quasi-order ⪰ N \succeq_{\mathbb{N}} ⪰ N on natural numbers N \mathbb{N} N are well-founded.
A pair ( ⪰ , > ) (\succeq, >) ( ⪰ , > ) of relations on the same set X X X is compatible if > ⋅ ⪰ ⊆ > > \mathbin{\cdot} \succeq\subseteq> > ⋅ ⪰⊆> and ⪰ ⋅ > ⊆ > \succeq\mathbin{\cdot} > \subseteq> ⪰ ⋅ >⊆> . Here R ⋅ S R \mathbin{\cdot} S R ⋅ S denotes the composition of R R R and S S S defined as { ( x , z ) ∣ ( x , y ) ∈ R and ( y , z ) ∈ S } \{(x,z) \mid(x,y) \in R \text{ and } (y,z) \in S\} {( x , z ) ∣ ( x , y ) ∈ R and ( y , z ) ∈ S } . The pair ( ⪰ , > ) (\succeq, >) ( ⪰ , > ) is an order pair if it is compatible, ⪰ \succeq ⪰ is a quasi-order and > > > is a strict order; it is well-founded if > > > is well-founded; and it is normal if > ⊆ ⪰ > \subseteq\succeq >⊆⪰ .1 For example, ( ⪰ N , > N ) (\succeq_{\mathbb{N}}, >_{\mathbb{N}}) ( ⪰ N , > N ) is a well-founded and normal order pair. We say that a relation R R R extends another relation S S S if S ⊆ R S \subseteq R S ⊆ R . Similarly, we say that an order pair ( ⪰ , > ) (\succeq, >) ( ⪰ , > ) extends another one ( ⪰ ′ , > ′ ) (\succeq', >') ( ⪰ ′ , > ′ ) on X X X if ⪰ \succeq ⪰ extends ⪰ ′ \succeq' ⪰ ′ and > > > extends > ′ >' > ′ . We call ( X × X , ∅ ) (X \times X, \varnothing) ( X × X , ∅ ) a trivial order pair.
Given a set X X X and a natural number n n n , we write X n X^n X n for the set of all tuples ( x 1 , … , x n ) (x_1, \ldots, x_n) ( x 1 , … , x n ) of length n n n consisting of elements of X X X . We also write X ∗ X^* X ∗ for the set of all tuples of arbitrary finite length over X X X . The elements of X ∗ X^* X ∗ are called lists . We recall the lexicographic extension , which extends an order pair to lists.
Definition 2.1. Let ( ⪰ , > ) (\succeq, >) ( ⪰ , > ) be a pair of relations on a set A A A . The lexicographic extension ( ⪰ l e x , > l e x ) (\succeq^{\mathrm{lex}}, >^{\mathrm{lex}}) ( ⪰ lex , > lex ) is a pair of relations on A ∗ A^* A ∗ defined recursively: ( a 1 , … , a m ) ⪰ l e x ( b 1 , … , b n ) (a_1,\ldots,a_m) \succeq^{\mathrm{lex}} (b_1,\ldots,b_n) ( a 1 , … , a m ) ⪰ lex ( b 1 , … , b n ) if one of the following cases holds.
n = 0 n = 0 n = 0
m , n > 0 m,n > 0 m , n > 0 and a 1 > b 1 a_1 > b_1 a 1 > b 1
m , n > 0 m,n > 0 m , n > 0 and a 1 ⪰ b 1 a_1 \succeq b_1 a 1 ⪰ b 1 , and moreover ( a 2 , … , a m ) ⪰ l e x ( b 2 , … , b n ) (a_2,\ldots,a_m) \succeq^{\mathrm{lex}} (b_2,\ldots,b_n) ( a 2 , … , a m ) ⪰ lex ( b 2 , … , b n )
Similarly, ( a 1 , … , a m ) > l e x ( b 1 , … , b n ) (a_1,\ldots,a_m) >^{\mathrm{lex}} (b_1,\ldots,b_n) ( a 1 , … , a m ) > lex ( b 1 , … , b n ) if one of the following cases holds.
m > 0 m > 0 m > 0 and n = 0 n = 0 n = 0
m , n > 0 m,n > 0 m , n > 0 and a 1 > b 1 a_1 > b_1 a 1 > b 1
m , n > 0 m,n > 0 m , n > 0 and a 1 ⪰ b 1 a_1 \succeq b_1 a 1 ⪰ b 1 , and moreover ( a 2 , … , a m ) > l e x ( b 2 , … , b n ) (a_2,\ldots,a_m) >^{\mathrm{lex}} (b_2,\ldots,b_n) ( a 2 , … , a m ) > lex ( b 2 , … , b n )
It is known that ( ⪰ l e x , > l e x ) (\succeq^{\mathrm{lex}}, >^{\mathrm{lex}}) ( ⪰ lex , > lex ) is an order pair on A ∗ A^* A ∗ if ( ⪰ , > ) (\succeq, >) ( ⪰ , > ) is. However, > l e x >^{\mathrm{lex}} > lex is not well-founded even if > > > is. This is witnessed by the lexicographic extension ( ⪰ l e x , > l e x ) (\succeq^{\mathrm{lex}}, >^{\mathrm{lex}}) ( ⪰ lex , > lex ) of ( ⪰ N , > N ) (\succeq_{\mathbb{N}}, >_{\mathbb{N}}) ( ⪰ N , > N ) , in which ( 1 ) > l e x ( 0 , 1 ) > l e x ( 0 , 0 , 1 ) > l e x ⋯ (1) >^{\mathrm{lex}} (0,1) >^{\mathrm{lex}} (0,0,1) >^{\mathrm{lex}} \cdots ( 1 ) > lex ( 0 , 1 ) > lex ( 0 , 0 , 1 ) > lex ⋯ holds. Well-foundedness is recovered by imposing a fixed length bound on A ∗ A^* A ∗ , see [47 Section 3] for a related discussion. Given a set A A A , we write A ≤ n A^{\leq n} A ≤ n for the union of A i A^i A i for all natural numbers i ≤ n i \leq n i ≤ n .
Proposition 2.2. If ( ⪰ , > ) (\succeq, >) ( ⪰ , > ) is a well-founded order pair, then the restriction of > l e x >^{\mathrm{lex}} > lex to A ≤ n A^{\leq n} A ≤ n for a natural number n ∈ N n \in\mathbb{N} n ∈ N is well-founded.
Quite often, for a single strict order > > > (rather than an order pair), we consider the strict part > l e x >^{\mathrm{lex}} > lex of the lexicographic extension of ( = , > ) (=,>) ( = , > ) , where = = = is the identity relation. In that case, we may simply call > l e x >^{\mathrm{lex}} > lex the lexicographic extension of > > > .
Term Rewriting
We begin with the definition of terms. A signature F \mathcal{F} F is a designated set of function symbols. Each function symbol is associated with a unique natural number called arity , which specifies the number of arguments of the function. When we need to indicate the arity n n n of a function symbol f f f , we write f ( n ) f^{(n)} f ( n ) for f f f . A function symbol f ( n ) f^{(n)} f ( n ) is called a constant if n = 0 n = 0 n = 0 , unary if n = 1 n = 1 n = 1 , and binary if n = 2 n = 2 n = 2 . Let V \mathcal{V} V be a designated countably infinite set of variables with F ∩ V = ∅ \mathcal{F} \cap\mathcal{V} = \varnothing F ∩ V = ∅ . The set T ( F , V ) \mathcal{T}(\mathcal{F},\mathcal{V}) T ( F , V ) of terms is defined inductively: every variable is a term, and f ( t 1 , … , t n ) f(t_1,\ldots,t_n) f ( t 1 , … , t n ) is a term if f ( n ) ∈ F f^{(n)} \in\mathcal{F} f ( n ) ∈ F and t 1 , … , t n t_1,\ldots,t_n t 1 , … , t n are terms. The set T ( F , V ) \mathcal{T}(\mathcal{F},\mathcal{V}) T ( F , V ) may be written as T \mathcal{T} T when F \mathcal{F} F and V \mathcal{V} V are clear from the context.
We define a few convenient notations for terms. For binary function symbols like + + + , we may use infix notation t 1 + t 2 t_1 + t_2 t 1 + t 2 to denote the term + ( t 1 , t 2 ) +(t_1,t_2) + ( t 1 , t 2 ) . For example, let F = { ⋅ ( 2 ) , S ( 0 ) , K ( 0 ) } \mathcal{F} = \{\cdot^{(2)}, S^{(0)}, K^{(0)}\} F = { ⋅ ( 2 ) , S ( 0 ) , K ( 0 ) } , and x , y ∈ V x,y \in\mathcal{V} x , y ∈ V . Then we have ( K ⋅ x ) ⋅ y ∈ T ( F , V ) (K \mathbin{\cdot} x) \mathbin{\cdot} y \in\mathcal{T}(\mathcal{F},\mathcal{V}) ( K ⋅ x ) ⋅ y ∈ T ( F , V ) . Also, we may use vector notation t = f ( t ⃗ ) t = f(\vec{t}) t = f ( t ) to indicate that t t t is a term headed by the function symbol f f f . In this case, f f f is the root symbol of t t t , denoted by root ( t ) \operatorname{root}(t) root ( t ) . For instance, ⋅ \cdot ⋅ is the root symbol of ( K ⋅ x ) ⋅ y (K \mathbin{\cdot} x) \mathbin{\cdot} y ( K ⋅ x ) ⋅ y . The set of all variables occurring in a term t t t is denoted by V ar ( t ) \mathcal{V}\operatorname{ar}(t) V ar ( t ) . The size ∣ t ∣ |t| ∣ t ∣ of a term t t t is the number of function symbols and variables occurring in t t t . For example, we have V ar ( t ) = { x , y } \mathcal{V}\operatorname{ar}(t) = \{x,y\} V ar ( t ) = { x , y } and ∣ t ∣ = 5 |t| = 5 ∣ t ∣ = 5 for t = ( K ⋅ x ) ⋅ y t = (K \mathbin{\cdot} x) \mathbin{\cdot} y t = ( K ⋅ x ) ⋅ y .
Let □ \square □ be a fresh constant with □ ∉ F \square\notin\mathcal{F} □ ∈ / F , which we call the hole . Contexts are terms over F ∪ { □ } \mathcal{F} \cup\{\square\} F ∪ { □ } that contain exactly one hole. The term resulting from replacing □ \square □ in a context C C C by a term t t t is denoted by C [ t ] C[t] C [ t ] . We write s ⪰ t s \succeq t s ⪰ t if there is a context C C C with s = C [ t ] s = C[t] s = C [ t ] . In such a case, t t t is a subterm of s s s . The strict part of ⪰ \succeq ⪰ is denoted by ▹ \triangleright ▹ . Similarly, s ▹ t s \triangleright t s ▹ t reads as t t t is a proper subterm of s s s . For example, the term ( K ⋅ x ) ⋅ y (K \mathbin{\cdot} x) \mathbin{\cdot} y ( K ⋅ x ) ⋅ y has four proper subterms, namely K ⋅ x K \mathbin{\cdot} x K ⋅ x , K K K , x x x , and y y y .
A substitution is a mapping σ \sigma σ from variables to terms such that { x ∈ V ∣ σ ( x ) ≠ x } \{x \in\mathcal{V} \mid\sigma(x) \ne x\} { x ∈ V ∣ σ ( x ) = x } is finite. The application t σ t\sigma t σ of a substitution σ \sigma σ to a term t t t is inductively defined as follows: t σ = σ ( t ) t\sigma= \sigma(t) t σ = σ ( t ) if t t t is a variable, and t σ = f ( t 1 σ , … , t n σ ) t\sigma= f(t_1\sigma,\ldots,t_n\sigma) t σ = f ( t 1 σ , … , t n σ ) if t = f ( t 1 , … , t n ) t = f(t_1,\ldots,t_n) t = f ( t 1 , … , t n ) . We write { x 1 ↦ t 1 , … , x k ↦ t k } \{x_1 \mapsto t_1,\ldots,x_k \mapsto t_k\} { x 1 ↦ t 1 , … , x k ↦ t k } for the substitution σ \sigma σ such that σ ( y ) = t i \sigma(y) = t_i σ ( y ) = t i if y = x i y = x_i y = x i for some i i i , and σ ( y ) = y \sigma(y) = y σ ( y ) = y otherwise. For example, ( ( K ⋅ x ) ⋅ y ) σ = ( K ⋅ K ) ⋅ K ((K \mathbin{\cdot} x) \mathbin{\cdot} y)\sigma= (K \mathbin{\cdot} K) \mathbin{\cdot} K (( K ⋅ x ) ⋅ y ) σ = ( K ⋅ K ) ⋅ K for σ = { x ↦ K , y ↦ K } \sigma= \{x \mapsto K,y \mapsto K\} σ = { x ↦ K , y ↦ K } .
A pair ( ℓ , r ) (\ell,r) ( ℓ , r ) of terms is said to be a rewrite rule if ℓ \ell ℓ is not a variable and every variable in r r r occurs in ℓ \ell ℓ . Rewrite rules ( ℓ , r ) (\ell,r) ( ℓ , r ) are written as ℓ → r \ell\to r ℓ → r . A set of rewrite rules is called a term rewrite system (TRS). A famous example of a TRS is combinatory logic, consisting of the rewrite rules ( ( S ⋅ x ) ⋅ y ) ⋅ z → ( x ⋅ z ) ⋅ ( y ⋅ z ) ((S \mathbin{\cdot} x) \mathbin{\cdot} y) \mathbin{\cdot} z \to(x \mathbin{\cdot} z) \mathbin{\cdot} (y \mathbin{\cdot} z) (( S ⋅ x ) ⋅ y ) ⋅ z → ( x ⋅ z ) ⋅ ( y ⋅ z ) and ( K ⋅ x ) ⋅ y → x (K \mathbin{\cdot} x) \mathbin{\cdot} y \to x ( K ⋅ x ) ⋅ y → x . Let R \mathcal{R} R be a TRS. The relation → R \to_{\mathcal{R}} → R is defined on terms as follows: s → R t s \to_{\mathcal{R}} t s → R t if there exist a rule ℓ → r ∈ R \ell\to r \in\mathcal{R} ℓ → r ∈ R , a context C C C , and a substitution σ \sigma σ such that s = C [ ℓ σ ] s = C[\ell\sigma] s = C [ ℓ σ ] and t = C [ r σ ] t = C[r\sigma] t = C [ r σ ] hold. When C = □ C = \square C = □ , it is written as s → ϵ R t s \mathrel{\overset{\epsilon}{\to}_{\mathcal{R}}} t s → ϵ R t . For instance, in the TRS R \mathcal{R} R of combinatory logic we have ( ( S ⋅ K ) ⋅ K ) ⋅ x → R ( K ⋅ x ) ⋅ ( K ⋅ x ) → R x ((S \mathbin{\cdot} K) \mathbin{\cdot} K) \mathbin{\cdot} x \mathrel{\to_{\mathcal{R}}} (K \mathbin{\cdot} x) \mathbin{\cdot} (K \mathbin{\cdot} x) \mathrel{\to_{\mathcal{R}}} x (( S ⋅ K ) ⋅ K ) ⋅ x → R ( K ⋅ x ) ⋅ ( K ⋅ x ) → R x .
Let → \to → be a relation on terms. We say that → \to → is closed under contexts or just monotone if C [ s ] → C [ t ] C[s] \to C[t] C [ s ] → C [ t ] holds whenever s → t s \to t s → t and C C C is a context; → \to → is closed under substitutions or just stable if σ → τ \sigma\to\tau σ → τ holds whenever s → t s \to t s → t and σ \sigma σ is a substitution; → \to → is a rewrite relation if it is stable and monotone; and ↔ \leftrightarrow ↔ has the subterm property if s → t s \to t s → t whenever s ▹ t s \triangleright t s ▹ t . For example, the relation → R \to_{\mathcal{R}} → R induced by a TRS R \mathcal{R} R is by definition closed under contexts and substitutions. We say that a pair ( ⪰ , ▹ ) (\succeq,\triangleright) ( ⪰ , ▹ ) of relations on terms is stable if ⪰ \succeq ⪰ and ▹ \triangleright ▹ are stable.
A term t t t is terminating with respect to a relation → \to → on terms if there is no infinite sequence t → t 1 → t 2 → ⋯ t \to t_1 \to t_2 \to\cdots t → t 1 → t 2 → ⋯ starting from t t t . Termination of the relation → \to → is defined as the absence of non-terminating terms. In other words, → \to → is well-founded if and only if it is terminating. A TRS R \mathcal{R} R is terminating iff → R \to_{\mathcal{R}} → R is. For example, the TRS consisting of ( ( S ⋅ x ) ⋅ y ) ⋅ z → ( x ⋅ z ) ⋅ ( y ⋅ z ) ((S \mathbin{\cdot} x) \mathbin{\cdot} y) \mathbin{\cdot} z \to(x \mathbin{\cdot} z) \mathbin{\cdot} (y \mathbin{\cdot} z) (( S ⋅ x ) ⋅ y ) ⋅ z → ( x ⋅ z ) ⋅ ( y ⋅ z ) and ( K ⋅ x ) ⋅ y → x (K \mathbin{\cdot} x) \mathbin{\cdot} y \to x ( K ⋅ x ) ⋅ y → x is non-terminating, see for example [4 ] . In contrast, the TRS consisting of only ( K ⋅ x ) ⋅ y → x (K \mathbin{\cdot} x) \mathbin{\cdot} y \to x ( K ⋅ x ) ⋅ y → x is terminating.
Termination of TRSs is often shown by orders. We say that a rewrite relation is a rewrite preorder or reduction order if it is a preorder or a well-founded order, respectively.
Proposition 2.3. A TRS R R R is terminating if R ⊆ > R \subseteq> R ⊆> for some reduction order > > > .
A powerful method for automated termination analysis is the dependency pair framework (to be explained in Subsection 4.1). Rather than reduction orders, this method uses reduction pairs , namely well-founded stable order pairs ( ⪰ , > ) (\mathrel{\succeq},>) ( ⪰ , > ) with ⪰ \succeq ⪰ closed under contexts. A reduction pair ( ⪰ , > ) (\mathrel{\succeq},>) ( ⪰ , > ) is monotone if > > > is also closed under contexts. We note that > > > is a reduction order for a monotone reduction pair ( ⪰ , > ) (\mathrel{\succeq},>) ( ⪰ , > ) . Conversely, given a reduction order > > > , the pair ( ⪰ , > ) (\mathrel{\succeq},>) ( ⪰ , > ) of the reflexive closure ⪰ \succeq ⪰ and > > > is a monotone reduction pair.
Interpretation-Based Orders
Algebras (or interpretations) are useful for constructing reduction orders/pairs. Let F \mathcal{F} F be a set of function symbols. An F \mathcal{F} F -algebra is a pair ( A , { f A } f ∈ F ) (A,\{f_A\}_{f\in\mathcal{F}}) ( A , { f A } f ∈ F ) , where A A A is a set called a carrier , and f A f_A f A is an n n n -ary function on A A A (called an interpretation function ) associated with each f ( n ) ∈ F f^{(n)} \in\mathcal{F} f ( n ) ∈ F . Let A = ( A , { f A } f ∈ F ) \mathcal{A}=(A,\{f_A\}_{f\in\mathcal{F}}) A = ( A , { f A } f ∈ F ) be an algebra. A mapping from V \mathcal{V} V to A A A is called an assignment for A \mathcal{A} A . The interpretation [ α ] A ( t ) [\alpha]_{\mathcal{A}}(t) [ α ] A ( t ) of a term t t t under an assignment α \alpha α is inductively defined as follows: [ α ] A ( t ) = α ( t ) [\alpha]_{\mathcal{A}}(t)=\alpha(t) [ α ] A ( t ) = α ( t ) if t t t is a variable, and [ α ] A ( t ) = f A ( [ α ] A ( t 1 ) , … , [ α ] A ( t n ) ) [\alpha]_{\mathcal{A}}(t)=f_A([\alpha]_{\mathcal{A}}(t_1),\ldots,[\alpha]_{\mathcal{A}}(t_n)) [ α ] A ( t ) = f A ([ α ] A ( t 1 ) , … , [ α ] A ( t n )) if t = f ( t 1 , … , t n ) t=f(t_1,\ldots,t_n) t = f ( t 1 , … , t n ) .
Example 2.4. Let F = { ⋅ ( 2 ) , S ( 0 ) , K ( 0 ) } \mathcal{F}=\{\mathbin{\cdot}^{(2)},S^{(0)},K^{(0)}\} F = { ⋅ ( 2 ) , S ( 0 ) , K ( 0 ) } and consider the F \mathcal{F} F -algebra A \mathcal{A} A whose carrier is N \mathbb{N} N and interpretation functions are given by x ⋅ A y = x + y x\mathbin{\cdot}_{\mathcal{A}}y=x+y x ⋅ A y = x + y and S A = K A = 1 S_{\mathcal{A}}=K_{\mathcal{A}}=1 S A = K A = 1 . For the assignment α \alpha α with α ( x ) = α ( y ) = 1 \alpha(x)=\alpha(y)=1 α ( x ) = α ( y ) = 1 we have [ α ] A ( ( K ⋅ x ) ⋅ y ) = α ( x ) + α ( y ) + 1 = 3 [\alpha]_{\mathcal{A}}((K\mathbin{\cdot}x)\mathbin{\cdot}y)=\alpha(x)+\alpha(y)+1=3 [ α ] A (( K ⋅ x ) ⋅ y ) = α ( x ) + α ( y ) + 1 = 3 .
In the rest of this article, we assume that the carrier A A A of an algebra A \mathcal{A} A is always endowed with an order pair ( ⪰ , > ) (\mathrel{\succeq},>) ( ⪰ , > ) . We write s > A t s >_{\mathcal{A}} t s > A t if [ α ] A ( s ) > [ α ] A ( t ) [\alpha]_{\mathcal{A}}(s)>[\alpha]_{\mathcal{A}}(t) [ α ] A ( s ) > [ α ] A ( t ) for all assignments α \alpha α . The relation > A >_{\mathcal{A}} > A is a stable strict order. Similarly we write s ⪰ A t s \succeq_{\mathcal{A}} t s ⪰ A t if [ α ] A ( s ) ⪰ [ α ] A ( t ) [\alpha]_{\mathcal{A}}(s)\succeq[\alpha]_{\mathcal{A}}(t) [ α ] A ( s ) ⪰ [ α ] A ( t ) holds for all assignments α \alpha α . The relation ⪰ A \succeq_{\mathcal{A}} ⪰ A is a stable quasi-order, and satisfies compatibility with > A >_{\mathcal{A}} > A , namely ⪰ A ⋅ > A ⊆ > A \succeq_{\mathcal{A}}\mathbin{\cdot}>_{\mathcal{A}}\subseteq>_{\mathcal{A}} ⪰ A ⋅ > A ⊆ > A and > A ⋅ ⪰ A ⊆ > A >_{\mathcal{A}}\mathbin{\cdot}\succeq_{\mathcal{A}}\subseteq>_{\mathcal{A}} > A ⋅ ⪰ A ⊆ > A . The i i i -th argument position of f ( n ) ∈ F f^{(n)}\in\mathcal{F} f ( n ) ∈ F with 1 ≤ i ≤ n 1\leq i\leq n 1 ≤ i ≤ n is said to be
strictly simple if f A ( a 1 , … , a i , … , a n ) > a i f_A(a_1,\ldots,a_i,\ldots,a_n)>a_i f A ( a 1 , … , a i , … , a n ) > a i for all a 1 , … , a n ∈ A a_1,\ldots,a_n\in A a 1 , … , a n ∈ A ;
weakly simple if f A ( a 1 , … , a i , … , a n ) ⪰ a i f_A(a_1,\ldots,a_i,\ldots,a_n)\succeq a_i f A ( a 1 , … , a i , … , a n ) ⪰ a i for all a 1 , … , a n ∈ A a_1,\ldots,a_n\in A a 1 , … , a n ∈ A ;
strictly monotone if f A ( a 1 , … , a i , … , a n ) > f A ( a 1 , … , b , … , a n ) f_A(a_1,\ldots,a_i,\ldots,a_n)>f_A(a_1,\ldots,b,\ldots,a_n) f A ( a 1 , … , a i , … , a n ) > f A ( a 1 , … , b , … , a n ) follows from a i > b a_i>b a i > b for all a 1 , … , a n , b ∈ A a_1,\ldots,a_n,b\in A a 1 , … , a n , b ∈ A ; and
weakly monotone if f A ( a 1 , … , a i , … , a n ) ⪰ f A ( a 1 , … , b , … , a n ) f_A(a_1,\ldots,a_i,\ldots,a_n)\succeq f_A(a_1,\ldots,b,\ldots,a_n) f A ( a 1 , … , a i , … , a n ) ⪰ f A ( a 1 , … , b , … , a n ) follows from a i ⪰ b a_i\succeq b a i ⪰ b for all a 1 , … , a n , b ∈ A a_1,\ldots,a_n,b\in A a 1 , … , a n , b ∈ A .
The terminology above carries over to subsets G ⊆ F \mathcal{G}\subseteq\mathcal{F} G ⊆ F : for example, we say that A \mathcal{A} A is strictly simple for G \mathcal{G} G if every argument position of f ∈ G f\in\mathcal{G} f ∈ G is so. Moreover, if G = F \mathcal{G}=\mathcal{F} G = F , we may simply call A \mathcal{A} A strictly simple. The algebra A \mathcal{A} A is well-founded if > > > is well-founded; normal if > ⊆ ⪰ >\subseteq\succeq >⊆⪰ ; and trivial if the carrier A A A is a singleton set.
Example 2.5 (continued from Example 2.4). We endow A \mathcal{A} A with the order pair ( ⪰ N , > N ) (\succeq_{\mathbb{N}},>_{\mathbb{N}}) ( ⪰ N , > N ) . Then A \mathcal{A} A is weakly simple and monotone, and strictly monotone, but it is not strictly simple, since x ⋅ A y = x x\mathbin{\cdot}_{\mathcal{A}}y=x x ⋅ A y = x when y = 0 y=0 y = 0 . Moreover, A \mathcal{A} A is well-founded and normal, but not trivial.
It is known that if > > > is well-founded, so is > A >_{\mathcal{A}} > A . Similarly, if A \mathcal{A} A is normal, so is ( ⪰ A , > A ) (\succeq_{\mathcal{A}},>_{\mathcal{A}}) ( ⪰ A , > A ) . If A \mathcal{A} A is trivial, then ( ⪰ A , > A ) (\succeq_{\mathcal{A}},>_{\mathcal{A}}) ( ⪰ A , > A ) degenerates to ( T × T , ∅ ) (\mathcal{T}\times\mathcal{T},\varnothing) ( T × T , ∅ ) . If A \mathcal{A} A is a weakly monotone algebra, ⪰ A \succeq_{\mathcal{A}} ⪰ A is a rewrite preorder. If A \mathcal{A} A is a strictly monotone algebra, > A >_{\mathcal{A}} > A is a reduction order. If A \mathcal{A} A is strictly (resp. weakly) simple, > A >_{\mathcal{A}} > A (resp. ⪰ A \succeq_{\mathcal{A}} ⪰ A ) has the subterm property. An important consequence is:
Proposition 2.6 [59 ] . If A \mathcal{A} A is a weakly monotone and well-founded algebra, then ( ⪰ A , > A ) (\succeq_{\mathcal{A}}, >_{\mathcal{A}}) ( ⪰ A , > A ) is a reduction pair. If in addition A \mathcal{A} A is strictly monotone, then ( ⪰ A , > A ) (\succeq_{\mathcal{A}}, >_{\mathcal{A}}) ( ⪰ A , > A ) is a monotone reduction pair.
Example 2.7 (continued from Example 2.5). Consider the TRS R = { ( K ⋅ x ) ⋅ y → x } \mathcal{R} = \{(K \mathbin{\cdot} x) \mathbin{\cdot} y \to x\} R = {( K ⋅ x ) ⋅ y → x } . From Proposition 2.6, the pair ( ⪰ A , > A ) (\succeq_{\mathcal{A}}, >_{\mathcal{A}}) ( ⪰ A , > A ) is a monotone reduction pair, and therefore > A >_{\mathcal{A}} > A is a reduction order. Furthermore, we have R ⊆ > A \mathcal{R} \subseteq>_{\mathcal{A}} R ⊆ > A , as all assignments α \alpha α satisfy the inequality [ α ] A ( ( K ⋅ x ) ⋅ y ) = α ( x ) + α ( y ) + 1 > α ( x ) = [ α ] A ( x ) [\alpha]_{\mathcal{A}}((K \mathbin{\cdot} x) \mathbin{\cdot} y) = \alpha(x) + \alpha(y) + 1 > \alpha(x) = [\alpha]_{\mathcal{A}}(x) [ α ] A (( K ⋅ x ) ⋅ y ) = α ( x ) + α ( y ) + 1 > α ( x ) = [ α ] A ( x ) . Hence the termination of R \mathcal{R} R is concluded by Proposition 2.3.
The algebra used above is an instance of the linear polynomial interpretation [36 ] . Formally, a linear polynomial interpretation A \mathcal{A} A is an algebra such that the carrier is N \mathbb{N} N ordered by ( ⪰ N , > N ) (\succeq_{\mathbb{N}}, >_{\mathbb{N}}) ( ⪰ N , > N ) and for each f ( n ) ∈ F f^{(n)} \in\mathcal{F} f ( n ) ∈ F its interpretation f A ( x 1 , … , x n ) f_{\mathcal{A}}(x_1, \ldots, x_n) f A ( x 1 , … , x n ) is of the form c 0 + c 1 x 1 + ⋯ + c n x n c_0 + c_1x_1 + \cdots+ c_nx_n c 0 + c 1 x 1 + ⋯ + c n x n with c 0 , c 1 , … , c n ∈ N c_0, c_1, \ldots, c_n \in\mathbb{N} c 0 , c 1 , … , c n ∈ N . Such an interpretation A \mathcal{A} A is well-founded, normal and also weakly monotone. In general, the i i i -th argument of a function symbol f f f is strictly monotone if and only if c i > 0 c_i > 0 c i > 0 . Strict simplicity and weak simplicity are characterized in the same way.
A max/plus interpretation A \mathcal{A} A associates a combination of + + + and max for each function symbol. For simplicity, we only consider N \mathbb{N} N as the carrier, and the interpretations are restricted to the following form (adapted from [57 Definition 7] ): For each f ( n ) ∈ F f^{(n)} \in\mathcal{F} f ( n ) ∈ F its interpretation is of the form f A ( x 1 , … , x n ) = max { d 0 , c 1 x 1 + d 1 , … , c n x n + d n } f_{\mathcal{A}}(x_1, \ldots, x_n) = \max\{d_0, c_1x_1 + d_1, \ldots, c_nx_n + d_n\} f A ( x 1 , … , x n ) = max { d 0 , c 1 x 1 + d 1 , … , c n x n + d n } where d 0 d_0 d 0 is a natural number, d 1 , … , d n ∈ Z d_1, \ldots, d_n \in\mathbb{Z} d 1 , … , d n ∈ Z and c 1 , … , c n ∈ { 0 , 1 } c_1, \ldots, c_n \in\{0,1\} c 1 , … , c n ∈ { 0 , 1 } . (See [18 ] for a more general version.) Every max/plus interpretation A \mathcal{A} A is weakly monotone, well-founded and normal. The i i i -th argument of a function symbol f f f is weakly simple if and only if d i ≥ 0 d_i \ge0 d i ≥ 0 and c i > 0 c_i > 0 c i > 0 . Consider f A ( x 1 , x 2 ) = max { 1 , x 1 , x 2 − 1 } f_{\mathcal{A}}(x_1,x_2) = \max\{1, x_1, x_2 - 1\} f A ( x 1 , x 2 ) = max { 1 , x 1 , x 2 − 1 } . The first argument of f A f_{\mathcal{A}} f A is weakly simple but not strictly simple, and the second is not even weakly simple. In fact, f A ( 1 , 0 ) = 1 ≯ 1 f_{\mathcal{A}}(1,0) = 1 \not> 1 f A ( 1 , 0 ) = 1 > 1 and f A ( 0 , 2 ) = 1 ≱ 2 f_{\mathcal{A}}(0,2) = 1 \not\ge2 f A ( 0 , 2 ) = 1 ≥ 2 .
Reduction Orders
This section studies the WPO, the MSPO, and their natural generalization, the GWPO, in the reduction-order setting. Through our analysis of the GWPO, we identify both a ground-total subclass of the MSPO and a subclass that admits efficient term comparison. More precisely, we first introduce a variant of (M)SPOs suited to our purposes in Subsection 3.1, and then WPOs and GWPOs in Subsection 3.2. In Subsection 3.3, we establish a simulation result showing that the GWPO and the MSPO coincide as classes of reduction orders. We then discuss two subclasses of GWPOs, and hence of MSPOs: an efficient subclass in Subsection 3.4 and a ground-total subclass in Subsection 3.5.
Semantic Path Order
Among the many variants of the semantic path order, we use one based on order pairs and lexicographic extension, as suggested in [9 Section 4.5] . We employ order pairs to allow interpretations to serve as basic ingredients of the SPO, and lexicographic extension to relate the SPO to the WPO, which is usually defined using lexicographic extension [57 ] . These choices are explained in due course.
Definition 3.1. Let ( ⊒ , ⊐ ) (\sqsupseteq,\sqsupset) ( ⊒ , ⊐ ) be a pair of relations on terms.2 The semantic path order > S >_{\mathrm{S}} > S is defined on terms as follows: s > S t s >_{\mathrm{S}} t s > S t if s = f ( s 1 , … , s m ) s=f(s_1,\ldots,s_m) s = f ( s 1 , … , s m ) and one of the following conditions holds.
a. s i ⊒ S t s_i \mathrel{\sqsupseteq_{\mathrm{S}}} t s i ⊒ S t for some 1 ≤ i ≤ m 1 \le i \le m 1 ≤ i ≤ m .
b. t = g ( t 1 , … , t n ) t=g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) and s > S t j s >_{\mathrm{S}} t_j s > S t j for all 1 ≤ j ≤ n 1 \le j \le n 1 ≤ j ≤ n , and moreover (i) s ⊐ t s \sqsupset t s ⊐ t , or (ii) s ⊒ t s \sqsupseteq t s ⊒ t and ( s 1 , … , s m ) > S l e x ( t 1 , … , t n ) (s_1,\ldots,s_m) >_{\mathrm{S}}^{\mathrm{lex}} (t_1,\ldots,t_n) ( s 1 , … , s m ) > S lex ( t 1 , … , t n ) .
Here ⊒ S \sqsupseteq_{\mathrm{S}} ⊒ S denotes the reflexive closure of > S >_{\mathrm{S}} > S .
When the signature is infinite, an SPO induced by an order pair ( ⊒ , ⊐ ) (\sqsupseteq,\sqsupset) ( ⊒ , ⊐ ) is not always well-founded, even if ⊐ \sqsupset ⊐ is well-founded. This is already remarked in [9 Section 4.5] ; see also [51 Section 3] and [47 Section 3] for related discussions. Well-foundedness of > S >_{\mathrm{S}} > S is restored by assuming existence of an upper bound of arities used in the signature (cf. Proposition 2.2 ). We refer to this condition as boundedness of the signature. Needless to say, a signature is bounded whenever it is finite.
Assumption 3.2. The signature is assumed to be bounded in the rest of the paper.
Theorem 3.3. If ( ⊒ , ⊐ ) (\sqsupseteq,\sqsupset) ( ⊒ , ⊐ ) is a stable and well-founded order pair on terms, the induced semantic path order is a stable well-founded order with the subterm property.
We are not aware of a published proof of the theorem above. So, for completeness, a proof of Theorem 3.3 is included in Appendix A. In general, semantic path orders are not closed under contexts, even when ⊒ \sqsupseteq ⊒ is monotone.
Example 3.4. Let A \mathcal{A} A be the linear polynomial interpretation over N \mathbb{N} N with f A ( x ) = x + 1 f_{\mathcal{A}}(x)=x+1 f A ( x ) = x + 1 and g A ( x ) = 0 g_{\mathcal{A}}(x)=0 g A ( x ) = 0 , and > S >_{\mathrm{S}} > S the SPO induced by the reduction pair ( ⊒ A , > A ) (\sqsupseteq_{\mathcal{A}},>_{\mathcal{A}}) ( ⊒ A , > A ) . Then we have g ( x ) > S x g(x)>_{\mathrm{S}}x g ( x ) > S x by case a. However, f ( g ( x ) ) > S f ( x ) f(g(x))>_{\mathrm{S}}f(x) f ( g ( x )) > S f ( x ) does not hold: case a is not applicable, and case b cannot be applied either, since f ( g ( x ) ) ⊒ A f ( x ) f(g(x))\sqsupseteq_{\mathcal{A}}f(x) f ( g ( x )) ⊒ A f ( x ) does not hold.
For a remedy, Borralleras et al. [6 , 9 ] have proposed to restrict the SPO > S >_{\mathrm{S}} > S by taking intersection with another preorder ⊒ \sqsupseteq ⊒ satisfying the harmony property [14 ] (originally called quasi-monotonicity [6 ] ). Here, a relation ⇝ \rightsquigarrow ⇝ on terms is harmonious with respect to another relation ⇝ \leadsto ⇝ on terms if
s i ⇝ t ⟹ f ( s 1 , … , s i , … , s n ) ⇝ f ( s 1 , … , t , … , s n ) s_i \leadsto t \quad\Longrightarrow\quad f(s_1,\ldots,s_i,\ldots,s_n)\rightsquigarrow f(s_1,\ldots,t,\ldots,s_n) s i ⇝ t ⟹ f ( s 1 , … , s i , … , s n ) ⇝ f ( s 1 , … , t , … , s n )
for all n n n -ary function symbols f f f , integers 1 ≤ i ≤ n 1 \le i \le n 1 ≤ i ≤ n , and terms s 1 , … , s n , t s_1,\ldots,s_n,t s 1 , … , s n , t . It is not difficult to see that ⇝ \rightsquigarrow ⇝ is closed under contexts if and only if ⇝ \rightsquigarrow ⇝ is harmonious with respect to itself.
Definition 3.5 ([9 Definition 4.1.20] ). A triple ( ⊒ , ⊒ , ⊐ ) (\sqsupseteq,\sqsupseteq,\sqsupset) ( ⊒ , ⊒ , ⊐ ) is a reduction triple 3 if ⊒ \sqsupseteq ⊒ is a rewrite preorder on terms, ( ⊒ , ⊐ ) (\sqsupseteq,\sqsupset) ( ⊒ , ⊐ ) is a stable order pair on T \mathcal{T} T with ⊐ \sqsupset ⊐ well-founded, and ⊒ \sqsupseteq ⊒ is harmonious with respect to ⊒ \sqsupseteq ⊒ .
Definition 3.6. Let ( ⊒ , ⊒ , ⊐ ) (\sqsupseteq,\sqsupseteq,\sqsupset) ( ⊒ , ⊒ , ⊐ ) be a reduction triple and > S >_{\mathrm{S}} > S the semantic path order induced from ( ⊒ , ⊐ ) (\sqsupseteq,\sqsupset) ( ⊒ , ⊐ ) . The monotonic semantic path order > M S >_{\mathrm{MS}} > MS is defined as s ⊒ t s \sqsupseteq t s ⊒ t and s > S t s >_{\mathrm{S}} t s > S t .
Theorem 3.7. Every monotonic semantic path order is a reduction order.
Although the proof due to Borralleras et al. [6 Theorem 2] goes through, we present it here to explain the role of ≥ \geq ≥ and the harmony property.
Proof. Since we have Theorem 3.3, the only interesting part is the proof that > M S >_{\mathrm{MS}} > MS is monotone. Let > M S >_{\mathrm{MS}} > MS be the MSPO induced by a reduction triple ( ≥ , ⊵ , ⊳ ) (\geq,\unrhd,\rhd) ( ≥ , ⊵ , ⊳ ) , and let s > M S t s >_{\mathrm{MS}} t s > MS t and C = f ( u ‾ , □ ‾ , v ‾ ) C = f(\overline{u},\overline{\Box},\overline{v}) C = f ( u , □ , v ) . By definition s ≥ t s \geq t s ≥ t and s > S t s >_{\mathrm{S}} t s > S t . From the monotonicity of ≥ \geq ≥ we have C [ s ] ≥ C [ t ] C[s] \geq C[t] C [ s ] ≥ C [ t ] , and from the harmony property we have C [ s ] ⊵ C [ t ] C[s] \unrhd C[t] C [ s ] ⊵ C [ t ] . So, C [ s ] > S C [ t ] C[s] >_{\mathrm{S}} C[t] C [ s ] > S C [ t ] follows by case b(ii), using the subterm property of > S >_{\mathrm{S}} > S . Hence C [ s ] > M S C [ t ] C[s] >_{\mathrm{MS}} C[t] C [ s ] > MS C [ t ] .
In the sequel, we recall constructions of reduction triples [6 , 9 ] . A quasi-order on the signature is called a precedence , and it naturally induces a reduction triple. A precedence ⪰ \succeq ⪰ is called well-founded if its strict part ≻ \succ ≻ is well-founded.
Proposition 3.9 [6 ] . Let ⪰ \succeq ⪰ be a well-founded precedence , and define s ⊵ P t s \unrhd_{P} t s ⊵ P t by s = t s = t s = t or s = f ( s ‾ ) s = f(\overline{s}) s = f ( s ) , t = g ( t ‾ ) t = g(\overline{t}) t = g ( t ) and f ⪰ g f \succeq g f ⪰ g , and ⊳ P \rhd_{P} ⊳ P by the strict part of ⊵ P \unrhd_{P} ⊵ P . Then ( T × T , ⊵ P , ⊳ P ) (\mathcal{T} \times\mathcal{T},\unrhd_{P},\rhd_{P}) ( T × T , ⊵ P , ⊳ P ) is a reduction triple.
Note that the harmony property follows from the fact that ⊵ P \unrhd_{P} ⊵ P equates terms with the same root symbol. Lexicographic path orders (LPOs) [33 ] are special instances of MSPOs constructed with Proposition 3.9.
For a reduction pair ( ≥ , > ) (\geq,>) ( ≥ , > ) , the quasi-order ≥ \geq ≥ is monotone, and therefore harmonious with respect to itself. So, every reduction pair can be turned into a reduction triple as follows.
Proposition 3.11 [6 ] . If ( ≥ , > ) (\geq,>) ( ≥ , > ) is a reduction pair, ( ≥ , ≥ , > ) (\geq,\geq,>) ( ≥ , ≥ , > ) is a reduction triple.
In particular, since ( T × T , ∅ ) (\mathcal{T} \times\mathcal{T},\varnothing) ( T × T , ∅ ) is a reduction pair, ( T × T , T × T , ∅ ) (\mathcal{T} \times\mathcal{T},\mathcal{T} \times\mathcal{T},\varnothing) ( T × T , T × T , ∅ ) is a reduction triple. We call it the trivial reduction triple.
We illustrate the use of Proposition 3.11 with the MSPO by an example.
Example 3.12. We show the termination of the TRS R = { f ( f ( x ) ) → f ( g ( f ( x ) ) ) } \mathcal{R} = \{f(f(x)) \to f(g(f(x)))\} R = { f ( f ( x )) → f ( g ( f ( x )))} taken from [59 ] . Let A \mathcal{A} A be the linear polynomial interpretation over N \mathbb{N} N with f A ( x ) = x + 1 f_{\mathcal{A}}(x) = x + 1 f A ( x ) = x + 1 and g A ( x ) = 0 g_{\mathcal{A}}(x) = 0 g A ( x ) = 0 (the same one as Example 3.4), and > M S >_{\mathrm{MS}} > MS the MSPO induced by the reduction triple ( ≥ A , ≥ A , > A ) (\geq_{\mathcal{A}},\geq_{\mathcal{A}},>_{\mathcal{A}}) ( ≥ A , ≥ A , > A ) . The inequality f ( f ( x ) ) ≥ A f ( g ( f ( x ) ) ) f(f(x)) \geq_{\mathcal{A}} f(g(f(x))) f ( f ( x )) ≥ A f ( g ( f ( x ))) boils down to x + 2 > 1 x + 2 > 1 x + 2 > 1 for all x ∈ N x \in\mathbb{N} x ∈ N , which trivially holds. In the same way, we can confirm that f ( f ( x ) ) > A t f(f(x)) >_{\mathcal{A}} t f ( f ( x )) > A t for all subterms t t t of f ( g ( f ( x ) ) ) f(g(f(x))) f ( g ( f ( x ))) . So, f ( f ( x ) ) > S f ( g ( f ( x ) ) ) f(f(x)) >_{\mathcal{S}} f(g(f(x))) f ( f ( x )) > S f ( g ( f ( x ))) follows from successive applications of case b(i). Thus, we conclude R ⊆ > M S \mathcal{R} \subseteq>_{\mathrm{MS}} R ⊆ > MS and thereby the termination.
Note that the strict order > > > in Proposition 3.11 is not the strict part of ≥ \geq ≥ in general. This essentially explains why we adopt a formulation based on order pairs in Definition 3.1. The issue is most evident when they are induced by a polynomial interpretation.
Example 3.13. Consider the linear polynomial interpretation A \mathcal{A} A over N \mathbb{N} N with the interpretation f A ( x ) = 2 x f_{\mathcal{A}}(x) = 2x f A ( x ) = 2 x , and the induced reduction triple ( ⪰ A , ⪰ A , > A ) (\succeq_{\mathcal{A}}, \succeq_{\mathcal{A}}, >_{\mathcal{A}}) ( ⪰ A , ⪰ A , > A ) . On the one hand we have f ( f ( x ) ) ⪰ A f ( x ) f(f(x)) \succeq_{\mathcal{A}} f(x) f ( f ( x )) ⪰ A f ( x ) from 4 x ⪰ 2 x 4x \succeq2x 4 x ⪰ 2 x for all x ∈ N x \in\mathbb{N} x ∈ N , but not f ( x ) ⪰ A f ( f ( x ) ) f(x) \succeq_{\mathcal{A}} f(f(x)) f ( x ) ⪰ A f ( f ( x )) as 2 x ⪰ 4 x 2x \succeq4x 2 x ⪰ 4 x does not hold for x = 1 x = 1 x = 1 . On the other hand f ( f ( x ) ) > A f ( x ) f(f(x)) >_{\mathcal{A}} f(x) f ( f ( x )) > A f ( x ) does not hold either, because 4 x > 2 x 4x > 2x 4 x > 2 x does not hold for x = 0 x = 0 x = 0 .
It is known that Proposition 3.11 can be improved by marking root symbols; see [6 Proposition 4.2] . (A similar idea is used by the dependency pair method discussed in § 4 .) In this article, we use a special case based on algebras. We first introduce a distinguished copy F ♯ \mathcal{F}^{\sharp} F ♯ of the original signature F \mathcal{F} F , consisting of a fresh n n n -ary function symbol f ♯ f^{\sharp} f ♯ for each f ( n ) ∈ F f^{(n)} \in\mathcal{F} f ( n ) ∈ F . For an ( F ∪ F ♯ ) (\mathcal{F} \cup\mathcal{F}^{\sharp}) ( F ∪ F ♯ ) -algebra A \mathcal{A} A , we define s ⪰ A ♯ t s \succeq^{\sharp}_{\mathcal{A}} t s ⪰ A ♯ t on T ( F , V ) \mathcal{T}(\mathcal{F}, \mathcal{V}) T ( F , V ) by s = t s = t s = t or s = f ( s ˉ ) s = f(\bar{s}) s = f ( s ˉ ) , t = g ( t ˉ ) t = g(\bar{t}) t = g ( t ˉ ) and f ♯ ( s ˉ ) ⪰ A g ♯ ( t ˉ ) f^{\sharp}(\bar{s}) \succeq_{\mathcal{A}} g^{\sharp}(\bar{t}) f ♯ ( s ˉ ) ⪰ A g ♯ ( t ˉ ) . Similarly, we define s > A ♯ t s >^{\sharp}_{\mathcal{A}} t s > A ♯ t on T ( F , V ) \mathcal{T}(\mathcal{F}, \mathcal{V}) T ( F , V ) by s = f ( s ˉ ) s = f(\bar{s}) s = f ( s ˉ ) , t = g ( t ˉ ) t = g(\bar{t}) t = g ( t ˉ ) and f ♯ ( s ˉ ) > A g ♯ ( t ˉ ) f^{\sharp}(\bar{s}) >_{\mathcal{A}} g^{\sharp}(\bar{t}) f ♯ ( s ˉ ) > A g ♯ ( t ˉ ) . The construction below is based on the observation that ⪰ A ♯ \succeq^{\sharp}_{\mathcal{A}} ⪰ A ♯ is harmonious with respect to ⪰ A \succeq_{\mathcal{A}} ⪰ A if A \mathcal{A} A is weakly monotone for F ♯ \mathcal{F}^{\sharp} F ♯ .
Proposition 3.14. The triple ( ⪰ A , ⪰ A ♯ , > A ♯ ) (\succeq_{\mathcal{A}}, \succeq^{\sharp}_{\mathcal{A}}, >^{\sharp}_{\mathcal{A}}) ( ⪰ A , ⪰ A ♯ , > A ♯ ) is a reduction triple on T ( F , V ) \mathcal{T}(\mathcal{F}, \mathcal{V}) T ( F , V ) for every weakly monotone and well-founded ( F ∪ F ♯ ) (\mathcal{F} \cup\mathcal{F}^{\sharp}) ( F ∪ F ♯ ) -algebra A \mathcal{A} A .
There is a variant of the construction above that allows us to use non-weakly-monotone algebras, at the cost of using the equivalence relation = A =_{\mathcal{A}} = A as the first component of the reduction triple [26 ] . Here, s = A t s =_{\mathcal{A}} t s = A t is defined on T ( F , V ) \mathcal{T}(\mathcal{F}, \mathcal{V}) T ( F , V ) as [ α ] A ( s ) = [ α ] A ( t ) [\alpha]_{\mathcal{A}}(s) = [\alpha]_{\mathcal{A}}(t) [ α ] A ( s ) = [ α ] A ( t ) for all assignments α \alpha α .
Proposition 3.15. The triple ( = A , ⪰ A ♯ , > A ♯ ) (=_{\mathcal{A}}, \succeq^{\sharp}_{\mathcal{A}}, >^{\sharp}_{\mathcal{A}}) ( = A , ⪰ A ♯ , > A ♯ ) is a reduction triple on T ( F , V ) \mathcal{T}(\mathcal{F}, \mathcal{V}) T ( F , V ) for every well-founded ( F ∪ F ♯ ) (\mathcal{F} \cup\mathcal{F}^{\sharp}) ( F ∪ F ♯ ) -algebra A \mathcal{A} A .
Proof. For the harmony property, let s = A t s =_{\mathcal{A}} t s = A t and C = f ( u ˉ , □ , v ˉ ) C = f(\bar{u}, \Box, \bar{v}) C = f ( u ˉ , □ , v ˉ ) . From s = A t s =_{\mathcal{A}} t s = A t we obtain f ♯ ( u ˉ , s , v ˉ ) = A f ♯ ( u ˉ , t , v ˉ ) f^{\sharp}(\bar{u},s,\bar{v}) =_{\mathcal{A}} f^{\sharp}(\bar{u},t,\bar{v}) f ♯ ( u ˉ , s , v ˉ ) = A f ♯ ( u ˉ , t , v ˉ ) , and thus C [ s ] ⪰ A ♯ C [ t ] C[s] \succeq^{\sharp}_{\mathcal{A}} C[t] C [ s ] ⪰ A ♯ C [ t ] . The other properties are easy to verify.
Example 3.16. Consider the TRS R = { f ( a , b , x ) → f ( x , x , x ) } \mathcal{R} = \{f(a,b,x) \to f(x,x,x)\} R = { f ( a , b , x ) → f ( x , x , x )} . We mimic the termination proof of [60 Example 2] by the finite algebra A \mathcal{A} A over { 0 , 1 } \{0,1\} { 0 , 1 } defined as follows:
f A ( x , y , z ) = 0 a A = 1 b A = 0 f A ♯ ( x , y , z ) = { 1 if x ≠ y 0 otherwise a A ♯ = 1 b A ♯ = 0 f_{\mathcal{A}}(x,y,z) = 0 \qquad a_{\mathcal{A}} = 1 \qquad b_{\mathcal{A}} = 0 \qquad f^{\sharp}_{\mathcal{A}}(x,y,z) = \begin{cases} 1 & \text{if } x \ne y \\ 0 & \text{otherwise} \end{cases} \qquad a^{\sharp}_{\mathcal{A}} = 1 \qquad b^{\sharp}_{\mathcal{A}} = 0 f A ( x , y , z ) = 0 a A = 1 b A = 0 f A ♯ ( x , y , z ) = { 1 0 if x = y otherwise a A ♯ = 1 b A ♯ = 0
We consider the MSPO > M S >_{\mathrm{MS}} > MS induced by the reduction triple ( = A , ⪰ A ♯ , > A ♯ ) (=_{\mathcal{A}}, \succeq^{\sharp}_{\mathcal{A}}, >^{\sharp}_{\mathcal{A}}) ( = A , ⪰ A ♯ , > A ♯ ) . Obviously, we have f ( a , b , x ) = A f ( x , x , x ) f(a,b,x) =_{\mathcal{A}} f(x,x,x) f ( a , b , x ) = A f ( x , x , x ) , and also f ♯ ( a , b , x ) > A f ♯ ( x , x , x ) f^{\sharp}(a,b,x) >_{\mathcal{A}} f^{\sharp}(x,x,x) f ♯ ( a , b , x ) > A f ♯ ( x , x , x ) . So f ( a , b , x ) > S f ( x , x , x ) f(a,b,x) >_{\mathrm{S}} f(x,x,x) f ( a , b , x ) > S f ( x , x , x ) follows from case b(i). Finally, we conclude R ⊆ > M S \mathcal{R} \subseteq>_{\mathrm{MS}} R ⊆ > MS and thereby termination.
Generalizing WPO
The weighted path order (WPO) is a class of reduction orders introduced by Yamada, Kusakari and Sakabe [57 ] . The definition of WPOs is based on an algebra A \mathcal{A} A and a precedence ≿ \succsim ≿ . A WPO compares terms s s s and t t t as a Knuth–Bendix order (KBO) [32 ] does: If s ≿ t s \succsim t s ≿ t , we can immediately conclude that s s s is strictly greater than t t t . If the weak inequality s ⪰ A t s \succeq_{\mathcal{A}} t s ⪰ A t holds then we can compare an argument of s s s with t t t , or f = root ( s ) f = \operatorname{root}(s) f = root ( s ) and g = root ( t ) g = \operatorname{root}(t) g = root ( t ) by the precedence ≿ \succsim ≿ . When the weak inequality f ≿ g f \succsim g f ≿ g holds, then the arguments of s s s and t t t can be compared lexicographically.
Definition 3.17 [57 ] . Let A \mathcal{A} A be an ordered F \mathcal{F} F -algebra and ⪰ \succeq ⪰ a precedence. The weighted path order > W >_{\mathrm{W}} > W is defined on terms over F \mathcal{F} F as follows: s > W t s >_{\mathrm{W}} t s > W t if
s > A t s >_{\mathcal{A}} t s > A t , or
s ⪰ A t s \succeq_{\mathcal{A}} t s ⪰ A t , s = f ( s 1 , … , s m ) s = f(s_1,\ldots,s_m) s = f ( s 1 , … , s m ) , and one of the following conditions holds. a. s i ⪰ W t s_i \succeq_{\mathrm{W}} t s i ⪰ W t for some 1 ≤ i ≤ m 1 \leq i \leq m 1 ≤ i ≤ m . b. t = g ( t 1 , … , t n ) t = g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) and s > W t j s >_{\mathrm{W}} t_j s > W t j for all 1 ≤ j ≤ n 1 \leq j \leq n 1 ≤ j ≤ n , and moreover (i) f ≻ g f \succ g f ≻ g , or (ii) f ⪰ g f \succeq g f ⪰ g and ( s 1 , … , s m ) > W l e x ( t 1 , … , t n ) (s_1,\ldots,s_m) >_{\mathrm{W}}^{\mathrm{lex}} (t_1,\ldots,t_n) ( s 1 , … , s m ) > W lex ( t 1 , … , t n ) .
Here ⪰ W \succeq_{\mathrm{W}} ⪰ W denotes the reflexive closure of > W >_{\mathrm{W}} > W .
We note that generalizing precedences to order pairs does not increase termination proving power of the WPO; see Remark 3.10.
Theorem 3.18 [57 ] . For every well-founded, normal, weakly simple and monotone algebra and well-founded precedence, the induced relation > W >_{\mathrm{W}} > W is a reduction order (with the subterm property).
We note that the normality requirement was identified by [52 ] . Weak simplicity of the algebra is essential for well-foundedness of the WPO in Theorem 3.18. In fact, otherwise the order may not be irreflexive.
Example 3.19. Let A \mathcal{A} A be the weakly monotone and normal algebra on N \mathbb{N} N given by a A = 1 a_{\mathcal{A}} = 1 a A = 1 and f A ( x ) = 0 f_{\mathcal{A}}(x) = 0 f A ( x ) = 0 . The WPO > W >_{\mathrm{W}} > W induced by A \mathcal{A} A and any precedence satisfies f ( a ) > W f ( a ) f(a) >_{\mathrm{W}} f(a) f ( a ) > W f ( a ) which can be seen by applying case 2a and then case 1.
In general, it is known that the WPO generalizes the LPO and the KBO in the following sense: KBOs are WPOs induced by a restricted form of linear polynomial interpretations over N \mathbb{N} N , and LPOs are WPOs induced by a restricted form of max/plus interpretations [57 ] . So every termination proof by an LPO or KBO can be simulated by a corresponding WPO.
We generalize the WPO in the spirit of Kamin and Lévy. Their idea to obtain the SPO is to generalize precedence of the LPO to order pairs on terms. Following this, we generalize the WPO so as to take two order pairs on terms: one takes the role of algebra, and the other that of precedence.
Definition 3.20. Let ( ⪰ A , ≻ A ) (\succeq_{\mathcal{A}}, \succ_{\mathcal{A}}) ( ⪰ A , ≻ A ) and ( ⪰ B , ≻ B ) (\succeq_{\mathcal{B}}, \succ_{\mathcal{B}}) ( ⪰ B , ≻ B ) be pairs of relations on terms. The generalized weighted path order > G >_{\mathrm{G}} > G (GWPO) is defined as follows: s > G t s >_{\mathrm{G}} t s > G t if
s ≻ A t s \succ_{\mathcal{A}} t s ≻ A t , or
s = f ( s 1 , … , s m ) ⪰ A t s = f(s_1,\ldots,s_m) \succeq_{\mathcal{A}} t s = f ( s 1 , … , s m ) ⪰ A t and one of the following conditions holds: a. s i ⪰ G t s_i \succeq_{\mathrm{G}} t s i ⪰ G t for some argument s i s_i s i . b. t = g ( t 1 , … , t n ) t = g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) , s > G t j s >_{\mathrm{G}} t_j s > G t j for all arguments t j t_j t j , and moreover (i) f ( s 1 , … , s m ) ≻ B g ( t 1 , … , t n ) f(s_1,\ldots,s_m) \succ_{\mathcal{B}} g(t_1,\ldots,t_n) f ( s 1 , … , s m ) ≻ B g ( t 1 , … , t n ) , or (ii) f ( s 1 , … , s m ) ⪰ B g ( t 1 , … , t n ) f(s_1,\ldots,s_m) \succeq_{\mathcal{B}} g(t_1,\ldots,t_n) f ( s 1 , … , s m ) ⪰ B g ( t 1 , … , t n ) and ( s 1 , … , s m ) > G l e x ( t 1 , … , t n ) (s_1,\ldots,s_m) >_{\mathrm{G}}^{\mathrm{lex}} (t_1,\ldots,t_n) ( s 1 , … , s m ) > G lex ( t 1 , … , t n ) .
It is a nice exercise to compare Definition 3.20 and Definition 3.1: an SPO induced by a pair ( ⪰ , ≻ ) (\succeq,\succ) ( ⪰ , ≻ ) is identical to the GWPO induced by ( T × T , ∅ ) (\mathcal{T} \times\mathcal{T}, \varnothing) ( T × T , ∅ ) and ( ⪰ , ≻ ) (\succeq,\succ) ( ⪰ , ≻ ) . It is also instructive to compare Definition 3.20 and Definition 3.17: The order pair ( ⪰ A , ≻ A ) (\succeq_{\mathcal{A}},\succ_{\mathcal{A}}) ( ⪰ A , ≻ A ) corresponds to ( ⪰ A , ≻ A ) (\succeq_{\mathcal{A}},\succ_{\mathcal{A}}) ( ⪰ A , ≻ A ) induced by an algebra A \mathcal{A} A , and ( ⪰ B , ≻ B ) (\succeq_{\mathcal{B}},\succ_{\mathcal{B}}) ( ⪰ B , ≻ B ) corresponds to comparison by a precedence. Interestingly, the version of WPO formalized in Isabelle/HOL ([TSSY20, Section 3]) is based on a similar idea, but does not generalize precedences to order pairs on terms.
Not surprisingly, a sufficient condition for a GWPO to be a stable and well-founded order is a merger of that for an SPO (Theorem 3.3) and that for a WPO (Theorem 3.18). We say that an order pair ( ⊒ A , ⊐ A ) (\sqsupseteq_A, \sqsupset_A) ( ⊒ A , ⊐ A ) on terms has the subterm property if ▹ ⊆ ( ⊒ A ∪ ⊐ A ) \triangleright\subseteq(\sqsupseteq_A \cup\sqsupset_A) ▹ ⊆ ( ⊒ A ∪ ⊐ A ) . Hereafter, for brevity we may simply write the subscript A A A for a pair ( ⊒ A , ⊐ A ) (\sqsupseteq_A, \sqsupset_A) ( ⊒ A , ⊐ A ) or a triple ( ⪰ A , ⊒ A , ⊐ A ) (\succeq_A, \sqsupseteq_A, \sqsupset_A) ( ⪰ A , ⊒ A , ⊐ A ) , if it does not cause any confusion.
Theorem 3.21. If ( ⊒ A , ⊐ A ) (\sqsupseteq_A, \sqsupset_A) ( ⊒ A , ⊐ A ) and ( ⊒ B , ⊐ B ) (\sqsupseteq_B, \sqsupset_B) ( ⊒ B , ⊐ B ) are well-founded stable order pairs and the order pair A A A has the subterm property, the induced relation > G >_G > G is a stable and well-founded order with the subterm property.
In the next section we show the theorem using a simulation result. The subterm property of A A A is necessary for well-foundedness. The necessity is witnessed by the WPO in Example 3.19, as it can be regarded as a GWPO induced by ( ⪰ A , > A ) (\succeq_A, >_A) ( ⪰ A , > A ) . By definition, the subterm property of ⊒ A \sqsupseteq_A ⊒ A is a sufficient condition for that of the order pair ( ⊒ A , ⊐ A ) (\sqsupseteq_A, \sqsupset_A) ( ⊒ A , ⊐ A ) . Here, we allow the weaker condition ▹ ⊆ ( ⊒ A ∪ ⊐ A ) \triangleright\subseteq(\sqsupseteq_A \cup\sqsupset_A) ▹ ⊆ ( ⊒ A ∪ ⊐ A ) for convenience in Subsection 3.4 (so that Corollary 3.41 can be derived using Theorem 3.33).
As the SPO has the monotonic variant MSPO, so does the GWPO. We call it the monotonic generalized weighted path order , or MGWPO for short.
Definition 3.22. Let ( ⪰ A , ⊒ A , ⊐ A ) (\succeq_A, \sqsupseteq_A, \sqsupset_A) ( ⪰ A , ⊒ A , ⊐ A ) and ( ⪰ B , ⊒ B , ⊐ B ) (\succeq_B, \sqsupseteq_B, \sqsupset_B) ( ⪰ B , ⊒ B , ⊐ B ) be triples of relations on terms. The monotonic generalized weighted path order > M G >_{\mathrm{MG}} > MG is the intersection ⪰ A ∩ ⪰ B ∩ > G \succeq_A \cap\succeq_B \cap>_G ⪰ A ∩ ⪰ B ∩ > G where > G >_G > G is induced by ( ⊒ A , ⊐ A ) (\sqsupseteq_A, \sqsupset_A) ( ⊒ A , ⊐ A ) and ( ⊒ B , ⊐ B ) (\sqsupseteq_B, \sqsupset_B) ( ⊒ B , ⊐ B ) .
Now, we arrive at the main theorem of this section.
Theorem 3.23. The relation > M G >_{\mathrm{MG}} > MG is a reduction order for reduction triples ( ⪰ A , ⊒ A , ⊐ A ) (\succeq_A, \sqsupseteq_A, \sqsupset_A) ( ⪰ A , ⊒ A , ⊐ A ) and ( ⪰ B , ⊒ B , ⊐ B ) (\succeq_B, \sqsupseteq_B, \sqsupset_B) ( ⪰ B , ⊒ B , ⊐ B ) with ( ⊒ A , ⊐ A ) (\sqsupseteq_A, \sqsupset_A) ( ⊒ A , ⊐ A ) having the subterm property.
The theorem is also a consequence of the simulation result in the next section. Next, we confirm that our MGWPO indeed generalizes the WPO.
Proposition 3.24. Let > W >_W > W be the WPO induced by a normal algebra A A A and a precedence ⪰ \succeq ⪰ . Then > W >_W > W is identical to > M G >_{\mathrm{MG}} > MG induced by ( ⪰ A , ⪰ A , > A ) (\succeq_A, \succeq_A, >_A) ( ⪰ A , ⪰ A , > A ) and P P P , where P P P is constructed from ⪰ \succeq ⪰ as in Proposition 3.9.
Proof. It is easy to see that > W >_W > W is identical to > G >_G > G , and therefore > M G ⊆ > W >_{\mathrm{MG}} \subseteq>_W > MG ⊆ > W . Moreover, by the normality of A A A , one can show that > W ⊆ ⪰ A >_W \subseteq\succeq_A > W ⊆ ⪰ A . This entails the converse > W ⊆ > M G >_W \subseteq>_{\mathrm{MG}} > W ⊆ > MG . □
Using the same construction, we can see that Theorem 3.18 follows from Theorem 3.23: When A A A is weakly simple, we have the subterm property of ⪰ A \succeq_A ⪰ A and thereby that of ( ⪰ A , > A ) (\succeq_A, >_A) ( ⪰ A , > A ) . Also, we can see that our MGWPO indeed generalizes MSPO.
Proposition 3.25. Let > M S >_{\mathrm{MS}} > MS be the MSPO induced by a reduction triple ( ⪰ , ⊒ , ⊐ ) (\succeq, \sqsupseteq, \sqsupset) ( ⪰ , ⊒ , ⊐ ) . Then > M S >_{\mathrm{MS}} > MS is identical to > M G >_{\mathrm{MG}} > MG induced by the reduction triples ( T × T , T × T , ∅ ) (\mathcal{T} \times\mathcal{T}, \mathcal{T} \times\mathcal{T}, \varnothing) ( T × T , T × T , ∅ ) and ( ⪰ , ⊒ , ⊐ ) (\succeq, \sqsupseteq, \sqsupset) ( ⪰ , ⊒ , ⊐ ) . □
Now, we illustrate the use of GWPOs by examples.
Example 3.26. Consider the rewrite system for combinatory logic:
( ( S ⋅ x ) ⋅ y ) ⋅ z → ( x ⋅ z ) ⋅ ( y ⋅ z ) ( K ⋅ x ) ⋅ y → x ((S \mathbin{\cdot} x) \mathbin{\cdot} y) \mathbin{\cdot} z \to(x \mathbin{\cdot} z) \mathbin{\cdot} (y \mathbin{\cdot} z) \qquad\qquad(K \mathbin{\cdot} x) \mathbin{\cdot} y \to x (( S ⋅ x ) ⋅ y ) ⋅ z → ( x ⋅ z ) ⋅ ( y ⋅ z ) ( K ⋅ x ) ⋅ y → x
While the system is well known to be non-terminating (see for example [4 ] ), the following system R \mathcal{R} R obtained by flipping the S S S rule is actually terminating.5
( x ⋅ z ) ⋅ ( y ⋅ z ) → ( ( S ⋅ x ) ⋅ y ) ⋅ z ( K ⋅ x ) ⋅ y → x (x \mathbin{\cdot} z) \mathbin{\cdot} (y \mathbin{\cdot} z) \to((S \mathbin{\cdot} x) \mathbin{\cdot} y) \mathbin{\cdot} z \qquad\qquad(K \mathbin{\cdot} x) \mathbin{\cdot} y \to x ( x ⋅ z ) ⋅ ( y ⋅ z ) → (( S ⋅ x ) ⋅ y ) ⋅ z ( K ⋅ x ) ⋅ y → x
To see it, let A \mathcal{A} A be the linear polynomial interpretation over N \mathbb{N} N defined as follows:
x ⋅ A y = x + y + 1 S A = 0 K A = 0 x ⋅ A ♯ y = y S A ♯ = 0 K A ♯ = 0 x \mathbin{\cdot_{\mathcal{A}}} y = x+y+1 \qquad S_{\mathcal{A}}=0 \qquad K_{\mathcal{A}}=0 \qquad x \mathbin{\cdot_{\mathcal{A}}^{\sharp}} y=y \qquad S_{\mathcal{A}}^{\sharp}=0 \qquad K_{\mathcal{A}}^{\sharp}=0 x ⋅ A y = x + y + 1 S A = 0 K A = 0 x ⋅ A ♯ y = y S A ♯ = 0 K A ♯ = 0
Intuitively, A \mathcal{A} A captures the decrease of the number of occurrences of ⋅ \cdot ⋅ in the second rule with x ⋅ A y = x + y + 1 x\mathbin{\cdot_{\mathcal{A}}}y=x+y+1 x ⋅ A y = x + y + 1 , and the decrease of the depth of the rightmost z z z in the first rule with x ⋅ A ♯ y = y x\mathbin{\cdot_{\mathcal{A}}^{\sharp}}y=y x ⋅ A ♯ y = y . The monotone generalized weighted path order > M G >_{\mathrm{MG}} > MG induced by the reduction triples ( ⪰ A , ⪰ A , > A ) (\mathrel{\succeq_{\mathcal{A}}},\mathrel{\succeq_{\mathcal{A}}},>_{\mathcal{A}}) ( ⪰ A , ⪰ A , > A ) and ( ⪰ A , ⪰ A ♯ , > A ♯ ) (\mathrel{\succeq_{\mathcal{A}}},\mathrel{\succeq_{\mathcal{A}}^{\sharp}},>_{\mathcal{A}}^{\sharp}) ( ⪰ A , ⪰ A ♯ , > A ♯ ) satisfies ( x ⋅ z ) ⋅ ( y ⋅ z ) > M G ( ( S ⋅ x ) ⋅ y ) ⋅ z (x\mathbin{\cdot}z)\mathbin{\cdot}(y\mathbin{\cdot}z)>_{\mathrm{MG}}((S\mathbin{\cdot}x)\mathbin{\cdot}y)\mathbin{\cdot}z ( x ⋅ z ) ⋅ ( y ⋅ z ) > MG (( S ⋅ x ) ⋅ y ) ⋅ z . The comparison proceeds as follows: First, ( x ⋅ z ) ⋅ ( y ⋅ z ) ⪰ A ( ( S ⋅ x ) ⋅ y ) ⋅ z (x\mathbin{\cdot}z)\mathbin{\cdot}(y\mathbin{\cdot}z)\mathrel{\succeq_{\mathcal{A}}}((S\mathbin{\cdot}x)\mathbin{\cdot}y)\mathbin{\cdot}z ( x ⋅ z ) ⋅ ( y ⋅ z ) ⪰ A (( S ⋅ x ) ⋅ y ) ⋅ z holds, as it boils down to the valid inequality x + y + 2 z + 3 ≥ x + y + z + 3 x+y+2z+3\ge x+y+z+3 x + y + 2 z + 3 ≥ x + y + z + 3 . So it remains to confirm a decrease in > G >_{\mathrm{G}} > G . Let t = ( x ⋅ z ) ⋅ ( y ⋅ z ) t=(x\mathbin{\cdot}z)\mathbin{\cdot}(y\mathbin{\cdot}z) t = ( x ⋅ z ) ⋅ ( y ⋅ z ) . Then we have the following derivation.
( x ⋅ z ) ⋅ ♯ ( y ⋅ z ) > A ( ( S ⋅ x ) ⋅ y ) ⋅ ♯ z t > A ( S ⋅ x ) ⋅ y t > G ( S ⋅ x ) ⋅ y 1 t > A z t > G z 1 \frac{(x\mathbin{\cdot}z)\mathbin{\cdot}^{\sharp}(y\mathbin{\cdot}z)>_{\mathcal{A}}((S\mathbin{\cdot}x)\mathbin{\cdot}y)\mathbin{\cdot}^{\sharp}z}{\dfrac{t>_{\mathcal{A}}(S\mathbin{\cdot}x)\mathbin{\cdot}y}{t>_{\mathrm{G}}(S\mathbin{\cdot}x)\mathbin{\cdot}y}\quad1\qquad\dfrac{t>_{\mathcal{A}}z}{t>_{\mathrm{G}}z}\quad1} t > G ( S ⋅ x ) ⋅ y t > A ( S ⋅ x ) ⋅ y 1 t > G z t > A z 1 ( x ⋅ z ) ⋅ ♯ ( y ⋅ z ) > A (( S ⋅ x ) ⋅ y ) ⋅ ♯ z
t > G ( ( S ⋅ x ) ⋅ y ) ⋅ z t>_{\mathrm{G}}((S\mathbin{\cdot}x)\mathbin{\cdot}y)\mathbin{\cdot}z t > G (( S ⋅ x ) ⋅ y ) ⋅ z
Here ( x ⋅ z ) ⋅ ♯ ( y ⋅ z ) > A ( ( S ⋅ x ) ⋅ y ) ⋅ ♯ z (x\mathbin{\cdot}z)\mathbin{\cdot}^{\sharp}(y\mathbin{\cdot}z)>_{\mathcal{A}}((S\mathbin{\cdot}x)\mathbin{\cdot}y)\mathbin{\cdot}^{\sharp}z ( x ⋅ z ) ⋅ ♯ ( y ⋅ z ) > A (( S ⋅ x ) ⋅ y ) ⋅ ♯ z follows from the validity of y + z + 1 > z y+z+1>z y + z + 1 > z . In a similar way, ( K ⋅ x ) ⋅ y > M G x (K\mathbin{\cdot}x)\mathbin{\cdot}y>_{\mathrm{MG}}x ( K ⋅ x ) ⋅ y > MG x is verified. As R ⊆ > M G \mathcal{R}\subseteq>_{\mathrm{MG}} R ⊆ > MG holds, the termination of R \mathcal{R} R is concluded.
The termination of R \mathcal{R} R above cannot be shown by the original weighted path order if algebras are restricted to be linear polynomial interpretations over N \mathbb{N} N , see Proposition A.1.
Example 3.27. Consider the TRS R \mathcal{R} R for groups with two commuting endomorphisms [SL06]:
( − x ) + x → 1 0 ( x + y ) + z → 3 x + ( y + z ) g ( x ) + g ( y ) → 5 g ( x + y ) (-x)+x \mathrel{\to^{1}} 0 \qquad(x+y)+z \mathrel{\to^{3}} x+(y+z) \qquad g(x)+g(y) \mathrel{\to^{5}} g(x+y) ( − x ) + x → 1 0 ( x + y ) + z → 3 x + ( y + z ) g ( x ) + g ( y ) → 5 g ( x + y )
0 + x → 2 x f ( x ) + f ( y ) → 4 f ( x + y ) f ( x ) + g ( y ) → 6 g ( y ) + f ( x ) 0+x \mathrel{\to^{2}} x \qquad f(x)+f(y) \mathrel{\to^{4}} f(x+y) \qquad f(x)+g(y) \mathrel{\to^{6}} g(y)+f(x) 0 + x → 2 x f ( x ) + f ( y ) → 4 f ( x + y ) f ( x ) + g ( y ) → 6 g ( y ) + f ( x )
A difficulty is rule 6, which is a terminating instance of the non-terminating rule x + y → y + x x+y\to y+x x + y → y + x . We consider the linear polynomial interpretation A \mathcal{A} A over N \mathbb{N} N with
0 A = 1 f A ( x ) = x + 1 g A ( x ) = x + 1 − A ( x ) = x + 1 x + A y = x + y + 1 0_{\mathcal{A}}=1 \qquad f_{\mathcal{A}}(x)=x+1 \qquad g_{\mathcal{A}}(x)=x+1 \qquad-_{\mathcal{A}}(x)=x+1 \qquad x+_{\mathcal{A}}y=x+y+1 0 A = 1 f A ( x ) = x + 1 g A ( x ) = x + 1 − A ( x ) = x + 1 x + A y = x + y + 1
and the linear polynomial interpretation B \mathcal{B} B over N \mathbb{N} N for the extended signature F ∪ F ♯ \mathcal{F}\cup\mathcal{F}^{\sharp} F ∪ F ♯ :
0 B = 0 f B ( x ) = 1 g B ( x ) = 0 − B ( x ) = x + 1 x + B y = x + y + 1 0_{\mathcal{B}}=0 \qquad f_{\mathcal{B}}(x)=1 \qquad g_{\mathcal{B}}(x)=0 \qquad-_{\mathcal{B}}(x)=x+1 \qquad x+_{\mathcal{B}}y=x+y+1 0 B = 0 f B ( x ) = 1 g B ( x ) = 0 − B ( x ) = x + 1 x + B y = x + y + 1
0 B ♯ = 0 f B ♯ ( x ) = 1 g B ♯ ( x ) = 0 − B ♯ ( x ) = x + 1 x + B ♯ y = x 0_{\mathcal{B}}^{\sharp}=0 \qquad f_{\mathcal{B}}^{\sharp}(x)=1 \qquad g_{\mathcal{B}}^{\sharp}(x)=0 \qquad-_{\mathcal{B}}^{\sharp}(x)=x+1 \qquad x+_{\mathcal{B}}^{\sharp}y=x 0 B ♯ = 0 f B ♯ ( x ) = 1 g B ♯ ( x ) = 0 − B ♯ ( x ) = x + 1 x + B ♯ y = x
Roughly, A \mathcal{A} A captures the decreases in term size while B \mathcal{B} B captures the change from f f f to g g g in the first argument of + + + for rule 6. This can be seen in x + B ♯ y = x x+_{\mathcal{B}}^{\sharp}y=x x + B ♯ y = x , f B ( x ) = 1 f_{\mathcal{B}}(x)=1 f B ( x ) = 1 and g B ( x ) = 0 g_{\mathcal{B}}(x)=0 g B ( x ) = 0 . From Theorem 3.23 the MGWPO > M G >_{\mathrm{MG}} > MG induced by the reduction triples ( ⪰ A , ⪰ A , > A ) (\mathrel{\succeq_{\mathcal{A}}},\mathrel{\succeq_{\mathcal{A}}},>_{\mathcal{A}}) ( ⪰ A , ⪰ A , > A ) and ( ⪰ B , ⪰ B ♯ , > B ♯ ) (\mathrel{\succeq_{\mathcal{B}}},\mathrel{\succeq_{\mathcal{B}}^{\sharp}},>_{\mathcal{B}}^{\sharp}) ( ⪰ B , ⪰ B ♯ , > B ♯ ) is a reduction order. To conclude the termination of R \mathcal{R} R with Proposition 2.3, we verify R ⊆ > M G \mathcal{R}\subseteq>_{\mathrm{MG}} R ⊆ > MG . Checking R ⊆ ⪰ A \mathcal{R}\subseteq\mathrel{\succeq_{\mathcal{A}}} R ⊆ ⪰ A and R ⊆ ⪰ B \mathcal{R}\subseteq\mathrel{\succeq_{\mathcal{B}}} R ⊆ ⪰ B is routine work. So, it remains to verify R ⊆ > G \mathcal{R}\subseteq>_{\mathrm{G}} R ⊆ > G . For rule 6, we use case 2b(i) with f ( x ) + B ♯ g ( y ) > B g ( y ) + B ♯ f ( x ) f(x)+_{\mathcal{B}}^{\sharp}g(y)>_{\mathcal{B}}g(y)+_{\mathcal{B}}^{\sharp}f(x) f ( x ) + B ♯ g ( y ) > B g ( y ) + B ♯ f ( x ) and then case 1 for recursive comparison. For rule 3 we similarly use case 2b(i) with ( x + y ) + B ♯ z > B x + B ♯ ( y + z ) (x+y)+_{\mathcal{B}}^{\sharp}z>_{\mathcal{B}}x+_{\mathcal{B}}^{\sharp}(y+z) ( x + y ) + B ♯ z > B x + B ♯ ( y + z ) and then case 1. The other rules are oriented by > A >_{\mathcal{A}} > A and therefore by case 1.
Remark 3.28. We cannot naively use Proposition 3.14 for the first reduction triple ( ⪰ A , ⪰ A , ⪰ A ) (\mathrel{\succeq_{\mathcal{A}}},\mathrel{\succeq_{\mathcal{A}}},\mathrel{\succeq_{\mathcal{A}}}) ( ⪰ A , ⪰ A , ⪰ A ) of an MGWPO, since Theorem 3.23 demands the subterm property of ( ⪰ A , ⪰ A ) (\mathrel{\succeq_{\mathcal{A}}},\mathrel{\succeq_{\mathcal{A}}}) ( ⪰ A , ⪰ A ) . For example, f ( a ) ̸ ⪰ A a f(a)\mathrel{\not\succeq_{\mathcal{A}}}a f ( a ) ⪰ A a does not hold for a weakly simple algebra A \mathcal{A} A on N \mathbb{N} N with a A = 0 a_{\mathcal{A}}=0 a A = 0 , a A ♯ = 1 a_{\mathcal{A}}^{\sharp}=1 a A ♯ = 1 , and f A ♯ ( x ) = x f_{\mathcal{A}}^{\sharp}(x)=x f A ♯ ( x ) = x . So a typical choice for the first component is to use ( ⪰ A , ⪰ A , > A ) (\mathrel{\succeq_{\mathcal{A}}},\mathrel{\succeq_{\mathcal{A}}},>_{\mathcal{A}}) ( ⪰ A , ⪰ A , > A ) with an algebra A \mathcal{A} A on the original signature, as in the examples above. (We will have more to say about this in the next section.) Moreover, if A \mathcal{A} A is normal, then > G ⊆ ⪰ A >_{\mathrm{G}}\subseteq\mathrel{\succeq_{\mathcal{A}}} > G ⊆ ⪰ A holds and therefore s > M G t s>_{\mathrm{MG}}t s > MG t is equivalent to s > B t s>_{\mathcal{B}}t s > B t and s > G t s>_{\mathrm{G}}t s > G t .
Simulating GWPOs by SPOs
We present a simulation result between (M)GWPOs and (M)SPOs. This result allows us to establish desired properties of (M)SPOs via those of (M)GWPOs, and vice versa.
To this end, we recall lexicographic combination , which provides a way to combine multiple order pairs on the same set X X X into a more complex one on X X X .
Definition 3.29. Let ( ⊵ A , ⊳ A ) (\unrhd_A, \rhd_A) ( ⊵ A , ⊳ A ) and ( ⊵ B , ⊳ B ) (\unrhd_B, \rhd_B) ( ⊵ B , ⊳ B ) be pairs of relations on the same set X X X . The lexicographic combination ( ⊵ A B , ⊳ A B ) (\unrhd_{AB}, \rhd_{AB}) ( ⊵ A B , ⊳ A B ) is the pair of relations on X X X defined as follows:
x ⊵ A B y x \unrhd_{AB} y x ⊵ A B y if x ⊳ A y x \rhd_A y x ⊳ A y , or both x ⊵ A y x \unrhd_A y x ⊵ A y and x ⊵ B y x \unrhd_B y x ⊵ B y .
x ⊳ A B y x \rhd_{AB} y x ⊳ A B y if x ⊳ A y x \rhd_A y x ⊳ A y , or both x ⊵ A y x \unrhd_A y x ⊵ A y and x ⊳ B y x \rhd_B y x ⊳ B y .
Let ( ⊵ A , ⊳ A ) (\unrhd_A, \rhd_A) ( ⊵ A , ⊳ A ) and ( ⊵ B , ⊳ B ) (\unrhd_B, \rhd_B) ( ⊵ B , ⊳ B ) be order pairs on the same set. Then ( ⊵ A B , ⊳ A B ) (\unrhd_{AB}, \rhd_{AB}) ( ⊵ A B , ⊳ A B ) is again an order pair. Moreover, it preserves well-foundedness: If both ( ⊵ A , ⊳ A ) (\unrhd_A, \rhd_A) ( ⊵ A , ⊳ A ) and ( ⊵ B , ⊳ B ) (\unrhd_B, \rhd_B) ( ⊵ B , ⊳ B ) are well-founded, so is ( ⊵ A B , ⊳ A B ) (\unrhd_{AB}, \rhd_{AB}) ( ⊵ A B , ⊳ A B ) . The same goes for stability.
The simulation result is based on lexicographic combination: Given a GWPO ⊳ G \rhd_G ⊳ G induced by two order pairs ( ⊵ A , ⊳ A ) (\unrhd_A, \rhd_A) ( ⊵ A , ⊳ A ) and ( ⊵ B , ⊳ B ) (\unrhd_B, \rhd_B) ( ⊵ B , ⊳ B ) , we consider the SPO ⊳ S \rhd_S ⊳ S induced by the lexicographic combination ( ⊵ A B , ⊳ A B ) (\unrhd_{AB}, \rhd_{AB}) ( ⊵ A B , ⊳ A B ) . Our goal is to show that ⊳ G \rhd_G ⊳ G and ⊳ S \rhd_S ⊳ S are identical.
Before presenting proofs, we illustrate how the derivation of t = ( x ⋅ z ) ⋅ ( y ⋅ z ) ⊳ G ( ( S ⋅ x ) ⋅ y ) ⋅ z t=(x\mathbin{\cdot}z)\mathbin{\cdot}(y\mathbin{\cdot}z) \rhd_G ((S\mathbin{\cdot}x)\mathbin{\cdot}y)\mathbin{\cdot}z t = ( x ⋅ z ) ⋅ ( y ⋅ z ) ⊳ G (( S ⋅ x ) ⋅ y ) ⋅ z in Example 3.26 is simulated by the semantic path order.
Example 3.30 (continued from Example 3.26). Under the construction above, ( ⊵ A B , ⊳ A B ) (\unrhd_{AB}, \rhd_{AB}) ( ⊵ A B , ⊳ A B ) is the lexicographic combination of ( ⊵ A , ⊳ A ) (\unrhd_A,\rhd_A) ( ⊵ A , ⊳ A ) and ( ⊵ A # , ⊳ A # ) (\unrhd^\#_A,\rhd^\#_A) ( ⊵ A # , ⊳ A # ) . Since ⊳ A ⊆ ⊳ A B \rhd_A \subseteq\rhd_{AB} ⊳ A ⊆ ⊳ A B , we can first apply case b(i) of ⊳ S \rhd_S ⊳ S instead of case 2b(i) of ⊳ G \rhd_G ⊳ G , which gives rise to two obligations, namely ( x ⋅ z ) ⋅ ( y ⋅ z ) ⊳ S ( S ⋅ x ) ⋅ y (x\mathbin{\cdot}z)\mathbin{\cdot}(y\mathbin{\cdot}z) \rhd_S (S\mathbin{\cdot}x)\mathbin{\cdot}y ( x ⋅ z ) ⋅ ( y ⋅ z ) ⊳ S ( S ⋅ x ) ⋅ y and ( x ⋅ z ) ⋅ ( y ⋅ z ) ⊳ S z (x\mathbin{\cdot}z)\mathbin{\cdot}(y\mathbin{\cdot}z) \rhd_S z ( x ⋅ z ) ⋅ ( y ⋅ z ) ⊳ S z . The former is derived by applying case b(i) and case a repeatedly:
t ⊳ A B S a t ⊳ A B S ⋅ x a t ⊳ S S ⋅ x b ( i ) t ⊳ A B ( S ⋅ x ) ⋅ y b ( i ) t ⊳ S ( S ⋅ x ) ⋅ y \begin{array}{rcll}
t & \rhd_{AB} & S & \mathrm{a}\\
t & \rhd_{AB} & S\mathbin{\cdot}x & \mathrm{a}\\
t & \rhd_{S} & S\mathbin{\cdot}x & \mathrm{b(i)}\\
t & \rhd_{AB} & (S\mathbin{\cdot}x)\mathbin{\cdot}y & \mathrm{b(i)}\\
t & \rhd_{S} & (S\mathbin{\cdot}x)\mathbin{\cdot}y &
\end{array} t t t t t ⊳ A B ⊳ A B ⊳ S ⊳ A B ⊳ S S S ⋅ x S ⋅ x ( S ⋅ x ) ⋅ y ( S ⋅ x ) ⋅ y a a b ( i ) b ( i )
Notice that, t ⊳ A ( S ⋅ x ) ⋅ y t \rhd_A (S\mathbin{\cdot}x)\mathbin{\cdot}y t ⊳ A ( S ⋅ x ) ⋅ y and the weak simplicity of A \mathcal{A} A guarantees t ⊳ A u t \rhd_A u t ⊳ A u and thereby t ⊳ A B u t \rhd_{AB} u t ⊳ A B u for all subterms u u u of ( S ⋅ x ) ⋅ y (S\mathbin{\cdot}x)\mathbin{\cdot}y ( S ⋅ x ) ⋅ y in the simulating derivation. Similarly, the latter obligation ( x ⋅ z ) ⋅ ( y ⋅ z ) ⊳ S z (x\mathbin{\cdot}z)\mathbin{\cdot}(y\mathbin{\cdot}z) \rhd_S z ( x ⋅ z ) ⋅ ( y ⋅ z ) ⊳ S z is derived by repeatedly applying case a.
As shown in the example, the subterm property of ( ⊵ A , ⊳ A ) (\unrhd_A,\rhd_A) ( ⊵ A , ⊳ A ) allows us to simulate case 1 of ⊳ G \rhd_G ⊳ G by case b(i) and case a of ⊳ S \rhd_S ⊳ S .
Lemma 3.31. Suppose that ( ⊵ A , ⊳ A ) (\unrhd_A,\rhd_A) ( ⊵ A , ⊳ A ) is a stable order pair with the subterm property. If s ⊳ G t s \rhd_G t s ⊳ G t then s ⊳ S t s \rhd_S t s ⊳ S t .
Proof. We prove the claim by induction on ∣ s ∣ + ∣ t ∣ |s|+|t| ∣ s ∣ + ∣ t ∣ . Let s ⊳ G t s \rhd_G t s ⊳ G t . We analyze the derivation of s ⊳ G t s \rhd_G t s ⊳ G t .
Assume that s ⊳ G t s \rhd_G t s ⊳ G t is derived from s ⊳ A t s \rhd_A t s ⊳ A t . We distinguish three cases.
Suppose that s s s is a variable. We further analyze whether it contains s s s or not. If so, by the subterm property of A A A , we have s ⊳ A t ⊳ A s s \rhd_A t \rhd_A s s ⊳ A t ⊳ A s or s ⊳ A t ⊳ A s s \rhd_A t \rhd_A s s ⊳ A t ⊳ A s , which is a contradiction; otherwise, by substituting t t t into s s s we obtain t ⊳ A t t \rhd_A t t ⊳ A t , which is again a contradiction.
Suppose that s s s is not a variable while t t t is a variable. If t t t does not occur in s s s then by substituting s s s into t t t we obtain s ⊵ A s s \mathrel{\unrhd_A} s s ⊵ A s , a contradiction. So t t t occurs in s s s . We obtain s > S t s >_S t s > S t by the subterm property of > S >_S > S .
Suppose that s s s is not a variable, and t = g ( t 1 , … , t n ) t = g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) . Since A A A has the subterm property, for every 1 ≤ j ≤ n 1 \leq j \leq n 1 ≤ j ≤ n we have s ⊵ A t ⊵ A t j s \mathrel{\unrhd_A} t \mathrel{\unrhd_A} t_j s ⊵ A t ⊵ A t j or s ⊵ A t ▹ A t j s \mathrel{\unrhd_A} t \mathrel{\triangleright_A} t_j s ⊵ A t ▹ A t j , which leads to s > G t j s >_G t_j s > G t j . Thus, the induction hypothesis yields s > S t j s >_S t_j s > S t j for all j j j . Moreover, s ▹ A B t s \mathrel{\triangleright_{AB}} t s ▹ A B t follows from s ▹ A t s \mathrel{\triangleright_A} t s ▹ A t . Hence, s > S t s >_S t s > S t follows from case b(i).
Assume that s = f ( s 1 , … , s m ) s = f(s_1,\ldots,s_m) s = f ( s 1 , … , s m ) and s ⊵ A t s \mathrel{\unrhd_A} t s ⊵ A t .
a. Suppose that s > G t s >_G t s > G t is derived from s ⊵ A t s \mathrel{\unrhd_A} t s ⊵ A t and s i ⊵ G t s_i \mathrel{\unrhd_G} t s i ⊵ G t for some i i i . Then s > S t s >_S t s > S t is obtained by case a using the induction hypothesis.
b. Suppose that t = g ( t 1 , … , t n ) t = g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) and s > G t j s >_G t_j s > G t j for all 1 ≤ j ≤ n 1 \leq j \leq n 1 ≤ j ≤ n . By the induction hypothesis s > S t j s >_S t_j s > S t j for all 1 ≤ j ≤ n 1 \leq j \leq n 1 ≤ j ≤ n .
(i) If s > G t s >_G t s > G t is derived from case 2b(i), then we have s ▹ A B t s \mathrel{\triangleright_{AB}} t s ▹ A B t . So s > S t s >_S t s > S t is obtained by case b(i).
(ii) If s > G t s >_G t s > G t is derived from case 2b(ii), then we have s ⊵ A B t s \mathrel{\unrhd_{AB}} t s ⊵ A B t and ( s 1 , … , s m ) > l e x ( t 1 , … , t n ) (s_1,\ldots,s_m) >_{\mathrm{lex}} (t_1,\ldots,t_n) ( s 1 , … , s m ) > lex ( t 1 , … , t n ) by the induction hypothesis. So s > S t s >_S t s > S t is obtained by case b(ii).
Next we prove the converse direction of Lemma 3.31.
Lemma 3.32. Suppose that ( ⊵ A , ▹ A ) (\unrhd_A,\triangleright_A) ( ⊵ A , ▹ A ) is an order pair with the subterm property. If s > S t s >_S t s > S t then s > G t s >_G t s > G t .
Proof. We prove the claim by induction on ∣ s ∣ + ∣ t ∣ |s| + |t| ∣ s ∣ + ∣ t ∣ . Let s = f ( s 1 , … , s m ) s = f(s_1,\ldots,s_m) s = f ( s 1 , … , s m ) . We analyze the derivation of s > S t s >_S t s > S t .
a. Suppose that s > S t s >_S t s > S t is derived by case a. The induction hypothesis yields s i ⊵ G t s_i \mathrel{\unrhd_G} t s i ⊵ G t for some i i i . Then, by the definition of the GWPO, s i ⊵ A t s_i \mathrel{\unrhd_A} t s i ⊵ A t or s i ▹ A t s_i \mathrel{\triangleright_A} t s i ▹ A t holds.
In the former case, using the subterm property of A A A , we obtain s ⊵ A s i ⊵ A t s \mathrel{\unrhd_A} s_i \mathrel{\unrhd_A} t s ⊵ A s i ⊵ A t or s ▹ A s i ⊵ A t s \mathrel{\triangleright_A} s_i \mathrel{\unrhd_A} t s ▹ A s i ⊵ A t . So we have s > G t s >_G t s > G t by case 2a or case 1.
In the latter case, using the subterm property of A A A , we obtain s ⊵ A s i ▹ A t s \mathrel{\unrhd_A} s_i \mathrel{\triangleright_A} t s ⊵ A s i ▹ A t or s ▹ A s i ▹ A t s \mathrel{\triangleright_A} s_i \mathrel{\triangleright_A} t s ▹ A s i ▹ A t . Therefore s > G t s >_G t s > G t by case 1.
b. Suppose that s > S t s >_S t s > S t is derived by case b. Let t = g ( t 1 , … , t n ) t = g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) and assume s > S t j s >_S t_j s > S t j for all 1 ≤ j ≤ n 1 \leq j \leq n 1 ≤ j ≤ n . By the induction hypothesis we have s > G t j s >_G t_j s > G t j for all $1 \leq j \leq n.
(i) If s ▹ A B t s \mathrel{\triangleright_{AB}} t s ▹ A B t , we further analyze how it follows: If s ▹ A t s \mathrel{\triangleright_A} t s ▹ A t then we have s > G t s >_G t s > G t by case 1. Otherwise, we conclude with case 2b(i).
(ii) If s ⊵ A B t s \mathrel{\unrhd_{AB}} t s ⊵ A B t , we further analyze how it follows: If s ▹ A t s \mathrel{\triangleright_A} t s ▹ A t then we have s > G t s >_G t s > G t by case 1. Otherwise, we conclude with case 2b(ii) using the induction hypothesis.
From Lemma 3.31 and Lemma 3.32, we establish the simulation result.
Theorem 3.33. Let > G >_G > G be the generalized weighted path order induced by stable order pairs ( ⊵ A , ▹ A ) (\unrhd_A,\triangleright_A) ( ⊵ A , ▹ A ) and ( ⊵ B , ▹ B ) (\unrhd_B,\triangleright_B) ( ⊵ B , ▹ B ) with the subterm property of ( ⊵ A , ▹ A ) (\unrhd_A,\triangleright_A) ( ⊵ A , ▹ A ) . Then > G >_G > G and > S >_S > S are identical, where > S >_S > S is induced by ( ⊵ A B , ▹ A B ) (\unrhd_{AB},\triangleright_{AB}) ( ⊵ A B , ▹ A B ) .
As a consequence, > G >_G > G and > S >_S > S coincide under the preconditions of Theorem 3.21. This proves Theorem 3.21 via Theorem 3.3. Moreover, the simulation result can be easily extended to the monotonic versions by using lexicographic combination of reduction triples.
Proposition 3.34. If ( ⊵ A , ▹ A , ▹ A ) (\unrhd_A,\triangleright_A,\triangleright_A) ( ⊵ A , ▹ A , ▹ A ) and ( ⊵ B , ▹ B , ▹ B ) (\unrhd_B,\triangleright_B,\triangleright_B) ( ⊵ B , ▹ B , ▹ B ) are reduction triples, so is the triple ( ⊵ A ∩ ⊵ B , ▹ A B , ▹ A B ) (\unrhd_A \cap\unrhd_B,\triangleright_{AB},\triangleright_{AB}) ( ⊵ A ∩ ⊵ B , ▹ A B , ▹ A B ) .
Proof. For the harmony property, let s ⪰ A t s \succeq_A t s ⪰ A t and s ⪰ B t s \succeq_B t s ⪰ B t , and let C = f ( u ˉ , □ , v ˉ ) C = f(\bar{u}, \Box, \bar{v}) C = f ( u ˉ , □ , v ˉ ) . Since ⊵ A \unrhd_A ⊵ A and ⊵ B \unrhd_B ⊵ B are harmonious with respect to ⪰ A \succeq_A ⪰ A and ⪰ B \succeq_B ⪰ B , respectively, we have C [ s ] ⊵ A C [ t ] C[s] \unrhd_A C[t] C [ s ] ⊵ A C [ t ] and C [ s ] ⊵ B C [ t ] C[s] \unrhd_B C[t] C [ s ] ⊵ B C [ t ] . So, we obtain C [ s ] ⊵ A B C [ t ] C[s] \unrhd_{AB} C[t] C [ s ] ⊵ A B C [ t ] . The other properties are readily confirmed. □
Essentially, [6 Proposition 4.3] is the special case when ⪰ A \succeq_A ⪰ A and ⪰ B \succeq_B ⪰ B are identical.
Corollary 3.35. Let > M G >_{\mathrm{MG}} > MG be the monotone generalized weighted path order induced by reduction triples ( ⪰ A , ⊵ A , ▹ A ) (\succeq_A, \unrhd_A, \triangleright_A) ( ⪰ A , ⊵ A , ▹ A ) and ( ⪰ B , ⊵ B , ▹ B ) (\succeq_B, \unrhd_B, \triangleright_B) ( ⪰ B , ⊵ B , ▹ B ) with the subterm property of ⊵ A \unrhd_A ⊵ A . Then > M G >_{\mathrm{MG}} > MG and > M S >_{\mathrm{MS}} > MS are identical, where > M S >_{\mathrm{MS}} > MS is induced by ( ⪰ A ∩ ⪰ B , ⊵ A B , ▹ A B ) (\succeq_A \cap\succeq_B, \unrhd_{AB}, \triangleright_{AB}) ( ⪰ A ∩ ⪰ B , ⊵ A B , ▹ A B ) . □
Together with Theorem 3.7 and Proposition 3.34, this simulation result proves Theorem 3.23. We remark that some of the assumptions of Corollary 3.35 could be dropped. For example, as in Theorem 3.33, well-foundedness of the reduction triples is not necessary for simulation.
It is worth examining this simulation result a little more. The MGWPO (Theorem 3.23) provides a way to turn two reduction triples, say ( ⪰ A , ⊵ A , ▹ A ) (\succeq_A, \unrhd_A, \triangleright_A) ( ⪰ A , ⊵ A , ▹ A ) and ( ⪰ B , ⊵ B , ▹ B ) (\succeq_B, \unrhd_B, \triangleright_B) ( ⪰ B , ⊵ B , ▹ B ) , into a reduction order, provided that ( ⊵ A , ▹ A ) (\unrhd_A, \triangleright_A) ( ⊵ A , ▹ A ) has the subterm property. If this property is not satisfied (cf. Remark 3.28), as in the proof of the simulation result, we can instead use Proposition 3.34 to obtain the single reduction triple ( ⪰ A ∩ ⪰ B , ⊵ A B , ▹ A B ) (\succeq_A \cap\succeq_B, \unrhd_{AB}, \triangleright_{AB}) ( ⪰ A ∩ ⪰ B , ⊵ A B , ▹ A B ) and then turn it into a reduction order via the MSPO (Theorem 3.7). Bypassing the simplicity requirement in this way gives us more termination proving power.
Remark 3.36. We add a few words about the preliminary paper [43 ] of this chapter. There, the main result is a special case of Theorem 3.33 corresponding to the original WPO, namely when A A A is induced by a weakly simple and monotone algebra and B B B by a precedence (via Proposition 3.9). Based on this result and the observation above, a generalized version of the WPO is obtained by using Proposition 3.14 (with possibly non-weakly-simple algebras) for A A A . Somewhat confusingly, although the generalization is merely a special version of the MSPO, they call it the GWPO.
The simulation result does not hold, for instance, when the SPO is defined using multiset extension as in [6 ] and the (G)WPO is defined using lexicographic extension as in this article and in the original article of the WPO [57 ] . This is why our definitions of the path orders are aligned with lexicographic extension.
GWPO as Optimized SPO
Another way of seeing the simulation result is an optimization technique of term comparison. Unlike the SPO, the GWPO allows us to avoid recursive comparison with arguments of t t t if s ⊵ A t s \unrhd_A t s ⊵ A t , see Example 3.26 and Example 3.30. This is reminiscent of the relationship between the KBO and the WPO: the former is a special case of the latter with the strict simplicity of algebras, where recursive comparison with arguments of t t t can be further avoided [57 ] . As one can expect, we also have a more KBO-like variant of GWPO that assumes the subterm property of ⊵ A \unrhd_A ⊵ A and thereby avoids unnecessary comparison.
To present the KBO-like variant, we need a few definitions. First, following [54 Definition 3.2] , we extend admissibility of weight for the KBO to order pairs: an order pair ( ⊵ A , ▹ A ) (\unrhd_A, \triangleright_A) ( ⊵ A , ▹ A ) is admissible for another order pair ( ⊵ B , ▹ B ) (\unrhd_B, \triangleright_B) ( ⊵ B , ▹ B ) if one of the following conditions holds for all n n n -ary function symbols f f f .
f ( t 1 , … , t n ) ⊵ A t i f(t_1, \ldots, t_n) \unrhd_A t_i f ( t 1 , … , t n ) ⊵ A t i for all terms t 1 , … , t n t_1, \ldots, t_n t 1 , … , t n and integers 1 ≤ i ≤ n 1 \le i \le n 1 ≤ i ≤ n
n = 1 n = 1 n = 1 and f ( t ) ▹ B g ( u ˉ ) f(t) \triangleright_B g(\bar{u}) f ( t ) ▹ B g ( u ˉ ) for all terms t t t , u ˉ \bar{u} u ˉ and function symbols $g♀♀♀♀♀♀
If the latter holds for a function symbol f f f , we call it a special unary symbol . By definition, if ⊒ A \sqsupseteq_A ⊒ A has the subterm property then A A A is admissible regardless of B B B . Moreover, we say that an order pair ( ⊒ , ⊐ ) (\sqsupseteq,\sqsupset) ( ⊒ , ⊐ ) is sensible if Var ( s ) ⊇ Var ( t ) \operatorname{Var}(s) \supseteq\operatorname{Var}(t) Var ( s ) ⊇ Var ( t ) whenever s ⊒ t s \sqsupseteq t s ⊒ t . This is a technical requirement to be explained later.
Theorem 3.37. Let ( ⊒ A , ⊐ A ) (\sqsupseteq_A,\sqsupset_A) ( ⊒ A , ⊐ A ) and ( ⊒ B , ⊐ B ) (\sqsupseteq_B,\sqsupset_B) ( ⊒ B , ⊐ B ) be order pairs and ≻ G \succ_G ≻ G the GWPO induced by them. Suppose that A A A has the subterm property, and A A A is sensible and admissible for B B B . Then s ≻ G t s \succ_G t s ≻ G t if and only if
s ⊐ A t s \sqsupset_A t s ⊐ A t , or
s = f ( s 1 , … , s m ) ⊒ A t s = f(s_1,\ldots,s_m) \sqsupseteq_A t s = f ( s 1 , … , s m ) ⊒ A t and one of the following conditions holds: A. t t t is a variable6 B. t = g ( t 1 , … , t n ) t = g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) and (I) s ⊐ B t s \sqsupset_B t s ⊐ B t , or (II) s ⊒ B t s \sqsupseteq_B t s ⊒ B t and ( s 1 , … , s m ) ≻ G l e x ( t 1 , … , t n ) (s_1,\ldots,s_m) \mathrel{\succ_G^{\mathrm{lex}}} (t_1,\ldots,t_n) ( s 1 , … , s m ) ≻ G lex ( t 1 , … , t n )
Proof. For the “if” direction, it suffices to show that each of case 1, case 2A and case 2B entails s ≻ G t s \succ_G t s ≻ G t . If case 1 holds then trivially s ≻ G t s \succ_G t s ≻ G t . So let s = f ( s 1 , … , s m ) ⊒ A t s = f(s_1,\ldots,s_m) \sqsupseteq_A t s = f ( s 1 , … , s m ) ⊒ A t .
A. Assume that t t t is a variable. Since A A A is sensible, t t t occurs in s s s . So s ≻ G t s \succ_G t s ≻ G t follows from the subterm property.
B. Assume that t = g ( t 1 , … , t n ) t = g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) .
I. Suppose s ⊐ B t s \sqsupset_B t s ⊐ B t . Then g g g is not a special unary symbol, because otherwise we obtain a contradiction from t ⊒ B s ⊐ B t t \sqsupseteq_B s \sqsupset_B t t ⊒ B s ⊐ B t . So s ⊒ A t ⊐ A t j s \sqsupseteq_A t \sqsupset_A t_j s ⊒ A t ⊐ A t j and therefore s ≻ G t j s \succ_G t_j s ≻ G t j for all j j j . Hence, s ≻ G t s \succ_G t s ≻ G t by case 2b(i).
II. Suppose s ⊒ B t s \sqsupseteq_B t s ⊒ B t and ( s 1 , … , s m ) ≻ G l e x ( t 1 , … , t n ) (s_1,\ldots,s_m) \mathrel{\succ_G^{\mathrm{lex}}} (t_1,\ldots,t_n) ( s 1 , … , s m ) ≻ G lex ( t 1 , … , t n ) . If g g g is not a special unary symbol, then by the same argument as the previous case we can show that s ≻ G t s \succ_G t s ≻ G t by case 2b(ii). So assume that g g g is a special unary symbol. From ( s 1 , … , s m ) ≻ G l e x ( t 1 ) (s_1,\ldots,s_m) \mathrel{\succ_G^{\mathrm{lex}}} (t_1) ( s 1 , … , s m ) ≻ G lex ( t 1 ) we obtain s 1 ⊒ G t 1 s_1 \sqsupseteq_G t_1 s 1 ⊒ G t 1 . Since s ≻ G s 1 s \succ_G s_1 s ≻ G s 1 by the subterm property, we now have s ≻ G t 1 s \succ_G t_1 s ≻ G t 1 by transitivity. Hence, s ≻ G t s \succ_G t s ≻ G t by case 2b(ii).
For the “only-if” direction, it suffices to show that each case of s ≻ G t s \succ_G t s ≻ G t entails one of case 1, case 2A, and case 2B. Trivially, case 1 entails case 1, case 2b(i) entails case 2B(I), and case 2b(ii) entails case 2B(II). So assume that case 2a holds, namely s = f ( s 1 , … , s m ) ⊒ A t s = f(s_1,\ldots,s_m) \sqsupseteq_A t s = f ( s 1 , … , s m ) ⊒ A t and s i ⊒ G t s_i \sqsupseteq_G t s i ⊒ G t for some i i i . If t t t is a variable, then case 2A applies. So let t = g ( t 1 , … , t n ) t = g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) . If f f f is not a special unary symbol, then we have s ⊐ A s i ⊒ A t s \sqsupset_A s_i \sqsupseteq_A t s ⊐ A s i ⊒ A t or s ⊐ A s i ⊐ A t s \sqsupset_A s_i \sqsupset_A t s ⊐ A s i ⊐ A t , and therefore case 1 applies. Otherwise, s ⊒ B t s \sqsupseteq_B t s ⊒ B t and m = i = 1 m = i = 1 m = i = 1 . Since t ≻ G t 1 t \succ_G t_1 t ≻ G t 1 follows from the subterm property, we obtain s 1 ≻ G t 1 s_1 \succ_G t_1 s 1 ≻ G t 1 and thereby ( s 1 ) ≻ G l e x ( t 1 , … , t n ) (s_1) \mathrel{\succ_G^{\mathrm{lex}}} (t_1,\ldots,t_n) ( s 1 ) ≻ G lex ( t 1 , … , t n ) . Hence, case 2B(II) holds. □
Example 3.38 (continued from Example 3.26). Since x ⋅ A y = x + y + 1 x \mathbin{\cdot_A} y = x + y + 1 x ⋅ A y = x + y + 1 is strictly simple, ≻ A \succ_A ≻ A satisfies the subterm property, and thus ( ⊒ A , ≻ A ) (\sqsupseteq_A,\succ_A) ( ⊒ A , ≻ A ) is admissible for ( ⊒ # , ≻ # ) (\sqsupseteq^{\mathord{\#}},\succ^{\mathord{\#}}) ( ⊒ # , ≻ # ) . So Theorem 3.37 is available. Recall the derivation of t = ( x ⋅ z ) # ( y ⋅ z ) # ≻ G ( ( S ⋅ x ) ⋅ y ) # z = u t = (x \mathbin{\cdot} z)^{\mathord{\#}} (y \mathbin{\cdot} z)^{\mathord{\#}} \succ_G ((S \mathbin{\cdot} x) \mathbin{\cdot} y)^{\mathord{\#}} z = u t = ( x ⋅ z ) # ( y ⋅ z ) # ≻ G (( S ⋅ x ) ⋅ y ) # z = u . As t ⊒ A u t \sqsupseteq_A u t ⊒ A u and t ⊒ # u t \sqsupseteq^{\mathord{\#}} u t ⊒ # u , it is now derived by case 2B(I) of the theorem, without checking t ≻ G ( S ⋅ x ) ⋅ y t \succ_G (S \mathbin{\cdot} x) \mathbin{\cdot} y t ≻ G ( S ⋅ x ) ⋅ y or t ≻ G z t \succ_G z t ≻ G z .
Theorem 3.37 allows us to improve the complexity of deciding s ≻ G t s \succ_G t s ≻ G t in the following sense: Consider deciding s ≻ G t s \succ_G t s ≻ G t for fixed order pairs A A A and B B B . If we measure the number of comparisons by A A A and B B B , the best algorithm known so far (simply following that for the LPO [L06b]) requires a number of comparisons quadratic in ∣ s ∣ + ∣ t ∣ |s| + |t| ∣ s ∣ + ∣ t ∣ . If fortunately A A A is sensible and admissible for B B B , Theorem 3.37 suggests that the number of comparisons can be reduced to linear in ∣ s ∣ + ∣ t ∣ |s| + |t| ∣ s ∣ + ∣ t ∣ . This is an analog of the fact that KBO comparison s > K t s >_K t s > K t admits an implementation of linear time complexity (with respect to ∣ s ∣ + ∣ t ∣ |s| + |t| ∣ s ∣ + ∣ t ∣ ) [37 ] . We note that the simulation result (Theorem 3.33 ) allows us to apply the same optimization to the SPO induced by the lexicographic combination ( ⊒ A B , ⋢ A B ) (\sqsupseteq_{AB}, \mathrel{\not\sqsubseteq}_{AB}) ( ⊒ A B , ⊑ A B ) .
The requirement for A A A to be sensible cannot be dropped from Theorem 3.37 .
Example 3.39. Consider the signature F = { c ( 0 ) } \mathcal{F} = \{c^{(0)}\} F = { c ( 0 ) } . Let A A A and B B B be the trivial order pair ( T × T , ∅ ) (\mathcal{T} \times\mathcal{T}, \varnothing) ( T × T , ∅ ) . Since ▹ \triangleright ▹ is the empty relation ∅ \varnothing ∅ in this signature, A A A has the subterm property and is admissible for B B B , but it is not sensible. However, the GWPO > G >_G > G induced by A A A and B B B does not satisfy c > G x c >_G x c > G x while case 2A follows from c ⊒ A x c \sqsupseteq_A x c ⊒ A x . This pathological example also serves as a counterexample to [54 Theorem 3.3] by considering the algebra whose carrier is the set of all terms and ordered by the reduction pair A A A .
A precursor of the observation underlying Theorems 3.33 and 3.37 appears in the technical report by Geser [21 ] . More precisely, [21 Theorem 5] states that a variant of KBOs (which he attributes to Dershowitz [13 ] ) can be simulated by SPOs. For comparison, we present his observation in our order-pair based formulation. We first define our version of Dershowitz’s KBO.
Definition 3.40. Let ( ⊒ , ⋢ ) (\sqsupseteq, \mathrel{\not\sqsubseteq}) ( ⊒ , ⊑ ) be an order pair on terms. The relation > D >_D > D is inductively defined as follows: s > D t s >_D t s > D t if
s ⋢ t s \mathrel{\not\sqsubseteq} t s ⊑ t , or
s = f ( s 1 , … , s m ) ⊒ t s = f(s_1,\ldots,s_m) \sqsupseteq t s = f ( s 1 , … , s m ) ⊒ t and one of the following conditions holds. a. t t t is a variable b. t = g ( t 1 , … , t n ) t = g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) and ( s 1 , … , s m ) > D l e x ( t 1 , … , t n ) (s_1,\ldots,s_m) >^{\mathrm{lex}}_D (t_1,\ldots,t_n) ( s 1 , … , s m ) > D lex ( t 1 , … , t n )
One can find several differences between Definition 3.40 and Geser’s original formulation ([21 Definition 8.1] ). There, the order > D >_D > D is formulated as a quasi-order parameterized by another quasi-order; case 2 demands s ≡ t s \equiv t s ≡ t for the equivalence part ≡ \equiv ≡ of ⊒ \sqsupseteq ⊒ ; and case 2b allows a more general status extension including multiset extension. (The same goes for comparing his definition of the SPO with ours.) Now, Geser’s observation is stated as follows.
Corollary 3.41. Let ( ⊒ , ⋢ ) (\sqsupseteq,\mathrel{\not\sqsubseteq}) ( ⊒ , ⊑ ) be a stable and sensible order pair with ▹ ⊆ ⋢ \triangleright\subseteq\mathrel{\not\sqsubseteq} ▹ ⊆ ⊑ . The relations > S >_S > S and > D >_D > D are identical when both are induced by ( ⊒ , ⋢ ) (\sqsupseteq,\mathrel{\not\sqsubseteq}) ( ⊒ , ⊑ ) .
Proof. From ▹ ⊆ ⋢ \triangleright\subseteq\mathrel{\not\sqsubseteq} ▹ ⊆ ⊑ the subterm property of ( ⊒ , ⋢ ) (\sqsupseteq,\mathrel{\not\sqsubseteq}) ( ⊒ , ⊑ ) is guaranteed. So, by Theorem 3.33 > S >_S > S is identical to the GWPO > G >_G > G induced by ( ⊒ , ⋢ ) (\sqsupseteq,\mathrel{\not\sqsubseteq}) ( ⊒ , ⊑ ) and the trivial order pair ( T × T , ∅ ) (\mathcal{T} \times\mathcal{T}, \varnothing) ( T × T , ∅ ) . Thanks to ▹ ⊆ ⋢ \triangleright\subseteq\mathrel{\not\sqsubseteq} ▹ ⊆ ⊑ , the order pair ( ⊒ , ⋢ ) (\sqsupseteq,\mathrel{\not\sqsubseteq}) ( ⊒ , ⊑ ) is admissible for ( T × T , ∅ ) (\mathcal{T} \times\mathcal{T}, \varnothing) ( T × T , ∅ ) . So we conclude by observing the correspondence between case 2b of Definition 3.40 and case 2B of Theorem 3.37 with B B B trivial. □ \square □
We note that the subterm property of the strict order ⋢ \mathrel{\not\sqsubseteq} ⊑ cannot be replaced with that of the quasi-order ⊒ \sqsupseteq ⊒ in Corollary 3.41 . Even worse, > D >_D > D may not be well-founded.
Example 3.42. Let ( ⊒ , ⋢ ) (\sqsupseteq,\mathrel{\not\sqsubseteq}) ( ⊒ , ⊑ ) be the trivial order pair ( T × T , ∅ ) (\mathcal{T} \times\mathcal{T}, \varnothing) ( T × T , ∅ ) . The corresponding relation > D >_D > D admits the infinite sequence:
f ( g ( x ) , x ) > D f ( x , f ( g ( x ) , x ) ) > D f ( x , f ( x , f ( g ( x ) , x ) ) ) > D ⋯ f(g(x),x) >_D f(x,f(g(x),x)) >_D f(x,f(x,f(g(x),x))) >_D \cdots f ( g ( x ) , x ) > D f ( x , f ( g ( x ) , x )) > D f ( x , f ( x , f ( g ( x ) , x ))) > D ⋯ Here 2b is repeatedly applied together with g ( x ) > D x g(x) >_D x g ( x ) > D x . Also, > D >_D > D is not identical to any SPO > S >_S > S , because f ( x , f ( g ( x ) , x ) ) > S f ( g ( x ) , x ) f(x,f(g(x),x)) >_S f(g(x),x) f ( x , f ( g ( x ) , x )) > S f ( g ( x ) , x ) holds by definition.
In fact, the same example shows that [21 Theorems 4 and 5] , which state that his version of ≻ D \mathrel{\succ_D} ≻ D is well-founded and coincides with his SPO, do not hold as stated. The subterm property should instead be assumed for ⊐ \mathrel{\sqsupset} ⊐ rather than ⊒ \mathrel{\sqsupseteq} ⊒ .
Ground Totality
A strict order > > > on terms is ground total if either s > t s > t s > t or t > s t > s t > s holds for all ground terms s ≠ t s \ne t s = t . Here, ground terms are terms that contain no variable. Ground totality of reduction orders is of interest since refutational completeness of theorem proving procedures like ordered completion [5 ] relies on it. This subsection investigates the property for the (G)WPO and the SPO.
We begin with preliminary definitions. We say that a strict order > > > is total on a set X X X if either x > y x > y x > y or y > x y > x y > x holds for all different elements x , y ∈ X x,y \in X x , y ∈ X . (So, ground totality is totality restricted to ground terms.) We say that a quasi-order ≥ \geq ≥ is total on X X X if its strict part is total. An order pair ( ≥ , > ) (\geq,>) ( ≥ , > ) is almost total on X X X if x > y x > y x > y , x ≡ y x \equiv y x ≡ y or y > x y > x y > x holds for all x , y ∈ X x,y \in X x , y ∈ X . Here, ≡ \equiv ≡ is the equivalence part ≥ ∩ ≤ \geq\cap\leq ≥ ∩ ≤ of ≥ \geq ≥ . For example, the usual orders ≥ N \geq_{\mathbb{N}} ≥ N and > N >_{\mathbb{N}} > N on N \mathbb{N} N are total, and also the order pair ( ≥ N , > N ) (\geq_{\mathbb{N}},>_{\mathbb{N}}) ( ≥ N , > N ) is almost total.
We say an algebra A \mathcal{A} A is almost total if the underlying order pair ( ⪰ , ≻ ) (\succeq,\succ) ( ⪰ , ≻ ) is almost total on the domain. Polynomial interpretations and max/plus interpretations are such examples. The order pair ( ⪰ A , ≻ A ) (\succeq_{\mathcal{A}},\succ_{\mathcal{A}}) ( ⪰ A , ≻ A ) induced by an almost total algebra A \mathcal{A} A is almost total on ground terms. We note that ≻ A \succ_{\mathcal{A}} ≻ A may not be ground total even when ≻ \succ ≻ is total: for the polynomial interpretation A \mathcal{A} A of Example 2.4 with S A = K A = 1 S_{\mathcal{A}} = K_{\mathcal{A}} = 1 S A = K A = 1 we have neither S ≻ A K S \succ_{\mathcal{A}} K S ≻ A K nor K ≻ A S K \succ_{\mathcal{A}} S K ≻ A S .
The WPO gives rise to a ground-total reduction order, under reasonable assumptions.
Theorem 3.43. Let A \mathcal{A} A be an algebra that is well-founded, normal, weakly simple and monotone, and almost total. Let ⪰ \succeq ⪰ be a well-founded total precedence. Then the WPO > W >_{\mathrm{W}} > W induced by A \mathcal{A} A and ⪰ \succeq ⪰ is a ground-total reduction order.
Although the fact above is easy to prove and implicitly used in [31 ] , the authors are not aware of a published proof. Later we prove it by a more general result.
Unfortunately, in contrast to WPOs, MGWPOs may not be ground total, even when they are constructed from total algebras and precedences. The same goes for MSPOs by the simulation result (Corollary 3.35).
Example 3.44 (adapted from [59 ] ). Let F = { a ( 0 ) , b ( 0 ) , f ( 1 ) , g ( 1 ) } \mathcal{F} = \{a^{(0)}, b^{(0)}, f^{(1)}, g^{(1)}\} F = { a ( 0 ) , b ( 0 ) , f ( 1 ) , g ( 1 ) } , and let A \mathcal{A} A be the linear polynomial interpretation for F \mathcal{F} F with
a A = 1 b A = 1 f A ( x ) = x + 1 g A ( x ) = x + 1 a_{\mathcal{A}} = 1 \qquad b_{\mathcal{A}} = 1 \qquad f_{\mathcal{A}}(x) = x + 1 \qquad g_{\mathcal{A}}(x) = x + 1 a A = 1 b A = 1 f A ( x ) = x + 1 g A ( x ) = x + 1 and B \mathcal{B} B the following linear polynomial interpretation for F ∪ F ♯ \mathcal{F} \cup\mathcal{F}^{\sharp} F ∪ F ♯ .
a B = 1 b B = 0 f B ( x ) = x g B ( x ) = 0 a B ♯ = 0 b B ♯ = 1 f B ♯ ( x ) = x g B ♯ ( x ) = 0 a_{\mathcal{B}} = 1 \qquad b_{\mathcal{B}} = 0 \qquad f_{\mathcal{B}}(x) = x \qquad g_{\mathcal{B}}(x) = 0 \qquad a_{\mathcal{B}^{\sharp}} = 0 \qquad b_{\mathcal{B}^{\sharp}} = 1 \qquad f_{\mathcal{B}^{\sharp}}(x) = x \qquad g_{\mathcal{B}^{\sharp}}(x) = 0 a B = 1 b B = 0 f B ( x ) = x g B ( x ) = 0 a B ♯ = 0 b B ♯ = 1 f B ♯ ( x ) = x g B ♯ ( x ) = 0 The MGWPO > M G >_{\mathrm{MG}} > MG induced by ( ⪰ A , ⪰ A , ≻ A ) (\succeq_{\mathcal{A}},\succeq_{\mathcal{A}},\succ_{\mathcal{A}}) ( ⪰ A , ⪰ A , ≻ A ) and ( ⪰ B , ⪰ B ♯ , ≻ B ♯ ) (\succeq_{\mathcal{B}},\succeq_{\mathcal{B}^{\sharp}},\succ_{\mathcal{B}^{\sharp}}) ( ⪰ B , ⪰ B ♯ , ≻ B ♯ ) satisfies f ( a ) > M G f ( b ) f(a) >_{\mathrm{MG}} f(b) f ( a ) > MG f ( b ) and g ( b ) > M G g ( a ) g(b) >_{\mathrm{MG}} g(a) g ( b ) > MG g ( a ) . If > M G >_{\mathrm{MG}} > MG were ground total, then we would have either a > M G b a >_{\mathrm{MG}} b a > MG b or b > M G a b >_{\mathrm{MG}} a b > MG a , from which we obtain a contradiction using the monotonicity. Even worse, by the same argument we can show that there is no ground-total reduction order that extends > M G >_{\mathrm{MG}} > MG . Therefore, combining ( ⪰ B , ⪰ B ♯ , ≻ B ♯ ) (\succeq_{\mathcal{B}},\succeq_{\mathcal{B}^{\sharp}},\succ_{\mathcal{B}^{\sharp}}) ( ⪰ B , ⪰ B ♯ , ≻ B ♯ ) with a precedence (via Proposition 3.9 ) lexicographically does not resolve the issue.
An observation here is that even though a a a and b b b are incomparable with respect to > M G >_{\mathrm{MG}} > MG , we actually have b > G a b >_{\mathrm{G}} a b > G a . Indeed, we can show that > G >_{\mathrm{G}} > G is ground total under a few reasonable assumptions. We say that ( ⪰ , ⪰ ) (\succeq,\succeq) ( ⪰ , ⪰ ) discriminates root symbols if f = g f = g f = g whenever f ( t ⃗ ) ≡ g ( t ⃗ ) f(\vec{t}) \equiv g(\vec{t}) f ( t ) ≡ g ( t ) .
For instance, let ( ⪰ P , ≻ P ) (\succeq_P, \succ_P) ( ⪰ P , ≻ P ) be an order pair induced by a precedence ⪰ \succeq ⪰ (as in Proposition 3.9 ). If ⪰ \succeq ⪰ is total, then ( ⪰ P , ≻ P ) (\succeq_P, \succ_P) ( ⪰ P , ≻ P ) discriminates root symbols. With this in mind, Theorem 3.43 is proved from Theorem 3.18 and the following lemma.
Lemma 3.45. Let ( ⪰ A , ≻ A ) (\succeq_A, \succ_A) ( ⪰ A , ≻ A ) and ( ⪰ B , ≻ B ) (\succeq_B, \succ_B) ( ⪰ B , ≻ B ) be order pairs that are almost total on ground terms. If B B B discriminates root symbols, then the induced GWPO > G >_G > G satisfies s > G t s >_G t s > G t or t > G s t >_G s t > G s for all distinct ground terms s s s and t t t .
Proof. Let s = f ( s 1 , … , s m ) s = f(s_1,\ldots,s_m) s = f ( s 1 , … , s m ) and t = g ( t 1 , … , t n ) t = g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) be different ground terms. We prove s > G t s >_G t s > G t or t > G s t >_G s t > G s by induction on ∣ s ∣ + ∣ t ∣ |s| + |t| ∣ s ∣ + ∣ t ∣ . If s ≻ A t s \succ_A t s ≻ A t or t ≻ A s t \succ_A s t ≻ A s then we are done by case 1. So hereafter we assume s ⪰ A t s \succeq_A t s ⪰ A t and t ⪰ A s t \succeq_A s t ⪰ A s as A A A is almost total on ground terms. If s i ⪰ G t s_i \succeq_G t s i ⪰ G t or t i ⪰ G s t_i \succeq_G s t i ⪰ G s for some i i i , then we are done by case 2a. Otherwise, by the induction hypothesis, s > G t j s >_G t_j s > G t j for all 1 ≤ j ≤ n 1 \le j \le n 1 ≤ j ≤ n and t > G s i t >_G s_i t > G s i for all 1 ≤ i ≤ m 1 \le i \le m 1 ≤ i ≤ m . Then, we again use the assumption that B B B is almost total on ground terms. If s ≻ B t s \succ_B t s ≻ B t or t ≻ B s t \succ_B s t ≻ B s then we are done by case 2b(i). Otherwise, s ⪰ B t s \succeq_B t s ⪰ B t and t ⪰ B s t \succeq_B s t ⪰ B s . Since B B B discriminates root symbols and s ≠ t s \ne t s = t , we have ( s 1 , … , s m ) ≠ ( t 1 , … , t n ) (s_1,\ldots,s_m) \ne(t_1,\ldots,t_n) ( s 1 , … , s m ) = ( t 1 , … , t n ) . By the induction hypothesis together with the fact that lexicographic extension preserves totality, we have ( s 1 , … , s m ) > G l e x ( t 1 , … , t n ) (s_1,\ldots,s_m) >^{\mathrm{lex}}_G (t_1,\ldots,t_n) ( s 1 , … , s m ) > G lex ( t 1 , … , t n ) or ( t 1 , … , t n ) > G l e x ( s 1 , … , s m ) (t_1,\ldots,t_n) >^{\mathrm{lex}}_G (s_1,\ldots,s_m) ( t 1 , … , t n ) > G lex ( s 1 , … , s m ) . So case 2b(ii) applies.7
Note that ( ⪰ B ♯ , ≻ B ♯ ) (\succeq_B^{\sharp}, \succ_B^{\sharp}) ( ⪰ B ♯ , ≻ B ♯ ) of Example 3.44 does not discriminate root symbols, since both f ( b ) ⪰ B ♯ g ( b ) f(b) \succeq_B^{\sharp} g(b) f ( b ) ⪰ B ♯ g ( b ) and g ( b ) ⪰ B ♯ f ( b ) g(b) \succeq_B^{\sharp} f(b) g ( b ) ⪰ B ♯ f ( b ) hold. In such a case, we can simply combine it lexicographically with an order pair induced by a total precedence. This leads to the following construction: Let ⪰ \succeq ⪰ be a well-founded and total precedence, and A A A an ( F ∪ F ♯ ) (F \cup F^{\sharp}) ( F ∪ F ♯ ) -algebra that is almost total, normal, weakly monotone, well-founded, and weakly simple for F F F . Define ( ⪰ , ≻ ) (\succeq, \succ) ( ⪰ , ≻ ) as the lexicographic combination of ( ⪰ A ♯ , ≻ A ♯ ) (\succeq_A^{\sharp}, \succ_A^{\sharp}) ( ⪰ A ♯ , ≻ A ♯ ) and the order pair induced by ⪰ \succeq ⪰ . Consider the GWPO > G >_G > G induced by ( ⪰ A , ≻ A ) (\succeq_A, \succ_A) ( ⪰ A , ≻ A ) and ( ⪰ , ≻ ) (\succeq, \succ) ( ⪰ , ≻ ) . Then we have:
Theorem 3.46. The GWPO > G >_G > G defined as above is a ground-total reduction order.
Proof. To show that > G >_G > G is a reduction order, the key is that ( ⪰ A , ⪰ A , ≻ A ) (\succeq_A,\succeq_A,\succ_A) ( ⪰ A , ⪰ A , ≻ A ) and ( ⪰ A , ⪰ , ≻ ) (\succeq_A,\succeq,\succ) ( ⪰ A , ⪰ , ≻ ) are reduction triples with the subterm property of ⪰ A \succeq_A ⪰ A . Using the normality of A A A , we can show that > G >_G > G is identical to the MGWPO induced by those reduction triples, and therefore a reduction order. Finally, Lemma 3.45 shows that > G >_G > G is ground total.
We remark that we could show the termination of Example 3.26 with a ground-total reduction order by additionally using a total precedence as in Theorem 3.46 . Also, we note that Lemma 3.45 and Theorem 3.46 can be used for the SPO via the simulation result (Theorem 3.33 ).
Reduction Pairs
While we have considered the reduction-order versions of the MSPO and the (M)GWPO so far, the original WPO has been extended to reduction pairs so it can be used more effectively in the dependency pair framework. After recalling the dependency pair framework in Subsection 4.1, we introduce a reduction-pair version of the GWPO in Subsection 4.2. As a special case of it, in Subsection 4.3 we also present the SPO as a reduction pair, and discuss simulation of GWPOs (which does not hold as in Section 3). In Subsection 4.4 we discuss how to use the reduction pairs more effectively. Finally, Subsection 4.5 presents experimental data of GWPOs in the context of the dependency pair framework.
Dependency Pairs
We recall the dependency pair framework [AG00, GTSK05a, HM05, HM07]. Let R \mathcal{R} R be a TRS. We write D R \mathcal{D}_{\mathcal{R}} D R for the set { f ∣ f ( ℓ 1 , … , ℓ n ) → r ∈ R } \{f \mid f(\ell_1,\ldots,\ell_n) \to r \in\mathcal{R}\} { f ∣ f ( ℓ 1 , … , ℓ n ) → r ∈ R } of defined symbols . Other symbols are called constructor symbols . Given a term t t t of the form f ( t 1 , … , t n ) f(t_1,\ldots,t_n) f ( t 1 , … , t n ) with f ∈ D R f \in\mathcal{D}_{\mathcal{R}} f ∈ D R , we write t ♯ t^\sharp t ♯ for f ♯ ( t 1 , … , t n ) f^\sharp(t_1,\ldots,t_n) f ♯ ( t 1 , … , t n ) . Here f ♯ f^\sharp f ♯ is a fresh n n n -ary function symbol corresponding to f f f . The set of such terms t ♯ t^\sharp t ♯ is denoted by T ♯ \mathcal{T}^\sharp T ♯ . The TRS DP ( R ) \operatorname{DP}(\mathcal{R}) DP ( R ) is defined as follows:
DP ( R ) = { ℓ ♯ → t ♯ ∣ ℓ → r ∈ R , r ⊵ t , root ( t ) ∈ D R , and ℓ ⋭ t } \operatorname{DP}(\mathcal{R}) = \{\ell^\sharp\to t^\sharp\mid\ell\to r \in\mathcal{R},\ r \unrhd t,\ \operatorname{root}(t) \in\mathcal{D}_{\mathcal{R}},\ \text{and } \ell\not\trianglerighteq t\} DP ( R ) = { ℓ ♯ → t ♯ ∣ ℓ → r ∈ R , r ⊵ t , root ( t ) ∈ D R , and ℓ ⊵ t }
We note that the condition ℓ ⋭ t \ell\not\trianglerighteq t ℓ ⊵ t is Dershowitz’s refinement [14 ] . Rules in DP ( R ) \operatorname{DP}(\mathcal{R}) DP ( R ) are called dependency pairs . Dependency pair problems are pairs ( P , R ) (\mathcal{P},\mathcal{R}) ( P , R ) of TRSs with P ⊆ T ♯ × T ♯ \mathcal{P} \subseteq\mathcal{T}^\sharp\times\mathcal{T}^\sharp P ⊆ T ♯ × T ♯ and R ⊆ T × T \mathcal{R} \subseteq\mathcal{T} \times\mathcal{T} R ⊆ T × T . A dependency pair problem ( P , R ) (\mathcal{P},\mathcal{R}) ( P , R ) is finite if there exists no infinite sequence of the form s 1 → R ∗ t 1 → ϵ P s 2 → R ∗ t 2 → ϵ P ⋯ s_1 \to_{\mathcal{R}}^* t_1 \xrightarrow{\epsilon}_{\mathcal{P}} s_2 \to_{\mathcal{R}}^* t_2 \xrightarrow{\epsilon}_{\mathcal{P}} \cdots s 1 → R ∗ t 1 ϵ P s 2 → R ∗ t 2 ϵ P ⋯ , where each s i s_i s i is terminating with respect to R \mathcal{R} R .
Theorem 4.1. A TRS R \mathcal{R} R is terminating if and only if ( DP ( R ) , R ) (\operatorname{DP}(\mathcal{R}),\mathcal{R}) ( DP ( R ) , R ) is finite.
Whenever we apply the dependency pair framework to a concrete TRS, we stick to the following notational convention: for a function symbol f f f in the original signature F \mathcal{F} F , the capitalized symbol F F F (instead of f ♯ f^\sharp f ♯ ) denotes the corresponding copy introduced by the dependency pair framework. This is reasonable, e.g., when we use the dependency pair framework with the GWPO and Proposition 3.14, both of which perform marking with ♯ \sharp ♯ .
Example 4.2. Consider the fragment R \mathcal{R} R of the TRS encoding of factorial:
p ( s ( x ) ) → 1 x f ( s ( x ) ) → 2 s ( x ) × f ( p ( s ( x ) ) ) \begin{aligned}
p(s(x)) &\xrightarrow{1} x \\
f(s(x)) &\xrightarrow{2} s(x) \times f(p(s(x)))
\end{aligned} p ( s ( x )) f ( s ( x )) 1 x 2 s ( x ) × f ( p ( s ( x )))
The defined symbols are f f f and p p p , so DP ( R ) = { F ( s ( x ) ) → F ( p ( s ( x ) ) ) , F ( s ( x ) ) → P ( s ( x ) ) } \operatorname{DP}(\mathcal{R}) = \{F(s(x)) \to F(p(s(x))), F(s(x)) \to P(s(x))\} DP ( R ) = { F ( s ( x )) → F ( p ( s ( x ))) , F ( s ( x )) → P ( s ( x ))} .
Reduction pairs ( ⪰ , ≻ ) (\mathrel{\succeq}, \mathrel{\succ}) ( ⪰ , ≻ ) are common decreasing measures for the dependency pair framework. The next theorem is known as reduction pair processor .
Theorem 4.3. Let ( ⪰ , ≻ ) (\mathrel{\succeq}, \mathrel{\succ}) ( ⪰ , ≻ ) be a reduction pair. A dependency pair problem ( P , R ) (\mathcal{P},\mathcal{R}) ( P , R ) with P ∪ R ⊆ ⪰ \mathcal{P} \cup\mathcal{R} \subseteq\mathrel{\succeq} P ∪ R ⊆ ⪰ is finite if and only if ( P ∖ ≻ , R ) (\mathcal{P} \setminus\mathrel{\succ},\mathcal{R}) ( P ∖ ≻ , R ) is finite.
Since ( ∅ , R ) (\varnothing,\mathcal{R}) ( ∅ , R ) is trivially finite, the theorem above implies a simple method for showing termination by a reduction pair.
Corollary 4.4. A TRS R \mathcal{R} R is terminating if there is a reduction pair ( ⪰ , ≻ ) (\mathrel{\succeq}, \mathrel{\succ}) ( ⪰ , ≻ ) with R ⊆ ⪰ \mathcal{R} \subseteq\mathrel{\succeq} R ⊆ ⪰ and DP ( R ) ⊆ ≻ \operatorname{DP}(\mathcal{R}) \subseteq\mathrel{\succ} DP ( R ) ⊆ ≻ .
Example 4.5. (continued from Example 4.2). Let A \mathcal{A} A be the max/plus interpretation defined by f A ( x ) = F A ( x ) = s A ( x ) = x f_{\mathcal{A}}(x) = F_{\mathcal{A}}(x) = s_{\mathcal{A}}(x) = x f A ( x ) = F A ( x ) = s A ( x ) = x , x × A y = x + 1 x \times_{\mathcal{A}} y = x + 1 x × A y = x + 1 and p A ( x ) = P A ( x ) = max { 0 , x − 1 } p_{\mathcal{A}}(x) = P_{\mathcal{A}}(x) = \max\{0, x - 1\} p A ( x ) = P A ( x ) = max { 0 , x − 1 } . Then we have R ⊆ ⪰ A \mathcal{R} \subseteq\mathrel{\succeq}_{\mathcal{A}} R ⊆ ⪰ A and DP ( R ) ⊆ ≻ A \operatorname{DP}(\mathcal{R}) \subseteq\mathrel{\succ}_{\mathcal{A}} DP ( R ) ⊆ ≻ A . For instance, F ( s ( x ) ) ≻ A F ( p ( s ( x ) ) ) F(s(x)) \mathrel{\succ}_{\mathcal{A}} F(p(s(x))) F ( s ( x )) ≻ A F ( p ( s ( x ))) boils down to the valid inequality x + 2 > x + 1 x + 2 > x + 1 x + 2 > x + 1 for all natural numbers x x x . The others are also verified in a similar fashion. So, from Corollary 4.4 we conclude the termination of R \mathcal{R} R .
If a monotone reduction pair is employed, Theorem 4.3 can be strengthened in a way that some rules in R \mathcal{R} R can also be removed. This technique is known as rule removal processor , or just rule removal.
Theorem 4.6. Let ( ⪰ , ≻ ) (\mathrel{\succeq}, \mathrel{\succ}) ( ⪰ , ≻ ) be a monotone reduction pair. A dependency pair problem ( P , R ) (\mathcal{P},\mathcal{R}) ( P , R ) with P ∪ R ⊆ ⪰ \mathcal{P} \cup\mathcal{R} \subseteq\mathrel{\succeq} P ∪ R ⊆ ⪰ is finite if and only if ( P , R ∖ ≻ ) (\mathcal{P},\mathcal{R} \setminus\mathrel{\succ}) ( P , R ∖ ≻ ) is finite.
Argument filtering [AG00, KNT06] is a popular transformation for reduction pairs. As the name suggests, this transformation filters out arguments from a given term. Formally, an argument filter π \pi π is a mapping that associates each n n n -ary function symbol f f f to an integer i i i or a list [ i 1 , … , i m ] [i_1,\ldots,i_m] [ i 1 , … , i m ] of integers with 1 ≤ i 1 < ⋯ < i m ≤ n 1 \le i_1 < \cdots< i_m \le n 1 ≤ i 1 < ⋯ < i m ≤ n . If π ( f ) \pi(f) π ( f ) is a list for every function symbol f f f , then the argument filtering is called non-collapsing . Non-collapsing argument filters are also called partial statuses .8 The argument filtering π ^ \hat{\pi} π ^ is defined on terms as follows:
π ^ ( t ) = { t if t is a variable π ^ ( t i ) if t = f ( t 1 , … , t n ) and π ( f ) = i f ( π ^ ( t i 1 ) , … , π ^ ( t i m ) ) if t = f ( t 1 , … , t n ) and π ( f ) = [ i 1 , … , i m ] \hat{\pi}(t) =
\begin{cases}
t & \text{if } t \text{ is a variable}\\
\hat{\pi}(t_i) & \text{if } t = f(t_1,\ldots,t_n) \text{ and } \pi(f) = i\\
f(\hat{\pi}(t_{i_1}),\ldots,\hat{\pi}(t_{i_m})) & \text{if } t = f(t_1,\ldots,t_n) \text{ and } \pi(f) = [i_1,\ldots,i_m]
\end{cases} π ^ ( t ) = ⎩ ⎨ ⎧ t π ^ ( t i ) f ( π ^ ( t i 1 ) , … , π ^ ( t i m )) if t is a variable if t = f ( t 1 , … , t n ) and π ( f ) = i if t = f ( t 1 , … , t n ) and π ( f ) = [ i 1 , … , i m ]
Note that by applying π ^ \hat{\pi} π ^ , arities of function symbols may change, or some function symbols may be even eliminated. So more precisely, terms after argument filtering are of a different signature. We write F π \mathcal{F}^{\pi} F π for it to distinguish from the original signature F \mathcal{F} F . Given a binary relation R R R on terms, we write s R π t s\mathrel{R^{\pi}}t s R π t if π ^ ( s ) R π ^ ( t ) \hat{\pi}(s)\mathrel{R}\hat{\pi}(t) π ^ ( s ) R π ^ ( t ) .
Proposition 4.7. Let ( ≥ , > ) (\mathrel{\geq},>) ( ≥ , > ) be a reduction pair and π \pi π an argument filter. Then ( ≥ π , > π ) (\mathrel{\geq}^{\pi},>^{\pi}) ( ≥ π , > π ) is a reduction pair.
Although Proposition 4.7 can be used with the WPO as a reduction order (Definition 3.17 ), a dedicated version of the WPO as a reduction pair is known. Let π \pi π be a partial status. We abuse i ∈ π ( f ) i \in\pi(f) i ∈ π ( f ) to mean that i i i occurs in the list π ( f ) \pi(f) π ( f ) . Similarly, we may identify the list π ( f ) \pi(f) π ( f ) and the corresponding set, because here we only consider an increasing list of argument positions for π ( f ) \pi(f) π ( f ) . If π ( f ) = [ 1 , … , n ] \pi(f) = [1,\ldots,n] π ( f ) = [ 1 , … , n ] for all f ( n ) ∈ F f^{(n)} \in\mathcal{F} f ( n ) ∈ F , we call π \pi π total . Similarly, if π ( f ) = [ ] \pi(f) = [\,] π ( f ) = [ ] for all f ∈ F f \in\mathcal{F} f ∈ F , we call π \pi π empty . Note that when the signature contains only constants, the unique partial status is both empty and total. If π ( f ) = [ i 1 , … , i n ] \pi(f) = [i_1,\ldots,i_n] π ( f ) = [ i 1 , … , i n ] with i 1 ≤ ⋯ ≤ i n i_1 \le\cdots\le i_n i 1 ≤ ⋯ ≤ i n then we write ( t i 1 , … , t i n ) (t_{i_1},\ldots,t_{i_n}) ( t i 1 , … , t i n ) as π ( f ) ( t 1 , … , t m ) \pi(f)(t_1,\ldots,t_m) π ( f ) ( t 1 , … , t m ) .
Below, we define a reduction-pair version of the WPO, reusing the notation > W >_{\mathrm{W}} > W for brevity. The same convention applies to the upcoming GWPO/SPO.
Definition 4.8. Let π \pi π be a partial status, A \mathcal{A} A an algebra, and ⪰ \succeq ⪰ a precedence. The weighted path order ( ⪰ W , > W ) (\mathrel{\succeq_{\mathrm{W}}},>_{\mathrm{W}}) ( ⪰ W , > W ) is the pair of relations on terms defined simultaneously as follows:
s ⪰ W t s \succeq_{\mathrm{W}} t s ⪰ W t if
s > A t s >_{\mathcal{A}} t s > A t , or
s ⪰ A t s \succeq_{\mathcal{A}} t s ⪰ A t and one of the following conditions holds: a. s = f ( s 1 , … , s m ) s = f(s_1,\ldots,s_m) s = f ( s 1 , … , s m ) and s i ⪰ W t s_i \succeq_{\mathrm{W}} t s i ⪰ W t for some i ∈ π ( f ) i \in\pi(f) i ∈ π ( f ) . b. s = f ( s 1 , … , s m ) s = f(s_1,\ldots,s_m) s = f ( s 1 , … , s m ) , t = g ( t 1 , … , t n ) t = g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) , s > W t j s >_{\mathrm{W}} t_j s > W t j for all j ∈ π ( g ) j \in\pi(g) j ∈ π ( g ) , and (i) f ≻ g f \succ g f ≻ g or (ii) f ⪰ g f \succeq g f ⪰ g and π ( f ) ( s 1 , … , s m ) ⪰ W l e x π ( g ) ( t 1 , … , t n ) \pi(f)(s_1,\ldots,s_m) \succeq_{\mathrm{W}}^{\mathrm{lex}} \pi(g)(t_1,\ldots,t_n) π ( f ) ( s 1 , … , s m ) ⪰ W lex π ( g ) ( t 1 , … , t n ) . c. s ∈ V s \in\mathcal{V} s ∈ V and s = t s = t s = t
The relation > W >_{\mathrm{W}} > W is defined by cases 1, 2a and 2b where ⪰ W l e x \succeq_{\mathrm{W}}^{\mathrm{lex}} ⪰ W lex is replaced by > W l e x >_{\mathrm{W}}^{\mathrm{lex}} > W lex . Here ( ⪰ W l e x , > W l e x ) (\succeq_{\mathrm{W}}^{\mathrm{lex}},>_{\mathrm{W}}^{\mathrm{lex}}) ( ⪰ W lex , > W lex ) is the lexicographic extension of ( ⪰ W , > W ) (\succeq_{\mathrm{W}},>_{\mathrm{W}}) ( ⪰ W , > W ) .
We say that an algebra A \mathcal{A} A is weakly (resp. strictly ) π \pi π -simple if the argument position i i i is weakly (resp. strictly) simple for all function symbols f f f and i ∈ π ( f ) i \in\pi(f) i ∈ π ( f ) .
Theorem 4.9 [57 ] . Let π \pi π be a partial status, ≽ \succcurlyeq ≽ a well-founded precedence, and A \mathcal{A} A an algebra that is well-founded, normal, weakly π \pi π -simple and weakly monotone. Then ( ≽ W , ≻ W ) (\succcurlyeq_{\mathsf{W}},\succ_{\mathsf{W}}) ( ≽ W , ≻ W ) is a reduction pair. If in addition π \pi π is total, then ( ≽ W , ≻ W ) (\succcurlyeq_{\mathsf{W}},\succ_{\mathsf{W}}) ( ≽ W , ≻ W ) is a monotone reduction pair.
The assumption of weak π \pi π -simplicity is essential for well-foundedness; see Example 3.19.
Example 4.10 (Continued from Example 4.2). To show the termination of R \mathcal{R} R , consider the linear polynomial interpretation A \mathcal{A} A with
s A ( x ) = x + 1 x × A y = x f A ( x ) = p A ( x ) = F A ( x ) = P A ( x ) = x s_{\mathcal{A}}(x)=x+1 \qquad x \times_{\mathcal{A}} y=x \qquad f_{\mathcal{A}}(x)=p_{\mathcal{A}}(x)=F_{\mathcal{A}}(x)=P_{\mathcal{A}}(x)=x s A ( x ) = x + 1 x × A y = x f A ( x ) = p A ( x ) = F A ( x ) = P A ( x ) = x and the partial status π \pi π with π ( p ) = [ ] \pi(p)=[\ ] π ( p ) = [ ] and π ( g ) = [ 1 ] \pi(g)=[1] π ( g ) = [ 1 ] for other function symbols g g g . The WPO ( ≽ W , ≻ W ) (\succcurlyeq_{\mathsf{W}},\succ_{\mathsf{W}}) ( ≽ W , ≻ W ) induced from A \mathcal{A} A , π \pi π and the precedence with s ≻ f ≻ F ≻ p ≻ P ≻ × s\succ f\succ F\succ p\succ P\succ\times s ≻ f ≻ F ≻ p ≻ P ≻ × satisfies R ⊆ ≽ W \mathcal{R}\subseteq\succcurlyeq_{\mathsf{W}} R ⊆ ≽ W and also DP ( R ) ⊆ ≻ W \operatorname{DP}(\mathcal{R})\subseteq\succ_{\mathsf{W}} DP ( R ) ⊆ ≻ W . To elaborate, p ( s ( x ) ) ≽ W x p(s(x))\succcurlyeq_{\mathsf{W}}x p ( s ( x )) ≽ W x follows from case 1, f ( s ( x ) ) ≽ W s ( x ) × f ( p ( s ( x ) ) ) f(s(x))\succcurlyeq_{\mathsf{W}}s(x)\times f(p(s(x))) f ( s ( x )) ≽ W s ( x ) × f ( p ( s ( x ))) from case 2b(i), and F ( s ( x ) ) ≻ W P ( s ( x ) ) F(s(x))\succ_{\mathsf{W}}P(s(x)) F ( s ( x )) ≻ W P ( s ( x )) from case 2b(i). The remaining inequality F ( s ( x ) ) ≻ W F ( p ( s ( x ) ) ) F(s(x))\succ_{\mathsf{W}}F(p(s(x))) F ( s ( x )) ≻ W F ( p ( s ( x ))) is verified as follows:
F ( s ( x ) ) ≽ A F ( p ( s ( x ) ) ) F ≻ p F ( s ( x ) ) ≻ W p ( s ( x ) ) 2b(i) s ( x ) ≽ A p ( s ( x ) ) s ≻ p s ( x ) ≻ W p ( s ( x ) ) 2b(i) F ( s ( x ) ) ≻ W F ( p ( s ( x ) ) ) 2b(ii) \begin{aligned}
F(s(x))&\succcurlyeq_{\mathcal{A}}F(p(s(x))) & F\succ p\\
F(s(x))&\succ_{\mathsf{W}}p(s(x)) & \text{2b(i)}\\
s(x)&\succcurlyeq_{\mathcal{A}}p(s(x)) & s\succ p\\
s(x)&\succ_{\mathsf{W}}p(s(x)) & \text{2b(i)}\\
F(s(x))&\succ_{\mathsf{W}}F(p(s(x))) & \text{2b(ii)}
\end{aligned} F ( s ( x )) F ( s ( x )) s ( x ) s ( x ) F ( s ( x )) ≽ A F ( p ( s ( x ))) ≻ W p ( s ( x )) ≽ A p ( s ( x )) ≻ W p ( s ( x )) ≻ W F ( p ( s ( x ))) F ≻ p 2b(i) s ≻ p 2b(i) 2b(ii) Here π ( p ) = [ ] \pi(p)=[\ ] π ( p ) = [ ] is used for avoiding the undesired comparison s ( x ) ≻ W s ( x ) s(x)\succ_{\mathsf{W}}s(x) s ( x ) ≻ W s ( x ) for the second occurrence of 2b(i). Using Corollary 4.4 we conclude the termination of R \mathcal{R} R .
GWPO as Reduction Pair
As in the reduction-order setting, a reduction-pair version of the GWPO is obtained by generalizing the parameters of the WPO to order pairs.
Definition 4.11. Let π \pi π be a partial status, and let ( ⊵ A , ▹ A ) (\unrhd_{\mathcal{A}},\triangleright_{\mathcal{A}}) ( ⊵ A , ▹ A ) and ( ⊵ B , ▹ B ) (\unrhd_{\mathcal{B}},\triangleright_{\mathcal{B}}) ( ⊵ B , ▹ B ) be pairs of relations on terms. The generalized weighted path order ( ≽ G , ≻ G ) (\succcurlyeq_{\mathsf{G}},\succ_{\mathsf{G}}) ( ≽ G , ≻ G ) is a pair of relations on terms defined simultaneously as follows: s ≽ G t s\succcurlyeq_{\mathsf{G}}t s ≽ G t if
s ▹ A t s\triangleright_{\mathcal{A}}t s ▹ A t or
s ⊵ A t s\unrhd_{\mathcal{A}}t s ⊵ A t and one of the following conditions holds. a. s = f ( s 1 , … , s m ) s=f(s_1,\ldots,s_m) s = f ( s 1 , … , s m ) and s i ≽ G t s_i\succcurlyeq_{\mathsf{G}}t s i ≽ G t for some i ∈ π ( f ) i\in\pi(f) i ∈ π ( f ) . b. s = f ( s 1 , … , s m ) s=f(s_1,\ldots,s_m) s = f ( s 1 , … , s m ) , t = g ( t 1 , … , t n ) t=g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) , s ≻ G t j s\succ_{\mathsf{G}}t_j s ≻ G t j for all j ∈ π ( g ) j\in\pi(g) j ∈ π ( g ) , and (i) s ▹ B t s\triangleright_{\mathcal{B}}t s ▹ B t or (ii) s ⊵ B t s\unrhd_{\mathcal{B}}t s ⊵ B t and π ( f ) ( s 1 , … , s m ) ≽ G l e x π ( g ) ( t 1 , … , t n ) \pi(f)(s_1,\ldots,s_m)\succcurlyeq_{\mathsf{G}}^{\mathrm{lex}}\pi(g)(t_1,\ldots,t_n) π ( f ) ( s 1 , … , s m ) ≽ G lex π ( g ) ( t 1 , … , t n ) . c. s ∈ V s\in\mathcal{V} s ∈ V and s = t s=t s = t
The relation ≻ G \succ_{\mathsf{G}} ≻ G is defined by cases 1, 2a and 2b where ≽ G l e x \succcurlyeq_{\mathsf{G}}^{\mathrm{lex}} ≽ G lex is replaced by ≻ G l e x \succ_{\mathsf{G}}^{\mathrm{lex}} ≻ G lex . Here ( ≽ G l e x , ≻ G l e x ) (\succcurlyeq_{\mathsf{G}}^{\mathrm{lex}},\succ_{\mathsf{G}}^{\mathrm{lex}}) ( ≽ G lex , ≻ G lex ) is the lexicographic extension of ( ≽ G , ≻ G ) (\succcurlyeq_{\mathsf{G}},\succ_{\mathsf{G}}) ( ≽ G , ≻ G ) .
As is done for the original weighted path order in [57 Section 4.2] , it is possible to incorporate more refinements in Definition 4.11. This is considered in the first author’s dissertation [41 ] , see § 5 for a brief discussion.
As in the reduction-order setting, we define a monotonic version of the generalized weighted path order.
Definition 4.12. Let π \pi π be a partial status, and let ( ≽ A , ⊵ A , ▹ A ) (\succcurlyeq_{\mathcal{A}},\unrhd_{\mathcal{A}},\triangleright_{\mathcal{A}}) ( ≽ A , ⊵ A , ▹ A ) and ( ≽ B , ⊵ B , ▹ B ) (\succcurlyeq_{\mathcal{B}},\unrhd_{\mathcal{B}},\triangleright_{\mathcal{B}}) ( ≽ B , ⊵ B , ▹ B ) be triples of relations on terms. The monotonic generalized weighted path order ( ≽ M G , ▹ M G ) (\succcurlyeq_{\mathsf{MG}},\triangleright_{\mathsf{MG}}) ( ≽ MG , ▹ MG ) is defined as the pair of ≽ A ∩ ≽ B ∩ ≽ G \succcurlyeq_{\mathcal{A}}\cap\succcurlyeq_{\mathcal{B}}\cap\succcurlyeq_{\mathsf{G}} ≽ A ∩ ≽ B ∩ ≽ G and ≽ A ∩ ≽ B ∩ ≻ G \succcurlyeq_{\mathcal{A}}\cap\succcurlyeq_{\mathcal{B}}\cap\succ_{\mathsf{G}} ≽ A ∩ ≽ B ∩ ≻ G where ( ≽ G , ≻ G ) (\succcurlyeq_{\mathsf{G}},\succ_{\mathsf{G}}) ( ≽ G , ≻ G ) is induced by ( ⊵ A , ▹ A ) (\unrhd_{\mathcal{A}},\triangleright_{\mathcal{A}}) ( ⊵ A , ▹ A ) and ( ⊵ B , ▹ B ) (\unrhd_{\mathcal{B}},\triangleright_{\mathcal{B}}) ( ⊵ B , ▹ B ) .
We say that an order pair ( ⪰ , ≻ ) (\succeq,\succ) ( ⪰ , ≻ ) on terms is simple with respect to a partial status π \pi π if f ( t 1 , … , t n ) ⪰ t i f(t_1,\ldots,t_n) \succeq t_i f ( t 1 , … , t n ) ⪰ t i or f ( t 1 , … , t n ) ≻ t i f(t_1,\ldots,t_n) \succ t_i f ( t 1 , … , t n ) ≻ t i holds for all function symbols f ( n ) f^{(n)} f ( n ) , terms t 1 , … , t n t_1,\ldots,t_n t 1 , … , t n and i ∈ π ( f ) i \in\pi(f) i ∈ π ( f ) . This is an analog of simplicity of algebras with respect to partial statuses which is demanded for the reduction-pair version of WPO. Here we arrive at our main theorem.
Theorem 4.13. Let π \pi π be a partial status, and ( ⪰ A , ⪰ A , ≻ A ) (\succeq_A,\succeq_A,\succ_A) ( ⪰ A , ⪰ A , ≻ A ) and ( ⪰ B , ⪰ B , ≻ B ) (\succeq_B,\succeq_B,\succ_B) ( ⪰ B , ⪰ B , ≻ B ) reduction triples. If ( ⪰ A , ≻ A ) (\succeq_A,\succ_A) ( ⪰ A , ≻ A ) is simple with respect to π \pi π , then ( ⪰ M G , ≻ G ) (\succeq_{MG},\succ_G) ( ⪰ M G , ≻ G ) is a reduction pair.
In fact, the proof is easily done by replaying that for the original WPO. For completeness, the proofs are included in Appendix A.
The original weighted path order as a reduction pair (Theorem 4.9 ) is obtained by instantiating ( ⪰ A , ⪰ A , ≻ A ) (\succeq_A,\succeq_A,\succ_A) ( ⪰ A , ⪰ A , ≻ A ) with ( ⪰ A , ⪰ A , ≻ A ) (\succeq_A,\succeq_A,\succ_A) ( ⪰ A , ⪰ A , ≻ A ) , and ( ⪰ B , ⪰ B , ≻ B ) (\succeq_B,\succeq_B,\succ_B) ( ⪰ B , ⪰ B , ≻ B ) with the reduction pair induced by precedence. As we expect, the weak π \pi π -simplicity of A A A guarantees that ( ⪰ A , ≻ A ) (\succeq_A,\succ_A) ( ⪰ A , ≻ A ) is simple with respect to π \pi π .
Now, let us look at a termination proof by Theorem 4.13 .
Example 4.14. Consider the TRS R \mathcal{R} R taken from [2 Example 3.4] :
m ( x , 0 ) → 1 0 p ( 0 , y ) → 4 y q ( 0 , s ( y ) ) → 6 0 m ( s ( x ) , s ( y ) ) → 2 m ( x , y ) p ( s ( x ) , y ) → 5 s ( p ( x , y ) ) q ( s ( x ) , s ( y ) ) → 7 s ( q ( m ( x , y ) , s ( y ) ) ) m ( m ( x , y ) , z ) → 3 m ( x , p ( y , z ) ) \begin{aligned}
m(x,0)&\xrightarrow{1}0 & p(0,y)&\xrightarrow{4}y & q(0,s(y))&\xrightarrow{6}0\\
m(s(x),s(y))&\xrightarrow{2}m(x,y) & p(s(x),y)&\xrightarrow{5}s(p(x,y)) & q(s(x),s(y))&\xrightarrow{7}s(q(m(x,y),s(y)))\\
m(m(x,y),z)&\xrightarrow{3}m(x,p(y,z))
\end{aligned} m ( x , 0 ) m ( s ( x ) , s ( y )) m ( m ( x , y ) , z ) 1 0 2 m ( x , y ) 3 m ( x , p ( y , z )) p ( 0 , y ) p ( s ( x ) , y ) 4 y 5 s ( p ( x , y )) q ( 0 , s ( y )) q ( s ( x ) , s ( y )) 6 0 7 s ( q ( m ( x , y ) , s ( y ))) Here m m m stands for minus, p p p plus, and q q q quotient. The set DP ( R ) \operatorname{DP}(\mathcal{R}) DP ( R ) consists of six rules:
M ( s ( x ) , s ( y ) ) → 8 M ( x , y ) M ( m ( x , y ) , z ) → 9 M ( x , p ( y , z ) ) M ( m ( x , y ) , z ) → 10 P ( y , z ) P ( s ( x ) , y ) → 11 P ( x , y ) Q ( s ( x ) , s ( y ) ) → 12 Q ( m ( x , y ) , s ( y ) ) Q ( s ( x ) , s ( y ) ) → 13 M ( x , y ) \begin{aligned}
M(s(x),s(y))&\xrightarrow{8}M(x,y) & M(m(x,y),z)&\xrightarrow{9}M(x,p(y,z)) & M(m(x,y),z)&\xrightarrow{10}P(y,z)\\
P(s(x),y)&\xrightarrow{11}P(x,y) & Q(s(x),s(y))&\xrightarrow{12}Q(m(x,y),s(y)) & Q(s(x),s(y))&\xrightarrow{13}M(x,y)
\end{aligned} M ( s ( x ) , s ( y )) P ( s ( x ) , y ) 8 M ( x , y ) 11 P ( x , y ) M ( m ( x , y ) , z ) Q ( s ( x ) , s ( y )) 9 M ( x , p ( y , z )) 12 Q ( m ( x , y ) , s ( y )) M ( m ( x , y ) , z ) Q ( s ( x ) , s ( y )) 10 P ( y , z ) 13 M ( x , y ) Let A \mathcal{A} A be the linear polynomial interpretation over N \mathbb{N} N defined by
0 A = 0 s A ( x ) = x + 1 0 A ♯ = 0 s A ♯ ( x ) = 0 m A ( x , y ) = x M A ( x , y ) = x + 1 m A ♯ ( x , y ) = x M A ♯ ( x , y ) = x p A ( x , y ) = x + y + 1 P A ( x , y ) = 0 p A ♯ ( x , y ) = 1 P A ♯ ( x , y ) = x q A ( x , y ) = x + 1 Q A ( x , y ) = x + 1 q A ♯ ( x , y ) = 1 Q A ♯ ( x , y ) = x \begin{aligned}
0_{\mathcal{A}}&=0 & s_{\mathcal{A}}(x)&=x+1 & 0_{\mathcal{A}}^{\sharp}&=0 & s_{\mathcal{A}}^{\sharp}(x)&=0\\
m_{\mathcal{A}}(x,y)&=x & M_{\mathcal{A}}(x,y)&=x+1 & m_{\mathcal{A}}^{\sharp}(x,y)&=x & M_{\mathcal{A}}^{\sharp}(x,y)&=x\\
p_{\mathcal{A}}(x,y)&=x+y+1 & P_{\mathcal{A}}(x,y)&=0 & p_{\mathcal{A}}^{\sharp}(x,y)&=1 & P_{\mathcal{A}}^{\sharp}(x,y)&=x\\
q_{\mathcal{A}}(x,y)&=x+1 & Q_{\mathcal{A}}(x,y)&=x+1 & q_{\mathcal{A}}^{\sharp}(x,y)&=1 & Q_{\mathcal{A}}^{\sharp}(x,y)&=x
\end{aligned} 0 A m A ( x , y ) p A ( x , y ) q A ( x , y ) = 0 = x = x + y + 1 = x + 1 s A ( x ) M A ( x , y ) P A ( x , y ) Q A ( x , y ) = x + 1 = x + 1 = 0 = x + 1 0 A ♯ m A ♯ ( x , y ) p A ♯ ( x , y ) q A ♯ ( x , y ) = 0 = x = 1 = 1 s A ♯ ( x ) M A ♯ ( x , y ) P A ♯ ( x , y ) Q A ♯ ( x , y ) = 0 = x = x = x and π \pi π the partial status with π ( M ) = π ( m ) = [ 1 ] \pi(M)=\pi(m)=[1] π ( M ) = π ( m ) = [ 1 ] and π ( f ) = [ ] \pi(f)=[\,] π ( f ) = [ ] for other function symbols f f f . The order pair ( ⪰ A , ≻ A ) (\succeq_A,\succ_A) ( ⪰ A , ≻ A ) is simple with respect to π \pi π since the first arguments of m m m and M M M are taken into account in A \mathcal{A} A . So, we construct the reduction pair ( ⪰ M G , ≻ G ) (\succeq_{MG},\succ_G) ( ⪰ M G , ≻ G ) by Theorem 4.13 with the reduction triples ( ⪰ A , ⪰ A , ≻ A ) (\succeq_A,\succeq_A,\succ_A) ( ⪰ A , ⪰ A , ≻ A ) and ( ⪰ A , ⪰ A ♯ , ≻ A ♯ ) (\succeq_A,\succeq_A^{\sharp},\succ_A^{\sharp}) ( ⪰ A , ⪰ A ♯ , ≻ A ♯ ) . To conclude that R \mathcal{R} R is terminating, it suffices to show R ⊆ ⪰ M G \mathcal{R} \subseteq\succeq_{MG} R ⊆ ⪰ M G and DP ( R ) ⊆ ≻ G \operatorname{DP}(\mathcal{R}) \subseteq\succ_G DP ( R ) ⊆ ≻ G . This can be seen as follows. Since { 1 , 2 , 4 , 6 , 8 , 10 , 12 , 13 } ⊆ ≻ A \{1,2,4,6,8,10,12,13\} \subseteq\succ_A { 1 , 2 , 4 , 6 , 8 , 10 , 12 , 13 } ⊆ ≻ A , these are handled by case 1. The other rules are oriented by ⪰ A \succeq_A ⪰ A , so we compare them after marking the root symbols.
3 : m A ♯ ( m ( x , y ) , z ) ⪰ A m A ♯ ( x , p ( y , z ) ) 9 : M A ♯ ( m ( x , y ) , z ) ⪰ A M A ♯ ( x , p ( y , z ) ) 5 : p A ♯ ( s ( x ) , y ) ≻ A s A ♯ ( p ( x , y ) ) 11 : P A ♯ ( s ( x ) , y ) ≻ A P A ♯ ( x , y ) 7 : q A ♯ ( s ( x ) , s ( y ) ) ≻ A s A ♯ ( q ( m ( x , y ) , s ( y ) ) ) \begin{aligned}
3:\quad&m_{\mathcal{A}}^{\sharp}(m(x,y),z)\succeq_A m_{\mathcal{A}}^{\sharp}(x,p(y,z)) & 9:\quad&M_{\mathcal{A}}^{\sharp}(m(x,y),z)\succeq_A M_{\mathcal{A}}^{\sharp}(x,p(y,z))\\
5:\quad&p_{\mathcal{A}}^{\sharp}(s(x),y)\succ_A s_{\mathcal{A}}^{\sharp}(p(x,y)) & 11:\quad&P_{\mathcal{A}}^{\sharp}(s(x),y)\succ_A P_{\mathcal{A}}^{\sharp}(x,y)\\
7:\quad&q_{\mathcal{A}}^{\sharp}(s(x),s(y))\succ_A s_{\mathcal{A}}^{\sharp}(q(m(x,y),s(y)))
\end{aligned} 3 : 5 : 7 : m A ♯ ( m ( x , y ) , z ) ⪰ A m A ♯ ( x , p ( y , z )) p A ♯ ( s ( x ) , y ) ≻ A s A ♯ ( p ( x , y )) q A ♯ ( s ( x ) , s ( y )) ≻ A s A ♯ ( q ( m ( x , y ) , s ( y ))) 9 : 11 : M A ♯ ( m ( x , y ) , z ) ⪰ A M A ♯ ( x , p ( y , z )) P A ♯ ( s ( x ) , y ) ≻ A P A ♯ ( x , y ) For rules 3 and 9 we further apply recursive comparison by case 2b(ii).
In the example above, some arguments ignored by π \pi π are used by the interpretation A \mathcal{A} A , see for example p A ( x , y ) = x + y + 1 p_{\mathcal{A}}(x,y)=x+y+1 p A ( x , y ) = x + y + 1 . This is an advantage of having partial status built in compared to applying the GWPO with the total status followed by argument filtering. As with the case of the WPO [57 Proposition 1] , the latter with a non-collapsing argument filter can be simulated by the former, although the two approaches are incomparable in general (as argument filtering allows collapsing). Formally, let F \mathcal{F} F be the signature, π \pi π a non-collapsing argument filter (therefore a partial status), and ( ⪰ A , ⊒ A , ⊐ A ) (\mathrel{\succeq_A},\mathrel{\sqsupseteq_A},\mathrel{\sqsupset_A}) ( ⪰ A , ⊒ A , ⊐ A ) and ( ⪰ B , ⊒ B , ⊐ B ) (\mathrel{\succeq_B},\mathrel{\sqsupseteq_B},\mathrel{\sqsupset_B}) ( ⪰ B , ⊒ B , ⊐ B ) reduction triples on T ( F π , V ) \mathcal{T}(\mathcal{F}^{\pi},\mathcal{V}) T ( F π , V ) . Define ( ⪰ A ′ , ⊒ A ′ , ⊐ A ′ ) (\mathrel{\succeq_{A'}},\mathrel{\sqsupseteq_{A'}},\mathrel{\sqsupset_{A'}}) ( ⪰ A ′ , ⊒ A ′ , ⊐ A ′ ) on T ( F , V ) \mathcal{T}(\mathcal{F},\mathcal{V}) T ( F , V ) as ( ⪰ A π , ⊒ A π , ⊐ A π ) (\mathrel{\succeq_A^\pi},\mathrel{\sqsupseteq_A^\pi},\mathrel{\sqsupset_A^\pi}) ( ⪰ A π , ⊒ A π , ⊐ A π ) , and similarly define ( ⪰ B ′ , ⊒ B ′ , ⊐ B ′ ) (\mathrel{\succeq_{B'}},\mathrel{\sqsupseteq_{B'}},\mathrel{\sqsupset_{B'}}) ( ⪰ B ′ , ⊒ B ′ , ⊐ B ′ ) as ( ⪰ B π , ⊒ B π , ⊐ B π ) (\mathrel{\succeq_B^\pi},\mathrel{\sqsupseteq_B^\pi},\mathrel{\sqsupset_B^\pi}) ( ⪰ B π , ⊒ B π , ⊐ B π ) .
Proposition 4.15. If ( ⊒ A , ⊐ A ) (\mathrel{\sqsupseteq_A},\mathrel{\sqsupset_A}) ( ⊒ A , ⊐ A ) has the subterm property, then ( ⊒ A ′ , ⊐ A ′ ) (\mathrel{\sqsupseteq_{A'}},\mathrel{\sqsupset_{A'}}) ( ⊒ A ′ , ⊐ A ′ ) is simple with respect to π \pi π . Moreover, ( ⪰ M G , > G π ) (\mathrel{\succeq_{MG}},\mathrel{>_G^\pi}) ( ⪰ M G , > G π ) is identical to ( ⪰ M G ′ , > G ′ ) (\mathrel{\succeq_{MG'}},\mathrel{>_{G'}}) ( ⪰ M G ′ , > G ′ ) , where ( ⪰ M G , > G ) (\mathrel{\succeq_{MG}},\mathrel{>_G}) ( ⪰ M G , > G ) is induced by the total status and the reduction triples A A A and B B B , and ( ⪰ M G ′ , > G ′ ) (\mathrel{\succeq_{MG'}},\mathrel{>_{G'}}) ( ⪰ M G ′ , > G ′ ) is induced by π \pi π and the reduction triples A ′ A' A ′ and B ′ B' B ′ .
Proof. Our proof follows the same line as that of [57 Proposition 1] : The simplicity of ( ⊒ A ′ , ⊐ A ′ ) (\mathrel{\sqsupseteq_{A'}},\mathrel{\sqsupset_{A'}}) ( ⊒ A ′ , ⊐ A ′ ) is easy to verify. The other claim follows by showing that s ⪰ G π t s \mathrel{\succeq_G^\pi} t s ⪰ G π t if and only if s ⪰ G ′ t s \mathrel{\succeq_{G'}} t s ⪰ G ′ t and s > G π t s \mathrel{>_G^\pi} t s > G π t if and only if s > G ′ t s \mathrel{>_{G'}} t s > G ′ t for all terms s s s and t t t , by induction on ∣ s ∣ + ∣ t ∣ |s|+|t| ∣ s ∣ + ∣ t ∣ . □
SPO as Reduction Pair
To the best of the authors’ knowledge, there is no existing work that formulates the semantic path order as a reduction pair incorporating mutual recursion and partial status as in Definition 4.11. Such a version of the semantic path order is naturally obtained from the GWPO.
Definition 4.16. Let π \pi π be a partial status and let ( ⊒ , ⊐ ) (\mathrel{\sqsupseteq},\mathrel{\sqsupset}) ( ⊒ , ⊐ ) be a pair of relations on terms. The semantic path order ( ⪰ S , > S ) (\mathrel{\succeq_S},\mathrel{>_S}) ( ⪰ S , > S ) induced by π \pi π and ( ⊒ , ⊐ ) (\mathrel{\sqsupseteq},\mathrel{\sqsupset}) ( ⊒ , ⊐ ) is defined inductively as follows:
s ⪰ S t s \mathrel{\succeq_S} t s ⪰ S t if
a. s = f ( s 1 , … , s m ) s=f(s_1,\ldots,s_m) s = f ( s 1 , … , s m ) and s i ⪰ S t s_i \mathrel{\succeq_S} t s i ⪰ S t for some i ∈ π ( f ) i\in\pi(f) i ∈ π ( f ) .
b. s = f ( s 1 , … , s m ) s=f(s_1,\ldots,s_m) s = f ( s 1 , … , s m ) , t = g ( t 1 , … , t n ) t=g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) , s > S t j s \mathrel{>_S} t_j s > S t j for all j ∈ π ( g ) j\in\pi(g) j ∈ π ( g ) , and (i) s ⊐ t s \mathrel{\sqsupset} t s ⊐ t or (ii) s ⊒ t s \mathrel{\sqsupseteq} t s ⊒ t and π ( f ) ( s 1 , … , s m ) ⪰ S l e x π ( g ) ( t 1 , … , t n ) \pi(f)(s_1,\ldots,s_m) \mathrel{\succeq_S^{\mathrm{lex}}} \pi(g)(t_1,\ldots,t_n) π ( f ) ( s 1 , … , s m ) ⪰ S lex π ( g ) ( t 1 , … , t n ) .
c. s ∈ V s\in\mathcal{V} s ∈ V and s = t s=t s = t
The relation > S \mathrel{>_S} > S is defined by cases a and b, where ⪰ S l e x \mathrel{\succeq_S^{\mathrm{lex}}} ⪰ S lex is replaced by > S l e x \mathrel{>_S^{\mathrm{lex}}} > S lex . Here ( ⪰ S l e x , > S l e x ) (\mathrel{\succeq_S^{\mathrm{lex}}},\mathrel{>_S^{\mathrm{lex}}}) ( ⪰ S lex , > S lex ) is the lexicographic extension of ( ⪰ S , > S ) (\mathrel{\succeq_S},\mathrel{>_S}) ( ⪰ S , > S ) .
Obviously, we could define ( ⪰ S , > S ) (\mathrel{\succeq_S},\mathrel{>_S}) ( ⪰ S , > S ) as ( ⪰ G , > G ) (\mathrel{\succeq_G},\mathrel{>_G}) ( ⪰ G , > G ) induced from ( T × T , ∅ ) (\mathcal{T}\times\mathcal{T},\varnothing) ( T × T , ∅ ) and ( ⊒ , ⊐ ) (\mathrel{\sqsupseteq},\mathrel{\sqsupset}) ( ⊒ , ⊐ ) . The monotone version is defined as follows.
Definition 4.17. Let π \pi π be a partial status, and let ( ⪰ , ⊒ , ⊐ ) (\mathrel{\succeq},\mathrel{\sqsupseteq},\mathrel{\sqsupset}) ( ⪰ , ⊒ , ⊐ ) be a triple of relations on terms. The monotonic semantic path order ( ⪰ M S , > M S ) (\mathrel{\succeq_{MS}},\mathrel{>_{MS}}) ( ⪰ M S , > M S ) is defined as the pair of ⪰ ∩ ⪰ S \mathrel{\succeq}\cap\mathrel{\succeq_S} ⪰ ∩ ⪰ S and ⪰ ∩ > S \mathrel{\succeq}\cap\mathrel{>_S} ⪰ ∩ > S where ( ⪰ S , > S ) (\mathrel{\succeq_S},\mathrel{>_S}) ( ⪰ S , > S ) is induced by ( ⊒ , ⊐ ) (\mathrel{\sqsupseteq},\mathrel{\sqsupset}) ( ⊒ , ⊐ ) .
Again, we could define ( ⪰ M S , > M S ) (\mathrel{\succeq_{MS}},\mathrel{>_{MS}}) ( ⪰ M S , > M S ) as ( ⪰ M G , > M G ) (\mathrel{\succeq_{MG}},\mathrel{>_{MG}}) ( ⪰ M G , > M G ) induced from the reduction triple ( T × T , T × T , ∅ ) (\mathcal{T}\times\mathcal{T},\mathcal{T}\times\mathcal{T},\varnothing) ( T × T , T × T , ∅ ) and ( ⪰ , ⊒ , ⊐ ) (\mathrel{\succeq},\mathrel{\sqsupseteq},\mathrel{\sqsupset}) ( ⪰ , ⊒ , ⊐ ) . This results in the following corollary.
Corollary 4.18. Let π \pi π be a partial status, and ( ⪰ , ⊒ , ⊐ ) (\mathrel{\succeq},\mathrel{\sqsupseteq},\mathrel{\sqsupset}) ( ⪰ , ⊒ , ⊐ ) a reduction triple. Then ( ⪰ M S , > S ) (\mathrel{\succeq_{MS}},\mathrel{>_S}) ( ⪰ M S , > S ) is a reduction pair. □
The example below illustrates a key step in a termination proof of the benchmark Saito_26/AProVE_08_id_inc_p in the Termination Problem Database [50 ] , with some simplification. As mentioned in Subsection 4.5, the SPO plays a crucial role.
Example 4.19. Consider the set P \mathcal{P} P of the dependency pairs
G ( c ( s ( x ) , y ) ) → G ( c ( y , p ( s ( x ) ) ) ) G ( c ( x , s ( y ) ) ) → G ( c ( p ( s ( y ) ) , x ) ) \mathrm{G}(\mathrm{c}(\mathrm{s}(x),y)) \to\mathrm{G}(\mathrm{c}(y,\mathrm{p}(\mathrm{s}(x)))) \qquad\mathrm{G}(\mathrm{c}(x,\mathrm{s}(y))) \to\mathrm{G}(\mathrm{c}(\mathrm{p}(\mathrm{s}(y)),x)) G ( c ( s ( x ) , y )) → G ( c ( y , p ( s ( x )))) G ( c ( x , s ( y ))) → G ( c ( p ( s ( y )) , x )) and the TRS R = { p ( s ( x ) ) → x } \mathcal{R}=\{\mathrm{p}(\mathrm{s}(x)) \to x\} R = { p ( s ( x )) → x } . To show that the dependency pair problem ( P , R ) (\mathcal{P},\mathcal{R}) ( P , R ) is finite, we use the max/plus interpretations A \mathcal{A} A and B \mathcal{B} B defined by:
G A ♯ ( x ) = max { 0 , x − 1 } c A ( x , y ) = max { x + 2 , y + 1 } c A ♯ ( x , y ) = max { x , y + 1 } \mathrm{G}_{\mathcal{A}}^{\sharp}(x)=\max\{0,x-1\} \qquad\mathrm{c}_{\mathcal{A}}(x,y)=\max\{x+2,y+1\} \qquad\mathrm{c}_{\mathcal{A}}^{\sharp}(x,y)=\max\{x,y+1\} G A ♯ ( x ) = max { 0 , x − 1 } c A ( x , y ) = max { x + 2 , y + 1 } c A ♯ ( x , y ) = max { x , y + 1 } p A ♯ ( x ) = max { 0 , x − 2 } s A ♯ ( x ) = x + 2 \mathrm{p}_{\mathcal{A}}^{\sharp}(x)=\max\{0,x-2\} \qquad\mathrm{s}_{\mathcal{A}}^{\sharp}(x)=x+2 p A ♯ ( x ) = max { 0 , x − 2 } s A ♯ ( x ) = x + 2 G B ♯ ( x ) = x + 1 c B ( x , y ) = y + 2 c B ♯ ( x , y ) = x + 2 \mathrm{G}_{\mathcal{B}}^{\sharp}(x)=x+1 \qquad\mathrm{c}_{\mathcal{B}}(x,y)=y+2 \qquad\mathrm{c}_{\mathcal{B}}^{\sharp}(x,y)=x+2 G B ♯ ( x ) = x + 1 c B ( x , y ) = y + 2 c B ♯ ( x , y ) = x + 2 p B ♯ ( x ) = max { 0 , x − 2 } s B ♯ ( x ) = x + 2 \mathrm{p}_{\mathcal{B}}^{\sharp}(x)=\max\{0,x-2\} \qquad\mathrm{s}_{\mathcal{B}}^{\sharp}(x)=x+2 p B ♯ ( x ) = max { 0 , x − 2 } s B ♯ ( x ) = x + 2 Let ( ⊒ , ⊒ ♯ , ⊐ ♯ ) (\sqsupseteq,\sqsupseteq^{\sharp},\sqsupset^{\sharp}) ( ⊒ , ⊒ ♯ , ⊐ ♯ ) be the lexicographic combination of ( ⊒ A , ⊒ A ♯ , ⊐ A ♯ ) (\sqsupseteq_{\mathcal{A}},\sqsupseteq_{\mathcal{A}}^{\sharp},\sqsupset_{\mathcal{A}}^{\sharp}) ( ⊒ A , ⊒ A ♯ , ⊐ A ♯ ) and ( ⊒ B , ⊒ B ♯ , ⊐ B ♯ ) (\sqsupseteq_{\mathcal{B}},\sqsupseteq_{\mathcal{B}}^{\sharp},\sqsupset_{\mathcal{B}}^{\sharp}) ( ⊒ B , ⊒ B ♯ , ⊐ B ♯ ) , and let ( ⊒ M S , ⊐ S ) (\sqsupseteq_{\mathrm{MS}},\sqsupset_{\mathrm{S}}) ( ⊒ MS , ⊐ S ) be the SPO induced by ( ⊒ , ⊒ ♯ , ⊐ ♯ ) (\sqsupseteq,\sqsupseteq^{\sharp},\sqsupset^{\sharp}) ( ⊒ , ⊒ ♯ , ⊐ ♯ ) and the partial status π \pi π with π ( G ) = π ( p ) = π ( s ) = [ 1 ] \pi(\mathrm{G})=\pi(\mathrm{p})=\pi(\mathrm{s})=[1] π ( G ) = π ( p ) = π ( s ) = [ 1 ] and π ( c ) = [ ] \pi(\mathrm{c})=[] π ( c ) = [ ] . We can easily verify R ⊆ ⊒ M S \mathcal{R}\subseteq\sqsupseteq_{\mathrm{MS}} R ⊆ ⊒ MS . For the first dependency pair, we have the following derivation.
c ( s ( x ) , y ) ⊒ ♯ G ( c ( y , p ( s ( x ) ) ) ) \mathrm{c}(\mathrm{s}(x),y)\sqsupseteq^{\sharp}\mathrm{G}(\mathrm{c}(y,\mathrm{p}(\mathrm{s}(x)))) c ( s ( x ) , y ) ⊒ ♯ G ( c ( y , p ( s ( x )))) c ( s ( x ) , y ) ⊒ ♯ c ( y , p ( s ( x ) ) ) b(i) \mathrm{c}(\mathrm{s}(x),y)\sqsupseteq^{\sharp}\mathrm{c}(y,\mathrm{p}(\mathrm{s}(x)))
\qquad\text{b(i)} c ( s ( x ) , y ) ⊒ ♯ c ( y , p ( s ( x ))) b(i) c ( s ( x ) , y ) ⊐ S c ( y , p ( s ( x ) ) ) \mathrm{c}(\mathrm{s}(x),y)\sqsupset_{\mathrm{S}}\mathrm{c}(y,\mathrm{p}(\mathrm{s}(x))) c ( s ( x ) , y ) ⊐ S c ( y , p ( s ( x ))) c ( s ( x ) , y ) ⊒ S G ( c ( y , p ( s ( x ) ) ) ) b(i) \mathrm{c}(\mathrm{s}(x),y)\sqsupseteq_{\mathrm{S}}\mathrm{G}(\mathrm{c}(y,\mathrm{p}(\mathrm{s}(x))))
\qquad\text{b(i)} c ( s ( x ) , y ) ⊒ S G ( c ( y , p ( s ( x )))) b(i) G ( c ( s ( x ) , y ) ) ⊐ S G ( c ( y , p ( s ( x ) ) ) ) a \mathrm{G}(\mathrm{c}(\mathrm{s}(x),y))\sqsupset_{\mathrm{S}}\mathrm{G}(\mathrm{c}(y,\mathrm{p}(\mathrm{s}(x))))
\qquad\text{a} G ( c ( s ( x ) , y )) ⊐ S G ( c ( y , p ( s ( x )))) a Here, c ( s ( x ) , y ) ⊒ ♯ G ( c ( y , p ( s ( x ) ) ) ) \mathrm{c}(\mathrm{s}(x),y)\sqsupseteq^{\sharp}\mathrm{G}(\mathrm{c}(y,\mathrm{p}(\mathrm{s}(x)))) c ( s ( x ) , y ) ⊒ ♯ G ( c ( y , p ( s ( x )))) follows from the decrease
max { x + 2 , y + 1 } ⏟ c B ♯ ( s ( x ) , y ) ⊒ A max { y + 1 , x } ⏟ G A ♯ ( c ( y , p ( s ( x ) ) ) ) x + 4 ⏟ c B ♯ ( s ( x ) , y ) ⊐ B x + 3 ⏟ G B ♯ ( c ( y , p ( s ( x ) ) ) ) \underbrace{\max\{x+2,y+1\}}_{\mathrm{c}_{\mathcal{B}}^{\sharp}(\mathrm{s}(x),y)}
\sqsupseteq_{\mathcal{A}}
\underbrace{\max\{y+1,x\}}_{\mathrm{G}_{\mathcal{A}}^{\sharp}(\mathrm{c}(y,\mathrm{p}(\mathrm{s}(x))))}
\qquad
\underbrace{x+4}_{\mathrm{c}_{\mathcal{B}}^{\sharp}(\mathrm{s}(x),y)}
\sqsupset_{\mathcal{B}}
\underbrace{x+3}_{\mathrm{G}_{\mathcal{B}}^{\sharp}(\mathrm{c}(y,\mathrm{p}(\mathrm{s}(x))))} c B ♯ ( s ( x ) , y ) max { x + 2 , y + 1 } ⊒ A G A ♯ ( c ( y , p ( s ( x )))) max { y + 1 , x } c B ♯ ( s ( x ) , y ) x + 4 ⊐ B G B ♯ ( c ( y , p ( s ( x )))) x + 3 in B \mathcal{B} B , and c ( s ( x ) , y ) ⊒ ♯ c ( y , p ( s ( x ) ) ) \mathrm{c}(\mathrm{s}(x),y)\sqsupseteq^{\sharp}\mathrm{c}(y,\mathrm{p}(\mathrm{s}(x))) c ( s ( x ) , y ) ⊒ ♯ c ( y , p ( s ( x ))) follows from the decrease
c A ♯ ( s A ( x ) , y ) = max { x + 2 , y + 1 } > max { y , x + 1 } = c A ♯ ( y , p A ( s A ( x ) ) ) \mathrm{c}_{\mathcal{A}}^{\sharp}(\mathrm{s}_{\mathcal{A}}(x),y)=\max\{x+2,y+1\}>\max\{y,x+1\}=\mathrm{c}_{\mathcal{A}}^{\sharp}(y,\mathrm{p}_{\mathcal{A}}(\mathrm{s}_{\mathcal{A}}(x))) c A ♯ ( s A ( x ) , y ) = max { x + 2 , y + 1 } > max { y , x + 1 } = c A ♯ ( y , p A ( s A ( x ))) in A \mathcal{A} A . Similarly, we have the following derivation for the second dependency pair.
G ( c ( x , s ( y ) ) ) ⊒ ♯ G ( c ( p ( s ( y ) ) , x ) ) \mathrm{G}(\mathrm{c}(x,\mathrm{s}(y)))\sqsupseteq^{\sharp}\mathrm{G}(\mathrm{c}(\mathrm{p}(\mathrm{s}(y)),x)) G ( c ( x , s ( y ))) ⊒ ♯ G ( c ( p ( s ( y )) , x )) G ( c ( x , s ( y ) ) ) ⊒ ♯ c ( p ( s ( y ) ) , x ) b(i) \mathrm{G}(\mathrm{c}(x,\mathrm{s}(y)))\sqsupseteq^{\sharp}\mathrm{c}(\mathrm{p}(\mathrm{s}(y)),x)
\qquad\text{b(i)} G ( c ( x , s ( y ))) ⊒ ♯ c ( p ( s ( y )) , x ) b(i) G ( c ( x , s ( y ) ) ) ⊐ S c ( p ( s ( y ) ) , x ) \mathrm{G}(\mathrm{c}(x,\mathrm{s}(y)))\sqsupset_{\mathrm{S}}\mathrm{c}(\mathrm{p}(\mathrm{s}(y)),x) G ( c ( x , s ( y ))) ⊐ S c ( p ( s ( y )) , x ) G ( c ( x , s ( y ) ) ) ⊐ S G ( c ( p ( s ( y ) ) , x ) ) b(i) \mathrm{G}(\mathrm{c}(x,\mathrm{s}(y)))\sqsupset_{\mathrm{S}}\mathrm{G}(\mathrm{c}(\mathrm{p}(\mathrm{s}(y)),x))
\qquad\text{b(i)} G ( c ( x , s ( y ))) ⊐ S G ( c ( p ( s ( y )) , x )) b(i) Here, G ( c ( x , s ( y ) ) ) ⊒ ♯ G ( c ( p ( s ( y ) ) , x ) ) \mathrm{G}(\mathrm{c}(x,\mathrm{s}(y)))\sqsupseteq^{\sharp}\mathrm{G}(\mathrm{c}(\mathrm{p}(\mathrm{s}(y)),x)) G ( c ( x , s ( y ))) ⊒ ♯ G ( c ( p ( s ( y )) , x )) follows from the decrease
G A ♯ ( c A ( x , s A ( y ) ) ) = max { x + 1 , y + 2 } > max { y + 1 , x } = G A ♯ ( c A ( p A ( s A ( y ) ) , x ) ) \mathrm{G}_{\mathcal{A}}^{\sharp}(\mathrm{c}_{\mathcal{A}}(x,\mathrm{s}_{\mathcal{A}}(y)))=\max\{x+1,y+2\}>\max\{y+1,x\}=\mathrm{G}_{\mathcal{A}}^{\sharp}(\mathrm{c}_{\mathcal{A}}(\mathrm{p}_{\mathcal{A}}(\mathrm{s}_{\mathcal{A}}(y)),x)) G A ♯ ( c A ( x , s A ( y ))) = max { x + 1 , y + 2 } > max { y + 1 , x } = G A ♯ ( c A ( p A ( s A ( y )) , x )) in A \mathcal{A} A , and G ( c ( x , s ( y ) ) ) ⊒ ♯ c ( p ( s ( y ) ) , x ) \mathrm{G}(\mathrm{c}(x,\mathrm{s}(y)))\sqsupseteq^{\sharp}\mathrm{c}(\mathrm{p}(\mathrm{s}(y)),x) G ( c ( x , s ( y ))) ⊒ ♯ c ( p ( s ( y )) , x ) follows from the decrease
max { x + 1 , y + 2 } ⏟ G B ♯ ( c ( x , s ( y ) ) ) ⊒ A max { y , x + 1 } ⏟ p B ♯ ( s ( y ) ) , x y + 5 ⏟ G B ♯ ( c ( x , s ( y ) ) ) ⊐ B y + 2 ⏟ c B ♯ ( p ( s ( y ) ) , x ) \underbrace{\max\{x+1,y+2\}}_{\mathrm{G}_{\mathcal{B}}^{\sharp}(\mathrm{c}(x,\mathrm{s}(y)))}
\sqsupseteq_{\mathcal{A}}
\underbrace{\max\{y,x+1\}}_{\mathrm{p}_{\mathcal{B}}^{\sharp}(\mathrm{s}(y)),x}
\qquad
\underbrace{y+5}_{\mathrm{G}_{\mathcal{B}}^{\sharp}(\mathrm{c}(x,\mathrm{s}(y)))}
\sqsupset_{\mathcal{B}}
\underbrace{y+2}_{\mathrm{c}_{\mathcal{B}}^{\sharp}(\mathrm{p}(\mathrm{s}(y)),x)} G B ♯ ( c ( x , s ( y ))) max { x + 1 , y + 2 } ⊒ A p B ♯ ( s ( y )) , x max { y , x + 1 } G B ♯ ( c ( x , s ( y ))) y + 5 ⊐ B c B ♯ ( p ( s ( y )) , x ) y + 2 in B \mathcal{B} B . Hence, we conclude that ( P , R ) (\mathcal{P},\mathcal{R}) ( P , R ) is finite.
Next, following Subsection 3.3 we compare the generalized weighted path order with the semantic path order as a reduction pair. Let ( ⊒ G , ⊐ G ) (\sqsupseteq_{\mathrm{G}},\sqsupset_{\mathrm{G}}) ( ⊒ G , ⊐ G ) be the GWPO induced by a partial status π \pi π and stable order pairs ( ⊒ A , ⊐ A ) (\sqsupseteq_{\mathcal{A}},\sqsupset_{\mathcal{A}}) ( ⊒ A , ⊐ A ) and ( ⊒ B , ⊐ B ) (\sqsupseteq_{\mathcal{B}},\sqsupset_{\mathcal{B}}) ( ⊒ B , ⊐ B ) . We consider the SPO ( ⊒ S , ⊐ S ) (\sqsupseteq_{\mathrm{S}},\sqsupset_{\mathrm{S}}) ( ⊒ S , ⊐ S ) induced by the lexicographic combination ( ⊒ A B , ⊐ A B ) (\sqsupseteq_{\mathcal{A}\mathcal{B}},\sqsupset_{\mathcal{A}\mathcal{B}}) ( ⊒ A B , ⊐ A B ) and π \pi π . In this setting, an analog of Lemma 3.32 holds.
Lemma 4.20. Suppose that A A A is simple with respect to π \pi π . For all terms s s s and t t t , it holds that s ⪰ S t s \succeq_{S} t s ⪰ S t implies s ⪰ G t s \succeq_{G} t s ⪰ G t , and s ≻ S t s \succ_{S} t s ≻ S t implies s ≻ G t s \succ_{G} t s ≻ G t .
Proof. We prove the two implications simultaneously by induction on ∣ s ∣ + ∣ t ∣ |s| + |t| ∣ s ∣ + ∣ t ∣ . Here we only prove the first claim, as the other is analogously shown. Let s ⪰ S t s \succeq_{S} t s ⪰ S t . We analyze how it is derived.
a. If it follows from case a, then s = f ( s 1 , … , s m ) s = f(s_1,\ldots,s_m) s = f ( s 1 , … , s m ) and s i ⪰ S t s_i \succeq_{S} t s i ⪰ S t for some i ∈ π ( f ) i \in\pi(f) i ∈ π ( f ) . By the induction hypothesis we have s i ⪰ G t s_i \succeq_{G} t s i ⪰ G t . By definition, s i ⊐ A t s_i \sqsupset_{A} t s i ⊐ A t or s i ⊒ A t s_i \sqsupseteq_{A} t s i ⊒ A t holds. In the former case, we use the simplicity assumption of A A A to obtain s ⊒ A s i ⊐ A t s \sqsupseteq_{A} s_i \sqsupset_{A} t s ⊒ A s i ⊐ A t or s ⊐ A s i ⊐ A t s \sqsupset_{A} s_i \sqsupset_{A} t s ⊐ A s i ⊐ A t , so s ⪰ G t s \succeq_{G} t s ⪰ G t by case 1. In the latter case, we are done by case 2a.
b. If it follows from case b, we have s = f ( s 1 , … , s m ) s = f(s_1,\ldots,s_m) s = f ( s 1 , … , s m ) , t = g ( t 1 , … , t n ) t = g(t_1,\ldots,t_n) t = g ( t 1 , … , t n ) and s ≻ S t j s \succ_{S} t_j s ≻ S t j for all j ∈ π ( g ) j \in\pi(g) j ∈ π ( g ) . By the induction hypothesis we have s ≻ G t j s \succ_{G} t_j s ≻ G t j for all j ∈ π ( g ) j \in\pi(g) j ∈ π ( g ) .
(i) If s ⊐ A B t s \sqsupset_{AB} t s ⊐ A B t , we further analyze how it follows: If s ⊐ A t s \sqsupset_{A} t s ⊐ A t then we have s ≻ G t s \succ_{G} t s ≻ G t by case 1. Otherwise, we conclude with case 2b(i).
(ii) If s ⊒ A B t s \sqsupseteq_{AB} t s ⊒ A B t , we further analyze how it follows: If s ⊐ A t s \sqsupset_{A} t s ⊐ A t then we have s ≻ G t s \succ_{G} t s ≻ G t by case 1. Otherwise, we conclude with case 2b(ii) using the induction hypothesis.
c. If it follows from case c, we simply apply the corresponding case 2c with the reflexivity of ⊒ A \sqsupseteq_{A} ⊒ A .
The assumption that A A A is simple with respect to π \pi π is essential for the lemma above.
Example 4.21. Consider the signature { a ( 0 ) , f ( 1 ) } \{a^{(0)}, f^{(1)}\} { a ( 0 ) , f ( 1 ) } , the partial status π \pi π with π ( f ) = [ 1 ] \pi(f) = [1] π ( f ) = [ 1 ] , and the algebra A A A on N \mathbb{N} N defined by a A = 1 a_{A} = 1 a A = 1 and f A ( x ) = 0 f_{A}(x) = 0 f A ( x ) = 0 . Let ( ⊒ A , ⊐ A ) (\sqsupseteq_{A}, \sqsupset_{A}) ( ⊒ A , ⊐ A ) be ( ≥ A , > A ) (\geq_{A}, >_{A}) ( ≥ A , > A ) and let ( ⊒ B , ⊐ B ) (\sqsupseteq_{B}, \sqsupset_{B}) ( ⊒ B , ⊐ B ) be ( T × T , ∅ ) (\mathcal{T} \times\mathcal{T}, \varnothing) ( T × T , ∅ ) . Then we have f ( a ) ≻ S a f(a) \succ_{S} a f ( a ) ≻ S a by case a, but f ( a ) ≻ G a f(a) \succ_{G} a f ( a ) ≻ G a does not hold.
The converse is shown by additionally assuming that π \pi π is total. The proof follows the same line as Lemma 3.31 .
Lemma 4.22. Suppose that A A A is simple with respect to π \pi π , and π \pi π is total. For all terms s s s and t t t , it holds that s ⪰ G t s \succeq_{G} t s ⪰ G t implies s ⪰ S t s \succeq_{S} t s ⪰ S t , and s ≻ G t s \succ_{G} t s ≻ G t implies s ≻ S t s \succ_{S} t s ≻ S t .
The assumption that π \pi π is total cannot be dropped. This contrasts with the simulation result (Theorem 3.33) in the reduction-order setting.
Example 4.23. Suppose that the signature only contains a unary function symbol f f f . Let π \pi π be the partial status defined by π ( f ) = [ ] \pi(f) = [\,] π ( f ) = [ ] , let A A A be the algebra on N \mathbb{N} N defined by f A ( x ) = x + 1 f_{A}(x) = x + 1 f A ( x ) = x + 1 , and let ( ⊒ B , ⊐ B ) (\sqsupseteq_{B}, \sqsupset_{B}) ( ⊒ B , ⊐ B ) be an arbitrary pair of relations on terms (e.g., one induced by a precedence to consider the original WPO). On one hand, the GWPO ( ⪰ G , ≻ G ) (\succeq_{G}, \succ_{G}) ( ⪰ G , ≻ G ) induced by ( ⪰ A , ≻ A ) (\succeq_{A}, \succ_{A}) ( ⪰ A , ≻ A ) and ( ⊒ B , ⊐ B ) (\sqsupseteq_{B}, \sqsupset_{B}) ( ⊒ B , ⊐ B ) satisfies f ( x ) ⪰ G x f(x) \succeq_{G} x f ( x ) ⪰ G x and f ( x ) ≻ G x f(x) \succ_{G} x f ( x ) ≻ G x by case 1. On the other hand, no SPO ( ⪰ S , ≻ S ) (\succeq_{S}, \succ_{S}) ( ⪰ S , ≻ S ) (regardless of the underlying order pair) satisfies f ( x ) ⪰ S x f(x) \succeq_{S} x f ( x ) ⪰ S x , because the only possible case, case a, is blocked by π ( f ) = [ ] \pi(f) = [\,] π ( f ) = [ ] .
The cause behind the example above is very simple: if s ⊐ A t s \sqsupset_{A} t s ⊐ A t , the GWPO satisfies s ⪰ G t s \succeq_{G} t s ⪰ G t and s ≻ G t s \succ_{G} t s ≻ G t with case 1 regardless of the underlying partial status, while s ⪰ S t s \succeq_{S} t s ⪰ S t or s ≻ S t s \succ_{S} t s ≻ S t may not be possible if the partial status does not allow it.
As a consequence of Lemma 4.20 and Lemma 4.22, we can show an analog of Theorem 3.33 and Corollary 3.35: Let ( ⪰ M G , ≻ M G ) (\succeq_{MG}, \succ_{MG}) ( ⪰ M G , ≻ M G ) be the monotone generalized weighted path order induced by a partial status π \pi π and reduction triples ( ⪰ A , ⊒ A , ⊐ A ) (\succeq_{A}, \sqsupseteq_{A}, \sqsupset_{A}) ( ⪰ A , ⊒ A , ⊐ A ) and ( ⪰ B , ⊒ B , ⊐ B ) (\succeq_{B}, \sqsupseteq_{B}, \sqsupset_{B}) ( ⪰ B , ⊒ B , ⊐ B ) , and let ( ⪰ M S , ≻ M S ) (\succeq_{MS}, \succ_{MS}) ( ⪰ M S , ≻ M S ) be the monotone semantic path order induced by π \pi π and ( ⪰ A ∩ ⊒ B , ⊒ A ∩ ⊒ B , ⊐ A ∩ ⊐ B ) (\succeq_{A} \cap\sqsupseteq_{B}, \sqsupseteq_{A} \cap\sqsupseteq_{B}, \sqsupset_{A} \cap\sqsupset_{B}) ( ⪰ A ∩ ⊒ B , ⊒ A ∩ ⊒ B , ⊐ A ∩ ⊐ B ) .
Theorem 4.24. If ( ⊒ A , ⊐ A ) (\sqsupseteq_{A}, \sqsupset_{A}) ( ⊒ A , ⊐ A ) is simple with respect to π \pi π , then we have ⪰ M S ⊆ ⪰ M G \succeq_{MS} \subseteq\succeq_{MG} ⪰ M S ⊆ ⪰ M G and ≻ M S ⊆ ≻ M G \succ_{MS} \subseteq\succ_{MG} ≻ M S ⊆ ≻ M G as well as ≻ S ⊆ ≻ G \succ_{S} \subseteq\succ_{G} ≻ S ⊆ ≻ G . If additionally π \pi π is total, then ⪰ M S \succeq_{MS} ⪰ M S , ≻ M S \succ_{MS} ≻ M S and ≻ S \succ_{S} ≻ S are identical to ⪰ M G \succeq_{MG} ⪰ M G , ≻ M G \succ_{MG} ≻ M G and ≻ G \succ_{G} ≻ G , respectively.
So, in the setting of Theorem 4.24 the GWPO is preferred over the SPO. In other words, the SPO should be used only if the simplicity requirement is unsatisfied. Theorem 4.24 does not allow SPOs to simulate GWPOs with partial statuses. So, it is natural to seek a better construction. However, we note that any such construction must essentially assume well-foundedness of the order pair A A A , in contrast to Theorem 3.33 and Theorem 4.24 . This can be seen from the following example.
Example 4.25. Suppose that the signature only contains a unary function symbol f f f . Let π \pi π be the partial status defined by π ( f ) = [ ] \pi(f) = [\ ] π ( f ) = [ ] , let A \mathcal{A} A be the algebra on non-positive integers { 0 , − 1 , − 2 , … } \{0,-1,-2,\ldots\} { 0 , − 1 , − 2 , … } defined by f A ( x ) = x − 1 f_{\mathcal{A}}(x) = x - 1 f A ( x ) = x − 1 , and let ( ⪰ B , ≻ B ) (\succeq_B,\succ_B) ( ⪰ B , ≻ B ) be an arbitrary pair of relations on terms. Here, the carrier of A \mathcal{A} A is endowed with the ordinary order pair ( ≥ , > ) (\geq,>) ( ≥ , > ) on integers, so > > > is not well-founded. On one hand, the GWPO ( ⪰ G , ≻ G ) (\succeq_G,\succ_G) ( ⪰ G , ≻ G ) induced by ( ⪰ A , ≻ A ) (\succeq_{\mathcal{A}},\succ_{\mathcal{A}}) ( ⪰ A , ≻ A ) and ( ⪰ B , ≻ B ) (\succeq_B,\succ_B) ( ⪰ B , ≻ B ) satisfies x ⪰ G f ( x ) x \succeq_G f(x) x ⪰ G f ( x ) and x ≻ G f ( x ) x \succ_G f(x) x ≻ G f ( x ) by case 1 and x ≻ A f ( x ) x \succ_{\mathcal{A}} f(x) x ≻ A f ( x ) . On the other hand, no SPO (regardless of the underlying order pair and partial status) satisfies x ⪰ S f ( x ) x \succeq_S f(x) x ⪰ S f ( x ) , let alone x ≻ S f ( x ) x \succ_S f(x) x ≻ S f ( x ) , as can be seen from the definition.
We remark that non-well-founded algebras like the one above have been used for non-reachability proofs with WPOs [55 ] .
Using GWPO with Refinements to the Reduction Pair Processor
There are many refinements to use reduction pairs more effectively in the dependency pair framework. Among others, here we consider rule removal , usable rule and lexicographic combination , providing some necessary facts to use GWPOs with them.
For rule removal (Theorem 4.6), we should use ( ⪰ M G , ≻ M G ) (\succeq_{\mathrm{MG}},\succ_{\mathrm{MG}}) ( ⪰ MG , ≻ MG ) rather than ( ⪰ M G , ≻ G ) (\succeq_{\mathrm{MG}},\succ_G) ( ⪰ MG , ≻ G ) , because monotonicity is required for the reduction pair.
Theorem 4.26. Let π \pi π be a partial status, and ( ⪰ A , ⪰ A , ≻ A ) (\succeq_A,\succeq_A,\succ_A) ( ⪰ A , ⪰ A , ≻ A ) and ( ⪰ B , ⪰ B , ≻ B ) (\succeq_B,\succeq_B,\succ_B) ( ⪰ B , ⪰ B , ≻ B ) reduction triples with ( ⪰ A , ≻ A ) (\succeq_A,\succ_A) ( ⪰ A , ≻ A ) simple with respect to π \pi π . Then ( ⪰ M G , ≻ M G ) (\succeq_{\mathrm{MG}},\succ_{\mathrm{MG}}) ( ⪰ MG , ≻ MG ) is a normal reduction pair. If in addition π \pi π is total, then ( ⪰ M G , ≻ M G ) (\succeq_{\mathrm{MG}},\succ_{\mathrm{MG}}) ( ⪰ MG , ≻ MG ) is a monotone reduction pair.
Proof. The normality is a consequence of ≻ G ⊆ ⪰ G \succ_G \subseteq\succeq_G ≻ G ⊆ ⪰ G , which is verified by straightforward induction. The monotonicity is shown in a similar way to the proof of Theorem 3.7 . The other properties are consequences of Theorem 4.13 .
However, while exploring the experimental configurations for Subsection 4.5 we found no case where rule removal with ( ⪰ M G , ≻ M G ) (\succeq_{\mathrm{MG}},\succ_{\mathrm{MG}}) ( ⪰ MG , ≻ MG ) was useful. Rather, we find that Theorem 4.26 is useful to construct a normal reduction pair, which is required for lexicographic combination (to be explained soon). The next example shows that the reduction pairs ( ⪰ M G , ≻ G ) (\succeq_{\mathrm{MG}},\succ_G) ( ⪰ MG , ≻ G ) and ( ⪰ M S , ≻ S ) (\succeq_{\mathrm{MS}},\succ_S) ( ⪰ MS , ≻ S ) are not always normal.
Example 4.27. Let A \mathcal{A} A be the linear polynomial interpretation with f A ( x ) = 0 f_{\mathcal{A}}(x) = 0 f A ( x ) = 0 and a A = 1 a_{\mathcal{A}} = 1 a A = 1 . The SPO ( ⪰ M S , ≻ S ) (\succeq_{\mathrm{MS}},\succ_S) ( ⪰ MS , ≻ S ) induced by the total status π \pi π with π ( f ) = [ 1 ] \pi(f) = [1] π ( f ) = [ 1 ] and the reduction triple ( ⪰ A , ⪰ A , ≻ A ) (\succeq_A,\succeq_A,\succ_A) ( ⪰ A , ⪰ A , ≻ A ) is not normal. In fact, it satisfies f ( a ) ≻ S a f(a) \succ_S a f ( a ) ≻ S a but f ( a ) ̸ ⪰ M S a f(a) \not\succeq_{\mathrm{MS}} a f ( a ) ⪰ MS a due to f ( a ) ≠ A a f(a) \ne_{\mathcal{A}} a f ( a ) = A a .
Remark 4.28. As a side remark, we relate the reduction-pair version and the reduction-order version: Let ≻ \succ ≻ be the reduction-order version of the MGWPO (Definition 3.22) induced by reduction triples A A A and B B B , and let ( ⪰ M G , ≻ M G ) (\succeq_{\mathrm{MG}},\succ_{\mathrm{MG}}) ( ⪰ MG , ≻ MG ) be the reduction-pair version of the MGWPO (Definition 4.12) induced by the total status, A A A and B B B . Then by easy simultaneous induction one can show that ⪰ ⊆ ⪰ M G \succeq\subseteq\succeq_{\mathrm{MG}} ⪰⊆ ⪰ MG and ≻ ⊆ ≻ M G \succ\subseteq\succ_{\mathrm{MG}} ≻⊆ ≻ MG , where ⪰ \succeq ⪰ is the reflexive closure of ≻ \succ ≻ . For termination proving, the greater relations are the more profitable, so we should use the reduction-pair version.
The usable rule technique [53 , 23 , 24 , 25 , 28 ] is a popular refinement to Theorem 4.3 which relaxes the requirement R ⊆ ⪰ R \subseteq\succeq R ⊆⪰ to U ⊆ ⪰ U \subseteq\succeq U ⊆⪰ for a possibly smaller set U ⊆ R U \subseteq R U ⊆ R of usable rules; see also [46 Section 4] for the most general version. The technique demands the reduction pair ( ⪰ , ≻ ) (\succeq,\succ) ( ⪰ , ≻ ) to be C ε \mathcal{C}_{\varepsilon} C ε -compatible, meaning that the reduction pair ( ⪰ , ≻ ) (\succeq,\succ) ( ⪰ , ≻ ) can be extended to another one ( ⪰ ′ , ≻ ′ ) (\succeq',\succ') ( ⪰ ′ , ≻ ′ ) with C ε ⊆ ⪰ ′ \mathcal{C}_{\varepsilon} \subseteq\succeq' C ε ⊆ ⪰ ′ . Here C ε = { c ( x , y ) → x , c ( x , y ) → y } \mathcal{C}_{\varepsilon} = \{c(x,y) \to x,c(x,y) \to y\} C ε = { c ( x , y ) → x , c ( x , y ) → y } and c c c is a fresh binary symbol. Like usual reduction pairs, the GWPO satisfies C ε \mathcal{C}_{\varepsilon} C ε -compatibility almost for free, as we show in what follows.
We say that a reduction triple ( ⪰ , ⊒ , ⊐ ) (\succeq,\sqsupseteq,\sqsupset) ( ⪰ , ⊒ , ⊐ ) is C ε \mathcal{C}_{\varepsilon} C ε -compatible if it can be extended to another one ( ⪰ ′ , ⊒ ′ , ⊐ ′ ) (\succeq',\sqsupseteq',\sqsupset') ( ⪰ ′ , ⊒ ′ , ⊐ ′ ) with C ε ⊆ ⪰ ′ \mathcal{C}_{\varepsilon} \subseteq\succeq' C ε ⊆ ⪰ ′ . We call it strongly C ε \mathcal{C}_{\varepsilon} C ε -compatible if such an extension can be chosen to satisfy both C ε ⊆ ⪰ ′ \mathcal{C}_{\varepsilon} \subseteq\succeq' C ε ⊆ ⪰ ′ and C ε ⊆ ⊒ ′ \mathcal{C}_{\varepsilon} \subseteq\sqsupseteq' C ε ⊆ ⊒ ′ . Let ( ⪰ A , ⊒ A , ⊐ A ) (\succeq_A,\sqsupseteq_A,\sqsupset_A) ( ⪰ A , ⊒ A , ⊐ A ) and ( ⪰ B , ⊒ B , ⊐ B ) (\succeq_B,\sqsupseteq_B,\sqsupset_B) ( ⪰ B , ⊒ B , ⊐ B ) be reduction triples such that ( ⊒ A , ⊐ A ) (\sqsupseteq_A,\sqsupset_A) ( ⊒ A , ⊐ A ) is simple with respect to a partial status π \pi π .
Proposition 4.29. If A A A is strongly C ε \mathcal{C}_{\varepsilon} C ε -compatible and B B B is C ε \mathcal{C}_{\varepsilon} C ε -compatible, then ( ⪰ M G , ≻ M G ) (\succeq_{\mathrm{MG}},\succ_{\mathrm{MG}}) ( ⪰ MG , ≻ MG ) and ( ⪰ M G , ≻ G ) (\succeq_{\mathrm{MG},\succ_{\mathrm{G}}}) ( ⪰ MG , ≻ G ) induced by A A A , B B B and π \pi π are C ε \mathcal{C}_{\varepsilon} C ε -compatible reduction pairs.
Proof. Using the assumption, we can extend A A A and B B B to A ′ A' A ′ and B ′ B' B ′ , respectively, so that the inclusion C ε ⊆ ⪰ A ′ ∩ ⪰ B ′ ∩ ⊒ A ′ \mathcal{C}_{\varepsilon} \subseteq\succeq_{A'} \cap\succeq_{B'} \cap\sqsupseteq_{A'} C ε ⊆ ⪰ A ′ ∩ ⪰ B ′ ∩ ⊒ A ′ holds. We can also extend π \pi π to π ′ \pi' π ′ with π ′ ( c ) = [ 1 , 2 ] \pi'(c)=[1,2] π ′ ( c ) = [ 1 , 2 ] . The relation ⪰ M G ′ \succeq'_{\mathrm{MG}} ⪰ MG ′ induced by A ′ A' A ′ , B ′ B' B ′ and π \pi π satisfies C ε ⊆ ⪰ M G ′ \mathcal{C}_{\varepsilon} \subseteq\succeq'_{\mathrm{MG}} C ε ⊆ ⪰ MG ′ . Here, C ε ⊆ ⪰ G ′ \mathcal{C}_{\varepsilon} \subseteq\succeq'_{\mathrm{G}} C ε ⊆ ⪰ G ′ follows from case 2a using C ε ⊆ ⊒ A ′ \mathcal{C}_{\varepsilon} \subseteq\sqsupseteq_{A'} C ε ⊆ ⊒ A ′ . Moreover, π \pi π -simplicity for A ′ A' A ′ is satisfied since C ε ⊆ ⊒ A ′ \mathcal{C}_{\varepsilon} \subseteq\sqsupseteq_{A'} C ε ⊆ ⊒ A ′ and ( ⊒ A , ⊐ A ) (\sqsupseteq_A,\sqsupset_A) ( ⊒ A , ⊐ A ) is π \pi π -simple. Therefore, Theorem 4.13 and Theorem 4.26 can be applied.
The assumption of the proposition above is rather mild in practice, because usual reduction triples are C ε \mathcal{C}_{\varepsilon} C ε -compatible: the trivial reduction triple and those induced by precedences (Proposition 3.9 ) are C ε \mathcal{C}_{\varepsilon} C ε -compatible; usual interpretations (like polynomial interpretations, max/plus interpretations, matrix interpretation [17 ] , and so on) can be used to construct C ε \mathcal{C}_{\varepsilon} C ε -compatible reduction triples via Proposition 3.14, and strongly C ε \mathcal{C}_{\varepsilon} C ε -compatible ones via Proposition 3.11 ; and lexicographic combination (Proposition 3.34) preserves C ε \mathcal{C}_{\varepsilon} C ε -compatibility. Moreover, the trivial reduction triple is strongly C ε \mathcal{C}_{\varepsilon} C ε -compatible, so Proposition 4.29 can be applied to the SPO if it is induced by a C ε \mathcal{C}_{\varepsilon} C ε -compatible reduction triple. However, C ε \mathcal{C}_{\varepsilon} C ε -compatibility is not guaranteed for the model-based construction of Proposition 3.15. Note that C ε \mathcal{C}_{\varepsilon} C ε admits only trivial models [28 ] .
Continuing with the usable rule technique, we consider π \pi π -compatibility of reduction pairs, which is relevant to the refinement called usable rule w.r.t. argument filtering [25 ] . Let us recall the formal definition: The i i i -th argument position of a function symbol f f f is invariant w.r.t. a relation ↔ \leftrightarrow ↔ if C [ s ] ↔ C [ t ] C[s] \leftrightarrow C[t] C [ s ] ↔ C [ t ] for all terms s s s and t t t and contexts C = f ( u ⃗ , □ , v ⃗ ) C=f(\vec{u},\Box,\vec{v}) C = f ( u , □ , v ) with the hole □ \Box □ at the i i i -th argument of f f f [44 ] . A reduction pair ( ⪰ , ≻ ) (\succeq,\succ) ( ⪰ , ≻ ) is π \pi π -compatible for a partial status π \pi π if the i i i -th argument position of f f f is invariant w.r.t. ⪰ \succeq ⪰ whenever i ∉ π ( f ) i \notin\pi(f) i ∈ / π ( f ) . So, below we give a sufficient condition of invariance w.r.t. ⪰ M G \succeq_{\mathrm{MG}} ⪰ MG . For convenience, we extend the notion of invariance to reduction triples: The i i i -th argument position of a function symbol f f f is invariant w.r.t. a reduction triple ( ⪰ , ⊒ , ⊐ ) (\succeq,\sqsupseteq,\sqsupset) ( ⪰ , ⊒ , ⊐ ) if it is so with respect to ⪰ \succeq ⪰ and ⊒ \sqsupseteq ⊒ .
Proposition 4.30. Let ⪰ M G \succeq_{\mathrm{MG}} ⪰ MG be the MGWPO induced by a partial status π \pi π and reduction triples ( ⪰ A , ⊒ A , ⊐ A ) (\succeq_A,\sqsupseteq_A,\sqsupset_A) ( ⪰ A , ⊒ A , ⊐ A ) and ( ⪰ B , ⊒ B , ⊐ B ) (\succeq_B,\sqsupseteq_B,\sqsupset_B) ( ⪰ B , ⊒ B , ⊐ B ) . Suppose that ( ⊒ A , ⊐ A ) (\sqsupseteq_A,\sqsupset_A) ( ⊒ A , ⊐ A ) is simple w.r.t. π \pi π . The i i i -th argument position of a function symbol f f f is invariant w.r.t. ⪰ M G \succeq_{\mathrm{MG}} ⪰ MG if it is so w.r.t. A A A and B B B , and also i ∉ π ( f ) i \notin\pi(f) i ∈ / π ( f ) .
Proof. Let s s s and t t t be terms and C = f ( u ⃗ , □ , v ⃗ ) C=f(\vec{u},\Box,\vec{v}) C = f ( u , □ , v ) a context with the hole □ \Box □ at the i i i -th argument of f f f . By assumption, we have C [ s ] ⪰ A C [ t ] C[s] \succeq_A C[t] C [ s ] ⪰ A C [ t ] , C [ s ] ⪰ B C [ t ] C[s] \succeq_B C[t] C [ s ] ⪰ B C [ t ] and C [ s ] ⪰ G C [ t ] C[s] \succeq_G C[t] C [ s ] ⪰ G C [ t ] by case 2b(ii). So C [ s ] ⪰ M G C [ t ] C[s] \succeq_{\mathrm{MG}} C[t] C [ s ] ⪰ MG C [ t ] .
We can use the criterion above as follows: Given a partial status π \pi π and reduction triples A A A and B B B with ( ⪰ A , ⊐ A ) (\succeq_A,\sqsupset_A) ( ⪰ A , ⊐ A ) simple w.r.t. π \pi π , we define the partial statuses ρ \rho ρ by
ρ ( f ) = { i ∉ π ( f ) ∣ the i -th argument position of f is invariant w.r.t. A and B } \rho(f)=\{i\notin\pi(f)\mid\text{the }i\text{-th argument position of }f\text{ is invariant w.r.t. }A\text{ and }B\} ρ ( f ) = { i ∈ / π ( f ) ∣ the i -th argument position of f is invariant w.r.t. A and B }
for each function symbol f f f . Also, we define ρ ‾ ( f ) = { 1 , … , n } ∖ ρ ( f ) \overline{\rho}(f)=\{1,\ldots,n\}\setminus\rho(f) ρ ( f ) = { 1 , … , n } ∖ ρ ( f ) for each n n n -ary function symbol f f f . Then ( ⪰ M G , > G ) (\succeq_{\mathrm{MG}},\mathrel{>}_{\mathrm{G}}) ( ⪰ MG , > G ) and ( ⪰ M G , > M G ) (\succeq_{\mathrm{MG}},\mathrel{>}_{\mathrm{MG}}) ( ⪰ MG , > MG ) induced by π \pi π , A A A and B B B are ρ ‾ \overline{\rho} ρ -compatible.
The remaining problem for using Proposition 4.30 is how to estimate invariant positions for the underlying reduction triples A A A and B B B . For those induced by algebras, this is done by adapting how to do it for reduction pairs, see for example [44 ] . For the trivial reduction triple and those induced by precedences, all argument positions are invariant. Also, lexicographic combination (Proposition 3.34) preserves invariance: if an argument position is invariant w.r.t. reduction triples A A A and B B B , then it is so w.r.t. the lexicographic combination of A A A and B B B .
Lexicographic combination of reduction pairs [44 ] is another technique to which invariance is relevant; this can be done by Proposition 4.30. Also, the technique demands normality of all reduction pairs but the last of the combination; this can be done by using ( ⪰ M G , > M G ) (\succeq_{\mathrm{MG}},\mathrel{>}_{\mathrm{MG}}) ( ⪰ MG , > MG ) with Theorem 4.26 . Lastly, it demands us to identify monotone positions of the strict order > M G \mathrel{>}_{\mathrm{MG}} > MG : Formally, the i i i -th argument position of a function symbol f f f is monotone w.r.t. a relation ⇝ \leadsto ⇝ if f ( t 1 , … , t i , … , t n ) ⇝ f ( t 1 , … , t i ′ , … , t n ) f(t_1,\ldots,t_i,\ldots,t_n)\leadsto f(t_1,\ldots,t'_i,\ldots,t_n) f ( t 1 , … , t i , … , t n ) ⇝ f ( t 1 , … , t i ′ , … , t n ) for all terms t 1 , … , t n t_1,\ldots,t_n t 1 , … , t n and t i ′ t'_i t i ′ with t i ⇝ t i ′ t_i\leadsto t'_i t i ⇝ t i ′ . We have a proposition for monotone positions in the style of Proposition 4.30.
Proposition 4.31. Let > M G \mathrel{>}_{\mathrm{MG}} > MG be the M G W P O MGWPO M G W P O induced by a partial status π \pi π and reduction triples ( ⪰ A , ⊐ A , ▹ A ) (\succeq_A,\sqsupset_A,\mathrel{\triangleright}_A) ( ⪰ A , ⊐ A , ▹ A ) and ( ⪰ B , ⊐ B , ▹ B ) (\succeq_B,\sqsupset_B,\mathrel{\triangleright}_B) ( ⪰ B , ⊐ B , ▹ B ) . Suppose that ( ⊐ A , ▹ A ) (\sqsupset_A,\mathrel{\triangleright}_A) ( ⊐ A , ▹ A ) is simple w.r.t. π \pi π . The i i i -th argument position of a function symbol f f f is monotone w.r.t. > M G \mathrel{>}_{\mathrm{MG}} > MG if i ∈ π ( f ) i\in\pi(f) i ∈ π ( f ) .
Evaluation with Benchmark Problems
In order to evaluate GWPOs as reduction pairs, we implemented them in the prototype termination tool Mint9 ^{9} 9 based on the dependency pair framework. Below we explain the experimental setting, and then discuss the results.
To describe the configuration of reduction pairs in Table 2 , we use the notation of Table 1 . We additionally put the following assumptions on interpretations.
Table 1. Notation for reduction-pair configurations used in the experiment.
Table 2. Experimental results on 1542 TRSs from TPDB.
f A ( x 1 , … , x n ) = c 0 + c 1 x 1 + ⋯ + c n x n f_{\mathcal{A}}(x_1,\ldots,x_n)=c_0+c_1x_1+\cdots+c_nx_n f A ( x 1 , … , x n ) = c 0 + c 1 x 1 + ⋯ + c n x n
where c 0 ∈ N c_0\in\mathbb{N} c 0 ∈ N and c i ∈ { 0 , 1 } c_i\in\{0,1\} c i ∈ { 0 , 1 } for all $1\leq i\leq n.
f A ( x 1 , … , x n ) = max { d 0 , c 1 x 1 + d 1 , … , c n x n + d n } f_{\mathcal{A}}(x_1,\ldots,x_n)=\max\{d_0,c_1x_1+d_1,\ldots,c_nx_n+d_n\} f A ( x 1 , … , x n ) = max { d 0 , c 1 x 1 + d 1 , … , c n x n + d n }
where d 0 ∈ N d_0\in\mathbb{N} d 0 ∈ N , d 1 , … , d n ∈ Z d_1,\ldots,d_n\in\mathbb{Z} d 1 , … , d n ∈ Z and c 1 , … , c n ∈ { 0 , 1 } c_1,\ldots,c_n\in\{0,1\} c 1 , … , c n ∈ { 0 , 1 } for all $1\leq i\leq n.
The restrictions above on coefficients c i c_i c i allow us to keep the search for parameters decidable, as explained in due course. In contrast, arbitrary interpretations are allowed for F 2 \mathbb{F}_2 F 2 . Moreover, by abuse of the notation, L \mathsf{L} L may denote not only the class of algebras, but the class of reduction triples ( ⪰ A , ⊐ A , ▹ A ) (\succeq_A,\sqsupset_A,\mathrel{\triangleright}_A) ( ⪰ A , ⊐ A , ▹ A ) constructed from linear polynomial interpretations A \mathcal{A} A (via Proposition 3.11 ); the same goes for M \mathsf{M} M . In this setting, G W P O ( L , L ♯ ) GWPO(\mathsf{L},\mathsf{L}^{\sharp}) G W P O ( L , L ♯ ) and G W P O ( L , M ♯ ) GWPO(\mathsf{L},\mathsf{M}^{\sharp}) G W P O ( L , M ♯ ) generalize W P O ( L ) WPO(\mathsf{L}) W P O ( L ) as classes of reduction pairs, and also G W P O ( M , M ♯ ) GWPO(\mathsf{M},\mathsf{M}^{\sharp}) G W P O ( M , M ♯ ) generalizes W P O ( M ) WPO(\mathsf{M}) W P O ( M ) . These are consequences of Proposition A.12 and Proposition A.13 .
Our termination tool Mint is based on the standard techniques in the dependency pair framework, namely, recursive cycle analysis based on strongly connected components of dependency graphs [AG00, GAO02, HM05] and reduction pairs (Theorem 4.3). In addition, we use the usable rule technique (explained in Subsection 4.4) with tcap [24 ] and the refinement called usable rule w.r.t. argument filter [25 ] . To handle applicative term rewrite systems more effectively, the tool also uses the uncurrying technique [30 ] . The search for suitable reduction pairs is performed by encoding the search problem in the language of satisfiability modulo theory (SMT) solvers, using the standard techniques [ZHM09, YKS15]. Our restrictions on coefficients of linear polynomial or max/plus interpretations to { 0 , 1 } \{0,1\} { 0 , 1 } allow us to encode it into quantifier-free linear integer arithmetic with if-then-else expressions, which is known to be decidable. As discussed at the end of Subsection 4.4, C ε C_{\varepsilon} C ε -compatibility for usable rules is guaranteed for free, except for the case of using finite algebras (F 2 ♯ F^{\sharp}_{2} F 2 ♯ ). In this case, the reduction pair processor is applied without the usable rule technique.
The problems for the experiment consist of 1542 finite TRSs included below the directory TRS_Standard of version 11.6 of the Termination Problem Database (TPDB) [50 ] , including the secret problems for the Termination Competition 2026. The termination tool was run on a machine equipped with an Intel Core i7-11850H CPU (8 cores, 16 threads, 2.50–4.80 GHz) and 16 GB RAM, and used Z3 version 4.13.0 [16 ] as an SMT solver for constraint solving. A one-minute timeout was set for each run of a configuration on a termination problem. So, if a run neither proved (non-)termination nor timed out, it means that it terminated after exhausting the search space, or aborted due to some errors such as memory exhaustion. Some of the problems contain ill-formed rewrite rules like x → f ( y ) x \to f(y) x → f ( y ) . Our tool reports them as non-terminating TRSs, as other tools do.
Let us explain how to read the result table (Table 2 ) with an example: the configuration SPO ( F 2 ♯ ) \operatorname{SPO}(F^{\sharp}_{2}) SPO ( F 2 ♯ ) proved termination of 246 TRSs in the problem set, aborted on 11 problems (actually due to memory exhaustion), and reached the time limit for 19 problems. The total runtime on the whole problem set was 60 minutes.
Overall, we obtained more termination proofs by switching from the original WPO to the GWPO. Combining different kinds of algebras is quite effective, which is not possible for the WPO. As in theory, every problem solved by WPO ( L ) \operatorname{WPO}(L) WPO ( L ) was also solved by GWPO ( L , L ♯ ) \operatorname{GWPO}(L,L^{\sharp}) GWPO ( L , L ♯ ) , and the same holds for WPO ( M ) \operatorname{WPO}(M) WPO ( M ) and GWPO ( M , M ♯ ) \operatorname{GWPO}(M,M^{\sharp}) GWPO ( M , M ♯ ) . Due to the time limit, there was just one problem solved by WPO(L) but not by GWPO(L, M^{\sharp}). The configuration SPO(F^{\sharp}_{2}) proved termination of 9 TRSs that could not be proven by the other 10 constructions of reduction pairs. A representative example is { f ( a , b , x ) → f ( x , x , x ) } \{f(a, b, x) \to f(x, x, x)\} { f ( a , b , x ) → f ( x , x , x )} of Example 3.16 (SK90/4.50 in TPDB).
We also discuss the impact of the GWPO on state-of-the-art termination provers. Due to space limitations, we only consider the top two tools in the TRS_Standard category of the Termination Competition 2026, namely AProVE [19 ] and NaTT [56 ] . As shown in Table 2 , AProVE proved termination of 1036 TRSs, and NaTT proved termination of 888 TRSs, in the same experimental setting (with a one-minute time limit). The configurations of the form GWPO(∗ \ast ∗ , ∗ \ast ∗ ) or SPO(∗ \ast ∗ ) collectively proved termination of 725 distinct TRSs. Among them, there were 9 TRSs whose termination could not be proved by NaTT, namely:
AProVE_04/forward_instantiation Saito_26/AProVE_08_id_inc_p
AProVE_04/forward_instantiation2 Strategy_removed_AG01/#4.25
AProVE_08/id_inc Transformed_CSR_04/Ex4_DLMMU04_iGM
SK90/4.50 Various_04/11
SK90/4.55
Among them, AProVE failed to prove termination of Saito_26/AProVE_08_id_inc_p. The TRS is given below.
f ( s ( x ) ) → f ( h ( c ( p ( s ( x ) ) , p ( s ( x ) ) ) ) ) h ( c ( x , y ) ) → c ( h ( x ) , h ( y ) ) p ( s ( x ) ) → x f ( c ( s ( x ) , y ) ) → g ( c ( p ( s ( x ) ) , y ) ) h ( s ( x ) ) → s ( h ( p ( s ( x ) ) ) ) p ( 0 ) → 0 g ( c ( s ( x ) , y ) ) → g ( c ( y , p ( s ( x ) ) ) ) h ( 0 ) → 0 g ( c ( x , s ( y ) ) ) → g ( c ( p ( s ( y ) ) , x ) ) h ( 0 ) → s ( 0 ) g ( c ( x , x ) ) → f ( x ) \begin{aligned}
f(s(x)) &\to f(h(c(p(s(x)),p(s(x))))) & h(c(x,y)) &\to c(h(x),h(y)) & p(s(x)) &\to x \\
f(c(s(x),y)) &\to g(c(p(s(x)),y)) & h(s(x)) &\to s(h(p(s(x)))) & p(0) &\to0 \\
g(c(s(x),y)) &\to g(c(y,p(s(x)))) & h(0) &\to0 \\
g(c(x,s(y))) &\to g(c(p(s(y)),x)) & h(0) &\to s(0) \\
g(c(x,x)) &\to f(x)
\end{aligned} f ( s ( x )) f ( c ( s ( x ) , y )) g ( c ( s ( x ) , y )) g ( c ( x , s ( y ))) g ( c ( x , x )) → f ( h ( c ( p ( s ( x )) , p ( s ( x ))))) → g ( c ( p ( s ( x )) , y )) → g ( c ( y , p ( s ( x )))) → g ( c ( p ( s ( y )) , x )) → f ( x ) h ( c ( x , y )) h ( s ( x )) h ( 0 ) h ( 0 ) → c ( h ( x ) , h ( y )) → s ( h ( p ( s ( x )))) → 0 → s ( 0 ) p ( s ( x )) p ( 0 ) → x → 0
This problem was crafted by the first author as a secret problem for the Termination Competition 2026. There, our tool Mint was the only tool that proved the termination. We refer to Example 4.19 for the intuition behind the termination proof using SPO(M^{\sharp} \times M^{\sharp}).
Conclusion
We addressed the issues of the (M)SPO through the lens of the GWPO. In the reduction-order setting, we identified an efficient subclass (Theorem 3.37 ), and also a ground-total subclass (Theorem 3.46 ) for the GWPO. These results are also applicable to the (M)SPO by appealing to the simulation result (Theorem 3.33 and Corollary 3.35). In the reduction-pair setting, we devised a reduction-pair version of the GWPO (Theorem 4.13 ), and thereby the first reduction-pair version of the SPO (Corollary 4.18 ). The experiment with standard benchmarks (Table 2 ) demonstrated a large improvement over the original WPO.
We conclude with related and future work. In particular, we briefly discuss some related results presented in the first author’s PhD thesis [41 ] but not presented here.
Termination modulo associativity and commutativity (AC) is characterized by so-called AC reduction orders in a similar way to Proposition 2.3 . There are already AC versions of KBOs [48 , 35 , 58 ] , recursive path orders [40 ] , multiset path orders [29 ] , and monotonic semantic path orders [10 ] . (In fact, Ochiai, Aoto and Toyama pointed out a flaw in the monotonicity of Borralleras and Rubio’s AC-MSPO, and proposed a remedy for it [39 ] .) It is interesting to investigate unified orders for AC rewriting, as has been done for plain rewriting. As a first step, the first author has investigated an AC version of the GWPO ([41 Section 3.4] ) that corresponds to the E-AC-MSPO of [9 Section 2.6] (a simpler version of the aforementioned AC-MSPO), establishing a simulation result.
The WPO has been extended to co-rewrite pairs [55 ] , which are a generalization of reduction pairs to prove non-reachability in term rewriting. Not so surprisingly, the GWPO can be extended to co-rewrite pairs in a similar way; the details are found in [41 Chapter 5] . We note that co-rewrite pairs can be used as discrimination pairs for proving non-confluence [Aot13].
There is an extension of the reduction-pair version of the WPO (found in [57 Section 4.2] ) to properly subsume interpretation-based reduction pairs, i.e., ⪰ A ⊆ ⪰ W \succeq_A \subseteq\succeq_W ⪰ A ⊆ ⪰ W and ≻ A ⊆ ≻ W \succ_A \subseteq\succ_W ≻ A ⊆ ≻ W can be satisfied by choosing a suitable partial status and precedence. Although this extension does not greatly improve the power of the WPO in practice, it is natural to investigate a similar extension for the GWPO. In fact, it has turned out that the GWPO with a similar extension is possible, and can simulate arbitrary non-trivial reduction pairs ([41 Theorem 4.3.7] ).
While the path orders considered here compare arguments only lexicographically, it is well known that they can be extended to allow choice of argument comparison method depending on the root function symbols. In fact, the WPO formalized in Isabelle/HOL [49 ] extends Definition 4.8 so that it allows a choice between multiset and lexicographic extensions for each symbol, incorporating the well-known extension for the recursive path order. It is very likely that the same extension is also possible for the GWPO, because the proofs here seem independent of lexicographic extension. The general path order (GPO) [15 , 22 ] is a unifying framework for such extensions, parameterizing the way to compare arguments. The relationship between the GPO and our GWPO is worth investigating.
Acknowledgment
We thank René Thiemann and Akihisa Yamada for valuable feedback on our work. We also thank Jürgen Giesl for interesting questions at WST 2023 and FroCoS 2023, which led to Section 4 and Subsection 3.5, respectively. Special thanks go to Alfons Geser for providing a copy of his technical report [21 ] .
References
Appendix A. Omitted Proofs
We show that the termination of Example 3.26 cannot be shown by a WPO as a reduction order, if the algebra is restricted to a linear polynomial interpretation.
Proposition A.1. There is no weakly simple linear polynomial interpretation A \mathcal{A} A and precedence such that the induced WPO > W >_{\mathsf{W}} > W satisfies ( x ⋅ z ) ⋅ ( y ⋅ z ) > W ( ( S ⋅ x ) ⋅ y ) ⋅ z (x \mathbin{\cdot} z) \mathbin{\cdot} (y \mathbin{\cdot} z) >_{\mathsf{W}} ((S \mathbin{\cdot} x) \mathbin{\cdot} y) \mathbin{\cdot} z ( x ⋅ z ) ⋅ ( y ⋅ z ) > W (( S ⋅ x ) ⋅ y ) ⋅ z .
Proof. Let A A A be a weakly simple linear polynomial interpretation of the form x ⋅ A y = a x + b y + c x \cdot_A y=ax+by+c x ⋅ A y = a x + b y + c and S A = s S_A=s S A = s . As A A A is weakly simple, we have a , b ≥ 1 a,b \ge1 a , b ≥ 1 . Suppose t = ( x ⋅ z ) ⋅ ( y ⋅ z ) > W ( ( S ⋅ x ) ⋅ y ) ⋅ z = u t=(x\cdot z)\cdot(y\cdot z)>_W((S\cdot x)\cdot y)\cdot z=u t = ( x ⋅ z ) ⋅ ( y ⋅ z ) > W (( S ⋅ x ) ⋅ y ) ⋅ z = u . Consider t > A u t>_A u t > A u . It is unfolded to the inequality:
a 2 x + a b y + ( a b + b 2 ) z + ( a + b + 1 ) c > a 2 b x + a b y + b z + a 3 s + ( a 2 + a + 1 ) c a^2x+aby+(ab+b^2)z+(a+b+1)c>a^2bx+aby+bz+a^3s+(a^2+a+1)c a 2 x + ab y + ( ab + b 2 ) z + ( a + b + 1 ) c > a 2 b x + ab y + b z + a 3 s + ( a 2 + a + 1 ) c
This leads to b = 1 b=1 b = 1 and ( a + b + 1 ) c > a 3 s + ( a 2 + a + 1 ) c (a+b+1)c>a^3s+(a^2+a+1)c ( a + b + 1 ) c > a 3 s + ( a 2 + a + 1 ) c , yielding a contradiction. So case 1 is impossible. Moreover, cases 2a and 2b(ii) are impossible because of the variables, and case 2b(i) is also impossible because t t t and u u u have the same root symbols.
Next, we prove Theorem 3.3 . Let ( ⊵ , ⊵ ) (\unrhd,\trianglerighteq) ( ⊵ , ⊵ ) be a stable order pair on T \mathcal{T} T and > S >_{\mathrm S} > S the induced SPO. The transitivity, irreflexivity, and stability of > S >_{\mathrm S} > S are straightforward to prove.
Lemma A.2. The SPO > S >_{\mathrm S} > S is a stable strict order with the subterm property.
It remains to prove well-foundedness of > S >_{\mathrm S} > S under the assumption that ⊵ \trianglerighteq ⊵ is well-founded and F \mathcal{F} F is bounded. This follows from Corollary 4.18 and Remark 4.28: > S >_{\mathrm S} > S is well-founded because it is contained in the well-founded order of the reduction-pair version of the SPO.
We present a proof of Theorem 4.13 following the proofs for the WPO [57 , 55 ] . Except for well-foundedness, we only indicate the proof strategies by induction because the rest is routine; see [41 Chapter 4] for the omitted details. Let ( ⊵ G , > G ) (\unrhd_{\mathrm G},>_{\mathrm G}) ( ⊵ G , > G ) be the GWPO induced by a partial status π \pi π and pairs ( ⊵ A , ⊵ A ) (\unrhd_A,\trianglerighteq_A) ( ⊵ A , ⊵ A ) and ( ⊵ B , ⊵ B ) (\unrhd_B,\trianglerighteq_B) ( ⊵ B , ⊵ B ) of relations on terms.
Lemma A.3. The inclusion > G ⊆ ⊵ G >_{\mathrm G}\subseteq\unrhd_{\mathrm G} > G ⊆ ⊵ G holds.
Proof. Easy induction on ∣ s ∣ + ∣ t ∣ |s|+|t| ∣ s ∣ + ∣ t ∣ shows that s > G t s>_{\mathrm G}t s > G t implies s ⊵ G t s\unrhd_{\mathrm G}t s ⊵ G t .
Lemma A.4. If ( ⊵ A , ⊵ A ) (\unrhd_A,\trianglerighteq_A) ( ⊵ A , ⊵ A ) and ( ⊵ B , ⊵ B ) (\unrhd_B,\trianglerighteq_B) ( ⊵ B , ⊵ B ) are order pairs, then ⊵ G \unrhd_{\mathrm G} ⊵ G and > G >_{\mathrm G} > G are transitive, and ( ⊵ G , > G ) (\unrhd_{\mathrm G},>_{\mathrm G}) ( ⊵ G , > G ) is compatible.
Proof. As in [57 Lemma 7] , the claim is proven by showing the next four properties for all terms s s s , t t t and u u u : if s ⊵ G t s\unrhd_{\mathrm G}t s ⊵ G t and t ⊵ G u t\unrhd_{\mathrm G}u t ⊵ G u then s ⊵ G u s\unrhd_{\mathrm G}u s ⊵ G u ; if s ⊵ G t s\unrhd_{\mathrm G}t s ⊵ G t and t > G u t>_{\mathrm G}u t > G u then s > G u s>_{\mathrm G}u s > G u ; if s > G t s>_{\mathrm G}t s > G t and t ⊵ G u t\unrhd_{\mathrm G}u t ⊵ G u then s > G u s>_{\mathrm G}u s > G u ; and if s > G t s>_{\mathrm G}t s > G t and t > G u t>_{\mathrm G}u t > G u then s > G u s>_{\mathrm G}u s > G u . This is done by easy simultaneous induction on ∣ s ∣ + ∣ t ∣ + ∣ u ∣ |s|+|t|+|u| ∣ s ∣ + ∣ t ∣ + ∣ u ∣ .
Lemma A.5. If ⊵ A \unrhd_A ⊵ A and ⊵ B \unrhd_B ⊵ B are reflexive and A A A is simple with respect to π \pi π , then
t > G t i t>_{\mathrm G}t_i t > G t i whenever i ∈ π ( f ) i\in\pi(f) i ∈ π ( f ) and t = f ( t 1 , … , t n ) t=f(t_1,\ldots,t_n) t = f ( t 1 , … , t n ) , and
t ⊵ G t t\unrhd_{\mathrm G}t t ⊵ G t for all t t t (i.e., ⊵ G \unrhd_{\mathrm G} ⊵ G is reflexive).
Proof. As in [55 Lemma 1] , the claims are shown by simultaneous induction on ∣ t ∣ |t| ∣ t ∣ .
Next we show stability via Lemma A.5.
Lemma A.6. If ( ⊵ A , ⊵ A ) (\unrhd_A,\trianglerighteq_A) ( ⊵ A , ⊵ A ) and ( ⊵ B , ⊵ B ) (\unrhd_B,\trianglerighteq_B) ( ⊵ B , ⊵ B ) are stable, ⊵ A \unrhd_A ⊵ A and ⊵ B \unrhd_B ⊵ B are reflexive, and A A A is simple with respect to π \pi π , then ( ⊵ G , > G ) (\unrhd_{\mathrm G},>_{\mathrm G}) ( ⊵ G , > G ) is stable.
Proof. It suffices to prove the following properties: for all terms s s s and t t t and substitutions σ \sigma σ , if s ⊵ G t s\unrhd_{\mathrm G}t s ⊵ G t then s σ ⊵ G t σ s\sigma\unrhd_{\mathrm G}t\sigma s σ ⊵ G t σ , and if s > G t s>_{\mathrm G}t s > G t then s σ > G t σ s\sigma>_{\mathrm G}t\sigma s σ > G t σ . Following [55 Lemma 2] , we can prove these claims simultaneously by induction on ∣ s ∣ + ∣ t ∣ |s|+|t| ∣ s ∣ + ∣ t ∣ .
For our well-foundedness proof, we recall the notion of lexicographic product. In contrast to lexicographic combination, order pairs on possibly different sets are combined into a strict order on the set of tuples.
Definition A.7. Let ( ⪰ 1 , ≻ 1 ) , … , ( ⪰ n , ≻ n ) (\succeq_1, \succ_1), \ldots, (\succeq_n, \succ_n) ( ⪰ 1 , ≻ 1 ) , … , ( ⪰ n , ≻ n ) be order pairs on sets A 1 , … , A n A_1, \ldots, A_n A 1 , … , A n , respectively. The lexicographic product ( ⪰ 1 , ≻ 1 ) ⊗ ⋯ ⊗ ( ⪰ n , ≻ n ) (\succeq_1, \succ_1) \otimes\cdots\otimes(\succeq_n, \succ_n) ( ⪰ 1 , ≻ 1 ) ⊗ ⋯ ⊗ ( ⪰ n , ≻ n ) is the strict order ≻ \succ ≻ defined on A 1 × ⋯ × A n A_1 \times\cdots\times A_n A 1 × ⋯ × A n as follows: ( a 1 , … , a n ) ≻ ( b 1 , … , b n ) (a_1, \ldots, a_n) \succ(b_1, \ldots, b_n) ( a 1 , … , a n ) ≻ ( b 1 , … , b n ) if there exists an index k ∈ { 1 , … , n } k \in\{1, \ldots, n\} k ∈ { 1 , … , n } such that a k ≻ k b k a_k \succ_k b_k a k ≻ k b k and a j ⪰ j b j a_j \succeq_j b_j a j ⪰ j b j for all 1 ≤ j < k 1 \leq j < k 1 ≤ j < k .
Like lexicographic combination, the product operation preserves well-foundedness.
Proposition A.8. The lexicographic product of order pairs ( ⪰ 1 , ≻ 1 ) , … , ( ⪰ n , ≻ n ) (\succeq_1, \succ_1), \ldots, (\succeq_n, \succ_n) ( ⪰ 1 , ≻ 1 ) , … , ( ⪰ n , ≻ n ) is well-founded if every ≻ i \succ_i ≻ i is well-founded.
For showing that ≻ G \succ_G ≻ G is well-founded, we adopt Buchholz’s method [12 ] . One can find a similar proof in [57 Lemma 8] . We write SN ( ≻ G ) \operatorname{SN}(\succ_G) SN ( ≻ G ) for the set of all terms t t t such that there is no infinite descending sequence t ≻ G t 1 ≻ G t 2 ≻ G ⋯ t \succ_G t_1 \succ_G t_2 \succ_G \cdots t ≻ G t 1 ≻ G t 2 ≻ G ⋯ starting from t t t .10 We have the following basic properties:
The restriction of ≻ G \succ_G ≻ G to SN ( ≻ G ) \operatorname{SN}(\succ_G) SN ( ≻ G ) is a well-founded order on SN ( ≻ G ) \operatorname{SN}(\succ_G) SN ( ≻ G ) .
t ∈ SN ( ≻ G ) t \in\operatorname{SN}(\succ_G) t ∈ SN ( ≻ G ) if u ∈ SN ( ≻ G ) u \in\operatorname{SN}(\succ_G) u ∈ SN ( ≻ G ) for all terms u u u with t ≻ G u t \succ_G u t ≻ G u .
To exploit these properties, we need the assumptions to use Lemma A.4 .
Lemma A.9. Suppose that ( ⊒ A , ⊐ A ) (\sqsupseteq_A, \sqsupset_A) ( ⊒ A , ⊐ A ) and ( ⊒ B , ⊐ B ) (\sqsupseteq_B, \sqsupset_B) ( ⊒ B , ⊐ B ) are well-founded stable order pairs, and A A A is simple with respect to π \pi π . Then t ∈ SN ( ≻ G ) t \in\operatorname{SN}(\succ_G) t ∈ SN ( ≻ G ) whenever s = f ( s 1 , … , s m ) ≻ G t s = f(s_1, \ldots, s_m) \succ_G t s = f ( s 1 , … , s m ) ≻ G t and s i ∈ SN ( ≻ G ) s_i \in\operatorname{SN}(\succ_G) s i ∈ SN ( ≻ G ) for all i ∈ π ( f ) i \in\pi(f) i ∈ π ( f ) .
Proof. We perform induction on the quadruple ( s , s , π ( f ) ( s 1 , … , s m ) , t ) (s, s, \pi(f)(s_1, \ldots, s_m), t) ( s , s , π ( f ) ( s 1 , … , s m ) , t ) with respect to ≫ \gg ≫ , where ≫ \gg ≫ is the lexicographic product
( ⊒ A , ⊐ A ) ⊗ ( ⊒ B , ⊐ B ) ⊗ ( ⪰ G lex , ≻ G lex ) ⊗ ( ⪰ , ▹ ) (\sqsupseteq_A, \sqsupset_A) \otimes(\sqsupseteq_B, \sqsupset_B) \otimes(\succeq_G^{\operatorname{lex}}, \succ_G^{\operatorname{lex}}) \otimes(\succeq, \triangleright) ( ⊒ A , ⊐ A ) ⊗ ( ⊒ B , ⊐ B ) ⊗ ( ⪰ G lex , ≻ G lex ) ⊗ ( ⪰ , ▹ )
defined on T × T × SN ( ≻ G ) ≤ k × T T \times T \times\operatorname{SN}(\succ_G)^{\leq k} \times T T × T × SN ( ≻ G ) ≤ k × T for an upper bound k k k of arity. It suffices to prove that u ∈ SN ( ≻ G ) u \in\operatorname{SN}(\succ_G) u ∈ SN ( ≻ G ) whenever t ≻ G u t \succ_G u t ≻ G u . If t t t is a variable, then by definition t ⊐ A u t \sqsupset_A u t ⊐ A u must hold. By applying σ = { t ↦ u } \sigma= \{t \mapsto u\} σ = { t ↦ u } to t ⊐ A u t \sqsupset_A u t ⊐ A u successively, we obtain u ⊐ A u σ ⊐ A ( u σ ) σ ⊐ A ⋯ u \sqsupset_A u\sigma\sqsupset_A (u\sigma)\sigma\sqsupset_A \cdots u ⊐ A u σ ⊐ A ( u σ ) σ ⊐ A ⋯ , which contradicts the well-foundedness of ⊐ A \sqsupset_A ⊐ A . So, letting t = g ( t 1 , … , t n ) t = g(t_1, \ldots, t_n) t = g ( t 1 , … , t n ) , we analyze the derivation of s ≻ G t s \succ_G t s ≻ G t .
Suppose s ⊐ A t s \sqsupset_A t s ⊐ A t . By the simplicity assumption, we have s ⊐ A t ⪰ A t j s \sqsupset_A t \succeq_A t_j s ⊐ A t ⪰ A t j or s ⊐ A t ⊐ A t j s \sqsupset_A t \sqsupset_A t_j s ⊐ A t ⊐ A t j , and therefore for all j ∈ π ( g ) j \in\pi(g) j ∈ π ( g ) we have s ≻ G t j s \succ_G t_j s ≻ G t j by case 1. So, we apply the induction hypothesis with ( s , s , π ( f ) ( s 1 , … , s m ) , t ) ≫ ( s , s , π ( f ) ( s 1 , … , s m ) , t j ) (s, s, \pi(f)(s_1, \ldots, s_m), t) \gg(s, s, \pi(f)(s_1, \ldots, s_m), t_j) ( s , s , π ( f ) ( s 1 , … , s m ) , t ) ≫ ( s , s , π ( f ) ( s 1 , … , s m ) , t j ) to obtain t j ∈ SN ( ≻ G ) t_j \in\operatorname{SN}(\succ_G) t j ∈ SN ( ≻ G ) for all j ∈ π ( g ) j \in\pi(g) j ∈ π ( g ) . Here, for readability, the decreasing components are indicated by underlining. Then, we apply the induction hypothesis with ( s , s , π ( f ) ( s 1 , … , s m ) , t ) ≫ ( t , t , π ( g ) ( t 1 , … , t n ) , u ) (s, s, \pi(f)(s_1, \ldots, s_m), t) \gg(t, t, \pi(g)(t_1, \ldots, t_n), u) ( s , s , π ( f ) ( s 1 , … , s m ) , t ) ≫ ( t , t , π ( g ) ( t 1 , … , t n ) , u ) to conclude u ∈ SN ( ≻ G ) u \in\operatorname{SN}(\succ_G) u ∈ SN ( ≻ G ) .
Suppose s ⪰ A t s \succeq_A t s ⪰ A t . a. Assume s = f ( s 1 , … , s m ) s = f(s_1, \ldots, s_m) s = f ( s 1 , … , s m ) and s i ⪰ G t s_i \succeq_G t s i ⪰ G t for some i ∈ π ( f ) i \in\pi(f) i ∈ π ( f ) . Then we have s i ≻ G u s_i \succ_G u s i ≻ G u by Lemma A.4 , so s i ∈ SN ( ≻ G ) s_i \in\operatorname{SN}(\succ_G) s i ∈ SN ( ≻ G ) yields u ∈ SN ( ≻ G ) u \in\operatorname{SN}(\succ_G) u ∈ SN ( ≻ G ) . b. Assume s ≻ G t j s \succ_G t_j s ≻ G t j for all j ∈ π ( g ) j \in\pi(g) j ∈ π ( g ) . We apply the induction hypothesis with
( s , s , π ( f ) ( s 1 , … , s m ) , t ) ≫ ( s , s , π ( f ) ( s 1 , … , s m ) , t j ) (s, s, \pi(f)(s_1, \ldots, s_m), t) \gg(s, s, \pi(f)(s_1, \ldots, s_m), t_j) ( s , s , π ( f ) ( s 1 , … , s m ) , t ) ≫ ( s , s , π ( f ) ( s 1 , … , s m ) , t j )
to obtain t j ∈ SN ( ≻ G ) t_j \in\operatorname{SN}(\succ_G) t j ∈ SN ( ≻ G ) for all j ∈ π ( g ) j \in\pi(g) j ∈ π ( g ) . Now, we apply the induction hypothesis with
( s , s , π ( f ) ( s 1 , … , s m ) , t ) ≫ ( t , t , π ( g ) ( t 1 , … , t n ) , u ) (s, s, \pi(f)(s_1, \ldots, s_m), t) \gg(t, t, \pi(g)(t_1, \ldots, t_n), u) ( s , s , π ( f ) ( s 1 , … , s m ) , t ) ≫ ( t , t , π ( g ) ( t 1 , … , t n ) , u )
to obtain u ∈ SN ( ≻ G ) u \in\operatorname{SN}(\succ_G) u ∈ SN ( ≻ G ) , where the inequality of ≫ \gg ≫ is justified as follows: if case 2b(i) holds, the second component decreases; if case 2b(ii) holds, the third decreases. □ \square □
Lemma A.10. Suppose that ( ⪰ A , ⪰ A ) (\succeq_A,\mathrel{\succeq_A}) ( ⪰ A , ⪰ A ) and ( ⪰ B , ⪰ B ) (\succeq_B,\mathrel{\succeq_B}) ( ⪰ B , ⪰ B ) are well-founded stable order pairs, and A A A is simple with respect to π \pi π . Then > G >_G > G is well-founded.
Proof. We show that t ∈ SN ( > G ) t \in\operatorname{SN}(>_G) t ∈ SN ( > G ) for all terms t t t by structural induction on t t t . It suffices to show that u ∈ SN ( > G ) u \in\operatorname{SN}(>_G) u ∈ SN ( > G ) whenever t > G u t >_G u t > G u . By the same argument used in the proof of Lemma A.9, we can assume that t t t is not a variable, so let t = f ( t 1 , … , t n ) t=f(t_1,\ldots,t_n) t = f ( t 1 , … , t n ) . By the induction hypothesis t i ∈ SN ( > G ) t_i \in\operatorname{SN}(>_G) t i ∈ SN ( > G ) for all i i i , so Lemma A.9 applies. □ \square □
To conclude Theorem 4.13, it remains to prove monotonicity. Let ( ⪰ M G , > M G ) (\succeq_{\mathrm{MG}},>_{\mathrm{MG}}) ( ⪰ MG , > MG ) be the monotone generalized weighted path order induced by a partial status π \pi π and triples ( ⪰ A , ⪰ A , ≻ A ) (\succeq_A,\succeq_A,\mathrel{\succ_A}) ( ⪰ A , ⪰ A , ≻ A ) and ( ⪰ B , ⪰ B , ≻ B ) (\succeq_B,\succeq_B,\mathrel{\succ_B}) ( ⪰ B , ⪰ B , ≻ B ) of relations on terms.
Lemma A.11. Suppose that ( ⪰ A , ⪰ A , ≻ A ) (\succeq_A,\succeq_A,\mathrel{\succ_A}) ( ⪰ A , ⪰ A , ≻ A ) and ( ⪰ B , ⪰ B , ≻ B ) (\succeq_B,\succeq_B,\mathrel{\succ_B}) ( ⪰ B , ⪰ B , ≻ B ) are reduction triples, and ( ⪰ A , ≻ A ) (\succeq_A,\mathrel{\succ_A}) ( ⪰ A , ≻ A ) is simple with respect to π \pi π . Then ⪰ M G \succeq_{\mathrm{MG}} ⪰ MG is monotone. If in addition π \pi π is total, then > M G >_{\mathrm{MG}} > MG is also monotone.
Proof. The claim can be shown using Lemma A.5, following the line of Theorem 3.7. □ \square □
In Table 2 it is claimed that GWPO ( L , L ♯ ) \operatorname{GWPO}(\mathrm{L},\mathrm{L}^{\sharp}) GWPO ( L , L ♯ ) generalizes WPO ( L ) \operatorname{WPO}(\mathrm{L}) WPO ( L ) and GWPO ( M , M ♯ ) \operatorname{GWPO}(\mathrm{M},\mathrm{M}^{\sharp}) GWPO ( M , M ♯ ) generalizes WPO ( M ) \operatorname{WPO}(\mathrm{M}) WPO ( M ) , as classes of reduction pairs. To show this, let F \mathcal{F} F be the finite signature, and ( ⪰ W , > W ) (\succeq_W,>_W) ( ⪰ W , > W ) the WPO induced by an F \mathcal{F} F -algebra A \mathcal{A} A on N \mathbb{N} N (ordered as usual), a precedence ⪰ \succeq ⪰ and a partial status π \pi π . The signature F \mathcal{F} F can be partitioned into equivalence classes F 1 , … , F n F_1,\ldots,F_n F 1 , … , F n induced by ⪰ \succeq ⪰ . We can assume that they are topologically sorted. So we have i > j i>j i > j whenever f ∈ F i f\in F_i f ∈ F i , g ∈ F j g\in F_j g ∈ F j , and f ≻ g f\succ g f ≻ g . Now we extend A \mathcal{A} A to the ( F ∪ F ♯ ) (\mathcal{F}\cup\mathcal{F}^{\sharp}) ( F ∪ F ♯ ) -algebra A ♯ \mathcal{A}^{\sharp} A ♯ with f A ♯ ( x 1 , … , x n ) = k f^{\sharp}_{\mathcal{A}}(x_1,\ldots,x_n)=k f A ♯ ( x 1 , … , x n ) = k for each f ( n ) ∈ F k f^{(n)}\in F_k f ( n ) ∈ F k . Then we have:
Proposition A.12. The GWPO ( ⪰ M G , > G ) (\succeq_{\mathrm{MG}},>_G) ( ⪰ MG , > G ) induced by the partial status π \pi π and the reduction triples ( ⪰ A , ⪰ A , ≻ A ) (\succeq_A,\succeq_A,\mathrel{\succ_A}) ( ⪰ A , ⪰ A , ≻ A ) and ( ⪰ A , ⪰ A ♯ , ≻ A ♯ ) (\succeq_A,\succeq^{\sharp}_A,\mathrel{\succ^{\sharp}_A}) ( ⪰ A , ⪰ A ♯ , ≻ A ♯ ) extends ( ⪰ W , > W ) (\succeq_W,>_W) ( ⪰ W , > W ) .
Proof. By construction, ( ⪰ G , > G ) (\succeq_G,>_G) ( ⪰ G , > G ) extends ( ⪰ W , > W ) (\succeq_W,>_W) ( ⪰ W , > W ) . Moreover, since A \mathcal{A} A is normal, ⪰ A \succeq_A ⪰ A extends ⪰ W \succeq_W ⪰ W . The claim immediately follows from these facts. □ \square □
By slightly changing the argument above, we can show that GWPO ( L , M ♯ ) \operatorname{GWPO}(\mathrm{L},\mathrm{M}^{\sharp}) GWPO ( L , M ♯ ) generalizes WPO ( L ) \operatorname{WPO}(\mathrm{L}) WPO ( L ) : After taking the partition F 1 , … , F n F_1,\ldots,F_n F 1 , … , F n , we define a max/plus ( F ∪ F ♯ ) (\mathcal{F}\cup\mathcal{F}^{\sharp}) ( F ∪ F ♯ ) -algebra B \mathcal{B} B by
f B ( x 1 , … , x n ) = max { 0 , x 1 , … , x n } f B ♯ ( x 1 , … , x n ) = k f_{\mathcal{B}}(x_1,\ldots,x_n)=\max\{0,x_1,\ldots,x_n\}
\qquad
f^{\sharp}_{\mathcal{B}}(x_1,\ldots,x_n)=k f B ( x 1 , … , x n ) = max { 0 , x 1 , … , x n } f B ♯ ( x 1 , … , x n ) = k
for each f ( n ) ∈ F k f^{(n)}\in F_k f ( n ) ∈ F k . Then we have:
Proposition A.13. Let ( ⪰ M G , > G ) (\succeq_{\mathrm{MG}},>_G) ( ⪰ MG , > G ) be the GWPO induced by the partial status π \pi π and the reduction triples ( ⪰ A , ⪰ A , ≻ A ) (\succeq_A,\succeq_A,\mathrel{\succ_A}) ( ⪰ A , ⪰ A , ≻ A ) and ( ⪰ B , ⪰ B ♯ , ≻ B ♯ ) (\succeq_B,\succeq^{\sharp}_B,\mathrel{\succ^{\sharp}_B}) ( ⪰ B , ⪰ B ♯ , ≻ B ♯ ) , and let s s s and t t t be terms with Var ( s ) ⊇ Var ( t ) \operatorname{Var}(s)\supseteq\operatorname{Var}(t) Var ( s ) ⊇ Var ( t ) . Then s ⪰ W t s\succeq_W t s ⪰ W t implies s ⪰ M G t s\succeq_{\mathrm{MG}}t s ⪰ MG t , and also s > W t s>_W t s > W t implies s > G t s>_G t s > G t .
Proof. By construction, ( ⪰ G , > G ) (\succeq_G,>_G) ( ⪰ G , > G ) extends ( ⪰ W , > W ) (\succeq_W,>_W) ( ⪰ W , > W ) , and ⪰ A \succeq_A ⪰ A extends ⪰ W \succeq_W ⪰ W , as in the proof of Proposition A.12. Moreover, s ⪰ B t s\succeq_B t s ⪰ B t follows from Var ( s ) ⊇ Var ( t ) \operatorname{Var}(s)\supseteq\operatorname{Var}(t) Var ( s ) ⊇ Var ( t ) . So the claim holds. □ \square □
Since the dependency pair framework assumes TRSs with the variable conditions, the requirement Var ( s ) ⊇ Var ( t ) \operatorname{Var}(s)\supseteq\operatorname{Var}(t) Var ( s ) ⊇ Var ( t ) in the statement is satisfied for free.