YES We show the termination of the TRS R: app(app(app(if(),true()),xs),ys) -> xs app(app(app(if(),false()),xs),ys) -> ys app(app(sub(),x),|0|()) -> x app(app(sub(),app(s(),x)),app(s(),y)) -> app(app(sub(),x),y) app(app(gtr(),|0|()),y) -> false() app(app(gtr(),app(s(),x)),|0|()) -> true() app(app(gtr(),app(s(),x)),app(s(),y)) -> app(app(gtr(),x),y) app(app(d(),x),|0|()) -> true() app(app(d(),app(s(),x)),app(s(),y)) -> app(app(app(if(),app(app(gtr(),x),y)),false()),app(app(d(),app(s(),x)),app(app(sub(),y),x))) app(len(),nil()) -> |0|() app(len(),app(app(cons(),x),xs)) -> app(s(),app(len(),xs)) app(app(filter(),p),nil()) -> nil() app(app(filter(),p),app(app(cons(),x),xs)) -> app(app(app(if(),app(p,x)),app(app(cons(),x),app(app(filter(),p),xs))),app(app(filter(),p),xs)) 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(d_0(),y) -> d_1(y) app(d_1(x1),y) -> d_2(x1,y) app(filter_0(),y) -> filter_1(y) app(filter_1(x1),y) -> filter_2(x1,y) app(gtr_0(),y) -> gtr_1(y) app(gtr_1(x1),y) -> gtr_2(x1,y) app(if_0(),y) -> if_1(y) app(if_1(x1),y) -> if_2(x1,y) app(if_2(x1,x2),y) -> if_3(x1,x2,y) app(len_0(),y) -> len_1(y) app(s_0(),y) -> s_1(y) app(sub_0(),y) -> sub_1(y) app(sub_1(x1),y) -> sub_2(x1,y) if_3(true_0(),xs,ys) -> xs if_3(false_0(),xs,ys) -> ys sub_2(x,|0|_0()) -> x sub_2(s_1(x),s_1(y)) -> sub_2(x,y) gtr_2(|0|_0(),y) -> false_0() gtr_2(s_1(x),|0|_0()) -> true_0() gtr_2(s_1(x),s_1(y)) -> gtr_2(x,y) d_2(x,|0|_0()) -> true_0() d_2(s_1(x),s_1(y)) -> if_3(gtr_2(x,y),false_0(),d_2(s_1(x),sub_2(y,x))) len_1(nil_0()) -> |0|_0() len_1(cons_2(x,xs)) -> s_1(len_1(xs)) filter_2(p,nil_0()) -> nil_0() filter_2(p,cons_2(x,xs)) -> if_3(app(p,x),cons_2(x,filter_2(p,xs)),filter_2(p,xs)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(d_1(x1),y) -> d_2#(x1,y) p2: app#(filter_1(x1),y) -> filter_2#(x1,y) p3: app#(gtr_1(x1),y) -> gtr_2#(x1,y) p4: app#(if_2(x1,x2),y) -> if_3#(x1,x2,y) p5: app#(len_0(),y) -> len_1#(y) p6: app#(sub_1(x1),y) -> sub_2#(x1,y) p7: sub_2#(s_1(x),s_1(y)) -> sub_2#(x,y) p8: gtr_2#(s_1(x),s_1(y)) -> gtr_2#(x,y) p9: d_2#(s_1(x),s_1(y)) -> if_3#(gtr_2(x,y),false_0(),d_2(s_1(x),sub_2(y,x))) p10: d_2#(s_1(x),s_1(y)) -> gtr_2#(x,y) p11: d_2#(s_1(x),s_1(y)) -> d_2#(s_1(x),sub_2(y,x)) p12: d_2#(s_1(x),s_1(y)) -> sub_2#(y,x) p13: len_1#(cons_2(x,xs)) -> len_1#(xs) p14: filter_2#(p,cons_2(x,xs)) -> if_3#(app(p,x),cons_2(x,filter_2(p,xs)),filter_2(p,xs)) p15: filter_2#(p,cons_2(x,xs)) -> app#(p,x) p16: filter_2#(p,cons_2(x,xs)) -> filter_2#(p,xs) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(d_0(),y) -> d_1(y) r4: app(d_1(x1),y) -> d_2(x1,y) r5: app(filter_0(),y) -> filter_1(y) r6: app(filter_1(x1),y) -> filter_2(x1,y) r7: app(gtr_0(),y) -> gtr_1(y) r8: app(gtr_1(x1),y) -> gtr_2(x1,y) r9: app(if_0(),y) -> if_1(y) r10: app(if_1(x1),y) -> if_2(x1,y) r11: app(if_2(x1,x2),y) -> if_3(x1,x2,y) r12: app(len_0(),y) -> len_1(y) r13: app(s_0(),y) -> s_1(y) r14: app(sub_0(),y) -> sub_1(y) r15: app(sub_1(x1),y) -> sub_2(x1,y) r16: if_3(true_0(),xs,ys) -> xs r17: if_3(false_0(),xs,ys) -> ys r18: sub_2(x,|0|_0()) -> x r19: sub_2(s_1(x),s_1(y)) -> sub_2(x,y) r20: gtr_2(|0|_0(),y) -> false_0() r21: gtr_2(s_1(x),|0|_0()) -> true_0() r22: gtr_2(s_1(x),s_1(y)) -> gtr_2(x,y) r23: d_2(x,|0|_0()) -> true_0() r24: d_2(s_1(x),s_1(y)) -> if_3(gtr_2(x,y),false_0(),d_2(s_1(x),sub_2(y,x))) r25: len_1(nil_0()) -> |0|_0() r26: len_1(cons_2(x,xs)) -> s_1(len_1(xs)) r27: filter_2(p,nil_0()) -> nil_0() r28: filter_2(p,cons_2(x,xs)) -> if_3(app(p,x),cons_2(x,filter_2(p,xs)),filter_2(p,xs)) The estimated dependency graph contains the following SCCs: {p2, p15, p16} {p11} {p8} {p13} {p7} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: filter_2#(p,cons_2(x,xs)) -> app#(p,x) p2: app#(filter_1(x1),y) -> filter_2#(x1,y) p3: filter_2#(p,cons_2(x,xs)) -> filter_2#(p,xs) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(d_0(),y) -> d_1(y) r4: app(d_1(x1),y) -> d_2(x1,y) r5: app(filter_0(),y) -> filter_1(y) r6: app(filter_1(x1),y) -> filter_2(x1,y) r7: app(gtr_0(),y) -> gtr_1(y) r8: app(gtr_1(x1),y) -> gtr_2(x1,y) r9: app(if_0(),y) -> if_1(y) r10: app(if_1(x1),y) -> if_2(x1,y) r11: app(if_2(x1,x2),y) -> if_3(x1,x2,y) r12: app(len_0(),y) -> len_1(y) r13: app(s_0(),y) -> s_1(y) r14: app(sub_0(),y) -> sub_1(y) r15: app(sub_1(x1),y) -> sub_2(x1,y) r16: if_3(true_0(),xs,ys) -> xs r17: if_3(false_0(),xs,ys) -> ys r18: sub_2(x,|0|_0()) -> x r19: sub_2(s_1(x),s_1(y)) -> sub_2(x,y) r20: gtr_2(|0|_0(),y) -> false_0() r21: gtr_2(s_1(x),|0|_0()) -> true_0() r22: gtr_2(s_1(x),s_1(y)) -> gtr_2(x,y) r23: d_2(x,|0|_0()) -> true_0() r24: d_2(s_1(x),s_1(y)) -> if_3(gtr_2(x,y),false_0(),d_2(s_1(x),sub_2(y,x))) r25: len_1(nil_0()) -> |0|_0() r26: len_1(cons_2(x,xs)) -> s_1(len_1(xs)) r27: filter_2(p,nil_0()) -> nil_0() r28: filter_2(p,cons_2(x,xs)) -> if_3(app(p,x),cons_2(x,filter_2(p,xs)),filter_2(p,xs)) The set of usable rules consists of r1, r2, r3, r5, r7, r9, r10, r11, r12, r13, r14, r16, r17, r20, r21, r23, r25, r26 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: filter_2#_A(x1,x2) = x1 + x2 + 4 cons_2_A(x1,x2) = x1 + x2 + 7 app#_A(x1,x2) = x1 + x2 filter_1_A(x1) = x1 + 5 app_A(x1,x2) = x1 + x2 + 14 cons_0_A() = 1 cons_1_A(x1) = x1 + 2 d_0_A() = 1 d_1_A(x1) = x1 + 2 filter_0_A() = 1 gtr_0_A() = 1 gtr_1_A(x1) = x1 + 2 if_0_A() = 1 if_1_A(x1) = x1 + 2 if_2_A(x1,x2) = x1 + x2 + 3 if_3_A(x1,x2,x3) = x1 + x2 + x3 + 4 len_0_A() = 1 len_1_A(x1) = x1 + 2 s_0_A() = 1 s_1_A(x1) = x1 + 4 sub_0_A() = 1 sub_1_A(x1) = x1 + 2 true_0_A() = 5 false_0_A() = 1 gtr_2_A(x1,x2) = x2 + 8 |0|_0_A() = 6 d_2_A(x1,x2) = x2 + 3 nil_0_A() = 7 base order 2: precedence: if_3 = gtr_2 > filter_2# = cons_0 = d_0 = s_1 = d_2 > app# = app = s_0 > filter_1 = d_1 = gtr_1 = if_2 > filter_0 = gtr_0 = if_1 = sub_1 > cons_2 = if_0 = sub_0 = nil_0 > cons_1 = len_1 > len_0 = |0|_0 > true_0 = false_0 partial status: pi(filter_2#) = [] pi(cons_2) = [2] pi(app#) = [2] pi(filter_1) = [1] pi(app) = [1] pi(cons_0) = [] pi(cons_1) = [1] pi(d_0) = [] pi(d_1) = [1] pi(filter_0) = [] pi(gtr_0) = [] pi(gtr_1) = [1] pi(if_0) = [] pi(if_1) = [1] pi(if_2) = [] pi(if_3) = [] pi(len_0) = [] pi(len_1) = [] pi(s_0) = [] pi(s_1) = [] pi(sub_0) = [] pi(sub_1) = [1] pi(true_0) = [] pi(false_0) = [] pi(gtr_2) = [2] pi(|0|_0) = [] pi(d_2) = [2] pi(nil_0) = [] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(filter_1(x1),y) -> filter_2#(x1,y) p2: filter_2#(p,cons_2(x,xs)) -> filter_2#(p,xs) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(d_0(),y) -> d_1(y) r4: app(d_1(x1),y) -> d_2(x1,y) r5: app(filter_0(),y) -> filter_1(y) r6: app(filter_1(x1),y) -> filter_2(x1,y) r7: app(gtr_0(),y) -> gtr_1(y) r8: app(gtr_1(x1),y) -> gtr_2(x1,y) r9: app(if_0(),y) -> if_1(y) r10: app(if_1(x1),y) -> if_2(x1,y) r11: app(if_2(x1,x2),y) -> if_3(x1,x2,y) r12: app(len_0(),y) -> len_1(y) r13: app(s_0(),y) -> s_1(y) r14: app(sub_0(),y) -> sub_1(y) r15: app(sub_1(x1),y) -> sub_2(x1,y) r16: if_3(true_0(),xs,ys) -> xs r17: if_3(false_0(),xs,ys) -> ys r18: sub_2(x,|0|_0()) -> x r19: sub_2(s_1(x),s_1(y)) -> sub_2(x,y) r20: gtr_2(|0|_0(),y) -> false_0() r21: gtr_2(s_1(x),|0|_0()) -> true_0() r22: gtr_2(s_1(x),s_1(y)) -> gtr_2(x,y) r23: d_2(x,|0|_0()) -> true_0() r24: d_2(s_1(x),s_1(y)) -> if_3(gtr_2(x,y),false_0(),d_2(s_1(x),sub_2(y,x))) r25: len_1(nil_0()) -> |0|_0() r26: len_1(cons_2(x,xs)) -> s_1(len_1(xs)) r27: filter_2(p,nil_0()) -> nil_0() r28: filter_2(p,cons_2(x,xs)) -> if_3(app(p,x),cons_2(x,filter_2(p,xs)),filter_2(p,xs)) The estimated dependency graph contains the following SCCs: {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: filter_2#(p,cons_2(x,xs)) -> filter_2#(p,xs) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(d_0(),y) -> d_1(y) r4: app(d_1(x1),y) -> d_2(x1,y) r5: app(filter_0(),y) -> filter_1(y) r6: app(filter_1(x1),y) -> filter_2(x1,y) r7: app(gtr_0(),y) -> gtr_1(y) r8: app(gtr_1(x1),y) -> gtr_2(x1,y) r9: app(if_0(),y) -> if_1(y) r10: app(if_1(x1),y) -> if_2(x1,y) r11: app(if_2(x1,x2),y) -> if_3(x1,x2,y) r12: app(len_0(),y) -> len_1(y) r13: app(s_0(),y) -> s_1(y) r14: app(sub_0(),y) -> sub_1(y) r15: app(sub_1(x1),y) -> sub_2(x1,y) r16: if_3(true_0(),xs,ys) -> xs r17: if_3(false_0(),xs,ys) -> ys r18: sub_2(x,|0|_0()) -> x r19: sub_2(s_1(x),s_1(y)) -> sub_2(x,y) r20: gtr_2(|0|_0(),y) -> false_0() r21: gtr_2(s_1(x),|0|_0()) -> true_0() r22: gtr_2(s_1(x),s_1(y)) -> gtr_2(x,y) r23: d_2(x,|0|_0()) -> true_0() r24: d_2(s_1(x),s_1(y)) -> if_3(gtr_2(x,y),false_0(),d_2(s_1(x),sub_2(y,x))) r25: len_1(nil_0()) -> |0|_0() r26: len_1(cons_2(x,xs)) -> s_1(len_1(xs)) r27: filter_2(p,nil_0()) -> nil_0() r28: filter_2(p,cons_2(x,xs)) -> if_3(app(p,x),cons_2(x,filter_2(p,xs)),filter_2(p,xs)) The set of usable rules consists of r1, r5, r7, r9, r10, r14, r16, r17, r20, r21, r23, r25, r26 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: filter_2#_A(x1,x2) = x2 cons_2_A(x1,x2) = x1 + x2 + 16 app_A(x1,x2) = 10 cons_0_A() = 2 cons_1_A(x1) = 1 filter_0_A() = 2 filter_1_A(x1) = 1 gtr_0_A() = 10 gtr_1_A(x1) = 9 if_0_A() = 3 if_1_A(x1) = 2 if_2_A(x1,x2) = 1 sub_0_A() = 2 sub_1_A(x1) = 1 if_3_A(x1,x2,x3) = x1 + x2 + x3 + 11 true_0_A() = 3 false_0_A() = 1 gtr_2_A(x1,x2) = x1 + x2 + 8 |0|_0_A() = 2 s_1_A(x1) = x1 + 4 d_2_A(x1,x2) = x2 + 3 len_1_A(x1) = x1 + 11 nil_0_A() = 1 base order 2: precedence: |0|_0 > len_1 > cons_0 = sub_0 = if_3 = s_1 > true_0 = gtr_2 > cons_2 = d_2 = nil_0 > filter_2# = false_0 > app = filter_0 = gtr_0 = if_0 = if_2 > cons_1 = filter_1 = gtr_1 = if_1 = sub_1 partial status: pi(filter_2#) = [2] pi(cons_2) = [2] pi(app) = [] pi(cons_0) = [] pi(cons_1) = [] pi(filter_0) = [] pi(filter_1) = [] pi(gtr_0) = [] pi(gtr_1) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(sub_0) = [] pi(sub_1) = [] pi(if_3) = [] pi(true_0) = [] pi(false_0) = [] pi(gtr_2) = [1, 2] pi(|0|_0) = [] pi(s_1) = [1] pi(d_2) = [] pi(len_1) = [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: d_2#(s_1(x),s_1(y)) -> d_2#(s_1(x),sub_2(y,x)) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(d_0(),y) -> d_1(y) r4: app(d_1(x1),y) -> d_2(x1,y) r5: app(filter_0(),y) -> filter_1(y) r6: app(filter_1(x1),y) -> filter_2(x1,y) r7: app(gtr_0(),y) -> gtr_1(y) r8: app(gtr_1(x1),y) -> gtr_2(x1,y) r9: app(if_0(),y) -> if_1(y) r10: app(if_1(x1),y) -> if_2(x1,y) r11: app(if_2(x1,x2),y) -> if_3(x1,x2,y) r12: app(len_0(),y) -> len_1(y) r13: app(s_0(),y) -> s_1(y) r14: app(sub_0(),y) -> sub_1(y) r15: app(sub_1(x1),y) -> sub_2(x1,y) r16: if_3(true_0(),xs,ys) -> xs r17: if_3(false_0(),xs,ys) -> ys r18: sub_2(x,|0|_0()) -> x r19: sub_2(s_1(x),s_1(y)) -> sub_2(x,y) r20: gtr_2(|0|_0(),y) -> false_0() r21: gtr_2(s_1(x),|0|_0()) -> true_0() r22: gtr_2(s_1(x),s_1(y)) -> gtr_2(x,y) r23: d_2(x,|0|_0()) -> true_0() r24: d_2(s_1(x),s_1(y)) -> if_3(gtr_2(x,y),false_0(),d_2(s_1(x),sub_2(y,x))) r25: len_1(nil_0()) -> |0|_0() r26: len_1(cons_2(x,xs)) -> s_1(len_1(xs)) r27: filter_2(p,nil_0()) -> nil_0() r28: filter_2(p,cons_2(x,xs)) -> if_3(app(p,x),cons_2(x,filter_2(p,xs)),filter_2(p,xs)) The set of usable rules consists of r1, r3, r5, r7, r9, r10, r12, r13, r16, r17, r18, r19, r21, r25, r26 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: d_2#_A(x1,x2) = x2 + 1 s_1_A(x1) = x1 + 12 sub_2_A(x1,x2) = x1 + 10 app_A(x1,x2) = x2 + 13 cons_0_A() = 1 cons_1_A(x1) = x1 + 2 d_0_A() = 4 d_1_A(x1) = 3 filter_0_A() = 1 filter_1_A(x1) = x1 + 2 gtr_0_A() = 2 gtr_1_A(x1) = 1 if_0_A() = 3 if_1_A(x1) = 2 if_2_A(x1,x2) = 1 len_0_A() = 1 len_1_A(x1) = x1 s_0_A() = 1 if_3_A(x1,x2,x3) = x1 + x2 + x3 + 2 true_0_A() = 1 false_0_A() = 4 |0|_0_A() = 5 gtr_2_A(x1,x2) = x2 + 3 nil_0_A() = 6 cons_2_A(x1,x2) = x1 + x2 + 14 base order 2: precedence: len_1 = nil_0 > d_2# = |0|_0 > s_1 = sub_2 = d_0 = false_0 > d_1 = gtr_2 > app = cons_1 = gtr_0 = if_0 = len_0 = s_0 = true_0 = cons_2 > cons_0 = filter_1 = gtr_1 = if_1 = if_3 > filter_0 = if_2 partial status: pi(d_2#) = [] pi(s_1) = [] pi(sub_2) = [] pi(app) = [] pi(cons_0) = [] pi(cons_1) = [1] pi(d_0) = [] pi(d_1) = [] pi(filter_0) = [] pi(filter_1) = [1] pi(gtr_0) = [] pi(gtr_1) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(len_0) = [] pi(len_1) = [1] pi(s_0) = [] pi(if_3) = [3] pi(true_0) = [] pi(false_0) = [] pi(|0|_0) = [] pi(gtr_2) = [2] pi(nil_0) = [] 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: gtr_2#(s_1(x),s_1(y)) -> gtr_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(d_0(),y) -> d_1(y) r4: app(d_1(x1),y) -> d_2(x1,y) r5: app(filter_0(),y) -> filter_1(y) r6: app(filter_1(x1),y) -> filter_2(x1,y) r7: app(gtr_0(),y) -> gtr_1(y) r8: app(gtr_1(x1),y) -> gtr_2(x1,y) r9: app(if_0(),y) -> if_1(y) r10: app(if_1(x1),y) -> if_2(x1,y) r11: app(if_2(x1,x2),y) -> if_3(x1,x2,y) r12: app(len_0(),y) -> len_1(y) r13: app(s_0(),y) -> s_1(y) r14: app(sub_0(),y) -> sub_1(y) r15: app(sub_1(x1),y) -> sub_2(x1,y) r16: if_3(true_0(),xs,ys) -> xs r17: if_3(false_0(),xs,ys) -> ys r18: sub_2(x,|0|_0()) -> x r19: sub_2(s_1(x),s_1(y)) -> sub_2(x,y) r20: gtr_2(|0|_0(),y) -> false_0() r21: gtr_2(s_1(x),|0|_0()) -> true_0() r22: gtr_2(s_1(x),s_1(y)) -> gtr_2(x,y) r23: d_2(x,|0|_0()) -> true_0() r24: d_2(s_1(x),s_1(y)) -> if_3(gtr_2(x,y),false_0(),d_2(s_1(x),sub_2(y,x))) r25: len_1(nil_0()) -> |0|_0() r26: len_1(cons_2(x,xs)) -> s_1(len_1(xs)) r27: filter_2(p,nil_0()) -> nil_0() r28: filter_2(p,cons_2(x,xs)) -> if_3(app(p,x),cons_2(x,filter_2(p,xs)),filter_2(p,xs)) The set of usable rules consists of r1, r3, r5, r7, r9, r10, r12, r14, r16, r17, r20, r23, r25, r26 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: gtr_2#_A(x1,x2) = x1 + x2 s_1_A(x1) = x1 + 6 app_A(x1,x2) = x2 + 3 cons_0_A() = 3 cons_1_A(x1) = 2 d_0_A() = 2 d_1_A(x1) = 1 filter_0_A() = 2 filter_1_A(x1) = 1 gtr_0_A() = 1 gtr_1_A(x1) = 2 if_0_A() = 3 if_1_A(x1) = 2 if_2_A(x1,x2) = 1 len_0_A() = 1 len_1_A(x1) = x1 + 2 sub_0_A() = 2 sub_1_A(x1) = 1 if_3_A(x1,x2,x3) = x1 + x2 + x3 true_0_A() = 5 false_0_A() = 1 gtr_2_A(x1,x2) = 4 |0|_0_A() = 6 d_2_A(x1,x2) = x2 + 2 nil_0_A() = 7 cons_2_A(x1,x2) = x1 + x2 + 9 base order 2: precedence: if_3 > gtr_2 = nil_0 = cons_2 > gtr_2# = app = cons_0 = d_0 = filter_0 = gtr_1 = if_0 = sub_0 > cons_1 = filter_1 = gtr_0 = if_1 = sub_1 = |0|_0 = d_2 > s_1 = d_1 = if_2 = len_1 > len_0 = true_0 = false_0 partial status: pi(gtr_2#) = [1] pi(s_1) = [1] pi(app) = [] pi(cons_0) = [] pi(cons_1) = [] pi(d_0) = [] pi(d_1) = [] pi(filter_0) = [] pi(filter_1) = [] pi(gtr_0) = [] pi(gtr_1) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(len_0) = [] pi(len_1) = [1] pi(sub_0) = [] pi(sub_1) = [] pi(if_3) = [] pi(true_0) = [] pi(false_0) = [] pi(gtr_2) = [] pi(|0|_0) = [] pi(d_2) = [] pi(nil_0) = [] 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: len_1#(cons_2(x,xs)) -> len_1#(xs) and R consists of: r1: app(cons_0(),y) -> cons_1(y) r2: app(cons_1(x1),y) -> cons_2(x1,y) r3: app(d_0(),y) -> d_1(y) r4: app(d_1(x1),y) -> d_2(x1,y) r5: app(filter_0(),y) -> filter_1(y) r6: app(filter_1(x1),y) -> filter_2(x1,y) r7: app(gtr_0(),y) -> gtr_1(y) r8: app(gtr_1(x1),y) -> gtr_2(x1,y) r9: app(if_0(),y) -> if_1(y) r10: app(if_1(x1),y) -> if_2(x1,y) r11: app(if_2(x1,x2),y) -> if_3(x1,x2,y) r12: app(len_0(),y) -> len_1(y) r13: app(s_0(),y) -> s_1(y) r14: app(sub_0(),y) -> sub_1(y) r15: app(sub_1(x1),y) -> sub_2(x1,y) r16: if_3(true_0(),xs,ys) -> xs r17: if_3(false_0(),xs,ys) -> ys r18: sub_2(x,|0|_0()) -> x r19: sub_2(s_1(x),s_1(y)) -> sub_2(x,y) r20: gtr_2(|0|_0(),y) -> false_0() r21: gtr_2(s_1(x),|0|_0()) -> true_0() r22: gtr_2(s_1(x),s_1(y)) -> gtr_2(x,y) r23: d_2(x,|0|_0()) -> true_0() r24: d_2(s_1(x),s_1(y)) -> if_3(gtr_2(x,y),false_0(),d_2(s_1(x),sub_2(y,x))) r25: len_1(nil_0()) -> |0|_0() r26: len_1(cons_2(x,xs)) -> s_1(len_1(xs)) r27: filter_2(p,nil_0()) -> nil_0() r28: filter_2(p,cons_2(x,xs)) -> if_3(app(p,x),cons_2(x,filter_2(p,xs)),filter_2(p,xs)) The set of usable rules consists of r1, r3, r5, r7, r9, r10, r12, r13, r14, r16, r17, r20, r21, r23, r25, r26 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: len_1#_A(x1) = x1 cons_2_A(x1,x2) = x1 + x2 + 9 app_A(x1,x2) = x2 + 8 cons_0_A() = 8 cons_1_A(x1) = 7 d_0_A() = 1 d_1_A(x1) = x1 + 2 filter_0_A() = 2 filter_1_A(x1) = 1 gtr_0_A() = 8 gtr_1_A(x1) = 7 if_0_A() = 3 if_1_A(x1) = 2 if_2_A(x1,x2) = 1 len_0_A() = 1 len_1_A(x1) = x1 + 2 s_0_A() = 1 s_1_A(x1) = x1 + 2 sub_0_A() = 2 sub_1_A(x1) = 1 if_3_A(x1,x2,x3) = x1 + x2 + x3 + 2 true_0_A() = 3 false_0_A() = 1 gtr_2_A(x1,x2) = x1 + x2 + 6 |0|_0_A() = 4 d_2_A(x1,x2) = x2 + 3 nil_0_A() = 5 base order 2: precedence: if_0 = nil_0 > if_1 = |0|_0 > app = gtr_0 = len_1 > gtr_1 > s_0 = sub_0 = gtr_2 > cons_0 = filter_0 = if_2 = len_0 = s_1 = sub_1 = if_3 = false_0 = d_2 > d_1 = true_0 > cons_2 = d_0 = filter_1 > len_1# = cons_1 partial status: pi(len_1#) = [1] pi(cons_2) = [] pi(app) = [2] pi(cons_0) = [] pi(cons_1) = [] pi(d_0) = [] pi(d_1) = [1] pi(filter_0) = [] pi(filter_1) = [] pi(gtr_0) = [] pi(gtr_1) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(len_0) = [] pi(len_1) = [1] pi(s_0) = [] pi(s_1) = [1] pi(sub_0) = [] pi(sub_1) = [] pi(if_3) = [] pi(true_0) = [] pi(false_0) = [] pi(gtr_2) = [] pi(|0|_0) = [] pi(d_2) = [2] 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: sub_2#(s_1(x),s_1(y)) -> sub_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(d_0(),y) -> d_1(y) r4: app(d_1(x1),y) -> d_2(x1,y) r5: app(filter_0(),y) -> filter_1(y) r6: app(filter_1(x1),y) -> filter_2(x1,y) r7: app(gtr_0(),y) -> gtr_1(y) r8: app(gtr_1(x1),y) -> gtr_2(x1,y) r9: app(if_0(),y) -> if_1(y) r10: app(if_1(x1),y) -> if_2(x1,y) r11: app(if_2(x1,x2),y) -> if_3(x1,x2,y) r12: app(len_0(),y) -> len_1(y) r13: app(s_0(),y) -> s_1(y) r14: app(sub_0(),y) -> sub_1(y) r15: app(sub_1(x1),y) -> sub_2(x1,y) r16: if_3(true_0(),xs,ys) -> xs r17: if_3(false_0(),xs,ys) -> ys r18: sub_2(x,|0|_0()) -> x r19: sub_2(s_1(x),s_1(y)) -> sub_2(x,y) r20: gtr_2(|0|_0(),y) -> false_0() r21: gtr_2(s_1(x),|0|_0()) -> true_0() r22: gtr_2(s_1(x),s_1(y)) -> gtr_2(x,y) r23: d_2(x,|0|_0()) -> true_0() r24: d_2(s_1(x),s_1(y)) -> if_3(gtr_2(x,y),false_0(),d_2(s_1(x),sub_2(y,x))) r25: len_1(nil_0()) -> |0|_0() r26: len_1(cons_2(x,xs)) -> s_1(len_1(xs)) r27: filter_2(p,nil_0()) -> nil_0() r28: filter_2(p,cons_2(x,xs)) -> if_3(app(p,x),cons_2(x,filter_2(p,xs)),filter_2(p,xs)) The set of usable rules consists of r1, r3, r5, r7, r9, r10, r12, r14, r16, r17, r20, r23, r25, r26 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: sub_2#_A(x1,x2) = x1 + x2 s_1_A(x1) = x1 + 6 app_A(x1,x2) = x2 + 3 cons_0_A() = 3 cons_1_A(x1) = 2 d_0_A() = 2 d_1_A(x1) = 1 filter_0_A() = 2 filter_1_A(x1) = 1 gtr_0_A() = 1 gtr_1_A(x1) = 2 if_0_A() = 3 if_1_A(x1) = 2 if_2_A(x1,x2) = 1 len_0_A() = 1 len_1_A(x1) = x1 + 2 sub_0_A() = 2 sub_1_A(x1) = 1 if_3_A(x1,x2,x3) = x1 + x2 + x3 true_0_A() = 5 false_0_A() = 1 gtr_2_A(x1,x2) = 4 |0|_0_A() = 6 d_2_A(x1,x2) = x2 + 2 nil_0_A() = 7 cons_2_A(x1,x2) = x1 + x2 + 9 base order 2: precedence: if_3 > gtr_2 = nil_0 = cons_2 > sub_2# = app = cons_0 = d_0 = filter_0 = gtr_1 = if_0 = sub_0 > cons_1 = filter_1 = gtr_0 = if_1 = sub_1 = |0|_0 = d_2 > s_1 = d_1 = if_2 = len_1 > len_0 = true_0 = false_0 partial status: pi(sub_2#) = [1] pi(s_1) = [1] pi(app) = [] pi(cons_0) = [] pi(cons_1) = [] pi(d_0) = [] pi(d_1) = [] pi(filter_0) = [] pi(filter_1) = [] pi(gtr_0) = [] pi(gtr_1) = [] pi(if_0) = [] pi(if_1) = [] pi(if_2) = [] pi(len_0) = [] pi(len_1) = [1] pi(sub_0) = [] pi(sub_1) = [] pi(if_3) = [] pi(true_0) = [] pi(false_0) = [] pi(gtr_2) = [] pi(|0|_0) = [] pi(d_2) = [] pi(nil_0) = [] pi(cons_2) = [1, 2] The following rules are removed: p1 Then no dependency pair remains.