YES We show the termination of the TRS R: app(app(filter(),f),nil()) -> nil() app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) p2: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(app(filtersub(),app(f,y)),f) p3: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(filtersub(),app(f,y)) p4: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(f,y) p5: app#(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app#(app(cons(),y),app(app(filter(),f),ys)) p6: app#(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) p7: app#(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app#(filter(),f) p8: app#(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) p9: app#(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app#(filter(),f) and R consists of: r1: app(app(filter(),f),nil()) -> nil() r2: app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) r3: app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) r4: app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) The estimated dependency graph contains the following SCCs: {p1, p4, p6, p8} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) p2: app#(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) p3: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(f,y) p4: app#(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) and R consists of: r1: app(app(filter(),f),nil()) -> nil() r2: app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) r3: app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) r4: app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) The set of usable rules consists of r1, r2, r3, r4 Take the reduction pair: lexicographic combination of reduction pairs: 1. max/plus interpretations on natural numbers: app#_A(x1,x2) = max{0, x1 - 1} app_A(x1,x2) = x2 + 27 filter_A = 5 cons_A = 17 filtersub_A = 0 false_A = 0 true_A = 0 nil_A = 34 2. max/plus interpretations on natural numbers: app#_A(x1,x2) = 0 app_A(x1,x2) = 1 filter_A = 0 cons_A = 0 filtersub_A = 0 false_A = 0 true_A = 0 nil_A = 0 The next rules are strictly ordered: p3 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) p2: app#(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) p3: app#(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) and R consists of: r1: app(app(filter(),f),nil()) -> nil() r2: app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) r3: app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) r4: app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) 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(),y),ys)) -> app#(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) p2: app#(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) p3: app#(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) and R consists of: r1: app(app(filter(),f),nil()) -> nil() r2: app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) r3: app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) r4: app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) The set of usable rules consists of r1, r2, r3, r4 Take the reduction pair: lexicographic combination of reduction pairs: 1. max/plus interpretations on natural numbers: app#_A(x1,x2) = max{0, x2 - 5} app_A(x1,x2) = x2 + 10 filter_A = 7 cons_A = 11 filtersub_A = 14 true_A = 0 false_A = 12 nil_A = 9 2. max/plus interpretations on natural numbers: app#_A(x1,x2) = 0 app_A(x1,x2) = 1 filter_A = 0 cons_A = 0 filtersub_A = 0 true_A = 0 false_A = 0 nil_A = 0 The next rules are strictly ordered: p2, p3 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) and R consists of: r1: app(app(filter(),f),nil()) -> nil() r2: app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) r3: app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) r4: app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) The estimated dependency graph contains the following SCCs: (no SCCs)