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