YES We show the termination of the TRS R: active(c()) -> mark(f(g(c()))) active(f(g(X))) -> mark(g(X)) proper(c()) -> ok(c()) proper(f(X)) -> f(proper(X)) 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#(c()) -> f#(g(c())) p2: active#(c()) -> g#(c()) p3: proper#(f(X)) -> f#(proper(X)) p4: proper#(f(X)) -> proper#(X) p5: proper#(g(X)) -> g#(proper(X)) p6: proper#(g(X)) -> proper#(X) p7: f#(ok(X)) -> f#(X) p8: g#(ok(X)) -> g#(X) p9: top#(mark(X)) -> top#(proper(X)) p10: top#(mark(X)) -> proper#(X) p11: top#(ok(X)) -> top#(active(X)) p12: top#(ok(X)) -> active#(X) and R consists of: r1: active(c()) -> mark(f(g(c()))) r2: active(f(g(X))) -> mark(g(X)) r3: proper(c()) -> ok(c()) r4: proper(f(X)) -> f(proper(X)) r5: proper(g(X)) -> g(proper(X)) r6: f(ok(X)) -> ok(f(X)) r7: g(ok(X)) -> ok(g(X)) r8: top(mark(X)) -> top(proper(X)) r9: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p9, p11} {p4, p6} {p7} {p8} -- 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(c()) -> mark(f(g(c()))) r2: active(f(g(X))) -> mark(g(X)) r3: proper(c()) -> ok(c()) r4: proper(f(X)) -> f(proper(X)) r5: proper(g(X)) -> g(proper(X)) r6: f(ok(X)) -> ok(f(X)) r7: g(ok(X)) -> ok(g(X)) r8: top(mark(X)) -> top(proper(X)) r9: top(ok(X)) -> top(active(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: max/plus interpretations on natural numbers: top#_A(x1) = max{0, x1 - 9} ok_A(x1) = max{6, x1 - 1} active_A(x1) = max{7, x1 - 2} mark_A(x1) = x1 + 19 proper_A(x1) = max{18, x1 + 17} f_A(x1) = max{32, x1 + 16} g_A(x1) = 11 c_A = 54 precedence: active = c > mark = proper > g > f > ok > top# partial status: pi(top#) = [] pi(ok) = [] pi(active) = [] pi(mark) = [1] pi(proper) = [] pi(f) = [] pi(g) = [] pi(c) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: top#_A(x1) = 0 ok_A(x1) = 13 active_A(x1) = 15 mark_A(x1) = 15 proper_A(x1) = 14 f_A(x1) = 12 g_A(x1) = 14 c_A = 25 precedence: c > g > ok = f > active > mark > top# = proper partial status: pi(top#) = [] pi(ok) = [] pi(active) = [] pi(mark) = [] pi(proper) = [] pi(f) = [] pi(g) = [] pi(c) = [] 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(c()) -> mark(f(g(c()))) r2: active(f(g(X))) -> mark(g(X)) r3: proper(c()) -> ok(c()) r4: proper(f(X)) -> f(proper(X)) r5: proper(g(X)) -> g(proper(X)) r6: f(ok(X)) -> ok(f(X)) r7: g(ok(X)) -> ok(g(X)) r8: top(mark(X)) -> top(proper(X)) r9: 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(c()) -> mark(f(g(c()))) r2: active(f(g(X))) -> mark(g(X)) r3: proper(c()) -> ok(c()) r4: proper(f(X)) -> f(proper(X)) r5: proper(g(X)) -> g(proper(X)) r6: f(ok(X)) -> ok(f(X)) r7: g(ok(X)) -> ok(g(X)) r8: top(mark(X)) -> top(proper(X)) r9: top(ok(X)) -> top(active(X)) The set of usable rules consists of r1, r2, r7 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 ok_A(x1) = x1 active_A(x1) = x1 g_A(x1) = x1 c_A = 1 mark_A(x1) = x1 f_A(x1) = x1 precedence: top# = ok = active = g = c = mark = f partial status: pi(top#) = [] pi(ok) = [] pi(active) = [] pi(g) = [] pi(c) = [] pi(mark) = [] pi(f) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: top#_A(x1) = x1 + 6 ok_A(x1) = max{10, x1 + 6} active_A(x1) = max{5, x1 + 1} g_A(x1) = max{4, x1} c_A = 0 mark_A(x1) = max{5, x1 + 1} f_A(x1) = max{2, x1} precedence: top# = ok = active = g = c = mark = f partial status: pi(top#) = [] pi(ok) = [1] pi(active) = [1] pi(g) = [1] pi(c) = [] pi(mark) = [] 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(c()) -> mark(f(g(c()))) r2: active(f(g(X))) -> mark(g(X)) r3: proper(c()) -> ok(c()) r4: proper(f(X)) -> f(proper(X)) r5: proper(g(X)) -> g(proper(X)) r6: f(ok(X)) -> ok(f(X)) r7: g(ok(X)) -> ok(g(X)) r8: top(mark(X)) -> top(proper(X)) r9: 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#(ok(X)) -> f#(X) and R consists of: r1: active(c()) -> mark(f(g(c()))) r2: active(f(g(X))) -> mark(g(X)) r3: proper(c()) -> ok(c()) r4: proper(f(X)) -> f(proper(X)) r5: proper(g(X)) -> g(proper(X)) r6: f(ok(X)) -> ok(f(X)) r7: g(ok(X)) -> ok(g(X)) r8: top(mark(X)) -> top(proper(X)) r9: 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: f#_A(x1) = max{4, x1 + 3} ok_A(x1) = max{3, x1 + 2} precedence: f# = ok partial status: pi(f#) = [1] pi(ok) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1) = max{1, x1 - 1} ok_A(x1) = x1 precedence: f# = ok partial status: pi(f#) = [] pi(ok) = [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: g#(ok(X)) -> g#(X) and R consists of: r1: active(c()) -> mark(f(g(c()))) r2: active(f(g(X))) -> mark(g(X)) r3: proper(c()) -> ok(c()) r4: proper(f(X)) -> f(proper(X)) r5: proper(g(X)) -> g(proper(X)) r6: f(ok(X)) -> ok(f(X)) r7: g(ok(X)) -> ok(g(X)) r8: top(mark(X)) -> top(proper(X)) r9: 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.