YES We show the termination of the TRS R: f(X) -> cons(X,n__f(g(X))) g(|0|()) -> s(|0|()) g(s(X)) -> s(s(g(X))) sel(|0|(),cons(X,Y)) -> X sel(s(X),cons(Y,Z)) -> sel(X,activate(Z)) f(X) -> n__f(X) activate(n__f(X)) -> f(X) activate(X) -> X -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: f#(X) -> g#(X) p2: g#(s(X)) -> g#(X) p3: sel#(s(X),cons(Y,Z)) -> sel#(X,activate(Z)) p4: sel#(s(X),cons(Y,Z)) -> activate#(Z) p5: activate#(n__f(X)) -> f#(X) and R consists of: r1: f(X) -> cons(X,n__f(g(X))) r2: g(|0|()) -> s(|0|()) r3: g(s(X)) -> s(s(g(X))) r4: sel(|0|(),cons(X,Y)) -> X r5: sel(s(X),cons(Y,Z)) -> sel(X,activate(Z)) r6: f(X) -> n__f(X) r7: activate(n__f(X)) -> f(X) r8: activate(X) -> X The estimated dependency graph contains the following SCCs: {p3} {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: sel#(s(X),cons(Y,Z)) -> sel#(X,activate(Z)) and R consists of: r1: f(X) -> cons(X,n__f(g(X))) r2: g(|0|()) -> s(|0|()) r3: g(s(X)) -> s(s(g(X))) r4: sel(|0|(),cons(X,Y)) -> X r5: sel(s(X),cons(Y,Z)) -> sel(X,activate(Z)) r6: f(X) -> n__f(X) r7: activate(n__f(X)) -> f(X) r8: activate(X) -> X The set of usable rules consists of r1, r2, r3, r6, r7, r8 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: sel#_A(x1,x2) = max{x1 + 7, x2 + 2} s_A(x1) = max{1, x1} cons_A(x1,x2) = max{x1 + 3, x2 + 3} activate_A(x1) = max{4, x1 + 3} g_A(x1) = x1 |0|_A = 2 f_A(x1) = x1 + 6 n__f_A(x1) = x1 + 3 precedence: sel# = activate = |0| > g = f > cons > s = n__f partial status: pi(sel#) = [1, 2] pi(s) = [1] pi(cons) = [1, 2] pi(activate) = [1] pi(g) = [1] pi(|0|) = [] pi(f) = [] pi(n__f) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: sel#_A(x1,x2) = max{0, x1 - 12} s_A(x1) = max{12, x1 + 6} cons_A(x1,x2) = max{x1 + 10, x2 + 10} activate_A(x1) = x1 + 2 g_A(x1) = max{5, x1} |0|_A = 6 f_A(x1) = 4 n__f_A(x1) = x1 + 1 precedence: sel# = s = cons = activate = g = |0| = f = n__f partial status: pi(sel#) = [] pi(s) = [1] pi(cons) = [2] pi(activate) = [1] pi(g) = [1] pi(|0|) = [] pi(f) = [] pi(n__f) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: g#(s(X)) -> g#(X) and R consists of: r1: f(X) -> cons(X,n__f(g(X))) r2: g(|0|()) -> s(|0|()) r3: g(s(X)) -> s(s(g(X))) r4: sel(|0|(),cons(X,Y)) -> X r5: sel(s(X),cons(Y,Z)) -> sel(X,activate(Z)) r6: f(X) -> n__f(X) r7: activate(n__f(X)) -> f(X) r8: activate(X) -> X The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: g#_A(x1) = max{4, x1 + 3} s_A(x1) = max{3, x1 + 2} precedence: g# = s partial status: pi(g#) = [1] pi(s) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: g#_A(x1) = max{1, x1 - 1} s_A(x1) = x1 precedence: g# = s partial status: pi(g#) = [] pi(s) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.