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, r6, r7, r8 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: model-based reduction triple (=A, >=A!, >A!): finite algebra: carrier: {0,1} interpretations: sum#_A(0) = 0 sum#_A(1) = 0 app_A(0,0) = 0 app_A(0,1) = 0 app_A(1,0) = 0 app_A(1,1) = 1 cons_A(0,0) = 0 cons_A(0,1) = 0 cons_A(1,0) = 0 cons_A(1,1) = 0 sum_A(0) = 0 sum_A(1) = 1 nil_A = 1 plus_A(0,0) = 0 plus_A(0,1) = 1 plus_A(1,0) = 1 plus_A(1,1) = 0 |0|_A = 0 s_A(0) = 0 s_A(1) = 1 sum#!_A(0) = 0 sum#!_A(1) = 0 app!_A(0,0) = 1 app!_A(0,1) = 1 app!_A(1,0) = 1 app!_A(1,1) = 0 cons!_A(0,0) = 1 cons!_A(0,1) = 0 cons!_A(1,0) = 1 cons!_A(1,1) = 0 sum!_A(0) = 0 sum!_A(1) = 0 nil!_A = 1 plus!_A(0,0) = 1 plus!_A(0,1) = 1 plus!_A(1,0) = 1 plus!_A(1,1) = 1 |0|!_A = 1 s!_A(0) = 1 s!_A(1) = 1 partial status: pi(sum#) = [1] pi(app) = [1, 2] pi(cons) = [] pi(sum) = [] pi(nil) = [] 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: 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, r2, r3, r4, r5, r6, r7, r8 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: model-based reduction triple (=A, >=A!, >A!): finite algebra: carrier: {0,1} interpretations: app#_A(0,0) = 0 app#_A(0,1) = 0 app#_A(1,0) = 0 app#_A(1,1) = 0 cons_A(0,0) = 1 cons_A(0,1) = 0 cons_A(1,0) = 1 cons_A(1,1) = 0 app_A(0,0) = 0 app_A(0,1) = 1 app_A(1,0) = 1 app_A(1,1) = 0 nil_A = 0 sum_A(0) = 1 sum_A(1) = 1 plus_A(0,0) = 0 plus_A(0,1) = 1 plus_A(1,0) = 0 plus_A(1,1) = 1 |0|_A = 1 s_A(0) = 0 s_A(1) = 1 app#!_A(0,0) = 0 app#!_A(0,1) = 0 app#!_A(1,0) = 0 app#!_A(1,1) = 0 cons!_A(0,0) = 0 cons!_A(0,1) = 0 cons!_A(1,0) = 0 cons!_A(1,1) = 0 app!_A(0,0) = 1 app!_A(0,1) = 1 app!_A(1,0) = 1 app!_A(1,1) = 1 nil!_A = 0 sum!_A(0) = 1 sum!_A(1) = 1 plus!_A(0,0) = 0 plus!_A(0,1) = 0 plus!_A(1,0) = 0 plus!_A(1,1) = 0 |0|!_A = 1 s!_A(0) = 0 s!_A(1) = 0 partial status: pi(app#) = [1] pi(cons) = [2] pi(app) = [1, 2] pi(nil) = [] pi(sum) = [] pi(plus) = [1, 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: 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 r1, r2, r3, r4, r5, r6, r7, r8 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: model-based reduction triple (=A, >=A!, >A!): finite algebra: carrier: {0,1} interpretations: sum#_A(0) = 0 sum#_A(1) = 0 cons_A(0,0) = 0 cons_A(0,1) = 0 cons_A(1,0) = 0 cons_A(1,1) = 0 plus_A(0,0) = 1 plus_A(0,1) = 0 plus_A(1,0) = 0 plus_A(1,1) = 1 app_A(0,0) = 0 app_A(0,1) = 0 app_A(1,0) = 0 app_A(1,1) = 1 nil_A = 1 sum_A(0) = 0 sum_A(1) = 0 |0|_A = 1 s_A(0) = 1 s_A(1) = 0 sum#!_A(0) = 0 sum#!_A(1) = 0 cons!_A(0,0) = 0 cons!_A(0,1) = 0 cons!_A(1,0) = 0 cons!_A(1,1) = 0 plus!_A(0,0) = 0 plus!_A(0,1) = 0 plus!_A(1,0) = 0 plus!_A(1,1) = 0 app!_A(0,0) = 1 app!_A(0,1) = 1 app!_A(1,0) = 1 app!_A(1,1) = 1 nil!_A = 0 sum!_A(0) = 1 sum!_A(1) = 0 |0|!_A = 1 s!_A(0) = 0 s!_A(1) = 0 partial status: pi(sum#) = [1] pi(cons) = [2] pi(plus) = [2] pi(app) = [1, 2] pi(nil) = [] pi(sum) = [] 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, r2, r3, r4, r5, r6, r7, r8 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: model-based reduction triple (=A, >=A!, >A!): finite algebra: carrier: {0,1} interpretations: plus#_A(0,0) = 0 plus#_A(0,1) = 0 plus#_A(1,0) = 0 plus#_A(1,1) = 0 s_A(0) = 1 s_A(1) = 1 app_A(0,0) = 0 app_A(0,1) = 1 app_A(1,0) = 1 app_A(1,1) = 1 nil_A = 0 cons_A(0,0) = 1 cons_A(0,1) = 1 cons_A(1,0) = 1 cons_A(1,1) = 1 sum_A(0) = 1 sum_A(1) = 1 plus_A(0,0) = 0 plus_A(0,1) = 1 plus_A(1,0) = 1 plus_A(1,1) = 1 |0|_A = 0 plus#!_A(0,0) = 0 plus#!_A(0,1) = 0 plus#!_A(1,0) = 0 plus#!_A(1,1) = 0 s!_A(0) = 0 s!_A(1) = 0 app!_A(0,0) = 1 app!_A(0,1) = 0 app!_A(1,0) = 1 app!_A(1,1) = 1 nil!_A = 1 cons!_A(0,0) = 0 cons!_A(0,1) = 1 cons!_A(1,0) = 0 cons!_A(1,1) = 1 sum!_A(0) = 1 sum!_A(1) = 0 plus!_A(0,0) = 0 plus!_A(0,1) = 0 plus!_A(1,0) = 1 plus!_A(1,1) = 1 |0|!_A = 1 partial status: pi(plus#) = [1] pi(s) = [1] pi(app) = [1, 2] pi(nil) = [] pi(cons) = [] pi(sum) = [] pi(plus) = [1, 2] pi(|0|) = [] The following rules are removed: p1 Then no dependency pair remains.