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