YES We show the termination of the TRS R: ap(ap(ff(),x),x) -> ap(ap(x,ap(ff(),x)),ap(ap(cons(),x),nil())) Instead we prove termination of the uncurried system: ap(cons_0(),y) -> cons_1(y) ap(cons_1(x1),y) -> cons_2(x1,y) ap(ff_0(),y) -> ff_1(y) ap(ff_1(x1),y) -> ff_2(x1,y) ff_2(x,x) -> ap(ap(x,ff_1(x)),cons_2(x,nil_0())) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: ap#(ff_1(x1),y) -> ff_2#(x1,y) p2: ff_2#(x,x) -> ap#(ap(x,ff_1(x)),cons_2(x,nil_0())) p3: ff_2#(x,x) -> ap#(x,ff_1(x)) and R consists of: r1: ap(cons_0(),y) -> cons_1(y) r2: ap(cons_1(x1),y) -> cons_2(x1,y) r3: ap(ff_0(),y) -> ff_1(y) r4: ap(ff_1(x1),y) -> ff_2(x1,y) r5: ff_2(x,x) -> ap(ap(x,ff_1(x)),cons_2(x,nil_0())) 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: ap#(ff_1(x1),y) -> ff_2#(x1,y) p2: ff_2#(x,x) -> ap#(x,ff_1(x)) p3: ff_2#(x,x) -> ap#(ap(x,ff_1(x)),cons_2(x,nil_0())) and R consists of: r1: ap(cons_0(),y) -> cons_1(y) r2: ap(cons_1(x1),y) -> cons_2(x1,y) r3: ap(ff_0(),y) -> ff_1(y) r4: ap(ff_1(x1),y) -> ff_2(x1,y) r5: ff_2(x,x) -> ap(ap(x,ff_1(x)),cons_2(x,nil_0())) The set of usable rules consists of r1, r2, r3, r4, r5 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!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: ap#_A(x1,x2) = 0 ff_1_A(x1) = 1 ff_2#_A(x1,x2) = 0 ap_A(x1,x2) = 1 cons_2_A(x1,x2) = 0 nil_0_A() = 1 cons_0_A() = 1 cons_1_A(x1) = 1 ff_0_A() = 1 ff_2_A(x1,x2) = 1 ap#!_A(x1,x2) = x1 + x2 + 2 ff_1!_A(x1) = 0 ff_2#!_A(x1,x2) = x2 + 3 ap!_A(x1,x2) = 2 cons_2!_A(x1,x2) = 0 nil_0!_A() = 0 cons_0!_A() = 2 cons_1!_A(x1) = 1 ff_0!_A() = 1 ff_2!_A(x1,x2) = 2 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: ap#_A(x1,x2) = max{21, x2 + 11} ff_1_A(x1) = max{10, x1 - 12} ff_2#_A(x1,x2) = max{21, x2 - 1} ap_A(x1,x2) = max{4, x1 - 15, x2 - 11} cons_2_A(x1,x2) = max{4, x1 - 32, x2 - 11} nil_0_A = 1 cons_0_A = 1 cons_1_A(x1) = max{0, x1 - 17} ff_0_A = 25 ff_2_A(x1,x2) = max{4, x1 - 44, x2 - 22} ap#!_A(x1,x2) = max{x1 + 22, x2 + 22} ff_1!_A(x1) = 21 ff_2#!_A(x1,x2) = max{32, x2 + 22} ap!_A(x1,x2) = max{18, x1 + 15} cons_2!_A(x1,x2) = max{19, x1 - 1, x2 - 2} nil_0!_A = 20 cons_0!_A = 17 cons_1!_A(x1) = 17 ff_0!_A = 1 ff_2!_A(x1,x2) = max{20, x1 + 2} partial status: pi(ap#) = [] pi(ff_1) = [] pi(ff_2#) = [] pi(ap) = [] pi(cons_2) = [] pi(nil_0) = [] pi(cons_0) = [] pi(cons_1) = [] pi(ff_0) = [] pi(ff_2) = [] The following rules are removed: p3 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: ap#(ff_1(x1),y) -> ff_2#(x1,y) p2: ff_2#(x,x) -> ap#(x,ff_1(x)) and R consists of: r1: ap(cons_0(),y) -> cons_1(y) r2: ap(cons_1(x1),y) -> cons_2(x1,y) r3: ap(ff_0(),y) -> ff_1(y) r4: ap(ff_1(x1),y) -> ff_2(x1,y) r5: ff_2(x,x) -> ap(ap(x,ff_1(x)),cons_2(x,nil_0())) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: ap#(ff_1(x1),y) -> ff_2#(x1,y) p2: ff_2#(x,x) -> ap#(x,ff_1(x)) and R consists of: r1: ap(cons_0(),y) -> cons_1(y) r2: ap(cons_1(x1),y) -> cons_2(x1,y) r3: ap(ff_0(),y) -> ff_1(y) r4: ap(ff_1(x1),y) -> ff_2(x1,y) r5: ff_2(x,x) -> ap(ap(x,ff_1(x)),cons_2(x,nil_0())) 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!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: ap#_A(x1,x2) = x2 ff_1_A(x1) = x1 ff_2#_A(x1,x2) = x2 ap#!_A(x1,x2) = 0 ff_1!_A(x1) = 3 ff_2#!_A(x1,x2) = 1 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: ap#_A(x1,x2) = max{1, x1 - 5, x2 - 3} ff_1_A(x1) = 4 ff_2#_A(x1,x2) = max{1, x2 - 5} ap#!_A(x1,x2) = x2 + 3 ff_1!_A(x1) = 15 ff_2#!_A(x1,x2) = 8 partial status: pi(ap#) = [1] pi(ff_1) = [1] pi(ff_2#) = [1] The following rules are removed: p1, p2 Then no dependency pair remains.