YES We show the termination of the TRS R: app(app(app(comp(),f),g),x) -> app(f,app(g,x)) app(twice(),f) -> app(app(comp(),f),f) Instead we prove termination of the uncurried system: app(comp_0(),y) -> comp_1(y) app(comp_1(x1),y) -> comp_2(x1,y) app(comp_2(x1,x2),y) -> comp_3(x1,x2,y) app(twice_0(),y) -> twice_1(y) comp_3(f,g,x) -> app(f,app(g,x)) twice_1(f) -> comp_2(f,f) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(comp_2(x1,x2),y) -> comp_3#(x1,x2,y) p2: app#(twice_0(),y) -> twice_1#(y) p3: comp_3#(f,g,x) -> app#(f,app(g,x)) p4: comp_3#(f,g,x) -> app#(g,x) and R consists of: r1: app(comp_0(),y) -> comp_1(y) r2: app(comp_1(x1),y) -> comp_2(x1,y) r3: app(comp_2(x1,x2),y) -> comp_3(x1,x2,y) r4: app(twice_0(),y) -> twice_1(y) r5: comp_3(f,g,x) -> app(f,app(g,x)) r6: twice_1(f) -> comp_2(f,f) The estimated dependency graph contains the following SCCs: {p1, p3, p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(comp_2(x1,x2),y) -> comp_3#(x1,x2,y) p2: comp_3#(f,g,x) -> app#(g,x) p3: comp_3#(f,g,x) -> app#(f,app(g,x)) and R consists of: r1: app(comp_0(),y) -> comp_1(y) r2: app(comp_1(x1),y) -> comp_2(x1,y) r3: app(comp_2(x1,x2),y) -> comp_3(x1,x2,y) r4: app(twice_0(),y) -> twice_1(y) r5: comp_3(f,g,x) -> app(f,app(g,x)) r6: twice_1(f) -> comp_2(f,f) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = 1 comp_2_A(x1,x2) = max{10, x1, x2 + 1} comp_3#_A(x1,x2,x3) = 1 app_A(x1,x2) = 0 app#!_A(x1,x2) = x1 + 2 comp_2!_A(x1,x2) = max{x1 + 13, x2 + 4} comp_3#!_A(x1,x2,x3) = max{12, x1 + 2, x2 + 3} app!_A(x1,x2) = max{x1 - 3, x2 + 5} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = max{1, x1 - 3} comp_2_A(x1,x2) = max{x1 + 2, x2} comp_3#_A(x1,x2,x3) = max{1, x1 - 1, x2 - 3} app_A(x1,x2) = max{8, x1 + 4, x2} app#!_A(x1,x2) = x1 + 1 comp_2!_A(x1,x2) = max{6, x1 + 4} comp_3#!_A(x1,x2,x3) = x1 + 3 app!_A(x1,x2) = 6 partial status: pi(app#) = [] pi(comp_2) = [1] pi(comp_3#) = [] pi(app) = [1] The following rules are removed: p2, p3 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(comp_2(x1,x2),y) -> comp_3#(x1,x2,y) and R consists of: r1: app(comp_0(),y) -> comp_1(y) r2: app(comp_1(x1),y) -> comp_2(x1,y) r3: app(comp_2(x1,x2),y) -> comp_3(x1,x2,y) r4: app(twice_0(),y) -> twice_1(y) r5: comp_3(f,g,x) -> app(f,app(g,x)) r6: twice_1(f) -> comp_2(f,f) The estimated dependency graph contains the following SCCs: (no SCCs)