YES We show the termination of the TRS R: 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)) app(app(le(),|0|()),y) -> true() app(app(le(),app(s(),x)),|0|()) -> false() app(app(le(),app(s(),x)),app(s(),y)) -> app(app(le(),x),y) app(app(maxlist(),x),app(app(cons(),y),ys)) -> app(app(if(),app(app(le(),x),y)),app(app(maxlist(),y),ys)) app(app(maxlist(),x),nil()) -> x app(height(),app(app(node(),x),xs)) -> app(s(),app(app(maxlist(),|0|()),app(app(map(),height()),xs))) Instead we prove termination of the uncurried system: app(cons_0(),y) -> cons_1(y) app(cons_1(x1),y) -> cons_2(x1,y) app(height_0(),y) -> height_1(y) app(if_0(),y) -> if_1(y) app(if_1(x1),y) -> if_2(x1,y) app(le_0(),y) -> le_1(y) app(le_1(x1),y) -> le_2(x1,y) app(map_0(),y) -> map_1(y) app(map_1(x1),y) -> map_2(x1,y) app(maxlist_0(),y) -> maxlist_1(y) app(maxlist_1(x1),y) -> maxlist_2(x1,y) app(node_0(),y) -> node_1(y) app(node_1(x1),y) -> node_2(x1,y) app(s_0(),y) -> s_1(y) map_2(f,nil_0()) -> nil_0() map_2(f,cons_2(x,xs)) -> cons_2(app(f,x),map_2(f,xs)) le_2(|0|_0(),y) -> true_0() le_2(s_1(x),|0|_0()) -> false_0() le_2(s_1(x),s_1(y)) -> le_2(x,y) maxlist_2(x,cons_2(y,ys)) -> if_2(le_2(x,y),maxlist_2(y,ys)) maxlist_2(x,nil_0()) -> x height_1(node_2(x,xs)) -> s_1(maxlist_2(|0|_0(),map_2(height_0(),xs))) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(height_0(),y) -> height_1#(y) p2: app#(le_1(x1),y) -> le_2#(x1,y) p3: app#(map_1(x1),y) -> map_2#(x1,y) p4: app#(maxlist_1(x1),y) -> maxlist_2#(x1,y) p5: map_2#(f,cons_2(x,xs)) -> app#(f,x) p6: map_2#(f,cons_2(x,xs)) -> map_2#(f,xs) p7: le_2#(s_1(x),s_1(y)) -> le_2#(x,y) p8: maxlist_2#(x,cons_2(y,ys)) -> le_2#(x,y) p9: maxlist_2#(x,cons_2(y,ys)) -> maxlist_2#(y,ys) p10: height_1#(node_2(x,xs)) -> maxlist_2#(|0|_0(),map_2(height_0(),xs)) p11: height_1#(node_2(x,xs)) -> map_2#(height_0(),xs) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(height_0(),y) -> height_1(y) r4: app(if_0(),y) -> if_1(y) r5: app(if_1(x1),y) -> if_2(x1,y) r6: app(le_0(),y) -> le_1(y) r7: app(le_1(x1),y) -> le_2(x1,y) r8: app(map_0(),y) -> map_1(y) r9: app(map_1(x1),y) -> map_2(x1,y) r10: app(maxlist_0(),y) -> maxlist_1(y) r11: app(maxlist_1(x1),y) -> maxlist_2(x1,y) r12: app(node_0(),y) -> node_1(y) r13: app(node_1(x1),y) -> node_2(x1,y) r14: app(s_0(),y) -> s_1(y) r15: map_2(f,nil_0()) -> nil_0() r16: map_2(f,cons_2(x,xs)) -> cons_2(app(f,x),map_2(f,xs)) r17: le_2(|0|_0(),y) -> true_0() r18: le_2(s_1(x),|0|_0()) -> false_0() r19: le_2(s_1(x),s_1(y)) -> le_2(x,y) r20: maxlist_2(x,cons_2(y,ys)) -> if_2(le_2(x,y),maxlist_2(y,ys)) r21: maxlist_2(x,nil_0()) -> x r22: height_1(node_2(x,xs)) -> s_1(maxlist_2(|0|_0(),map_2(height_0(),xs))) The estimated dependency graph contains the following SCCs: {p1, p3, p5, p6, p11} {p9} {p7} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(height_0(),y) -> height_1#(y) p2: height_1#(node_2(x,xs)) -> map_2#(height_0(),xs) p3: map_2#(f,cons_2(x,xs)) -> map_2#(f,xs) p4: map_2#(f,cons_2(x,xs)) -> app#(f,x) p5: app#(map_1(x1),y) -> map_2#(x1,y) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(height_0(),y) -> height_1(y) r4: app(if_0(),y) -> if_1(y) r5: app(if_1(x1),y) -> if_2(x1,y) r6: app(le_0(),y) -> le_1(y) r7: app(le_1(x1),y) -> le_2(x1,y) r8: app(map_0(),y) -> map_1(y) r9: app(map_1(x1),y) -> map_2(x1,y) r10: app(maxlist_0(),y) -> maxlist_1(y) r11: app(maxlist_1(x1),y) -> maxlist_2(x1,y) r12: app(node_0(),y) -> node_1(y) r13: app(node_1(x1),y) -> node_2(x1,y) r14: app(s_0(),y) -> s_1(y) r15: map_2(f,nil_0()) -> nil_0() r16: map_2(f,cons_2(x,xs)) -> cons_2(app(f,x),map_2(f,xs)) r17: le_2(|0|_0(),y) -> true_0() r18: le_2(s_1(x),|0|_0()) -> false_0() r19: le_2(s_1(x),s_1(y)) -> le_2(x,y) r20: maxlist_2(x,cons_2(y,ys)) -> if_2(le_2(x,y),maxlist_2(y,ys)) r21: maxlist_2(x,nil_0()) -> x r22: height_1(node_2(x,xs)) -> s_1(maxlist_2(|0|_0(),map_2(height_0(),xs))) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: app#_A(x1,x2) = x1 + x2 + 5 height_0_A() = 1 height_1#_A(x1) = x1 + 2 node_2_A(x1,x2) = x1 + x2 + 7 map_2#_A(x1,x2) = x1 + x2 + 2 cons_2_A(x1,x2) = x1 + x2 + 4 map_1_A(x1) = x1 + 1 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: app#_A(x1,x2) = x1 + x2 height_0_A() = 1 height_1#_A(x1) = x1 node_2_A(x1,x2) = x2 + 7 map_2#_A(x1,x2) = x1 + x2 cons_2_A(x1,x2) = x1 + x2 + 5 map_1_A(x1) = x1 + 3 app#!_A(x1,x2) = x1 + 20 height_0!_A() = 6 height_1#!_A(x1) = 14 node_2!_A(x1,x2) = x2 + 14 map_2#!_A(x1,x2) = 13 cons_2!_A(x1,x2) = 19 map_1!_A(x1) = 1 partial status: pi(app#) = [] pi(height_0) = [] pi(height_1#) = [] pi(node_2) = [1] pi(map_2#) = [] pi(cons_2) = [] pi(map_1) = [] The following rules are removed: p1, p2, p3, p4, p5 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: maxlist_2#(x,cons_2(y,ys)) -> maxlist_2#(y,ys) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(height_0(),y) -> height_1(y) r4: app(if_0(),y) -> if_1(y) r5: app(if_1(x1),y) -> if_2(x1,y) r6: app(le_0(),y) -> le_1(y) r7: app(le_1(x1),y) -> le_2(x1,y) r8: app(map_0(),y) -> map_1(y) r9: app(map_1(x1),y) -> map_2(x1,y) r10: app(maxlist_0(),y) -> maxlist_1(y) r11: app(maxlist_1(x1),y) -> maxlist_2(x1,y) r12: app(node_0(),y) -> node_1(y) r13: app(node_1(x1),y) -> node_2(x1,y) r14: app(s_0(),y) -> s_1(y) r15: map_2(f,nil_0()) -> nil_0() r16: map_2(f,cons_2(x,xs)) -> cons_2(app(f,x),map_2(f,xs)) r17: le_2(|0|_0(),y) -> true_0() r18: le_2(s_1(x),|0|_0()) -> false_0() r19: le_2(s_1(x),s_1(y)) -> le_2(x,y) r20: maxlist_2(x,cons_2(y,ys)) -> if_2(le_2(x,y),maxlist_2(y,ys)) r21: maxlist_2(x,nil_0()) -> x r22: height_1(node_2(x,xs)) -> s_1(maxlist_2(|0|_0(),map_2(height_0(),xs))) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: maxlist_2#_A(x1,x2) = x2 cons_2_A(x1,x2) = x2 + 8 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: maxlist_2#_A(x1,x2) = 0 cons_2_A(x1,x2) = x1 + 7 maxlist_2#!_A(x1,x2) = 0 cons_2!_A(x1,x2) = 7 partial status: pi(maxlist_2#) = [] pi(cons_2) = [] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: le_2#(s_1(x),s_1(y)) -> le_2#(x,y) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(height_0(),y) -> height_1(y) r4: app(if_0(),y) -> if_1(y) r5: app(if_1(x1),y) -> if_2(x1,y) r6: app(le_0(),y) -> le_1(y) r7: app(le_1(x1),y) -> le_2(x1,y) r8: app(map_0(),y) -> map_1(y) r9: app(map_1(x1),y) -> map_2(x1,y) r10: app(maxlist_0(),y) -> maxlist_1(y) r11: app(maxlist_1(x1),y) -> maxlist_2(x1,y) r12: app(node_0(),y) -> node_1(y) r13: app(node_1(x1),y) -> node_2(x1,y) r14: app(s_0(),y) -> s_1(y) r15: map_2(f,nil_0()) -> nil_0() r16: map_2(f,cons_2(x,xs)) -> cons_2(app(f,x),map_2(f,xs)) r17: le_2(|0|_0(),y) -> true_0() r18: le_2(s_1(x),|0|_0()) -> false_0() r19: le_2(s_1(x),s_1(y)) -> le_2(x,y) r20: maxlist_2(x,cons_2(y,ys)) -> if_2(le_2(x,y),maxlist_2(y,ys)) r21: maxlist_2(x,nil_0()) -> x r22: height_1(node_2(x,xs)) -> s_1(maxlist_2(|0|_0(),map_2(height_0(),xs))) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: le_2#_A(x1,x2) = x1 + x2 + 4 s_1_A(x1) = x1 + 3 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: le_2#_A(x1,x2) = x1 + x2 s_1_A(x1) = x1 + 2 le_2#!_A(x1,x2) = x1 + x2 + 6 s_1!_A(x1) = 5 partial status: pi(le_2#) = [] pi(s_1) = [] The following rules are removed: p1 Then no dependency pair remains.