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: max/plus interpretations on natural numbers: top#_A(x1) = x1 + 8 ok_A(x1) = max{13, x1 - 1} active_A(x1) = max{4, x1 - 10} mark_A(x1) = max{5, x1 + 3} proper_A(x1) = max{1, x1} f_A(x1) = max{2, x1} g_A(x1) = max{13, x1 - 24} a_A = 27 precedence: active > g > top# = ok = f = a > mark > proper partial status: pi(top#) = [] pi(ok) = [] pi(active) = [] pi(mark) = [1] pi(proper) = [1] pi(f) = [] pi(g) = [] pi(a) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: top#_A(x1) = 0 ok_A(x1) = 24 active_A(x1) = 26 mark_A(x1) = max{37, x1} proper_A(x1) = 33 f_A(x1) = 38 g_A(x1) = 25 a_A = 23 precedence: active = proper > f = g > ok > top# > mark > a partial status: pi(top#) = [] pi(ok) = [] pi(active) = [] pi(mark) = [] pi(proper) = [] pi(f) = [] pi(g) = [] pi(a) = [] 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: 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 estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: 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 r3, r4, r5, r6, r7, r8 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: top#_A(x1) = max{8, x1 + 3} mark_A(x1) = x1 + 8 proper_A(x1) = x1 + 5 f_A(x1) = x1 + 2 ok_A(x1) = x1 + 5 g_A(x1) = x1 + 6 a_A = 4 precedence: proper > f > mark > a > top# = g > ok partial status: pi(top#) = [1] pi(mark) = [1] pi(proper) = [1] pi(f) = [] pi(ok) = [1] pi(g) = [1] pi(a) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: top#_A(x1) = max{3, x1 + 1} mark_A(x1) = max{2, x1 - 2} proper_A(x1) = max{11, x1 + 3} f_A(x1) = 3 ok_A(x1) = max{22, x1 + 11} g_A(x1) = max{10, x1 - 2} a_A = 12 precedence: mark = ok > top# = proper > f > g > a partial status: pi(top#) = [] pi(mark) = [] pi(proper) = [] pi(f) = [] pi(ok) = [] pi(g) = [] pi(a) = [] 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: max/plus interpretations on natural numbers: active#_A(x1) = max{4, x1 + 3} f_A(x1) = max{3, x1 + 2} precedence: active# = f partial status: pi(active#) = [1] pi(f) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: active#_A(x1) = max{1, x1 - 1} f_A(x1) = x1 precedence: active# = f partial status: pi(active#) = [] pi(f) = [1] 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 monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: proper#_A(x1) = max{6, x1 + 4} g_A(x1) = max{4, x1 + 3} f_A(x1) = max{2, x1 + 1} precedence: proper# = g = f partial status: pi(proper#) = [1] pi(g) = [1] pi(f) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: proper#_A(x1) = x1 + 1 g_A(x1) = x1 f_A(x1) = x1 precedence: proper# = g = f partial status: pi(proper#) = [1] pi(g) = [1] pi(f) = [1] 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 monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1) = x1 + 1 mark_A(x1) = x1 ok_A(x1) = x1 precedence: f# = mark = ok partial status: pi(f#) = [] pi(mark) = [] pi(ok) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1) = x1 + 1 mark_A(x1) = x1 ok_A(x1) = x1 precedence: f# = mark = ok partial status: pi(f#) = [1] pi(mark) = [1] pi(ok) = [1] 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: max/plus interpretations on natural numbers: g#_A(x1) = max{4, x1 + 3} ok_A(x1) = max{3, x1 + 2} precedence: g# = ok partial status: pi(g#) = [1] pi(ok) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: g#_A(x1) = max{1, x1 - 1} ok_A(x1) = x1 precedence: g# = ok partial status: pi(g#) = [] pi(ok) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.