YES We show the termination of the TRS R: f(X) -> if(X,c(),n__f(n__true())) if(true(),X,Y) -> X if(false(),X,Y) -> activate(Y) f(X) -> n__f(X) true() -> n__true() activate(n__f(X)) -> f(activate(X)) activate(n__true()) -> true() activate(X) -> X -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: f#(X) -> if#(X,c(),n__f(n__true())) p2: if#(false(),X,Y) -> activate#(Y) p3: activate#(n__f(X)) -> f#(activate(X)) p4: activate#(n__f(X)) -> activate#(X) p5: activate#(n__true()) -> true#() and R consists of: r1: f(X) -> if(X,c(),n__f(n__true())) r2: if(true(),X,Y) -> X r3: if(false(),X,Y) -> activate(Y) r4: f(X) -> n__f(X) r5: true() -> n__true() r6: activate(n__f(X)) -> f(activate(X)) r7: activate(n__true()) -> true() r8: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: f#(X) -> if#(X,c(),n__f(n__true())) p2: if#(false(),X,Y) -> activate#(Y) p3: activate#(n__f(X)) -> activate#(X) p4: activate#(n__f(X)) -> f#(activate(X)) and R consists of: r1: f(X) -> if(X,c(),n__f(n__true())) r2: if(true(),X,Y) -> X r3: if(false(),X,Y) -> activate(Y) r4: f(X) -> n__f(X) r5: true() -> n__true() r6: activate(n__f(X)) -> f(activate(X)) r7: activate(n__true()) -> true() r8: activate(X) -> X The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1) = max{11, x1 + 2} if#_A(x1,x2,x3) = max{x1 + 1, x2 + 1, x3 + 9} c_A = 0 n__f_A(x1) = max{1, x1} n__true_A = 0 false_A = 12 activate#_A(x1) = max{12, x1 + 8} activate_A(x1) = max{5, x1 + 2} if_A(x1,x2,x3) = max{x1, x2 + 4, x3 + 3} true_A = 1 f_A(x1) = max{5, x1} precedence: n__f = n__true = activate = if = true = f > activate# > f# > if# > false > c partial status: pi(f#) = [1] pi(if#) = [1] pi(c) = [] pi(n__f) = [] pi(n__true) = [] pi(false) = [] pi(activate#) = [] pi(activate) = [] pi(if) = [] pi(true) = [] pi(f) = [] 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: f#(X) -> if#(X,c(),n__f(n__true())) p2: activate#(n__f(X)) -> activate#(X) p3: activate#(n__f(X)) -> f#(activate(X)) and R consists of: r1: f(X) -> if(X,c(),n__f(n__true())) r2: if(true(),X,Y) -> X r3: if(false(),X,Y) -> activate(Y) r4: f(X) -> n__f(X) r5: true() -> n__true() r6: activate(n__f(X)) -> f(activate(X)) r7: activate(n__true()) -> true() r8: activate(X) -> X The estimated dependency graph contains the following SCCs: {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__f(X)) -> activate#(X) and R consists of: r1: f(X) -> if(X,c(),n__f(n__true())) r2: if(true(),X,Y) -> X r3: if(false(),X,Y) -> activate(Y) r4: f(X) -> n__f(X) r5: true() -> n__true() r6: activate(n__f(X)) -> f(activate(X)) r7: activate(n__true()) -> true() r8: activate(X) -> X The set of usable rules consists of (no rules) Take the monotone reduction pair: weighted path order base order: max/plus interpretations on natural numbers: activate#_A(x1) = x1 + 2 n__f_A(x1) = x1 + 2 precedence: activate# = n__f partial status: pi(activate#) = [1] pi(n__f) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.