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