YES We show the termination of the TRS R: active(f(x)) -> mark(x) top(active(c())) -> top(mark(c())) top(mark(x)) -> top(check(x)) check(f(x)) -> f(check(x)) check(x) -> start(match(f(X()),x)) match(f(x),f(y)) -> f(match(x,y)) match(X(),x) -> proper(x) proper(c()) -> ok(c()) proper(f(x)) -> f(proper(x)) f(ok(x)) -> ok(f(x)) start(ok(x)) -> found(x) f(found(x)) -> found(f(x)) top(found(x)) -> top(active(x)) active(f(x)) -> f(active(x)) f(mark(x)) -> mark(f(x)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: top#(active(c())) -> top#(mark(c())) p2: top#(mark(x)) -> top#(check(x)) p3: top#(mark(x)) -> check#(x) p4: check#(f(x)) -> f#(check(x)) p5: check#(f(x)) -> check#(x) p6: check#(x) -> start#(match(f(X()),x)) p7: check#(x) -> match#(f(X()),x) p8: check#(x) -> f#(X()) p9: match#(f(x),f(y)) -> f#(match(x,y)) p10: match#(f(x),f(y)) -> match#(x,y) p11: match#(X(),x) -> proper#(x) p12: proper#(f(x)) -> f#(proper(x)) p13: proper#(f(x)) -> proper#(x) p14: f#(ok(x)) -> f#(x) p15: f#(found(x)) -> f#(x) p16: top#(found(x)) -> top#(active(x)) p17: top#(found(x)) -> active#(x) p18: active#(f(x)) -> f#(active(x)) p19: active#(f(x)) -> active#(x) p20: f#(mark(x)) -> f#(x) and R consists of: r1: active(f(x)) -> mark(x) r2: top(active(c())) -> top(mark(c())) r3: top(mark(x)) -> top(check(x)) r4: check(f(x)) -> f(check(x)) r5: check(x) -> start(match(f(X()),x)) r6: match(f(x),f(y)) -> f(match(x,y)) r7: match(X(),x) -> proper(x) r8: proper(c()) -> ok(c()) r9: proper(f(x)) -> f(proper(x)) r10: f(ok(x)) -> ok(f(x)) r11: start(ok(x)) -> found(x) r12: f(found(x)) -> found(f(x)) r13: top(found(x)) -> top(active(x)) r14: active(f(x)) -> f(active(x)) r15: f(mark(x)) -> mark(f(x)) The estimated dependency graph contains the following SCCs: {p1, p2, p16} {p5} {p19} {p10} {p13} {p14, p15, p20} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: top#(active(c())) -> top#(mark(c())) p2: top#(mark(x)) -> top#(check(x)) p3: top#(found(x)) -> top#(active(x)) and R consists of: r1: active(f(x)) -> mark(x) r2: top(active(c())) -> top(mark(c())) r3: top(mark(x)) -> top(check(x)) r4: check(f(x)) -> f(check(x)) r5: check(x) -> start(match(f(X()),x)) r6: match(f(x),f(y)) -> f(match(x,y)) r7: match(X(),x) -> proper(x) r8: proper(c()) -> ok(c()) r9: proper(f(x)) -> f(proper(x)) r10: f(ok(x)) -> ok(f(x)) r11: start(ok(x)) -> found(x) r12: f(found(x)) -> found(f(x)) r13: top(found(x)) -> top(active(x)) r14: active(f(x)) -> f(active(x)) r15: f(mark(x)) -> mark(f(x)) The set of usable rules consists of r1, r4, r5, r6, r7, r8, r9, r10, r11, r12, r14, r15 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 + 11 active_A(x1) = x1 c_A = 5 mark_A(x1) = max{4, x1 - 6} check_A(x1) = max{4, x1 - 18} found_A(x1) = x1 proper_A(x1) = 6 ok_A(x1) = x1 f_A(x1) = max{4, x1 - 3} match_A(x1,x2) = max{4, x1 - 1} X_A = 8 start_A(x1) = x1 precedence: top# = active = c = mark = check = found = proper = ok = f = match = X = start partial status: pi(top#) = [] pi(active) = [] pi(c) = [] pi(mark) = [] pi(check) = [] pi(found) = [] pi(proper) = [] pi(ok) = [] pi(f) = [] pi(match) = [] pi(X) = [] pi(start) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: top#_A(x1) = max{0, x1 - 9} active_A(x1) = x1 c_A = 0 mark_A(x1) = 3 check_A(x1) = 8 found_A(x1) = max{4, x1} proper_A(x1) = 2 ok_A(x1) = max{3, x1 - 3} f_A(x1) = 4 match_A(x1,x2) = 4 X_A = 9 start_A(x1) = x1 + 3 precedence: c = X > active > match > proper > start > top# = mark = check = found = ok = f partial status: pi(top#) = [] pi(active) = [] pi(c) = [] pi(mark) = [] pi(check) = [] pi(found) = [] pi(proper) = [] pi(ok) = [] pi(f) = [] pi(match) = [] pi(X) = [] pi(start) = [1] 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#(check(x)) p2: top#(found(x)) -> top#(active(x)) and R consists of: r1: active(f(x)) -> mark(x) r2: top(active(c())) -> top(mark(c())) r3: top(mark(x)) -> top(check(x)) r4: check(f(x)) -> f(check(x)) r5: check(x) -> start(match(f(X()),x)) r6: match(f(x),f(y)) -> f(match(x,y)) r7: match(X(),x) -> proper(x) r8: proper(c()) -> ok(c()) r9: proper(f(x)) -> f(proper(x)) r10: f(ok(x)) -> ok(f(x)) r11: start(ok(x)) -> found(x) r12: f(found(x)) -> found(f(x)) r13: top(found(x)) -> top(active(x)) r14: active(f(x)) -> f(active(x)) r15: f(mark(x)) -> mark(f(x)) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: top#(mark(x)) -> top#(check(x)) p2: top#(found(x)) -> top#(active(x)) and R consists of: r1: active(f(x)) -> mark(x) r2: top(active(c())) -> top(mark(c())) r3: top(mark(x)) -> top(check(x)) r4: check(f(x)) -> f(check(x)) r5: check(x) -> start(match(f(X()),x)) r6: match(f(x),f(y)) -> f(match(x,y)) r7: match(X(),x) -> proper(x) r8: proper(c()) -> ok(c()) r9: proper(f(x)) -> f(proper(x)) r10: f(ok(x)) -> ok(f(x)) r11: start(ok(x)) -> found(x) r12: f(found(x)) -> found(f(x)) r13: top(found(x)) -> top(active(x)) r14: active(f(x)) -> f(active(x)) r15: f(mark(x)) -> mark(f(x)) The set of usable rules consists of r1, r4, r5, r6, r7, r8, r9, r10, r11, r12, r14, r15 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 + 6} mark_A(x1) = max{57, x1 + 46} check_A(x1) = x1 + 33 found_A(x1) = max{41, x1 + 30} active_A(x1) = max{35, x1 + 24} proper_A(x1) = x1 + 80 c_A = 46 ok_A(x1) = max{125, x1 + 79} f_A(x1) = max{45, x1 + 34} match_A(x1,x2) = max{x1 + 12, x2 + 80} X_A = 13 start_A(x1) = max{1, x1 - 48} precedence: c = X = start > active = match > proper > mark = check = found = ok = f > top# partial status: pi(top#) = [1] pi(mark) = [1] pi(check) = [1] pi(found) = [] pi(active) = [1] pi(proper) = [1] pi(c) = [] pi(ok) = [1] pi(f) = [1] pi(match) = [1, 2] pi(X) = [] pi(start) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: top#_A(x1) = max{28, x1 + 6} mark_A(x1) = x1 + 29 check_A(x1) = x1 + 12 found_A(x1) = 30 active_A(x1) = 23 proper_A(x1) = max{53, x1 + 43} c_A = 26 ok_A(x1) = x1 + 28 f_A(x1) = max{22, x1 + 13} match_A(x1,x2) = max{52, x1 + 40, x2 + 42} X_A = 11 start_A(x1) = 13 precedence: top# = mark = check = found = active = proper = c = ok = f = match = X = start partial status: pi(top#) = [1] pi(mark) = [1] pi(check) = [1] pi(found) = [] pi(active) = [] pi(proper) = [] pi(c) = [] pi(ok) = [1] pi(f) = [1] pi(match) = [2] pi(X) = [] pi(start) = [] 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: check#(f(x)) -> check#(x) and R consists of: r1: active(f(x)) -> mark(x) r2: top(active(c())) -> top(mark(c())) r3: top(mark(x)) -> top(check(x)) r4: check(f(x)) -> f(check(x)) r5: check(x) -> start(match(f(X()),x)) r6: match(f(x),f(y)) -> f(match(x,y)) r7: match(X(),x) -> proper(x) r8: proper(c()) -> ok(c()) r9: proper(f(x)) -> f(proper(x)) r10: f(ok(x)) -> ok(f(x)) r11: start(ok(x)) -> found(x) r12: f(found(x)) -> found(f(x)) r13: top(found(x)) -> top(active(x)) r14: active(f(x)) -> f(active(x)) r15: f(mark(x)) -> mark(f(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: check#_A(x1) = max{4, x1 + 3} f_A(x1) = max{3, x1 + 2} precedence: check# = f partial status: pi(check#) = [1] pi(f) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: check#_A(x1) = max{1, x1 - 1} f_A(x1) = x1 precedence: check# = f partial status: pi(check#) = [] 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: active#(f(x)) -> active#(x) and R consists of: r1: active(f(x)) -> mark(x) r2: top(active(c())) -> top(mark(c())) r3: top(mark(x)) -> top(check(x)) r4: check(f(x)) -> f(check(x)) r5: check(x) -> start(match(f(X()),x)) r6: match(f(x),f(y)) -> f(match(x,y)) r7: match(X(),x) -> proper(x) r8: proper(c()) -> ok(c()) r9: proper(f(x)) -> f(proper(x)) r10: f(ok(x)) -> ok(f(x)) r11: start(ok(x)) -> found(x) r12: f(found(x)) -> found(f(x)) r13: top(found(x)) -> top(active(x)) r14: active(f(x)) -> f(active(x)) r15: f(mark(x)) -> mark(f(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: match#(f(x),f(y)) -> match#(x,y) and R consists of: r1: active(f(x)) -> mark(x) r2: top(active(c())) -> top(mark(c())) r3: top(mark(x)) -> top(check(x)) r4: check(f(x)) -> f(check(x)) r5: check(x) -> start(match(f(X()),x)) r6: match(f(x),f(y)) -> f(match(x,y)) r7: match(X(),x) -> proper(x) r8: proper(c()) -> ok(c()) r9: proper(f(x)) -> f(proper(x)) r10: f(ok(x)) -> ok(f(x)) r11: start(ok(x)) -> found(x) r12: f(found(x)) -> found(f(x)) r13: top(found(x)) -> top(active(x)) r14: active(f(x)) -> f(active(x)) r15: f(mark(x)) -> mark(f(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: match#_A(x1,x2) = max{2, x1 - 1, x2 + 1} f_A(x1) = max{1, x1} precedence: match# = f partial status: pi(match#) = [2] pi(f) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: match#_A(x1,x2) = 0 f_A(x1) = max{2, x1} precedence: match# = f partial status: pi(match#) = [] 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#(f(x)) -> proper#(x) and R consists of: r1: active(f(x)) -> mark(x) r2: top(active(c())) -> top(mark(c())) r3: top(mark(x)) -> top(check(x)) r4: check(f(x)) -> f(check(x)) r5: check(x) -> start(match(f(X()),x)) r6: match(f(x),f(y)) -> f(match(x,y)) r7: match(X(),x) -> proper(x) r8: proper(c()) -> ok(c()) r9: proper(f(x)) -> f(proper(x)) r10: f(ok(x)) -> ok(f(x)) r11: start(ok(x)) -> found(x) r12: f(found(x)) -> found(f(x)) r13: top(found(x)) -> top(active(x)) r14: active(f(x)) -> f(active(x)) r15: f(mark(x)) -> mark(f(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{2, x1 + 1} f_A(x1) = max{1, x1} precedence: proper# = f partial status: pi(proper#) = [1] pi(f) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: proper#_A(x1) = x1 + 2 f_A(x1) = x1 + 1 precedence: proper# = f partial status: pi(proper#) = [1] 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: f#(ok(x)) -> f#(x) p2: f#(mark(x)) -> f#(x) p3: f#(found(x)) -> f#(x) and R consists of: r1: active(f(x)) -> mark(x) r2: top(active(c())) -> top(mark(c())) r3: top(mark(x)) -> top(check(x)) r4: check(f(x)) -> f(check(x)) r5: check(x) -> start(match(f(X()),x)) r6: match(f(x),f(y)) -> f(match(x,y)) r7: match(X(),x) -> proper(x) r8: proper(c()) -> ok(c()) r9: proper(f(x)) -> f(proper(x)) r10: f(ok(x)) -> ok(f(x)) r11: start(ok(x)) -> found(x) r12: f(found(x)) -> found(f(x)) r13: top(found(x)) -> top(active(x)) r14: active(f(x)) -> f(active(x)) r15: f(mark(x)) -> mark(f(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) = max{2, x1 + 1} ok_A(x1) = max{1, x1} mark_A(x1) = max{1, x1} found_A(x1) = max{1, x1} precedence: f# = ok = mark = found partial status: pi(f#) = [1] pi(ok) = [1] pi(mark) = [1] pi(found) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1) = x1 + 1 ok_A(x1) = x1 mark_A(x1) = x1 found_A(x1) = x1 precedence: f# = ok = mark = found partial status: pi(f#) = [1] pi(ok) = [1] pi(mark) = [1] pi(found) = [1] The next rules are strictly ordered: p1, p2, p3 We remove them from the problem. Then no dependency pair remains.