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)) Instead we prove termination of the uncurried system: app(cons_0(),y) -> cons_1(y) app(cons_1(x1),y) -> cons_2(x1,y) app(leaf_0(),y) -> leaf_1(y) app(mapt_0(),y) -> mapt_1(y) app(mapt_1(x1),y) -> mapt_2(x1,y) app(maptlist_0(),y) -> maptlist_1(y) app(maptlist_1(x1),y) -> maptlist_2(x1,y) app(node_0(),y) -> node_1(y) mapt_2(f,leaf_1(x)) -> leaf_1(app(f,x)) mapt_2(f,node_1(xs)) -> node_1(maptlist_2(f,xs)) maptlist_2(f,nil_0()) -> nil_0() maptlist_2(f,cons_2(x,xs)) -> cons_2(mapt_2(f,x),maptlist_2(f,xs)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(mapt_1(x1),y) -> mapt_2#(x1,y) p2: app#(maptlist_1(x1),y) -> maptlist_2#(x1,y) p3: mapt_2#(f,leaf_1(x)) -> app#(f,x) p4: mapt_2#(f,node_1(xs)) -> maptlist_2#(f,xs) p5: maptlist_2#(f,cons_2(x,xs)) -> mapt_2#(f,x) p6: maptlist_2#(f,cons_2(x,xs)) -> maptlist_2#(f,xs) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(leaf_0(),y) -> leaf_1(y) r4: app(mapt_0(),y) -> mapt_1(y) r5: app(mapt_1(x1),y) -> mapt_2(x1,y) r6: app(maptlist_0(),y) -> maptlist_1(y) r7: app(maptlist_1(x1),y) -> maptlist_2(x1,y) r8: app(node_0(),y) -> node_1(y) r9: mapt_2(f,leaf_1(x)) -> leaf_1(app(f,x)) r10: mapt_2(f,node_1(xs)) -> node_1(maptlist_2(f,xs)) r11: maptlist_2(f,nil_0()) -> nil_0() r12: maptlist_2(f,cons_2(x,xs)) -> cons_2(mapt_2(f,x),maptlist_2(f,xs)) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(mapt_1(x1),y) -> mapt_2#(x1,y) p2: mapt_2#(f,node_1(xs)) -> maptlist_2#(f,xs) p3: maptlist_2#(f,cons_2(x,xs)) -> maptlist_2#(f,xs) p4: maptlist_2#(f,cons_2(x,xs)) -> mapt_2#(f,x) p5: mapt_2#(f,leaf_1(x)) -> app#(f,x) p6: app#(maptlist_1(x1),y) -> maptlist_2#(x1,y) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(leaf_0(),y) -> leaf_1(y) r4: app(mapt_0(),y) -> mapt_1(y) r5: app(mapt_1(x1),y) -> mapt_2(x1,y) r6: app(maptlist_0(),y) -> maptlist_1(y) r7: app(maptlist_1(x1),y) -> maptlist_2(x1,y) r8: app(node_0(),y) -> node_1(y) r9: mapt_2(f,leaf_1(x)) -> leaf_1(app(f,x)) r10: mapt_2(f,node_1(xs)) -> node_1(maptlist_2(f,xs)) r11: maptlist_2(f,nil_0()) -> nil_0() r12: maptlist_2(f,cons_2(x,xs)) -> cons_2(mapt_2(f,x),maptlist_2(f,xs)) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: app#_A(x1,x2) = x1 + x2 + 3 mapt_1_A(x1) = x1 + 2 mapt_2#_A(x1,x2) = x1 + x2 + 4 node_1_A(x1) = x1 + 2 maptlist_2#_A(x1,x2) = x1 + x2 + 5 cons_2_A(x1,x2) = x1 + x2 + 2 leaf_1_A(x1) = x1 + 2 maptlist_1_A(x1) = x1 + 4 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = max{0, x1 - 5, x2 - 15} mapt_1_A(x1) = x1 + 2 mapt_2#_A(x1,x2) = max{0, x1 - 5, x2 - 25} node_1_A(x1) = max{10, x1 + 5} maptlist_2#_A(x1,x2) = max{0, x1 - 5, x2 - 22} cons_2_A(x1,x2) = max{21, x1 - 3, x2 + 3} leaf_1_A(x1) = x1 + 10 maptlist_1_A(x1) = x1 + 4 app#!_A(x1,x2) = max{7, x1 - 18, x2 - 14} mapt_1!_A(x1) = max{0, x1 - 13} mapt_2#!_A(x1,x2) = max{6, x2 - 25} node_1!_A(x1) = max{0, x1 - 23} maptlist_2#!_A(x1,x2) = max{7, x1 - 14, x2 - 14} cons_2!_A(x1,x2) = max{x1 + 5, x2 + 5} leaf_1!_A(x1) = max{2, x1 - 13} maptlist_1!_A(x1) = max{2, x1 - 13} partial status: pi(app#) = [2] pi(mapt_1) = [1] pi(mapt_2#) = [1, 2] pi(node_1) = [1] pi(maptlist_2#) = [] pi(cons_2) = [2] pi(leaf_1) = [1] pi(maptlist_1) = [1] The following rules are removed: p1, p2, p3, p4, p5, p6 Then no dependency pair remains.