YES We show the termination of the TRS R: first(|0|(),X) -> nil() first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) from(X) -> cons(X,n__from(s(X))) first(X1,X2) -> n__first(X1,X2) from(X) -> n__from(X) activate(n__first(X1,X2)) -> first(X1,X2) activate(n__from(X)) -> from(X) activate(X) -> X -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: first#(s(X),cons(Y,Z)) -> activate#(Z) p2: activate#(n__first(X1,X2)) -> first#(X1,X2) p3: activate#(n__from(X)) -> from#(X) and R consists of: r1: first(|0|(),X) -> nil() r2: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r3: from(X) -> cons(X,n__from(s(X))) r4: first(X1,X2) -> n__first(X1,X2) r5: from(X) -> n__from(X) r6: activate(n__first(X1,X2)) -> first(X1,X2) r7: activate(n__from(X)) -> from(X) r8: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: first#(s(X),cons(Y,Z)) -> activate#(Z) p2: activate#(n__first(X1,X2)) -> first#(X1,X2) and R consists of: r1: first(|0|(),X) -> nil() r2: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r3: from(X) -> cons(X,n__from(s(X))) r4: first(X1,X2) -> n__first(X1,X2) r5: from(X) -> n__from(X) r6: activate(n__first(X1,X2)) -> first(X1,X2) r7: activate(n__from(X)) -> from(X) r8: activate(X) -> X The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: first#_A(x1,x2) = max{5, x1 - 1, x2 + 3} s_A(x1) = x1 cons_A(x1,x2) = max{x1 - 1, x2 + 3} activate#_A(x1) = x1 + 5 n__first_A(x1,x2) = max{x1 - 6, x2} precedence: first# = s = cons = activate# = n__first partial status: pi(first#) = [] pi(s) = [1] pi(cons) = [2] pi(activate#) = [1] pi(n__first) = [2] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__first(X1,X2)) -> first#(X1,X2) and R consists of: r1: first(|0|(),X) -> nil() r2: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r3: from(X) -> cons(X,n__from(s(X))) r4: first(X1,X2) -> n__first(X1,X2) r5: from(X) -> n__from(X) r6: activate(n__first(X1,X2)) -> first(X1,X2) r7: activate(n__from(X)) -> from(X) r8: activate(X) -> X The estimated dependency graph contains the following SCCs: (no SCCs)