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 r1, r2, r3, r5, r6, r8, r9 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: app#_A(x1,x2) = x1 + 3 filter_1_A(x1) = x1 + 5 filter_2#_A(x1,x2) = x1 + 4 cons_2_A(x1,x2) = x2 + 2 app_A(x1,x2) = x2 + 9 cons_0_A() = 2 cons_1_A(x1) = 1 filter_0_A() = 1 if_0_A() = 3 if_1_A(x1) = 2 if_2_A(x1,x2) = 1 if_3_A(x1,x2,x3) = x1 + x2 + x3 + 10 true_0_A() = 1 false_0_A() = 1 base order 2: precedence: if_3 > app# = app = if_0 = true_0 = false_0 > cons_2 = cons_0 = if_1 > cons_1 = if_2 > filter_1 > filter_2# = filter_0 partial status: pi(app#) = [] pi(filter_1) = [] pi(filter_2#) = [] pi(cons_2) = [] pi(app) = [2] pi(cons_0) = [] pi(cons_1) = [] pi(filter_0) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(if_3) = [] pi(true_0) = [] pi(false_0) = [] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: filter_2#(f,cons_2(x,xs)) -> filter_2#(f,xs) p2: 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 estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: 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 set of usable rules consists of r1, r3, r5, r6, r8, r9 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: filter_2#_A(x1,x2) = x2 cons_2_A(x1,x2) = x1 + x2 + 4 app_A(x1,x2) = x2 + 3 cons_0_A() = 1 cons_1_A(x1) = 2 filter_0_A() = 2 filter_1_A(x1) = 1 if_0_A() = 3 if_1_A(x1) = 2 if_2_A(x1,x2) = 1 if_3_A(x1,x2,x3) = x1 + x2 + x3 true_0_A() = 1 false_0_A() = 1 base order 2: precedence: if_3 > app = filter_0 = if_0 = true_0 = false_0 > cons_2 = if_1 > filter_2# = cons_1 = filter_1 = if_2 > cons_0 partial status: pi(filter_2#) = [2] pi(cons_2) = [1, 2] pi(app) = [] pi(cons_0) = [] pi(cons_1) = [] pi(filter_0) = [] pi(filter_1) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(if_3) = [1, 2] pi(true_0) = [] pi(false_0) = [] The following rules are removed: p1 Then no dependency pair remains.