YES We show the termination of the TRS R: app(app(mapbt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) app(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app(app(app(branch(),app(f,x)),app(app(mapbt(),f),l)),app(app(mapbt(),f),r)) Instead we prove termination of the uncurried system: app(branch_0(),y) -> branch_1(y) app(branch_1(x1),y) -> branch_2(x1,y) app(branch_2(x1,x2),y) -> branch_3(x1,x2,y) app(leaf_0(),y) -> leaf_1(y) app(mapbt_0(),y) -> mapbt_1(y) app(mapbt_1(x1),y) -> mapbt_2(x1,y) mapbt_2(f,leaf_1(x)) -> leaf_1(app(f,x)) mapbt_2(f,branch_3(x,l,r)) -> branch_3(app(f,x),mapbt_2(f,l),mapbt_2(f,r)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(mapbt_1(x1),y) -> mapbt_2#(x1,y) p2: mapbt_2#(f,leaf_1(x)) -> app#(f,x) p3: mapbt_2#(f,branch_3(x,l,r)) -> app#(f,x) p4: mapbt_2#(f,branch_3(x,l,r)) -> mapbt_2#(f,l) p5: mapbt_2#(f,branch_3(x,l,r)) -> mapbt_2#(f,r) and R consists of: r1: app(branch_0(),y) -> branch_1(y) r2: app(branch_1(x1),y) -> branch_2(x1,y) r3: app(branch_2(x1,x2),y) -> branch_3(x1,x2,y) r4: app(leaf_0(),y) -> leaf_1(y) r5: app(mapbt_0(),y) -> mapbt_1(y) r6: app(mapbt_1(x1),y) -> mapbt_2(x1,y) r7: mapbt_2(f,leaf_1(x)) -> leaf_1(app(f,x)) r8: mapbt_2(f,branch_3(x,l,r)) -> branch_3(app(f,x),mapbt_2(f,l),mapbt_2(f,r)) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(mapbt_1(x1),y) -> mapbt_2#(x1,y) p2: mapbt_2#(f,branch_3(x,l,r)) -> mapbt_2#(f,r) p3: mapbt_2#(f,branch_3(x,l,r)) -> mapbt_2#(f,l) p4: mapbt_2#(f,branch_3(x,l,r)) -> app#(f,x) p5: mapbt_2#(f,leaf_1(x)) -> app#(f,x) and R consists of: r1: app(branch_0(),y) -> branch_1(y) r2: app(branch_1(x1),y) -> branch_2(x1,y) r3: app(branch_2(x1,x2),y) -> branch_3(x1,x2,y) r4: app(leaf_0(),y) -> leaf_1(y) r5: app(mapbt_0(),y) -> mapbt_1(y) r6: app(mapbt_1(x1),y) -> mapbt_2(x1,y) r7: mapbt_2(f,leaf_1(x)) -> leaf_1(app(f,x)) r8: mapbt_2(f,branch_3(x,l,r)) -> branch_3(app(f,x),mapbt_2(f,l),mapbt_2(f,r)) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = max{17, x1 - 2} mapbt_1_A(x1) = max{21, x1 + 2} mapbt_2#_A(x1,x2) = max{18, x1 - 1} branch_3_A(x1,x2,x3) = max{x1 - 42, x2 - 53, x3 + 6} leaf_1_A(x1) = max{16, x1 + 4} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: app#_A(x1,x2) = x2 mapbt_1_A(x1) = x1 + 3 mapbt_2#_A(x1,x2) = x2 branch_3_A(x1,x2,x3) = x1 + x2 + x3 + 7 leaf_1_A(x1) = x1 + 11 app#!_A(x1,x2) = x1 + 12 mapbt_1!_A(x1) = 14 mapbt_2#!_A(x1,x2) = x2 + 4 branch_3!_A(x1,x2,x3) = x1 + x2 + x3 + 3 leaf_1!_A(x1) = x1 + 13 partial status: pi(app#) = [] pi(mapbt_1) = [1] pi(mapbt_2#) = [] pi(branch_3) = [3] pi(leaf_1) = [1] The following rules are removed: p1, p2, p3, p4, p5 Then no dependency pair remains.