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: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: f#_A(x1) = ((1,0),(0,0)) x1 + (9,4) if#_A(x1,x2,x3) = x1 + x3 + (1,2) c_A() = (0,1) n__f_A(x1) = x1 + (7,0) n__true_A() = (0,1) false_A() = (4,4) activate#_A(x1) = x1 + (5,5) activate_A(x1) = ((1,0),(1,0)) x1 + (2,3) if_A(x1,x2,x3) = ((1,0),(0,0)) x1 + x2 + ((1,0),(0,0)) x3 + (0,4) true_A() = (1,2) f_A(x1) = x1 + (7,6) precedence: activate# > f# > if# > false = if > activate > n__true = f > n__f > c = true partial status: pi(f#) = [] pi(if#) = [] pi(c) = [] pi(n__f) = [1] pi(n__true) = [] pi(false) = [] pi(activate#) = [1] pi(activate) = [] pi(if) = [2] pi(true) = [] pi(f) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: f#_A(x1) = (10,6) if#_A(x1,x2,x3) = (9,1) c_A() = (1,1) n__f_A(x1) = (5,5) n__true_A() = (1,2) false_A() = (9,3) activate#_A(x1) = ((0,0),(1,0)) x1 + (8,0) activate_A(x1) = (7,4) if_A(x1,x2,x3) = (0,0) true_A() = (2,1) f_A(x1) = (6,3) precedence: if > f# = c > if# = activate > activate# = true > f > false > n__f = n__true partial status: pi(f#) = [] pi(if#) = [] 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: p3, p4 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: if#(false(),X,Y) -> activate#(Y) 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: (no SCCs)