(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(nil) → 0
a__length(cons(N, L)) → a__U11(tt, L)
a__take(0, IL) → nil
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

Q DP problem:
The TRS P consists of the following rules:

A__U11(tt, L) → A__U12(tt, L)
A__U12(tt, L) → A__LENGTH(mark(L))
A__U12(tt, L) → MARK(L)
A__U21(tt, IL, M, N) → A__U22(tt, IL, M, N)
A__U22(tt, IL, M, N) → A__U23(tt, IL, M, N)
A__U23(tt, IL, M, N) → MARK(N)
A__LENGTH(cons(N, L)) → A__U11(tt, L)
A__TAKE(s(M), cons(N, IL)) → A__U21(tt, IL, M, N)
MARK(zeros) → A__ZEROS
MARK(U11(X1, X2)) → A__U11(mark(X1), X2)
MARK(U11(X1, X2)) → MARK(X1)
MARK(U12(X1, X2)) → A__U12(mark(X1), X2)
MARK(U12(X1, X2)) → MARK(X1)
MARK(length(X)) → A__LENGTH(mark(X))
MARK(length(X)) → MARK(X)
MARK(U21(X1, X2, X3, X4)) → A__U21(mark(X1), X2, X3, X4)
MARK(U21(X1, X2, X3, X4)) → MARK(X1)
MARK(U22(X1, X2, X3, X4)) → A__U22(mark(X1), X2, X3, X4)
MARK(U22(X1, X2, X3, X4)) → MARK(X1)
MARK(U23(X1, X2, X3, X4)) → A__U23(mark(X1), X2, X3, X4)
MARK(U23(X1, X2, X3, X4)) → MARK(X1)
MARK(take(X1, X2)) → A__TAKE(mark(X1), mark(X2))
MARK(take(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → MARK(X2)
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(nil) → 0
a__length(cons(N, L)) → a__U11(tt, L)
a__take(0, IL) → nil
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(4) Obligation:

Q DP problem:
The TRS P consists of the following rules:

A__U12(tt, L) → A__LENGTH(mark(L))
A__LENGTH(cons(N, L)) → A__U11(tt, L)
A__U11(tt, L) → A__U12(tt, L)
A__U12(tt, L) → MARK(L)
MARK(U11(X1, X2)) → A__U11(mark(X1), X2)
MARK(U11(X1, X2)) → MARK(X1)
MARK(U12(X1, X2)) → A__U12(mark(X1), X2)
MARK(U12(X1, X2)) → MARK(X1)
MARK(length(X)) → A__LENGTH(mark(X))
MARK(length(X)) → MARK(X)
MARK(U21(X1, X2, X3, X4)) → A__U21(mark(X1), X2, X3, X4)
A__U21(tt, IL, M, N) → A__U22(tt, IL, M, N)
A__U22(tt, IL, M, N) → A__U23(tt, IL, M, N)
A__U23(tt, IL, M, N) → MARK(N)
MARK(U21(X1, X2, X3, X4)) → MARK(X1)
MARK(U22(X1, X2, X3, X4)) → A__U22(mark(X1), X2, X3, X4)
MARK(U22(X1, X2, X3, X4)) → MARK(X1)
MARK(U23(X1, X2, X3, X4)) → A__U23(mark(X1), X2, X3, X4)
MARK(U23(X1, X2, X3, X4)) → MARK(X1)
MARK(take(X1, X2)) → A__TAKE(mark(X1), mark(X2))
A__TAKE(s(M), cons(N, IL)) → A__U21(tt, IL, M, N)
MARK(take(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → MARK(X2)
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(nil) → 0
a__length(cons(N, L)) → a__U11(tt, L)
a__take(0, IL) → nil
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.