YES We show the termination of the TRS R: 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)) app(sum(),app(app(cons(),x),xs)) -> app(app(plus(),x),app(sum(),xs)) app(size(),app(app(node(),x),xs)) -> app(s(),app(sum(),app(app(map(),size()),xs))) app(app(plus(),|0|()),x) -> |0|() app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(cons(),app(f,x)),app(app(map(),f),xs)) p2: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(cons(),app(f,x)) p3: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(f,x) p4: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) p5: app#(sum(),app(app(cons(),x),xs)) -> app#(app(plus(),x),app(sum(),xs)) p6: app#(sum(),app(app(cons(),x),xs)) -> app#(plus(),x) p7: app#(sum(),app(app(cons(),x),xs)) -> app#(sum(),xs) p8: app#(size(),app(app(node(),x),xs)) -> app#(s(),app(sum(),app(app(map(),size()),xs))) p9: app#(size(),app(app(node(),x),xs)) -> app#(sum(),app(app(map(),size()),xs)) p10: app#(size(),app(app(node(),x),xs)) -> app#(app(map(),size()),xs) p11: app#(size(),app(app(node(),x),xs)) -> app#(map(),size()) p12: app#(app(plus(),app(s(),x)),y) -> app#(s(),app(app(plus(),x),y)) p13: app#(app(plus(),app(s(),x)),y) -> app#(app(plus(),x),y) p14: app#(app(plus(),app(s(),x)),y) -> app#(plus(),x) and R consists of: r1: app(app(map(),f),nil()) -> nil() r2: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r3: app(sum(),app(app(cons(),x),xs)) -> app(app(plus(),x),app(sum(),xs)) r4: app(size(),app(app(node(),x),xs)) -> app(s(),app(sum(),app(app(map(),size()),xs))) r5: app(app(plus(),|0|()),x) -> |0|() r6: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) The estimated dependency graph contains the following SCCs: {p3, p4, p10} {p7} {p13} -- 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#(size(),app(app(node(),x),xs)) -> app#(app(map(),size()),xs) p3: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) and R consists of: r1: app(app(map(),f),nil()) -> nil() r2: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r3: app(sum(),app(app(cons(),x),xs)) -> app(app(plus(),x),app(sum(),xs)) r4: app(size(),app(app(node(),x),xs)) -> app(s(),app(sum(),app(app(map(),size()),xs))) r5: app(app(plus(),|0|()),x) -> |0|() r6: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{1, x1 - 12, x2 - 16} app_A(x1,x2) = max{26, x1 + 13, x2 + 18} map_A = 4 cons_A = 5 size_A = 3 node_A = 13 precedence: app# = app = map > cons = size = node partial status: pi(app#) = [] pi(app) = [1, 2] pi(map) = [] pi(cons) = [] pi(size) = [] pi(node) = [] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(size(),app(app(node(),x),xs)) -> app#(app(map(),size()),xs) p2: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) and R consists of: r1: app(app(map(),f),nil()) -> nil() r2: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r3: app(sum(),app(app(cons(),x),xs)) -> app(app(plus(),x),app(sum(),xs)) r4: app(size(),app(app(node(),x),xs)) -> app(s(),app(sum(),app(app(map(),size()),xs))) r5: app(app(plus(),|0|()),x) -> |0|() r6: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) The estimated dependency graph contains the following SCCs: {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#(app(map(),f),xs) and R consists of: r1: app(app(map(),f),nil()) -> nil() r2: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r3: app(sum(),app(app(cons(),x),xs)) -> app(app(plus(),x),app(sum(),xs)) r4: app(size(),app(app(node(),x),xs)) -> app(s(),app(sum(),app(app(map(),size()),xs))) r5: app(app(plus(),|0|()),x) -> |0|() r6: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{0, x2 - 5} app_A(x1,x2) = max{x1 + 7, x2 + 4} map_A = 3 cons_A = 4 precedence: app# = app = map = cons partial status: pi(app#) = [] pi(app) = [1, 2] pi(map) = [] pi(cons) = [] The next rules are strictly ordered: p1 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#(sum(),app(app(cons(),x),xs)) -> app#(sum(),xs) and R consists of: r1: app(app(map(),f),nil()) -> nil() r2: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r3: app(sum(),app(app(cons(),x),xs)) -> app(app(plus(),x),app(sum(),xs)) r4: app(size(),app(app(node(),x),xs)) -> app(s(),app(sum(),app(app(map(),size()),xs))) r5: app(app(plus(),|0|()),x) -> |0|() r6: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{x1 + 4, x2 + 7} sum_A = 1 app_A(x1,x2) = max{x1 + 2, x2 + 2} cons_A = 0 precedence: app# = sum = app = cons partial status: pi(app#) = [] pi(sum) = [] pi(app) = [2] pi(cons) = [] The next rules are strictly ordered: p1 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(map(),f),nil()) -> nil() r2: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r3: app(sum(),app(app(cons(),x),xs)) -> app(app(plus(),x),app(sum(),xs)) r4: app(size(),app(app(node(),x),xs)) -> app(s(),app(sum(),app(app(map(),size()),xs))) r5: app(app(plus(),|0|()),x) -> |0|() r6: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{0, x1 - 9} app_A(x1,x2) = max{x1 + 2, x2 + 4} plus_A = 2 s_A = 6 precedence: app# = app = plus = s partial status: pi(app#) = [] pi(app) = [1, 2] pi(plus) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.