YES We show the termination of the TRS R: app(app(app(if(),true()),x),y) -> x app(app(app(if(),false()),x),y) -> y app(app(filter(),f),nil()) -> nil() app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(if(),app(f,x)),app(app(cons(),x),app(app(filter(),f),xs))),app(app(filter(),f),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(filter_0(),y) -> filter_1(y) app(filter_1(x1),y) -> filter_2(x1,y) app(if_0(),y) -> if_1(y) app(if_1(x1),y) -> if_2(x1,y) app(if_2(x1,x2),y) -> if_3(x1,x2,y) if_3(true_0(),x,y) -> x if_3(false_0(),x,y) -> y filter_2(f,nil_0()) -> nil_0() filter_2(f,cons_2(x,xs)) -> if_3(app(f,x),cons_2(x,filter_2(f,xs)),filter_2(f,xs)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(filter_1(x1),y) -> filter_2#(x1,y) p2: app#(if_2(x1,x2),y) -> if_3#(x1,x2,y) p3: filter_2#(f,cons_2(x,xs)) -> if_3#(app(f,x),cons_2(x,filter_2(f,xs)),filter_2(f,xs)) p4: filter_2#(f,cons_2(x,xs)) -> app#(f,x) p5: filter_2#(f,cons_2(x,xs)) -> filter_2#(f,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(filter_0(),y) -> filter_1(y) r4: app(filter_1(x1),y) -> filter_2(x1,y) r5: app(if_0(),y) -> if_1(y) r6: app(if_1(x1),y) -> if_2(x1,y) r7: app(if_2(x1,x2),y) -> if_3(x1,x2,y) r8: if_3(true_0(),x,y) -> x r9: if_3(false_0(),x,y) -> y r10: filter_2(f,nil_0()) -> nil_0() r11: filter_2(f,cons_2(x,xs)) -> if_3(app(f,x),cons_2(x,filter_2(f,xs)),filter_2(f,xs)) The estimated dependency graph contains the following SCCs: {p1, p4, p5} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(filter_1(x1),y) -> filter_2#(x1,y) p2: filter_2#(f,cons_2(x,xs)) -> filter_2#(f,xs) p3: filter_2#(f,cons_2(x,xs)) -> app#(f,x) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(filter_0(),y) -> filter_1(y) r4: app(filter_1(x1),y) -> filter_2(x1,y) r5: app(if_0(),y) -> if_1(y) r6: app(if_1(x1),y) -> if_2(x1,y) r7: app(if_2(x1,x2),y) -> if_3(x1,x2,y) r8: if_3(true_0(),x,y) -> x r9: if_3(false_0(),x,y) -> y r10: filter_2(f,nil_0()) -> nil_0() r11: filter_2(f,cons_2(x,xs)) -> if_3(app(f,x),cons_2(x,filter_2(f,xs)),filter_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: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: app#_A(x1,x2) = x2 + 4 filter_1_A(x1) = x1 + 2 filter_2#_A(x1,x2) = x2 + 3 cons_2_A(x1,x2) = x1 + x2 + 5 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = max{0, x1 - 5, x2 - 1} filter_1_A(x1) = max{4, x1} filter_2#_A(x1,x2) = max{0, x1 - 5, x2 - 12} cons_2_A(x1,x2) = max{x1 + 11, x2 + 8} app#!_A(x1,x2) = max{3, x1 - 5, x2 - 8} filter_1!_A(x1) = 6 filter_2#!_A(x1,x2) = max{1, x2 - 9} cons_2!_A(x1,x2) = max{x1 + 4, x2 - 8} partial status: pi(app#) = [] pi(filter_1) = [1] pi(filter_2#) = [] pi(cons_2) = [2] The following rules are removed: p1, p2, p3 Then no dependency pair remains.