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|())) Instead we prove termination of the uncurried system: app(cons_0(),y) -> cons_1(y) app(cons_1(x1),y) -> cons_2(x1,y) app(filter_0(),y) -> filter_1(y) app(filter_1(x1),y) -> filter_2(x1,y) app(filtersub_0(),y) -> filtersub_1(y) app(filtersub_1(x1),y) -> filtersub_2(x1,y) app(filtersub_2(x1,x2),y) -> filtersub_3(x1,x2,y) app(neq_0(),y) -> neq_1(y) app(neq_1(x1),y) -> neq_2(x1,y) app(s_0(),y) -> s_1(y) neq_2(|0|_0(),|0|_0()) -> false_0() neq_2(|0|_0(),s_1(y)) -> true_0() neq_2(s_1(x),|0|_0()) -> true_0() neq_2(s_1(x),s_1(y)) -> neq_2(x,y) filter_2(f,nil_0()) -> nil_0() filter_2(f,cons_2(y,ys)) -> filtersub_3(app(f,y),f,cons_2(y,ys)) filtersub_3(true_0(),f,cons_2(y,ys)) -> cons_2(y,filter_2(f,ys)) filtersub_3(false_0(),f,cons_2(y,ys)) -> filter_2(f,ys) nonzero_0() -> filter_1(neq_1(|0|_0())) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(filter_1(x1),y) -> filter_2#(x1,y) p2: app#(filtersub_2(x1,x2),y) -> filtersub_3#(x1,x2,y) p3: app#(neq_1(x1),y) -> neq_2#(x1,y) p4: neq_2#(s_1(x),s_1(y)) -> neq_2#(x,y) p5: filter_2#(f,cons_2(y,ys)) -> filtersub_3#(app(f,y),f,cons_2(y,ys)) p6: filter_2#(f,cons_2(y,ys)) -> app#(f,y) p7: filtersub_3#(true_0(),f,cons_2(y,ys)) -> filter_2#(f,ys) p8: filtersub_3#(false_0(),f,cons_2(y,ys)) -> filter_2#(f,ys) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(filter_0(),y) -> filter_1(y) r4: app(filter_1(x1),y) -> filter_2(x1,y) r5: app(filtersub_0(),y) -> filtersub_1(y) r6: app(filtersub_1(x1),y) -> filtersub_2(x1,y) r7: app(filtersub_2(x1,x2),y) -> filtersub_3(x1,x2,y) r8: app(neq_0(),y) -> neq_1(y) r9: app(neq_1(x1),y) -> neq_2(x1,y) r10: app(s_0(),y) -> s_1(y) r11: neq_2(|0|_0(),|0|_0()) -> false_0() r12: neq_2(|0|_0(),s_1(y)) -> true_0() r13: neq_2(s_1(x),|0|_0()) -> true_0() r14: neq_2(s_1(x),s_1(y)) -> neq_2(x,y) r15: filter_2(f,nil_0()) -> nil_0() r16: filter_2(f,cons_2(y,ys)) -> filtersub_3(app(f,y),f,cons_2(y,ys)) r17: filtersub_3(true_0(),f,cons_2(y,ys)) -> cons_2(y,filter_2(f,ys)) r18: filtersub_3(false_0(),f,cons_2(y,ys)) -> filter_2(f,ys) r19: nonzero_0() -> filter_1(neq_1(|0|_0())) The estimated dependency graph contains the following SCCs: {p1, p2, p5, p6, p7, p8} {p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(filter_1(x1),y) -> filter_2#(x1,y) p2: filter_2#(f,cons_2(y,ys)) -> app#(f,y) p3: app#(filtersub_2(x1,x2),y) -> filtersub_3#(x1,x2,y) p4: filtersub_3#(false_0(),f,cons_2(y,ys)) -> filter_2#(f,ys) p5: filter_2#(f,cons_2(y,ys)) -> filtersub_3#(app(f,y),f,cons_2(y,ys)) p6: filtersub_3#(true_0(),f,cons_2(y,ys)) -> filter_2#(f,ys) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(filter_0(),y) -> filter_1(y) r4: app(filter_1(x1),y) -> filter_2(x1,y) r5: app(filtersub_0(),y) -> filtersub_1(y) r6: app(filtersub_1(x1),y) -> filtersub_2(x1,y) r7: app(filtersub_2(x1,x2),y) -> filtersub_3(x1,x2,y) r8: app(neq_0(),y) -> neq_1(y) r9: app(neq_1(x1),y) -> neq_2(x1,y) r10: app(s_0(),y) -> s_1(y) r11: neq_2(|0|_0(),|0|_0()) -> false_0() r12: neq_2(|0|_0(),s_1(y)) -> true_0() r13: neq_2(s_1(x),|0|_0()) -> true_0() r14: neq_2(s_1(x),s_1(y)) -> neq_2(x,y) r15: filter_2(f,nil_0()) -> nil_0() r16: filter_2(f,cons_2(y,ys)) -> filtersub_3(app(f,y),f,cons_2(y,ys)) r17: filtersub_3(true_0(),f,cons_2(y,ys)) -> cons_2(y,filter_2(f,ys)) r18: filtersub_3(false_0(),f,cons_2(y,ys)) -> filter_2(f,ys) r19: nonzero_0() -> filter_1(neq_1(|0|_0())) The set of usable rules consists of r3, r15 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = 1 filter_1_A(x1) = max{8, x1} filter_2#_A(x1,x2) = 1 cons_2_A(x1,x2) = max{25, x1 + 4, x2} filtersub_2_A(x1,x2) = max{16, x1 - 25, x2 - 9} filtersub_3#_A(x1,x2,x3) = 1 false_0_A = 25 app_A(x1,x2) = max{23, x1 + 7, x2} true_0_A = 23 filter_0_A = 0 filter_2_A(x1,x2) = x2 + 1 nil_0_A = 30 app#!_A(x1,x2) = max{24, x2 + 3} filter_1!_A(x1) = 2 filter_2#!_A(x1,x2) = max{0, x2 - 1} cons_2!_A(x1,x2) = 27 filtersub_2!_A(x1,x2) = max{40, x1 + 29} filtersub_3#!_A(x1,x2,x3) = max{1, x3 - 1} false_0!_A = 0 app!_A(x1,x2) = max{x1 + 31, x2 + 5} true_0!_A = 28 filter_0!_A = 3 filter_2!_A(x1,x2) = max{29, x1 + 12, x2 + 1} nil_0!_A = 30 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = max{2, x2 - 1} filter_1_A(x1) = 5 filter_2#_A(x1,x2) = max{1, x2 - 21} cons_2_A(x1,x2) = max{23, x1 + 20, x2 + 18} filtersub_2_A(x1,x2) = max{6, x1 + 4, x2 + 4} filtersub_3#_A(x1,x2,x3) = max{2, x3 - 21} false_0_A = 27 app_A(x1,x2) = 5 true_0_A = 31 filter_0_A = 0 filter_2_A(x1,x2) = 7 nil_0_A = 0 app#!_A(x1,x2) = max{33, x2 + 20} filter_1!_A(x1) = 30 filter_2#!_A(x1,x2) = max{21, x2 + 16} cons_2!_A(x1,x2) = x2 + 18 filtersub_2!_A(x1,x2) = max{31, x1 - 1} filtersub_3#!_A(x1,x2,x3) = max{32, x3 - 1} false_0!_A = 20 app!_A(x1,x2) = max{30, x1 - 3, x2 - 2} true_0!_A = 26 filter_0!_A = 31 filter_2!_A(x1,x2) = 17 nil_0!_A = 1 partial status: pi(app#) = [] pi(filter_1) = [] pi(filter_2#) = [] pi(cons_2) = [] pi(filtersub_2) = [1] pi(filtersub_3#) = [] pi(false_0) = [] pi(app) = [1, 2] pi(true_0) = [] pi(filter_0) = [] pi(filter_2) = [] pi(nil_0) = [] The following rules are removed: p1, p2, p3, p4, p5, p6 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: neq_2#(s_1(x),s_1(y)) -> neq_2#(x,y) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(filter_0(),y) -> filter_1(y) r4: app(filter_1(x1),y) -> filter_2(x1,y) r5: app(filtersub_0(),y) -> filtersub_1(y) r6: app(filtersub_1(x1),y) -> filtersub_2(x1,y) r7: app(filtersub_2(x1,x2),y) -> filtersub_3(x1,x2,y) r8: app(neq_0(),y) -> neq_1(y) r9: app(neq_1(x1),y) -> neq_2(x1,y) r10: app(s_0(),y) -> s_1(y) r11: neq_2(|0|_0(),|0|_0()) -> false_0() r12: neq_2(|0|_0(),s_1(y)) -> true_0() r13: neq_2(s_1(x),|0|_0()) -> true_0() r14: neq_2(s_1(x),s_1(y)) -> neq_2(x,y) r15: filter_2(f,nil_0()) -> nil_0() r16: filter_2(f,cons_2(y,ys)) -> filtersub_3(app(f,y),f,cons_2(y,ys)) r17: filtersub_3(true_0(),f,cons_2(y,ys)) -> cons_2(y,filter_2(f,ys)) r18: filtersub_3(false_0(),f,cons_2(y,ys)) -> filter_2(f,ys) r19: nonzero_0() -> filter_1(neq_1(|0|_0())) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: neq_2#_A(x1,x2) = max{x1, x2} s_1_A(x1) = max{1, x1} neq_2#!_A(x1,x2) = max{5, x1 - 19, x2 - 2} s_1!_A(x1) = max{4, x1 - 18} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: neq_2#_A(x1,x2) = max{x1, x2} s_1_A(x1) = max{1, x1} neq_2#!_A(x1,x2) = max{7, x1 - 6, x2 - 7} s_1!_A(x1) = max{6, x1 - 6} partial status: pi(neq_2#) = [1] pi(s_1) = [1] The following rules are removed: p1 Then no dependency pair remains.