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)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(mapbt(),f),app(leaf(),x)) -> app#(leaf(),app(f,x)) p2: app#(app(mapbt(),f),app(leaf(),x)) -> app#(f,x) p3: 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)) p4: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(app(branch(),app(f,x)),app(app(mapbt(),f),l)) p5: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(branch(),app(f,x)) p6: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(f,x) p7: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(app(mapbt(),f),l) p8: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(app(mapbt(),f),r) and R consists of: r1: app(app(mapbt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: 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)) The estimated dependency graph contains the following SCCs: {p2, p6, p7, p8} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(mapbt(),f),app(leaf(),x)) -> app#(f,x) p2: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(app(mapbt(),f),r) p3: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(app(mapbt(),f),l) p4: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(f,x) and R consists of: r1: app(app(mapbt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: 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)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = ((1,0),(1,1)) x2 + (4,3) app_A(x1,x2) = x1 + ((1,0),(1,1)) x2 + (2,3) mapbt_A() = (1,1) leaf_A() = (3,1) branch_A() = (5,2) precedence: app# = app = mapbt = leaf = branch partial status: pi(app#) = [2] pi(app) = [1, 2] pi(mapbt) = [] pi(leaf) = [] pi(branch) = [] The next rules are strictly ordered: p4 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(mapbt(),f),app(leaf(),x)) -> app#(f,x) p2: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(app(mapbt(),f),r) p3: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(app(mapbt(),f),l) and R consists of: r1: app(app(mapbt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: 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)) 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(mapbt(),f),app(leaf(),x)) -> app#(f,x) p2: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(app(mapbt(),f),l) p3: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(app(mapbt(),f),r) and R consists of: r1: app(app(mapbt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: 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)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = x2 app_A(x1,x2) = x1 + ((1,0),(1,1)) x2 + (2,2) mapbt_A() = (4,0) leaf_A() = (1,0) branch_A() = (1,1) precedence: app = mapbt > app# = leaf = branch partial status: pi(app#) = [2] pi(app) = [2] pi(mapbt) = [] pi(leaf) = [] pi(branch) = [] 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(mapbt(),f),app(leaf(),x)) -> app#(f,x) p2: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(app(mapbt(),f),l) and R consists of: r1: app(app(mapbt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: 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)) 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(mapbt(),f),app(leaf(),x)) -> app#(f,x) p2: app#(app(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(app(mapbt(),f),l) and R consists of: r1: app(app(mapbt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: 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)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = ((0,0),(1,0)) x2 + (8,4) app_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(1,0)) x2 + (2,2) mapbt_A() = (4,1) leaf_A() = (1,1) branch_A() = (1,3) precedence: app# = app = mapbt = leaf = branch partial status: pi(app#) = [] pi(app) = [] pi(mapbt) = [] pi(leaf) = [] pi(branch) = [] 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(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(app(mapbt(),f),l) and R consists of: r1: app(app(mapbt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: 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)) 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(mapbt(),f),app(app(app(branch(),x),l),r)) -> app#(app(mapbt(),f),l) and R consists of: r1: app(app(mapbt(),f),app(leaf(),x)) -> app(leaf(),app(f,x)) r2: 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)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = ((1,0),(0,0)) x2 + (1,4) app_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(1,1)) x2 + (2,3) mapbt_A() = (3,2) branch_A() = (2,1) precedence: app# = app = mapbt = branch partial status: pi(app#) = [] pi(app) = [2] pi(mapbt) = [] pi(branch) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.