YES We show the termination of the TRS R: f(X) -> cons(X,n__f(n__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) g(X) -> n__g(X) activate(n__f(X)) -> f(activate(X)) activate(n__g(X)) -> g(activate(X)) activate(X) -> X -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: g#(s(X)) -> g#(X) p2: sel#(s(X),cons(Y,Z)) -> sel#(X,activate(Z)) p3: sel#(s(X),cons(Y,Z)) -> activate#(Z) p4: activate#(n__f(X)) -> f#(activate(X)) p5: activate#(n__f(X)) -> activate#(X) p6: activate#(n__g(X)) -> g#(activate(X)) p7: activate#(n__g(X)) -> activate#(X) and R consists of: r1: f(X) -> cons(X,n__f(n__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: g(X) -> n__g(X) r8: activate(n__f(X)) -> f(activate(X)) r9: activate(n__g(X)) -> g(activate(X)) r10: activate(X) -> X The estimated dependency graph contains the following SCCs: {p2} {p5, p7} {p1} -- 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(n__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: g(X) -> n__g(X) r8: activate(n__f(X)) -> f(activate(X)) r9: activate(n__g(X)) -> g(activate(X)) r10: activate(X) -> X The set of usable rules consists of r1, r2, r3, r6, r7, r8, r9, r10 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: sel#_A(x1,x2) = x1 s_A(x1) = x1 cons_A(x1,x2) = (0,1) activate_A(x1) = ((1,1),(1,1)) x1 + (4,4) f_A(x1) = (2,2) n__f_A(x1) = (1,1) n__g_A(x1) = x1 + (3,3) g_A(x1) = x1 + (4,3) |0|_A() = (1,0) precedence: |0| > cons = activate = f = n__f > n__g = g > sel# = s partial status: pi(sel#) = [1] pi(s) = [1] pi(cons) = [] pi(activate) = [1] pi(f) = [] pi(n__f) = [] pi(n__g) = [] pi(g) = [1] pi(|0|) = [] 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: activate#(n__g(X)) -> activate#(X) p2: activate#(n__f(X)) -> activate#(X) and R consists of: r1: f(X) -> cons(X,n__f(n__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: g(X) -> n__g(X) r8: activate(n__f(X)) -> f(activate(X)) r9: activate(n__g(X)) -> g(activate(X)) r10: activate(X) -> X The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: activate#_A(x1) = ((0,1),(0,0)) x1 + (2,2) n__g_A(x1) = ((0,0),(0,1)) x1 + (1,1) n__f_A(x1) = ((0,1),(0,1)) x1 + (1,1) precedence: activate# = n__g = n__f partial status: pi(activate#) = [] pi(n__g) = [] pi(n__f) = [] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__f(X)) -> activate#(X) and R consists of: r1: f(X) -> cons(X,n__f(n__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: g(X) -> n__g(X) r8: activate(n__f(X)) -> f(activate(X)) r9: activate(n__g(X)) -> g(activate(X)) r10: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__f(X)) -> activate#(X) and R consists of: r1: f(X) -> cons(X,n__f(n__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: g(X) -> n__g(X) r8: activate(n__f(X)) -> f(activate(X)) r9: activate(n__g(X)) -> g(activate(X)) r10: activate(X) -> X The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: activate#_A(x1) = ((1,0),(1,0)) x1 + (2,2) n__f_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: activate# = n__f partial status: pi(activate#) = [] pi(n__f) = [] 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(n__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: g(X) -> n__g(X) r8: activate(n__f(X)) -> f(activate(X)) r9: activate(n__g(X)) -> g(activate(X)) r10: activate(X) -> X The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: g#_A(x1) = ((1,0),(1,0)) x1 + (2,2) s_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: g# = s partial status: pi(g#) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.