(0) Obligation:

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

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(U11(X1, X2)) → active(U11(mark(X1), X2))
mark(tt) → active(tt)
mark(U12(X1, X2)) → active(U12(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
mark(U21(X1, X2, X3, X4)) → active(U21(mark(X1), X2, X3, X4))
mark(U22(X1, X2, X3, X4)) → active(U22(mark(X1), X2, X3, X4))
mark(U23(X1, X2, X3, X4)) → active(U23(mark(X1), X2, X3, X4))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(nil) → active(nil)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
U11(mark(X1), X2) → U11(X1, X2)
U11(X1, mark(X2)) → U11(X1, X2)
U11(active(X1), X2) → U11(X1, X2)
U11(X1, active(X2)) → U11(X1, X2)
U12(mark(X1), X2) → U12(X1, X2)
U12(X1, mark(X2)) → U12(X1, X2)
U12(active(X1), X2) → U12(X1, X2)
U12(X1, active(X2)) → U12(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
length(mark(X)) → length(X)
length(active(X)) → length(X)
U21(mark(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, mark(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, mark(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, mark(X4)) → U21(X1, X2, X3, X4)
U21(active(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, active(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, active(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, active(X4)) → U21(X1, X2, X3, X4)
U22(mark(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, mark(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, mark(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, mark(X4)) → U22(X1, X2, X3, X4)
U22(active(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, active(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, active(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, active(X4)) → U22(X1, X2, X3, X4)
U23(mark(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, mark(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, mark(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, mark(X4)) → U23(X1, X2, X3, X4)
U23(active(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, active(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, active(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, active(X4)) → U23(X1, X2, X3, X4)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(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:

ACTIVE(zeros) → MARK(cons(0, zeros))
ACTIVE(zeros) → CONS(0, zeros)
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
ACTIVE(U11(tt, L)) → U121(tt, L)
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
ACTIVE(U12(tt, L)) → S(length(L))
ACTIVE(U12(tt, L)) → LENGTH(L)
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
ACTIVE(U21(tt, IL, M, N)) → U221(tt, IL, M, N)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
ACTIVE(U22(tt, IL, M, N)) → U231(tt, IL, M, N)
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
ACTIVE(U23(tt, IL, M, N)) → CONS(N, take(M, IL))
ACTIVE(U23(tt, IL, M, N)) → TAKE(M, IL)
ACTIVE(length(nil)) → MARK(0)
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
ACTIVE(length(cons(N, L))) → U111(tt, L)
ACTIVE(take(0, IL)) → MARK(nil)
ACTIVE(take(s(M), cons(N, IL))) → MARK(U21(tt, IL, M, N))
ACTIVE(take(s(M), cons(N, IL))) → U211(tt, IL, M, N)
MARK(zeros) → ACTIVE(zeros)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
MARK(cons(X1, X2)) → MARK(X1)
MARK(0) → ACTIVE(0)
MARK(U11(X1, X2)) → ACTIVE(U11(mark(X1), X2))
MARK(U11(X1, X2)) → U111(mark(X1), X2)
MARK(U11(X1, X2)) → MARK(X1)
MARK(tt) → ACTIVE(tt)
MARK(U12(X1, X2)) → ACTIVE(U12(mark(X1), X2))
MARK(U12(X1, X2)) → U121(mark(X1), X2)
MARK(U12(X1, X2)) → MARK(X1)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → S(mark(X))
MARK(s(X)) → MARK(X)
MARK(length(X)) → ACTIVE(length(mark(X)))
MARK(length(X)) → LENGTH(mark(X))
MARK(length(X)) → MARK(X)
MARK(U21(X1, X2, X3, X4)) → ACTIVE(U21(mark(X1), X2, X3, X4))
MARK(U21(X1, X2, X3, X4)) → U211(mark(X1), X2, X3, X4)
MARK(U21(X1, X2, X3, X4)) → MARK(X1)
MARK(U22(X1, X2, X3, X4)) → ACTIVE(U22(mark(X1), X2, X3, X4))
MARK(U22(X1, X2, X3, X4)) → U221(mark(X1), X2, X3, X4)
MARK(U22(X1, X2, X3, X4)) → MARK(X1)
MARK(U23(X1, X2, X3, X4)) → ACTIVE(U23(mark(X1), X2, X3, X4))
MARK(U23(X1, X2, X3, X4)) → U231(mark(X1), X2, X3, X4)
MARK(U23(X1, X2, X3, X4)) → MARK(X1)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))
MARK(take(X1, X2)) → TAKE(mark(X1), mark(X2))
MARK(take(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → MARK(X2)
MARK(nil) → ACTIVE(nil)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)
U111(mark(X1), X2) → U111(X1, X2)
U111(X1, mark(X2)) → U111(X1, X2)
U111(active(X1), X2) → U111(X1, X2)
U111(X1, active(X2)) → U111(X1, X2)
U121(mark(X1), X2) → U121(X1, X2)
U121(X1, mark(X2)) → U121(X1, X2)
U121(active(X1), X2) → U121(X1, X2)
U121(X1, active(X2)) → U121(X1, X2)
S(mark(X)) → S(X)
S(active(X)) → S(X)
LENGTH(mark(X)) → LENGTH(X)
LENGTH(active(X)) → LENGTH(X)
U211(mark(X1), X2, X3, X4) → U211(X1, X2, X3, X4)
U211(X1, mark(X2), X3, X4) → U211(X1, X2, X3, X4)
U211(X1, X2, mark(X3), X4) → U211(X1, X2, X3, X4)
U211(X1, X2, X3, mark(X4)) → U211(X1, X2, X3, X4)
U211(active(X1), X2, X3, X4) → U211(X1, X2, X3, X4)
U211(X1, active(X2), X3, X4) → U211(X1, X2, X3, X4)
U211(X1, X2, active(X3), X4) → U211(X1, X2, X3, X4)
U211(X1, X2, X3, active(X4)) → U211(X1, X2, X3, X4)
U221(mark(X1), X2, X3, X4) → U221(X1, X2, X3, X4)
U221(X1, mark(X2), X3, X4) → U221(X1, X2, X3, X4)
U221(X1, X2, mark(X3), X4) → U221(X1, X2, X3, X4)
U221(X1, X2, X3, mark(X4)) → U221(X1, X2, X3, X4)
U221(active(X1), X2, X3, X4) → U221(X1, X2, X3, X4)
U221(X1, active(X2), X3, X4) → U221(X1, X2, X3, X4)
U221(X1, X2, active(X3), X4) → U221(X1, X2, X3, X4)
U221(X1, X2, X3, active(X4)) → U221(X1, X2, X3, X4)
U231(mark(X1), X2, X3, X4) → U231(X1, X2, X3, X4)
U231(X1, mark(X2), X3, X4) → U231(X1, X2, X3, X4)
U231(X1, X2, mark(X3), X4) → U231(X1, X2, X3, X4)
U231(X1, X2, X3, mark(X4)) → U231(X1, X2, X3, X4)
U231(active(X1), X2, X3, X4) → U231(X1, X2, X3, X4)
U231(X1, active(X2), X3, X4) → U231(X1, X2, X3, X4)
U231(X1, X2, active(X3), X4) → U231(X1, X2, X3, X4)
U231(X1, X2, X3, active(X4)) → U231(X1, X2, X3, X4)
TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(X1, mark(X2)) → TAKE(X1, X2)
TAKE(active(X1), X2) → TAKE(X1, X2)
TAKE(X1, active(X2)) → TAKE(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(U11(X1, X2)) → active(U11(mark(X1), X2))
mark(tt) → active(tt)
mark(U12(X1, X2)) → active(U12(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
mark(U21(X1, X2, X3, X4)) → active(U21(mark(X1), X2, X3, X4))
mark(U22(X1, X2, X3, X4)) → active(U22(mark(X1), X2, X3, X4))
mark(U23(X1, X2, X3, X4)) → active(U23(mark(X1), X2, X3, X4))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(nil) → active(nil)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
U11(mark(X1), X2) → U11(X1, X2)
U11(X1, mark(X2)) → U11(X1, X2)
U11(active(X1), X2) → U11(X1, X2)
U11(X1, active(X2)) → U11(X1, X2)
U12(mark(X1), X2) → U12(X1, X2)
U12(X1, mark(X2)) → U12(X1, X2)
U12(active(X1), X2) → U12(X1, X2)
U12(X1, active(X2)) → U12(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
length(mark(X)) → length(X)
length(active(X)) → length(X)
U21(mark(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, mark(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, mark(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, mark(X4)) → U21(X1, X2, X3, X4)
U21(active(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, active(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, active(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, active(X4)) → U21(X1, X2, X3, X4)
U22(mark(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, mark(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, mark(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, mark(X4)) → U22(X1, X2, X3, X4)
U22(active(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, active(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, active(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, active(X4)) → U22(X1, X2, X3, X4)
U23(mark(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, mark(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, mark(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, mark(X4)) → U23(X1, X2, X3, X4)
U23(active(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, active(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, active(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, active(X4)) → U23(X1, X2, X3, X4)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(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 10 SCCs with 24 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

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

TAKE(X1, mark(X2)) → TAKE(X1, X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(active(X1), X2) → TAKE(X1, X2)
TAKE(X1, active(X2)) → TAKE(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(U11(X1, X2)) → active(U11(mark(X1), X2))
mark(tt) → active(tt)
mark(U12(X1, X2)) → active(U12(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
mark(U21(X1, X2, X3, X4)) → active(U21(mark(X1), X2, X3, X4))
mark(U22(X1, X2, X3, X4)) → active(U22(mark(X1), X2, X3, X4))
mark(U23(X1, X2, X3, X4)) → active(U23(mark(X1), X2, X3, X4))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(nil) → active(nil)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
U11(mark(X1), X2) → U11(X1, X2)
U11(X1, mark(X2)) → U11(X1, X2)
U11(active(X1), X2) → U11(X1, X2)
U11(X1, active(X2)) → U11(X1, X2)
U12(mark(X1), X2) → U12(X1, X2)
U12(X1, mark(X2)) → U12(X1, X2)
U12(active(X1), X2) → U12(X1, X2)
U12(X1, active(X2)) → U12(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
length(mark(X)) → length(X)
length(active(X)) → length(X)
U21(mark(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, mark(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, mark(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, mark(X4)) → U21(X1, X2, X3, X4)
U21(active(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, active(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, active(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, active(X4)) → U21(X1, X2, X3, X4)
U22(mark(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, mark(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, mark(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, mark(X4)) → U22(X1, X2, X3, X4)
U22(active(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, active(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, active(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, active(X4)) → U22(X1, X2, X3, X4)
U23(mark(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, mark(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, mark(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, mark(X4)) → U23(X1, X2, X3, X4)
U23(active(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, active(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, active(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, active(X4)) → U23(X1, X2, X3, X4)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(6) Obligation:

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

U231(X1, mark(X2), X3, X4) → U231(X1, X2, X3, X4)
U231(mark(X1), X2, X3, X4) → U231(X1, X2, X3, X4)
U231(X1, X2, mark(X3), X4) → U231(X1, X2, X3, X4)
U231(X1, X2, X3, mark(X4)) → U231(X1, X2, X3, X4)
U231(active(X1), X2, X3, X4) → U231(X1, X2, X3, X4)
U231(X1, active(X2), X3, X4) → U231(X1, X2, X3, X4)
U231(X1, X2, active(X3), X4) → U231(X1, X2, X3, X4)
U231(X1, X2, X3, active(X4)) → U231(X1, X2, X3, X4)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(U11(X1, X2)) → active(U11(mark(X1), X2))
mark(tt) → active(tt)
mark(U12(X1, X2)) → active(U12(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
mark(U21(X1, X2, X3, X4)) → active(U21(mark(X1), X2, X3, X4))
mark(U22(X1, X2, X3, X4)) → active(U22(mark(X1), X2, X3, X4))
mark(U23(X1, X2, X3, X4)) → active(U23(mark(X1), X2, X3, X4))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(nil) → active(nil)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
U11(mark(X1), X2) → U11(X1, X2)
U11(X1, mark(X2)) → U11(X1, X2)
U11(active(X1), X2) → U11(X1, X2)
U11(X1, active(X2)) → U11(X1, X2)
U12(mark(X1), X2) → U12(X1, X2)
U12(X1, mark(X2)) → U12(X1, X2)
U12(active(X1), X2) → U12(X1, X2)
U12(X1, active(X2)) → U12(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
length(mark(X)) → length(X)
length(active(X)) → length(X)
U21(mark(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, mark(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, mark(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, mark(X4)) → U21(X1, X2, X3, X4)
U21(active(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, active(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, active(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, active(X4)) → U21(X1, X2, X3, X4)
U22(mark(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, mark(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, mark(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, mark(X4)) → U22(X1, X2, X3, X4)
U22(active(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, active(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, active(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, active(X4)) → U22(X1, X2, X3, X4)
U23(mark(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, mark(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, mark(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, mark(X4)) → U23(X1, X2, X3, X4)
U23(active(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, active(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, active(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, active(X4)) → U23(X1, X2, X3, X4)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(7) Obligation:

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

U221(X1, mark(X2), X3, X4) → U221(X1, X2, X3, X4)
U221(mark(X1), X2, X3, X4) → U221(X1, X2, X3, X4)
U221(X1, X2, mark(X3), X4) → U221(X1, X2, X3, X4)
U221(X1, X2, X3, mark(X4)) → U221(X1, X2, X3, X4)
U221(active(X1), X2, X3, X4) → U221(X1, X2, X3, X4)
U221(X1, active(X2), X3, X4) → U221(X1, X2, X3, X4)
U221(X1, X2, active(X3), X4) → U221(X1, X2, X3, X4)
U221(X1, X2, X3, active(X4)) → U221(X1, X2, X3, X4)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(U11(X1, X2)) → active(U11(mark(X1), X2))
mark(tt) → active(tt)
mark(U12(X1, X2)) → active(U12(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
mark(U21(X1, X2, X3, X4)) → active(U21(mark(X1), X2, X3, X4))
mark(U22(X1, X2, X3, X4)) → active(U22(mark(X1), X2, X3, X4))
mark(U23(X1, X2, X3, X4)) → active(U23(mark(X1), X2, X3, X4))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(nil) → active(nil)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
U11(mark(X1), X2) → U11(X1, X2)
U11(X1, mark(X2)) → U11(X1, X2)
U11(active(X1), X2) → U11(X1, X2)
U11(X1, active(X2)) → U11(X1, X2)
U12(mark(X1), X2) → U12(X1, X2)
U12(X1, mark(X2)) → U12(X1, X2)
U12(active(X1), X2) → U12(X1, X2)
U12(X1, active(X2)) → U12(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
length(mark(X)) → length(X)
length(active(X)) → length(X)
U21(mark(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, mark(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, mark(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, mark(X4)) → U21(X1, X2, X3, X4)
U21(active(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, active(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, active(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, active(X4)) → U21(X1, X2, X3, X4)
U22(mark(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, mark(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, mark(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, mark(X4)) → U22(X1, X2, X3, X4)
U22(active(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, active(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, active(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, active(X4)) → U22(X1, X2, X3, X4)
U23(mark(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, mark(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, mark(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, mark(X4)) → U23(X1, X2, X3, X4)
U23(active(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, active(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, active(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, active(X4)) → U23(X1, X2, X3, X4)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(8) Obligation:

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

U211(X1, mark(X2), X3, X4) → U211(X1, X2, X3, X4)
U211(mark(X1), X2, X3, X4) → U211(X1, X2, X3, X4)
U211(X1, X2, mark(X3), X4) → U211(X1, X2, X3, X4)
U211(X1, X2, X3, mark(X4)) → U211(X1, X2, X3, X4)
U211(active(X1), X2, X3, X4) → U211(X1, X2, X3, X4)
U211(X1, active(X2), X3, X4) → U211(X1, X2, X3, X4)
U211(X1, X2, active(X3), X4) → U211(X1, X2, X3, X4)
U211(X1, X2, X3, active(X4)) → U211(X1, X2, X3, X4)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(U11(X1, X2)) → active(U11(mark(X1), X2))
mark(tt) → active(tt)
mark(U12(X1, X2)) → active(U12(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
mark(U21(X1, X2, X3, X4)) → active(U21(mark(X1), X2, X3, X4))
mark(U22(X1, X2, X3, X4)) → active(U22(mark(X1), X2, X3, X4))
mark(U23(X1, X2, X3, X4)) → active(U23(mark(X1), X2, X3, X4))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(nil) → active(nil)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
U11(mark(X1), X2) → U11(X1, X2)
U11(X1, mark(X2)) → U11(X1, X2)
U11(active(X1), X2) → U11(X1, X2)
U11(X1, active(X2)) → U11(X1, X2)
U12(mark(X1), X2) → U12(X1, X2)
U12(X1, mark(X2)) → U12(X1, X2)
U12(active(X1), X2) → U12(X1, X2)
U12(X1, active(X2)) → U12(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
length(mark(X)) → length(X)
length(active(X)) → length(X)
U21(mark(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, mark(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, mark(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, mark(X4)) → U21(X1, X2, X3, X4)
U21(active(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, active(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, active(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, active(X4)) → U21(X1, X2, X3, X4)
U22(mark(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, mark(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, mark(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, mark(X4)) → U22(X1, X2, X3, X4)
U22(active(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, active(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, active(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, active(X4)) → U22(X1, X2, X3, X4)
U23(mark(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, mark(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, mark(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, mark(X4)) → U23(X1, X2, X3, X4)
U23(active(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, active(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, active(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, active(X4)) → U23(X1, X2, X3, X4)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(9) Obligation:

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

LENGTH(active(X)) → LENGTH(X)
LENGTH(mark(X)) → LENGTH(X)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(U11(X1, X2)) → active(U11(mark(X1), X2))
mark(tt) → active(tt)
mark(U12(X1, X2)) → active(U12(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
mark(U21(X1, X2, X3, X4)) → active(U21(mark(X1), X2, X3, X4))
mark(U22(X1, X2, X3, X4)) → active(U22(mark(X1), X2, X3, X4))
mark(U23(X1, X2, X3, X4)) → active(U23(mark(X1), X2, X3, X4))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(nil) → active(nil)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
U11(mark(X1), X2) → U11(X1, X2)
U11(X1, mark(X2)) → U11(X1, X2)
U11(active(X1), X2) → U11(X1, X2)
U11(X1, active(X2)) → U11(X1, X2)
U12(mark(X1), X2) → U12(X1, X2)
U12(X1, mark(X2)) → U12(X1, X2)
U12(active(X1), X2) → U12(X1, X2)
U12(X1, active(X2)) → U12(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
length(mark(X)) → length(X)
length(active(X)) → length(X)
U21(mark(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, mark(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, mark(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, mark(X4)) → U21(X1, X2, X3, X4)
U21(active(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, active(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, active(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, active(X4)) → U21(X1, X2, X3, X4)
U22(mark(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, mark(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, mark(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, mark(X4)) → U22(X1, X2, X3, X4)
U22(active(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, active(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, active(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, active(X4)) → U22(X1, X2, X3, X4)
U23(mark(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, mark(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, mark(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, mark(X4)) → U23(X1, X2, X3, X4)
U23(active(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, active(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, active(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, active(X4)) → U23(X1, X2, X3, X4)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(10) Obligation:

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

S(active(X)) → S(X)
S(mark(X)) → S(X)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(U11(X1, X2)) → active(U11(mark(X1), X2))
mark(tt) → active(tt)
mark(U12(X1, X2)) → active(U12(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
mark(U21(X1, X2, X3, X4)) → active(U21(mark(X1), X2, X3, X4))
mark(U22(X1, X2, X3, X4)) → active(U22(mark(X1), X2, X3, X4))
mark(U23(X1, X2, X3, X4)) → active(U23(mark(X1), X2, X3, X4))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(nil) → active(nil)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
U11(mark(X1), X2) → U11(X1, X2)
U11(X1, mark(X2)) → U11(X1, X2)
U11(active(X1), X2) → U11(X1, X2)
U11(X1, active(X2)) → U11(X1, X2)
U12(mark(X1), X2) → U12(X1, X2)
U12(X1, mark(X2)) → U12(X1, X2)
U12(active(X1), X2) → U12(X1, X2)
U12(X1, active(X2)) → U12(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
length(mark(X)) → length(X)
length(active(X)) → length(X)
U21(mark(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, mark(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, mark(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, mark(X4)) → U21(X1, X2, X3, X4)
U21(active(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, active(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, active(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, active(X4)) → U21(X1, X2, X3, X4)
U22(mark(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, mark(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, mark(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, mark(X4)) → U22(X1, X2, X3, X4)
U22(active(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, active(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, active(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, active(X4)) → U22(X1, X2, X3, X4)
U23(mark(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, mark(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, mark(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, mark(X4)) → U23(X1, X2, X3, X4)
U23(active(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, active(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, active(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, active(X4)) → U23(X1, X2, X3, X4)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(11) Obligation:

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

U121(X1, mark(X2)) → U121(X1, X2)
U121(mark(X1), X2) → U121(X1, X2)
U121(active(X1), X2) → U121(X1, X2)
U121(X1, active(X2)) → U121(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(U11(X1, X2)) → active(U11(mark(X1), X2))
mark(tt) → active(tt)
mark(U12(X1, X2)) → active(U12(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
mark(U21(X1, X2, X3, X4)) → active(U21(mark(X1), X2, X3, X4))
mark(U22(X1, X2, X3, X4)) → active(U22(mark(X1), X2, X3, X4))
mark(U23(X1, X2, X3, X4)) → active(U23(mark(X1), X2, X3, X4))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(nil) → active(nil)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
U11(mark(X1), X2) → U11(X1, X2)
U11(X1, mark(X2)) → U11(X1, X2)
U11(active(X1), X2) → U11(X1, X2)
U11(X1, active(X2)) → U11(X1, X2)
U12(mark(X1), X2) → U12(X1, X2)
U12(X1, mark(X2)) → U12(X1, X2)
U12(active(X1), X2) → U12(X1, X2)
U12(X1, active(X2)) → U12(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
length(mark(X)) → length(X)
length(active(X)) → length(X)
U21(mark(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, mark(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, mark(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, mark(X4)) → U21(X1, X2, X3, X4)
U21(active(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, active(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, active(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, active(X4)) → U21(X1, X2, X3, X4)
U22(mark(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, mark(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, mark(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, mark(X4)) → U22(X1, X2, X3, X4)
U22(active(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, active(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, active(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, active(X4)) → U22(X1, X2, X3, X4)
U23(mark(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, mark(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, mark(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, mark(X4)) → U23(X1, X2, X3, X4)
U23(active(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, active(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, active(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, active(X4)) → U23(X1, X2, X3, X4)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(12) Obligation:

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

U111(X1, mark(X2)) → U111(X1, X2)
U111(mark(X1), X2) → U111(X1, X2)
U111(active(X1), X2) → U111(X1, X2)
U111(X1, active(X2)) → U111(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(U11(X1, X2)) → active(U11(mark(X1), X2))
mark(tt) → active(tt)
mark(U12(X1, X2)) → active(U12(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
mark(U21(X1, X2, X3, X4)) → active(U21(mark(X1), X2, X3, X4))
mark(U22(X1, X2, X3, X4)) → active(U22(mark(X1), X2, X3, X4))
mark(U23(X1, X2, X3, X4)) → active(U23(mark(X1), X2, X3, X4))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(nil) → active(nil)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
U11(mark(X1), X2) → U11(X1, X2)
U11(X1, mark(X2)) → U11(X1, X2)
U11(active(X1), X2) → U11(X1, X2)
U11(X1, active(X2)) → U11(X1, X2)
U12(mark(X1), X2) → U12(X1, X2)
U12(X1, mark(X2)) → U12(X1, X2)
U12(active(X1), X2) → U12(X1, X2)
U12(X1, active(X2)) → U12(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
length(mark(X)) → length(X)
length(active(X)) → length(X)
U21(mark(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, mark(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, mark(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, mark(X4)) → U21(X1, X2, X3, X4)
U21(active(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, active(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, active(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, active(X4)) → U21(X1, X2, X3, X4)
U22(mark(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, mark(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, mark(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, mark(X4)) → U22(X1, X2, X3, X4)
U22(active(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, active(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, active(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, active(X4)) → U22(X1, X2, X3, X4)
U23(mark(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, mark(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, mark(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, mark(X4)) → U23(X1, X2, X3, X4)
U23(active(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, active(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, active(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, active(X4)) → U23(X1, X2, X3, X4)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(13) Obligation:

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

CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(U11(X1, X2)) → active(U11(mark(X1), X2))
mark(tt) → active(tt)
mark(U12(X1, X2)) → active(U12(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
mark(U21(X1, X2, X3, X4)) → active(U21(mark(X1), X2, X3, X4))
mark(U22(X1, X2, X3, X4)) → active(U22(mark(X1), X2, X3, X4))
mark(U23(X1, X2, X3, X4)) → active(U23(mark(X1), X2, X3, X4))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(nil) → active(nil)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
U11(mark(X1), X2) → U11(X1, X2)
U11(X1, mark(X2)) → U11(X1, X2)
U11(active(X1), X2) → U11(X1, X2)
U11(X1, active(X2)) → U11(X1, X2)
U12(mark(X1), X2) → U12(X1, X2)
U12(X1, mark(X2)) → U12(X1, X2)
U12(active(X1), X2) → U12(X1, X2)
U12(X1, active(X2)) → U12(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
length(mark(X)) → length(X)
length(active(X)) → length(X)
U21(mark(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, mark(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, mark(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, mark(X4)) → U21(X1, X2, X3, X4)
U21(active(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, active(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, active(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, active(X4)) → U21(X1, X2, X3, X4)
U22(mark(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, mark(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, mark(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, mark(X4)) → U22(X1, X2, X3, X4)
U22(active(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, active(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, active(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, active(X4)) → U22(X1, X2, X3, X4)
U23(mark(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, mark(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, mark(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, mark(X4)) → U23(X1, X2, X3, X4)
U23(active(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, active(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, active(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, active(X4)) → U23(X1, X2, X3, X4)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(14) Obligation:

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

MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(cons(X1, X2)) → MARK(X1)
MARK(zeros) → ACTIVE(zeros)
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(U11(X1, X2)) → ACTIVE(U11(mark(X1), X2))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
MARK(U11(X1, X2)) → MARK(X1)
MARK(U12(X1, X2)) → ACTIVE(U12(mark(X1), X2))
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
MARK(U12(X1, X2)) → MARK(X1)
MARK(s(X)) → ACTIVE(s(mark(X)))
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(s(X)) → MARK(X)
MARK(length(X)) → ACTIVE(length(mark(X)))
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(length(X)) → MARK(X)
MARK(U21(X1, X2, X3, X4)) → ACTIVE(U21(mark(X1), X2, X3, X4))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(U21(X1, X2, X3, X4)) → MARK(X1)
MARK(U22(X1, X2, X3, X4)) → ACTIVE(U22(mark(X1), X2, X3, X4))
ACTIVE(take(s(M), cons(N, IL))) → MARK(U21(tt, IL, M, N))
MARK(U22(X1, X2, X3, X4)) → MARK(X1)
MARK(U23(X1, X2, X3, X4)) → ACTIVE(U23(mark(X1), X2, X3, X4))
MARK(U23(X1, X2, X3, X4)) → MARK(X1)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))
MARK(take(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → MARK(X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(U11(X1, X2)) → active(U11(mark(X1), X2))
mark(tt) → active(tt)
mark(U12(X1, X2)) → active(U12(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(length(X)) → active(length(mark(X)))
mark(U21(X1, X2, X3, X4)) → active(U21(mark(X1), X2, X3, X4))
mark(U22(X1, X2, X3, X4)) → active(U22(mark(X1), X2, X3, X4))
mark(U23(X1, X2, X3, X4)) → active(U23(mark(X1), X2, X3, X4))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(nil) → active(nil)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
U11(mark(X1), X2) → U11(X1, X2)
U11(X1, mark(X2)) → U11(X1, X2)
U11(active(X1), X2) → U11(X1, X2)
U11(X1, active(X2)) → U11(X1, X2)
U12(mark(X1), X2) → U12(X1, X2)
U12(X1, mark(X2)) → U12(X1, X2)
U12(active(X1), X2) → U12(X1, X2)
U12(X1, active(X2)) → U12(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
length(mark(X)) → length(X)
length(active(X)) → length(X)
U21(mark(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, mark(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, mark(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, mark(X4)) → U21(X1, X2, X3, X4)
U21(active(X1), X2, X3, X4) → U21(X1, X2, X3, X4)
U21(X1, active(X2), X3, X4) → U21(X1, X2, X3, X4)
U21(X1, X2, active(X3), X4) → U21(X1, X2, X3, X4)
U21(X1, X2, X3, active(X4)) → U21(X1, X2, X3, X4)
U22(mark(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, mark(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, mark(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, mark(X4)) → U22(X1, X2, X3, X4)
U22(active(X1), X2, X3, X4) → U22(X1, X2, X3, X4)
U22(X1, active(X2), X3, X4) → U22(X1, X2, X3, X4)
U22(X1, X2, active(X3), X4) → U22(X1, X2, X3, X4)
U22(X1, X2, X3, active(X4)) → U22(X1, X2, X3, X4)
U23(mark(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, mark(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, mark(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, mark(X4)) → U23(X1, X2, X3, X4)
U23(active(X1), X2, X3, X4) → U23(X1, X2, X3, X4)
U23(X1, active(X2), X3, X4) → U23(X1, X2, X3, X4)
U23(X1, X2, active(X3), X4) → U23(X1, X2, X3, X4)
U23(X1, X2, X3, active(X4)) → U23(X1, X2, X3, X4)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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