YES We show the termination of the TRS R: a__f(X) -> a__if(mark(X),c(),f(true())) a__if(true(),X,Y) -> mark(X) a__if(false(),X,Y) -> mark(Y) mark(f(X)) -> a__f(mark(X)) mark(if(X1,X2,X3)) -> a__if(mark(X1),mark(X2),X3) mark(c()) -> c() mark(true()) -> true() mark(false()) -> false() a__f(X) -> f(X) a__if(X1,X2,X3) -> if(X1,X2,X3) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__f#(X) -> a__if#(mark(X),c(),f(true())) p2: a__f#(X) -> mark#(X) p3: a__if#(true(),X,Y) -> mark#(X) p4: a__if#(false(),X,Y) -> mark#(Y) p5: mark#(f(X)) -> a__f#(mark(X)) p6: mark#(f(X)) -> mark#(X) p7: mark#(if(X1,X2,X3)) -> a__if#(mark(X1),mark(X2),X3) p8: mark#(if(X1,X2,X3)) -> mark#(X1) p9: mark#(if(X1,X2,X3)) -> mark#(X2) and R consists of: r1: a__f(X) -> a__if(mark(X),c(),f(true())) r2: a__if(true(),X,Y) -> mark(X) r3: a__if(false(),X,Y) -> mark(Y) r4: mark(f(X)) -> a__f(mark(X)) r5: mark(if(X1,X2,X3)) -> a__if(mark(X1),mark(X2),X3) r6: mark(c()) -> c() r7: mark(true()) -> true() r8: mark(false()) -> false() r9: a__f(X) -> f(X) r10: a__if(X1,X2,X3) -> if(X1,X2,X3) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p8, p9} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a__f#(X) -> a__if#(mark(X),c(),f(true())) p2: a__if#(false(),X,Y) -> mark#(Y) p3: mark#(if(X1,X2,X3)) -> mark#(X2) p4: mark#(if(X1,X2,X3)) -> mark#(X1) p5: mark#(if(X1,X2,X3)) -> a__if#(mark(X1),mark(X2),X3) p6: a__if#(true(),X,Y) -> mark#(X) p7: mark#(f(X)) -> mark#(X) p8: mark#(f(X)) -> a__f#(mark(X)) p9: a__f#(X) -> mark#(X) and R consists of: r1: a__f(X) -> a__if(mark(X),c(),f(true())) r2: a__if(true(),X,Y) -> mark(X) r3: a__if(false(),X,Y) -> mark(Y) r4: mark(f(X)) -> a__f(mark(X)) r5: mark(if(X1,X2,X3)) -> a__if(mark(X1),mark(X2),X3) r6: mark(c()) -> c() r7: mark(true()) -> true() r8: mark(false()) -> false() r9: a__f(X) -> f(X) r10: a__if(X1,X2,X3) -> if(X1,X2,X3) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10 Take the reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^1 order: standard order interpretations: a__f#_A(x1) = x1 + 1 a__if#_A(x1,x2,x3) = x1 + x2 + x3 mark_A(x1) = x1 c_A() = 0 f_A(x1) = x1 + 1 true_A() = 0 false_A() = 1 mark#_A(x1) = x1 if_A(x1,x2,x3) = x1 + x2 + x3 a__f_A(x1) = x1 + 1 a__if_A(x1,x2,x3) = x1 + x2 + x3 2. matrix interpretations: carrier: N^1 order: standard order interpretations: a__f#_A(x1) = x1 + 3 a__if#_A(x1,x2,x3) = x1 + x2 mark_A(x1) = x1 c_A() = 3 f_A(x1) = x1 + 5 true_A() = 3 false_A() = 1 mark#_A(x1) = x1 + 2 if_A(x1,x2,x3) = x1 + x2 + 1 a__f_A(x1) = x1 + 5 a__if_A(x1,x2,x3) = x1 + x2 + 1 The next rules are strictly ordered: p2, p3, p4, p5, p6, p7, p8, p9 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__f#(X) -> a__if#(mark(X),c(),f(true())) and R consists of: r1: a__f(X) -> a__if(mark(X),c(),f(true())) r2: a__if(true(),X,Y) -> mark(X) r3: a__if(false(),X,Y) -> mark(Y) r4: mark(f(X)) -> a__f(mark(X)) r5: mark(if(X1,X2,X3)) -> a__if(mark(X1),mark(X2),X3) r6: mark(c()) -> c() r7: mark(true()) -> true() r8: mark(false()) -> false() r9: a__f(X) -> f(X) r10: a__if(X1,X2,X3) -> if(X1,X2,X3) The estimated dependency graph contains the following SCCs: (no SCCs)