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(app(treemap(),f),app(app(node(),x),xs)) -> app(app(node(),app(f,x)),app(app(map(),app(treemap(),f)),xs)) -- 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#(app(treemap(),f),app(app(node(),x),xs)) -> app#(app(node(),app(f,x)),app(app(map(),app(treemap(),f)),xs)) p6: app#(app(treemap(),f),app(app(node(),x),xs)) -> app#(node(),app(f,x)) p7: app#(app(treemap(),f),app(app(node(),x),xs)) -> app#(f,x) p8: app#(app(treemap(),f),app(app(node(),x),xs)) -> app#(app(map(),app(treemap(),f)),xs) p9: app#(app(treemap(),f),app(app(node(),x),xs)) -> app#(map(),app(treemap(),f)) 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(app(treemap(),f),app(app(node(),x),xs)) -> app(app(node(),app(f,x)),app(app(map(),app(treemap(),f)),xs)) The estimated dependency graph contains the following SCCs: {p3, p4, p7, p8} -- 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(treemap(),f),app(app(node(),x),xs)) -> app#(app(map(),app(treemap(),f)),xs) p3: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) p4: app#(app(treemap(),f),app(app(node(),x),xs)) -> app#(f,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(app(treemap(),f),app(app(node(),x),xs)) -> app(app(node(),app(f,x)),app(app(map(),app(treemap(),f)),xs)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^1 order: lexicographic order interpretations: app#_A(x1,x2) = x1 + x2 + 2 app_A(x1,x2) = x1 + x2 map_A() = 0 cons_A() = 3 treemap_A() = 1 node_A() = 4 precedence: app = cons = treemap = node > map > app# partial status: pi(app#) = [1, 2] pi(app) = [] pi(map) = [] pi(cons) = [] pi(treemap) = [] pi(node) = [] 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(treemap(),f),app(app(node(),x),xs)) -> app#(app(map(),app(treemap(),f)),xs) p3: app#(app(treemap(),f),app(app(node(),x),xs)) -> app#(f,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(app(treemap(),f),app(app(node(),x),xs)) -> app(app(node(),app(f,x)),app(app(map(),app(treemap(),f)),xs)) The estimated dependency graph contains the following SCCs: {p1, p2, p3} -- 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(treemap(),f),app(app(node(),x),xs)) -> app#(f,x) p3: app#(app(treemap(),f),app(app(node(),x),xs)) -> app#(app(map(),app(treemap(),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(app(treemap(),f),app(app(node(),x),xs)) -> app(app(node(),app(f,x)),app(app(map(),app(treemap(),f)),xs)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^1 order: lexicographic order interpretations: app#_A(x1,x2) = x1 + 3 app_A(x1,x2) = x1 + x2 map_A() = 0 cons_A() = 2 treemap_A() = 1 node_A() = 2 precedence: node > cons > map = treemap > app# = app partial status: pi(app#) = [] pi(app) = [1, 2] pi(map) = [] pi(cons) = [] pi(treemap) = [] pi(node) = [] The next rules are strictly ordered: p2 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(treemap(),f),app(app(node(),x),xs)) -> app#(app(map(),app(treemap(),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(app(treemap(),f),app(app(node(),x),xs)) -> app(app(node(),app(f,x)),app(app(map(),app(treemap(),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(treemap(),f),app(app(node(),x),xs)) -> app#(app(map(),app(treemap(),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(app(treemap(),f),app(app(node(),x),xs)) -> app(app(node(),app(f,x)),app(app(map(),app(treemap(),f)),xs)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^1 order: lexicographic order interpretations: app#_A(x1,x2) = x1 + x2 + 5 app_A(x1,x2) = x1 + x2 + 2 map_A() = 2 cons_A() = 1 treemap_A() = 3 node_A() = 4 precedence: app# = app = map = cons = treemap = node partial status: pi(app#) = [2] pi(app) = [1] pi(map) = [] pi(cons) = [] pi(treemap) = [] pi(node) = [] The next rules are strictly ordered: p2 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) 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(app(treemap(),f),app(app(node(),x),xs)) -> app(app(node(),app(f,x)),app(app(map(),app(treemap(),f)),xs)) The estimated dependency graph contains the following SCCs: {p1} -- 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) 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(app(treemap(),f),app(app(node(),x),xs)) -> app(app(node(),app(f,x)),app(app(map(),app(treemap(),f)),xs)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^1 order: lexicographic order interpretations: app#_A(x1,x2) = x1 + 2 app_A(x1,x2) = x2 + 3 map_A() = 1 cons_A() = 1 precedence: cons > app# = app = map partial status: pi(app#) = [1] pi(app) = [2] pi(map) = [] pi(cons) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.