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)) sum(plus(cons(|0|(),x),cons(y,l))) -> pred(sum(cons(s(x),cons(y,l)))) pred(cons(s(x),nil())) -> cons(x,nil()) 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) p8: sum#(plus(cons(|0|(),x),cons(y,l))) -> pred#(sum(cons(s(x),cons(y,l)))) p9: sum#(plus(cons(|0|(),x),cons(y,l))) -> sum#(cons(s(x),cons(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: sum(plus(cons(|0|(),x),cons(y,l))) -> pred(sum(cons(s(x),cons(y,l)))) r10: pred(cons(s(x),nil())) -> cons(x,nil()) r11: cons(x,cons(y,l)) -> cons(y,cons(x,l)) The estimated dependency graph contains the following SCCs: {p2, p4, p6, p9} {p1} {p7} -- Reduction pair. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: sum#(plus(cons(|0|(),x),cons(y,l))) -> sum#(cons(s(x),cons(y,l))) p2: sum#(app(l,cons(x,cons(y,k)))) -> sum#(cons(x,cons(y,k))) p3: sum#(app(l,cons(x,cons(y,k)))) -> sum#(app(l,sum(cons(x,cons(y,k))))) p4: 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: sum(plus(cons(|0|(),x),cons(y,l))) -> pred(sum(cons(s(x),cons(y,l)))) r10: pred(cons(s(x),nil())) -> cons(x,nil()) r11: 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, r10, r11 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: sum#_A(x1) = ((1,0),(1,0)) x1 + (0,1) plus_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(1,1)) x2 + (9,8) cons_A(x1,x2) = ((1,0),(0,0)) x2 + (4,19) |0|_A() = (7,21) s_A(x1) = x1 + (18,55) app_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(1,1)) x2 + (42,20) sum_A(x1) = ((1,0),(0,0)) x1 + (0,22) nil_A() = (1,1) pred_A(x1) = (6,20) precedence: sum# = plus = cons = |0| = s = app = sum = nil = pred partial status: pi(sum#) = [] pi(plus) = [2] pi(cons) = [] pi(|0|) = [] pi(s) = [] pi(app) = [1, 2] pi(sum) = [] pi(nil) = [] pi(pred) = [] 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#(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: sum(plus(cons(|0|(),x),cons(y,l))) -> pred(sum(cons(s(x),cons(y,l)))) r10: pred(cons(s(x),nil())) -> cons(x,nil()) r11: cons(x,cons(y,l)) -> cons(y,cons(x,l)) The estimated dependency graph contains the following SCCs: {p1, p2, p3} -- 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#(cons(x,cons(y,l))) -> sum#(cons(plus(x,y),l)) p3: 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: sum(plus(cons(|0|(),x),cons(y,l))) -> pred(sum(cons(s(x),cons(y,l)))) r10: pred(cons(s(x),nil())) -> cons(x,nil()) r11: 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, r10, r11 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: sum#_A(x1) = ((1,0),(0,0)) x1 + (1,8) app_A(x1,x2) = x1 + x2 + (2,4) cons_A(x1,x2) = ((0,0),(1,0)) x2 + (1,2) plus_A(x1,x2) = ((1,0),(0,0)) x2 + (3,9) sum_A(x1) = (1,6) nil_A() = (2,7) |0|_A() = (0,7) s_A(x1) = ((1,0),(0,0)) x1 + (0,1) pred_A(x1) = (1,5) precedence: app = plus > |0| > sum# = cons = sum = nil = s = pred partial status: pi(sum#) = [] pi(app) = [] pi(cons) = [] pi(plus) = [] pi(sum) = [] pi(nil) = [] pi(|0|) = [] pi(s) = [] pi(pred) = [] 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#(cons(x,cons(y,l))) -> sum#(cons(plus(x,y),l)) p2: 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: sum(plus(cons(|0|(),x),cons(y,l))) -> pred(sum(cons(s(x),cons(y,l)))) r10: pred(cons(s(x),nil())) -> cons(x,nil()) r11: 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#(cons(x,cons(y,l))) -> sum#(cons(plus(x,y),l)) p2: 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: sum(plus(cons(|0|(),x),cons(y,l))) -> pred(sum(cons(s(x),cons(y,l)))) r10: pred(cons(s(x),nil())) -> cons(x,nil()) r11: 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, r10, r11 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: sum#_A(x1) = ((1,0),(0,0)) x1 + (0,10) cons_A(x1,x2) = ((1,0),(1,0)) x2 + (4,7) plus_A(x1,x2) = x2 + (9,12) app_A(x1,x2) = x1 + ((1,0),(1,1)) x2 + (5,6) sum_A(x1) = ((1,0),(0,0)) x1 + (0,9) nil_A() = (1,10) |0|_A() = (7,8) s_A(x1) = (2,6) pred_A(x1) = x1 + (0,11) precedence: sum# = cons = app = sum > plus = nil = |0| = s > pred partial status: pi(sum#) = [] pi(cons) = [] pi(plus) = [2] pi(app) = [1] pi(sum) = [] pi(nil) = [] pi(|0|) = [] pi(s) = [] pi(pred) = [] 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))))) 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: sum(plus(cons(|0|(),x),cons(y,l))) -> pred(sum(cons(s(x),cons(y,l)))) r10: pred(cons(s(x),nil())) -> cons(x,nil()) r11: 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: sum(plus(cons(|0|(),x),cons(y,l))) -> pred(sum(cons(s(x),cons(y,l)))) r10: pred(cons(s(x),nil())) -> cons(x,nil()) r11: 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, r10, r11 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: sum#_A(x1) = x1 app_A(x1,x2) = x1 + x2 + (3,0) cons_A(x1,x2) = x2 + (2,4) sum_A(x1) = ((1,0),(0,0)) x1 + (0,8) nil_A() = (2,2) plus_A(x1,x2) = x2 + (5,9) |0|_A() = (8,9) s_A(x1) = (3,5) pred_A(x1) = (7,7) precedence: app > cons = sum = plus = pred > sum# = nil = |0| = s partial status: pi(sum#) = [1] pi(app) = [2] pi(cons) = [2] pi(sum) = [] pi(nil) = [] pi(plus) = [2] pi(|0|) = [] pi(s) = [] pi(pred) = [] 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: sum(plus(cons(|0|(),x),cons(y,l))) -> pred(sum(cons(s(x),cons(y,l)))) r10: pred(cons(s(x),nil())) -> cons(x,nil()) r11: 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, r10, r11 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = ((1,0),(1,1)) x1 + (1,5) cons_A(x1,x2) = ((1,0),(1,0)) x2 + (4,4) app_A(x1,x2) = x1 + ((1,0),(1,1)) x2 + (5,6) nil_A() = (0,1) sum_A(x1) = (9,6) plus_A(x1,x2) = x2 + (10,9) |0|_A() = (2,3) s_A(x1) = (1,2) pred_A(x1) = (5,5) precedence: app = nil > app# = cons = sum = plus = |0| = s = pred partial status: pi(app#) = [1] pi(cons) = [] pi(app) = [1] pi(nil) = [] pi(sum) = [] pi(plus) = [2] pi(|0|) = [] pi(s) = [] pi(pred) = [] 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: sum(plus(cons(|0|(),x),cons(y,l))) -> pred(sum(cons(s(x),cons(y,l)))) r10: pred(cons(s(x),nil())) -> cons(x,nil()) r11: 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, r10, r11 Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: plus#_A(x1,x2) = ((1,0),(1,1)) x1 + (0,1) s_A(x1) = x1 + (1,19) app_A(x1,x2) = ((1,0),(1,1)) x1 + x2 + (11,14) nil_A() = (1,13) cons_A(x1,x2) = ((1,0),(0,0)) x2 + (10,6) sum_A(x1) = ((0,0),(1,0)) x1 + (12,1) plus_A(x1,x2) = x1 + ((1,0),(0,0)) x2 + (9,22) |0|_A() = (0,20) pred_A(x1) = x1 + (0,8) precedence: s = nil = plus > plus# = pred > app = cons = sum = |0| partial status: pi(plus#) = [1] pi(s) = [] pi(app) = [1, 2] pi(nil) = [] pi(cons) = [] pi(sum) = [] pi(plus) = [] pi(|0|) = [] pi(pred) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.