YES We show the termination of the TRS R: active(from(X)) -> mark(cons(X,from(s(X)))) active(length(nil())) -> mark(|0|()) active(length(cons(X,Y))) -> mark(s(length1(Y))) active(length1(X)) -> mark(length(X)) mark(from(X)) -> active(from(mark(X))) mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) mark(s(X)) -> active(s(mark(X))) mark(length(X)) -> active(length(X)) mark(nil()) -> active(nil()) mark(|0|()) -> active(|0|()) mark(length1(X)) -> active(length1(X)) from(mark(X)) -> from(X) from(active(X)) -> from(X) cons(mark(X1),X2) -> cons(X1,X2) cons(X1,mark(X2)) -> cons(X1,X2) cons(active(X1),X2) -> cons(X1,X2) cons(X1,active(X2)) -> cons(X1,X2) s(mark(X)) -> s(X) s(active(X)) -> s(X) length(mark(X)) -> length(X) length(active(X)) -> length(X) length1(mark(X)) -> length1(X) length1(active(X)) -> length1(X) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: active#(from(X)) -> mark#(cons(X,from(s(X)))) p2: active#(from(X)) -> cons#(X,from(s(X))) p3: active#(from(X)) -> from#(s(X)) p4: active#(from(X)) -> s#(X) p5: active#(length(nil())) -> mark#(|0|()) p6: active#(length(cons(X,Y))) -> mark#(s(length1(Y))) p7: active#(length(cons(X,Y))) -> s#(length1(Y)) p8: active#(length(cons(X,Y))) -> length1#(Y) p9: active#(length1(X)) -> mark#(length(X)) p10: active#(length1(X)) -> length#(X) p11: mark#(from(X)) -> active#(from(mark(X))) p12: mark#(from(X)) -> from#(mark(X)) p13: mark#(from(X)) -> mark#(X) p14: mark#(cons(X1,X2)) -> active#(cons(mark(X1),X2)) p15: mark#(cons(X1,X2)) -> cons#(mark(X1),X2) p16: mark#(cons(X1,X2)) -> mark#(X1) p17: mark#(s(X)) -> active#(s(mark(X))) p18: mark#(s(X)) -> s#(mark(X)) p19: mark#(s(X)) -> mark#(X) p20: mark#(length(X)) -> active#(length(X)) p21: mark#(nil()) -> active#(nil()) p22: mark#(|0|()) -> active#(|0|()) p23: mark#(length1(X)) -> active#(length1(X)) p24: from#(mark(X)) -> from#(X) p25: from#(active(X)) -> from#(X) p26: cons#(mark(X1),X2) -> cons#(X1,X2) p27: cons#(X1,mark(X2)) -> cons#(X1,X2) p28: cons#(active(X1),X2) -> cons#(X1,X2) p29: cons#(X1,active(X2)) -> cons#(X1,X2) p30: s#(mark(X)) -> s#(X) p31: s#(active(X)) -> s#(X) p32: length#(mark(X)) -> length#(X) p33: length#(active(X)) -> length#(X) p34: length1#(mark(X)) -> length1#(X) p35: length1#(active(X)) -> length1#(X) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) The estimated dependency graph contains the following SCCs: {p1, p6, p9, p11, p13, p14, p16, p17, p19, p20, p23} {p26, p27, p28, p29} {p24, p25} {p30, p31} {p34, p35} {p32, p33} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: active#(from(X)) -> mark#(cons(X,from(s(X)))) p2: mark#(length1(X)) -> active#(length1(X)) p3: active#(length1(X)) -> mark#(length(X)) p4: mark#(length(X)) -> active#(length(X)) p5: active#(length(cons(X,Y))) -> mark#(s(length1(Y))) p6: mark#(s(X)) -> mark#(X) p7: mark#(s(X)) -> active#(s(mark(X))) p8: mark#(cons(X1,X2)) -> mark#(X1) p9: mark#(cons(X1,X2)) -> active#(cons(mark(X1),X2)) p10: mark#(from(X)) -> mark#(X) p11: mark#(from(X)) -> active#(from(mark(X))) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) 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, r19, r20, r21, r22, r23 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: active#_A(x1) = max{7, x1 - 9} from_A(x1) = max{70, x1 + 47} mark#_A(x1) = max{7, x1 - 6} cons_A(x1,x2) = max{60, x1 + 44} s_A(x1) = x1 length1_A(x1) = 9 length_A(x1) = 7 mark_A(x1) = max{9, x1} active_A(x1) = max{9, x1} nil_A = 10 |0|_A = 8 precedence: active# = from = mark# = cons = s = length1 = length = mark = active = nil = |0| partial status: pi(active#) = [] pi(from) = [] pi(mark#) = [] pi(cons) = [] pi(s) = [] pi(length1) = [] pi(length) = [] pi(mark) = [] pi(active) = [] pi(nil) = [] pi(|0|) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: active#_A(x1) = 14 from_A(x1) = 59 mark#_A(x1) = 14 cons_A(x1,x2) = 5 s_A(x1) = 49 length1_A(x1) = 0 length_A(x1) = 95 mark_A(x1) = 69 active_A(x1) = 69 nil_A = 71 |0|_A = 70 precedence: cons = length = nil > |0| > from = mark = active > s > active# = mark# > length1 partial status: pi(active#) = [] pi(from) = [] pi(mark#) = [] pi(cons) = [] pi(s) = [] pi(length1) = [] pi(length) = [] pi(mark) = [] pi(active) = [] pi(nil) = [] pi(|0|) = [] The next rules are strictly ordered: p8 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: active#(from(X)) -> mark#(cons(X,from(s(X)))) p2: mark#(length1(X)) -> active#(length1(X)) p3: active#(length1(X)) -> mark#(length(X)) p4: mark#(length(X)) -> active#(length(X)) p5: active#(length(cons(X,Y))) -> mark#(s(length1(Y))) p6: mark#(s(X)) -> mark#(X) p7: mark#(s(X)) -> active#(s(mark(X))) p8: mark#(cons(X1,X2)) -> active#(cons(mark(X1),X2)) p9: mark#(from(X)) -> mark#(X) p10: mark#(from(X)) -> active#(from(mark(X))) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p8, p9, p10} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: active#(from(X)) -> mark#(cons(X,from(s(X)))) p2: mark#(from(X)) -> active#(from(mark(X))) p3: active#(length(cons(X,Y))) -> mark#(s(length1(Y))) p4: mark#(from(X)) -> mark#(X) p5: mark#(cons(X1,X2)) -> active#(cons(mark(X1),X2)) p6: active#(length1(X)) -> mark#(length(X)) p7: mark#(s(X)) -> active#(s(mark(X))) p8: mark#(s(X)) -> mark#(X) p9: mark#(length(X)) -> active#(length(X)) p10: mark#(length1(X)) -> active#(length1(X)) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) 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, r19, r20, r21, r22, r23 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: active#_A(x1) = max{12, x1 - 20} from_A(x1) = x1 + 43 mark#_A(x1) = max{11, x1 - 12} cons_A(x1,x2) = max{25, x2 - 54} s_A(x1) = max{24, x1} mark_A(x1) = x1 length_A(x1) = 24 length1_A(x1) = 24 active_A(x1) = max{20, x1} nil_A = 21 |0|_A = 24 precedence: length1 > length > mark = nil > |0| > active# = from = mark# = cons = s = active partial status: pi(active#) = [] pi(from) = [] pi(mark#) = [] pi(cons) = [] pi(s) = [] pi(mark) = [1] pi(length) = [] pi(length1) = [] pi(active) = [1] pi(nil) = [] pi(|0|) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: active#_A(x1) = 267 from_A(x1) = 12 mark#_A(x1) = 267 cons_A(x1,x2) = 1 s_A(x1) = 1 mark_A(x1) = 0 length_A(x1) = 143 length1_A(x1) = 19 active_A(x1) = max{0, x1 - 13} nil_A = 53 |0|_A = 198 precedence: cons > s > |0| > mark > active# = mark# = length = length1 = active > from = nil partial status: pi(active#) = [] pi(from) = [] pi(mark#) = [] pi(cons) = [] pi(s) = [] pi(mark) = [] pi(length) = [] pi(length1) = [] pi(active) = [] pi(nil) = [] pi(|0|) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: active#(from(X)) -> mark#(cons(X,from(s(X)))) p2: active#(length(cons(X,Y))) -> mark#(s(length1(Y))) p3: mark#(from(X)) -> mark#(X) p4: mark#(cons(X1,X2)) -> active#(cons(mark(X1),X2)) p5: active#(length1(X)) -> mark#(length(X)) p6: mark#(s(X)) -> active#(s(mark(X))) p7: mark#(s(X)) -> mark#(X) p8: mark#(length(X)) -> active#(length(X)) p9: mark#(length1(X)) -> active#(length1(X)) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p8, p9} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: active#(from(X)) -> mark#(cons(X,from(s(X)))) p2: mark#(length1(X)) -> active#(length1(X)) p3: active#(length1(X)) -> mark#(length(X)) p4: mark#(length(X)) -> active#(length(X)) p5: active#(length(cons(X,Y))) -> mark#(s(length1(Y))) p6: mark#(s(X)) -> mark#(X) p7: mark#(s(X)) -> active#(s(mark(X))) p8: mark#(cons(X1,X2)) -> active#(cons(mark(X1),X2)) p9: mark#(from(X)) -> mark#(X) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) 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, r19, r20, r21, r22, r23 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: active#_A(x1) = max{128, x1 - 23} from_A(x1) = 226 mark#_A(x1) = 128 cons_A(x1,x2) = 151 s_A(x1) = 109 length1_A(x1) = 151 length_A(x1) = 139 mark_A(x1) = max{176, x1 + 68} active_A(x1) = max{177, x1 + 57} nil_A = 120 |0|_A = 127 precedence: cons = s = length1 = mark = active = nil > active# = mark# = length > from = |0| partial status: pi(active#) = [] pi(from) = [] pi(mark#) = [] pi(cons) = [] pi(s) = [] pi(length1) = [] pi(length) = [] pi(mark) = [1] pi(active) = [] pi(nil) = [] pi(|0|) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: active#_A(x1) = 292 from_A(x1) = 278 mark#_A(x1) = 292 cons_A(x1,x2) = 382 s_A(x1) = 291 length1_A(x1) = 206 length_A(x1) = 232 mark_A(x1) = 193 active_A(x1) = 193 nil_A = 192 |0|_A = 436 precedence: cons > active# = from = mark# = s = length1 = length = mark = active = nil = |0| partial status: pi(active#) = [] pi(from) = [] pi(mark#) = [] pi(cons) = [] pi(s) = [] pi(length1) = [] pi(length) = [] pi(mark) = [] pi(active) = [] pi(nil) = [] pi(|0|) = [] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: mark#(length1(X)) -> active#(length1(X)) p2: active#(length1(X)) -> mark#(length(X)) p3: mark#(length(X)) -> active#(length(X)) p4: active#(length(cons(X,Y))) -> mark#(s(length1(Y))) p5: mark#(s(X)) -> mark#(X) p6: mark#(s(X)) -> active#(s(mark(X))) p7: mark#(cons(X1,X2)) -> active#(cons(mark(X1),X2)) p8: mark#(from(X)) -> mark#(X) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p8} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: mark#(length1(X)) -> active#(length1(X)) p2: active#(length(cons(X,Y))) -> mark#(s(length1(Y))) p3: mark#(from(X)) -> mark#(X) p4: mark#(cons(X1,X2)) -> active#(cons(mark(X1),X2)) p5: active#(length1(X)) -> mark#(length(X)) p6: mark#(s(X)) -> active#(s(mark(X))) p7: mark#(s(X)) -> mark#(X) p8: mark#(length(X)) -> active#(length(X)) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) 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, r19, r20, r21, r22, r23 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: mark#_A(x1) = max{32, x1 - 2} length1_A(x1) = 33 active#_A(x1) = 32 length_A(x1) = 23 cons_A(x1,x2) = 34 s_A(x1) = max{31, x1} from_A(x1) = max{41, x1 + 6} mark_A(x1) = max{44, x1 + 9} active_A(x1) = max{44, x1} nil_A = 43 |0|_A = 35 precedence: mark# = length1 = active# = length = cons = s = from = mark = active = nil = |0| partial status: pi(mark#) = [] pi(length1) = [] pi(active#) = [] pi(length) = [] pi(cons) = [] pi(s) = [] pi(from) = [] pi(mark) = [] pi(active) = [] pi(nil) = [] pi(|0|) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: mark#_A(x1) = 12 length1_A(x1) = 16 active#_A(x1) = 12 length_A(x1) = 17 cons_A(x1,x2) = 0 s_A(x1) = 0 from_A(x1) = 13 mark_A(x1) = 13 active_A(x1) = 13 nil_A = 14 |0|_A = 18 precedence: from = |0| > mark# = length1 = active# = length = cons = s = mark = active = nil partial status: pi(mark#) = [] pi(length1) = [] pi(active#) = [] pi(length) = [] pi(cons) = [] pi(s) = [] pi(from) = [] pi(mark) = [] pi(active) = [] pi(nil) = [] pi(|0|) = [] The next rules are strictly ordered: p3 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: mark#(length1(X)) -> active#(length1(X)) p2: active#(length(cons(X,Y))) -> mark#(s(length1(Y))) p3: mark#(cons(X1,X2)) -> active#(cons(mark(X1),X2)) p4: active#(length1(X)) -> mark#(length(X)) p5: mark#(s(X)) -> active#(s(mark(X))) p6: mark#(s(X)) -> mark#(X) p7: mark#(length(X)) -> active#(length(X)) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: mark#(length1(X)) -> active#(length1(X)) p2: active#(length1(X)) -> mark#(length(X)) p3: mark#(length(X)) -> active#(length(X)) p4: active#(length(cons(X,Y))) -> mark#(s(length1(Y))) p5: mark#(s(X)) -> mark#(X) p6: mark#(s(X)) -> active#(s(mark(X))) p7: mark#(cons(X1,X2)) -> active#(cons(mark(X1),X2)) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) 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, r19, r20, r21, r22, r23 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: mark#_A(x1) = max{172, x1 + 2} length1_A(x1) = x1 + 186 active#_A(x1) = max{169, x1 - 14} length_A(x1) = x1 + 169 cons_A(x1,x2) = max{110, x2 + 41} s_A(x1) = max{172, x1 + 7} mark_A(x1) = max{166, x1 + 7} active_A(x1) = max{166, x1} from_A(x1) = 117 nil_A = 176 |0|_A = 168 precedence: mark# = length1 = active# = length = cons = s = mark = active = from = nil = |0| partial status: pi(mark#) = [] pi(length1) = [] pi(active#) = [] pi(length) = [] pi(cons) = [] pi(s) = [] pi(mark) = [] pi(active) = [] pi(from) = [] pi(nil) = [] pi(|0|) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: mark#_A(x1) = 24 length1_A(x1) = 46 active#_A(x1) = 24 length_A(x1) = 77 cons_A(x1,x2) = 9 s_A(x1) = 15 mark_A(x1) = 15 active_A(x1) = 15 from_A(x1) = 15 nil_A = 1 |0|_A = 76 precedence: mark# = active# = length > length1 > mark = active = |0| > cons = s = from = nil partial status: pi(mark#) = [] pi(length1) = [] pi(active#) = [] pi(length) = [] pi(cons) = [] pi(s) = [] pi(mark) = [] pi(active) = [] pi(from) = [] pi(nil) = [] pi(|0|) = [] The next rules are strictly ordered: p5 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: mark#(length1(X)) -> active#(length1(X)) p2: active#(length1(X)) -> mark#(length(X)) p3: mark#(length(X)) -> active#(length(X)) p4: active#(length(cons(X,Y))) -> mark#(s(length1(Y))) p5: mark#(s(X)) -> active#(s(mark(X))) p6: mark#(cons(X1,X2)) -> active#(cons(mark(X1),X2)) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: mark#(length1(X)) -> active#(length1(X)) p2: active#(length(cons(X,Y))) -> mark#(s(length1(Y))) p3: mark#(cons(X1,X2)) -> active#(cons(mark(X1),X2)) p4: active#(length1(X)) -> mark#(length(X)) p5: mark#(s(X)) -> active#(s(mark(X))) p6: mark#(length(X)) -> active#(length(X)) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) 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, r19, r20, r21, r22, r23 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: mark#_A(x1) = x1 + 13 length1_A(x1) = x1 + 15 active#_A(x1) = x1 + 13 length_A(x1) = 14 cons_A(x1,x2) = max{2, x2} s_A(x1) = 0 mark_A(x1) = max{6, x1} active_A(x1) = max{4, x1} from_A(x1) = max{10, x1 + 3} nil_A = 10 |0|_A = 5 precedence: mark# > from > active# = |0| > length1 > mark = nil > active > length = cons = s partial status: pi(mark#) = [1] pi(length1) = [] pi(active#) = [1] pi(length) = [] pi(cons) = [] pi(s) = [] pi(mark) = [1] pi(active) = [1] pi(from) = [] pi(nil) = [] pi(|0|) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: mark#_A(x1) = max{34, x1 - 27} length1_A(x1) = 18 active#_A(x1) = max{33, x1 + 30} length_A(x1) = 1 cons_A(x1,x2) = 4 s_A(x1) = 32 mark_A(x1) = 4 active_A(x1) = max{4, x1 - 5} from_A(x1) = 15 nil_A = 10 |0|_A = 26 precedence: mark# = s = from = |0| > cons = nil > length1 = active# = mark = active > length partial status: pi(mark#) = [] pi(length1) = [] pi(active#) = [] pi(length) = [] pi(cons) = [] pi(s) = [] pi(mark) = [] pi(active) = [] pi(from) = [] pi(nil) = [] pi(|0|) = [] The next rules are strictly ordered: p1, p2, p3, p4, p5, p6 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: cons#(mark(X1),X2) -> cons#(X1,X2) p2: cons#(X1,active(X2)) -> cons#(X1,X2) p3: cons#(active(X1),X2) -> cons#(X1,X2) p4: cons#(X1,mark(X2)) -> cons#(X1,X2) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: cons#_A(x1,x2) = max{2, x1 + 1, x2 + 1} mark_A(x1) = max{1, x1} active_A(x1) = max{1, x1} precedence: cons# = mark = active partial status: pi(cons#) = [1, 2] pi(mark) = [1] pi(active) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: cons#_A(x1,x2) = max{x1 + 1, x2 - 1} mark_A(x1) = x1 active_A(x1) = x1 precedence: cons# = mark = active partial status: pi(cons#) = [1] pi(mark) = [1] pi(active) = [1] The next rules are strictly ordered: p1, p2, p3, p4 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: from#(mark(X)) -> from#(X) p2: from#(active(X)) -> from#(X) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: from#_A(x1) = x1 + 2 mark_A(x1) = x1 active_A(x1) = x1 + 2 precedence: mark > active > from# partial status: pi(from#) = [1] pi(mark) = [1] pi(active) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: from#_A(x1) = x1 + 1 mark_A(x1) = x1 active_A(x1) = x1 precedence: from# = mark = active partial status: pi(from#) = [1] pi(mark) = [1] pi(active) = [1] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: s#(mark(X)) -> s#(X) p2: s#(active(X)) -> s#(X) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: s#_A(x1) = max{6, x1 + 4} mark_A(x1) = max{4, x1 + 3} active_A(x1) = max{2, x1 + 1} precedence: s# = mark = active partial status: pi(s#) = [1] pi(mark) = [1] pi(active) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: s#_A(x1) = x1 + 1 mark_A(x1) = x1 active_A(x1) = x1 precedence: s# = mark = active partial status: pi(s#) = [1] pi(mark) = [1] pi(active) = [1] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: length1#(mark(X)) -> length1#(X) p2: length1#(active(X)) -> length1#(X) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: length1#_A(x1) = x1 + 2 mark_A(x1) = x1 active_A(x1) = x1 + 2 precedence: mark > active > length1# partial status: pi(length1#) = [1] pi(mark) = [1] pi(active) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: length1#_A(x1) = x1 + 1 mark_A(x1) = x1 active_A(x1) = x1 precedence: length1# = mark = active partial status: pi(length1#) = [1] pi(mark) = [1] pi(active) = [1] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: length#(mark(X)) -> length#(X) p2: length#(active(X)) -> length#(X) and R consists of: r1: active(from(X)) -> mark(cons(X,from(s(X)))) r2: active(length(nil())) -> mark(|0|()) r3: active(length(cons(X,Y))) -> mark(s(length1(Y))) r4: active(length1(X)) -> mark(length(X)) r5: mark(from(X)) -> active(from(mark(X))) r6: mark(cons(X1,X2)) -> active(cons(mark(X1),X2)) r7: mark(s(X)) -> active(s(mark(X))) r8: mark(length(X)) -> active(length(X)) r9: mark(nil()) -> active(nil()) r10: mark(|0|()) -> active(|0|()) r11: mark(length1(X)) -> active(length1(X)) r12: from(mark(X)) -> from(X) r13: from(active(X)) -> from(X) r14: cons(mark(X1),X2) -> cons(X1,X2) r15: cons(X1,mark(X2)) -> cons(X1,X2) r16: cons(active(X1),X2) -> cons(X1,X2) r17: cons(X1,active(X2)) -> cons(X1,X2) r18: s(mark(X)) -> s(X) r19: s(active(X)) -> s(X) r20: length(mark(X)) -> length(X) r21: length(active(X)) -> length(X) r22: length1(mark(X)) -> length1(X) r23: length1(active(X)) -> length1(X) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: length#_A(x1) = x1 + 2 mark_A(x1) = x1 active_A(x1) = x1 + 2 precedence: mark > active > length# partial status: pi(length#) = [1] pi(mark) = [1] pi(active) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: length#_A(x1) = x1 + 1 mark_A(x1) = x1 active_A(x1) = x1 precedence: length# = mark = active partial status: pi(length#) = [1] pi(mark) = [1] pi(active) = [1] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains.