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: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: s#_A(x1) = x1 + (1,2) g_A(x1,x2) = ((1,0),(1,1)) x1 + x2 + (2,1) f_A(x1,x2) = x1 + x2 + (2,3) precedence: g > s# = f partial status: pi(s#) = [1] pi(g) = [] pi(f) = [1, 2] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: s#_A(x1) = (0,0) g_A(x1,x2) = (1,1) f_A(x1,x2) = (1,1) precedence: s# > g > f partial status: pi(s#) = [] pi(g) = [] pi(f) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: s#(g(x,y)) -> s#(y) p2: s#(f(x,y)) -> s#(x) p3: 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 estimated dependency graph contains the following SCCs: {p1, p2, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: s#(g(x,y)) -> s#(y) p2: s#(f(x,y)) -> s#(y) p3: s#(f(x,y)) -> s#(x) 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: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: s#_A(x1) = ((1,0),(0,0)) x1 g_A(x1,x2) = x1 + x2 + (1,1) f_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (1,1) precedence: s# = g = f partial status: pi(s#) = [] pi(g) = [] pi(f) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: s#_A(x1) = (0,0) g_A(x1,x2) = x1 + (1,1) f_A(x1,x2) = (1,1) precedence: f > g > s# partial status: pi(s#) = [] pi(g) = [] pi(f) = [] 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#(f(x,y)) -> s#(y) p2: s#(f(x,y)) -> s#(x) 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: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: s#(f(x,y)) -> s#(y) p2: s#(f(x,y)) -> s#(x) 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: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: s#_A(x1) = ((1,0),(1,1)) x1 f_A(x1,x2) = ((1,0),(1,1)) x1 + x2 + (1,1) precedence: s# > f partial status: pi(s#) = [1] pi(f) = [1, 2] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: s#_A(x1) = x1 f_A(x1,x2) = ((1,0),(0,0)) x1 + x2 + (1,1) precedence: f > s# partial status: pi(s#) = [1] pi(f) = [] 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: 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: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: f#_A(x1,x2) = ((0,0),(1,0)) x1 + x2 + (1,2) g_A(x1,x2) = x1 + ((1,0),(0,0)) x2 + (2,1) precedence: f# = g partial status: pi(f#) = [2] pi(g) = [1] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: f#_A(x1,x2) = (0,0) g_A(x1,x2) = (1,1) precedence: f# = g partial status: pi(f#) = [] pi(g) = [] 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: 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 estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: 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: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: f#_A(x1,x2) = ((0,0),(1,0)) x1 + (2,2) g_A(x1,x2) = ((1,0),(0,0)) x1 + x2 + (1,1) precedence: f# = g partial status: pi(f#) = [] pi(g) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: f#_A(x1,x2) = (0,0) g_A(x1,x2) = x2 + (1,1) precedence: f# = g partial status: pi(f#) = [] pi(g) = [2] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.