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 (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = max{8, x2 + 5} app_A(x1,x2) = max{x1 + 4, x2 + 12} filter_A = 4 cons_A = 29 filter2_A = 50 false_A = 43 true_A = 38 map_A = 58 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = 0 app_A(x1,x2) = 53 filter_A = 43 cons_A = 29 filter2_A = 0 false_A = 0 true_A = 0 map_A = 43 app#!_A(x1,x2) = 3 app!_A(x1,x2) = max{7, x1 - 44, x2 + 4} filter!_A = 1 cons!_A = 5 filter2!_A = 57 false!_A = 2 true!_A = 6 map!_A = 10 partial status: pi(app#) = [2] pi(app) = [1, 2] pi(filter) = [] pi(cons) = [] pi(filter2) = [] pi(false) = [] pi(true) = [] pi(map) = [] The following rules are removed: p1, p3, p5, p6 -- 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(|:|(),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 r4, r6 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = max{1, x1} app_A(x1,x2) = max{4, x1, x2} |:|_A = 5 +_A = 0 map_A = 5 nil_A = 1 filter_A = 2 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = 0 app_A(x1,x2) = max{34, x1 + 4, x2 + 15} |:|_A = 7 +_A = 26 map_A = 45 nil_A = 80 filter_A = 11 app#!_A(x1,x2) = 1 app!_A(x1,x2) = max{2, x1 - 4, x2 - 34} |:|!_A = 51 +!_A = 50 map!_A = 58 nil!_A = 46 filter!_A = 61 partial status: pi(app#) = [1] pi(app) = [] pi(|:|) = [] pi(+) = [] pi(map) = [] pi(nil) = [] pi(filter) = [] The following rules are removed: p1, p2, p3, p4 Then no dependency pair remains.