YES We show the termination of the TRS R: a__pairNs() -> cons(|0|(),incr(oddNs())) a__oddNs() -> a__incr(a__pairNs()) a__incr(cons(X,XS)) -> cons(s(mark(X)),incr(XS)) a__take(|0|(),XS) -> nil() a__take(s(N),cons(X,XS)) -> cons(mark(X),take(N,XS)) a__zip(nil(),XS) -> nil() a__zip(X,nil()) -> nil() a__zip(cons(X,XS),cons(Y,YS)) -> cons(pair(mark(X),mark(Y)),zip(XS,YS)) a__tail(cons(X,XS)) -> mark(XS) a__repItems(nil()) -> nil() a__repItems(cons(X,XS)) -> cons(mark(X),cons(X,repItems(XS))) mark(pairNs()) -> a__pairNs() mark(incr(X)) -> a__incr(mark(X)) mark(oddNs()) -> a__oddNs() mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) mark(zip(X1,X2)) -> a__zip(mark(X1),mark(X2)) mark(tail(X)) -> a__tail(mark(X)) mark(repItems(X)) -> a__repItems(mark(X)) mark(cons(X1,X2)) -> cons(mark(X1),X2) mark(|0|()) -> |0|() mark(s(X)) -> s(mark(X)) mark(nil()) -> nil() mark(pair(X1,X2)) -> pair(mark(X1),mark(X2)) a__pairNs() -> pairNs() a__incr(X) -> incr(X) a__oddNs() -> oddNs() a__take(X1,X2) -> take(X1,X2) a__zip(X1,X2) -> zip(X1,X2) a__tail(X) -> tail(X) a__repItems(X) -> repItems(X) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__oddNs#() -> a__incr#(a__pairNs()) p2: a__oddNs#() -> a__pairNs#() p3: a__incr#(cons(X,XS)) -> mark#(X) p4: a__take#(s(N),cons(X,XS)) -> mark#(X) p5: a__zip#(cons(X,XS),cons(Y,YS)) -> mark#(X) p6: a__zip#(cons(X,XS),cons(Y,YS)) -> mark#(Y) p7: a__tail#(cons(X,XS)) -> mark#(XS) p8: a__repItems#(cons(X,XS)) -> mark#(X) p9: mark#(pairNs()) -> a__pairNs#() p10: mark#(incr(X)) -> a__incr#(mark(X)) p11: mark#(incr(X)) -> mark#(X) p12: mark#(oddNs()) -> a__oddNs#() p13: mark#(take(X1,X2)) -> a__take#(mark(X1),mark(X2)) p14: mark#(take(X1,X2)) -> mark#(X1) p15: mark#(take(X1,X2)) -> mark#(X2) p16: mark#(zip(X1,X2)) -> a__zip#(mark(X1),mark(X2)) p17: mark#(zip(X1,X2)) -> mark#(X1) p18: mark#(zip(X1,X2)) -> mark#(X2) p19: mark#(tail(X)) -> a__tail#(mark(X)) p20: mark#(tail(X)) -> mark#(X) p21: mark#(repItems(X)) -> a__repItems#(mark(X)) p22: mark#(repItems(X)) -> mark#(X) p23: mark#(cons(X1,X2)) -> mark#(X1) p24: mark#(s(X)) -> mark#(X) p25: mark#(pair(X1,X2)) -> mark#(X1) p26: mark#(pair(X1,X2)) -> mark#(X2) and R consists of: r1: a__pairNs() -> cons(|0|(),incr(oddNs())) r2: a__oddNs() -> a__incr(a__pairNs()) r3: a__incr(cons(X,XS)) -> cons(s(mark(X)),incr(XS)) r4: a__take(|0|(),XS) -> nil() r5: a__take(s(N),cons(X,XS)) -> cons(mark(X),take(N,XS)) r6: a__zip(nil(),XS) -> nil() r7: a__zip(X,nil()) -> nil() r8: a__zip(cons(X,XS),cons(Y,YS)) -> cons(pair(mark(X),mark(Y)),zip(XS,YS)) r9: a__tail(cons(X,XS)) -> mark(XS) r10: a__repItems(nil()) -> nil() r11: a__repItems(cons(X,XS)) -> cons(mark(X),cons(X,repItems(XS))) r12: mark(pairNs()) -> a__pairNs() r13: mark(incr(X)) -> a__incr(mark(X)) r14: mark(oddNs()) -> a__oddNs() r15: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r16: mark(zip(X1,X2)) -> a__zip(mark(X1),mark(X2)) r17: mark(tail(X)) -> a__tail(mark(X)) r18: mark(repItems(X)) -> a__repItems(mark(X)) r19: mark(cons(X1,X2)) -> cons(mark(X1),X2) r20: mark(|0|()) -> |0|() r21: mark(s(X)) -> s(mark(X)) r22: mark(nil()) -> nil() r23: mark(pair(X1,X2)) -> pair(mark(X1),mark(X2)) r24: a__pairNs() -> pairNs() r25: a__incr(X) -> incr(X) r26: a__oddNs() -> oddNs() r27: a__take(X1,X2) -> take(X1,X2) r28: a__zip(X1,X2) -> zip(X1,X2) r29: a__tail(X) -> tail(X) r30: a__repItems(X) -> repItems(X) The estimated dependency graph contains the following SCCs: {p1, p3, p4, p5, p6, p7, p8, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a__oddNs#() -> a__incr#(a__pairNs()) p2: a__incr#(cons(X,XS)) -> mark#(X) p3: mark#(pair(X1,X2)) -> mark#(X2) p4: mark#(pair(X1,X2)) -> mark#(X1) p5: mark#(s(X)) -> mark#(X) p6: mark#(cons(X1,X2)) -> mark#(X1) p7: mark#(repItems(X)) -> mark#(X) p8: mark#(repItems(X)) -> a__repItems#(mark(X)) p9: a__repItems#(cons(X,XS)) -> mark#(X) p10: mark#(tail(X)) -> mark#(X) p11: mark#(tail(X)) -> a__tail#(mark(X)) p12: a__tail#(cons(X,XS)) -> mark#(XS) p13: mark#(zip(X1,X2)) -> mark#(X2) p14: mark#(zip(X1,X2)) -> mark#(X1) p15: mark#(zip(X1,X2)) -> a__zip#(mark(X1),mark(X2)) p16: a__zip#(cons(X,XS),cons(Y,YS)) -> mark#(Y) p17: mark#(take(X1,X2)) -> mark#(X2) p18: mark#(take(X1,X2)) -> mark#(X1) p19: mark#(take(X1,X2)) -> a__take#(mark(X1),mark(X2)) p20: a__take#(s(N),cons(X,XS)) -> mark#(X) p21: mark#(oddNs()) -> a__oddNs#() p22: mark#(incr(X)) -> mark#(X) p23: mark#(incr(X)) -> a__incr#(mark(X)) p24: a__zip#(cons(X,XS),cons(Y,YS)) -> mark#(X) and R consists of: r1: a__pairNs() -> cons(|0|(),incr(oddNs())) r2: a__oddNs() -> a__incr(a__pairNs()) r3: a__incr(cons(X,XS)) -> cons(s(mark(X)),incr(XS)) r4: a__take(|0|(),XS) -> nil() r5: a__take(s(N),cons(X,XS)) -> cons(mark(X),take(N,XS)) r6: a__zip(nil(),XS) -> nil() r7: a__zip(X,nil()) -> nil() r8: a__zip(cons(X,XS),cons(Y,YS)) -> cons(pair(mark(X),mark(Y)),zip(XS,YS)) r9: a__tail(cons(X,XS)) -> mark(XS) r10: a__repItems(nil()) -> nil() r11: a__repItems(cons(X,XS)) -> cons(mark(X),cons(X,repItems(XS))) r12: mark(pairNs()) -> a__pairNs() r13: mark(incr(X)) -> a__incr(mark(X)) r14: mark(oddNs()) -> a__oddNs() r15: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r16: mark(zip(X1,X2)) -> a__zip(mark(X1),mark(X2)) r17: mark(tail(X)) -> a__tail(mark(X)) r18: mark(repItems(X)) -> a__repItems(mark(X)) r19: mark(cons(X1,X2)) -> cons(mark(X1),X2) r20: mark(|0|()) -> |0|() r21: mark(s(X)) -> s(mark(X)) r22: mark(nil()) -> nil() r23: mark(pair(X1,X2)) -> pair(mark(X1),mark(X2)) r24: a__pairNs() -> pairNs() r25: a__incr(X) -> incr(X) r26: a__oddNs() -> oddNs() r27: a__take(X1,X2) -> take(X1,X2) r28: a__zip(X1,X2) -> zip(X1,X2) r29: a__tail(X) -> tail(X) r30: a__repItems(X) -> repItems(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, r24, r25, r26, r27, r28, r29, r30 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: a__oddNs#_A = 52 a__incr#_A(x1) = max{40, x1 + 11} a__pairNs_A = 40 cons_A(x1,x2) = max{25, x1 + 14, x2} mark#_A(x1) = max{24, x1 + 15} pair_A(x1,x2) = max{30, x1 + 27, x2 + 25} s_A(x1) = max{25, x1} repItems_A(x1) = max{8, x1 + 4} a__repItems#_A(x1) = max{24, x1 + 17} mark_A(x1) = max{3, x1} tail_A(x1) = max{10, x1 + 7} a__tail#_A(x1) = max{16, x1 + 15} zip_A(x1,x2) = max{34, x1 + 29, x2 + 31} a__zip#_A(x1,x2) = max{23, x1 + 20, x2 + 1} take_A(x1,x2) = max{56, x1 + 31, x2 + 26} a__take#_A(x1,x2) = max{x1 + 32, x2 + 27} oddNs_A = 40 incr_A(x1) = max{39, x1} a__oddNs_A = 40 a__incr_A(x1) = max{39, x1} a__take_A(x1,x2) = max{56, x1 + 31, x2 + 26} |0|_A = 26 nil_A = 0 a__zip_A(x1,x2) = max{34, x1 + 29, x2 + 31} a__tail_A(x1) = max{10, x1 + 7} a__repItems_A(x1) = max{8, x1 + 4} pairNs_A = 40 precedence: a__zip# > a__incr# > pair = mark = a__oddNs = a__zip = a__tail > a__incr > a__take = nil > a__pairNs = a__tail# = zip = a__repItems > pairNs > oddNs > take > s > a__oddNs# = cons = mark# > repItems = incr = |0| > tail > a__repItems# = a__take# partial status: pi(a__oddNs#) = [] pi(a__incr#) = [1] pi(a__pairNs) = [] pi(cons) = [] pi(mark#) = [1] pi(pair) = [2] pi(s) = [1] pi(repItems) = [1] pi(a__repItems#) = [1] pi(mark) = [1] pi(tail) = [1] pi(a__tail#) = [1] pi(zip) = [] pi(a__zip#) = [1, 2] pi(take) = [1, 2] pi(a__take#) = [1, 2] pi(oddNs) = [] pi(incr) = [1] pi(a__oddNs) = [] pi(a__incr) = [1] pi(a__take) = [1, 2] pi(|0|) = [] pi(nil) = [] pi(a__zip) = [2] pi(a__tail) = [] pi(a__repItems) = [1] pi(pairNs) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: a__oddNs#_A = 247 a__incr#_A(x1) = max{206, x1 + 142} a__pairNs_A = 104 cons_A(x1,x2) = 105 mark#_A(x1) = x1 + 239 pair_A(x1,x2) = max{42, x2} s_A(x1) = x1 + 103 repItems_A(x1) = max{114, x1 + 93} a__repItems#_A(x1) = max{206, x1 + 142} mark_A(x1) = max{102, x1 + 60} tail_A(x1) = x1 + 104 a__tail#_A(x1) = max{206, x1 + 122} zip_A(x1,x2) = 40 a__zip#_A(x1,x2) = max{x1 + 141, x2 + 142} take_A(x1,x2) = max{x1 + 123, x2 + 6} a__take#_A(x1,x2) = max{x1 + 142, x2 + 142} oddNs_A = 105 incr_A(x1) = max{205, x1 + 161} a__oddNs_A = 103 a__incr_A(x1) = 206 a__take_A(x1,x2) = 65 |0|_A = 105 nil_A = 116 a__zip_A(x1,x2) = 101 a__tail_A(x1) = 103 a__repItems_A(x1) = 115 pairNs_A = 105 precedence: a__oddNs# = a__incr# = a__pairNs = s = repItems = a__repItems# = mark = tail = a__tail# = take = a__zip > mark# = pair > zip > a__zip# = a__take# = oddNs = incr = a__oddNs = a__incr = a__take = nil = a__tail = a__repItems = pairNs > cons > |0| partial status: pi(a__oddNs#) = [] pi(a__incr#) = [] pi(a__pairNs) = [] pi(cons) = [] pi(mark#) = [1] pi(pair) = [2] pi(s) = [1] pi(repItems) = [1] pi(a__repItems#) = [1] pi(mark) = [1] pi(tail) = [1] pi(a__tail#) = [] pi(zip) = [] pi(a__zip#) = [2] pi(take) = [1, 2] pi(a__take#) = [2] pi(oddNs) = [] pi(incr) = [1] pi(a__oddNs) = [] pi(a__incr) = [] pi(a__take) = [] pi(|0|) = [] pi(nil) = [] pi(a__zip) = [] pi(a__tail) = [] pi(a__repItems) = [] pi(pairNs) = [] The next rules are strictly ordered: p1, p2, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: mark#(pair(X1,X2)) -> mark#(X2) and R consists of: r1: a__pairNs() -> cons(|0|(),incr(oddNs())) r2: a__oddNs() -> a__incr(a__pairNs()) r3: a__incr(cons(X,XS)) -> cons(s(mark(X)),incr(XS)) r4: a__take(|0|(),XS) -> nil() r5: a__take(s(N),cons(X,XS)) -> cons(mark(X),take(N,XS)) r6: a__zip(nil(),XS) -> nil() r7: a__zip(X,nil()) -> nil() r8: a__zip(cons(X,XS),cons(Y,YS)) -> cons(pair(mark(X),mark(Y)),zip(XS,YS)) r9: a__tail(cons(X,XS)) -> mark(XS) r10: a__repItems(nil()) -> nil() r11: a__repItems(cons(X,XS)) -> cons(mark(X),cons(X,repItems(XS))) r12: mark(pairNs()) -> a__pairNs() r13: mark(incr(X)) -> a__incr(mark(X)) r14: mark(oddNs()) -> a__oddNs() r15: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r16: mark(zip(X1,X2)) -> a__zip(mark(X1),mark(X2)) r17: mark(tail(X)) -> a__tail(mark(X)) r18: mark(repItems(X)) -> a__repItems(mark(X)) r19: mark(cons(X1,X2)) -> cons(mark(X1),X2) r20: mark(|0|()) -> |0|() r21: mark(s(X)) -> s(mark(X)) r22: mark(nil()) -> nil() r23: mark(pair(X1,X2)) -> pair(mark(X1),mark(X2)) r24: a__pairNs() -> pairNs() r25: a__incr(X) -> incr(X) r26: a__oddNs() -> oddNs() r27: a__take(X1,X2) -> take(X1,X2) r28: a__zip(X1,X2) -> zip(X1,X2) r29: a__tail(X) -> tail(X) r30: a__repItems(X) -> repItems(X) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: mark#(pair(X1,X2)) -> mark#(X2) and R consists of: r1: a__pairNs() -> cons(|0|(),incr(oddNs())) r2: a__oddNs() -> a__incr(a__pairNs()) r3: a__incr(cons(X,XS)) -> cons(s(mark(X)),incr(XS)) r4: a__take(|0|(),XS) -> nil() r5: a__take(s(N),cons(X,XS)) -> cons(mark(X),take(N,XS)) r6: a__zip(nil(),XS) -> nil() r7: a__zip(X,nil()) -> nil() r8: a__zip(cons(X,XS),cons(Y,YS)) -> cons(pair(mark(X),mark(Y)),zip(XS,YS)) r9: a__tail(cons(X,XS)) -> mark(XS) r10: a__repItems(nil()) -> nil() r11: a__repItems(cons(X,XS)) -> cons(mark(X),cons(X,repItems(XS))) r12: mark(pairNs()) -> a__pairNs() r13: mark(incr(X)) -> a__incr(mark(X)) r14: mark(oddNs()) -> a__oddNs() r15: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r16: mark(zip(X1,X2)) -> a__zip(mark(X1),mark(X2)) r17: mark(tail(X)) -> a__tail(mark(X)) r18: mark(repItems(X)) -> a__repItems(mark(X)) r19: mark(cons(X1,X2)) -> cons(mark(X1),X2) r20: mark(|0|()) -> |0|() r21: mark(s(X)) -> s(mark(X)) r22: mark(nil()) -> nil() r23: mark(pair(X1,X2)) -> pair(mark(X1),mark(X2)) r24: a__pairNs() -> pairNs() r25: a__incr(X) -> incr(X) r26: a__oddNs() -> oddNs() r27: a__take(X1,X2) -> take(X1,X2) r28: a__zip(X1,X2) -> zip(X1,X2) r29: a__tail(X) -> tail(X) r30: a__repItems(X) -> repItems(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: mark#_A(x1) = max{3, x1 + 2} pair_A(x1,x2) = max{1, x2} precedence: mark# = pair partial status: pi(mark#) = [1] pi(pair) = [2] 2. weighted path order base order: max/plus interpretations on natural numbers: mark#_A(x1) = max{3, x1 + 2} pair_A(x1,x2) = x2 + 1 precedence: mark# = pair partial status: pi(mark#) = [] pi(pair) = [2] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.