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: max/plus interpretations on natural numbers: f#_A(x1) = max{5, x1 + 4} f_A(x1) = x1 + 5 c#_A(x1) = max{6, x1 + 3} n__f_A(x1) = x1 + 5 n__g_A(x1) = max{0, x1 - 4} activate#_A(x1) = x1 + 1 activate_A(x1) = x1 + 2 c_A(x1) = 3 d_A(x1) = 2 g_A(x1) = max{2, x1 - 2} n__d_A(x1) = 0 The next rules are strictly ordered: p2, p3 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)) -> 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: (no SCCs)