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