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