YES We show the termination of the TRS R: a__and(tt(),T) -> mark(T) a__isNatIList(IL) -> a__isNatList(IL) a__isNat(|0|()) -> tt() a__isNat(s(N)) -> a__isNat(N) a__isNat(length(L)) -> a__isNatList(L) a__isNatIList(zeros()) -> tt() a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) a__isNatList(nil()) -> tt() a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) a__zeros() -> cons(|0|(),zeros()) a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) a__uTake1(tt()) -> nil() a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) a__uLength(tt(),L) -> s(a__length(mark(L))) mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) mark(isNatIList(X)) -> a__isNatIList(X) mark(isNatList(X)) -> a__isNatList(X) mark(isNat(X)) -> a__isNat(X) mark(length(X)) -> a__length(mark(X)) mark(zeros()) -> a__zeros() mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) mark(uTake1(X)) -> a__uTake1(mark(X)) mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) mark(tt()) -> tt() mark(|0|()) -> |0|() mark(s(X)) -> s(mark(X)) mark(cons(X1,X2)) -> cons(mark(X1),X2) mark(nil()) -> nil() a__and(X1,X2) -> and(X1,X2) a__isNatIList(X) -> isNatIList(X) a__isNatList(X) -> isNatList(X) a__isNat(X) -> isNat(X) a__length(X) -> length(X) a__zeros() -> zeros() a__take(X1,X2) -> take(X1,X2) a__uTake1(X) -> uTake1(X) a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) a__uLength(X1,X2) -> uLength(X1,X2) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__and#(tt(),T) -> mark#(T) p2: a__isNatIList#(IL) -> a__isNatList#(IL) p3: a__isNat#(s(N)) -> a__isNat#(N) p4: a__isNat#(length(L)) -> a__isNatList#(L) p5: a__isNatIList#(cons(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p6: a__isNatIList#(cons(N,IL)) -> a__isNat#(N) p7: a__isNatIList#(cons(N,IL)) -> a__isNatIList#(IL) p8: a__isNatList#(cons(N,L)) -> a__and#(a__isNat(N),a__isNatList(L)) p9: a__isNatList#(cons(N,L)) -> a__isNat#(N) p10: a__isNatList#(cons(N,L)) -> a__isNatList#(L) p11: a__isNatList#(take(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p12: a__isNatList#(take(N,IL)) -> a__isNat#(N) p13: a__isNatList#(take(N,IL)) -> a__isNatIList#(IL) p14: a__take#(|0|(),IL) -> a__uTake1#(a__isNatIList(IL)) p15: a__take#(|0|(),IL) -> a__isNatIList#(IL) p16: a__take#(s(M),cons(N,IL)) -> a__uTake2#(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) p17: a__take#(s(M),cons(N,IL)) -> a__and#(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))) p18: a__take#(s(M),cons(N,IL)) -> a__isNat#(M) p19: a__take#(s(M),cons(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p20: a__take#(s(M),cons(N,IL)) -> a__isNat#(N) p21: a__take#(s(M),cons(N,IL)) -> a__isNatIList#(IL) p22: a__uTake2#(tt(),M,N,IL) -> mark#(N) p23: a__length#(cons(N,L)) -> a__uLength#(a__and(a__isNat(N),a__isNatList(L)),L) p24: a__length#(cons(N,L)) -> a__and#(a__isNat(N),a__isNatList(L)) p25: a__length#(cons(N,L)) -> a__isNat#(N) p26: a__length#(cons(N,L)) -> a__isNatList#(L) p27: a__uLength#(tt(),L) -> a__length#(mark(L)) p28: a__uLength#(tt(),L) -> mark#(L) p29: mark#(and(X1,X2)) -> a__and#(mark(X1),mark(X2)) p30: mark#(and(X1,X2)) -> mark#(X1) p31: mark#(and(X1,X2)) -> mark#(X2) p32: mark#(isNatIList(X)) -> a__isNatIList#(X) p33: mark#(isNatList(X)) -> a__isNatList#(X) p34: mark#(isNat(X)) -> a__isNat#(X) p35: mark#(length(X)) -> a__length#(mark(X)) p36: mark#(length(X)) -> mark#(X) p37: mark#(zeros()) -> a__zeros#() p38: mark#(take(X1,X2)) -> a__take#(mark(X1),mark(X2)) p39: mark#(take(X1,X2)) -> mark#(X1) p40: mark#(take(X1,X2)) -> mark#(X2) p41: mark#(uTake1(X)) -> a__uTake1#(mark(X)) p42: mark#(uTake1(X)) -> mark#(X) p43: mark#(uTake2(X1,X2,X3,X4)) -> a__uTake2#(mark(X1),X2,X3,X4) p44: mark#(uTake2(X1,X2,X3,X4)) -> mark#(X1) p45: mark#(uLength(X1,X2)) -> a__uLength#(mark(X1),X2) p46: mark#(uLength(X1,X2)) -> mark#(X1) p47: mark#(s(X)) -> mark#(X) p48: mark#(cons(X1,X2)) -> mark#(X1) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p38, p39, p40, p42, p43, p44, p45, p46, p47, p48} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a__and#(tt(),T) -> mark#(T) p2: mark#(cons(X1,X2)) -> mark#(X1) p3: mark#(s(X)) -> mark#(X) p4: mark#(uLength(X1,X2)) -> mark#(X1) p5: mark#(uLength(X1,X2)) -> a__uLength#(mark(X1),X2) p6: a__uLength#(tt(),L) -> mark#(L) p7: mark#(uTake2(X1,X2,X3,X4)) -> mark#(X1) p8: mark#(uTake2(X1,X2,X3,X4)) -> a__uTake2#(mark(X1),X2,X3,X4) p9: a__uTake2#(tt(),M,N,IL) -> mark#(N) p10: mark#(uTake1(X)) -> mark#(X) p11: mark#(take(X1,X2)) -> mark#(X2) p12: mark#(take(X1,X2)) -> mark#(X1) p13: mark#(take(X1,X2)) -> a__take#(mark(X1),mark(X2)) p14: a__take#(s(M),cons(N,IL)) -> a__isNatIList#(IL) p15: a__isNatIList#(cons(N,IL)) -> a__isNatIList#(IL) p16: a__isNatIList#(cons(N,IL)) -> a__isNat#(N) p17: a__isNat#(length(L)) -> a__isNatList#(L) p18: a__isNatList#(take(N,IL)) -> a__isNatIList#(IL) p19: a__isNatIList#(cons(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p20: a__isNatIList#(IL) -> a__isNatList#(IL) p21: a__isNatList#(take(N,IL)) -> a__isNat#(N) p22: a__isNat#(s(N)) -> a__isNat#(N) p23: a__isNatList#(take(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p24: a__isNatList#(cons(N,L)) -> a__isNatList#(L) p25: a__isNatList#(cons(N,L)) -> a__isNat#(N) p26: a__isNatList#(cons(N,L)) -> a__and#(a__isNat(N),a__isNatList(L)) p27: a__take#(s(M),cons(N,IL)) -> a__isNat#(N) p28: a__take#(s(M),cons(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p29: a__take#(s(M),cons(N,IL)) -> a__isNat#(M) p30: a__take#(s(M),cons(N,IL)) -> a__and#(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))) p31: a__take#(s(M),cons(N,IL)) -> a__uTake2#(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) p32: a__take#(|0|(),IL) -> a__isNatIList#(IL) p33: mark#(length(X)) -> mark#(X) p34: mark#(length(X)) -> a__length#(mark(X)) p35: a__length#(cons(N,L)) -> a__isNatList#(L) p36: a__length#(cons(N,L)) -> a__isNat#(N) p37: a__length#(cons(N,L)) -> a__and#(a__isNat(N),a__isNatList(L)) p38: a__length#(cons(N,L)) -> a__uLength#(a__and(a__isNat(N),a__isNatList(L)),L) p39: a__uLength#(tt(),L) -> a__length#(mark(L)) p40: mark#(isNat(X)) -> a__isNat#(X) p41: mark#(isNatList(X)) -> a__isNatList#(X) p42: mark#(isNatIList(X)) -> a__isNatIList#(X) p43: mark#(and(X1,X2)) -> mark#(X2) p44: mark#(and(X1,X2)) -> mark#(X1) p45: mark#(and(X1,X2)) -> a__and#(mark(X1),mark(X2)) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) 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, r31, r32, r33, r34, r35, r36, r37, r38, r39, r40, r41, r42 Take the reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = ((0,1),(0,1)) x2 tt_A() = (6,0) mark#_A(x1) = ((0,1),(0,1)) x1 cons_A(x1,x2) = x1 + ((1,0),(1,1)) x2 s_A(x1) = x1 + (4,5) uLength_A(x1,x2) = ((1,1),(1,1)) x1 + ((1,1),(0,1)) x2 + (1,2) a__uLength#_A(x1,x2) = ((0,1),(0,0)) x1 + ((0,1),(0,1)) x2 + (1,0) mark_A(x1) = x1 uTake2_A(x1,x2,x3,x4) = x1 + ((0,0),(1,1)) x2 + x3 + ((1,0),(1,1)) x4 + (8,9) a__uTake2#_A(x1,x2,x3,x4) = ((0,1),(0,1)) x3 + (9,0) uTake1_A(x1) = x1 + (7,6) take_A(x1,x2) = ((0,0),(1,1)) x1 + x2 + (8,1) a__take#_A(x1,x2) = ((1,1),(0,0)) x1 + ((0,1),(0,1)) x2 a__isNatIList#_A(x1) = (0,0) a__isNat#_A(x1) = (0,0) length_A(x1) = ((1,1),(0,1)) x1 + (2,3) a__isNatList#_A(x1) = (0,0) a__isNat_A(x1) = x1 + (1,0) a__isNatIList_A(x1) = x1 + (9,0) a__isNatList_A(x1) = x1 + (1,0) a__and_A(x1,x2) = x1 + x2 |0|_A() = (5,0) a__length#_A(x1) = ((0,1),(0,1)) x1 + (1,0) isNat_A(x1) = x1 + (1,0) isNatList_A(x1) = x1 + (1,0) isNatIList_A(x1) = x1 + (9,0) and_A(x1,x2) = x1 + x2 a__zeros_A() = (0,1) zeros_A() = (0,1) a__take_A(x1,x2) = ((0,0),(1,1)) x1 + x2 + (8,1) a__uTake1_A(x1) = x1 + (7,6) nil_A() = (6,1) a__uTake2_A(x1,x2,x3,x4) = x1 + ((0,0),(1,1)) x2 + x3 + ((1,0),(1,1)) x4 + (8,9) a__length_A(x1) = ((1,1),(0,1)) x1 + (2,3) a__uLength_A(x1,x2) = ((1,1),(1,1)) x1 + ((1,1),(0,1)) x2 + (1,2) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = (3,2) tt_A() = (1,0) mark#_A(x1) = (3,2) cons_A(x1,x2) = (1,1) s_A(x1) = (1,1) uLength_A(x1,x2) = (0,0) a__uLength#_A(x1,x2) = (0,1) mark_A(x1) = ((0,0),(1,0)) x1 + (5,2) uTake2_A(x1,x2,x3,x4) = (1,1) a__uTake2#_A(x1,x2,x3,x4) = (1,1) uTake1_A(x1) = (0,1) take_A(x1,x2) = (3,1) a__take#_A(x1,x2) = ((0,1),(1,0)) x1 a__isNatIList#_A(x1) = (3,2) a__isNat#_A(x1) = (3,2) length_A(x1) = (1,1) a__isNatList#_A(x1) = (3,2) a__isNat_A(x1) = (5,3) a__isNatIList_A(x1) = (5,7) a__isNatList_A(x1) = (5,7) a__and_A(x1,x2) = ((0,0),(1,0)) x2 + (5,2) |0|_A() = (0,2) a__length#_A(x1) = (0,1) isNat_A(x1) = (1,0) isNatList_A(x1) = (5,1) isNatIList_A(x1) = (5,1) and_A(x1,x2) = (5,0) a__zeros_A() = (4,2) zeros_A() = (0,1) a__take_A(x1,x2) = (3,1) a__uTake1_A(x1) = (4,2) nil_A() = (1,3) a__uTake2_A(x1,x2,x3,x4) = (2,1) a__length_A(x1) = (2,1) a__uLength_A(x1,x2) = (1,0) 3. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = (1,0) tt_A() = (2,1) mark#_A(x1) = (1,0) cons_A(x1,x2) = (3,1) s_A(x1) = (0,0) uLength_A(x1,x2) = (0,0) a__uLength#_A(x1,x2) = (1,0) mark_A(x1) = (3,1) uTake2_A(x1,x2,x3,x4) = (0,2) a__uTake2#_A(x1,x2,x3,x4) = (0,1) uTake1_A(x1) = (0,1) take_A(x1,x2) = (2,0) a__take#_A(x1,x2) = (0,1) a__isNatIList#_A(x1) = (1,0) a__isNat#_A(x1) = (1,0) length_A(x1) = (6,1) a__isNatList#_A(x1) = (1,0) a__isNat_A(x1) = (2,1) a__isNatIList_A(x1) = (3,1) a__isNatList_A(x1) = (3,1) a__and_A(x1,x2) = (3,1) |0|_A() = (1,1) a__length#_A(x1) = (1,0) isNat_A(x1) = (0,0) isNatList_A(x1) = (3,0) isNatIList_A(x1) = (0,1) and_A(x1,x2) = (0,0) a__zeros_A() = (0,1) zeros_A() = (0,2) a__take_A(x1,x2) = (2,1) a__uTake1_A(x1) = (4,2) nil_A() = (1,0) a__uTake2_A(x1,x2,x3,x4) = (1,1) a__length_A(x1) = (5,0) a__uLength_A(x1,x2) = (4,0) The next rules are strictly ordered: p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p27, p28, p29, p30, p32, p33, p34, p35, p36, p37 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__and#(tt(),T) -> mark#(T) p2: mark#(cons(X1,X2)) -> mark#(X1) p3: a__isNatIList#(cons(N,IL)) -> a__isNatIList#(IL) p4: a__isNatIList#(cons(N,IL)) -> a__isNat#(N) p5: a__isNat#(length(L)) -> a__isNatList#(L) p6: a__isNatList#(take(N,IL)) -> a__isNatIList#(IL) p7: a__isNatIList#(cons(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p8: a__isNatIList#(IL) -> a__isNatList#(IL) p9: a__isNatList#(take(N,IL)) -> a__isNat#(N) p10: a__isNat#(s(N)) -> a__isNat#(N) p11: a__isNatList#(take(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p12: a__isNatList#(cons(N,L)) -> a__isNatList#(L) p13: a__isNatList#(cons(N,L)) -> a__isNat#(N) p14: a__isNatList#(cons(N,L)) -> a__and#(a__isNat(N),a__isNatList(L)) p15: a__take#(s(M),cons(N,IL)) -> a__uTake2#(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) p16: a__length#(cons(N,L)) -> a__uLength#(a__and(a__isNat(N),a__isNatList(L)),L) p17: a__uLength#(tt(),L) -> a__length#(mark(L)) p18: mark#(isNat(X)) -> a__isNat#(X) p19: mark#(isNatList(X)) -> a__isNatList#(X) p20: mark#(isNatIList(X)) -> a__isNatIList#(X) p21: mark#(and(X1,X2)) -> mark#(X2) p22: mark#(and(X1,X2)) -> mark#(X1) p23: mark#(and(X1,X2)) -> a__and#(mark(X1),mark(X2)) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p18, p19, p20, p21, p22, p23} {p16, p17} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a__and#(tt(),T) -> mark#(T) p2: mark#(and(X1,X2)) -> a__and#(mark(X1),mark(X2)) p3: mark#(and(X1,X2)) -> mark#(X1) p4: mark#(and(X1,X2)) -> mark#(X2) p5: mark#(isNatIList(X)) -> a__isNatIList#(X) p6: a__isNatIList#(IL) -> a__isNatList#(IL) p7: a__isNatList#(cons(N,L)) -> a__and#(a__isNat(N),a__isNatList(L)) p8: a__isNatList#(cons(N,L)) -> a__isNat#(N) p9: a__isNat#(s(N)) -> a__isNat#(N) p10: a__isNat#(length(L)) -> a__isNatList#(L) p11: a__isNatList#(cons(N,L)) -> a__isNatList#(L) p12: a__isNatList#(take(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p13: a__isNatList#(take(N,IL)) -> a__isNat#(N) p14: a__isNatList#(take(N,IL)) -> a__isNatIList#(IL) p15: a__isNatIList#(cons(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p16: a__isNatIList#(cons(N,IL)) -> a__isNat#(N) p17: a__isNatIList#(cons(N,IL)) -> a__isNatIList#(IL) p18: mark#(isNatList(X)) -> a__isNatList#(X) p19: mark#(isNat(X)) -> a__isNat#(X) p20: mark#(cons(X1,X2)) -> mark#(X1) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) 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, r31, r32, r33, r34, r35, r36, r37, r38, r39, r40, r41, r42 Take the reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = ((0,1),(0,0)) x2 + (1,0) tt_A() = (0,0) mark#_A(x1) = ((0,1),(0,0)) x1 + (1,0) and_A(x1,x2) = x1 + x2 mark_A(x1) = ((0,1),(0,1)) x1 isNatIList_A(x1) = x1 + (1,1) a__isNatIList#_A(x1) = ((0,1),(0,0)) x1 + (2,0) a__isNatList#_A(x1) = ((0,1),(0,0)) x1 + (2,0) cons_A(x1,x2) = x1 + ((0,0),(1,1)) x2 a__isNat_A(x1) = ((0,1),(0,1)) x1 a__isNatList_A(x1) = ((0,1),(0,1)) x1 + (1,1) a__isNat#_A(x1) = ((0,1),(0,0)) x1 s_A(x1) = x1 length_A(x1) = x1 + (1,3) take_A(x1,x2) = x1 + x2 + (0,1) a__isNatIList_A(x1) = ((0,1),(0,1)) x1 + (1,1) isNatList_A(x1) = x1 + (1,1) isNat_A(x1) = x1 a__and_A(x1,x2) = x1 + ((0,1),(0,1)) x2 a__zeros_A() = (1,1) |0|_A() = (0,0) zeros_A() = (0,1) a__take_A(x1,x2) = x1 + x2 + (0,1) a__uTake1_A(x1) = (0,1) nil_A() = (0,1) a__uTake2_A(x1,x2,x3,x4) = x2 + x3 + ((0,0),(1,1)) x4 + (0,1) a__length_A(x1) = x1 + (2,3) a__uLength_A(x1,x2) = ((0,0),(1,1)) x2 + (2,3) uTake1_A(x1) = (0,1) uTake2_A(x1,x2,x3,x4) = x2 + x3 + ((0,0),(1,1)) x4 + (0,1) uLength_A(x1,x2) = ((0,0),(1,1)) x2 + (2,3) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = (1,0) tt_A() = (3,2) mark#_A(x1) = (1,0) and_A(x1,x2) = (1,0) mark_A(x1) = (4,2) isNatIList_A(x1) = (1,1) a__isNatIList#_A(x1) = (1,0) a__isNatList#_A(x1) = (1,0) cons_A(x1,x2) = (4,2) a__isNat_A(x1) = (4,2) a__isNatList_A(x1) = (4,2) a__isNat#_A(x1) = (0,1) s_A(x1) = (4,2) length_A(x1) = (0,4) take_A(x1,x2) = x2 a__isNatIList_A(x1) = (4,2) isNatList_A(x1) = (0,1) isNat_A(x1) = (1,0) a__and_A(x1,x2) = ((0,1),(0,1)) x1 + (2,0) a__zeros_A() = (3,1) |0|_A() = (1,2) zeros_A() = (0,1) a__take_A(x1,x2) = x2 a__uTake1_A(x1) = (0,0) nil_A() = (0,0) a__uTake2_A(x1,x2,x3,x4) = (4,2) a__length_A(x1) = (6,3) a__uLength_A(x1,x2) = (5,3) uTake1_A(x1) = (0,0) uTake2_A(x1,x2,x3,x4) = (0,0) uLength_A(x1,x2) = (0,1) 3. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = (1,0) tt_A() = (0,1) mark#_A(x1) = (1,0) and_A(x1,x2) = (1,1) mark_A(x1) = (3,1) isNatIList_A(x1) = (4,0) a__isNatIList#_A(x1) = (1,0) a__isNatList#_A(x1) = (1,0) cons_A(x1,x2) = (0,0) a__isNat_A(x1) = (0,1) a__isNatList_A(x1) = (3,1) a__isNat#_A(x1) = (0,1) s_A(x1) = (3,0) length_A(x1) = (0,2) take_A(x1,x2) = x2 a__isNatIList_A(x1) = (3,1) isNatList_A(x1) = (4,2) isNat_A(x1) = (1,0) a__and_A(x1,x2) = (3,1) a__zeros_A() = (2,0) |0|_A() = (0,0) zeros_A() = (1,0) a__take_A(x1,x2) = x2 a__uTake1_A(x1) = (0,0) nil_A() = (0,0) a__uTake2_A(x1,x2,x3,x4) = (0,0) a__length_A(x1) = (2,1) a__uLength_A(x1,x2) = (1,0) uTake1_A(x1) = (0,0) uTake2_A(x1,x2,x3,x4) = (0,0) uLength_A(x1,x2) = (0,0) The next rules are strictly ordered: p8, p10, p12, p13, p14, p16, p19 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__and#(tt(),T) -> mark#(T) p2: mark#(and(X1,X2)) -> a__and#(mark(X1),mark(X2)) p3: mark#(and(X1,X2)) -> mark#(X1) p4: mark#(and(X1,X2)) -> mark#(X2) p5: mark#(isNatIList(X)) -> a__isNatIList#(X) p6: a__isNatIList#(IL) -> a__isNatList#(IL) p7: a__isNatList#(cons(N,L)) -> a__and#(a__isNat(N),a__isNatList(L)) p8: a__isNat#(s(N)) -> a__isNat#(N) p9: a__isNatList#(cons(N,L)) -> a__isNatList#(L) p10: a__isNatIList#(cons(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p11: a__isNatIList#(cons(N,IL)) -> a__isNatIList#(IL) p12: mark#(isNatList(X)) -> a__isNatList#(X) p13: mark#(cons(X1,X2)) -> mark#(X1) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p9, p10, p11, p12, p13} {p8} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a__and#(tt(),T) -> mark#(T) p2: mark#(cons(X1,X2)) -> mark#(X1) p3: mark#(isNatList(X)) -> a__isNatList#(X) p4: a__isNatList#(cons(N,L)) -> a__isNatList#(L) p5: a__isNatList#(cons(N,L)) -> a__and#(a__isNat(N),a__isNatList(L)) p6: mark#(isNatIList(X)) -> a__isNatIList#(X) p7: a__isNatIList#(cons(N,IL)) -> a__isNatIList#(IL) p8: a__isNatIList#(cons(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p9: a__isNatIList#(IL) -> a__isNatList#(IL) p10: mark#(and(X1,X2)) -> mark#(X2) p11: mark#(and(X1,X2)) -> mark#(X1) p12: mark#(and(X1,X2)) -> a__and#(mark(X1),mark(X2)) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) 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, r31, r32, r33, r34, r35, r36, r37, r38, r39, r40, r41, r42 Take the reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = ((1,1),(0,0)) x2 tt_A() = (0,0) mark#_A(x1) = ((1,1),(0,0)) x1 cons_A(x1,x2) = ((0,1),(1,0)) x1 + (1,1) isNatList_A(x1) = (0,0) a__isNatList#_A(x1) = (0,0) a__isNat_A(x1) = (0,0) a__isNatList_A(x1) = (0,0) isNatIList_A(x1) = (0,0) a__isNatIList#_A(x1) = (0,0) a__isNatIList_A(x1) = (0,0) and_A(x1,x2) = x1 + ((1,1),(1,1)) x2 mark_A(x1) = ((1,1),(1,1)) x1 a__and_A(x1,x2) = x1 + ((1,1),(1,1)) x2 a__zeros_A() = (3,2) |0|_A() = (1,1) zeros_A() = (2,2) a__take_A(x1,x2) = ((0,1),(1,0)) x1 + ((1,1),(1,1)) x2 + (2,1) a__uTake1_A(x1) = (2,2) nil_A() = (2,0) s_A(x1) = ((0,1),(1,0)) x1 a__uTake2_A(x1,x2,x3,x4) = ((1,1),(1,1)) x3 + (2,1) take_A(x1,x2) = ((0,1),(1,0)) x1 + ((1,1),(1,1)) x2 + (2,0) a__length_A(x1) = (2,2) a__uLength_A(x1,x2) = (2,2) length_A(x1) = (1,2) uTake1_A(x1) = (1,2) uTake2_A(x1,x2,x3,x4) = ((1,0),(1,1)) x3 + (2,1) uLength_A(x1,x2) = (2,0) isNat_A(x1) = (0,0) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = (0,0) tt_A() = (1,1) mark#_A(x1) = (0,0) cons_A(x1,x2) = (0,3) isNatList_A(x1) = (2,0) a__isNatList#_A(x1) = (0,0) a__isNat_A(x1) = (3,1) a__isNatList_A(x1) = (2,1) isNatIList_A(x1) = (2,1) a__isNatIList#_A(x1) = (0,0) a__isNatIList_A(x1) = (2,1) and_A(x1,x2) = x2 + (0,1) mark_A(x1) = x1 + (0,1) a__and_A(x1,x2) = x2 + (0,1) a__zeros_A() = (2,2) |0|_A() = (1,0) zeros_A() = (1,0) a__take_A(x1,x2) = (1,0) a__uTake1_A(x1) = (0,2) nil_A() = (0,0) s_A(x1) = (0,0) a__uTake2_A(x1,x2,x3,x4) = (2,2) take_A(x1,x2) = (1,0) a__length_A(x1) = (1,2) a__uLength_A(x1,x2) = (0,0) length_A(x1) = (0,0) uTake1_A(x1) = (0,0) uTake2_A(x1,x2,x3,x4) = (0,0) uLength_A(x1,x2) = (0,0) isNat_A(x1) = (3,0) 3. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = (0,0) tt_A() = (3,2) mark#_A(x1) = (0,0) cons_A(x1,x2) = (0,3) isNatList_A(x1) = (1,0) a__isNatList#_A(x1) = (0,0) a__isNat_A(x1) = (0,1) a__isNatList_A(x1) = (2,0) isNatIList_A(x1) = (1,0) a__isNatIList#_A(x1) = (0,0) a__isNatIList_A(x1) = (2,0) and_A(x1,x2) = ((0,1),(0,1)) x2 + (1,0) mark_A(x1) = ((0,1),(0,1)) x1 + (2,0) a__and_A(x1,x2) = ((0,1),(0,1)) x2 + (2,0) a__zeros_A() = (4,2) |0|_A() = (4,1) zeros_A() = (1,1) a__take_A(x1,x2) = (1,0) a__uTake1_A(x1) = (3,1) nil_A() = (2,1) s_A(x1) = (2,1) a__uTake2_A(x1,x2,x3,x4) = (4,2) take_A(x1,x2) = (0,0) a__length_A(x1) = (2,1) a__uLength_A(x1,x2) = (2,1) length_A(x1) = (3,2) uTake1_A(x1) = (4,0) uTake2_A(x1,x2,x3,x4) = (1,1) uLength_A(x1,x2) = (1,1) isNat_A(x1) = (0,1) 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: a__and#(tt(),T) -> mark#(T) p2: mark#(isNatList(X)) -> a__isNatList#(X) p3: a__isNatList#(cons(N,L)) -> a__isNatList#(L) p4: a__isNatList#(cons(N,L)) -> a__and#(a__isNat(N),a__isNatList(L)) p5: mark#(isNatIList(X)) -> a__isNatIList#(X) p6: a__isNatIList#(cons(N,IL)) -> a__isNatIList#(IL) p7: a__isNatIList#(cons(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p8: a__isNatIList#(IL) -> a__isNatList#(IL) p9: mark#(and(X1,X2)) -> mark#(X2) p10: mark#(and(X1,X2)) -> mark#(X1) p11: mark#(and(X1,X2)) -> a__and#(mark(X1),mark(X2)) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a__and#(tt(),T) -> mark#(T) p2: mark#(and(X1,X2)) -> a__and#(mark(X1),mark(X2)) p3: mark#(and(X1,X2)) -> mark#(X1) p4: mark#(and(X1,X2)) -> mark#(X2) p5: mark#(isNatIList(X)) -> a__isNatIList#(X) p6: a__isNatIList#(IL) -> a__isNatList#(IL) p7: a__isNatList#(cons(N,L)) -> a__and#(a__isNat(N),a__isNatList(L)) p8: a__isNatList#(cons(N,L)) -> a__isNatList#(L) p9: a__isNatIList#(cons(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p10: a__isNatIList#(cons(N,IL)) -> a__isNatIList#(IL) p11: mark#(isNatList(X)) -> a__isNatList#(X) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) 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, r31, r32, r33, r34, r35, r36, r37, r38, r39, r40, r41, r42 Take the reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = x1 + ((0,1),(0,0)) x2 tt_A() = (4,0) mark#_A(x1) = ((0,1),(0,0)) x1 + (4,0) and_A(x1,x2) = x1 + x2 + (1,0) mark_A(x1) = x1 + (4,0) isNatIList_A(x1) = x1 + (1,2) a__isNatIList#_A(x1) = ((0,1),(0,0)) x1 + (6,0) a__isNatList#_A(x1) = ((0,1),(0,0)) x1 + (5,0) cons_A(x1,x2) = x1 + x2 + (1,0) a__isNat_A(x1) = x1 + (4,0) a__isNatList_A(x1) = x1 + (4,1) a__isNatIList_A(x1) = x1 + (4,2) isNatList_A(x1) = x1 + (3,1) a__and_A(x1,x2) = x1 + x2 + (4,0) a__zeros_A() = (2,1) |0|_A() = (1,0) zeros_A() = (1,1) a__take_A(x1,x2) = x1 + x2 + (2,3) a__uTake1_A(x1) = x1 + (2,1) nil_A() = (2,1) s_A(x1) = x1 + (2,0) a__uTake2_A(x1,x2,x3,x4) = x2 + x3 + x4 + (2,3) take_A(x1,x2) = x1 + x2 + (1,3) a__length_A(x1) = x1 + (3,1) a__uLength_A(x1,x2) = x2 + (2,1) length_A(x1) = x1 + (1,1) uTake1_A(x1) = x1 + (2,1) uTake2_A(x1,x2,x3,x4) = x2 + x3 + x4 + (1,3) uLength_A(x1,x2) = x2 + (1,1) isNat_A(x1) = x1 + (1,0) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = ((0,1),(0,0)) x1 tt_A() = (0,1) mark#_A(x1) = (1,0) and_A(x1,x2) = (1,2) mark_A(x1) = (0,1) isNatIList_A(x1) = (1,2) a__isNatIList#_A(x1) = (1,0) a__isNatList#_A(x1) = (1,0) cons_A(x1,x2) = (3,3) a__isNat_A(x1) = (0,1) a__isNatList_A(x1) = (0,1) a__isNatIList_A(x1) = (0,1) isNatList_A(x1) = (1,2) a__and_A(x1,x2) = (0,1) a__zeros_A() = (2,2) |0|_A() = (0,2) zeros_A() = (1,0) a__take_A(x1,x2) = (0,2) a__uTake1_A(x1) = (0,1) nil_A() = (0,0) s_A(x1) = (1,2) a__uTake2_A(x1,x2,x3,x4) = (0,2) take_A(x1,x2) = (0,0) a__length_A(x1) = (0,2) a__uLength_A(x1,x2) = (2,2) length_A(x1) = (0,0) uTake1_A(x1) = (0,1) uTake2_A(x1,x2,x3,x4) = (0,3) uLength_A(x1,x2) = (3,3) isNat_A(x1) = (1,2) 3. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = (0,0) tt_A() = (0,0) mark#_A(x1) = (0,0) and_A(x1,x2) = (0,0) mark_A(x1) = (0,0) isNatIList_A(x1) = (1,0) a__isNatIList#_A(x1) = (0,0) a__isNatList#_A(x1) = (0,0) cons_A(x1,x2) = (0,1) a__isNat_A(x1) = (0,0) a__isNatList_A(x1) = (0,0) a__isNatIList_A(x1) = (0,0) isNatList_A(x1) = (1,1) a__and_A(x1,x2) = (0,0) a__zeros_A() = (1,1) |0|_A() = (1,0) zeros_A() = (2,2) a__take_A(x1,x2) = (3,1) a__uTake1_A(x1) = (2,1) nil_A() = (1,0) s_A(x1) = (2,2) a__uTake2_A(x1,x2,x3,x4) = (0,0) take_A(x1,x2) = (0,1) a__length_A(x1) = (0,0) a__uLength_A(x1,x2) = (1,1) length_A(x1) = (1,0) uTake1_A(x1) = (0,0) uTake2_A(x1,x2,x3,x4) = (0,1) uLength_A(x1,x2) = (0,0) isNat_A(x1) = (0,0) The next rules are strictly ordered: p6 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__and#(tt(),T) -> mark#(T) p2: mark#(and(X1,X2)) -> a__and#(mark(X1),mark(X2)) p3: mark#(and(X1,X2)) -> mark#(X1) p4: mark#(and(X1,X2)) -> mark#(X2) p5: mark#(isNatIList(X)) -> a__isNatIList#(X) p6: a__isNatList#(cons(N,L)) -> a__and#(a__isNat(N),a__isNatList(L)) p7: a__isNatList#(cons(N,L)) -> a__isNatList#(L) p8: a__isNatIList#(cons(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p9: a__isNatIList#(cons(N,IL)) -> a__isNatIList#(IL) p10: mark#(isNatList(X)) -> a__isNatList#(X) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) 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: a__and#(tt(),T) -> mark#(T) p2: mark#(isNatList(X)) -> a__isNatList#(X) p3: a__isNatList#(cons(N,L)) -> a__isNatList#(L) p4: a__isNatList#(cons(N,L)) -> a__and#(a__isNat(N),a__isNatList(L)) p5: mark#(isNatIList(X)) -> a__isNatIList#(X) p6: a__isNatIList#(cons(N,IL)) -> a__isNatIList#(IL) p7: a__isNatIList#(cons(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p8: mark#(and(X1,X2)) -> mark#(X2) p9: mark#(and(X1,X2)) -> mark#(X1) p10: mark#(and(X1,X2)) -> a__and#(mark(X1),mark(X2)) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) 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, r31, r32, r33, r34, r35, r36, r37, r38, r39, r40, r41, r42 Take the reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = x1 + ((1,0),(1,0)) x2 tt_A() = (0,5) mark#_A(x1) = ((1,0),(1,0)) x1 isNatList_A(x1) = x1 + (1,1) a__isNatList#_A(x1) = ((1,0),(1,0)) x1 + (1,1) cons_A(x1,x2) = ((1,1),(1,0)) x1 + ((1,1),(0,1)) x2 a__isNat_A(x1) = ((1,1),(1,1)) x1 + (0,5) a__isNatList_A(x1) = x1 + (1,1) isNatIList_A(x1) = x1 + (2,5) a__isNatIList#_A(x1) = ((1,0),(1,0)) x1 + (2,2) a__isNatIList_A(x1) = x1 + (2,5) and_A(x1,x2) = x1 + x2 mark_A(x1) = x1 a__and_A(x1,x2) = x1 + x2 a__zeros_A() = (1,0) |0|_A() = (0,0) zeros_A() = (1,0) a__take_A(x1,x2) = ((1,1),(0,0)) x1 + x2 + (3,4) a__uTake1_A(x1) = (2,4) nil_A() = (1,4) s_A(x1) = ((0,1),(1,0)) x1 + (0,6) a__uTake2_A(x1,x2,x3,x4) = ((1,1),(0,0)) x2 + ((1,1),(1,0)) x3 + ((1,1),(0,1)) x4 + (8,4) take_A(x1,x2) = ((1,1),(0,0)) x1 + x2 + (3,4) a__length_A(x1) = ((1,1),(1,1)) x1 + (3,5) a__uLength_A(x1,x2) = ((0,1),(0,1)) x1 + ((1,1),(1,1)) x2 + (1,4) length_A(x1) = ((1,1),(1,1)) x1 + (3,5) uTake1_A(x1) = (2,4) uTake2_A(x1,x2,x3,x4) = ((1,1),(0,0)) x2 + ((1,1),(1,0)) x3 + ((1,1),(0,1)) x4 + (8,4) uLength_A(x1,x2) = ((0,1),(0,1)) x1 + ((1,1),(1,1)) x2 + (1,4) isNat_A(x1) = ((1,1),(1,1)) x1 + (0,5) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = ((0,1),(0,0)) x1 + x2 + (8,0) tt_A() = (1,7) mark#_A(x1) = x1 + (9,0) isNatList_A(x1) = ((1,1),(1,0)) x1 + (0,4) a__isNatList#_A(x1) = ((1,1),(0,0)) x1 + (8,0) cons_A(x1,x2) = ((0,1),(0,0)) x1 + ((1,0),(1,1)) x2 + (14,0) a__isNat_A(x1) = x1 + (2,3) a__isNatList_A(x1) = ((1,1),(1,0)) x1 + (3,4) isNatIList_A(x1) = ((1,1),(1,0)) x1 + (2,3) a__isNatIList#_A(x1) = ((1,1),(0,0)) x1 a__isNatIList_A(x1) = ((1,1),(1,0)) x1 + (3,3) and_A(x1,x2) = ((1,1),(0,1)) x1 + ((1,1),(0,1)) x2 + (0,6) mark_A(x1) = ((1,1),(0,1)) x1 a__and_A(x1,x2) = ((1,1),(0,1)) x1 + ((1,1),(0,1)) x2 + (5,6) a__zeros_A() = (18,19) |0|_A() = (1,4) zeros_A() = (0,19) a__take_A(x1,x2) = ((0,1),(0,1)) x1 + (6,7) a__uTake1_A(x1) = (2,2) nil_A() = (2,1) s_A(x1) = (1,3) a__uTake2_A(x1,x2,x3,x4) = ((0,0),(1,1)) x2 + ((1,1),(1,1)) x3 + ((1,0),(1,0)) x4 + (10,11) take_A(x1,x2) = ((0,1),(0,1)) x1 + (5,7) a__length_A(x1) = (1,0) a__uLength_A(x1,x2) = ((1,0),(1,1)) x2 + (1,2) length_A(x1) = (1,0) uTake1_A(x1) = (1,2) uTake2_A(x1,x2,x3,x4) = ((0,0),(1,1)) x2 + ((1,0),(1,1)) x3 + ((0,0),(1,0)) x4 + (0,11) uLength_A(x1,x2) = ((0,0),(1,1)) x2 + (0,2) isNat_A(x1) = x1 + (1,3) 3. matrix interpretations: carrier: N^2 order: standard order interpretations: a__and#_A(x1,x2) = ((1,1),(0,0)) x2 + (1,1) tt_A() = (0,0) mark#_A(x1) = x1 isNatList_A(x1) = ((0,0),(1,0)) x1 + (5,1) a__isNatList#_A(x1) = ((1,1),(0,0)) x1 + (10,1) cons_A(x1,x2) = ((1,1),(1,1)) x2 + (2,1) a__isNat_A(x1) = (4,7) a__isNatList_A(x1) = (4,7) isNatIList_A(x1) = ((1,1),(0,0)) x1 + (2,4) a__isNatIList#_A(x1) = ((1,1),(1,1)) x1 + (2,0) a__isNatIList_A(x1) = ((1,0),(1,1)) x1 + (1,3) and_A(x1,x2) = ((1,1),(0,1)) x1 + ((1,1),(1,1)) x2 + (0,8) mark_A(x1) = ((1,0),(1,0)) x1 a__and_A(x1,x2) = (4,7) a__zeros_A() = (5,3) |0|_A() = (1,0) zeros_A() = (1,1) a__take_A(x1,x2) = (0,0) a__uTake1_A(x1) = (1,1) nil_A() = (2,0) s_A(x1) = (0,0) a__uTake2_A(x1,x2,x3,x4) = x4 take_A(x1,x2) = (0,0) a__length_A(x1) = (0,0) a__uLength_A(x1,x2) = ((1,1),(1,0)) x2 length_A(x1) = (0,0) uTake1_A(x1) = (0,2) uTake2_A(x1,x2,x3,x4) = (0,0) uLength_A(x1,x2) = (0,0) isNat_A(x1) = (0,0) The next rules are strictly ordered: p1, p2, p3, p4, p5, p6, p10 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__isNatIList#(cons(N,IL)) -> a__and#(a__isNat(N),a__isNatIList(IL)) p2: mark#(and(X1,X2)) -> mark#(X2) p3: mark#(and(X1,X2)) -> mark#(X1) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) The estimated dependency graph contains the following SCCs: {p2, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: mark#(and(X1,X2)) -> mark#(X2) p2: mark#(and(X1,X2)) -> mark#(X1) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^2 order: standard order interpretations: mark#_A(x1) = ((1,1),(0,0)) x1 and_A(x1,x2) = ((0,1),(1,1)) x1 + ((1,1),(1,1)) x2 + (1,1) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: mark#_A(x1) = ((1,1),(1,1)) x1 and_A(x1,x2) = ((1,1),(1,1)) x2 + (1,1) 3. matrix interpretations: carrier: N^2 order: standard order interpretations: mark#_A(x1) = ((1,1),(1,1)) x1 and_A(x1,x2) = ((1,1),(1,1)) x2 + (1,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: a__isNat#(s(N)) -> a__isNat#(N) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^2 order: standard order interpretations: a__isNat#_A(x1) = ((1,1),(1,1)) x1 s_A(x1) = ((1,1),(1,1)) x1 + (1,1) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__isNat#_A(x1) = x1 s_A(x1) = x1 + (1,1) 3. matrix interpretations: carrier: N^2 order: standard order interpretations: a__isNat#_A(x1) = ((0,1),(1,1)) x1 s_A(x1) = ((0,1),(1,1)) x1 + (1,1) The next rules are strictly ordered: p1 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: a__length#(cons(N,L)) -> a__uLength#(a__and(a__isNat(N),a__isNatList(L)),L) p2: a__uLength#(tt(),L) -> a__length#(mark(L)) and R consists of: r1: a__and(tt(),T) -> mark(T) r2: a__isNatIList(IL) -> a__isNatList(IL) r3: a__isNat(|0|()) -> tt() r4: a__isNat(s(N)) -> a__isNat(N) r5: a__isNat(length(L)) -> a__isNatList(L) r6: a__isNatIList(zeros()) -> tt() r7: a__isNatIList(cons(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r8: a__isNatList(nil()) -> tt() r9: a__isNatList(cons(N,L)) -> a__and(a__isNat(N),a__isNatList(L)) r10: a__isNatList(take(N,IL)) -> a__and(a__isNat(N),a__isNatIList(IL)) r11: a__zeros() -> cons(|0|(),zeros()) r12: a__take(|0|(),IL) -> a__uTake1(a__isNatIList(IL)) r13: a__uTake1(tt()) -> nil() r14: a__take(s(M),cons(N,IL)) -> a__uTake2(a__and(a__isNat(M),a__and(a__isNat(N),a__isNatIList(IL))),M,N,IL) r15: a__uTake2(tt(),M,N,IL) -> cons(mark(N),take(M,IL)) r16: a__length(cons(N,L)) -> a__uLength(a__and(a__isNat(N),a__isNatList(L)),L) r17: a__uLength(tt(),L) -> s(a__length(mark(L))) r18: mark(and(X1,X2)) -> a__and(mark(X1),mark(X2)) r19: mark(isNatIList(X)) -> a__isNatIList(X) r20: mark(isNatList(X)) -> a__isNatList(X) r21: mark(isNat(X)) -> a__isNat(X) r22: mark(length(X)) -> a__length(mark(X)) r23: mark(zeros()) -> a__zeros() r24: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r25: mark(uTake1(X)) -> a__uTake1(mark(X)) r26: mark(uTake2(X1,X2,X3,X4)) -> a__uTake2(mark(X1),X2,X3,X4) r27: mark(uLength(X1,X2)) -> a__uLength(mark(X1),X2) r28: mark(tt()) -> tt() r29: mark(|0|()) -> |0|() r30: mark(s(X)) -> s(mark(X)) r31: mark(cons(X1,X2)) -> cons(mark(X1),X2) r32: mark(nil()) -> nil() r33: a__and(X1,X2) -> and(X1,X2) r34: a__isNatIList(X) -> isNatIList(X) r35: a__isNatList(X) -> isNatList(X) r36: a__isNat(X) -> isNat(X) r37: a__length(X) -> length(X) r38: a__zeros() -> zeros() r39: a__take(X1,X2) -> take(X1,X2) r40: a__uTake1(X) -> uTake1(X) r41: a__uTake2(X1,X2,X3,X4) -> uTake2(X1,X2,X3,X4) r42: a__uLength(X1,X2) -> uLength(X1,X2) 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, r31, r32, r33, r34, r35, r36, r37, r38, r39, r40, r41, r42 Take the reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^2 order: standard order interpretations: a__length#_A(x1) = x1 + (2,0) cons_A(x1,x2) = ((1,1),(1,1)) x2 + (2,0) a__uLength#_A(x1,x2) = ((0,1),(0,0)) x1 + ((0,1),(0,0)) x2 a__and_A(x1,x2) = ((0,1),(0,1)) x2 + (3,0) a__isNat_A(x1) = ((1,0),(1,1)) x1 + (0,4) a__isNatList_A(x1) = ((1,0),(1,0)) x1 + (4,1) tt_A() = (0,5) mark_A(x1) = ((0,1),(0,1)) x1 + (3,0) a__isNatIList_A(x1) = ((1,0),(1,0)) x1 + (7,5) zeros_A() = (0,1) a__zeros_A() = (3,1) |0|_A() = (0,1) a__take_A(x1,x2) = ((0,1),(0,1)) x1 + x2 + (5,5) a__uTake1_A(x1) = (6,4) nil_A() = (4,2) s_A(x1) = x1 + (1,4) a__uTake2_A(x1,x2,x3,x4) = ((0,1),(0,1)) x2 + ((1,1),(1,1)) x4 + (11,9) take_A(x1,x2) = x1 + x2 + (4,5) a__length_A(x1) = x1 + (6,7) a__uLength_A(x1,x2) = ((0,1),(0,1)) x1 + ((0,1),(0,1)) x2 + (6,6) isNatIList_A(x1) = ((0,0),(1,0)) x1 + (1,5) length_A(x1) = x1 + (5,7) uTake1_A(x1) = (6,4) uTake2_A(x1,x2,x3,x4) = x2 + ((1,0),(1,1)) x4 + (1,9) uLength_A(x1,x2) = x1 + ((0,1),(0,1)) x2 + (1,6) and_A(x1,x2) = x2 + (2,0) isNatList_A(x1) = ((0,0),(1,0)) x1 + (1,1) isNat_A(x1) = ((0,0),(1,1)) x1 + (0,4) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__length#_A(x1) = ((0,1),(0,1)) x1 cons_A(x1,x2) = ((1,0),(1,1)) x2 + (2,1) a__uLength#_A(x1,x2) = (1,1) a__and_A(x1,x2) = (0,0) a__isNat_A(x1) = ((1,1),(1,1)) x1 a__isNatList_A(x1) = (0,0) tt_A() = (4,4) mark_A(x1) = (0,0) a__isNatIList_A(x1) = ((1,1),(1,1)) x1 + (1,1) zeros_A() = (1,1) a__zeros_A() = (4,3) |0|_A() = (1,3) a__take_A(x1,x2) = ((1,1),(1,0)) x2 a__uTake1_A(x1) = (0,0) nil_A() = (1,1) s_A(x1) = (1,3) a__uTake2_A(x1,x2,x3,x4) = (3,2) take_A(x1,x2) = (0,1) a__length_A(x1) = (2,1) a__uLength_A(x1,x2) = (2,2) isNatIList_A(x1) = (1,0) length_A(x1) = x1 + (1,1) uTake1_A(x1) = (0,0) uTake2_A(x1,x2,x3,x4) = ((1,0),(1,1)) x4 uLength_A(x1,x2) = (0,0) and_A(x1,x2) = (1,1) isNatList_A(x1) = (0,1) isNat_A(x1) = (0,0) 3. matrix interpretations: carrier: N^2 order: standard order interpretations: a__length#_A(x1) = (1,0) cons_A(x1,x2) = ((0,0),(1,1)) x2 + (6,1) a__uLength#_A(x1,x2) = (0,0) a__and_A(x1,x2) = (5,3) a__isNat_A(x1) = ((1,1),(1,1)) x1 + (0,1) a__isNatList_A(x1) = (5,3) tt_A() = (5,1) mark_A(x1) = (5,3) a__isNatIList_A(x1) = ((0,0),(1,1)) x1 + (5,3) zeros_A() = (1,1) a__zeros_A() = (5,3) |0|_A() = (1,4) a__take_A(x1,x2) = (2,3) a__uTake1_A(x1) = (0,3) nil_A() = (0,0) s_A(x1) = (1,1) a__uTake2_A(x1,x2,x3,x4) = (1,3) take_A(x1,x2) = (3,4) a__length_A(x1) = (5,1) a__uLength_A(x1,x2) = (2,4) isNatIList_A(x1) = (0,1) length_A(x1) = (4,1) uTake1_A(x1) = (0,0) uTake2_A(x1,x2,x3,x4) = ((0,1),(1,0)) x4 + (0,4) uLength_A(x1,x2) = (0,5) and_A(x1,x2) = (0,1) isNatList_A(x1) = (0,0) isNat_A(x1) = (0,1) The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains.