YES We show the termination of the TRS R: active(f(X)) -> mark(if(X,c(),f(true()))) active(if(true(),X,Y)) -> mark(X) active(if(false(),X,Y)) -> mark(Y) active(f(X)) -> f(active(X)) active(if(X1,X2,X3)) -> if(active(X1),X2,X3) active(if(X1,X2,X3)) -> if(X1,active(X2),X3) f(mark(X)) -> mark(f(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) if(X1,mark(X2),X3) -> mark(if(X1,X2,X3)) proper(f(X)) -> f(proper(X)) proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) proper(c()) -> ok(c()) proper(true()) -> ok(true()) proper(false()) -> ok(false()) f(ok(X)) -> ok(f(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) 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(X)) -> if#(X,c(),f(true())) p2: active#(f(X)) -> f#(true()) p3: active#(f(X)) -> f#(active(X)) p4: active#(f(X)) -> active#(X) p5: active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) p6: active#(if(X1,X2,X3)) -> active#(X1) p7: active#(if(X1,X2,X3)) -> if#(X1,active(X2),X3) p8: active#(if(X1,X2,X3)) -> active#(X2) p9: f#(mark(X)) -> f#(X) p10: if#(mark(X1),X2,X3) -> if#(X1,X2,X3) p11: if#(X1,mark(X2),X3) -> if#(X1,X2,X3) p12: proper#(f(X)) -> f#(proper(X)) p13: proper#(f(X)) -> proper#(X) p14: proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) p15: proper#(if(X1,X2,X3)) -> proper#(X1) p16: proper#(if(X1,X2,X3)) -> proper#(X2) p17: proper#(if(X1,X2,X3)) -> proper#(X3) p18: f#(ok(X)) -> f#(X) p19: if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) p20: top#(mark(X)) -> top#(proper(X)) p21: top#(mark(X)) -> proper#(X) p22: top#(ok(X)) -> top#(active(X)) p23: top#(ok(X)) -> active#(X) and R consists of: r1: active(f(X)) -> mark(if(X,c(),f(true()))) r2: active(if(true(),X,Y)) -> mark(X) r3: active(if(false(),X,Y)) -> mark(Y) r4: active(f(X)) -> f(active(X)) r5: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r6: active(if(X1,X2,X3)) -> if(X1,active(X2),X3) r7: f(mark(X)) -> mark(f(X)) r8: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r9: if(X1,mark(X2),X3) -> mark(if(X1,X2,X3)) r10: proper(f(X)) -> f(proper(X)) r11: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r12: proper(c()) -> ok(c()) r13: proper(true()) -> ok(true()) r14: proper(false()) -> ok(false()) r15: f(ok(X)) -> ok(f(X)) r16: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r17: top(mark(X)) -> top(proper(X)) r18: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p20, p22} {p4, p6, p8} {p13, p15, p16, p17} {p10, p11, p19} {p9, p18} -- 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(X)) -> mark(if(X,c(),f(true()))) r2: active(if(true(),X,Y)) -> mark(X) r3: active(if(false(),X,Y)) -> mark(Y) r4: active(f(X)) -> f(active(X)) r5: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r6: active(if(X1,X2,X3)) -> if(X1,active(X2),X3) r7: f(mark(X)) -> mark(f(X)) r8: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r9: if(X1,mark(X2),X3) -> mark(if(X1,X2,X3)) r10: proper(f(X)) -> f(proper(X)) r11: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r12: proper(c()) -> ok(c()) r13: proper(true()) -> ok(true()) r14: proper(false()) -> ok(false()) r15: f(ok(X)) -> ok(f(X)) r16: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r17: top(mark(X)) -> top(proper(X)) r18: 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, r13, r14, r15, r16 Take the reduction pair: matrix interpretations: carrier: N^4 order: lexicographic order interpretations: top#_A(x1) = ((1,0,0,0),(0,0,0,0),(0,1,0,0),(0,0,1,0)) x1 ok_A(x1) = x1 active_A(x1) = x1 + (0,0,0,1) mark_A(x1) = x1 + (0,0,1,0) proper_A(x1) = ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,1,1,0)) x1 f_A(x1) = ((1,0,0,0),(1,1,0,0),(1,0,1,0),(1,0,0,0)) x1 + (1,2,4,1) if_A(x1,x2,x3) = ((1,0,0,0),(1,1,0,0),(0,0,1,0),(0,0,0,1)) x1 + ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,1,0,0)) x2 + x3 + (0,0,2,1) c_A() = (0,1,0,1) true_A() = (0,0,1,1) false_A() = (1,1,1,1) 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(X)) -> mark(if(X,c(),f(true()))) r2: active(if(true(),X,Y)) -> mark(X) r3: active(if(false(),X,Y)) -> mark(Y) r4: active(f(X)) -> f(active(X)) r5: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r6: active(if(X1,X2,X3)) -> if(X1,active(X2),X3) r7: f(mark(X)) -> mark(f(X)) r8: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r9: if(X1,mark(X2),X3) -> mark(if(X1,X2,X3)) r10: proper(f(X)) -> f(proper(X)) r11: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r12: proper(c()) -> ok(c()) r13: proper(true()) -> ok(true()) r14: proper(false()) -> ok(false()) r15: f(ok(X)) -> ok(f(X)) r16: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r17: top(mark(X)) -> top(proper(X)) r18: 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(X)) -> mark(if(X,c(),f(true()))) r2: active(if(true(),X,Y)) -> mark(X) r3: active(if(false(),X,Y)) -> mark(Y) r4: active(f(X)) -> f(active(X)) r5: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r6: active(if(X1,X2,X3)) -> if(X1,active(X2),X3) r7: f(mark(X)) -> mark(f(X)) r8: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r9: if(X1,mark(X2),X3) -> mark(if(X1,X2,X3)) r10: proper(f(X)) -> f(proper(X)) r11: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r12: proper(c()) -> ok(c()) r13: proper(true()) -> ok(true()) r14: proper(false()) -> ok(false()) r15: f(ok(X)) -> ok(f(X)) r16: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r17: top(mark(X)) -> top(proper(X)) r18: top(ok(X)) -> top(active(X)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r15, r16 Take the reduction pair: 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 ok_A(x1) = ((1,0,0,0),(0,1,0,0),(1,0,0,0),(1,1,0,0)) x1 + (2,1,1,1) active_A(x1) = ((1,0,0,0),(1,1,0,0),(0,0,1,0),(0,0,0,1)) x1 + (1,2,1,1) f_A(x1) = ((1,0,0,0),(1,1,0,0),(0,0,0,0),(0,1,0,0)) x1 + (2,2,1,1) mark_A(x1) = ((0,0,0,0),(1,0,0,0),(0,0,0,0),(0,0,0,0)) x1 + (1,0,5,4) if_A(x1,x2,x3) = x1 + ((1,0,0,0),(1,0,0,0),(0,1,0,0),(0,0,0,0)) x2 + ((1,0,0,0),(0,1,0,0),(1,0,1,0),(1,1,1,1)) x3 + (5,2,2,1) c_A() = (1,1,1,1) true_A() = (1,1,3,1) false_A() = (1,1,1,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#(if(X1,X2,X3)) -> active#(X2) p2: active#(if(X1,X2,X3)) -> active#(X1) p3: active#(f(X)) -> active#(X) and R consists of: r1: active(f(X)) -> mark(if(X,c(),f(true()))) r2: active(if(true(),X,Y)) -> mark(X) r3: active(if(false(),X,Y)) -> mark(Y) r4: active(f(X)) -> f(active(X)) r5: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r6: active(if(X1,X2,X3)) -> if(X1,active(X2),X3) r7: f(mark(X)) -> mark(f(X)) r8: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r9: if(X1,mark(X2),X3) -> mark(if(X1,X2,X3)) r10: proper(f(X)) -> f(proper(X)) r11: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r12: proper(c()) -> ok(c()) r13: proper(true()) -> ok(true()) r14: proper(false()) -> ok(false()) r15: f(ok(X)) -> ok(f(X)) r16: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r17: top(mark(X)) -> top(proper(X)) r18: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: matrix interpretations: carrier: N^4 order: lexicographic order interpretations: active#_A(x1) = ((1,0,0,0),(1,1,0,0),(1,0,1,0),(1,1,1,1)) x1 if_A(x1,x2,x3) = ((1,0,0,0),(1,0,0,0),(1,1,0,0),(1,1,1,0)) x1 + ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x2 + ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x3 + (1,1,1,1) f_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,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: proper#(if(X1,X2,X3)) -> proper#(X3) p2: proper#(if(X1,X2,X3)) -> proper#(X2) p3: proper#(if(X1,X2,X3)) -> proper#(X1) p4: proper#(f(X)) -> proper#(X) and R consists of: r1: active(f(X)) -> mark(if(X,c(),f(true()))) r2: active(if(true(),X,Y)) -> mark(X) r3: active(if(false(),X,Y)) -> mark(Y) r4: active(f(X)) -> f(active(X)) r5: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r6: active(if(X1,X2,X3)) -> if(X1,active(X2),X3) r7: f(mark(X)) -> mark(f(X)) r8: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r9: if(X1,mark(X2),X3) -> mark(if(X1,X2,X3)) r10: proper(f(X)) -> f(proper(X)) r11: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r12: proper(c()) -> ok(c()) r13: proper(true()) -> ok(true()) r14: proper(false()) -> ok(false()) r15: f(ok(X)) -> ok(f(X)) r16: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r17: top(mark(X)) -> top(proper(X)) r18: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: matrix interpretations: carrier: N^4 order: lexicographic order interpretations: proper#_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 if_A(x1,x2,x3) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + ((1,0,0,0),(1,0,0,0),(1,1,0,0),(1,1,1,0)) x2 + ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x3 + (1,1,1,1) f_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,1) The next rules are strictly ordered: p1, p2, p3, p4 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: if#(mark(X1),X2,X3) -> if#(X1,X2,X3) p2: if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) p3: if#(X1,mark(X2),X3) -> if#(X1,X2,X3) and R consists of: r1: active(f(X)) -> mark(if(X,c(),f(true()))) r2: active(if(true(),X,Y)) -> mark(X) r3: active(if(false(),X,Y)) -> mark(Y) r4: active(f(X)) -> f(active(X)) r5: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r6: active(if(X1,X2,X3)) -> if(X1,active(X2),X3) r7: f(mark(X)) -> mark(f(X)) r8: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r9: if(X1,mark(X2),X3) -> mark(if(X1,X2,X3)) r10: proper(f(X)) -> f(proper(X)) r11: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r12: proper(c()) -> ok(c()) r13: proper(true()) -> ok(true()) r14: proper(false()) -> ok(false()) r15: f(ok(X)) -> ok(f(X)) r16: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r17: top(mark(X)) -> top(proper(X)) r18: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: matrix interpretations: carrier: N^4 order: lexicographic order interpretations: if#_A(x1,x2,x3) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(0,0,1,0)) x1 + ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x2 + ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x3 mark_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,1) ok_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,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(X)) -> mark(if(X,c(),f(true()))) r2: active(if(true(),X,Y)) -> mark(X) r3: active(if(false(),X,Y)) -> mark(Y) r4: active(f(X)) -> f(active(X)) r5: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r6: active(if(X1,X2,X3)) -> if(X1,active(X2),X3) r7: f(mark(X)) -> mark(f(X)) r8: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r9: if(X1,mark(X2),X3) -> mark(if(X1,X2,X3)) r10: proper(f(X)) -> f(proper(X)) r11: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r12: proper(c()) -> ok(c()) r13: proper(true()) -> ok(true()) r14: proper(false()) -> ok(false()) r15: f(ok(X)) -> ok(f(X)) r16: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r17: top(mark(X)) -> top(proper(X)) r18: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the monotone reduction pair: matrix interpretations: carrier: N^4 order: lexicographic order interpretations: f#_A(x1) = ((1,0,0,0),(0,1,0,0),(0,1,1,0),(0,1,1,1)) x1 mark_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,1) ok_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (1,1,1,1) The next rules are strictly ordered: p1, p2 r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18 We remove them from the problem. Then no dependency pair remains.