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: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = ((1,0),(0,0)) x1 + (0,4) app_A(x1,x2) = ((1,0),(0,0)) x2 + (4,5) filter_A() = (6,2) cons_A() = (9,6) filtersub_A() = (6,1) false_A() = (7,6) true_A() = (7,3) nil_A() = (1,1) precedence: app# = app = filter = cons = filtersub > false = true = nil partial status: pi(app#) = [] pi(app) = [] pi(filter) = [] pi(cons) = [] pi(filtersub) = [] pi(false) = [] pi(true) = [] pi(nil) = [] 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: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = ((0,0),(1,0)) x1 + ((1,0),(1,1)) x2 + (4,1) app_A(x1,x2) = x2 + (5,12) filter_A() = (7,16) cons_A() = (11,25) filtersub_A() = (12,26) true_A() = (8,26) false_A() = (3,5) nil_A() = (6,13) precedence: app# = app = filter = cons = filtersub = true = false = nil partial status: pi(app#) = [2] pi(app) = [2] pi(filter) = [] pi(cons) = [] pi(filtersub) = [] pi(true) = [] pi(false) = [] pi(nil) = [] 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(),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} -- 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) 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: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = ((1,0),(1,1)) x2 + (3,4) app_A(x1,x2) = ((1,0),(1,1)) x2 + (4,5) filter_A() = (4,2) cons_A() = (1,1) filtersub_A() = (2,6) true_A() = (6,3) nil_A() = (1,1) false_A() = (0,6) precedence: filter = filtersub = true = nil > app# = app = false > cons partial status: pi(app#) = [] pi(app) = [] pi(filter) = [] pi(cons) = [] pi(filtersub) = [] pi(true) = [] pi(nil) = [] pi(false) = [] The next rules are strictly ordered: p2 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)