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