YES We show the termination of the TRS R: app(id(),x) -> x app(add(),|0|()) -> id() app(app(add(),app(s(),x)),y) -> app(s(),app(app(add(),x),y)) app(app(map(),f),nil()) -> nil() app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) Instead we prove termination of the uncurried system: app(add_0(),y) -> add_1(y) app(add_1(x1),y) -> add_2(x1,y) app(cons_0(),y) -> cons_1(y) app(cons_1(x1),y) -> cons_2(x1,y) app(id_0(),y) -> id_1(y) app(map_0(),y) -> map_1(y) app(map_1(x1),y) -> map_2(x1,y) app(s_0(),y) -> s_1(y) id_1(x) -> x add_1(|0|_0()) -> id_0() add_2(|0|_0(),y1) -> id_1(y1) add_2(s_1(x),y) -> s_1(add_2(x,y)) map_2(f,nil_0()) -> nil_0() map_2(f,cons_2(x,xs)) -> cons_2(app(f,x),map_2(f,xs)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(add_0(),y) -> add_1#(y) p2: app#(add_1(x1),y) -> add_2#(x1,y) p3: app#(id_0(),y) -> id_1#(y) p4: app#(map_1(x1),y) -> map_2#(x1,y) p5: add_2#(|0|_0(),y1) -> id_1#(y1) p6: add_2#(s_1(x),y) -> add_2#(x,y) p7: map_2#(f,cons_2(x,xs)) -> app#(f,x) p8: map_2#(f,cons_2(x,xs)) -> map_2#(f,xs) and R consists of: r1: app(add_0(),y) -> add_1(y) r2: app(add_1(x1),y) -> add_2(x1,y) r3: app(cons_0(),y) -> cons_1(y) r4: app(cons_1(x1),y) -> cons_2(x1,y) r5: app(id_0(),y) -> id_1(y) r6: app(map_0(),y) -> map_1(y) r7: app(map_1(x1),y) -> map_2(x1,y) r8: app(s_0(),y) -> s_1(y) r9: id_1(x) -> x r10: add_1(|0|_0()) -> id_0() r11: add_2(|0|_0(),y1) -> id_1(y1) r12: add_2(s_1(x),y) -> s_1(add_2(x,y)) r13: map_2(f,nil_0()) -> nil_0() r14: map_2(f,cons_2(x,xs)) -> cons_2(app(f,x),map_2(f,xs)) The estimated dependency graph contains the following SCCs: {p4, p7, p8} {p6} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: map_2#(f,cons_2(x,xs)) -> app#(f,x) p2: app#(map_1(x1),y) -> map_2#(x1,y) p3: map_2#(f,cons_2(x,xs)) -> map_2#(f,xs) and R consists of: r1: app(add_0(),y) -> add_1(y) r2: app(add_1(x1),y) -> add_2(x1,y) r3: app(cons_0(),y) -> cons_1(y) r4: app(cons_1(x1),y) -> cons_2(x1,y) r5: app(id_0(),y) -> id_1(y) r6: app(map_0(),y) -> map_1(y) r7: app(map_1(x1),y) -> map_2(x1,y) r8: app(s_0(),y) -> s_1(y) r9: id_1(x) -> x r10: add_1(|0|_0()) -> id_0() r11: add_2(|0|_0(),y1) -> id_1(y1) r12: add_2(s_1(x),y) -> s_1(add_2(x,y)) r13: map_2(f,nil_0()) -> nil_0() r14: map_2(f,cons_2(x,xs)) -> cons_2(app(f,x),map_2(f,xs)) The set of usable rules consists of r8 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: map_2#_A(x1,x2) = 1 cons_2_A(x1,x2) = max{3, x1 - 12, x2 - 12} app#_A(x1,x2) = 1 map_1_A(x1) = max{8, x1 - 2} app_A(x1,x2) = max{11, x1 - 7, x2 + 4} s_0_A = 4 s_1_A(x1) = max{5, x1 - 13} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: map_2#_A(x1,x2) = max{0, x1 - 16, x2 - 18} cons_2_A(x1,x2) = max{x1 + 17, x2 + 3} app#_A(x1,x2) = max{0, x1 - 16, x2 - 1} map_1_A(x1) = x1 + 15 app_A(x1,x2) = max{4, x1 - 34, x2 - 19} s_0_A = 6 s_1_A(x1) = max{0, x1 - 19} map_2#!_A(x1,x2) = max{3, x2 + 1} cons_2!_A(x1,x2) = max{6, x1 + 4} app#!_A(x1,x2) = max{5, x2 + 2} map_1!_A(x1) = max{0, x1 - 32} app!_A(x1,x2) = max{8, x1 - 7, x2 - 2} s_0!_A = 1 s_1!_A(x1) = max{2, x1 - 29} partial status: pi(map_2#) = [] pi(cons_2) = [] pi(app#) = [] pi(map_1) = [] pi(app) = [2] pi(s_0) = [] pi(s_1) = [] 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: add_2#(s_1(x),y) -> add_2#(x,y) and R consists of: r1: app(add_0(),y) -> add_1(y) r2: app(add_1(x1),y) -> add_2(x1,y) r3: app(cons_0(),y) -> cons_1(y) r4: app(cons_1(x1),y) -> cons_2(x1,y) r5: app(id_0(),y) -> id_1(y) r6: app(map_0(),y) -> map_1(y) r7: app(map_1(x1),y) -> map_2(x1,y) r8: app(s_0(),y) -> s_1(y) r9: id_1(x) -> x r10: add_1(|0|_0()) -> id_0() r11: add_2(|0|_0(),y1) -> id_1(y1) r12: add_2(s_1(x),y) -> s_1(add_2(x,y)) r13: map_2(f,nil_0()) -> nil_0() r14: map_2(f,cons_2(x,xs)) -> cons_2(app(f,x),map_2(f,xs)) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: add_2#_A(x1,x2) = max{4, x1 + 1} s_1_A(x1) = max{6, x1 + 5} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: add_2#_A(x1,x2) = 0 s_1_A(x1) = max{4, x1 - 1} add_2#!_A(x1,x2) = x1 + 5 s_1!_A(x1) = 2 partial status: pi(add_2#) = [1] pi(s_1) = [] The following rules are removed: p1 Then no dependency pair remains.