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. matrix interpretations: carrier: N^2 order: standard order interpretations: a__oddNs#_A() = (2,0) a__incr#_A(x1) = ((0,1),(0,0)) x1 + (1,0) a__pairNs_A() = (3,1) cons_A(x1,x2) = ((0,1),(0,1)) x1 + x2 mark#_A(x1) = ((0,1),(0,0)) x1 + (1,0) pair_A(x1,x2) = ((0,1),(0,1)) x1 + x2 + (1,0) s_A(x1) = ((1,1),(0,1)) x1 + (1,0) repItems_A(x1) = ((1,1),(1,1)) x1 + (1,2) a__repItems#_A(x1) = x1 + (2,0) mark_A(x1) = x1 tail_A(x1) = x1 + (1,2) a__tail#_A(x1) = ((0,1),(0,0)) x1 + (2,0) zip_A(x1,x2) = ((1,0),(1,1)) x1 + ((0,1),(1,1)) x2 + (2,0) a__zip#_A(x1,x2) = ((0,1),(0,0)) x1 + x2 + (1,0) take_A(x1,x2) = ((0,0),(1,1)) x1 + ((0,1),(1,1)) x2 + (2,1) a__take#_A(x1,x2) = x1 + x2 oddNs_A() = (2,1) incr_A(x1) = ((0,1),(0,1)) x1 + (1,0) a__oddNs_A() = (2,1) a__incr_A(x1) = ((0,1),(0,1)) x1 + (1,0) a__take_A(x1,x2) = ((0,0),(1,1)) x1 + ((0,1),(1,1)) x2 + (2,1) |0|_A() = (1,0) nil_A() = (1,0) a__zip_A(x1,x2) = ((1,0),(1,1)) x1 + ((0,1),(1,1)) x2 + (2,0) a__tail_A(x1) = x1 + (1,2) a__repItems_A(x1) = ((1,1),(1,1)) x1 + (1,2) pairNs_A() = (3,1) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__oddNs#_A() = (7,1) a__incr#_A(x1) = (7,1) a__pairNs_A() = (2,4) cons_A(x1,x2) = (3,5) mark#_A(x1) = (7,1) pair_A(x1,x2) = (1,1) s_A(x1) = ((0,0),(1,0)) x1 repItems_A(x1) = ((0,0),(1,1)) x1 + (3,1) a__repItems#_A(x1) = ((1,1),(1,1)) x1 mark_A(x1) = ((0,0),(1,1)) x1 + (3,3) tail_A(x1) = (1,1) a__tail#_A(x1) = (6,0) zip_A(x1,x2) = ((0,0),(1,0)) x1 + (1,1) a__zip#_A(x1,x2) = x2 + (4,1) take_A(x1,x2) = (1,5) a__take#_A(x1,x2) = (7,2) oddNs_A() = (0,2) incr_A(x1) = (0,2) a__oddNs_A() = (3,5) a__incr_A(x1) = (3,5) a__take_A(x1,x2) = (3,5) |0|_A() = (1,1) nil_A() = (1,1) a__zip_A(x1,x2) = ((0,0),(1,0)) x1 + (3,2) a__tail_A(x1) = (3,3) a__repItems_A(x1) = ((0,0),(1,1)) x1 + (3,1) pairNs_A() = (1,1) The next rules are strictly ordered: p7, p8, p9, p10, p11, p12, p17, p18, p19 We remove them from the problem. -- SCC decomposition. 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#(zip(X1,X2)) -> mark#(X2) p8: mark#(zip(X1,X2)) -> mark#(X1) p9: mark#(zip(X1,X2)) -> a__zip#(mark(X1),mark(X2)) p10: a__zip#(cons(X,XS),cons(Y,YS)) -> mark#(Y) p11: a__take#(s(N),cons(X,XS)) -> mark#(X) p12: mark#(oddNs()) -> a__oddNs#() p13: mark#(incr(X)) -> mark#(X) p14: mark#(incr(X)) -> a__incr#(mark(X)) p15: 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 estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p12, p13, p14, p15} -- 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#(incr(X)) -> a__incr#(mark(X)) p4: mark#(incr(X)) -> mark#(X) p5: mark#(oddNs()) -> a__oddNs#() p6: mark#(zip(X1,X2)) -> a__zip#(mark(X1),mark(X2)) p7: a__zip#(cons(X,XS),cons(Y,YS)) -> mark#(X) p8: mark#(zip(X1,X2)) -> mark#(X1) p9: mark#(zip(X1,X2)) -> mark#(X2) p10: mark#(cons(X1,X2)) -> mark#(X1) p11: mark#(s(X)) -> mark#(X) p12: mark#(pair(X1,X2)) -> mark#(X1) p13: mark#(pair(X1,X2)) -> mark#(X2) p14: a__zip#(cons(X,XS),cons(Y,YS)) -> mark#(Y) 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. matrix interpretations: carrier: N^2 order: standard order interpretations: a__oddNs#_A() = (1,0) a__incr#_A(x1) = ((0,1),(0,0)) x1 a__pairNs_A() = (1,1) cons_A(x1,x2) = x1 + ((0,1),(1,0)) x2 mark#_A(x1) = ((0,1),(0,0)) x1 incr_A(x1) = x1 mark_A(x1) = x1 oddNs_A() = (1,1) zip_A(x1,x2) = ((1,1),(1,1)) x1 + x2 + (2,2) a__zip#_A(x1,x2) = ((1,1),(0,0)) x1 + ((0,1),(0,0)) x2 + (1,0) s_A(x1) = x1 + (1,0) pair_A(x1,x2) = x1 + x2 + (1,0) a__oddNs_A() = (1,1) a__incr_A(x1) = x1 a__take_A(x1,x2) = x2 + (1,1) |0|_A() = (1,0) nil_A() = (1,0) take_A(x1,x2) = x2 + (1,1) a__zip_A(x1,x2) = ((1,1),(1,1)) x1 + x2 + (2,2) a__tail_A(x1) = ((0,1),(1,0)) x1 + (1,1) a__repItems_A(x1) = ((1,1),(1,1)) x1 + (1,1) repItems_A(x1) = ((1,1),(1,1)) x1 + (1,1) tail_A(x1) = ((0,1),(1,0)) x1 + (1,1) pairNs_A() = (1,1) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__oddNs#_A() = (5,0) a__incr#_A(x1) = (5,0) a__pairNs_A() = (4,1) cons_A(x1,x2) = (3,1) mark#_A(x1) = (5,0) incr_A(x1) = (4,10) mark_A(x1) = ((1,1),(1,1)) x1 + (1,5) oddNs_A() = (1,4) zip_A(x1,x2) = x2 + (1,1) a__zip#_A(x1,x2) = ((1,1),(0,0)) x1 + (0,1) s_A(x1) = (1,1) pair_A(x1,x2) = (1,1) a__oddNs_A() = (5,10) a__incr_A(x1) = (4,10) a__take_A(x1,x2) = ((0,1),(1,0)) x2 + (2,11) |0|_A() = (0,1) nil_A() = (2,2) take_A(x1,x2) = ((0,1),(1,0)) x2 + (1,6) a__zip_A(x1,x2) = x2 + (1,1) a__tail_A(x1) = (3,5) a__repItems_A(x1) = ((1,1),(1,1)) x1 + (1,5) repItems_A(x1) = ((1,1),(1,1)) x1 + (1,5) tail_A(x1) = (1,1) pairNs_A() = (3,1) The next rules are strictly ordered: p6, p7, p8, p9, p14 We remove them from the problem. -- SCC decomposition. 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#(incr(X)) -> a__incr#(mark(X)) p4: mark#(incr(X)) -> mark#(X) p5: mark#(oddNs()) -> a__oddNs#() p6: mark#(cons(X1,X2)) -> mark#(X1) p7: mark#(s(X)) -> mark#(X) p8: mark#(pair(X1,X2)) -> mark#(X1) p9: 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, p2, p3, p4, p5, p6, p7, p8, p9} -- 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#(oddNs()) -> a__oddNs#() p8: mark#(incr(X)) -> mark#(X) p9: mark#(incr(X)) -> a__incr#(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. matrix interpretations: carrier: N^2 order: standard order interpretations: a__oddNs#_A() = (3,4) a__incr#_A(x1) = ((0,1),(1,1)) x1 a__pairNs_A() = (2,2) cons_A(x1,x2) = ((0,1),(1,1)) x1 + ((0,1),(1,0)) x2 mark#_A(x1) = ((1,1),(1,1)) x1 pair_A(x1,x2) = ((0,1),(1,0)) x1 + ((1,1),(0,1)) x2 s_A(x1) = ((1,1),(0,0)) x1 oddNs_A() = (2,2) incr_A(x1) = x1 mark_A(x1) = x1 a__oddNs_A() = (2,2) a__incr_A(x1) = x1 a__take_A(x1,x2) = ((1,1),(1,1)) x2 + (2,2) |0|_A() = (0,0) nil_A() = (1,1) take_A(x1,x2) = ((1,1),(1,1)) x2 + (2,2) a__zip_A(x1,x2) = ((1,1),(1,1)) x1 + ((1,1),(1,1)) x2 + (1,1) zip_A(x1,x2) = ((1,1),(1,1)) x1 + ((1,1),(1,1)) x2 + (1,1) a__tail_A(x1) = ((0,1),(1,1)) x1 + (1,1) a__repItems_A(x1) = ((1,1),(1,1)) x1 + (1,1) repItems_A(x1) = ((1,1),(1,1)) x1 + (1,1) tail_A(x1) = ((0,1),(1,1)) x1 + (1,1) pairNs_A() = (2,2) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__oddNs#_A() = (1,1) a__incr#_A(x1) = (0,0) a__pairNs_A() = (2,1) cons_A(x1,x2) = (2,1) mark#_A(x1) = (0,0) pair_A(x1,x2) = (1,1) s_A(x1) = (0,1) oddNs_A() = (4,1) incr_A(x1) = (1,1) mark_A(x1) = ((1,1),(1,1)) x1 + (1,1) a__oddNs_A() = (4,6) a__incr_A(x1) = (3,3) a__take_A(x1,x2) = (3,2) |0|_A() = (1,1) nil_A() = (4,3) take_A(x1,x2) = (3,1) a__zip_A(x1,x2) = x2 + (2,2) zip_A(x1,x2) = x2 + (1,2) a__tail_A(x1) = (2,1) a__repItems_A(x1) = ((1,1),(1,1)) x1 + (1,2) repItems_A(x1) = ((1,1),(1,1)) x1 + (1,2) tail_A(x1) = (1,1) pairNs_A() = (1,1) The next rules are strictly ordered: p1, p7 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__incr#(cons(X,XS)) -> mark#(X) p2: mark#(pair(X1,X2)) -> mark#(X2) p3: mark#(pair(X1,X2)) -> mark#(X1) p4: mark#(s(X)) -> mark#(X) p5: mark#(cons(X1,X2)) -> mark#(X1) p6: mark#(incr(X)) -> mark#(X) p7: mark#(incr(X)) -> a__incr#(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 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: a__incr#(cons(X,XS)) -> mark#(X) p2: mark#(incr(X)) -> a__incr#(mark(X)) p3: mark#(incr(X)) -> mark#(X) p4: mark#(cons(X1,X2)) -> mark#(X1) p5: mark#(s(X)) -> mark#(X) p6: mark#(pair(X1,X2)) -> mark#(X1) p7: 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 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. matrix interpretations: carrier: N^2 order: standard order interpretations: a__incr#_A(x1) = x1 cons_A(x1,x2) = x1 + ((0,1),(1,0)) x2 mark#_A(x1) = x1 incr_A(x1) = x1 mark_A(x1) = x1 s_A(x1) = ((1,0),(1,1)) x1 + (0,1) pair_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(1,0)) x2 + (0,1) a__pairNs_A() = (0,0) |0|_A() = (0,1) oddNs_A() = (0,0) a__oddNs_A() = (0,0) a__incr_A(x1) = x1 a__take_A(x1,x2) = ((1,1),(0,1)) x1 + x2 + (1,2) nil_A() = (1,1) take_A(x1,x2) = ((1,1),(0,1)) x1 + x2 + (1,2) a__zip_A(x1,x2) = x1 + ((1,1),(1,1)) x2 + (1,1) zip_A(x1,x2) = x1 + ((1,1),(1,1)) x2 + (1,1) a__tail_A(x1) = ((0,1),(1,0)) x1 + (1,1) a__repItems_A(x1) = ((1,1),(1,1)) x1 + (1,1) repItems_A(x1) = ((1,1),(1,1)) x1 + (1,1) pairNs_A() = (0,0) tail_A(x1) = ((0,1),(1,0)) x1 + (1,1) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__incr#_A(x1) = ((1,1),(0,0)) x1 + (2,0) cons_A(x1,x2) = x1 + (1,1) mark#_A(x1) = ((1,1),(0,0)) x1 incr_A(x1) = ((0,1),(1,1)) x1 + (1,4) mark_A(x1) = ((0,1),(1,1)) x1 + (1,2) s_A(x1) = x1 + (1,1) pair_A(x1,x2) = x1 + x2 + (2,3) a__pairNs_A() = (4,4) |0|_A() = (2,1) oddNs_A() = (7,6) a__oddNs_A() = (7,12) a__incr_A(x1) = ((0,1),(1,1)) x1 + (2,4) a__take_A(x1,x2) = ((0,1),(1,1)) x2 + (3,5) nil_A() = (2,1) take_A(x1,x2) = ((0,1),(1,1)) x2 + (1,5) a__zip_A(x1,x2) = ((0,1),(1,1)) x1 + ((0,1),(1,1)) x2 + (5,9) zip_A(x1,x2) = ((0,1),(1,1)) x1 + ((0,1),(1,1)) x2 + (4,9) a__tail_A(x1) = (1,1) a__repItems_A(x1) = ((0,1),(1,1)) x1 + (2,4) repItems_A(x1) = ((0,1),(1,1)) x1 + (2,4) pairNs_A() = (1,4) tail_A(x1) = (0,1) The next rules are strictly ordered: p1, p3, p4, p5, p6, p7 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: mark#(incr(X)) -> a__incr#(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 estimated dependency graph contains the following SCCs: (no SCCs)