YES We show the termination of the TRS R: app(app(plus(),|0|()),y) -> y app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) app(inc(),xs) -> app(app(map(),app(plus(),app(s(),|0|()))),xs) app(app(map(),f),nil()) -> nil() app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(plus(),app(s(),x)),y) -> app#(s(),app(app(plus(),x),y)) p2: app#(app(plus(),app(s(),x)),y) -> app#(app(plus(),x),y) p3: app#(app(plus(),app(s(),x)),y) -> app#(plus(),x) p4: app#(inc(),xs) -> app#(app(map(),app(plus(),app(s(),|0|()))),xs) p5: app#(inc(),xs) -> app#(map(),app(plus(),app(s(),|0|()))) p6: app#(inc(),xs) -> app#(plus(),app(s(),|0|())) p7: app#(inc(),xs) -> app#(s(),|0|()) p8: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(cons(),app(f,x)),app(app(map(),f),xs)) p9: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(cons(),app(f,x)) p10: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(f,x) p11: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) and R consists of: r1: app(app(plus(),|0|()),y) -> y r2: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) r3: app(inc(),xs) -> app(app(map(),app(plus(),app(s(),|0|()))),xs) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) The estimated dependency graph contains the following SCCs: {p4, p10, p11} {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(f,x) p2: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) p3: app#(inc(),xs) -> app#(app(map(),app(plus(),app(s(),|0|()))),xs) and R consists of: r1: app(app(plus(),|0|()),y) -> y r2: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) r3: app(inc(),xs) -> app(app(map(),app(plus(),app(s(),|0|()))),xs) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(1,1)) x2 app_A(x1,x2) = x1 + ((1,0),(1,1)) x2 + (1,1) map_A() = (0,0) cons_A() = (2,3) inc_A() = (7,22) plus_A() = (1,1) s_A() = (1,1) |0|_A() = (1,1) precedence: inc > s > app# = cons = plus = |0| > app > map partial status: pi(app#) = [2] pi(app) = [1, 2] pi(map) = [] pi(cons) = [] pi(inc) = [] pi(plus) = [] pi(s) = [] pi(|0|) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = x2 + (10,6) app_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (2,3) map_A() = (1,1) cons_A() = (7,2) inc_A() = (9,4) plus_A() = (1,5) s_A() = (0,7) |0|_A() = (0,1) precedence: app = map = s > |0| > app# > plus > inc > cons partial status: pi(app#) = [2] pi(app) = [] pi(map) = [] pi(cons) = [] pi(inc) = [] pi(plus) = [] pi(s) = [] pi(|0|) = [] The next rules are strictly ordered: p3 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(f,x) p2: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) and R consists of: r1: app(app(plus(),|0|()),y) -> y r2: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) r3: app(inc(),xs) -> app(app(map(),app(plus(),app(s(),|0|()))),xs) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(f,x) p2: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) and R consists of: r1: app(app(plus(),|0|()),y) -> y r2: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) r3: app(inc(),xs) -> app(app(map(),app(plus(),app(s(),|0|()))),xs) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = x2 + (5,1) app_A(x1,x2) = x1 + x2 + (2,2) map_A() = (1,2) cons_A() = (2,3) precedence: app# = app = map = cons partial status: pi(app#) = [2] pi(app) = [1, 2] pi(map) = [] pi(cons) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = x2 app_A(x1,x2) = ((1,0),(0,0)) x1 + x2 + (2,3) map_A() = (1,1) cons_A() = (2,2) precedence: app# = app = map > cons partial status: pi(app#) = [2] pi(app) = [] pi(map) = [] pi(cons) = [] The next rules are strictly ordered: p1, p2 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: app#(app(plus(),app(s(),x)),y) -> app#(app(plus(),x),y) and R consists of: r1: app(app(plus(),|0|()),y) -> y r2: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) r3: app(inc(),xs) -> app(app(map(),app(plus(),app(s(),|0|()))),xs) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = ((0,0),(1,0)) x1 + x2 + (4,1) app_A(x1,x2) = x2 + (3,8) plus_A() = (1,2) s_A() = (2,3) precedence: app# = app = plus = s partial status: pi(app#) = [] pi(app) = [] pi(plus) = [] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = x2 + (2,2) app_A(x1,x2) = (1,1) plus_A() = (0,0) s_A() = (0,0) precedence: app > app# = plus = s partial status: pi(app#) = [2] pi(app) = [] pi(plus) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.