YES We show the termination of the TRS R: active(f(f(a()))) -> mark(c(f(g(f(a()))))) active(f(X)) -> f(active(X)) active(g(X)) -> g(active(X)) f(mark(X)) -> mark(f(X)) g(mark(X)) -> mark(g(X)) proper(f(X)) -> f(proper(X)) proper(a()) -> ok(a()) proper(c(X)) -> c(proper(X)) proper(g(X)) -> g(proper(X)) f(ok(X)) -> ok(f(X)) c(ok(X)) -> ok(c(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()))) -> c#(f(g(f(a())))) p2: active#(f(f(a()))) -> f#(g(f(a()))) p3: active#(f(f(a()))) -> g#(f(a())) p4: active#(f(X)) -> f#(active(X)) p5: active#(f(X)) -> active#(X) p6: active#(g(X)) -> g#(active(X)) p7: active#(g(X)) -> active#(X) p8: f#(mark(X)) -> f#(X) p9: g#(mark(X)) -> g#(X) p10: proper#(f(X)) -> f#(proper(X)) p11: proper#(f(X)) -> proper#(X) p12: proper#(c(X)) -> c#(proper(X)) p13: proper#(c(X)) -> proper#(X) p14: proper#(g(X)) -> g#(proper(X)) p15: proper#(g(X)) -> proper#(X) p16: f#(ok(X)) -> f#(X) p17: c#(ok(X)) -> c#(X) p18: g#(ok(X)) -> g#(X) p19: top#(mark(X)) -> top#(proper(X)) p20: top#(mark(X)) -> proper#(X) p21: top#(ok(X)) -> top#(active(X)) p22: top#(ok(X)) -> active#(X) and R consists of: r1: active(f(f(a()))) -> mark(c(f(g(f(a()))))) r2: active(f(X)) -> f(active(X)) r3: active(g(X)) -> g(active(X)) r4: f(mark(X)) -> mark(f(X)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X)) -> f(proper(X)) r7: proper(a()) -> ok(a()) r8: proper(c(X)) -> c(proper(X)) r9: proper(g(X)) -> g(proper(X)) r10: f(ok(X)) -> ok(f(X)) r11: c(ok(X)) -> ok(c(X)) r12: g(ok(X)) -> ok(g(X)) r13: top(mark(X)) -> top(proper(X)) r14: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p19, p21} {p5, p7} {p11, p13, p15} {p8, p16} {p9, p18} {p17} -- 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(c(f(g(f(a()))))) r2: active(f(X)) -> f(active(X)) r3: active(g(X)) -> g(active(X)) r4: f(mark(X)) -> mark(f(X)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X)) -> f(proper(X)) r7: proper(a()) -> ok(a()) r8: proper(c(X)) -> c(proper(X)) r9: proper(g(X)) -> g(proper(X)) r10: f(ok(X)) -> ok(f(X)) r11: c(ok(X)) -> ok(c(X)) r12: g(ok(X)) -> ok(g(X)) r13: top(mark(X)) -> top(proper(X)) r14: top(ok(X)) -> top(active(X)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12 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{2, x1 - 20} ok_A(x1) = max{21, x1} active_A(x1) = x1 mark_A(x1) = max{40, x1 + 3} proper_A(x1) = max{21, x1} f_A(x1) = max{32, x1 + 11} g_A(x1) = max{43, x1 + 6} c_A(x1) = max{40, x1 - 21} a_A = 5 precedence: top# > a > active > f > mark = proper = g = c > ok partial status: pi(top#) = [] pi(ok) = [] pi(active) = [] pi(mark) = [] pi(proper) = [1] pi(f) = [] pi(g) = [1] pi(c) = [] pi(a) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: top#_A(x1) = 67 ok_A(x1) = 9 active_A(x1) = 5 mark_A(x1) = 66 proper_A(x1) = x1 f_A(x1) = 8 g_A(x1) = x1 + 6 c_A(x1) = 17 a_A = 3 precedence: top# = ok = active > mark = proper = f = g = c = a partial status: pi(top#) = [] pi(ok) = [] pi(active) = [] pi(mark) = [] pi(proper) = [1] pi(f) = [] pi(g) = [1] pi(c) = [] 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(c(f(g(f(a()))))) r2: active(f(X)) -> f(active(X)) r3: active(g(X)) -> g(active(X)) r4: f(mark(X)) -> mark(f(X)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X)) -> f(proper(X)) r7: proper(a()) -> ok(a()) r8: proper(c(X)) -> c(proper(X)) r9: proper(g(X)) -> g(proper(X)) r10: f(ok(X)) -> ok(f(X)) r11: c(ok(X)) -> ok(c(X)) r12: g(ok(X)) -> ok(g(X)) r13: top(mark(X)) -> top(proper(X)) r14: 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(c(f(g(f(a()))))) r2: active(f(X)) -> f(active(X)) r3: active(g(X)) -> g(active(X)) r4: f(mark(X)) -> mark(f(X)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X)) -> f(proper(X)) r7: proper(a()) -> ok(a()) r8: proper(c(X)) -> c(proper(X)) r9: proper(g(X)) -> g(proper(X)) r10: f(ok(X)) -> ok(f(X)) r11: c(ok(X)) -> ok(c(X)) r12: g(ok(X)) -> ok(g(X)) r13: top(mark(X)) -> top(proper(X)) r14: top(ok(X)) -> top(active(X)) The set of usable rules consists of r1, r2, r3, r4, r5, r10, r12 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{11, x1 + 10} ok_A(x1) = x1 + 11 active_A(x1) = x1 + 8 f_A(x1) = x1 + 10 mark_A(x1) = max{35, x1 + 28} g_A(x1) = x1 + 9 a_A = 14 c_A(x1) = max{7, x1 - 29} precedence: top# = active = f = mark = g > ok = a = c partial status: pi(top#) = [1] pi(ok) = [1] pi(active) = [1] pi(f) = [1] pi(mark) = [1] pi(g) = [1] pi(a) = [] pi(c) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: top#_A(x1) = x1 + 25 ok_A(x1) = x1 + 23 active_A(x1) = x1 f_A(x1) = max{21, x1 + 15} mark_A(x1) = max{37, x1 + 18} g_A(x1) = x1 + 13 a_A = 5 c_A(x1) = 4 precedence: top# = ok = active = f = mark = g = a = c partial status: pi(top#) = [] pi(ok) = [1] pi(active) = [1] pi(f) = [1] pi(mark) = [1] pi(g) = [1] pi(a) = [] pi(c) = [] 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#(g(X)) -> active#(X) p2: active#(f(X)) -> active#(X) and R consists of: r1: active(f(f(a()))) -> mark(c(f(g(f(a()))))) r2: active(f(X)) -> f(active(X)) r3: active(g(X)) -> g(active(X)) r4: f(mark(X)) -> mark(f(X)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X)) -> f(proper(X)) r7: proper(a()) -> ok(a()) r8: proper(c(X)) -> c(proper(X)) r9: proper(g(X)) -> g(proper(X)) r10: f(ok(X)) -> ok(f(X)) r11: c(ok(X)) -> ok(c(X)) r12: g(ok(X)) -> ok(g(X)) r13: top(mark(X)) -> top(proper(X)) r14: 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: active#_A(x1) = x1 + 1 g_A(x1) = x1 f_A(x1) = x1 precedence: active# = g = f partial status: pi(active#) = [] pi(g) = [] pi(f) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: active#_A(x1) = x1 + 1 g_A(x1) = x1 f_A(x1) = x1 precedence: active# = g = f partial status: pi(active#) = [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: proper#(g(X)) -> proper#(X) p2: proper#(c(X)) -> proper#(X) p3: proper#(f(X)) -> proper#(X) and R consists of: r1: active(f(f(a()))) -> mark(c(f(g(f(a()))))) r2: active(f(X)) -> f(active(X)) r3: active(g(X)) -> g(active(X)) r4: f(mark(X)) -> mark(f(X)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X)) -> f(proper(X)) r7: proper(a()) -> ok(a()) r8: proper(c(X)) -> c(proper(X)) r9: proper(g(X)) -> g(proper(X)) r10: f(ok(X)) -> ok(f(X)) r11: c(ok(X)) -> ok(c(X)) r12: g(ok(X)) -> ok(g(X)) r13: top(mark(X)) -> top(proper(X)) r14: 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) = x1 + 1 g_A(x1) = x1 c_A(x1) = x1 f_A(x1) = x1 precedence: proper# = g = c = f partial status: pi(proper#) = [] pi(g) = [] pi(c) = [] pi(f) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: proper#_A(x1) = x1 + 1 g_A(x1) = x1 c_A(x1) = x1 f_A(x1) = x1 precedence: proper# = g = c = f partial status: pi(proper#) = [1] pi(g) = [1] pi(c) = [1] pi(f) = [1] The next rules are strictly ordered: p1, p2, p3 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(c(f(g(f(a()))))) r2: active(f(X)) -> f(active(X)) r3: active(g(X)) -> g(active(X)) r4: f(mark(X)) -> mark(f(X)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X)) -> f(proper(X)) r7: proper(a()) -> ok(a()) r8: proper(c(X)) -> c(proper(X)) r9: proper(g(X)) -> g(proper(X)) r10: f(ok(X)) -> ok(f(X)) r11: c(ok(X)) -> ok(c(X)) r12: g(ok(X)) -> ok(g(X)) r13: top(mark(X)) -> top(proper(X)) r14: 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#(mark(X)) -> g#(X) p2: g#(ok(X)) -> g#(X) and R consists of: r1: active(f(f(a()))) -> mark(c(f(g(f(a()))))) r2: active(f(X)) -> f(active(X)) r3: active(g(X)) -> g(active(X)) r4: f(mark(X)) -> mark(f(X)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X)) -> f(proper(X)) r7: proper(a()) -> ok(a()) r8: proper(c(X)) -> c(proper(X)) r9: proper(g(X)) -> g(proper(X)) r10: f(ok(X)) -> ok(f(X)) r11: c(ok(X)) -> ok(c(X)) r12: g(ok(X)) -> ok(g(X)) r13: top(mark(X)) -> top(proper(X)) r14: 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: g#_A(x1) = x1 + 1 mark_A(x1) = x1 ok_A(x1) = x1 precedence: g# = mark = ok partial status: pi(g#) = [] pi(mark) = [] pi(ok) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: g#_A(x1) = x1 + 1 mark_A(x1) = x1 ok_A(x1) = x1 precedence: g# = mark = ok partial status: pi(g#) = [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: c#(ok(X)) -> c#(X) and R consists of: r1: active(f(f(a()))) -> mark(c(f(g(f(a()))))) r2: active(f(X)) -> f(active(X)) r3: active(g(X)) -> g(active(X)) r4: f(mark(X)) -> mark(f(X)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X)) -> f(proper(X)) r7: proper(a()) -> ok(a()) r8: proper(c(X)) -> c(proper(X)) r9: proper(g(X)) -> g(proper(X)) r10: f(ok(X)) -> ok(f(X)) r11: c(ok(X)) -> ok(c(X)) r12: g(ok(X)) -> ok(g(X)) r13: top(mark(X)) -> top(proper(X)) r14: 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: c#_A(x1) = max{4, x1 + 3} ok_A(x1) = max{3, x1 + 2} precedence: c# = ok partial status: pi(c#) = [1] pi(ok) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: c#_A(x1) = max{1, x1 - 1} ok_A(x1) = x1 precedence: c# = ok partial status: pi(c#) = [] pi(ok) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.