YES We show the termination of the TRS R: active(f(g(X),Y)) -> mark(f(X,f(g(X),Y))) active(f(X1,X2)) -> f(active(X1),X2) active(g(X)) -> g(active(X)) f(mark(X1),X2) -> mark(f(X1,X2)) g(mark(X)) -> mark(g(X)) proper(f(X1,X2)) -> f(proper(X1),proper(X2)) proper(g(X)) -> g(proper(X)) f(ok(X1),ok(X2)) -> ok(f(X1,X2)) 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(g(X),Y)) -> f#(X,f(g(X),Y)) p2: active#(f(X1,X2)) -> f#(active(X1),X2) p3: active#(f(X1,X2)) -> active#(X1) p4: active#(g(X)) -> g#(active(X)) p5: active#(g(X)) -> active#(X) p6: f#(mark(X1),X2) -> f#(X1,X2) p7: g#(mark(X)) -> g#(X) p8: proper#(f(X1,X2)) -> f#(proper(X1),proper(X2)) p9: proper#(f(X1,X2)) -> proper#(X1) p10: proper#(f(X1,X2)) -> proper#(X2) p11: proper#(g(X)) -> g#(proper(X)) p12: proper#(g(X)) -> proper#(X) p13: f#(ok(X1),ok(X2)) -> f#(X1,X2) p14: g#(ok(X)) -> g#(X) p15: top#(mark(X)) -> top#(proper(X)) p16: top#(mark(X)) -> proper#(X) p17: top#(ok(X)) -> top#(active(X)) p18: top#(ok(X)) -> active#(X) and R consists of: r1: active(f(g(X),Y)) -> mark(f(X,f(g(X),Y))) r2: active(f(X1,X2)) -> f(active(X1),X2) r3: active(g(X)) -> g(active(X)) r4: f(mark(X1),X2) -> mark(f(X1,X2)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X1,X2)) -> f(proper(X1),proper(X2)) r7: proper(g(X)) -> g(proper(X)) r8: f(ok(X1),ok(X2)) -> ok(f(X1,X2)) r9: g(ok(X)) -> ok(g(X)) r10: top(mark(X)) -> top(proper(X)) r11: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p15, p17} {p3, p5} {p9, p10, p12} {p6, p13} {p7, p14} -- 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(g(X),Y)) -> mark(f(X,f(g(X),Y))) r2: active(f(X1,X2)) -> f(active(X1),X2) r3: active(g(X)) -> g(active(X)) r4: f(mark(X1),X2) -> mark(f(X1,X2)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X1,X2)) -> f(proper(X1),proper(X2)) r7: proper(g(X)) -> g(proper(X)) r8: f(ok(X1),ok(X2)) -> ok(f(X1,X2)) r9: g(ok(X)) -> ok(g(X)) r10: top(mark(X)) -> top(proper(X)) r11: top(ok(X)) -> top(active(X)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9 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{7, x1} ok_A(x1) = max{26, x1 + 20} active_A(x1) = x1 + 5 mark_A(x1) = max{14, x1 + 8} proper_A(x1) = x1 + 7 f_A(x1,x2) = max{27, x1 + 21} g_A(x1) = max{21, x1 + 15} precedence: proper > top# = active = f > ok = mark = g partial status: pi(top#) = [1] pi(ok) = [1] pi(active) = [] pi(mark) = [] pi(proper) = [] pi(f) = [] pi(g) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: top#_A(x1) = x1 + 10 ok_A(x1) = x1 + 20 active_A(x1) = 11 mark_A(x1) = 11 proper_A(x1) = 0 f_A(x1,x2) = 11 g_A(x1) = x1 + 15 precedence: top# = ok = active = mark = proper = g > f partial status: pi(top#) = [] pi(ok) = [] pi(active) = [] pi(mark) = [] pi(proper) = [] pi(f) = [] pi(g) = [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: active#(g(X)) -> active#(X) p2: active#(f(X1,X2)) -> active#(X1) and R consists of: r1: active(f(g(X),Y)) -> mark(f(X,f(g(X),Y))) r2: active(f(X1,X2)) -> f(active(X1),X2) r3: active(g(X)) -> g(active(X)) r4: f(mark(X1),X2) -> mark(f(X1,X2)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X1,X2)) -> f(proper(X1),proper(X2)) r7: proper(g(X)) -> g(proper(X)) r8: f(ok(X1),ok(X2)) -> ok(f(X1,X2)) r9: g(ok(X)) -> ok(g(X)) r10: top(mark(X)) -> top(proper(X)) r11: 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{2, x1 + 1} g_A(x1) = max{1, x1} f_A(x1,x2) = max{1, x1, x2} precedence: active# = g = f partial status: pi(active#) = [1] pi(g) = [1] pi(f) = [1, 2] 2. weighted path order base order: max/plus interpretations on natural numbers: active#_A(x1) = x1 + 3 g_A(x1) = x1 + 1 f_A(x1,x2) = max{x1 + 1, x2} precedence: active# = g = f partial status: pi(active#) = [] pi(g) = [1] pi(f) = [2] 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#(f(X1,X2)) -> proper#(X2) p3: proper#(f(X1,X2)) -> proper#(X1) and R consists of: r1: active(f(g(X),Y)) -> mark(f(X,f(g(X),Y))) r2: active(f(X1,X2)) -> f(active(X1),X2) r3: active(g(X)) -> g(active(X)) r4: f(mark(X1),X2) -> mark(f(X1,X2)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X1,X2)) -> f(proper(X1),proper(X2)) r7: proper(g(X)) -> g(proper(X)) r8: f(ok(X1),ok(X2)) -> ok(f(X1,X2)) r9: g(ok(X)) -> ok(g(X)) r10: top(mark(X)) -> top(proper(X)) r11: 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: proper#_A(x1) = max{2, x1 + 1} g_A(x1) = max{1, x1} f_A(x1,x2) = max{1, x1, x2} precedence: proper# = g = f partial status: pi(proper#) = [1] pi(g) = [1] pi(f) = [1, 2] 2. weighted path order base order: max/plus interpretations on natural numbers: proper#_A(x1) = x1 + 2 g_A(x1) = x1 + 1 f_A(x1,x2) = max{x1 + 1, x2 + 1} precedence: proper# = g = f partial status: pi(proper#) = [] pi(g) = [1] pi(f) = [2] 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(X1),X2) -> f#(X1,X2) p2: f#(ok(X1),ok(X2)) -> f#(X1,X2) and R consists of: r1: active(f(g(X),Y)) -> mark(f(X,f(g(X),Y))) r2: active(f(X1,X2)) -> f(active(X1),X2) r3: active(g(X)) -> g(active(X)) r4: f(mark(X1),X2) -> mark(f(X1,X2)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X1,X2)) -> f(proper(X1),proper(X2)) r7: proper(g(X)) -> g(proper(X)) r8: f(ok(X1),ok(X2)) -> ok(f(X1,X2)) r9: g(ok(X)) -> ok(g(X)) r10: top(mark(X)) -> top(proper(X)) r11: 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,x2) = max{2, x1 + 1, x2 + 1} mark_A(x1) = max{1, x1} ok_A(x1) = max{1, x1} precedence: f# = mark = ok partial status: pi(f#) = [1, 2] pi(mark) = [1] pi(ok) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1,x2) = max{x1 + 1, x2 - 2} mark_A(x1) = x1 ok_A(x1) = max{4, x1 + 1} 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(g(X),Y)) -> mark(f(X,f(g(X),Y))) r2: active(f(X1,X2)) -> f(active(X1),X2) r3: active(g(X)) -> g(active(X)) r4: f(mark(X1),X2) -> mark(f(X1,X2)) r5: g(mark(X)) -> mark(g(X)) r6: proper(f(X1,X2)) -> f(proper(X1),proper(X2)) r7: proper(g(X)) -> g(proper(X)) r8: f(ok(X1),ok(X2)) -> ok(f(X1,X2)) r9: g(ok(X)) -> ok(g(X)) r10: top(mark(X)) -> top(proper(X)) r11: 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.