YES We show the termination of the TRS R: -(x,|0|()) -> x -(s(x),s(y)) -> -(x,y) p(s(x)) -> x f(s(x),y) -> f(p(-(s(x),y)),p(-(y,s(x)))) f(x,s(y)) -> f(p(-(x,s(y))),p(-(s(y),x))) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: -#(s(x),s(y)) -> -#(x,y) p2: f#(s(x),y) -> f#(p(-(s(x),y)),p(-(y,s(x)))) p3: f#(s(x),y) -> p#(-(s(x),y)) p4: f#(s(x),y) -> -#(s(x),y) p5: f#(s(x),y) -> p#(-(y,s(x))) p6: f#(s(x),y) -> -#(y,s(x)) p7: f#(x,s(y)) -> f#(p(-(x,s(y))),p(-(s(y),x))) p8: f#(x,s(y)) -> p#(-(x,s(y))) p9: f#(x,s(y)) -> -#(x,s(y)) p10: f#(x,s(y)) -> p#(-(s(y),x)) p11: f#(x,s(y)) -> -#(s(y),x) and R consists of: r1: -(x,|0|()) -> x r2: -(s(x),s(y)) -> -(x,y) r3: p(s(x)) -> x r4: f(s(x),y) -> f(p(-(s(x),y)),p(-(y,s(x)))) r5: f(x,s(y)) -> f(p(-(x,s(y))),p(-(s(y),x))) The estimated dependency graph contains the following SCCs: {p2, p7} {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: f#(x,s(y)) -> f#(p(-(x,s(y))),p(-(s(y),x))) p2: f#(s(x),y) -> f#(p(-(s(x),y)),p(-(y,s(x)))) and R consists of: r1: -(x,|0|()) -> x r2: -(s(x),s(y)) -> -(x,y) r3: p(s(x)) -> x r4: f(s(x),y) -> f(p(-(s(x),y)),p(-(y,s(x)))) r5: f(x,s(y)) -> f(p(-(x,s(y))),p(-(s(y),x))) The set of usable rules consists of r1, r2, r3 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{x1 + 11, x2 + 8} s_A(x1) = x1 + 15 p_A(x1) = max{2, x1 - 14} -_A(x1,x2) = x1 + 9 |0|_A = 0 precedence: f# = s = p = - = |0| partial status: pi(f#) = [1, 2] pi(s) = [1] pi(p) = [] pi(-) = [] pi(|0|) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1,x2) = max{4, x1 - 4, x2 + 2} s_A(x1) = max{9, x1 + 3} p_A(x1) = 1 -_A(x1,x2) = 12 |0|_A = 0 precedence: f# = s = p = - = |0| partial status: pi(f#) = [2] pi(s) = [1] pi(p) = [] pi(-) = [] pi(|0|) = [] The next rules are strictly ordered: p1, p2 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: -#(s(x),s(y)) -> -#(x,y) and R consists of: r1: -(x,|0|()) -> x r2: -(s(x),s(y)) -> -(x,y) r3: p(s(x)) -> x r4: f(s(x),y) -> f(p(-(s(x),y)),p(-(y,s(x)))) r5: f(x,s(y)) -> f(p(-(x,s(y))),p(-(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 - 1, x2 + 1} s_A(x1) = max{1, x1} precedence: -# = s partial status: pi(-#) = [2] pi(s) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: -#_A(x1,x2) = 0 s_A(x1) = max{2, x1} 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.