YES We show the termination of the TRS R: a(a(append(),nil()),ys) -> ys a(a(append(),a(a(cons(),x),xs)),ys) -> a(a(cons(),x),a(a(append(),xs),ys)) a(a(filter(),f),nil()) -> nil() a(a(filter(),f),a(a(cons(),x),xs)) -> a(a(a(if(),a(f,x)),x),a(a(filter(),f),xs)) a(a(le(),|0|()),y) -> true() a(a(le(),a(s(),x)),|0|()) -> false() a(a(le(),a(s(),x)),a(s(),y)) -> a(a(le(),x),y) a(a(a(if(),true()),x),xs) -> a(a(cons(),x),xs) a(a(a(if(),false()),x),xs) -> xs a(a(not(),f),b) -> a(not2(),a(f,b)) a(not2(),true()) -> false() a(not2(),false()) -> true() a(qs(),nil()) -> nil() a(qs(),a(a(cons(),x),xs)) -> a(a(append(),a(qs(),a(a(filter(),a(le(),x)),xs))),a(a(cons(),x),a(qs(),a(a(filter(),a(not(),a(le(),x))),xs)))) Instead we prove termination of the uncurried system: a(append_0(),y) -> append_1(y) a(append_1(x1),y) -> append_2(x1,y) a(cons_0(),y) -> cons_1(y) a(cons_1(x1),y) -> cons_2(x1,y) a(filter_0(),y) -> filter_1(y) a(filter_1(x1),y) -> filter_2(x1,y) a(if_0(),y) -> if_1(y) a(if_1(x1),y) -> if_2(x1,y) a(if_2(x1,x2),y) -> if_3(x1,x2,y) a(le_0(),y) -> le_1(y) a(le_1(x1),y) -> le_2(x1,y) a(not_0(),y) -> not_1(y) a(not_1(x1),y) -> not_2(x1,y) a(not2_0(),y) -> not2_1(y) a(qs_0(),y) -> qs_1(y) a(s_0(),y) -> s_1(y) append_2(nil_0(),ys) -> ys append_2(cons_2(x,xs),ys) -> cons_2(x,append_2(xs,ys)) filter_2(f,nil_0()) -> nil_0() filter_2(f,cons_2(x,xs)) -> if_3(a(f,x),x,filter_2(f,xs)) le_2(|0|_0(),y) -> true_0() le_2(s_1(x),|0|_0()) -> false_0() le_2(s_1(x),s_1(y)) -> le_2(x,y) if_3(true_0(),x,xs) -> cons_2(x,xs) if_3(false_0(),x,xs) -> xs not_2(f,b) -> not2_1(a(f,b)) not2_1(true_0()) -> false_0() not2_1(false_0()) -> true_0() qs_1(nil_0()) -> nil_0() qs_1(cons_2(x,xs)) -> append_2(qs_1(filter_2(le_1(x),xs)),cons_2(x,qs_1(filter_2(not_1(le_1(x)),xs)))) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a#(append_1(x1),y) -> append_2#(x1,y) p2: a#(filter_1(x1),y) -> filter_2#(x1,y) p3: a#(if_2(x1,x2),y) -> if_3#(x1,x2,y) p4: a#(le_1(x1),y) -> le_2#(x1,y) p5: a#(not_1(x1),y) -> not_2#(x1,y) p6: a#(not2_0(),y) -> not2_1#(y) p7: a#(qs_0(),y) -> qs_1#(y) p8: append_2#(cons_2(x,xs),ys) -> append_2#(xs,ys) p9: filter_2#(f,cons_2(x,xs)) -> if_3#(a(f,x),x,filter_2(f,xs)) p10: filter_2#(f,cons_2(x,xs)) -> a#(f,x) p11: filter_2#(f,cons_2(x,xs)) -> filter_2#(f,xs) p12: le_2#(s_1(x),s_1(y)) -> le_2#(x,y) p13: not_2#(f,b) -> not2_1#(a(f,b)) p14: not_2#(f,b) -> a#(f,b) p15: qs_1#(cons_2(x,xs)) -> append_2#(qs_1(filter_2(le_1(x),xs)),cons_2(x,qs_1(filter_2(not_1(le_1(x)),xs)))) p16: qs_1#(cons_2(x,xs)) -> qs_1#(filter_2(le_1(x),xs)) p17: qs_1#(cons_2(x,xs)) -> filter_2#(le_1(x),xs) p18: qs_1#(cons_2(x,xs)) -> qs_1#(filter_2(not_1(le_1(x)),xs)) p19: qs_1#(cons_2(x,xs)) -> filter_2#(not_1(le_1(x)),xs) and R consists of: r1: a(append_0(),y) -> append_1(y) r2: a(append_1(x1),y) -> append_2(x1,y) r3: a(cons_0(),y) -> cons_1(y) r4: a(cons_1(x1),y) -> cons_2(x1,y) r5: a(filter_0(),y) -> filter_1(y) r6: a(filter_1(x1),y) -> filter_2(x1,y) r7: a(if_0(),y) -> if_1(y) r8: a(if_1(x1),y) -> if_2(x1,y) r9: a(if_2(x1,x2),y) -> if_3(x1,x2,y) r10: a(le_0(),y) -> le_1(y) r11: a(le_1(x1),y) -> le_2(x1,y) r12: a(not_0(),y) -> not_1(y) r13: a(not_1(x1),y) -> not_2(x1,y) r14: a(not2_0(),y) -> not2_1(y) r15: a(qs_0(),y) -> qs_1(y) r16: a(s_0(),y) -> s_1(y) r17: append_2(nil_0(),ys) -> ys r18: append_2(cons_2(x,xs),ys) -> cons_2(x,append_2(xs,ys)) r19: filter_2(f,nil_0()) -> nil_0() r20: filter_2(f,cons_2(x,xs)) -> if_3(a(f,x),x,filter_2(f,xs)) r21: le_2(|0|_0(),y) -> true_0() r22: le_2(s_1(x),|0|_0()) -> false_0() r23: le_2(s_1(x),s_1(y)) -> le_2(x,y) r24: if_3(true_0(),x,xs) -> cons_2(x,xs) r25: if_3(false_0(),x,xs) -> xs r26: not_2(f,b) -> not2_1(a(f,b)) r27: not2_1(true_0()) -> false_0() r28: not2_1(false_0()) -> true_0() r29: qs_1(nil_0()) -> nil_0() r30: qs_1(cons_2(x,xs)) -> append_2(qs_1(filter_2(le_1(x),xs)),cons_2(x,qs_1(filter_2(not_1(le_1(x)),xs)))) The estimated dependency graph contains the following SCCs: {p2, p5, p7, p10, p11, p14, p16, p17, p18, p19} {p8} {p12} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: not_2#(f,b) -> a#(f,b) p2: a#(qs_0(),y) -> qs_1#(y) p3: qs_1#(cons_2(x,xs)) -> filter_2#(not_1(le_1(x)),xs) p4: filter_2#(f,cons_2(x,xs)) -> filter_2#(f,xs) p5: filter_2#(f,cons_2(x,xs)) -> a#(f,x) p6: a#(not_1(x1),y) -> not_2#(x1,y) p7: a#(filter_1(x1),y) -> filter_2#(x1,y) p8: qs_1#(cons_2(x,xs)) -> qs_1#(filter_2(not_1(le_1(x)),xs)) p9: qs_1#(cons_2(x,xs)) -> filter_2#(le_1(x),xs) p10: qs_1#(cons_2(x,xs)) -> qs_1#(filter_2(le_1(x),xs)) and R consists of: r1: a(append_0(),y) -> append_1(y) r2: a(append_1(x1),y) -> append_2(x1,y) r3: a(cons_0(),y) -> cons_1(y) r4: a(cons_1(x1),y) -> cons_2(x1,y) r5: a(filter_0(),y) -> filter_1(y) r6: a(filter_1(x1),y) -> filter_2(x1,y) r7: a(if_0(),y) -> if_1(y) r8: a(if_1(x1),y) -> if_2(x1,y) r9: a(if_2(x1,x2),y) -> if_3(x1,x2,y) r10: a(le_0(),y) -> le_1(y) r11: a(le_1(x1),y) -> le_2(x1,y) r12: a(not_0(),y) -> not_1(y) r13: a(not_1(x1),y) -> not_2(x1,y) r14: a(not2_0(),y) -> not2_1(y) r15: a(qs_0(),y) -> qs_1(y) r16: a(s_0(),y) -> s_1(y) r17: append_2(nil_0(),ys) -> ys r18: append_2(cons_2(x,xs),ys) -> cons_2(x,append_2(xs,ys)) r19: filter_2(f,nil_0()) -> nil_0() r20: filter_2(f,cons_2(x,xs)) -> if_3(a(f,x),x,filter_2(f,xs)) r21: le_2(|0|_0(),y) -> true_0() r22: le_2(s_1(x),|0|_0()) -> false_0() r23: le_2(s_1(x),s_1(y)) -> le_2(x,y) r24: if_3(true_0(),x,xs) -> cons_2(x,xs) r25: if_3(false_0(),x,xs) -> xs r26: not_2(f,b) -> not2_1(a(f,b)) r27: not2_1(true_0()) -> false_0() r28: not2_1(false_0()) -> true_0() r29: qs_1(nil_0()) -> nil_0() r30: qs_1(cons_2(x,xs)) -> append_2(qs_1(filter_2(le_1(x),xs)),cons_2(x,qs_1(filter_2(not_1(le_1(x)),xs)))) The set of usable rules consists of r19, r20, r24, r25 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: not_2#_A(x1,x2) = max{0, x1 - 88, x2 - 94} a#_A(x1,x2) = max{0, x1 - 102, x2 - 94} qs_0_A = 101 qs_1#_A(x1) = max{0, x1 - 94} cons_2_A(x1,x2) = max{3, x1 + 2, x2} filter_2#_A(x1,x2) = max{0, x1 - 101, x2 - 96} not_1_A(x1) = x1 + 14 le_1_A(x1) = max{11, x1 - 5} filter_1_A(x1) = x1 + 1 filter_2_A(x1,x2) = max{20, x1 - 29, x2} nil_0_A = 12 if_3_A(x1,x2,x3) = max{4, x2 + 2, x3} a_A(x1,x2) = max{0, x1 - 102} true_0_A = 3 false_0_A = 3 not_2#!_A(x1,x2) = max{8, x1 - 92, x2 - 81} a#!_A(x1,x2) = max{8, x1 - 92, x2 - 81} qs_0!_A = 2 qs_1#!_A(x1) = max{9, x1 - 82} cons_2!_A(x1,x2) = max{2, x2 - 61} filter_2#!_A(x1,x2) = max{8, x1 - 92, x2 - 82} not_1!_A(x1) = max{10, x1 - 50} le_1!_A(x1) = max{10, x1 - 2} filter_1!_A(x1) = max{8, x1 - 14} filter_2!_A(x1,x2) = max{10, x1 - 15, x2 - 59} nil_0!_A = 0 if_3!_A(x1,x2,x3) = max{9, x2 - 58, x3 - 60} a!_A(x1,x2) = max{7, x2 - 13} true_0!_A = 3 false_0!_A = 4 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: not_2#_A(x1,x2) = max{0, x1 - 100, x2 - 23} a#_A(x1,x2) = max{0, x1 - 100, x2 - 23} qs_0_A = 99 qs_1#_A(x1) = max{0, x1 - 25} cons_2_A(x1,x2) = max{10, x1 + 2, x2} filter_2#_A(x1,x2) = max{0, x1 - 44, x2 - 25} not_1_A(x1) = max{33, x1} le_1_A(x1) = max{43, x1 - 1} filter_1_A(x1) = x1 + 98 filter_2_A(x1,x2) = max{24, x1 - 58, x2} nil_0_A = 12 if_3_A(x1,x2,x3) = max{11, x2 + 2, x3} a_A(x1,x2) = max{2, x1 - 157, x2 - 157} true_0_A = 5 false_0_A = 5 not_2#!_A(x1,x2) = max{40, x1 - 57, x2 - 34} a#!_A(x1,x2) = max{40, x1 - 57, x2 - 34} qs_0!_A = 37 qs_1#!_A(x1) = max{41, x1 - 35} cons_2!_A(x1,x2) = max{5, x1 - 59} filter_2#!_A(x1,x2) = max{41, x1 - 57, x2 - 36} not_1!_A(x1) = max{39, x1 - 1} le_1!_A(x1) = max{42, x1 - 5} filter_1!_A(x1) = max{8, x1 - 59} filter_2!_A(x1,x2) = 0 nil_0!_A = 0 if_3!_A(x1,x2,x3) = max{6, x2 - 1, x3 - 25} a!_A(x1,x2) = max{7, x2 - 59} true_0!_A = 4 false_0!_A = 3 partial status: pi(not_2#) = [] pi(a#) = [] pi(qs_0) = [] pi(qs_1#) = [] pi(cons_2) = [2] pi(filter_2#) = [] pi(not_1) = [1] pi(le_1) = [1] pi(filter_1) = [1] pi(filter_2) = [2] pi(nil_0) = [] pi(if_3) = [3] pi(a) = [1] pi(true_0) = [] pi(false_0) = [] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: not_2#(f,b) -> a#(f,b) p2: qs_1#(cons_2(x,xs)) -> filter_2#(not_1(le_1(x)),xs) p3: filter_2#(f,cons_2(x,xs)) -> filter_2#(f,xs) p4: filter_2#(f,cons_2(x,xs)) -> a#(f,x) p5: a#(not_1(x1),y) -> not_2#(x1,y) p6: a#(filter_1(x1),y) -> filter_2#(x1,y) p7: qs_1#(cons_2(x,xs)) -> qs_1#(filter_2(not_1(le_1(x)),xs)) p8: qs_1#(cons_2(x,xs)) -> filter_2#(le_1(x),xs) p9: qs_1#(cons_2(x,xs)) -> qs_1#(filter_2(le_1(x),xs)) and R consists of: r1: a(append_0(),y) -> append_1(y) r2: a(append_1(x1),y) -> append_2(x1,y) r3: a(cons_0(),y) -> cons_1(y) r4: a(cons_1(x1),y) -> cons_2(x1,y) r5: a(filter_0(),y) -> filter_1(y) r6: a(filter_1(x1),y) -> filter_2(x1,y) r7: a(if_0(),y) -> if_1(y) r8: a(if_1(x1),y) -> if_2(x1,y) r9: a(if_2(x1,x2),y) -> if_3(x1,x2,y) r10: a(le_0(),y) -> le_1(y) r11: a(le_1(x1),y) -> le_2(x1,y) r12: a(not_0(),y) -> not_1(y) r13: a(not_1(x1),y) -> not_2(x1,y) r14: a(not2_0(),y) -> not2_1(y) r15: a(qs_0(),y) -> qs_1(y) r16: a(s_0(),y) -> s_1(y) r17: append_2(nil_0(),ys) -> ys r18: append_2(cons_2(x,xs),ys) -> cons_2(x,append_2(xs,ys)) r19: filter_2(f,nil_0()) -> nil_0() r20: filter_2(f,cons_2(x,xs)) -> if_3(a(f,x),x,filter_2(f,xs)) r21: le_2(|0|_0(),y) -> true_0() r22: le_2(s_1(x),|0|_0()) -> false_0() r23: le_2(s_1(x),s_1(y)) -> le_2(x,y) r24: if_3(true_0(),x,xs) -> cons_2(x,xs) r25: if_3(false_0(),x,xs) -> xs r26: not_2(f,b) -> not2_1(a(f,b)) r27: not2_1(true_0()) -> false_0() r28: not2_1(false_0()) -> true_0() r29: qs_1(nil_0()) -> nil_0() r30: qs_1(cons_2(x,xs)) -> append_2(qs_1(filter_2(le_1(x),xs)),cons_2(x,qs_1(filter_2(not_1(le_1(x)),xs)))) The estimated dependency graph contains the following SCCs: {p7, p9} {p1, p3, p4, p5, p6} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: qs_1#(cons_2(x,xs)) -> qs_1#(filter_2(le_1(x),xs)) p2: qs_1#(cons_2(x,xs)) -> qs_1#(filter_2(not_1(le_1(x)),xs)) and R consists of: r1: a(append_0(),y) -> append_1(y) r2: a(append_1(x1),y) -> append_2(x1,y) r3: a(cons_0(),y) -> cons_1(y) r4: a(cons_1(x1),y) -> cons_2(x1,y) r5: a(filter_0(),y) -> filter_1(y) r6: a(filter_1(x1),y) -> filter_2(x1,y) r7: a(if_0(),y) -> if_1(y) r8: a(if_1(x1),y) -> if_2(x1,y) r9: a(if_2(x1,x2),y) -> if_3(x1,x2,y) r10: a(le_0(),y) -> le_1(y) r11: a(le_1(x1),y) -> le_2(x1,y) r12: a(not_0(),y) -> not_1(y) r13: a(not_1(x1),y) -> not_2(x1,y) r14: a(not2_0(),y) -> not2_1(y) r15: a(qs_0(),y) -> qs_1(y) r16: a(s_0(),y) -> s_1(y) r17: append_2(nil_0(),ys) -> ys r18: append_2(cons_2(x,xs),ys) -> cons_2(x,append_2(xs,ys)) r19: filter_2(f,nil_0()) -> nil_0() r20: filter_2(f,cons_2(x,xs)) -> if_3(a(f,x),x,filter_2(f,xs)) r21: le_2(|0|_0(),y) -> true_0() r22: le_2(s_1(x),|0|_0()) -> false_0() r23: le_2(s_1(x),s_1(y)) -> le_2(x,y) r24: if_3(true_0(),x,xs) -> cons_2(x,xs) r25: if_3(false_0(),x,xs) -> xs r26: not_2(f,b) -> not2_1(a(f,b)) r27: not2_1(true_0()) -> false_0() r28: not2_1(false_0()) -> true_0() r29: qs_1(nil_0()) -> nil_0() r30: qs_1(cons_2(x,xs)) -> append_2(qs_1(filter_2(le_1(x),xs)),cons_2(x,qs_1(filter_2(not_1(le_1(x)),xs)))) The set of usable rules consists of r10, r12, r19, r20, r21, r22, r23, r24, r25, r29 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: qs_1#_A(x1) = max{94, x1 + 2} cons_2_A(x1,x2) = max{91, x1 + 89, x2} filter_2_A(x1,x2) = max{x1 + 65, x2} le_1_A(x1) = 27 not_1_A(x1) = 0 a_A(x1,x2) = max{0, x1 - 12} le_0_A = 43 not_0_A = 131 nil_0_A = 0 if_3_A(x1,x2,x3) = max{91, x2 + 89, x3} le_2_A(x1,x2) = 16 |0|_0_A = 13 true_0_A = 1 s_1_A(x1) = x1 + 10 false_0_A = 1 qs_1_A(x1) = max{31, x1 - 32} qs_1#!_A(x1) = max{15, x1 - 78} cons_2!_A(x1,x2) = max{95, x2 - 31} filter_2!_A(x1,x2) = max{x1 + 67, x2 + 7} le_1!_A(x1) = max{9, x1 - 2} not_1!_A(x1) = max{96, x1} a!_A(x1,x2) = max{8, x1 - 34, x2 + 5} le_0!_A = 10 not_0!_A = 97 nil_0!_A = 0 if_3!_A(x1,x2,x3) = max{x2 + 95, x3 + 1} le_2!_A(x1,x2) = max{x1 - 1, x2 + 9} |0|_0!_A = 12 true_0!_A = 11 s_1!_A(x1) = max{11, x1 - 2} false_0!_A = 10 qs_1!_A(x1) = max{0, x1 - 90} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: qs_1#_A(x1) = max{109, x1 + 102} cons_2_A(x1,x2) = max{36, x1 + 34, x2 + 31} filter_2_A(x1,x2) = max{7, x2 + 2} le_1_A(x1) = x1 + 9 not_1_A(x1) = max{84, x1 - 94} a_A(x1,x2) = max{132, x1 - 85, x2 + 85} le_0_A = 174 not_0_A = 168 nil_0_A = 8 if_3_A(x1,x2,x3) = max{x2 + 36, x3 + 31} le_2_A(x1,x2) = max{182, x1 - 164, x2 - 1} |0|_0_A = 0 true_0_A = 91 s_1_A(x1) = max{163, x1 + 112} false_0_A = 182 qs_1_A(x1) = max{82, x1 + 36} qs_1#!_A(x1) = max{1, x1 - 8} cons_2!_A(x1,x2) = max{28, x2} filter_2!_A(x1,x2) = max{22, x1 - 1} le_1!_A(x1) = max{51, x1 + 43} not_1!_A(x1) = max{45, x1 - 218} a!_A(x1,x2) = max{50, x1 - 122, x2 + 44} le_0!_A = 52 not_0!_A = 46 nil_0!_A = 17 if_3!_A(x1,x2,x3) = x3 + 29 le_2!_A(x1,x2) = max{49, x1 - 113, x2 - 164} |0|_0!_A = 49 true_0!_A = 48 s_1!_A(x1) = max{45, x1 - 165} false_0!_A = 47 qs_1!_A(x1) = max{28, x1 + 8} partial status: pi(qs_1#) = [] pi(cons_2) = [1, 2] pi(filter_2) = [2] pi(le_1) = [] pi(not_1) = [] pi(a) = [1, 2] pi(le_0) = [] pi(not_0) = [] pi(nil_0) = [] pi(if_3) = [2, 3] pi(le_2) = [] pi(|0|_0) = [] pi(true_0) = [] pi(s_1) = [1] pi(false_0) = [] pi(qs_1) = [] The following rules are removed: p1, p2 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: not_2#(f,b) -> a#(f,b) p2: a#(filter_1(x1),y) -> filter_2#(x1,y) p3: filter_2#(f,cons_2(x,xs)) -> a#(f,x) p4: a#(not_1(x1),y) -> not_2#(x1,y) p5: filter_2#(f,cons_2(x,xs)) -> filter_2#(f,xs) and R consists of: r1: a(append_0(),y) -> append_1(y) r2: a(append_1(x1),y) -> append_2(x1,y) r3: a(cons_0(),y) -> cons_1(y) r4: a(cons_1(x1),y) -> cons_2(x1,y) r5: a(filter_0(),y) -> filter_1(y) r6: a(filter_1(x1),y) -> filter_2(x1,y) r7: a(if_0(),y) -> if_1(y) r8: a(if_1(x1),y) -> if_2(x1,y) r9: a(if_2(x1,x2),y) -> if_3(x1,x2,y) r10: a(le_0(),y) -> le_1(y) r11: a(le_1(x1),y) -> le_2(x1,y) r12: a(not_0(),y) -> not_1(y) r13: a(not_1(x1),y) -> not_2(x1,y) r14: a(not2_0(),y) -> not2_1(y) r15: a(qs_0(),y) -> qs_1(y) r16: a(s_0(),y) -> s_1(y) r17: append_2(nil_0(),ys) -> ys r18: append_2(cons_2(x,xs),ys) -> cons_2(x,append_2(xs,ys)) r19: filter_2(f,nil_0()) -> nil_0() r20: filter_2(f,cons_2(x,xs)) -> if_3(a(f,x),x,filter_2(f,xs)) r21: le_2(|0|_0(),y) -> true_0() r22: le_2(s_1(x),|0|_0()) -> false_0() r23: le_2(s_1(x),s_1(y)) -> le_2(x,y) r24: if_3(true_0(),x,xs) -> cons_2(x,xs) r25: if_3(false_0(),x,xs) -> xs r26: not_2(f,b) -> not2_1(a(f,b)) r27: not2_1(true_0()) -> false_0() r28: not2_1(false_0()) -> true_0() r29: qs_1(nil_0()) -> nil_0() r30: qs_1(cons_2(x,xs)) -> append_2(qs_1(filter_2(le_1(x),xs)),cons_2(x,qs_1(filter_2(not_1(le_1(x)),xs)))) 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: not_2#_A(x1,x2) = max{0, x1 - 120, x2 - 12} a#_A(x1,x2) = max{0, x1 - 122, x2 - 12} filter_1_A(x1) = max{121, x1 + 116} filter_2#_A(x1,x2) = max{0, x1 - 6, x2 - 12} cons_2_A(x1,x2) = max{x1 + 5, x2 + 11} not_1_A(x1) = max{9, x1 + 2} not_2#!_A(x1,x2) = max{3, x1 - 128, x2 - 104} a#!_A(x1,x2) = max{3, x1 - 128, x2 - 104} filter_1!_A(x1) = max{5, x1 - 137} filter_2#!_A(x1,x2) = max{3, x1 - 128, x2 - 109} cons_2!_A(x1,x2) = max{3, x1 - 104, x2 - 100} not_1!_A(x1) = max{2, x1 - 128} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: not_2#_A(x1,x2) = max{0, x1 - 132, x2 - 21} a#_A(x1,x2) = max{0, x1 - 132, x2 - 21} filter_1_A(x1) = x1 + 131 filter_2#_A(x1,x2) = max{0, x1 - 1, x2 - 21} cons_2_A(x1,x2) = max{20, x1 + 10, x2 + 12} not_1_A(x1) = max{126, x1 + 1} not_2#!_A(x1,x2) = max{1, x1 - 127, x2 - 200} a#!_A(x1,x2) = max{1, x1 - 127, x2 - 200} filter_1!_A(x1) = max{2, x1 - 1} filter_2#!_A(x1,x2) = max{3, x1 - 1, x2 - 201} cons_2!_A(x1,x2) = max{7, x1 - 199, x2 - 202} not_1!_A(x1) = max{10, x1 - 202} partial status: pi(not_2#) = [] pi(a#) = [] pi(filter_1) = [1] pi(filter_2#) = [] pi(cons_2) = [] pi(not_1) = [1] The following rules are removed: p2, p3 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: not_2#(f,b) -> a#(f,b) p2: a#(not_1(x1),y) -> not_2#(x1,y) p3: filter_2#(f,cons_2(x,xs)) -> filter_2#(f,xs) and R consists of: r1: a(append_0(),y) -> append_1(y) r2: a(append_1(x1),y) -> append_2(x1,y) r3: a(cons_0(),y) -> cons_1(y) r4: a(cons_1(x1),y) -> cons_2(x1,y) r5: a(filter_0(),y) -> filter_1(y) r6: a(filter_1(x1),y) -> filter_2(x1,y) r7: a(if_0(),y) -> if_1(y) r8: a(if_1(x1),y) -> if_2(x1,y) r9: a(if_2(x1,x2),y) -> if_3(x1,x2,y) r10: a(le_0(),y) -> le_1(y) r11: a(le_1(x1),y) -> le_2(x1,y) r12: a(not_0(),y) -> not_1(y) r13: a(not_1(x1),y) -> not_2(x1,y) r14: a(not2_0(),y) -> not2_1(y) r15: a(qs_0(),y) -> qs_1(y) r16: a(s_0(),y) -> s_1(y) r17: append_2(nil_0(),ys) -> ys r18: append_2(cons_2(x,xs),ys) -> cons_2(x,append_2(xs,ys)) r19: filter_2(f,nil_0()) -> nil_0() r20: filter_2(f,cons_2(x,xs)) -> if_3(a(f,x),x,filter_2(f,xs)) r21: le_2(|0|_0(),y) -> true_0() r22: le_2(s_1(x),|0|_0()) -> false_0() r23: le_2(s_1(x),s_1(y)) -> le_2(x,y) r24: if_3(true_0(),x,xs) -> cons_2(x,xs) r25: if_3(false_0(),x,xs) -> xs r26: not_2(f,b) -> not2_1(a(f,b)) r27: not2_1(true_0()) -> false_0() r28: not2_1(false_0()) -> true_0() r29: qs_1(nil_0()) -> nil_0() r30: qs_1(cons_2(x,xs)) -> append_2(qs_1(filter_2(le_1(x),xs)),cons_2(x,qs_1(filter_2(not_1(le_1(x)),xs)))) 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: not_2#(f,b) -> a#(f,b) p2: a#(not_1(x1),y) -> not_2#(x1,y) and R consists of: r1: a(append_0(),y) -> append_1(y) r2: a(append_1(x1),y) -> append_2(x1,y) r3: a(cons_0(),y) -> cons_1(y) r4: a(cons_1(x1),y) -> cons_2(x1,y) r5: a(filter_0(),y) -> filter_1(y) r6: a(filter_1(x1),y) -> filter_2(x1,y) r7: a(if_0(),y) -> if_1(y) r8: a(if_1(x1),y) -> if_2(x1,y) r9: a(if_2(x1,x2),y) -> if_3(x1,x2,y) r10: a(le_0(),y) -> le_1(y) r11: a(le_1(x1),y) -> le_2(x1,y) r12: a(not_0(),y) -> not_1(y) r13: a(not_1(x1),y) -> not_2(x1,y) r14: a(not2_0(),y) -> not2_1(y) r15: a(qs_0(),y) -> qs_1(y) r16: a(s_0(),y) -> s_1(y) r17: append_2(nil_0(),ys) -> ys r18: append_2(cons_2(x,xs),ys) -> cons_2(x,append_2(xs,ys)) r19: filter_2(f,nil_0()) -> nil_0() r20: filter_2(f,cons_2(x,xs)) -> if_3(a(f,x),x,filter_2(f,xs)) r21: le_2(|0|_0(),y) -> true_0() r22: le_2(s_1(x),|0|_0()) -> false_0() r23: le_2(s_1(x),s_1(y)) -> le_2(x,y) r24: if_3(true_0(),x,xs) -> cons_2(x,xs) r25: if_3(false_0(),x,xs) -> xs r26: not_2(f,b) -> not2_1(a(f,b)) r27: not2_1(true_0()) -> false_0() r28: not2_1(false_0()) -> true_0() r29: qs_1(nil_0()) -> nil_0() r30: qs_1(cons_2(x,xs)) -> append_2(qs_1(filter_2(le_1(x),xs)),cons_2(x,qs_1(filter_2(not_1(le_1(x)),xs)))) 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: not_2#_A(x1,x2) = max{0, x1 - 109, x2 - 1} a#_A(x1,x2) = max{0, x1 - 118, x2 - 1} not_1_A(x1) = max{117, x1 + 9} not_2#!_A(x1,x2) = max{1, x1 - 236, x2 - 1} a#!_A(x1,x2) = max{1, x1 - 236, x2 - 1} not_1!_A(x1) = max{5, x1 - 235} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: not_2#_A(x1,x2) = max{0, x1 - 15, x2 - 1} a#_A(x1,x2) = max{0, x1 - 15, x2 - 1} not_1_A(x1) = max{14, x1} not_2#!_A(x1,x2) = max{5, x1 - 15, x2 - 1} a#!_A(x1,x2) = max{5, x1 - 15, x2 - 1} not_1!_A(x1) = max{4, x1 - 17} partial status: pi(not_2#) = [1] pi(a#) = [1] pi(not_1) = [1] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: not_2#(f,b) -> a#(f,b) and R consists of: r1: a(append_0(),y) -> append_1(y) r2: a(append_1(x1),y) -> append_2(x1,y) r3: a(cons_0(),y) -> cons_1(y) r4: a(cons_1(x1),y) -> cons_2(x1,y) r5: a(filter_0(),y) -> filter_1(y) r6: a(filter_1(x1),y) -> filter_2(x1,y) r7: a(if_0(),y) -> if_1(y) r8: a(if_1(x1),y) -> if_2(x1,y) r9: a(if_2(x1,x2),y) -> if_3(x1,x2,y) r10: a(le_0(),y) -> le_1(y) r11: a(le_1(x1),y) -> le_2(x1,y) r12: a(not_0(),y) -> not_1(y) r13: a(not_1(x1),y) -> not_2(x1,y) r14: a(not2_0(),y) -> not2_1(y) r15: a(qs_0(),y) -> qs_1(y) r16: a(s_0(),y) -> s_1(y) r17: append_2(nil_0(),ys) -> ys r18: append_2(cons_2(x,xs),ys) -> cons_2(x,append_2(xs,ys)) r19: filter_2(f,nil_0()) -> nil_0() r20: filter_2(f,cons_2(x,xs)) -> if_3(a(f,x),x,filter_2(f,xs)) r21: le_2(|0|_0(),y) -> true_0() r22: le_2(s_1(x),|0|_0()) -> false_0() r23: le_2(s_1(x),s_1(y)) -> le_2(x,y) r24: if_3(true_0(),x,xs) -> cons_2(x,xs) r25: if_3(false_0(),x,xs) -> xs r26: not_2(f,b) -> not2_1(a(f,b)) r27: not2_1(true_0()) -> false_0() r28: not2_1(false_0()) -> true_0() r29: qs_1(nil_0()) -> nil_0() r30: qs_1(cons_2(x,xs)) -> append_2(qs_1(filter_2(le_1(x),xs)),cons_2(x,qs_1(filter_2(not_1(le_1(x)),xs)))) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: filter_2#(f,cons_2(x,xs)) -> filter_2#(f,xs) and R consists of: r1: a(append_0(),y) -> append_1(y) r2: a(append_1(x1),y) -> append_2(x1,y) r3: a(cons_0(),y) -> cons_1(y) r4: a(cons_1(x1),y) -> cons_2(x1,y) r5: a(filter_0(),y) -> filter_1(y) r6: a(filter_1(x1),y) -> filter_2(x1,y) r7: a(if_0(),y) -> if_1(y) r8: a(if_1(x1),y) -> if_2(x1,y) r9: a(if_2(x1,x2),y) -> if_3(x1,x2,y) r10: a(le_0(),y) -> le_1(y) r11: a(le_1(x1),y) -> le_2(x1,y) r12: a(not_0(),y) -> not_1(y) r13: a(not_1(x1),y) -> not_2(x1,y) r14: a(not2_0(),y) -> not2_1(y) r15: a(qs_0(),y) -> qs_1(y) r16: a(s_0(),y) -> s_1(y) r17: append_2(nil_0(),ys) -> ys r18: append_2(cons_2(x,xs),ys) -> cons_2(x,append_2(xs,ys)) r19: filter_2(f,nil_0()) -> nil_0() r20: filter_2(f,cons_2(x,xs)) -> if_3(a(f,x),x,filter_2(f,xs)) r21: le_2(|0|_0(),y) -> true_0() r22: le_2(s_1(x),|0|_0()) -> false_0() r23: le_2(s_1(x),s_1(y)) -> le_2(x,y) r24: if_3(true_0(),x,xs) -> cons_2(x,xs) r25: if_3(false_0(),x,xs) -> xs r26: not_2(f,b) -> not2_1(a(f,b)) r27: not2_1(true_0()) -> false_0() r28: not2_1(false_0()) -> true_0() r29: qs_1(nil_0()) -> nil_0() r30: qs_1(cons_2(x,xs)) -> append_2(qs_1(filter_2(le_1(x),xs)),cons_2(x,qs_1(filter_2(not_1(le_1(x)),xs)))) 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: filter_2#_A(x1,x2) = 0 cons_2_A(x1,x2) = max{13, x1 + 11, x2 - 47} filter_2#!_A(x1,x2) = max{0, x2 - 98} cons_2!_A(x1,x2) = max{7, x1 - 243, x2 - 97} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: filter_2#_A(x1,x2) = 0 cons_2_A(x1,x2) = max{2, x1 - 23, x2 - 4} filter_2#!_A(x1,x2) = max{6, x1 - 1, x2 - 147} cons_2!_A(x1,x2) = max{5, x1 - 60, x2 - 146} partial status: pi(filter_2#) = [2] pi(cons_2) = [1, 2] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: append_2#(cons_2(x,xs),ys) -> append_2#(xs,ys) and R consists of: r1: a(append_0(),y) -> append_1(y) r2: a(append_1(x1),y) -> append_2(x1,y) r3: a(cons_0(),y) -> cons_1(y) r4: a(cons_1(x1),y) -> cons_2(x1,y) r5: a(filter_0(),y) -> filter_1(y) r6: a(filter_1(x1),y) -> filter_2(x1,y) r7: a(if_0(),y) -> if_1(y) r8: a(if_1(x1),y) -> if_2(x1,y) r9: a(if_2(x1,x2),y) -> if_3(x1,x2,y) r10: a(le_0(),y) -> le_1(y) r11: a(le_1(x1),y) -> le_2(x1,y) r12: a(not_0(),y) -> not_1(y) r13: a(not_1(x1),y) -> not_2(x1,y) r14: a(not2_0(),y) -> not2_1(y) r15: a(qs_0(),y) -> qs_1(y) r16: a(s_0(),y) -> s_1(y) r17: append_2(nil_0(),ys) -> ys r18: append_2(cons_2(x,xs),ys) -> cons_2(x,append_2(xs,ys)) r19: filter_2(f,nil_0()) -> nil_0() r20: filter_2(f,cons_2(x,xs)) -> if_3(a(f,x),x,filter_2(f,xs)) r21: le_2(|0|_0(),y) -> true_0() r22: le_2(s_1(x),|0|_0()) -> false_0() r23: le_2(s_1(x),s_1(y)) -> le_2(x,y) r24: if_3(true_0(),x,xs) -> cons_2(x,xs) r25: if_3(false_0(),x,xs) -> xs r26: not_2(f,b) -> not2_1(a(f,b)) r27: not2_1(true_0()) -> false_0() r28: not2_1(false_0()) -> true_0() r29: qs_1(nil_0()) -> nil_0() r30: qs_1(cons_2(x,xs)) -> append_2(qs_1(filter_2(le_1(x),xs)),cons_2(x,qs_1(filter_2(not_1(le_1(x)),xs)))) 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: append_2#_A(x1,x2) = 0 cons_2_A(x1,x2) = max{6, x1 - 47, x2 - 58} append_2#!_A(x1,x2) = max{1, x1 - 362} cons_2!_A(x1,x2) = max{6, x1 - 183, x2 - 361} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: append_2#_A(x1,x2) = 0 cons_2_A(x1,x2) = max{2, x1 - 41, x2 - 45} append_2#!_A(x1,x2) = max{7, x1 - 103, x2 - 1} cons_2!_A(x1,x2) = max{6, x1 - 112, x2 - 102} partial status: pi(append_2#) = [1] pi(cons_2) = [2] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: le_2#(s_1(x),s_1(y)) -> le_2#(x,y) and R consists of: r1: a(append_0(),y) -> append_1(y) r2: a(append_1(x1),y) -> append_2(x1,y) r3: a(cons_0(),y) -> cons_1(y) r4: a(cons_1(x1),y) -> cons_2(x1,y) r5: a(filter_0(),y) -> filter_1(y) r6: a(filter_1(x1),y) -> filter_2(x1,y) r7: a(if_0(),y) -> if_1(y) r8: a(if_1(x1),y) -> if_2(x1,y) r9: a(if_2(x1,x2),y) -> if_3(x1,x2,y) r10: a(le_0(),y) -> le_1(y) r11: a(le_1(x1),y) -> le_2(x1,y) r12: a(not_0(),y) -> not_1(y) r13: a(not_1(x1),y) -> not_2(x1,y) r14: a(not2_0(),y) -> not2_1(y) r15: a(qs_0(),y) -> qs_1(y) r16: a(s_0(),y) -> s_1(y) r17: append_2(nil_0(),ys) -> ys r18: append_2(cons_2(x,xs),ys) -> cons_2(x,append_2(xs,ys)) r19: filter_2(f,nil_0()) -> nil_0() r20: filter_2(f,cons_2(x,xs)) -> if_3(a(f,x),x,filter_2(f,xs)) r21: le_2(|0|_0(),y) -> true_0() r22: le_2(s_1(x),|0|_0()) -> false_0() r23: le_2(s_1(x),s_1(y)) -> le_2(x,y) r24: if_3(true_0(),x,xs) -> cons_2(x,xs) r25: if_3(false_0(),x,xs) -> xs r26: not_2(f,b) -> not2_1(a(f,b)) r27: not2_1(true_0()) -> false_0() r28: not2_1(false_0()) -> true_0() r29: qs_1(nil_0()) -> nil_0() r30: qs_1(cons_2(x,xs)) -> append_2(qs_1(filter_2(le_1(x),xs)),cons_2(x,qs_1(filter_2(not_1(le_1(x)),xs)))) 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: le_2#_A(x1,x2) = max{x1, x2} s_1_A(x1) = x1 + 7 le_2#!_A(x1,x2) = max{4, x1 - 140, x2 - 2} s_1!_A(x1) = max{3, x1 - 141} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: le_2#_A(x1,x2) = 0 s_1_A(x1) = max{1, x1 - 3} le_2#!_A(x1,x2) = max{7, x1 - 264, x2 - 266} s_1!_A(x1) = max{6, x1 - 265} partial status: pi(le_2#) = [1] pi(s_1) = [1] The following rules are removed: p1 Then no dependency pair remains.