YES We show the termination of the TRS R: f(f(X)) -> c(n__f(n__g(n__f(X)))) c(X) -> d(activate(X)) h(X) -> c(n__d(X)) f(X) -> n__f(X) g(X) -> n__g(X) d(X) -> n__d(X) activate(n__f(X)) -> f(activate(X)) activate(n__g(X)) -> g(X) activate(n__d(X)) -> d(X) activate(X) -> X -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: f#(f(X)) -> c#(n__f(n__g(n__f(X)))) p2: c#(X) -> d#(activate(X)) p3: c#(X) -> activate#(X) p4: h#(X) -> c#(n__d(X)) p5: activate#(n__f(X)) -> f#(activate(X)) p6: activate#(n__f(X)) -> activate#(X) p7: activate#(n__g(X)) -> g#(X) p8: activate#(n__d(X)) -> d#(X) and R consists of: r1: f(f(X)) -> c(n__f(n__g(n__f(X)))) r2: c(X) -> d(activate(X)) r3: h(X) -> c(n__d(X)) r4: f(X) -> n__f(X) r5: g(X) -> n__g(X) r6: d(X) -> n__d(X) r7: activate(n__f(X)) -> f(activate(X)) r8: activate(n__g(X)) -> g(X) r9: activate(n__d(X)) -> d(X) r10: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1, p3, p5, p6} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: f#(f(X)) -> c#(n__f(n__g(n__f(X)))) p2: c#(X) -> activate#(X) p3: activate#(n__f(X)) -> activate#(X) p4: activate#(n__f(X)) -> f#(activate(X)) and R consists of: r1: f(f(X)) -> c(n__f(n__g(n__f(X)))) r2: c(X) -> d(activate(X)) r3: h(X) -> c(n__d(X)) r4: f(X) -> n__f(X) r5: g(X) -> n__g(X) r6: d(X) -> n__d(X) r7: activate(n__f(X)) -> f(activate(X)) r8: activate(n__g(X)) -> g(X) r9: activate(n__d(X)) -> d(X) r10: activate(X) -> X The set of usable rules consists of r1, r2, r4, r5, r6, r7, r8, r9, r10 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1) = x1 + 9 f_A(x1) = max{17, x1 + 9} c#_A(x1) = x1 + 9 n__f_A(x1) = x1 + 9 n__g_A(x1) = max{1, x1 - 27} activate#_A(x1) = max{9, x1 + 8} activate_A(x1) = x1 + 8 c_A(x1) = x1 + 6 d_A(x1) = max{5, x1 - 2} g_A(x1) = max{9, x1 - 20} n__d_A(x1) = max{1, x1 - 2} precedence: n__g = activate = g > f# = f = c# = n__f = activate# = c = d = n__d partial status: pi(f#) = [1] pi(f) = [1] pi(c#) = [1] pi(n__f) = [] pi(n__g) = [] pi(activate#) = [1] pi(activate) = [1] pi(c) = [] pi(d) = [] pi(g) = [] pi(n__d) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1) = max{17, x1 + 9} f_A(x1) = x1 + 20 c#_A(x1) = 19 n__f_A(x1) = 9 n__g_A(x1) = 7 activate#_A(x1) = 18 activate_A(x1) = 8 c_A(x1) = 41 d_A(x1) = 41 g_A(x1) = 8 n__d_A(x1) = 33 precedence: n__d > activate > n__g = c = g > d > f# > c# > f > n__f = activate# partial status: pi(f#) = [1] pi(f) = [] pi(c#) = [] pi(n__f) = [] pi(n__g) = [] pi(activate#) = [] pi(activate) = [] pi(c) = [] pi(d) = [] pi(g) = [] pi(n__d) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: f#(f(X)) -> c#(n__f(n__g(n__f(X)))) p2: activate#(n__f(X)) -> activate#(X) p3: activate#(n__f(X)) -> f#(activate(X)) and R consists of: r1: f(f(X)) -> c(n__f(n__g(n__f(X)))) r2: c(X) -> d(activate(X)) r3: h(X) -> c(n__d(X)) r4: f(X) -> n__f(X) r5: g(X) -> n__g(X) r6: d(X) -> n__d(X) r7: activate(n__f(X)) -> f(activate(X)) r8: activate(n__g(X)) -> g(X) r9: activate(n__d(X)) -> d(X) r10: activate(X) -> X The estimated dependency graph contains the following SCCs: {p2} -- 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(f(X)) -> c(n__f(n__g(n__f(X)))) r2: c(X) -> d(activate(X)) r3: h(X) -> c(n__d(X)) r4: f(X) -> n__f(X) r5: g(X) -> n__g(X) r6: d(X) -> n__d(X) r7: activate(n__f(X)) -> f(activate(X)) r8: activate(n__g(X)) -> g(X) r9: activate(n__d(X)) -> d(X) r10: 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: activate#_A(x1) = max{4, x1 + 3} n__f_A(x1) = max{3, x1 + 2} precedence: activate# = n__f partial status: pi(activate#) = [1] pi(n__f) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: activate#_A(x1) = max{1, x1 - 1} n__f_A(x1) = x1 precedence: activate# = n__f partial status: pi(activate#) = [] pi(n__f) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.