YES We show the termination of the TRS R: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) 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(filter(),f),nil()) -> nil() app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),x),app(app(|:|(),y),z)) p2: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),y),z) p3: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(|:|(),y) p4: app#(app(|:|(),app(app(+(),x),y)),z) -> app#(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) p5: app#(app(|:|(),app(app(+(),x),y)),z) -> app#(+(),app(app(|:|(),x),z)) p6: app#(app(|:|(),app(app(+(),x),y)),z) -> app#(app(|:|(),x),z) p7: app#(app(|:|(),app(app(+(),x),y)),z) -> app#(|:|(),x) p8: app#(app(|:|(),app(app(+(),x),y)),z) -> app#(app(|:|(),y),z) p9: app#(app(|:|(),app(app(+(),x),y)),z) -> app#(|:|(),y) p10: app#(app(|:|(),z),app(app(+(),x),app(f,y))) -> app#(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) p11: app#(app(|:|(),z),app(app(+(),x),app(f,y))) -> app#(|:|(),app(app(g(),z),y)) p12: app#(app(|:|(),z),app(app(+(),x),app(f,y))) -> app#(app(g(),z),y) p13: app#(app(|:|(),z),app(app(+(),x),app(f,y))) -> app#(g(),z) p14: app#(app(|:|(),z),app(app(+(),x),app(f,y))) -> app#(app(+(),x),a()) p15: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(cons(),app(f,x)),app(app(map(),f),xs)) p16: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(cons(),app(f,x)) p17: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(f,x) p18: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) p19: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(app(app(app(filter2(),app(f,x)),f),x),xs) p20: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(app(app(filter2(),app(f,x)),f),x) p21: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(app(filter2(),app(f,x)),f) p22: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(filter2(),app(f,x)) p23: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(f,x) p24: app#(app(app(app(filter2(),true()),f),x),xs) -> app#(app(cons(),x),app(app(filter(),f),xs)) p25: app#(app(app(app(filter2(),true()),f),x),xs) -> app#(cons(),x) p26: app#(app(app(app(filter2(),true()),f),x),xs) -> app#(app(filter(),f),xs) p27: app#(app(app(app(filter2(),true()),f),x),xs) -> app#(filter(),f) p28: app#(app(app(app(filter2(),false()),f),x),xs) -> app#(app(filter(),f),xs) p29: app#(app(app(app(filter2(),false()),f),x),xs) -> app#(filter(),f) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The estimated dependency graph contains the following SCCs: {p17, p18, p19, p23, p26, p28} {p1, p2, p6, p8} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(f,x) p2: app#(app(app(app(filter2(),false()),f),x),xs) -> app#(app(filter(),f),xs) p3: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(app(app(app(filter2(),app(f,x)),f),x),xs) p4: app#(app(app(app(filter2(),true()),f),x),xs) -> app#(app(filter(),f),xs) p5: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) p6: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(f,x) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The set of usable rules consists of r6 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = x2 + 2 app_A(x1,x2) = max{x1 - 21, x2 + 27} filter_A = 5 cons_A = 55 filter2_A = 41 false_A = 21 true_A = 7 map_A = 96 nil_A = 4 base order 2: precedence: map > cons > filter2 > app# = app > false = true > filter > nil partial status: pi(app#) = [2] pi(app) = [] pi(filter) = [] pi(cons) = [] pi(filter2) = [] pi(false) = [] pi(true) = [] pi(map) = [] pi(nil) = [] The following rules are removed: p6 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(f,x) p2: app#(app(app(app(filter2(),false()),f),x),xs) -> app#(app(filter(),f),xs) p3: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(app(app(app(filter2(),app(f,x)),f),x),xs) p4: app#(app(app(app(filter2(),true()),f),x),xs) -> app#(app(filter(),f),xs) p5: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4} {p5} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(f,x) p2: app#(app(app(app(filter2(),true()),f),x),xs) -> app#(app(filter(),f),xs) p3: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(app(app(app(filter2(),app(f,x)),f),x),xs) p4: app#(app(app(app(filter2(),false()),f),x),xs) -> app#(app(filter(),f),xs) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The set of usable rules consists of r6 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = max{11, x2 + 7} app_A(x1,x2) = max{x1 - 19, x2 + 26} filter_A = 9 cons_A = 104 filter2_A = 17 true_A = 10 false_A = 10 nil_A = 8 base order 2: precedence: cons > true > app > app# > filter2 > filter > false = nil partial status: pi(app#) = [2] pi(app) = [] pi(filter) = [] pi(cons) = [] pi(filter2) = [] pi(true) = [] pi(false) = [] pi(nil) = [] The following rules are removed: p3 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(f,x) p2: app#(app(app(app(filter2(),true()),f),x),xs) -> app#(app(filter(),f),xs) p3: app#(app(app(app(filter2(),false()),f),x),xs) -> app#(app(filter(),f),xs) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The estimated dependency graph contains the following SCCs: {p1, p2, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(f,x) p2: app#(app(app(app(filter2(),false()),f),x),xs) -> app#(app(filter(),f),xs) p3: app#(app(app(app(filter2(),true()),f),x),xs) -> app#(app(filter(),f),xs) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The set of usable rules consists of r6 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = x2 + 7 app_A(x1,x2) = max{x1 - 17, x2 + 25} filter_A = 6 cons_A = 30 filter2_A = 31 false_A = 4 true_A = 24 nil_A = 2 base order 2: precedence: false = true > app = filter = filter2 > app# > cons > nil partial status: pi(app#) = [2] pi(app) = [] pi(filter) = [] pi(cons) = [] pi(filter2) = [] pi(false) = [] pi(true) = [] pi(nil) = [] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(app(app(filter2(),false()),f),x),xs) -> app#(app(filter(),f),xs) p2: app#(app(app(app(filter2(),true()),f),x),xs) -> app#(app(filter(),f),xs) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The set of usable rules consists of r3, r6 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = max{x1 - 2, x2 + 74} app_A(x1,x2) = max{14, x1 - 31, x2 + 5} map_A = 45 cons_A = 1 |:|_A = 12 +_A = 13 g_A = 25 a_A = 6 filter_A = 7 nil_A = 6 base order 2: precedence: g > app# = app = map > + > cons = |:| = filter > a = nil partial status: pi(app#) = [2] pi(app) = [] pi(map) = [] pi(cons) = [] pi(|:|) = [] pi(+) = [] pi(g) = [] pi(a) = [] pi(filter) = [] pi(nil) = [] 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: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),x),app(app(|:|(),y),z)) p2: app#(app(|:|(),app(app(+(),x),y)),z) -> app#(app(|:|(),y),z) p3: app#(app(|:|(),app(app(+(),x),y)),z) -> app#(app(|:|(),x),z) p4: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),y),z) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The set of usable rules consists of r6 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = x1 + 75 app_A(x1,x2) = max{x1 - 25, x2 + 28} |:|_A = 9 +_A = 5 filter_A = 23 nil_A = 16 base order 2: precedence: app# > app > |:| > + = filter > nil partial status: pi(app#) = [] pi(app) = [] pi(|:|) = [] pi(+) = [] pi(filter) = [] pi(nil) = [] The following rules are removed: p3 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),x),app(app(|:|(),y),z)) p2: app#(app(|:|(),app(app(+(),x),y)),z) -> app#(app(|:|(),y),z) p3: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),y),z) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The estimated dependency graph contains the following SCCs: {p1, p2, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),x),app(app(|:|(),y),z)) p2: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),y),z) p3: app#(app(|:|(),app(app(+(),x),y)),z) -> app#(app(|:|(),y),z) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The set of usable rules consists of r6 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = x1 + 19 app_A(x1,x2) = max{x1 - 16, x2 + 36} |:|_A = 11 +_A = 8 filter_A = 58 nil_A = 13 base order 2: precedence: app# = app > |:| > filter > + = nil partial status: pi(app#) = [1] pi(app) = [] pi(|:|) = [] pi(+) = [] pi(filter) = [] pi(nil) = [] The following rules are removed: p3 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),x),app(app(|:|(),y),z)) p2: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),y),z) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),x),app(app(|:|(),y),z)) p2: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),y),z) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The set of usable rules consists of r6 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = x1 + 10 app_A(x1,x2) = max{x1 - 53, x2 + 69} |:|_A = 45 filter_A = 1 nil_A = 0 base order 2: precedence: app > app# > |:| > filter > nil partial status: pi(app#) = [1] pi(app) = [] pi(|:|) = [] pi(filter) = [] pi(nil) = [] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),x),app(app(|:|(),y),z)) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),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: app#(app(|:|(),app(app(|:|(),x),y)),z) -> app#(app(|:|(),x),app(app(|:|(),y),z)) and R consists of: r1: app(app(|:|(),app(app(|:|(),x),y)),z) -> app(app(|:|(),x),app(app(|:|(),y),z)) r2: app(app(|:|(),app(app(+(),x),y)),z) -> app(app(+(),app(app(|:|(),x),z)),app(app(|:|(),y),z)) r3: app(app(|:|(),z),app(app(+(),x),app(f,y))) -> app(app(|:|(),app(app(g(),z),y)),app(app(+(),x),a())) r4: app(app(map(),f),nil()) -> nil() r5: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) r6: app(app(filter(),f),nil()) -> nil() r7: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(app(filter2(),app(f,x)),f),x),xs) r8: app(app(app(app(filter2(),true()),f),x),xs) -> app(app(cons(),x),app(app(filter(),f),xs)) r9: app(app(app(app(filter2(),false()),f),x),xs) -> app(app(filter(),f),xs) The set of usable rules consists of r6 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = max{1, x1 - 57} app_A(x1,x2) = max{33, x1 + 4, x2 + 23} |:|_A = 19 filter_A = 61 nil_A = 13 base order 2: precedence: app > app# = |:| > filter > nil partial status: pi(app#) = [] pi(app) = [1, 2] pi(|:|) = [] pi(filter) = [] pi(nil) = [] The following rules are removed: p1 Then no dependency pair remains.