YES We show the termination of the TRS R: app(app(plus(),|0|()),y) -> y app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) app(app(sumwith(),f),nil()) -> nil() app(app(sumwith(),f),app(app(cons(),x),xs)) -> app(app(plus(),app(f,x)),app(app(sumwith(),f),xs)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(plus(),app(s(),x)),y) -> app#(s(),app(app(plus(),x),y)) p2: app#(app(plus(),app(s(),x)),y) -> app#(app(plus(),x),y) p3: app#(app(plus(),app(s(),x)),y) -> app#(plus(),x) p4: app#(app(sumwith(),f),app(app(cons(),x),xs)) -> app#(app(plus(),app(f,x)),app(app(sumwith(),f),xs)) p5: app#(app(sumwith(),f),app(app(cons(),x),xs)) -> app#(plus(),app(f,x)) p6: app#(app(sumwith(),f),app(app(cons(),x),xs)) -> app#(f,x) p7: app#(app(sumwith(),f),app(app(cons(),x),xs)) -> app#(app(sumwith(),f),xs) and R consists of: r1: app(app(plus(),|0|()),y) -> y r2: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) r3: app(app(sumwith(),f),nil()) -> nil() r4: app(app(sumwith(),f),app(app(cons(),x),xs)) -> app(app(plus(),app(f,x)),app(app(sumwith(),f),xs)) The estimated dependency graph contains the following SCCs: {p6, p7} {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(sumwith(),f),app(app(cons(),x),xs)) -> app#(f,x) p2: app#(app(sumwith(),f),app(app(cons(),x),xs)) -> app#(app(sumwith(),f),xs) and R consists of: r1: app(app(plus(),|0|()),y) -> y r2: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) r3: app(app(sumwith(),f),nil()) -> nil() r4: app(app(sumwith(),f),app(app(cons(),x),xs)) -> app(app(plus(),app(f,x)),app(app(sumwith(),f),xs)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{x1 + 10, x2 + 6} app_A(x1,x2) = max{x1 + 3, x2 + 6} sumwith_A = 3 cons_A = 4 precedence: app# = app = sumwith = cons partial status: pi(app#) = [1, 2] pi(app) = [1, 2] pi(sumwith) = [] pi(cons) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{0, x2 - 4} app_A(x1,x2) = max{x1 + 6, x2 + 3} sumwith_A = 2 cons_A = 3 precedence: app# = app = sumwith = cons partial status: pi(app#) = [] pi(app) = [1, 2] pi(sumwith) = [] pi(cons) = [] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(plus(),app(s(),x)),y) -> app#(app(plus(),x),y) and R consists of: r1: app(app(plus(),|0|()),y) -> y r2: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) r3: app(app(sumwith(),f),nil()) -> nil() r4: app(app(sumwith(),f),app(app(cons(),x),xs)) -> app(app(plus(),app(f,x)),app(app(sumwith(),f),xs)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{x1 + 2, x2 + 3} app_A(x1,x2) = max{x1, x2 + 3} plus_A = 2 s_A = 3 precedence: app# = app = plus = s partial status: pi(app#) = [1, 2] pi(app) = [1, 2] pi(plus) = [] pi(s) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{x1 - 9, x2 + 3} app_A(x1,x2) = max{x1 + 2, x2 + 4} plus_A = 2 s_A = 6 precedence: app# = app = plus = s partial status: pi(app#) = [] pi(app) = [1, 2] pi(plus) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.