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. matrix interpretations: carrier: N^4 order: lexicographic order interpretations: top#_A(x1) = ((0,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x1 active_A(x1) = ((1,0,0,0),(0,1,0,0),(1,0,0,0),(0,0,0,0)) x1 + (0,1,0,0) c_A() = (6,1,0,1) mark_A(x1) = ((0,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x1 + (5,1,0,1) check_A(x1) = ((0,0,0,0),(0,0,0,0),(1,0,0,0),(0,1,0,0)) x1 + (5,13,0,0) found_A(x1) = x1 + (0,7,1,1) proper_A(x1) = ((0,0,0,0),(1,0,0,0),(1,1,0,0),(0,0,0,0)) x1 + (7,10,0,10) ok_A(x1) = ((1,0,0,0),(1,0,0,0),(0,1,0,0),(0,0,1,0)) x1 + (0,1,0,0) f_A(x1) = ((0,0,0,0),(1,0,0,0),(0,1,0,0),(0,0,0,0)) x1 + (5,7,1,9) match_A(x1,x2) = ((1,0,0,0),(0,1,0,0),(1,0,1,0),(0,1,1,0)) x1 + ((0,0,0,0),(1,0,0,0),(0,1,0,0),(0,0,0,0)) x2 + (0,9,0,0) X_A() = (8,1,1,0) start_A(x1) = x1 + (0,7,1,1) 2. lexicographic path order with precedence: precedence: check > X > match > proper > c > top# > active > f > ok > mark > start > found argument filter: pi(top#) = [] pi(active) = [] pi(c) = [] pi(mark) = [] pi(check) = [] pi(found) = [] pi(proper) = [] pi(ok) = [] pi(f) = [] pi(match) = [] pi(X) = [] pi(start) = [] 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. matrix interpretations: carrier: N^4 order: lexicographic order interpretations: top#_A(x1) = ((0,0,0,0),(0,0,0,0),(1,0,0,0),(1,1,0,0)) x1 mark_A(x1) = ((1,0,0,0),(1,0,0,0),(0,1,0,0),(1,0,0,0)) x1 + (40,0,1,5) check_A(x1) = ((1,0,0,0),(1,0,0,0),(0,0,0,0),(1,0,0,0)) x1 + (29,10,49,5) found_A(x1) = ((1,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x1 + (23,0,43,3) active_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(0,0,0,1)) x1 + (21,1,1,1) proper_A(x1) = ((1,0,0,0),(0,1,0,0),(0,1,0,0),(0,0,0,0)) x1 + (3,4,23,29) c_A() = (24,1,1,1) ok_A(x1) = ((1,0,0,0),(0,1,0,0),(1,0,0,0),(1,0,0,0)) x1 + (2,1,0,5) f_A(x1) = ((1,0,0,0),(1,0,0,0),(1,0,0,0),(0,0,0,0)) x1 + (20,0,19,24) match_A(x1,x2) = ((1,0,0,0),(0,1,0,0),(1,1,0,0),(0,0,0,0)) x2 + (6,7,0,25) X_A() = (1,1,1,1) start_A(x1) = ((1,0,0,0),(0,0,0,0),(1,1,0,0),(1,0,0,0)) x1 + (22,1,37,0) 2. lexicographic path order with precedence: precedence: X > active > check > top# > match > proper > f > mark > c > start > ok > found argument filter: pi(top#) = [] pi(mark) = [] pi(check) = [] pi(found) = [] pi(active) = [] pi(proper) = [] pi(c) = [] pi(ok) = [] pi(f) = [] pi(match) = [] 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. matrix interpretations: carrier: N^4 order: lexicographic order interpretations: check#_A(x1) = ((0,0,0,0),(1,0,0,0),(0,1,0,0),(1,1,1,0)) x1 f_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,1) 2. lexicographic path order with precedence: precedence: f > check# argument filter: pi(check#) = [] pi(f) = [] 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. matrix interpretations: carrier: N^4 order: lexicographic order interpretations: active#_A(x1) = ((0,0,0,0),(1,0,0,0),(1,1,0,0),(1,1,1,0)) x1 f_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,1) 2. lexicographic path order with precedence: precedence: f > active# argument filter: pi(active#) = [] pi(f) = [] 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 monotone reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^4 order: lexicographic order interpretations: match#_A(x1,x2) = ((1,0,0,0),(1,1,0,0),(0,0,1,0),(1,1,1,1)) x1 + ((1,0,0,0),(0,1,0,0),(0,0,1,0),(1,1,1,1)) x2 f_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,1) 2. lexicographic path order with precedence: precedence: f > match# argument filter: pi(match#) = [1, 2] pi(f) = 1 The next rules are strictly ordered: p1 r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15 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 reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^4 order: lexicographic order interpretations: proper#_A(x1) = ((0,0,0,0),(1,0,0,0),(1,1,0,0),(1,1,1,0)) x1 f_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,1) 2. lexicographic path order with precedence: precedence: f > proper# argument filter: pi(proper#) = [] pi(f) = [] 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. matrix interpretations: carrier: N^4 order: lexicographic order interpretations: f#_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 ok_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,1) mark_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,1) found_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,1) 2. lexicographic path order with precedence: precedence: f# > found > mark > ok argument filter: pi(f#) = 1 pi(ok) = [1] pi(mark) = [1] pi(found) = [1] The next rules are strictly ordered: p1, p2, p3 r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15 We remove them from the problem. Then no dependency pair remains.