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 r1, r3, r5, r6, r7, r8, r10, r12, r16, r19, r20, r21, r22, r24, r25, r27, r28 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: not_2#_A(x1,x2) = max{96, x1 + 89, x2 + 58} a#_A(x1,x2) = max{x1 + 89, x2 + 58} qs_0_A = 9 qs_1#_A(x1) = x1 + 57 cons_2_A(x1,x2) = max{71, x1 + 43, x2} filter_2#_A(x1,x2) = max{x1 + 90, x2 + 16} not_1_A(x1) = max{7, x1} le_1_A(x1) = max{9, x1 + 1} filter_1_A(x1) = max{67, x1 + 2} filter_2_A(x1,x2) = max{56, x1 - 59, x2} a_A(x1,x2) = max{68, x1 - 10, x2 + 8} append_0_A = 11 append_1_A(x1) = max{12, x1 - 1} cons_0_A = 8 cons_1_A(x1) = max{9, x1 - 1} filter_0_A = 9 if_0_A = 9 if_1_A(x1) = max{11, x1 - 1} if_2_A(x1,x2) = max{0, x1 - 70, x2 - 1} le_0_A = 8 not_0_A = 6 s_0_A = 9 s_1_A(x1) = 68 nil_0_A = 0 if_3_A(x1,x2,x3) = max{71, x2 + 43, x3} le_2_A(x1,x2) = max{71, x1 - 72, x2 - 72} |0|_0_A = 71 true_0_A = 70 false_0_A = 67 not2_1_A(x1) = max{71, x1 - 80} base order 2: precedence: qs_1# > not_1 > a > cons_2 = filter_2 = cons_0 = filter_0 = if_0 = not_0 = if_3 = |0|_0 = not2_1 > not_2# = a# = filter_1 = cons_1 = if_1 = if_2 = le_0 = s_1 = le_2 = true_0 > filter_2# = le_1 = append_1 = s_0 = false_0 > append_0 > qs_0 = nil_0 partial status: pi(not_2#) = [2] pi(a#) = [2] pi(qs_0) = [] pi(qs_1#) = [] pi(cons_2) = [1, 2] pi(filter_2#) = [] pi(not_1) = [] pi(le_1) = [1] pi(filter_1) = [] pi(filter_2) = [2] pi(a) = [] pi(append_0) = [] pi(append_1) = [] pi(cons_0) = [] pi(cons_1) = [] pi(filter_0) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(le_0) = [] pi(not_0) = [] pi(s_0) = [] pi(s_1) = [] pi(nil_0) = [] pi(if_3) = [2, 3] pi(le_2) = [] pi(|0|_0) = [] pi(true_0) = [] pi(false_0) = [] pi(not2_1) = [] The following rules are removed: p5 -- SCC decomposition. 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: 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: {p1, p5} {p7, p9} {p4} -- 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 r1, r3, r5, r7, r8, r10, r12, r14, r16, r21, r22, r27, r28, r29 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: not_2#_A(x1,x2) = x1 + 33 a#_A(x1,x2) = x1 + 32 not_1_A(x1) = x1 + 34 a_A(x1,x2) = max{x1 - 40, x2 + 47} append_0_A = 38 append_1_A(x1) = max{39, x1 - 61} cons_0_A = 41 cons_1_A(x1) = max{46, x1 - 1} filter_0_A = 39 filter_1_A(x1) = max{4, x1 - 1} if_0_A = 1 if_1_A(x1) = max{2, x1 - 1} if_2_A(x1,x2) = max{3, x1 - 42, x2 - 1} le_0_A = 28 le_1_A(x1) = max{29, x1 - 35} not_0_A = 39 not2_0_A = 41 not2_1_A(x1) = max{3, x1 - 80} s_0_A = 38 s_1_A(x1) = max{39, x1 - 77} le_2_A(x1,x2) = max{40, x1 - 76, x2 - 40} |0|_0_A = 3 true_0_A = 1 false_0_A = 2 qs_1_A(x1) = max{30, x1 - 36} nil_0_A = 2 base order 2: precedence: if_0 > not_2# = a = append_0 = cons_0 = filter_1 = if_1 = if_2 = not2_0 = s_0 = |0|_0 = qs_1 > a# = cons_1 = filter_0 = le_2 > not_1 = append_1 = le_1 = not2_1 = s_1 = nil_0 > le_0 = not_0 = false_0 > true_0 partial status: pi(not_2#) = [1] pi(a#) = [] pi(not_1) = [1] pi(a) = [2] pi(append_0) = [] pi(append_1) = [] pi(cons_0) = [] pi(cons_1) = [] pi(filter_0) = [] pi(filter_1) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(le_0) = [] pi(le_1) = [] pi(not_0) = [] pi(not2_0) = [] pi(not2_1) = [] pi(s_0) = [] pi(s_1) = [] pi(le_2) = [] pi(|0|_0) = [] pi(true_0) = [] pi(false_0) = [] pi(qs_1) = [] pi(nil_0) = [] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: 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 estimated dependency graph contains the following SCCs: (no SCCs) -- 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 r3, r5, r7, r8, r14, r16, r19, r20, r21, r22, r24, r25, r27, r28 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: qs_1#_A(x1) = x1 + 14 cons_2_A(x1,x2) = max{x1 - 12, x2 + 20} filter_2_A(x1,x2) = x2 + 5 le_1_A(x1) = x1 + 35 not_1_A(x1) = max{26, x1 - 9} a_A(x1,x2) = max{0, x1 - 40, x2 - 40} cons_0_A = 39 cons_1_A(x1) = max{0, x1 - 40} filter_0_A = 39 filter_1_A(x1) = max{0, x1 - 40} if_0_A = 39 if_1_A(x1) = max{0, x1 - 40} if_2_A(x1,x2) = max{0, x1 - 81, x2 - 40} not2_0_A = 44 not2_1_A(x1) = max{3, x1 - 41} s_0_A = 44 s_1_A(x1) = max{3, x1 - 42} nil_0_A = 0 if_3_A(x1,x2,x3) = max{25, x2 - 12, x3 + 20} le_2_A(x1,x2) = max{36, x1 - 4, x2 - 41} |0|_0_A = 3 true_0_A = 1 false_0_A = 2 base order 2: precedence: le_2 > le_1 = not_1 > a > filter_2 = not2_1 = s_1 = |0|_0 > cons_0 = filter_1 = not2_0 = s_0 = if_3 = false_0 > cons_2 = filter_0 = if_2 > qs_1# = cons_1 = if_1 = true_0 > if_0 = nil_0 partial status: pi(qs_1#) = [] pi(cons_2) = [] pi(filter_2) = [2] pi(le_1) = [1] pi(not_1) = [] pi(a) = [] pi(cons_0) = [] pi(cons_1) = [] pi(filter_0) = [] pi(filter_1) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(not2_0) = [] pi(not2_1) = [] pi(s_0) = [] pi(s_1) = [] pi(nil_0) = [] pi(if_3) = [3] pi(le_2) = [] pi(|0|_0) = [] 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: 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: {p1} -- 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)) 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 r1, r3, r5, r7, r8, r10, r16, r19, r20, r21, r22, r24, r25, r27, r28 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: qs_1#_A(x1) = x1 + 39 cons_2_A(x1,x2) = max{12, x1 - 25, x2 + 5} filter_2_A(x1,x2) = max{8, x2 + 4} le_1_A(x1) = 6 a_A(x1,x2) = max{x1 + 27, x2 - 20} append_0_A = 1 append_1_A(x1) = max{0, x1 - 36} cons_0_A = 1 cons_1_A(x1) = max{11, x1 - 26} filter_0_A = 1 filter_1_A(x1) = max{0, x1 - 28} if_0_A = 1 if_1_A(x1) = max{16, x1 - 29} if_2_A(x1,x2) = max{18, x1 - 28, x2 - 51} le_0_A = 7 s_0_A = 1 s_1_A(x1) = max{18, x1 - 21} nil_0_A = 7 if_3_A(x1,x2,x3) = max{12, x2 - 25, x3 + 5} le_2_A(x1,x2) = max{34, x1 - 19, x2 - 19} |0|_0_A = 3 true_0_A = 1 false_0_A = 2 not2_1_A(x1) = max{18, x1 - 18} base order 2: precedence: qs_1# = le_2 = not2_1 > filter_2 = a > s_1 = if_3 = |0|_0 > cons_2 = filter_1 = if_2 = le_0 = s_0 = false_0 > append_1 = cons_1 = filter_0 = if_1 = true_0 > le_1 = append_0 = cons_0 = if_0 = nil_0 partial status: pi(qs_1#) = [] pi(cons_2) = [] pi(filter_2) = [] pi(le_1) = [] pi(a) = [1] pi(append_0) = [] pi(append_1) = [] pi(cons_0) = [] pi(cons_1) = [] pi(filter_0) = [] pi(filter_1) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(le_0) = [] pi(s_0) = [] pi(s_1) = [] pi(nil_0) = [] pi(if_3) = [3] pi(le_2) = [] pi(|0|_0) = [] pi(true_0) = [] pi(false_0) = [] pi(not2_1) = [] 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: 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 r1, r3, r5, r7, r8, r10, r12, r14, r16, r21, r22, r27, r28, r29 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: filter_2#_A(x1,x2) = max{x1 + 23, x2 + 75} cons_2_A(x1,x2) = max{21, x1 - 52, x2 + 1} a_A(x1,x2) = max{48, x1 - 18, x2 - 5} append_0_A = 16 append_1_A(x1) = max{17, x1 - 5} cons_0_A = 17 cons_1_A(x1) = max{16, x1 - 5} filter_0_A = 1 filter_1_A(x1) = max{2, x1 - 6} if_0_A = 16 if_1_A(x1) = max{17, x1 - 6} if_2_A(x1,x2) = max{1, x1 - 24, x2 - 5} le_0_A = 16 le_1_A(x1) = max{17, x1 - 69} not_0_A = 17 not_1_A(x1) = max{19, x1 - 6} not2_0_A = 19 not2_1_A(x1) = max{20, x1 - 49} s_0_A = 2 s_1_A(x1) = max{3, x1 - 6} le_2_A(x1,x2) = max{49, x1 - 4, x2 - 4} |0|_0_A = 3 true_0_A = 1 false_0_A = 2 qs_1_A(x1) = max{20, x1 - 16} nil_0_A = 0 base order 2: precedence: filter_2# = le_2 > cons_2 = a = cons_0 = nil_0 > cons_1 = not2_1 = s_1 = |0|_0 = qs_1 > le_1 = not_1 = not2_0 = s_0 = false_0 > append_1 = filter_1 = le_0 = not_0 = true_0 > append_0 = filter_0 = if_2 > if_1 > if_0 partial status: pi(filter_2#) = [2] pi(cons_2) = [] pi(a) = [] pi(append_0) = [] pi(append_1) = [] pi(cons_0) = [] pi(cons_1) = [] pi(filter_0) = [] pi(filter_1) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(le_0) = [] pi(le_1) = [] pi(not_0) = [] pi(not_1) = [] pi(not2_0) = [] pi(not2_1) = [] pi(s_0) = [] pi(s_1) = [] pi(le_2) = [] pi(|0|_0) = [] pi(true_0) = [] pi(false_0) = [] pi(qs_1) = [] pi(nil_0) = [] 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 r1, r3, r5, r7, r8, r10, r12, r14, r16, r21, r22, r27, r28, r29 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: append_2#_A(x1,x2) = max{x1 + 12, x2 + 18} cons_2_A(x1,x2) = max{37, x1 + 18, x2 + 6} a_A(x1,x2) = max{33, x1 - 34, x2 - 3} append_0_A = 33 append_1_A(x1) = max{1, x1 - 4} cons_0_A = 31 cons_1_A(x1) = max{32, x1 - 4} filter_0_A = 32 filter_1_A(x1) = max{33, x1 - 3} if_0_A = 1 if_1_A(x1) = max{32, x1 - 3} if_2_A(x1,x2) = max{1, x1 - 38, x2 - 4} le_0_A = 1 le_1_A(x1) = max{31, x1 - 4} not_0_A = 1 not_1_A(x1) = max{32, x1 - 12} not2_0_A = 2 not2_1_A(x1) = max{3, x1 - 34} s_0_A = 2 s_1_A(x1) = max{3, x1 - 40} le_2_A(x1,x2) = max{32, x1 - 39, x2 - 4} |0|_0_A = 3 true_0_A = 1 false_0_A = 2 qs_1_A(x1) = max{36, x1 - 17} nil_0_A = 35 base order 2: precedence: a > append_2# = cons_2 = if_0 = le_2 > cons_1 = if_2 = not2_1 = s_1 = |0|_0 = qs_1 > cons_0 = if_1 = le_1 = not_1 = not2_0 = s_0 = false_0 = nil_0 > append_1 = le_0 = not_0 = true_0 > append_0 = filter_1 > filter_0 partial status: pi(append_2#) = [1] pi(cons_2) = [2] pi(a) = [] pi(append_0) = [] pi(append_1) = [] pi(cons_0) = [] pi(cons_1) = [] pi(filter_0) = [] pi(filter_1) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(le_0) = [] pi(le_1) = [] pi(not_0) = [] pi(not_1) = [] pi(not2_0) = [] pi(not2_1) = [] pi(s_0) = [] pi(s_1) = [] pi(le_2) = [] pi(|0|_0) = [] pi(true_0) = [] pi(false_0) = [] pi(qs_1) = [] pi(nil_0) = [] 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 r1, r3, r4, r5, r7, r8, r10, r11, r12, r14, r21, r22, r23, r24, r27, r28, r29 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: le_2#_A(x1,x2) = max{x1 - 1, x2 + 4} s_1_A(x1) = max{5, x1 + 3} a_A(x1,x2) = max{12, x1 - 13, x2 - 3} append_0_A = 10 append_1_A(x1) = max{11, x1 - 113} cons_0_A = 11 cons_1_A(x1) = max{12, x1 - 3} cons_2_A(x1,x2) = max{3, x1 - 55, x2 - 171} filter_0_A = 8 filter_1_A(x1) = max{9, x1 - 4} if_0_A = 8 if_1_A(x1) = max{9, x1 - 4} if_2_A(x1,x2) = max{10, x1 - 18, x2 - 4} le_0_A = 1 le_1_A(x1) = max{2, x1 - 56} le_2_A(x1,x2) = max{6, x1 - 70, x2 - 6} not_0_A = 1 not_1_A(x1) = max{2, x1 - 4} not2_0_A = 27 not2_1_A(x1) = max{13, x1 - 13} |0|_0_A = 5 true_0_A = 1 false_0_A = 4 if_3_A(x1,x2,x3) = max{11, x1 - 32, x2 - 18, x3 - 118} qs_1_A(x1) = x1 + 6 nil_0_A = 0 base order 2: precedence: le_2 > le_2# = s_1 = qs_1 > a > filter_0 = if_2 = not2_1 = |0|_0 = if_3 > append_0 = cons_2 = filter_1 = if_1 = not2_0 = false_0 = nil_0 > cons_1 = if_0 = le_1 = not_1 = true_0 > append_1 = cons_0 = le_0 = not_0 partial status: pi(le_2#) = [2] pi(s_1) = [1] pi(a) = [] pi(append_0) = [] pi(append_1) = [] pi(cons_0) = [] pi(cons_1) = [] pi(cons_2) = [] pi(filter_0) = [] pi(filter_1) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(le_0) = [] pi(le_1) = [] pi(le_2) = [] pi(not_0) = [] pi(not_1) = [] pi(not2_0) = [] pi(not2_1) = [] pi(|0|_0) = [] pi(true_0) = [] pi(false_0) = [] pi(if_3) = [] pi(qs_1) = [1] pi(nil_0) = [] The following rules are removed: p1 Then no dependency pair remains.