YES We show the termination of the TRS R: app(nil(),k) -> k app(l,nil()) -> l app(cons(x,l),k) -> cons(x,app(l,k)) sum(cons(x,nil())) -> cons(x,nil()) sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) plus(|0|(),y) -> y plus(s(x),y) -> s(plus(x,y)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(cons(x,l),k) -> app#(l,k) p2: sum#(cons(x,cons(y,l))) -> sum#(cons(plus(x,y),l)) p3: sum#(cons(x,cons(y,l))) -> plus#(x,y) p4: sum#(app(l,cons(x,cons(y,k)))) -> sum#(app(l,sum(cons(x,cons(y,k))))) p5: sum#(app(l,cons(x,cons(y,k)))) -> app#(l,sum(cons(x,cons(y,k)))) p6: sum#(app(l,cons(x,cons(y,k)))) -> sum#(cons(x,cons(y,k))) p7: plus#(s(x),y) -> plus#(x,y) and R consists of: r1: app(nil(),k) -> k r2: app(l,nil()) -> l r3: app(cons(x,l),k) -> cons(x,app(l,k)) r4: sum(cons(x,nil())) -> cons(x,nil()) r5: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r6: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r7: plus(|0|(),y) -> y r8: plus(s(x),y) -> s(plus(x,y)) The estimated dependency graph contains the following SCCs: {p4} {p1} {p2} {p7} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: sum#(app(l,cons(x,cons(y,k)))) -> sum#(app(l,sum(cons(x,cons(y,k))))) and R consists of: r1: app(nil(),k) -> k r2: app(l,nil()) -> l r3: app(cons(x,l),k) -> cons(x,app(l,k)) r4: sum(cons(x,nil())) -> cons(x,nil()) r5: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r6: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r7: plus(|0|(),y) -> y r8: plus(s(x),y) -> s(plus(x,y)) The set of usable rules consists of r1, r2, r3, r4, r5 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: sum#_A(x1) = 2 app_A(x1,x2) = max{x1 + 11, x2 + 3} cons_A(x1,x2) = max{12, x2} sum_A(x1) = x1 + 4 nil_A = 1 plus_A(x1,x2) = max{x1 - 3, x2 + 11} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: sum#_A(x1) = 0 app_A(x1,x2) = x1 + x2 + 1 cons_A(x1,x2) = x2 + 2 sum_A(x1) = 3 nil_A() = 1 plus_A(x1,x2) = x2 + 1 sum#!_A(x1) = x1 app!_A(x1,x2) = 7 cons!_A(x1,x2) = 6 sum!_A(x1) = 8 nil!_A() = 0 plus!_A(x1,x2) = 9 partial status: pi(sum#) = [] pi(app) = [1, 2] pi(cons) = [2] pi(sum) = [] pi(nil) = [] pi(plus) = [2] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(cons(x,l),k) -> app#(l,k) and R consists of: r1: app(nil(),k) -> k r2: app(l,nil()) -> l r3: app(cons(x,l),k) -> cons(x,app(l,k)) r4: sum(cons(x,nil())) -> cons(x,nil()) r5: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r6: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r7: plus(|0|(),y) -> y r8: plus(s(x),y) -> s(plus(x,y)) The set of usable rules consists of r1 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = max{6, x2 - 1} cons_A(x1,x2) = max{5, x1 - 28, x2 - 21} app_A(x1,x2) = max{x1 - 27, x2 + 35} nil_A = 26 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: app#_A(x1,x2) = x1 cons_A(x1,x2) = x1 + x2 + 1 app_A(x1,x2) = x1 + x2 + 1 nil_A() = 5 app#!_A(x1,x2) = x1 + 6 cons!_A(x1,x2) = 5 app!_A(x1,x2) = 6 nil!_A() = 5 partial status: pi(app#) = [] pi(cons) = [] pi(app) = [] pi(nil) = [] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: sum#(cons(x,cons(y,l))) -> sum#(cons(plus(x,y),l)) and R consists of: r1: app(nil(),k) -> k r2: app(l,nil()) -> l r3: app(cons(x,l),k) -> cons(x,app(l,k)) r4: sum(cons(x,nil())) -> cons(x,nil()) r5: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r6: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r7: plus(|0|(),y) -> y r8: plus(s(x),y) -> s(plus(x,y)) The set of usable rules consists of r7, r8 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: sum#_A(x1) = max{2, x1 - 12} cons_A(x1,x2) = max{10, x1 + 5, x2 + 5} plus_A(x1,x2) = max{4, x1 - 10, x2 + 1} |0|_A = 0 s_A(x1) = max{2, x1 - 11} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: sum#_A(x1) = x1 cons_A(x1,x2) = x1 + x2 + 3 plus_A(x1,x2) = x1 + x2 + 2 |0|_A() = 1 s_A(x1) = 1 sum#!_A(x1) = 3 cons!_A(x1,x2) = x1 + 2 plus!_A(x1,x2) = 4 |0|!_A() = 0 s!_A(x1) = 0 partial status: pi(sum#) = [] pi(cons) = [1] pi(plus) = [2] pi(|0|) = [] pi(s) = [] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: plus#(s(x),y) -> plus#(x,y) and R consists of: r1: app(nil(),k) -> k r2: app(l,nil()) -> l r3: app(cons(x,l),k) -> cons(x,app(l,k)) r4: sum(cons(x,nil())) -> cons(x,nil()) r5: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r6: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r7: plus(|0|(),y) -> y r8: plus(s(x),y) -> s(plus(x,y)) The set of usable rules consists of r1, r4 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{2, x2 - 1} s_A(x1) = max{1, x1 - 4} app_A(x1,x2) = max{1, x1 - 3, x2} nil_A = 7 sum_A(x1) = max{6, x1 + 3} cons_A(x1,x2) = max{x1 - 6, x2} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: plus#_A(x1,x2) = x1 s_A(x1) = x1 + 1 app_A(x1,x2) = x1 + x2 + 1 nil_A() = 1 sum_A(x1) = x1 + 1 cons_A(x1,x2) = x1 + x2 + 1 plus#!_A(x1,x2) = x1 + 8 s!_A(x1) = x1 + 7 app!_A(x1,x2) = x2 nil!_A() = 6 sum!_A(x1) = 7 cons!_A(x1,x2) = x1 + x2 + 4 partial status: pi(plus#) = [] pi(s) = [] pi(app) = [2] pi(nil) = [] pi(sum) = [] pi(cons) = [2] The following rules are removed: p1 Then no dependency pair remains.