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: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: top#_A(x1) = 1 active_A(x1) = max{6, x1} c_A = 12 mark_A(x1) = 5 check_A(x1) = max{14, x1 + 8} found_A(x1) = 11 f_A(x1) = max{15, x1 - 7} start_A(x1) = max{12, x1 - 24} match_A(x1,x2) = max{23, x1 - 16, x2 - 16} X_A = 6 proper_A(x1) = max{15, x1 - 17} ok_A(x1) = 6 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: top#_A(x1) = max{0, x1 - 42} active_A(x1) = max{9, x1 - 33} c_A = 74 mark_A(x1) = max{6, x1 - 65} check_A(x1) = 31 found_A(x1) = max{2, x1 - 15} f_A(x1) = max{9, x1 - 32} start_A(x1) = max{1, x1 - 4} match_A(x1,x2) = max{3, x1 + 1} X_A = 66 proper_A(x1) = 63 ok_A(x1) = max{6, x1 - 11} top#!_A(x1) = max{47, x1 + 16} active!_A(x1) = 58 c!_A = 45 mark!_A(x1) = max{46, x1 - 82} check!_A(x1) = max{58, x1 - 50} found!_A(x1) = max{48, x1 - 10} f!_A(x1) = max{57, x1 - 7} start!_A(x1) = max{1, x1 - 86} match!_A(x1,x2) = max{95, x1 + 27, x2 - 14} X!_A = 1 proper!_A(x1) = max{94, x1 - 75} ok!_A(x1) = 1 partial status: pi(top#) = [] pi(active) = [1] pi(c) = [] pi(mark) = [] pi(check) = [1] pi(found) = [] pi(f) = [] pi(start) = [] pi(match) = [] pi(X) = [] pi(proper) = [] pi(ok) = [] The following rules are removed: p1 -- 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: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: top#_A(x1) = max{1, x1 - 8} mark_A(x1) = max{45, x1 + 27} check_A(x1) = x1 + 18 found_A(x1) = max{2, x1} active_A(x1) = max{9, x1} f_A(x1) = max{46, x1 + 29} start_A(x1) = max{3, x1 - 14} match_A(x1,x2) = max{x1 - 47, x2 + 31} X_A = 5 proper_A(x1) = max{30, x1 + 16} c_A = 63 ok_A(x1) = max{62, x1 + 15} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: top#_A(x1) = max{0, x1 - 4} mark_A(x1) = max{2, x1 - 39} check_A(x1) = max{2, x1 - 75} found_A(x1) = max{2, x1 - 12} active_A(x1) = max{3, x1 - 26} f_A(x1) = max{2, x1 - 13} start_A(x1) = max{2, x1 - 9} match_A(x1,x2) = max{8, x1 - 56, x2 - 67} X_A = 4 proper_A(x1) = max{2, x1 - 67} c_A = 2 ok_A(x1) = max{0, x1 - 3} top#!_A(x1) = max{43, x1 + 40} mark!_A(x1) = max{1, x1 - 45} check!_A(x1) = max{44, x1 - 44} found!_A(x1) = 0 active!_A(x1) = max{40, x1 - 17} f!_A(x1) = max{2, x1 - 5} start!_A(x1) = x1 + 22 match!_A(x1,x2) = max{43, x1 - 47, x2 - 45} X!_A = 1 proper!_A(x1) = max{42, x1 - 46} c!_A = 42 ok!_A(x1) = max{1, x1 - 8} partial status: pi(top#) = [] pi(mark) = [] pi(check) = [] pi(found) = [] pi(active) = [1] pi(f) = [1] pi(start) = [] pi(match) = [] pi(X) = [] pi(proper) = [1] pi(c) = [] pi(ok) = [] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: 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} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: 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, r10, r12, r14, r15 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: top#_A(x1) = max{3, x1 - 10} found_A(x1) = x1 + 19 active_A(x1) = x1 + 9 f_A(x1) = x1 + 6 mark_A(x1) = max{4, x1 - 28} ok_A(x1) = max{1, x1 - 17} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: top#_A(x1) = max{0, x1 - 5} found_A(x1) = max{3, x1 - 4} active_A(x1) = max{4, x1 - 28} f_A(x1) = max{3, x1 - 5} mark_A(x1) = max{3, x1 - 37} ok_A(x1) = max{3, x1 - 11} top#!_A(x1) = x1 + 27 found!_A(x1) = 16 active!_A(x1) = max{22, x1 - 4} f!_A(x1) = max{17, x1 + 5} mark!_A(x1) = max{16, x1 - 34} ok!_A(x1) = max{0, x1 - 1} partial status: pi(top#) = [] pi(found) = [1] pi(active) = [] pi(f) = [1] pi(mark) = [] pi(ok) = [] The following rules are removed: p1 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: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: check#_A(x1) = max{23, x1 + 13} f_A(x1) = max{23, x1 + 13} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: check#_A(x1) = 0 f_A(x1) = max{3, x1 - 18} check#!_A(x1) = 0 f!_A(x1) = max{8, x1 - 18} partial status: pi(check#) = [1] pi(f) = [1] The following rules are removed: p1 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: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: active#_A(x1) = max{12, x1} f_A(x1) = max{12, x1 + 1} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: active#_A(x1) = 0 f_A(x1) = max{7, x1 - 18} active#!_A(x1) = 0 f!_A(x1) = max{4, x1 - 28} partial status: pi(active#) = [1] pi(f) = [1] The following rules are removed: p1 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: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: match#_A(x1,x2) = max{23, x2} f_A(x1) = x1 + 23 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: match#_A(x1,x2) = 0 f_A(x1) = max{20, x1 - 17} match#!_A(x1,x2) = x2 + 19 f!_A(x1) = max{31, x1 + 20} partial status: pi(match#) = [2] pi(f) = [1] The following rules are removed: p1 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 reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: proper#_A(x1) = max{4, x1 + 2} f_A(x1) = max{26, x1 + 3} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: proper#_A(x1) = 0 f_A(x1) = max{21, x1 - 57} proper#!_A(x1) = 1 f!_A(x1) = max{8, x1 - 87} partial status: pi(proper#) = [1] pi(f) = [1] The following rules are removed: p1 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 reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: f#_A(x1) = max{14, x1 + 7} ok_A(x1) = max{14, x1 + 10} mark_A(x1) = max{79, x1 + 8} found_A(x1) = max{14, x1 + 10} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: f#_A(x1) = 0 ok_A(x1) = max{6, x1 - 6} mark_A(x1) = max{7, x1 - 6} found_A(x1) = max{8, x1 - 22} f#!_A(x1) = 0 ok!_A(x1) = max{4, x1 - 29} mark!_A(x1) = max{2, x1 - 33} found!_A(x1) = max{3, x1 - 30} partial status: pi(f#) = [1] pi(ok) = [] pi(mark) = [1] pi(found) = [] The following rules are removed: p1, p2, p3 Then no dependency pair remains.