YES We show the termination of the TRS R: f(f(x)) -> f(g(f(x),x)) f(f(x)) -> f(h(f(x),f(x))) g(x,y) -> y h(x,x) -> g(x,|0|()) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: f#(f(x)) -> f#(g(f(x),x)) p2: f#(f(x)) -> g#(f(x),x) p3: f#(f(x)) -> f#(h(f(x),f(x))) p4: f#(f(x)) -> h#(f(x),f(x)) p5: h#(x,x) -> g#(x,|0|()) and R consists of: r1: f(f(x)) -> f(g(f(x),x)) r2: f(f(x)) -> f(h(f(x),f(x))) r3: g(x,y) -> y r4: h(x,x) -> g(x,|0|()) The estimated dependency graph contains the following SCCs: {p1, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: f#(f(x)) -> f#(g(f(x),x)) p2: f#(f(x)) -> f#(h(f(x),f(x))) and R consists of: r1: f(f(x)) -> f(g(f(x),x)) r2: f(f(x)) -> f(h(f(x),f(x))) r3: g(x,y) -> y r4: h(x,x) -> g(x,|0|()) The set of usable rules consists of r1, r2, r3, r4 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1) = max{1, x1 - 6} f_A(x1) = max{13, x1 + 9} g_A(x1,x2) = max{x1 - 5, x2 + 3} h_A(x1,x2) = max{3, x1, x2} |0|_A = 0 precedence: h > g > f# = f = |0| partial status: pi(f#) = [] pi(f) = [] pi(g) = [2] pi(h) = [1, 2] pi(|0|) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1) = 13 f_A(x1) = 26 g_A(x1,x2) = 19 h_A(x1,x2) = max{19, x2 - 9} |0|_A = 21 precedence: |0| > h > f > f# = g partial status: pi(f#) = [] pi(f) = [] pi(g) = [] pi(h) = [] pi(|0|) = [] 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: f#(f(x)) -> f#(h(f(x),f(x))) and R consists of: r1: f(f(x)) -> f(g(f(x),x)) r2: f(f(x)) -> f(h(f(x),f(x))) r3: g(x,y) -> y r4: h(x,x) -> g(x,|0|()) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: f#(f(x)) -> f#(h(f(x),f(x))) and R consists of: r1: f(f(x)) -> f(g(f(x),x)) r2: f(f(x)) -> f(h(f(x),f(x))) r3: g(x,y) -> y r4: h(x,x) -> g(x,|0|()) The set of usable rules consists of r1, r2, r3, r4 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1) = max{0, x1 - 3} f_A(x1) = max{6, x1} h_A(x1,x2) = max{2, x2 - 10} g_A(x1,x2) = x2 |0|_A = 2 precedence: f = h > g = |0| > f# partial status: pi(f#) = [] pi(f) = [1] pi(h) = [] pi(g) = [2] pi(|0|) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1) = 19 f_A(x1) = max{18, x1 + 7} h_A(x1,x2) = 17 g_A(x1,x2) = x2 + 15 |0|_A = 1 precedence: f# = f > h > g = |0| partial status: pi(f#) = [] pi(f) = [] pi(h) = [] pi(g) = [2] pi(|0|) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.