YES We show the termination of the TRS R: app(app(append(),nil()),l) -> l app(app(append(),app(app(cons(),h),t)),l) -> app(app(cons(),h),app(app(append(),t),l)) app(app(map(),f),nil()) -> nil() app(app(map(),f),app(app(cons(),h),t)) -> app(app(cons(),app(f,h)),app(app(map(),f),t)) app(app(append(),app(app(append(),l1),l2)),l3) -> app(app(append(),l1),app(app(append(),l2),l3)) app(app(map(),f),app(app(append(),l1),l2)) -> app(app(append(),app(app(map(),f),l1)),app(app(map(),f),l2)) Instead we prove termination of the uncurried system: app(append_0(),y) -> append_1(y) app(append_1(x1),y) -> append_2(x1,y) app(cons_0(),y) -> cons_1(y) app(cons_1(x1),y) -> cons_2(x1,y) app(map_0(),y) -> map_1(y) app(map_1(x1),y) -> map_2(x1,y) append_2(nil_0(),l) -> l append_2(cons_2(h,t),l) -> cons_2(h,append_2(t,l)) map_2(f,nil_0()) -> nil_0() map_2(f,cons_2(h,t)) -> cons_2(app(f,h),map_2(f,t)) append_2(append_2(l1,l2),l3) -> append_2(l1,append_2(l2,l3)) map_2(f,append_2(l1,l2)) -> append_2(map_2(f,l1),map_2(f,l2)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(append_1(x1),y) -> append_2#(x1,y) p2: app#(map_1(x1),y) -> map_2#(x1,y) p3: append_2#(cons_2(h,t),l) -> append_2#(t,l) p4: map_2#(f,cons_2(h,t)) -> app#(f,h) p5: map_2#(f,cons_2(h,t)) -> map_2#(f,t) p6: append_2#(append_2(l1,l2),l3) -> append_2#(l1,append_2(l2,l3)) p7: append_2#(append_2(l1,l2),l3) -> append_2#(l2,l3) p8: map_2#(f,append_2(l1,l2)) -> append_2#(map_2(f,l1),map_2(f,l2)) p9: map_2#(f,append_2(l1,l2)) -> map_2#(f,l1) p10: map_2#(f,append_2(l1,l2)) -> map_2#(f,l2) and R consists of: r1: app(append_0(),y) -> append_1(y) r2: app(append_1(x1),y) -> append_2(x1,y) r3: app(cons_0(),y) -> cons_1(y) r4: app(cons_1(x1),y) -> cons_2(x1,y) r5: app(map_0(),y) -> map_1(y) r6: app(map_1(x1),y) -> map_2(x1,y) r7: append_2(nil_0(),l) -> l r8: append_2(cons_2(h,t),l) -> cons_2(h,append_2(t,l)) r9: map_2(f,nil_0()) -> nil_0() r10: map_2(f,cons_2(h,t)) -> cons_2(app(f,h),map_2(f,t)) r11: append_2(append_2(l1,l2),l3) -> append_2(l1,append_2(l2,l3)) r12: map_2(f,append_2(l1,l2)) -> append_2(map_2(f,l1),map_2(f,l2)) The estimated dependency graph contains the following SCCs: {p2, p4, p5, p9, p10} {p3, p6, p7} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: map_2#(f,cons_2(h,t)) -> app#(f,h) p2: app#(map_1(x1),y) -> map_2#(x1,y) p3: map_2#(f,append_2(l1,l2)) -> map_2#(f,l2) p4: map_2#(f,append_2(l1,l2)) -> map_2#(f,l1) p5: map_2#(f,cons_2(h,t)) -> map_2#(f,t) and R consists of: r1: app(append_0(),y) -> append_1(y) r2: app(append_1(x1),y) -> append_2(x1,y) r3: app(cons_0(),y) -> cons_1(y) r4: app(cons_1(x1),y) -> cons_2(x1,y) r5: app(map_0(),y) -> map_1(y) r6: app(map_1(x1),y) -> map_2(x1,y) r7: append_2(nil_0(),l) -> l r8: append_2(cons_2(h,t),l) -> cons_2(h,append_2(t,l)) r9: map_2(f,nil_0()) -> nil_0() r10: map_2(f,cons_2(h,t)) -> cons_2(app(f,h),map_2(f,t)) r11: append_2(append_2(l1,l2),l3) -> append_2(l1,append_2(l2,l3)) r12: map_2(f,append_2(l1,l2)) -> append_2(map_2(f,l1),map_2(f,l2)) 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: map_2#_A(x1,x2) = max{0, x1 - 11, x2 - 12} cons_2_A(x1,x2) = max{11, x1, x2 + 3} app#_A(x1,x2) = max{0, x1 - 11, x2 - 12} map_1_A(x1) = max{10, x1 + 2} append_2_A(x1,x2) = max{10, x1 + 1, x2 + 2} map_2#!_A(x1,x2) = max{7, x1 - 30, x2 - 13} cons_2!_A(x1,x2) = max{2, x1 - 33, x2 - 37} app#!_A(x1,x2) = max{7, x1 - 31, x2 - 13} map_1!_A(x1) = max{6, x1 - 31} append_2!_A(x1,x2) = max{3, x1 - 12} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: map_2#_A(x1,x2) = max{0, x1 - 1, x2 - 11} cons_2_A(x1,x2) = max{10, x1 + 4, x2 + 4} app#_A(x1,x2) = max{0, x1 - 3, x2 - 11} map_1_A(x1) = x1 + 2 append_2_A(x1,x2) = max{12, x1 + 5, x2 + 4} map_2#!_A(x1,x2) = max{1, x1 - 2, x2 - 14} cons_2!_A(x1,x2) = max{0, x1 - 15, x2 - 13} app#!_A(x1,x2) = max{1, x1 - 3, x2 - 14} map_1!_A(x1) = max{0, x1 - 1} append_2!_A(x1,x2) = max{0, x1 - 20, x2 - 33} partial status: pi(map_2#) = [1] pi(cons_2) = [1] pi(app#) = [1] pi(map_1) = [1] pi(append_2) = [1] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: map_2#(f,cons_2(h,t)) -> app#(f,h) p2: map_2#(f,append_2(l1,l2)) -> map_2#(f,l2) p3: map_2#(f,append_2(l1,l2)) -> map_2#(f,l1) p4: map_2#(f,cons_2(h,t)) -> map_2#(f,t) and R consists of: r1: app(append_0(),y) -> append_1(y) r2: app(append_1(x1),y) -> append_2(x1,y) r3: app(cons_0(),y) -> cons_1(y) r4: app(cons_1(x1),y) -> cons_2(x1,y) r5: app(map_0(),y) -> map_1(y) r6: app(map_1(x1),y) -> map_2(x1,y) r7: append_2(nil_0(),l) -> l r8: append_2(cons_2(h,t),l) -> cons_2(h,append_2(t,l)) r9: map_2(f,nil_0()) -> nil_0() r10: map_2(f,cons_2(h,t)) -> cons_2(app(f,h),map_2(f,t)) r11: append_2(append_2(l1,l2),l3) -> append_2(l1,append_2(l2,l3)) r12: map_2(f,append_2(l1,l2)) -> append_2(map_2(f,l1),map_2(f,l2)) The estimated dependency graph contains the following SCCs: {p2, p3, p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: map_2#(f,append_2(l1,l2)) -> map_2#(f,l2) p2: map_2#(f,cons_2(h,t)) -> map_2#(f,t) p3: map_2#(f,append_2(l1,l2)) -> map_2#(f,l1) and R consists of: r1: app(append_0(),y) -> append_1(y) r2: app(append_1(x1),y) -> append_2(x1,y) r3: app(cons_0(),y) -> cons_1(y) r4: app(cons_1(x1),y) -> cons_2(x1,y) r5: app(map_0(),y) -> map_1(y) r6: app(map_1(x1),y) -> map_2(x1,y) r7: append_2(nil_0(),l) -> l r8: append_2(cons_2(h,t),l) -> cons_2(h,append_2(t,l)) r9: map_2(f,nil_0()) -> nil_0() r10: map_2(f,cons_2(h,t)) -> cons_2(app(f,h),map_2(f,t)) r11: append_2(append_2(l1,l2),l3) -> append_2(l1,append_2(l2,l3)) r12: map_2(f,append_2(l1,l2)) -> append_2(map_2(f,l1),map_2(f,l2)) 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: map_2#_A(x1,x2) = 0 append_2_A(x1,x2) = max{3, x1 - 7, x2 - 6} cons_2_A(x1,x2) = max{4, x1 - 5, x2 - 5} map_2#!_A(x1,x2) = max{0, x2 - 19} append_2!_A(x1,x2) = max{0, x1 - 17, x2 - 18} cons_2!_A(x1,x2) = max{0, x1 - 3, x2 - 13} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: map_2#_A(x1,x2) = 0 append_2_A(x1,x2) = max{3, x1 - 9, x2 - 5} cons_2_A(x1,x2) = max{4, x1 - 7, x2 - 7} map_2#!_A(x1,x2) = max{0, x2 - 13} append_2!_A(x1,x2) = max{4, x1 - 6, x2 - 7} cons_2!_A(x1,x2) = max{3, x1 - 9, x2 - 13} partial status: pi(map_2#) = [2] pi(append_2) = [1, 2] pi(cons_2) = [2] The following rules are removed: p1, p2, p3 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: append_2#(cons_2(h,t),l) -> append_2#(t,l) p2: append_2#(append_2(l1,l2),l3) -> append_2#(l2,l3) p3: append_2#(append_2(l1,l2),l3) -> append_2#(l1,append_2(l2,l3)) and R consists of: r1: app(append_0(),y) -> append_1(y) r2: app(append_1(x1),y) -> append_2(x1,y) r3: app(cons_0(),y) -> cons_1(y) r4: app(cons_1(x1),y) -> cons_2(x1,y) r5: app(map_0(),y) -> map_1(y) r6: app(map_1(x1),y) -> map_2(x1,y) r7: append_2(nil_0(),l) -> l r8: append_2(cons_2(h,t),l) -> cons_2(h,append_2(t,l)) r9: map_2(f,nil_0()) -> nil_0() r10: map_2(f,cons_2(h,t)) -> cons_2(app(f,h),map_2(f,t)) r11: append_2(append_2(l1,l2),l3) -> append_2(l1,append_2(l2,l3)) r12: map_2(f,append_2(l1,l2)) -> append_2(map_2(f,l1),map_2(f,l2)) The set of usable rules consists of r7 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: append_2#_A(x1,x2) = max{0, x1 - 6} cons_2_A(x1,x2) = max{12, x1 - 7, x2} append_2_A(x1,x2) = max{11, x1 + 5, x2} nil_0_A = 5 append_2#!_A(x1,x2) = 0 cons_2!_A(x1,x2) = max{0, x1 - 17, x2 - 29} append_2!_A(x1,x2) = max{18, x1 + 6, x2 + 1} nil_0!_A = 1 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: append_2#_A(x1,x2) = max{0, x1 - 3} cons_2_A(x1,x2) = max{4, x1 - 8, x2 + 2} append_2_A(x1,x2) = max{x1, x2 + 25} nil_0_A = 21 append_2#!_A(x1,x2) = max{11, x1 + 7} cons_2!_A(x1,x2) = max{11, x1 - 15, x2 + 7} append_2!_A(x1,x2) = max{0, x1 - 25} nil_0!_A = 0 partial status: pi(append_2#) = [] pi(cons_2) = [1] pi(append_2) = [1, 2] pi(nil_0) = [] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: append_2#(cons_2(h,t),l) -> append_2#(t,l) p2: append_2#(append_2(l1,l2),l3) -> append_2#(l1,append_2(l2,l3)) and R consists of: r1: app(append_0(),y) -> append_1(y) r2: app(append_1(x1),y) -> append_2(x1,y) r3: app(cons_0(),y) -> cons_1(y) r4: app(cons_1(x1),y) -> cons_2(x1,y) r5: app(map_0(),y) -> map_1(y) r6: app(map_1(x1),y) -> map_2(x1,y) r7: append_2(nil_0(),l) -> l r8: append_2(cons_2(h,t),l) -> cons_2(h,append_2(t,l)) r9: map_2(f,nil_0()) -> nil_0() r10: map_2(f,cons_2(h,t)) -> cons_2(app(f,h),map_2(f,t)) r11: append_2(append_2(l1,l2),l3) -> append_2(l1,append_2(l2,l3)) r12: map_2(f,append_2(l1,l2)) -> append_2(map_2(f,l1),map_2(f,l2)) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: append_2#(cons_2(h,t),l) -> append_2#(t,l) p2: append_2#(append_2(l1,l2),l3) -> append_2#(l1,append_2(l2,l3)) and R consists of: r1: app(append_0(),y) -> append_1(y) r2: app(append_1(x1),y) -> append_2(x1,y) r3: app(cons_0(),y) -> cons_1(y) r4: app(cons_1(x1),y) -> cons_2(x1,y) r5: app(map_0(),y) -> map_1(y) r6: app(map_1(x1),y) -> map_2(x1,y) r7: append_2(nil_0(),l) -> l r8: append_2(cons_2(h,t),l) -> cons_2(h,append_2(t,l)) r9: map_2(f,nil_0()) -> nil_0() r10: map_2(f,cons_2(h,t)) -> cons_2(app(f,h),map_2(f,t)) r11: append_2(append_2(l1,l2),l3) -> append_2(l1,append_2(l2,l3)) r12: map_2(f,append_2(l1,l2)) -> append_2(map_2(f,l1),map_2(f,l2)) The set of usable rules consists of r7, r8, r11 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: append_2#_A(x1,x2) = max{0, x1 - 13, x2 - 25} cons_2_A(x1,x2) = max{4, x1 - 10, x2} append_2_A(x1,x2) = max{12, x1 + 8, x2} nil_0_A = 12 append_2#!_A(x1,x2) = max{7, x1 - 5, x2 - 28} cons_2!_A(x1,x2) = max{0, x1 - 25, x2 - 23} append_2!_A(x1,x2) = max{2, x1 - 15, x2 - 23} nil_0!_A = 0 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: append_2#_A(x1,x2) = max{0, x1 - 11, x2 - 15} cons_2_A(x1,x2) = max{5, x1 - 5, x2} append_2_A(x1,x2) = max{10, x1 + 4, x2} nil_0_A = 10 append_2#!_A(x1,x2) = max{5, x1 - 14, x2 - 21} cons_2!_A(x1,x2) = max{2, x1 - 32, x2 - 30} append_2!_A(x1,x2) = max{4, x1 - 14, x2 - 18} nil_0!_A = 0 partial status: pi(append_2#) = [1] pi(cons_2) = [1, 2] pi(append_2) = [1, 2] pi(nil_0) = [] The following rules are removed: p1, p2 Then no dependency pair remains.