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