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: max/plus interpretations on natural numbers: f#_A(x1,x2) = x1 + 3 f_A(x1,x2) = max{x1 + 3, x2} g_A(x1,x2) = max{x1, x2} |0|_A = 0 i_A(x1) = 0 |1|_A = 0 |2|_A = 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#(g(x,y),z) -> f#(y,z) p2: f#(g(x,y),z) -> f#(x,z) p3: 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 estimated dependency graph contains the following SCCs: {p1, p2, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: f#(g(x,y),z) -> f#(y,z) p2: f#(f(x,y),z) -> f#(y,z) p3: f#(g(x,y),z) -> f#(x,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 (no rules) Take the reduction pair: max/plus interpretations on natural numbers: f#_A(x1,x2) = x1 + 1 g_A(x1,x2) = max{x1 + 1, x2} f_A(x1,x2) = max{x1, x2} The next rules are strictly ordered: p3 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: f#(g(x,y),z) -> f#(y,z) p2: 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 estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: f#(g(x,y),z) -> f#(y,z) p2: 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 (no rules) Take the reduction pair: max/plus interpretations on natural numbers: f#_A(x1,x2) = max{0, x1 - 1} g_A(x1,x2) = x2 + 1 f_A(x1,x2) = max{x1 + 2, x2 + 2} 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#(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} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: 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 set of usable rules consists of (no rules) Take the reduction pair: max/plus interpretations on natural numbers: f#_A(x1,x2) = x1 g_A(x1,x2) = max{x1 + 1, x2 + 1} The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.