YES We show the termination of the TRS R: app(app(mapt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) app(app(mapt(),f),app(node(),xs)) -> app(node(),app(app(maptlist(),f),xs)) app(app(maptlist(),f),nil()) -> nil() app(app(maptlist(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(app(mapt(),f),x)),app(app(maptlist(),f),xs)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(mapt(),f),app(leaf(),x)) -> app#(leaf(),app(f,x)) p2: app#(app(mapt(),f),app(leaf(),x)) -> app#(f,x) p3: app#(app(mapt(),f),app(node(),xs)) -> app#(node(),app(app(maptlist(),f),xs)) p4: app#(app(mapt(),f),app(node(),xs)) -> app#(app(maptlist(),f),xs) p5: app#(app(mapt(),f),app(node(),xs)) -> app#(maptlist(),f) p6: app#(app(maptlist(),f),app(app(cons(),x),xs)) -> app#(app(cons(),app(app(mapt(),f),x)),app(app(maptlist(),f),xs)) p7: app#(app(maptlist(),f),app(app(cons(),x),xs)) -> app#(cons(),app(app(mapt(),f),x)) p8: app#(app(maptlist(),f),app(app(cons(),x),xs)) -> app#(app(mapt(),f),x) p9: app#(app(maptlist(),f),app(app(cons(),x),xs)) -> app#(mapt(),f) p10: app#(app(maptlist(),f),app(app(cons(),x),xs)) -> app#(app(maptlist(),f),xs) and R consists of: r1: app(app(mapt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: app(app(mapt(),f),app(node(),xs)) -> app(node(),app(app(maptlist(),f),xs)) r3: app(app(maptlist(),f),nil()) -> nil() r4: app(app(maptlist(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(app(mapt(),f),x)),app(app(maptlist(),f),xs)) The estimated dependency graph contains the following SCCs: {p2, p4, p8, p10} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(mapt(),f),app(leaf(),x)) -> app#(f,x) p2: app#(app(maptlist(),f),app(app(cons(),x),xs)) -> app#(app(maptlist(),f),xs) p3: app#(app(maptlist(),f),app(app(cons(),x),xs)) -> app#(app(mapt(),f),x) p4: app#(app(mapt(),f),app(node(),xs)) -> app#(app(maptlist(),f),xs) and R consists of: r1: app(app(mapt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: app(app(mapt(),f),app(node(),xs)) -> app(node(),app(app(maptlist(),f),xs)) r3: app(app(maptlist(),f),nil()) -> nil() r4: app(app(maptlist(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(app(mapt(),f),x)),app(app(maptlist(),f),xs)) 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 - 14, x2 - 4} app_A(x1,x2) = max{x1 + 8, x2 + 13} mapt_A = 11 leaf_A = 0 maptlist_A = 4 cons_A = 12 node_A = 5 precedence: app# = app = mapt = leaf = maptlist = cons = node partial status: pi(app#) = [] pi(app) = [1, 2] pi(mapt) = [] pi(leaf) = [] pi(maptlist) = [] pi(cons) = [] 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#(app(maptlist(),f),app(app(cons(),x),xs)) -> app#(app(maptlist(),f),xs) p2: app#(app(maptlist(),f),app(app(cons(),x),xs)) -> app#(app(mapt(),f),x) p3: app#(app(mapt(),f),app(node(),xs)) -> app#(app(maptlist(),f),xs) and R consists of: r1: app(app(mapt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: app(app(mapt(),f),app(node(),xs)) -> app(node(),app(app(maptlist(),f),xs)) r3: app(app(maptlist(),f),nil()) -> nil() r4: app(app(maptlist(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(app(mapt(),f),x)),app(app(maptlist(),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(maptlist(),f),app(app(cons(),x),xs)) -> app#(app(maptlist(),f),xs) p2: app#(app(maptlist(),f),app(app(cons(),x),xs)) -> app#(app(mapt(),f),x) p3: app#(app(mapt(),f),app(node(),xs)) -> app#(app(maptlist(),f),xs) and R consists of: r1: app(app(mapt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: app(app(mapt(),f),app(node(),xs)) -> app(node(),app(app(maptlist(),f),xs)) r3: app(app(maptlist(),f),nil()) -> nil() r4: app(app(maptlist(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(app(mapt(),f),x)),app(app(maptlist(),f),xs)) 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{5, x1 - 2, x2 + 2} app_A(x1,x2) = max{10, x1 + 6, x2 + 9} maptlist_A = 0 cons_A = 4 mapt_A = 14 node_A = 3 precedence: app# = cons = mapt > app = node > maptlist partial status: pi(app#) = [2] pi(app) = [] pi(maptlist) = [] pi(cons) = [] pi(mapt) = [] 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#(app(maptlist(),f),app(app(cons(),x),xs)) -> app#(app(mapt(),f),x) p2: app#(app(mapt(),f),app(node(),xs)) -> app#(app(maptlist(),f),xs) and R consists of: r1: app(app(mapt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: app(app(mapt(),f),app(node(),xs)) -> app(node(),app(app(maptlist(),f),xs)) r3: app(app(maptlist(),f),nil()) -> nil() r4: app(app(maptlist(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(app(mapt(),f),x)),app(app(maptlist(),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(maptlist(),f),app(app(cons(),x),xs)) -> app#(app(mapt(),f),x) p2: app#(app(mapt(),f),app(node(),xs)) -> app#(app(maptlist(),f),xs) and R consists of: r1: app(app(mapt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: app(app(mapt(),f),app(node(),xs)) -> app(node(),app(app(maptlist(),f),xs)) r3: app(app(maptlist(),f),nil()) -> nil() r4: app(app(maptlist(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(app(mapt(),f),x)),app(app(maptlist(),f),xs)) 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{40, x1 + 12, x2 + 22} app_A(x1,x2) = max{x1 + 6, x2} maptlist_A = 3 cons_A = 6 mapt_A = 5 node_A = 4 precedence: app# = app = maptlist = cons = mapt = node partial status: pi(app#) = [2] pi(app) = [1, 2] pi(maptlist) = [] pi(cons) = [] pi(mapt) = [] 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#(app(mapt(),f),app(node(),xs)) -> app#(app(maptlist(),f),xs) and R consists of: r1: app(app(mapt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: app(app(mapt(),f),app(node(),xs)) -> app(node(),app(app(maptlist(),f),xs)) r3: app(app(maptlist(),f),nil()) -> nil() r4: app(app(maptlist(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(app(mapt(),f),x)),app(app(maptlist(),f),xs)) The estimated dependency graph contains the following SCCs: (no SCCs)