YES We show the termination of the TRS R: app(app(neq(),|0|()),|0|()) -> false() app(app(neq(),|0|()),app(s(),y)) -> true() app(app(neq(),app(s(),x)),|0|()) -> true() app(app(neq(),app(s(),x)),app(s(),y)) -> app(app(neq(),x),y) 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) nonzero() -> app(filter(),app(neq(),|0|())) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(neq(),app(s(),x)),app(s(),y)) -> app#(app(neq(),x),y) p2: app#(app(neq(),app(s(),x)),app(s(),y)) -> app#(neq(),x) p3: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) p4: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(app(filtersub(),app(f,y)),f) p5: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(filtersub(),app(f,y)) p6: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(f,y) p7: app#(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app#(app(cons(),y),app(app(filter(),f),ys)) p8: app#(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) p9: app#(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app#(filter(),f) p10: app#(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) p11: app#(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app#(filter(),f) p12: nonzero#() -> app#(filter(),app(neq(),|0|())) p13: nonzero#() -> app#(neq(),|0|()) and R consists of: r1: app(app(neq(),|0|()),|0|()) -> false() r2: app(app(neq(),|0|()),app(s(),y)) -> true() r3: app(app(neq(),app(s(),x)),|0|()) -> true() r4: app(app(neq(),app(s(),x)),app(s(),y)) -> app(app(neq(),x),y) r5: app(app(filter(),f),nil()) -> nil() r6: app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) r7: app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) r8: app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) r9: nonzero() -> app(filter(),app(neq(),|0|())) The estimated dependency graph contains the following SCCs: {p3, p6, p8, p10} {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(f,y) 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#(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) p4: app#(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) and R consists of: r1: app(app(neq(),|0|()),|0|()) -> false() r2: app(app(neq(),|0|()),app(s(),y)) -> true() r3: app(app(neq(),app(s(),x)),|0|()) -> true() r4: app(app(neq(),app(s(),x)),app(s(),y)) -> app(app(neq(),x),y) r5: app(app(filter(),f),nil()) -> nil() r6: app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) r7: app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) r8: app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) r9: nonzero() -> app(filter(),app(neq(),|0|())) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8 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),(0,0)) x1 + (4,6) app_A(x1,x2) = ((1,0),(0,0)) x2 + (5,1) filter_A() = (13,4) cons_A() = (1,2) filtersub_A() = (2,0) false_A() = (14,5) true_A() = (3,3) neq_A() = (1,0) |0|_A() = (15,6) s_A() = (2,0) nil_A() = (6,2) precedence: app# = filter > app = neq > |0| = s > false > cons = filtersub = nil > true partial status: pi(app#) = [] pi(app) = [] pi(filter) = [] pi(cons) = [] pi(filtersub) = [] pi(false) = [] pi(true) = [] pi(neq) = [] pi(|0|) = [] pi(s) = [] pi(nil) = [] 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) = (3,3) filter_A() = (0,0) cons_A() = (3,3) filtersub_A() = (4,4) false_A() = (4,4) true_A() = (4,4) neq_A() = (1,1) |0|_A() = (5,5) s_A() = (2,2) nil_A() = (1,1) precedence: true > neq > filtersub = |0| = s > nil > app# = app = filter = cons = false partial status: pi(app#) = [] pi(app) = [] pi(filter) = [] pi(cons) = [] pi(filtersub) = [] pi(false) = [] pi(true) = [] pi(neq) = [] pi(|0|) = [] pi(s) = [] pi(nil) = [] 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(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) p2: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),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(neq(),|0|()),|0|()) -> false() r2: app(app(neq(),|0|()),app(s(),y)) -> true() r3: app(app(neq(),app(s(),x)),|0|()) -> true() r4: app(app(neq(),app(s(),x)),app(s(),y)) -> app(app(neq(),x),y) r5: app(app(filter(),f),nil()) -> nil() r6: app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) r7: app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) r8: app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) r9: nonzero() -> app(filter(),app(neq(),|0|())) 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(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) p2: app#(app(filter(),f),app(app(cons(),y),ys)) -> app#(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),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(neq(),|0|()),|0|()) -> false() r2: app(app(neq(),|0|()),app(s(),y)) -> true() r3: app(app(neq(),app(s(),x)),|0|()) -> true() r4: app(app(neq(),app(s(),x)),app(s(),y)) -> app(app(neq(),x),y) r5: app(app(filter(),f),nil()) -> nil() r6: app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) r7: app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) r8: app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) r9: nonzero() -> app(filter(),app(neq(),|0|())) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8 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) = x2 app_A(x1,x2) = ((1,0),(1,1)) x2 filtersub_A() = (1,1) false_A() = (3,0) cons_A() = (0,3) filter_A() = (5,2) true_A() = (0,0) neq_A() = (4,1) |0|_A() = (4,1) s_A() = (5,2) nil_A() = (1,1) precedence: neq > app# = app = cons = filter = |0| > false > filtersub = true > s = nil partial status: pi(app#) = [2] pi(app) = [2] pi(filtersub) = [] pi(false) = [] pi(cons) = [] pi(filter) = [] pi(true) = [] pi(neq) = [] pi(|0|) = [] pi(s) = [] 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)) x2 + (12,5) app_A(x1,x2) = ((1,0),(0,0)) x2 + (4,3) filtersub_A() = (9,4) false_A() = (5,4) cons_A() = (3,0) filter_A() = (2,2) true_A() = (7,4) neq_A() = (1,1) |0|_A() = (8,5) s_A() = (2,2) nil_A() = (1,1) precedence: app# = true > false > s > |0| > filtersub > app = nil > neq > cons = filter partial status: pi(app#) = [] pi(app) = [] pi(filtersub) = [] pi(false) = [] pi(cons) = [] pi(filter) = [] pi(true) = [] pi(neq) = [] pi(|0|) = [] pi(s) = [] 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(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) p2: 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(neq(),|0|()),|0|()) -> false() r2: app(app(neq(),|0|()),app(s(),y)) -> true() r3: app(app(neq(),app(s(),x)),|0|()) -> true() r4: app(app(neq(),app(s(),x)),app(s(),y)) -> app(app(neq(),x),y) r5: app(app(filter(),f),nil()) -> nil() r6: app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) r7: app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) r8: app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) r9: nonzero() -> app(filter(),app(neq(),|0|())) 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(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app#(app(filter(),f),ys) p2: 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(neq(),|0|()),|0|()) -> false() r2: app(app(neq(),|0|()),app(s(),y)) -> true() r3: app(app(neq(),app(s(),x)),|0|()) -> true() r4: app(app(neq(),app(s(),x)),app(s(),y)) -> app(app(neq(),x),y) r5: app(app(filter(),f),nil()) -> nil() r6: app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) r7: app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) r8: app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) r9: nonzero() -> app(filter(),app(neq(),|0|())) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8 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)) x2 + (27,25) app_A(x1,x2) = ((0,0),(1,0)) x1 + ((1,0),(1,1)) x2 + (4,2) filtersub_A() = (0,24) false_A() = (22,0) cons_A() = (3,7) filter_A() = (15,23) neq_A() = (3,1) |0|_A() = (19,19) s_A() = (0,19) true_A() = (2,18) nil_A() = (1,1) precedence: filter > app# = app = neq = s > filtersub = |0| = true = nil > false = cons partial status: pi(app#) = [] pi(app) = [] pi(filtersub) = [] pi(false) = [] pi(cons) = [] pi(filter) = [] pi(neq) = [] pi(|0|) = [] pi(s) = [] pi(true) = [] pi(nil) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = (4,4) app_A(x1,x2) = (3,3) filtersub_A() = (4,4) false_A() = (5,5) cons_A() = (8,5) filter_A() = (0,0) neq_A() = (1,1) |0|_A() = (10,7) s_A() = (2,2) true_A() = (9,6) nil_A() = (1,1) precedence: neq > cons > |0| > s > false = true > filtersub > app# = app = nil > filter partial status: pi(app#) = [] pi(app) = [] pi(filtersub) = [] pi(false) = [] pi(cons) = [] pi(filter) = [] pi(neq) = [] pi(|0|) = [] pi(s) = [] pi(true) = [] pi(nil) = [] 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(),y),ys)) -> app#(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) and R consists of: r1: app(app(neq(),|0|()),|0|()) -> false() r2: app(app(neq(),|0|()),app(s(),y)) -> true() r3: app(app(neq(),app(s(),x)),|0|()) -> true() r4: app(app(neq(),app(s(),x)),app(s(),y)) -> app(app(neq(),x),y) r5: app(app(filter(),f),nil()) -> nil() r6: app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) r7: app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) r8: app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) r9: nonzero() -> app(filter(),app(neq(),|0|())) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(neq(),app(s(),x)),app(s(),y)) -> app#(app(neq(),x),y) and R consists of: r1: app(app(neq(),|0|()),|0|()) -> false() r2: app(app(neq(),|0|()),app(s(),y)) -> true() r3: app(app(neq(),app(s(),x)),|0|()) -> true() r4: app(app(neq(),app(s(),x)),app(s(),y)) -> app(app(neq(),x),y) r5: app(app(filter(),f),nil()) -> nil() r6: app(app(filter(),f),app(app(cons(),y),ys)) -> app(app(app(filtersub(),app(f,y)),f),app(app(cons(),y),ys)) r7: app(app(app(filtersub(),true()),f),app(app(cons(),y),ys)) -> app(app(cons(),y),app(app(filter(),f),ys)) r8: app(app(app(filtersub(),false()),f),app(app(cons(),y),ys)) -> app(app(filter(),f),ys) r9: nonzero() -> app(filter(),app(neq(),|0|())) 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) = ((0,0),(1,0)) x1 + ((1,0),(1,1)) x2 + (4,11) app_A(x1,x2) = ((0,0),(1,0)) x1 + x2 + (3,1) neq_A() = (5,5) s_A() = (6,4) precedence: app# > neq > app = s partial status: pi(app#) = [2] pi(app) = [2] pi(neq) = [] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: app#_A(x1,x2) = ((1,0),(1,1)) x2 app_A(x1,x2) = x2 + (3,0) neq_A() = (1,1) s_A() = (2,2) precedence: app# > app = neq = s partial status: pi(app#) = [] pi(app) = [2] pi(neq) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.