YES We show the termination of the TRS R: sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y)) sum(cons(|0|(),x),y) -> sum(x,y) sum(nil(),y) -> y weight(cons(n,cons(m,x))) -> weight(sum(cons(n,cons(m,x)),cons(|0|(),x))) weight(cons(n,nil())) -> n -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: sum#(cons(s(n),x),cons(m,y)) -> sum#(cons(n,x),cons(s(m),y)) p2: sum#(cons(|0|(),x),y) -> sum#(x,y) p3: weight#(cons(n,cons(m,x))) -> weight#(sum(cons(n,cons(m,x)),cons(|0|(),x))) p4: weight#(cons(n,cons(m,x))) -> sum#(cons(n,cons(m,x)),cons(|0|(),x)) and R consists of: r1: sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y)) r2: sum(cons(|0|(),x),y) -> sum(x,y) r3: sum(nil(),y) -> y r4: weight(cons(n,cons(m,x))) -> weight(sum(cons(n,cons(m,x)),cons(|0|(),x))) r5: weight(cons(n,nil())) -> n The estimated dependency graph contains the following SCCs: {p3} {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: weight#(cons(n,cons(m,x))) -> weight#(sum(cons(n,cons(m,x)),cons(|0|(),x))) and R consists of: r1: sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y)) r2: sum(cons(|0|(),x),y) -> sum(x,y) r3: sum(nil(),y) -> y r4: weight(cons(n,cons(m,x))) -> weight(sum(cons(n,cons(m,x)),cons(|0|(),x))) r5: weight(cons(n,nil())) -> n The set of usable rules consists of r1, r2, r3 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: weight#_A(x1) = x1 + 28 cons_A(x1,x2) = max{x1 - 4, x2 + 11} sum_A(x1,x2) = max{22, x1, x2 + 1} |0|_A = 6 nil_A = 0 s_A(x1) = max{13, x1} precedence: weight# = cons = sum = |0| = nil = s partial status: pi(weight#) = [1] pi(cons) = [2] pi(sum) = [] pi(|0|) = [] pi(nil) = [] pi(s) = [] The next rules are strictly ordered: p1 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: sum#(cons(s(n),x),cons(m,y)) -> sum#(cons(n,x),cons(s(m),y)) p2: sum#(cons(|0|(),x),y) -> sum#(x,y) and R consists of: r1: sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y)) r2: sum(cons(|0|(),x),y) -> sum(x,y) r3: sum(nil(),y) -> y r4: weight(cons(n,cons(m,x))) -> weight(sum(cons(n,cons(m,x)),cons(|0|(),x))) r5: weight(cons(n,nil())) -> n The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: sum#_A(x1,x2) = max{24, x1 + 6, x2 + 10} cons_A(x1,x2) = max{x1 + 1, x2 + 14} s_A(x1) = max{8, x1} |0|_A = 0 precedence: sum# = cons = s = |0| partial status: pi(sum#) = [1, 2] pi(cons) = [] pi(s) = [1] pi(|0|) = [] 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: sum#(cons(s(n),x),cons(m,y)) -> sum#(cons(n,x),cons(s(m),y)) and R consists of: r1: sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y)) r2: sum(cons(|0|(),x),y) -> sum(x,y) r3: sum(nil(),y) -> y r4: weight(cons(n,cons(m,x))) -> weight(sum(cons(n,cons(m,x)),cons(|0|(),x))) r5: weight(cons(n,nil())) -> n The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: sum#(cons(s(n),x),cons(m,y)) -> sum#(cons(n,x),cons(s(m),y)) and R consists of: r1: sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y)) r2: sum(cons(|0|(),x),y) -> sum(x,y) r3: sum(nil(),y) -> y r4: weight(cons(n,cons(m,x))) -> weight(sum(cons(n,cons(m,x)),cons(|0|(),x))) r5: weight(cons(n,nil())) -> n The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: sum#_A(x1,x2) = max{0, x1 - 6} cons_A(x1,x2) = max{8, x1 + 4} s_A(x1) = max{9, x1 + 5} precedence: s > sum# = cons partial status: pi(sum#) = [] pi(cons) = [1] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.