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 r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: app#_A(x1,x2) = x1 filter_1_A(x1) = x1 + 3 filter_2#_A(x1,x2) = x1 + 2 cons_2_A(x1,x2) = x1 + x2 + 1 filtersub_2_A(x1,x2) = x1 + x2 + 3 filtersub_3#_A(x1,x2,x3) = x2 + 2 false_0_A() = 1 app_A(x1,x2) = x1 + x2 + 6 true_0_A() = 1 cons_0_A() = 1 cons_1_A(x1) = x1 + 2 filter_0_A() = 4 filter_2_A(x1,x2) = x1 + x2 + 4 filtersub_0_A() = 1 filtersub_1_A(x1) = x1 + 2 filtersub_3_A(x1,x2,x3) = x2 + x3 + 4 neq_0_A() = 1 neq_1_A(x1) = x1 + 2 neq_2_A(x1,x2) = x1 + x2 + 3 s_0_A() = 1 s_1_A(x1) = x1 + 2 |0|_0_A() = 2 nil_0_A() = 1 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = max{0, x1 - 76, x2 - 47} filter_1_A(x1) = max{75, x1 + 24} filter_2#_A(x1,x2) = max{0, x1 - 52, x2 - 47} cons_2_A(x1,x2) = max{x1 + 45, x2 + 18} filtersub_2_A(x1,x2) = max{25, x1 + 24, x2 + 24} filtersub_3#_A(x1,x2,x3) = max{0, x1 - 76, x2 - 52, x3 - 47} false_0_A = 23 app_A(x1,x2) = max{75, x1 + 24, x2 + 24} true_0_A = 75 cons_0_A = 25 cons_1_A(x1) = max{50, x1 + 24} filter_0_A = 25 filter_2_A(x1,x2) = max{34, x2 + 7} filtersub_0_A = 25 filtersub_1_A(x1) = max{50, x1 + 24} filtersub_3_A(x1,x2,x3) = max{50, x3 + 7} neq_0_A = 25 neq_1_A(x1) = max{50, x1 - 25} neq_2_A(x1,x2) = max{75, x1 - 26, x2 - 26} s_0_A = 0 s_1_A(x1) = max{25, x1 + 1} |0|_0_A = 0 nil_0_A = 35 app#!_A(x1,x2) = max{0, x1 - 76} filter_1!_A(x1) = max{5, x1 - 51} filter_2#!_A(x1,x2) = max{7, x2 - 1} cons_2!_A(x1,x2) = max{45, x2 - 47} filtersub_2!_A(x1,x2) = x2 + 4 filtersub_3#!_A(x1,x2,x3) = max{5, x3 - 10} false_0!_A = 8 app!_A(x1,x2) = x2 + 4 true_0!_A = 6 cons_0!_A = 1 cons_1!_A(x1) = max{2, x1 - 1} filter_0!_A = 4 filter_2!_A(x1,x2) = max{47, x1 - 24, x2 - 46} filtersub_0!_A = 1 filtersub_1!_A(x1) = max{0, x1 - 1} filtersub_3!_A(x1,x2,x3) = max{46, x1 - 77, x2 - 25, x3 - 55} neq_0!_A = 1 neq_1!_A(x1) = 5 neq_2!_A(x1,x2) = max{6, x1 - 26, x2 - 26} s_0!_A = 1 s_1!_A(x1) = 6 |0|_0!_A = 9 nil_0!_A = 0 partial status: pi(app#) = [1] pi(filter_1) = [1] pi(filter_2#) = [1] pi(cons_2) = [1, 2] pi(filtersub_2) = [1, 2] pi(filtersub_3#) = [2] pi(false_0) = [] pi(app) = [1] pi(true_0) = [] pi(cons_0) = [] pi(cons_1) = [1] pi(filter_0) = [] pi(filter_2) = [2] pi(filtersub_0) = [] pi(filtersub_1) = [1] pi(filtersub_3) = [3] pi(neq_0) = [] pi(neq_1) = [1] pi(neq_2) = [1] pi(s_0) = [] pi(s_1) = [1] pi(|0|_0) = [] 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: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: neq_2#_A(x1,x2) = x1 + x2 + 3 s_1_A(x1) = x1 + 2 base order 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{6, x1 - 4, x2 - 2} s_1!_A(x1) = max{5, x1 - 3} partial status: pi(neq_2#) = [1] pi(s_1) = [1] The following rules are removed: p1 Then no dependency pair remains.