YES We show the termination of the TRS R: app(app(app(if(),true()),x),y) -> x app(app(app(if(),false()),x),y) -> y app(app(filter(),f),nil()) -> nil() app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(if(),app(f,x)),app(app(cons(),x),app(app(filter(),f),xs))),app(app(filter(),f),xs)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(app(app(if(),app(f,x)),app(app(cons(),x),app(app(filter(),f),xs))),app(app(filter(),f),xs)) p2: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(app(if(),app(f,x)),app(app(cons(),x),app(app(filter(),f),xs))) p3: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(if(),app(f,x)) p4: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(f,x) p5: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(app(cons(),x),app(app(filter(),f),xs)) p6: app#(app(filter(),f),app(app(cons(),x),xs)) -> app#(app(filter(),f),xs) and R consists of: r1: app(app(app(if(),true()),x),y) -> x r2: app(app(app(if(),false()),x),y) -> y r3: app(app(filter(),f),nil()) -> nil() r4: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(if(),app(f,x)),app(app(cons(),x),app(app(filter(),f),xs))),app(app(filter(),f),xs)) The estimated dependency graph contains the following SCCs: {p4, p6} -- 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(filter(),f),app(app(cons(),x),xs)) -> app#(app(filter(),f),xs) and R consists of: r1: app(app(app(if(),true()),x),y) -> x r2: app(app(app(if(),false()),x),y) -> y r3: app(app(filter(),f),nil()) -> nil() r4: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(if(),app(f,x)),app(app(cons(),x),app(app(filter(),f),xs))),app(app(filter(),f),xs)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{x1 + 8, x2 - 4} app_A(x1,x2) = max{x1 + 6, x2 + 3} filter_A = 2 cons_A = 9 precedence: app# = app = filter = cons partial status: pi(app#) = [] pi(app) = [1, 2] pi(filter) = [] pi(cons) = [] The next rules are strictly ordered: p1 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(),x),xs)) -> app#(app(filter(),f),xs) and R consists of: r1: app(app(app(if(),true()),x),y) -> x r2: app(app(app(if(),false()),x),y) -> y r3: app(app(filter(),f),nil()) -> nil() r4: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(if(),app(f,x)),app(app(cons(),x),app(app(filter(),f),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(filter(),f),app(app(cons(),x),xs)) -> app#(app(filter(),f),xs) and R consists of: r1: app(app(app(if(),true()),x),y) -> x r2: app(app(app(if(),false()),x),y) -> y r3: app(app(filter(),f),nil()) -> nil() r4: app(app(filter(),f),app(app(cons(),x),xs)) -> app(app(app(if(),app(f,x)),app(app(cons(),x),app(app(filter(),f),xs))),app(app(filter(),f),xs)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{0, x2 - 5} app_A(x1,x2) = max{x1 + 7, x2 + 4} filter_A = 3 cons_A = 4 precedence: app# = app = filter = cons partial status: pi(app#) = [] pi(app) = [1, 2] pi(filter) = [] pi(cons) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.