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. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = ((1,0),(1,1)) x1 + (3,0) app_A(x1,x2) = ((1,0),(1,1)) x2 + (4,0) filter_A() = (8,2) cons_A() = (2,1) filtersub_A() = (9,1) false_A() = (9,3) true_A() = (9,5) nil_A() = (1,1) precedence: app = filter > app# = cons = filtersub = true > false = nil partial status: pi(app#) = [1] pi(app) = [2] pi(filter) = [] pi(cons) = [] pi(filtersub) = [] pi(false) = [] pi(true) = [] pi(nil) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = ((0,0),(1,0)) x1 + (2,6) app_A(x1,x2) = ((1,0),(0,0)) x2 + (4,4) filter_A() = (6,2) cons_A() = (3,5) filtersub_A() = (1,1) false_A() = (7,3) true_A() = (7,3) nil_A() = (5,1) precedence: true > filter > nil > false > app# = cons > app = filtersub 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: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = x1 + ((1,0),(1,1)) x2 + (9,1) app_A(x1,x2) = x2 + (4,4) filter_A() = (11,2) cons_A() = (1,1) filtersub_A() = (2,3) true_A() = (3,6) false_A() = (8,0) nil_A() = (1,0) precedence: app# = app = filter = cons = filtersub = true = false = nil partial status: pi(app#) = [] pi(app) = [] pi(filter) = [] pi(cons) = [] pi(filtersub) = [] pi(true) = [] pi(false) = [] pi(nil) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = x1 + ((0,0),(1,0)) x2 app_A(x1,x2) = ((1,0),(0,0)) x2 + (1,2) filter_A() = (4,4) cons_A() = (4,4) filtersub_A() = (4,4) true_A() = (0,3) false_A() = (2,1) nil_A() = (0,3) precedence: false > true > nil > app# = app = filter = cons = filtersub partial status: pi(app#) = [1] pi(app) = [] 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: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = x1 + x2 + (6,0) app_A(x1,x2) = x2 filter_A() = (4,3) cons_A() = (1,1) filtersub_A() = (2,2) true_A() = (5,0) nil_A() = (1,0) false_A() = (1,0) precedence: app# = app = filter = cons = filtersub = true = nil = false partial status: pi(app#) = [] pi(app) = [] pi(filter) = [] pi(cons) = [] pi(filtersub) = [] pi(true) = [] pi(nil) = [] pi(false) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = ((1,0),(0,0)) x1 + x2 + (3,8) app_A(x1,x2) = x2 + (0,4) filter_A() = (1,2) cons_A() = (1,2) filtersub_A() = (1,2) true_A() = (2,3) nil_A() = (0,1) false_A() = (2,3) precedence: filtersub > true > nil > app# = app > filter > cons > false 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)