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 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = max{2, x1 - 5} compose_2_A(x1,x2) = max{x1 + 8, x2 + 1} compose_3#_A(x1,x2,x3) = max{2, x1 + 1, x2 - 5} app_A(x1,x2) = max{3, x1 - 11, x2 - 4} compose_0_A = 1 compose_1_A(x1) = max{2, x1 - 5} base order 2: precedence: compose_2 > app > compose_3# = compose_1 > app# = compose_0 partial status: pi(app#) = [] pi(compose_2) = [2] pi(compose_3#) = [1] pi(app) = [] pi(compose_0) = [] pi(compose_1) = [] 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) p2: 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 estimated dependency graph contains the following SCCs: (no SCCs)