YES We show the termination of the relative TRS R/S: 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)) S: cons(x,cons(y,l)) -> cons(y,cons(x,l)) -- SCC decomposition. Consider the non-minimal 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)) r9: cons(x,cons(y,l)) -> cons(y,cons(x,l)) The estimated dependency graph contains the following SCCs: {p2, p4, p6} {p1} {p7} -- Reduction pair. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: sum#(app(l,cons(x,cons(y,k)))) -> sum#(cons(x,cons(y,k))) p2: sum#(app(l,cons(x,cons(y,k)))) -> sum#(app(l,sum(cons(x,cons(y,k))))) p3: 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)) r9: cons(x,cons(y,l)) -> cons(y,cons(x,l)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: sum#_A(x1) = max{5, x1 + 4} app_A(x1,x2) = max{72, x1 + 29, x2 + 12} cons_A(x1,x2) = 4 sum_A(x1) = 32 plus_A(x1,x2) = max{x1 + 28, x2 + 3} nil_A = 3 |0|_A = 0 s_A(x1) = max{29, x1} precedence: app > sum > cons > plus = nil = s > sum# = |0| partial status: pi(sum#) = [1] pi(app) = [] pi(cons) = [] pi(sum) = [] pi(plus) = [2] pi(nil) = [] pi(|0|) = [] pi(s) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: sum#_A(x1) = max{6, x1 - 13} app_A(x1,x2) = 0 cons_A(x1,x2) = 8 sum_A(x1) = 9 plus_A(x1,x2) = 78 nil_A = 0 |0|_A = 0 s_A(x1) = 5 precedence: sum# = app = cons = sum = plus = nil = |0| = s partial status: pi(sum#) = [] pi(app) = [] pi(cons) = [] pi(sum) = [] pi(plus) = [] pi(nil) = [] pi(|0|) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the non-minimal 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))))) p2: 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)) r9: cons(x,cons(y,l)) -> cons(y,cons(x,l)) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the non-minimal 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))))) p2: 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)) r9: cons(x,cons(y,l)) -> cons(y,cons(x,l)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: sum#_A(x1) = ((1,0),(0,0)) x1 + (2,14) app_A(x1,x2) = ((1,1),(1,1)) x1 + ((1,0),(1,1)) x2 + (4,3) cons_A(x1,x2) = ((1,0),(0,0)) x1 + x2 + (3,2) sum_A(x1) = ((1,0),(0,0)) x1 + (0,3) plus_A(x1,x2) = ((0,0),(1,0)) x1 + ((1,0),(1,1)) x2 + (2,0) nil_A() = (1,1) |0|_A() = (1,1) s_A(x1) = (1,1) precedence: sum# = cons = sum > app = nil = |0| > plus = s partial status: pi(sum#) = [] pi(app) = [2] pi(cons) = [] pi(sum) = [] pi(plus) = [2] pi(nil) = [] pi(|0|) = [] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: sum#_A(x1) = (0,1) app_A(x1,x2) = ((1,0),(1,1)) x2 + (1,3) cons_A(x1,x2) = (0,2) sum_A(x1) = (0,6) plus_A(x1,x2) = ((1,1),(1,1)) x2 + (2,7) nil_A() = (0,0) |0|_A() = (1,1) s_A(x1) = (1,1) precedence: plus > cons = sum = nil > sum# = app = |0| > s partial status: pi(sum#) = [] pi(app) = [2] pi(cons) = [] pi(sum) = [] pi(plus) = [] pi(nil) = [] pi(|0|) = [] pi(s) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the non-minimal 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)) r9: cons(x,cons(y,l)) -> cons(y,cons(x,l)) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the non-minimal 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)) r9: cons(x,cons(y,l)) -> cons(y,cons(x,l)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: sum#_A(x1) = x1 + (1,1) app_A(x1,x2) = ((1,1),(0,1)) x1 + x2 + (1,2) cons_A(x1,x2) = ((1,0),(1,0)) x1 + x2 + (0,1) sum_A(x1) = x1 nil_A() = (1,1) plus_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(1,1)) x2 + (0,3) |0|_A() = (1,1) s_A(x1) = (1,1) precedence: sum# = app = cons = sum = nil = plus = |0| = s partial status: pi(sum#) = [] pi(app) = [] pi(cons) = [] pi(sum) = [] pi(nil) = [] pi(plus) = [] pi(|0|) = [] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: sum#_A(x1) = ((0,1),(0,0)) x1 + (1,16) app_A(x1,x2) = x1 + ((1,0),(1,0)) x2 + (4,4) cons_A(x1,x2) = ((0,1),(1,0)) x2 + (3,8) sum_A(x1) = (5,17) nil_A() = (1,1) plus_A(x1,x2) = (4,12) |0|_A() = (1,1) s_A(x1) = (4,12) precedence: app = sum > plus = |0| = s > cons > nil > sum# partial status: pi(sum#) = [] pi(app) = [1] pi(cons) = [] pi(sum) = [] pi(nil) = [] pi(plus) = [] pi(|0|) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the non-minimal 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)) r9: cons(x,cons(y,l)) -> cons(y,cons(x,l)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: app#_A(x1,x2) = ((0,1),(0,0)) x1 + (1,0) cons_A(x1,x2) = ((0,0),(1,0)) x1 + ((0,0),(0,1)) x2 + (2,1) app_A(x1,x2) = ((1,1),(0,1)) x1 + x2 + (3,0) nil_A() = (1,1) sum_A(x1) = x1 plus_A(x1,x2) = ((1,0),(0,0)) x1 + x2 + (1,3) |0|_A() = (1,1) s_A(x1) = (2,1) precedence: |0| > app = sum > plus = s > nil > app# = cons partial status: pi(app#) = [] pi(cons) = [] pi(app) = [1, 2] pi(nil) = [] pi(sum) = [] pi(plus) = [2] pi(|0|) = [] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: standard order interpretations: app#_A(x1,x2) = (1,1) cons_A(x1,x2) = (3,1) app_A(x1,x2) = ((1,1),(0,1)) x1 + ((1,0),(1,1)) x2 + (4,2) nil_A() = (1,0) sum_A(x1) = (4,1) plus_A(x1,x2) = ((1,0),(1,1)) x2 + (2,2) |0|_A() = (1,1) s_A(x1) = (1,1) precedence: plus > |0| = s > cons = app > sum > app# = nil partial status: pi(app#) = [] pi(cons) = [] pi(app) = [1, 2] pi(nil) = [] pi(sum) = [] pi(plus) = [2] pi(|0|) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the non-minimal 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)) r9: cons(x,cons(y,l)) -> cons(y,cons(x,l)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: plus#_A(x1,x2) = max{1, x1} s_A(x1) = max{1, x1} app_A(x1,x2) = max{x1 + 9, x2 + 5} nil_A = 2 cons_A(x1,x2) = max{3, x2} sum_A(x1) = max{4, x1} plus_A(x1,x2) = max{x1 + 10, x2 + 10} |0|_A = 0 precedence: plus > plus# = s = nil > app = cons = sum = |0| partial status: pi(plus#) = [1] pi(s) = [1] pi(app) = [] pi(nil) = [] pi(cons) = [] pi(sum) = [] pi(plus) = [1] pi(|0|) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: plus#_A(x1,x2) = max{0, x1 - 2} s_A(x1) = max{21, x1 + 1} app_A(x1,x2) = 4 nil_A = 16 cons_A(x1,x2) = 4 sum_A(x1) = 1 plus_A(x1,x2) = x1 + 19 |0|_A = 0 precedence: nil > plus# = s = app = cons = sum = plus = |0| partial status: pi(plus#) = [] pi(s) = [] pi(app) = [] pi(nil) = [] pi(cons) = [] pi(sum) = [] pi(plus) = [1] pi(|0|) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.