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