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^2 order: standard order interpretations: a__f#_A(x1) = ((0,1),(0,0)) x1 + (1,0) a__if#_A(x1,x2,x3) = ((0,1),(0,0)) x2 + ((0,1),(0,0)) x3 mark_A(x1) = x1 + (2,0) c_A() = (1,0) f_A(x1) = x1 + (0,1) true_A() = (1,0) false_A() = (1,1) mark#_A(x1) = ((0,1),(0,0)) x1 if_A(x1,x2,x3) = x1 + x2 + ((0,0),(1,1)) x3 + (1,0) a__f_A(x1) = x1 + (2,1) a__if_A(x1,x2,x3) = x1 + x2 + ((0,0),(1,1)) x3 + (2,0) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__f#_A(x1) = (0,0) a__if#_A(x1,x2,x3) = (0,0) mark_A(x1) = (2,1) c_A() = (3,2) f_A(x1) = (0,0) true_A() = (3,2) false_A() = (1,0) mark#_A(x1) = (0,0) if_A(x1,x2,x3) = (3,0) a__f_A(x1) = (2,1) a__if_A(x1,x2,x3) = (2,1) The next rules are strictly ordered: p7, 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())) 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)) -> a__f#(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 estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7} -- 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#(true(),X,Y) -> mark#(X) p3: mark#(f(X)) -> a__f#(mark(X)) p4: mark#(if(X1,X2,X3)) -> a__if#(mark(X1),mark(X2),X3) p5: a__if#(false(),X,Y) -> mark#(Y) p6: mark#(if(X1,X2,X3)) -> mark#(X1) p7: 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 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^2 order: standard order interpretations: a__f#_A(x1) = ((1,1),(0,0)) x1 + (1,0) a__if#_A(x1,x2,x3) = ((0,1),(0,0)) x1 + ((1,1),(1,0)) x2 + ((1,1),(1,0)) x3 mark_A(x1) = ((1,1),(0,1)) x1 c_A() = (0,0) f_A(x1) = ((1,1),(0,1)) x1 + (0,1) true_A() = (0,0) mark#_A(x1) = ((1,1),(1,0)) x1 if_A(x1,x2,x3) = x1 + ((1,1),(0,1)) x2 + ((1,0),(1,1)) x3 false_A() = (1,1) a__f_A(x1) = ((1,1),(0,1)) x1 + (1,1) a__if_A(x1,x2,x3) = x1 + ((1,1),(0,1)) x2 + ((1,1),(1,1)) x3 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__f#_A(x1) = (9,0) a__if#_A(x1,x2,x3) = x2 + ((0,1),(0,0)) x3 + (1,0) mark_A(x1) = ((1,1),(0,1)) x1 + (1,0) c_A() = (1,0) f_A(x1) = ((0,1),(1,1)) x1 + (14,4) true_A() = (1,1) mark#_A(x1) = x1 if_A(x1,x2,x3) = x1 + ((1,1),(0,1)) x2 + ((0,1),(0,0)) x3 + (3,3) false_A() = (1,1) a__f_A(x1) = ((1,1),(0,1)) x1 + (13,3) a__if_A(x1,x2,x3) = x1 + ((1,1),(0,1)) x2 + ((0,1),(0,0)) x3 + (4,3) The next rules are strictly ordered: p1, p2, p3, p4, p5, p6, p7 We remove them from the problem. Then no dependency pair remains.