the extended monotone partial Σ-algebra A = hA,J·K, , wi where A = {0, 1}, is >, and w is the union of and equality. The interpretations are given by: JaK = 1, JbK = 0 and JfK(x)
x
for all x ∈ A. Then T is defined, R is decreasing (JaK = 1 > 0 = JbK), and S is weakly decreasing (JbK = 0 ≥ 0 = JbK and Jf(b)K
x ). Hence we conclude SNR/S(T) by an application of Theorem 19.
See further Example 49 in Section 9 for a non-trivial example.
5 Stepwise Removal of Rules
For termination proofs it is common practice to weaken the proof obligation stepwise by removing rules. The idea is to find interpretations such that a part R0⊆ R of the rules is decreasing and the remaining rules are weakly decreasing. Then for termination of R it suffices to prove termination of the rules in the complement R\R0. We would also like to have this possibility for proofs of local
termination. However, for local termination we cannot simply remove (and then forget about) the strictly decreasing rules, as the following example illustrates.
Example 21. Consider the set T = {a} in the TRS with the following rules:
a→ b b→ b
We define a monotone partial Σ-algebra hA,J·K, i by A = N, JaK = 1 and JbK = 0, taking for the natural order > on N. Then a → b is decreasing since
JaK > JbK, and for b → b we have JbK = JbK. However, removing the strictly decreasing rule a→ b is not sound, since the resulting TRS is terminating on T. Let us briefly elaborate on the following theorem which enables us to remo- ve rules stepwise. Assume that the goal is proving that R is terminating relative to S on T , that is, SNR/S(T). We start with zero knowledge: SN∅/R∪S(T). We
search for an interpretation that makes a part R0⊆ R of the rules decreasing and the remaining rules in R∪ S weakly decreasing. Then the rules in R0can only be applied finitely often: SNR0/((R\R0)∪S)(T). But how to proceed? As we have seen
above, we cannot simply forget about the rules R0, but need to take into account their influence on the familyFamR∪S(T). A possible and theoretically comple-
te solution would be to require these rules to be weakly decreasing. However, for practical applicability this requirement seems too strict as it imposes heavy restrictions on the termination order. We propose a different approach, which allows the ’ removed’ rules R0 to arbitrarily change, even increase, the interpre- tation of the rewritten terms, as long as rewriting defined terms yields defined terms again. For this purpose we introduce a relation on A, with respect to which the already removed rules have to be decreasing.
Theorem 22. Let R, R0 and U be TRSs over the signature Σ, and T ⊆ Ter(Σ, ∅) a set of terms such that SNU/(R∪R0)(T) holds. Then SN(U∪R0)/R(T) holds if and only if
there exists an extended monotone partial Σ-algebraA = hA,J·K, , wi and a relation on A such that the set T is defined, R0is decreasing (with respect to), R is weakly
decreasing (with respect tow), and: • U is decreasing with respect to ,
• for every f∈ Σ the functionJfK is closed and monotone with respect to . Bewijs. Straightforward extension of the proof of Theorem 19. The ’ only if’-part follows immediately by taking := . For the ’ if’-part consider an infinite reduction t1→ t2→ . . . with t1∈ T. Then since U is decreasing with respect to
we conclude ∀i ∈ N. JtiK
yand by SNU/(R∪R0)(T) we can cut off the prefix of
the sequence containing the finitely many U steps.
Example 23. We reconsider Example 14, and prove termination of R on T . The usage of Theorem 22 allows for a simpler stepwise termination proof. In parti- cular, for removing the rules for fac we can employ the standard interpretation mul as· and add as +. Let A = hA,J·K, >i where A := N, > the natural order on N, andJ·K is given by:
J0K := 0 JsK(n) := n + 1 JfacK(n) := (n + 2)!
JmulK(n, m) := n · m JaddK(n, m) := n + m J−K(n, m) x
for all n, m∈ N. Then (ρ1) and (ρ2) are decreasing:
Jfac(0), αK = 2 > 1 = Js(0), αK
Jfac(s(x)), αK = (α(x) + 3)! > (α(x) + 1)(α(x) + 2)! = Jmul(fac(x), s(x)), αK
and obviously all other rules are weakly decreasing. Let U1 = {(ρ1), (ρ2)}, and
R1 = R \ U1. Then by Theorem 22 it suffices to show SNU1/R1(T) to conclude
SNR(T).
As second step, we remove the mul rules. LetA = hA,J·K, >i with A := N, > and:
J0K := 0 JsK(n) := n + 1 JfacK(n) := n
JmulK(n, m) := (n + 1) · (m + 1) JaddK(n, m) := n + m J−K(n, m) x
for all n, m∈ N. Recall that the rules from U1have to be taken into considera-
tion as they have an impact on the set of reachable terms (otherwise the set of terms T would consist only of normal forms). Nevertheless, the rule (ρ2) from
U1 is not decreasing (not even weakly decreasing) with respect to the above
interpretation:
Jfac(s(x)), αK = α(x) + 1 6≥ (α(x) + 1) · (α(x) + 2) = Jmul(fac(x), s(x)), αK
This is also not necessary. It suffices that U1is decreasing with respect to any
other relation guaranteeing that all reachable terms are defined. For the cur- rent example we can chose the ’ total’ relation = {(n, m) | n, m ∈ N} relating