YES We show the termination of the TRS R: active(f(f(a()))) -> mark(f(g(f(a())))) active(f(X)) -> f(active(X)) f(mark(X)) -> mark(f(X)) proper(f(X)) -> f(proper(X)) proper(a()) -> ok(a()) proper(g(X)) -> g(proper(X)) f(ok(X)) -> ok(f(X)) g(ok(X)) -> ok(g(X)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: active#(f(f(a()))) -> f#(g(f(a()))) p2: active#(f(f(a()))) -> g#(f(a())) p3: active#(f(X)) -> f#(active(X)) p4: active#(f(X)) -> active#(X) p5: f#(mark(X)) -> f#(X) p6: proper#(f(X)) -> f#(proper(X)) p7: proper#(f(X)) -> proper#(X) p8: proper#(g(X)) -> g#(proper(X)) p9: proper#(g(X)) -> proper#(X) p10: f#(ok(X)) -> f#(X) p11: g#(ok(X)) -> g#(X) p12: top#(mark(X)) -> top#(proper(X)) p13: top#(mark(X)) -> proper#(X) p14: top#(ok(X)) -> top#(active(X)) p15: top#(ok(X)) -> active#(X) and R consists of: r1: active(f(f(a()))) -> mark(f(g(f(a())))) r2: active(f(X)) -> f(active(X)) r3: f(mark(X)) -> mark(f(X)) r4: proper(f(X)) -> f(proper(X)) r5: proper(a()) -> ok(a()) r6: proper(g(X)) -> g(proper(X)) r7: f(ok(X)) -> ok(f(X)) r8: g(ok(X)) -> ok(g(X)) r9: top(mark(X)) -> top(proper(X)) r10: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p12, p14} {p4} {p7, p9} {p5, p10} {p11} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: top#(ok(X)) -> top#(active(X)) p2: top#(mark(X)) -> top#(proper(X)) and R consists of: r1: active(f(f(a()))) -> mark(f(g(f(a())))) r2: active(f(X)) -> f(active(X)) r3: f(mark(X)) -> mark(f(X)) r4: proper(f(X)) -> f(proper(X)) r5: proper(a()) -> ok(a()) r6: proper(g(X)) -> g(proper(X)) r7: f(ok(X)) -> ok(f(X)) r8: g(ok(X)) -> ok(g(X)) r9: top(mark(X)) -> top(proper(X)) r10: top(ok(X)) -> top(active(X)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: top#_A(x1) = ((1,0),(0,0)) x1 + (1,2) ok_A(x1) = ((1,0),(0,0)) x1 + (0,3) active_A(x1) = x1 + (0,1) mark_A(x1) = ((1,0),(0,0)) x1 + (4,7) proper_A(x1) = x1 + (2,8) f_A(x1) = ((1,0),(1,0)) x1 + (1,4) g_A(x1) = (3,4) a_A() = (9,8) precedence: top# = a > proper = f > active > mark = g > ok partial status: pi(top#) = [] pi(ok) = [] pi(active) = [1] pi(mark) = [] pi(proper) = [1] pi(f) = [] pi(g) = [] pi(a) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: top#_A(x1) = (0,0) ok_A(x1) = (0,2) active_A(x1) = x1 + (0,1) mark_A(x1) = (2,1) proper_A(x1) = ((1,0),(1,1)) x1 + (1,0) f_A(x1) = (5,4) g_A(x1) = (4,6) a_A() = (3,3) precedence: proper > top# = ok > g > active = mark = f = a partial status: pi(top#) = [] pi(ok) = [] pi(active) = [1] pi(mark) = [] pi(proper) = [1] pi(f) = [] pi(g) = [] pi(a) = [] 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: top#(ok(X)) -> top#(active(X)) and R consists of: r1: active(f(f(a()))) -> mark(f(g(f(a())))) r2: active(f(X)) -> f(active(X)) r3: f(mark(X)) -> mark(f(X)) r4: proper(f(X)) -> f(proper(X)) r5: proper(a()) -> ok(a()) r6: proper(g(X)) -> g(proper(X)) r7: f(ok(X)) -> ok(f(X)) r8: g(ok(X)) -> ok(g(X)) r9: top(mark(X)) -> top(proper(X)) r10: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: top#(ok(X)) -> top#(active(X)) and R consists of: r1: active(f(f(a()))) -> mark(f(g(f(a())))) r2: active(f(X)) -> f(active(X)) r3: f(mark(X)) -> mark(f(X)) r4: proper(f(X)) -> f(proper(X)) r5: proper(a()) -> ok(a()) r6: proper(g(X)) -> g(proper(X)) r7: f(ok(X)) -> ok(f(X)) r8: g(ok(X)) -> ok(g(X)) r9: top(mark(X)) -> top(proper(X)) r10: top(ok(X)) -> top(active(X)) The set of usable rules consists of r1, r2, r3, 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: top#_A(x1) = ((0,0),(1,0)) x1 + (2,1) ok_A(x1) = ((1,0),(0,0)) x1 + (4,3) active_A(x1) = ((1,0),(1,1)) x1 + (1,4) f_A(x1) = ((1,0),(1,1)) x1 + (2,5) mark_A(x1) = (3,1) a_A() = (4,2) g_A(x1) = (10,3) precedence: ok > active > f > top# = mark = a = g partial status: pi(top#) = [] pi(ok) = [] pi(active) = [1] pi(f) = [1] pi(mark) = [] pi(a) = [] pi(g) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: top#_A(x1) = (0,0) ok_A(x1) = (1,1) active_A(x1) = ((1,0),(1,1)) x1 + (2,2) f_A(x1) = ((1,0),(1,1)) x1 + (3,3) mark_A(x1) = (1,1) a_A() = (5,6) g_A(x1) = (1,1) precedence: f = g > active = mark > a > top# = ok partial status: pi(top#) = [] pi(ok) = [] pi(active) = [1] pi(f) = [] pi(mark) = [] pi(a) = [] pi(g) = [] The next rules are strictly ordered: p1 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: active#(f(X)) -> active#(X) and R consists of: r1: active(f(f(a()))) -> mark(f(g(f(a())))) r2: active(f(X)) -> f(active(X)) r3: f(mark(X)) -> mark(f(X)) r4: proper(f(X)) -> f(proper(X)) r5: proper(a()) -> ok(a()) r6: proper(g(X)) -> g(proper(X)) r7: f(ok(X)) -> ok(f(X)) r8: g(ok(X)) -> ok(g(X)) r9: top(mark(X)) -> top(proper(X)) r10: top(ok(X)) -> top(active(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: active#_A(x1) = ((1,0),(1,1)) x1 + (2,2) f_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: active# = f partial status: pi(active#) = [] pi(f) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: active#_A(x1) = ((1,0),(0,0)) x1 f_A(x1) = (1,1) precedence: f > active# partial status: pi(active#) = [] pi(f) = [] The next rules are strictly ordered: p1 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: proper#(g(X)) -> proper#(X) p2: proper#(f(X)) -> proper#(X) and R consists of: r1: active(f(f(a()))) -> mark(f(g(f(a())))) r2: active(f(X)) -> f(active(X)) r3: f(mark(X)) -> mark(f(X)) r4: proper(f(X)) -> f(proper(X)) r5: proper(a()) -> ok(a()) r6: proper(g(X)) -> g(proper(X)) r7: f(ok(X)) -> ok(f(X)) r8: g(ok(X)) -> ok(g(X)) r9: top(mark(X)) -> top(proper(X)) r10: top(ok(X)) -> top(active(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: proper#_A(x1) = x1 + (1,2) g_A(x1) = x1 + (2,1) f_A(x1) = ((1,0),(1,1)) x1 + (2,1) precedence: proper# = g = f partial status: pi(proper#) = [1] pi(g) = [1] pi(f) = [1] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: proper#_A(x1) = ((1,0),(1,0)) x1 + (0,2) g_A(x1) = ((1,0),(0,0)) x1 + (1,1) f_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: proper# = g = f partial status: pi(proper#) = [] pi(g) = [] 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#(mark(X)) -> f#(X) p2: f#(ok(X)) -> f#(X) and R consists of: r1: active(f(f(a()))) -> mark(f(g(f(a())))) r2: active(f(X)) -> f(active(X)) r3: f(mark(X)) -> mark(f(X)) r4: proper(f(X)) -> f(proper(X)) r5: proper(a()) -> ok(a()) r6: proper(g(X)) -> g(proper(X)) r7: f(ok(X)) -> ok(f(X)) r8: g(ok(X)) -> ok(g(X)) r9: top(mark(X)) -> top(proper(X)) r10: top(ok(X)) -> top(active(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: f#_A(x1) = x1 + (1,2) mark_A(x1) = x1 + (2,1) ok_A(x1) = ((1,0),(1,1)) x1 + (2,1) precedence: f# = mark = ok partial status: pi(f#) = [1] pi(mark) = [1] pi(ok) = [1] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: f#_A(x1) = ((1,0),(1,0)) x1 + (0,2) mark_A(x1) = ((1,0),(0,0)) x1 + (1,1) ok_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: f# = mark = ok partial status: pi(f#) = [] pi(mark) = [] pi(ok) = [] 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: g#(ok(X)) -> g#(X) and R consists of: r1: active(f(f(a()))) -> mark(f(g(f(a())))) r2: active(f(X)) -> f(active(X)) r3: f(mark(X)) -> mark(f(X)) r4: proper(f(X)) -> f(proper(X)) r5: proper(a()) -> ok(a()) r6: proper(g(X)) -> g(proper(X)) r7: f(ok(X)) -> ok(f(X)) r8: g(ok(X)) -> ok(g(X)) r9: top(mark(X)) -> top(proper(X)) r10: top(ok(X)) -> top(active(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: g#_A(x1) = ((1,0),(1,1)) x1 + (2,2) ok_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: g# = ok partial status: pi(g#) = [] pi(ok) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: g#_A(x1) = ((1,0),(0,0)) x1 ok_A(x1) = (1,1) precedence: ok > g# partial status: pi(g#) = [] pi(ok) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.