YES We show the termination of the TRS R: app(app(app(compose(),f),g),x) -> app(f,app(g,x)) Instead we prove termination of the uncurried system: app(compose_0(),y) -> compose_1(y) app(compose_1(x1),y) -> compose_2(x1,y) app(compose_2(x1,x2),y) -> compose_3(x1,x2,y) compose_3(f,g,x) -> app(f,app(g,x)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(compose_2(x1,x2),y) -> compose_3#(x1,x2,y) p2: compose_3#(f,g,x) -> app#(f,app(g,x)) p3: compose_3#(f,g,x) -> app#(g,x) and R consists of: r1: app(compose_0(),y) -> compose_1(y) r2: app(compose_1(x1),y) -> compose_2(x1,y) r3: app(compose_2(x1,x2),y) -> compose_3(x1,x2,y) r4: compose_3(f,g,x) -> app(f,app(g,x)) 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#(compose_2(x1,x2),y) -> compose_3#(x1,x2,y) p2: compose_3#(f,g,x) -> app#(g,x) p3: compose_3#(f,g,x) -> app#(f,app(g,x)) and R consists of: r1: app(compose_0(),y) -> compose_1(y) r2: app(compose_1(x1),y) -> compose_2(x1,y) r3: app(compose_2(x1,x2),y) -> compose_3(x1,x2,y) r4: compose_3(f,g,x) -> app(f,app(g,x)) The set of usable rules consists of r1, r2, r3, r4 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) = max{0, x1 - 17, x2 - 25} compose_2_A(x1,x2) = max{16, x1 + 1, x2} compose_3#_A(x1,x2,x3) = max{0, x1 - 16, x2 - 17, x3 - 25} app_A(x1,x2) = max{24, x1 + 7, x2} compose_0_A = 0 compose_1_A(x1) = max{8, x1 - 6} compose_3_A(x1,x2,x3) = max{24, x1 + 8, x2 + 7, x3} app#!_A(x1,x2) = 0 compose_2!_A(x1,x2) = 0 compose_3#!_A(x1,x2,x3) = 0 app!_A(x1,x2) = 1 compose_0!_A = 0 compose_1!_A(x1) = 0 compose_3!_A(x1,x2,x3) = 1 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = max{0, x1 - 11, x2 - 26} compose_2_A(x1,x2) = max{x1 + 10, x2} compose_3#_A(x1,x2,x3) = max{0, x1 - 11, x2 - 11, x3 - 26} app_A(x1,x2) = max{x1 + 15, x2} compose_0_A = 0 compose_1_A(x1) = max{6, x1 - 5} compose_3_A(x1,x2,x3) = max{25, x1 + 15, x2 + 15, x3} app#!_A(x1,x2) = x1 + 11 compose_2!_A(x1,x2) = max{31, x1 + 20, x2 + 23} compose_3#!_A(x1,x2,x3) = max{21, x1 + 12, x2 + 11} app!_A(x1,x2) = x1 + 24 compose_0!_A = 33 compose_1!_A(x1) = max{32, x1 - 1} compose_3!_A(x1,x2,x3) = max{32, x1 + 25, x2 + 23} partial status: pi(app#) = [] pi(compose_2) = [] pi(compose_3#) = [] pi(app) = [] pi(compose_0) = [] pi(compose_1) = [] pi(compose_3) = [] The following rules are removed: p3 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(compose_2(x1,x2),y) -> compose_3#(x1,x2,y) p2: compose_3#(f,g,x) -> app#(g,x) and R consists of: r1: app(compose_0(),y) -> compose_1(y) r2: app(compose_1(x1),y) -> compose_2(x1,y) r3: app(compose_2(x1,x2),y) -> compose_3(x1,x2,y) r4: compose_3(f,g,x) -> app(f,app(g,x)) 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#(compose_2(x1,x2),y) -> compose_3#(x1,x2,y) p2: compose_3#(f,g,x) -> app#(g,x) and R consists of: r1: app(compose_0(),y) -> compose_1(y) r2: app(compose_1(x1),y) -> compose_2(x1,y) r3: app(compose_2(x1,x2),y) -> compose_3(x1,x2,y) r4: compose_3(f,g,x) -> app(f,app(g,x)) 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) = max{0, x1 - 8, x2 - 1} compose_2_A(x1,x2) = max{x1 + 1, x2 + 7} compose_3#_A(x1,x2,x3) = max{0, x1 - 7, x2 - 8, x3 - 1} app#!_A(x1,x2) = max{3, x1 - 3, x2 - 1} compose_2!_A(x1,x2) = max{2, x1 - 8} compose_3#!_A(x1,x2,x3) = max{3, x1 - 3, x2 - 3, x3 - 1} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = max{0, x1 - 5, x2 - 1} compose_2_A(x1,x2) = max{4, x1 - 2, x2} compose_3#_A(x1,x2,x3) = max{0, x1 - 7, x2 - 5, x3 - 1} app#!_A(x1,x2) = max{1, x1 - 16, x2 - 1} compose_2!_A(x1,x2) = max{3, x1 - 7, x2 - 15} compose_3#!_A(x1,x2,x3) = max{1, x2 - 16, x3 - 1} partial status: pi(app#) = [1] pi(compose_2) = [1, 2] pi(compose_3#) = [2] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: compose_3#(f,g,x) -> app#(g,x) and R consists of: r1: app(compose_0(),y) -> compose_1(y) r2: app(compose_1(x1),y) -> compose_2(x1,y) r3: app(compose_2(x1,x2),y) -> compose_3(x1,x2,y) r4: compose_3(f,g,x) -> app(f,app(g,x)) The estimated dependency graph contains the following SCCs: (no SCCs)