(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) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


TAKE(X1, mark(X2)) → TAKE(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
TAKE(x1, x2)  =  x2
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21(x1)
U22(x1, x2, x3, x4)  =  x1
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > cons > [mark1, U211] > nil
length > 0 > [mark1, U211] > nil
length > U11 > tt > s > [mark1, U211] > nil
length > U11 > tt > U23 > cons > [mark1, U211] > nil
take > tt > s > [mark1, U211] > nil
take > tt > U23 > cons > [mark1, U211] > nil


The following usable rules [FROCOS05] were oriented:

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)

(7) Obligation:

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

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.

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


TAKE(X1, active(X2)) → TAKE(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
TAKE(x1, x2)  =  x2
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
zeros  =  zeros
cons(x1, x2)  =  x2
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
[mark1, active1] > zeros > [U12, s, U21, U22, U23, take, nil]
[mark1, active1] > length > 0 > [U12, s, U21, U22, U23, take, nil]
[mark1, active1] > length > U11 > [U12, s, U21, U22, U23, take, nil]
[mark1, active1] > length > tt > [U12, s, U21, U22, U23, take, nil]


The following usable rules [FROCOS05] were oriented:

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)

(9) Obligation:

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

TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(active(X1), 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.

(10) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


TAKE(mark(X1), X2) → TAKE(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
TAKE(x1, x2)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  x1
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > 0 > nil > [mark1, cons]
length > 0 > nil > [mark1, cons]
length > U11 > tt > s > U21 > U22 > U23 > [mark1, cons]


The following usable rules [FROCOS05] were oriented:

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)

(11) Obligation:

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

TAKE(active(X1), 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.

(12) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


TAKE(active(X1), X2) → TAKE(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
TAKE(x1, x2)  =  TAKE(x1)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > 0 > [mark1, cons] > [TAKE1, active1, nil]
length > 0 > [mark1, cons] > [TAKE1, active1, nil]
length > U11 > U12 > [tt, s, U21] > U22 > U23 > [mark1, cons] > [TAKE1, active1, nil]
take > [tt, s, U21] > U22 > U23 > [mark1, cons] > [TAKE1, active1, nil]


The following usable rules [FROCOS05] were oriented:

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)

(13) Obligation:

Q DP problem:
P is empty.
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) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(15) TRUE

(16) 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.

(17) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U231(X1, X2, mark(X3), X4) → U231(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U231(x1, x2, x3, x4)  =  U231(x3)
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  x1
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > cons > [U23^11, mark1]
length > 0 > nil > [U23^11, mark1]
length > U11 > tt > s > [U23^11, mark1]
length > U11 > tt > U23 > cons > [U23^11, mark1]
take > U21 > tt > s > [U23^11, mark1]
take > U21 > tt > U23 > cons > [U23^11, mark1]
take > nil > [U23^11, mark1]


The following usable rules [FROCOS05] were oriented:

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)

(18) 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, 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.

(19) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U231(mark(X1), X2, X3, X4) → U231(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U231(x1, x2, x3, x4)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  x1
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > [mark1, cons, s]
take > [tt, length] > [0, nil] > [mark1, cons, s]
take > [tt, length] > U11 > U12 > [mark1, cons, s]
take > [tt, length] > U22 > U23 > [mark1, cons, s]


The following usable rules [FROCOS05] were oriented:

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)

(20) Obligation:

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

U231(X1, mark(X2), 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.

(21) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U231(X1, mark(X2), X3, X4) → U231(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U231(x1, x2, x3, x4)  =  U231(x1, x2)
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  x1
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > mark1 > [U23^12, cons, s]
length > 0 > nil > mark1 > [U23^12, cons, s]
length > U11 > tt > U22 > U23 > mark1 > [U23^12, cons, s]
take > tt > U22 > U23 > mark1 > [U23^12, cons, s]
take > nil > mark1 > [U23^12, cons, s]


The following usable rules [FROCOS05] were oriented:

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)

(22) Obligation:

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

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.

(23) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U231(X1, X2, X3, mark(X4)) → U231(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U231(x1, x2, x3, x4)  =  x4
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  x1
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21(x1)
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > [mark1, U211] > cons > s
zeros > [mark1, U211] > 0 > nil > s
length > [tt, U22] > U12 > [mark1, U211] > cons > s
length > [tt, U22] > U12 > [mark1, U211] > 0 > nil > s
length > [tt, U22] > U23 > [mark1, U211] > cons > s
length > [tt, U22] > U23 > [mark1, U211] > 0 > nil > s
take > [tt, U22] > U12 > [mark1, U211] > cons > s
take > [tt, U22] > U12 > [mark1, U211] > 0 > nil > s
take > [tt, U22] > U23 > [mark1, U211] > cons > s
take > [tt, U22] > U23 > [mark1, U211] > 0 > nil > s


The following usable rules [FROCOS05] were oriented:

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)

(24) Obligation:

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

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.

(25) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U231(active(X1), X2, X3, X4) → U231(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U231(x1, x2, x3, x4)  =  x1
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length(x1)
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > cons > U11 > U12 > [mark1, s] > [active1, length1]
zeros > 0 > [mark1, s] > [active1, length1]
tt > take > U21 > U22 > U23 > cons > U11 > U12 > [mark1, s] > [active1, length1]
tt > take > nil > 0 > [mark1, s] > [active1, length1]


The following usable rules [FROCOS05] were oriented:

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)

(26) Obligation:

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

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.

(27) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U231(X1, active(X2), X3, X4) → U231(X1, X2, X3, X4)
U231(X1, X2, X3, active(X4)) → U231(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U231(x1, x2, x3, x4)  =  U231(x1, x2, x4)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
U23^13 > [cons, s, U23]
zeros > [active1, mark1] > [cons, s, U23]
[U21, U22, take] > nil > [0, U11, length] > tt > U12 > [active1, mark1] > [cons, s, U23]


The following usable rules [FROCOS05] were oriented:

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)

(28) Obligation:

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

U231(X1, X2, active(X3), 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.

(29) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U231(X1, X2, active(X3), X4) → U231(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U231(x1, x2, x3, x4)  =  U231(x1, x2, x3, x4)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21(x1)
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
U23^14 > nil
zeros > [mark1, cons] > active1 > 0 > nil
zeros > [mark1, cons] > active1 > U211 > nil
length > U11 > U12 > s > tt > U22 > U23 > [mark1, cons] > active1 > 0 > nil
length > U11 > U12 > s > tt > U22 > U23 > [mark1, cons] > active1 > U211 > nil
take > tt > U22 > U23 > [mark1, cons] > active1 > 0 > nil
take > tt > U22 > U23 > [mark1, cons] > active1 > U211 > nil


The following usable rules [FROCOS05] were oriented:

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)

(30) Obligation:

Q DP problem:
P is empty.
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.

(31) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(32) TRUE

(33) 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.

(34) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U221(X1, X2, mark(X3), X4) → U221(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U221(x1, x2, x3, x4)  =  U221(x3)
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  x1
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > cons > [U22^11, mark1]
length > 0 > nil > [U22^11, mark1]
length > U11 > tt > s > [U22^11, mark1]
length > U11 > tt > U23 > cons > [U22^11, mark1]
take > U21 > tt > s > [U22^11, mark1]
take > U21 > tt > U23 > cons > [U22^11, mark1]
take > nil > [U22^11, mark1]


The following usable rules [FROCOS05] were oriented:

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)

(35) 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, 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.

(36) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U221(mark(X1), X2, X3, X4) → U221(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U221(x1, x2, x3, x4)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  x1
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > [mark1, cons, s]
take > [tt, length] > [0, nil] > [mark1, cons, s]
take > [tt, length] > U11 > U12 > [mark1, cons, s]
take > [tt, length] > U22 > U23 > [mark1, cons, s]


The following usable rules [FROCOS05] were oriented:

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)

(37) Obligation:

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

U221(X1, mark(X2), 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.

(38) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U221(X1, mark(X2), X3, X4) → U221(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U221(x1, x2, x3, x4)  =  U221(x1, x2)
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  x1
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > mark1 > [U22^12, cons, s]
length > 0 > nil > mark1 > [U22^12, cons, s]
length > U11 > tt > U22 > U23 > mark1 > [U22^12, cons, s]
take > tt > U22 > U23 > mark1 > [U22^12, cons, s]
take > nil > mark1 > [U22^12, cons, s]


The following usable rules [FROCOS05] were oriented:

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)

(39) Obligation:

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

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.

(40) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U221(X1, X2, X3, mark(X4)) → U221(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U221(x1, x2, x3, x4)  =  x4
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  x1
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21(x1)
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > [mark1, U211] > cons > s
zeros > [mark1, U211] > 0 > nil > s
length > [tt, U22] > U12 > [mark1, U211] > cons > s
length > [tt, U22] > U12 > [mark1, U211] > 0 > nil > s
length > [tt, U22] > U23 > [mark1, U211] > cons > s
length > [tt, U22] > U23 > [mark1, U211] > 0 > nil > s
take > [tt, U22] > U12 > [mark1, U211] > cons > s
take > [tt, U22] > U12 > [mark1, U211] > 0 > nil > s
take > [tt, U22] > U23 > [mark1, U211] > cons > s
take > [tt, U22] > U23 > [mark1, U211] > 0 > nil > s


The following usable rules [FROCOS05] were oriented:

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)

(41) Obligation:

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

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.

(42) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U221(active(X1), X2, X3, X4) → U221(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U221(x1, x2, x3, x4)  =  x1
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length(x1)
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > cons > U11 > U12 > [mark1, s] > [active1, length1]
zeros > 0 > [mark1, s] > [active1, length1]
tt > take > U21 > U22 > U23 > cons > U11 > U12 > [mark1, s] > [active1, length1]
tt > take > nil > 0 > [mark1, s] > [active1, length1]


The following usable rules [FROCOS05] were oriented:

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)

(43) Obligation:

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

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.

(44) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U221(X1, active(X2), X3, X4) → U221(X1, X2, X3, X4)
U221(X1, X2, X3, active(X4)) → U221(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U221(x1, x2, x3, x4)  =  U221(x1, x2, x4)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
U22^13 > [cons, s, U23]
zeros > [active1, mark1] > [cons, s, U23]
[U21, U22, take] > nil > [0, U11, length] > tt > U12 > [active1, mark1] > [cons, s, U23]


The following usable rules [FROCOS05] were oriented:

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)

(45) Obligation:

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

U221(X1, X2, active(X3), 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.

(46) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U221(X1, X2, active(X3), X4) → U221(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U221(x1, x2, x3, x4)  =  U221(x1, x2, x3, x4)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21(x1)
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
U22^14 > nil
zeros > [mark1, cons] > active1 > 0 > nil
zeros > [mark1, cons] > active1 > U211 > nil
length > U11 > U12 > s > tt > U22 > U23 > [mark1, cons] > active1 > 0 > nil
length > U11 > U12 > s > tt > U22 > U23 > [mark1, cons] > active1 > U211 > nil
take > tt > U22 > U23 > [mark1, cons] > active1 > 0 > nil
take > tt > U22 > U23 > [mark1, cons] > active1 > U211 > nil


The following usable rules [FROCOS05] were oriented:

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)

(47) Obligation:

Q DP problem:
P is empty.
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.

(48) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(49) TRUE

(50) 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.

(51) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U211(X1, X2, mark(X3), X4) → U211(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U211(x1, x2, x3, x4)  =  U211(x3)
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  x1
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > cons > [U21^11, mark1]
length > 0 > nil > [U21^11, mark1]
length > U11 > tt > s > [U21^11, mark1]
length > U11 > tt > U23 > cons > [U21^11, mark1]
take > U21 > tt > s > [U21^11, mark1]
take > U21 > tt > U23 > cons > [U21^11, mark1]
take > nil > [U21^11, mark1]


The following usable rules [FROCOS05] were oriented:

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)

(52) 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, 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.

(53) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U211(mark(X1), X2, X3, X4) → U211(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U211(x1, x2, x3, x4)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  x1
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > [mark1, cons, s]
take > [tt, length] > [0, nil] > [mark1, cons, s]
take > [tt, length] > U11 > U12 > [mark1, cons, s]
take > [tt, length] > U22 > U23 > [mark1, cons, s]


The following usable rules [FROCOS05] were oriented:

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)

(54) Obligation:

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

U211(X1, mark(X2), 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.

(55) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U211(X1, mark(X2), X3, X4) → U211(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U211(x1, x2, x3, x4)  =  U211(x1, x2)
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  x1
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > mark1 > [U21^12, cons, s]
length > 0 > nil > mark1 > [U21^12, cons, s]
length > U11 > tt > U22 > U23 > mark1 > [U21^12, cons, s]
take > tt > U22 > U23 > mark1 > [U21^12, cons, s]
take > nil > mark1 > [U21^12, cons, s]


The following usable rules [FROCOS05] were oriented:

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)

(56) Obligation:

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

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.

(57) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U211(X1, X2, X3, mark(X4)) → U211(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U211(x1, x2, x3, x4)  =  x4
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  x1
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21(x1)
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > [mark1, U211] > cons > s
zeros > [mark1, U211] > 0 > nil > s
length > [tt, U22] > U12 > [mark1, U211] > cons > s
length > [tt, U22] > U12 > [mark1, U211] > 0 > nil > s
length > [tt, U22] > U23 > [mark1, U211] > cons > s
length > [tt, U22] > U23 > [mark1, U211] > 0 > nil > s
take > [tt, U22] > U12 > [mark1, U211] > cons > s
take > [tt, U22] > U12 > [mark1, U211] > 0 > nil > s
take > [tt, U22] > U23 > [mark1, U211] > cons > s
take > [tt, U22] > U23 > [mark1, U211] > 0 > nil > s


The following usable rules [FROCOS05] were oriented:

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)

(58) Obligation:

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

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.

(59) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U211(active(X1), X2, X3, X4) → U211(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U211(x1, x2, x3, x4)  =  x1
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length(x1)
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > cons > U11 > U12 > [mark1, s] > [active1, length1]
zeros > 0 > [mark1, s] > [active1, length1]
tt > take > U21 > U22 > U23 > cons > U11 > U12 > [mark1, s] > [active1, length1]
tt > take > nil > 0 > [mark1, s] > [active1, length1]


The following usable rules [FROCOS05] were oriented:

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)

(60) Obligation:

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

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.

(61) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U211(X1, active(X2), X3, X4) → U211(X1, X2, X3, X4)
U211(X1, X2, X3, active(X4)) → U211(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U211(x1, x2, x3, x4)  =  U211(x1, x2, x4)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
U21^13 > [cons, s, U23]
zeros > [active1, mark1] > [cons, s, U23]
[U21, U22, take] > nil > [0, U11, length] > tt > U12 > [active1, mark1] > [cons, s, U23]


The following usable rules [FROCOS05] were oriented:

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)

(62) Obligation:

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

U211(X1, X2, active(X3), 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.

(63) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U211(X1, X2, active(X3), X4) → U211(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U211(x1, x2, x3, x4)  =  U211(x1, x2, x3, x4)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21(x1)
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
U21^14 > nil
zeros > [mark1, cons] > active1 > 0 > nil
zeros > [mark1, cons] > active1 > U211 > nil
length > U11 > U12 > s > tt > U22 > U23 > [mark1, cons] > active1 > 0 > nil
length > U11 > U12 > s > tt > U22 > U23 > [mark1, cons] > active1 > U211 > nil
take > tt > U22 > U23 > [mark1, cons] > active1 > 0 > nil
take > tt > U22 > U23 > [mark1, cons] > active1 > U211 > nil


The following usable rules [FROCOS05] were oriented:

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)

(64) Obligation:

Q DP problem:
P is empty.
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.

(65) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(66) TRUE

(67) 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.

(68) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


LENGTH(mark(X)) → LENGTH(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
LENGTH(x1)  =  x1
active(x1)  =  x1
mark(x1)  =  mark(x1)
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  x1
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  x1
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > cons > tt > U12 > [mark1, s]
zeros > 0 > [mark1, s]
take > U21 > U22 > U23 > cons > tt > U12 > [mark1, s]
take > nil > 0 > [mark1, s]


The following usable rules [FROCOS05] were oriented:

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)

(69) Obligation:

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

LENGTH(active(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.

(70) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


LENGTH(active(X)) → LENGTH(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
LENGTH(x1)  =  x1
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take(x1, x2)
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > 0 > [mark1, cons, take2] > [active1, nil]
length > 0 > [mark1, cons, take2] > [active1, nil]
length > U11 > U12 > [tt, s] > U21 > U22 > U23 > [mark1, cons, take2] > [active1, nil]


The following usable rules [FROCOS05] were oriented:

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)

(71) Obligation:

Q DP problem:
P is empty.
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.

(72) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(73) TRUE

(74) 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.

(75) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


S(mark(X)) → S(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
S(x1)  =  x1
active(x1)  =  x1
mark(x1)  =  mark(x1)
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  x1
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  x1
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > cons > tt > U12 > [mark1, s]
zeros > 0 > [mark1, s]
take > U21 > U22 > U23 > cons > tt > U12 > [mark1, s]
take > nil > 0 > [mark1, s]


The following usable rules [FROCOS05] were oriented:

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)

(76) Obligation:

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

S(active(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.

(77) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


S(active(X)) → S(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
S(x1)  =  x1
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take(x1, x2)
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > 0 > [mark1, cons, take2] > [active1, nil]
length > 0 > [mark1, cons, take2] > [active1, nil]
length > U11 > U12 > [tt, s] > U21 > U22 > U23 > [mark1, cons, take2] > [active1, nil]


The following usable rules [FROCOS05] were oriented:

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)

(78) Obligation:

Q DP problem:
P is empty.
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.

(79) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(80) TRUE

(81) 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.

(82) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U121(X1, mark(X2)) → U121(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U121(x1, x2)  =  x2
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21(x1)
U22(x1, x2, x3, x4)  =  x1
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > cons > [mark1, U211] > nil
length > 0 > [mark1, U211] > nil
length > U11 > tt > s > [mark1, U211] > nil
length > U11 > tt > U23 > cons > [mark1, U211] > nil
take > tt > s > [mark1, U211] > nil
take > tt > U23 > cons > [mark1, U211] > nil


The following usable rules [FROCOS05] were oriented:

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)

(83) Obligation:

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

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.

(84) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U121(X1, active(X2)) → U121(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U121(x1, x2)  =  x2
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
zeros  =  zeros
cons(x1, x2)  =  x2
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
[mark1, active1] > zeros > [U12, s, U21, U22, U23, take, nil]
[mark1, active1] > length > 0 > [U12, s, U21, U22, U23, take, nil]
[mark1, active1] > length > U11 > [U12, s, U21, U22, U23, take, nil]
[mark1, active1] > length > tt > [U12, s, U21, U22, U23, take, nil]


The following usable rules [FROCOS05] were oriented:

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)

(85) Obligation:

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

U121(mark(X1), X2) → U121(X1, X2)
U121(active(X1), 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.

(86) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U121(mark(X1), X2) → U121(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U121(x1, x2)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  x1
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > 0 > nil > [mark1, cons]
length > 0 > nil > [mark1, cons]
length > U11 > tt > s > U21 > U22 > U23 > [mark1, cons]


The following usable rules [FROCOS05] were oriented:

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)

(87) Obligation:

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

U121(active(X1), 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.

(88) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U121(active(X1), X2) → U121(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U121(x1, x2)  =  U121(x1)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > 0 > [mark1, cons] > [U12^11, active1, nil]
length > 0 > [mark1, cons] > [U12^11, active1, nil]
length > U11 > U12 > [tt, s, U21] > U22 > U23 > [mark1, cons] > [U12^11, active1, nil]
take > [tt, s, U21] > U22 > U23 > [mark1, cons] > [U12^11, active1, nil]


The following usable rules [FROCOS05] were oriented:

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)

(89) Obligation:

Q DP problem:
P is empty.
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.

(90) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(91) TRUE

(92) 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.

(93) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U111(X1, mark(X2)) → U111(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U111(x1, x2)  =  x2
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21(x1)
U22(x1, x2, x3, x4)  =  x1
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > cons > [mark1, U211] > nil
length > 0 > [mark1, U211] > nil
length > U11 > tt > s > [mark1, U211] > nil
length > U11 > tt > U23 > cons > [mark1, U211] > nil
take > tt > s > [mark1, U211] > nil
take > tt > U23 > cons > [mark1, U211] > nil


The following usable rules [FROCOS05] were oriented:

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)

(94) Obligation:

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

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.

(95) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U111(X1, active(X2)) → U111(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U111(x1, x2)  =  x2
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
zeros  =  zeros
cons(x1, x2)  =  x2
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
[mark1, active1] > zeros > [U12, s, U21, U22, U23, take, nil]
[mark1, active1] > length > 0 > [U12, s, U21, U22, U23, take, nil]
[mark1, active1] > length > U11 > [U12, s, U21, U22, U23, take, nil]
[mark1, active1] > length > tt > [U12, s, U21, U22, U23, take, nil]


The following usable rules [FROCOS05] were oriented:

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)

(96) Obligation:

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

U111(mark(X1), X2) → U111(X1, X2)
U111(active(X1), 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.

(97) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U111(mark(X1), X2) → U111(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U111(x1, x2)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  x1
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > 0 > nil > [mark1, cons]
length > 0 > nil > [mark1, cons]
length > U11 > tt > s > U21 > U22 > U23 > [mark1, cons]


The following usable rules [FROCOS05] were oriented:

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)

(98) Obligation:

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

U111(active(X1), 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.

(99) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U111(active(X1), X2) → U111(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U111(x1, x2)  =  U111(x1)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > 0 > [mark1, cons] > [U11^11, active1, nil]
length > 0 > [mark1, cons] > [U11^11, active1, nil]
length > U11 > U12 > [tt, s, U21] > U22 > U23 > [mark1, cons] > [U11^11, active1, nil]
take > [tt, s, U21] > U22 > U23 > [mark1, cons] > [U11^11, active1, nil]


The following usable rules [FROCOS05] were oriented:

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)

(100) Obligation:

Q DP problem:
P is empty.
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.

(101) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(102) TRUE

(103) 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.

(104) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


CONS(X1, mark(X2)) → CONS(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
CONS(x1, x2)  =  x2
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21(x1)
U22(x1, x2, x3, x4)  =  x1
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > cons > [mark1, U211] > nil
length > 0 > [mark1, U211] > nil
length > U11 > tt > s > [mark1, U211] > nil
length > U11 > tt > U23 > cons > [mark1, U211] > nil
take > tt > s > [mark1, U211] > nil
take > tt > U23 > cons > [mark1, U211] > nil


The following usable rules [FROCOS05] were oriented:

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)

(105) Obligation:

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

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.

(106) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


CONS(X1, active(X2)) → CONS(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
CONS(x1, x2)  =  x2
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
zeros  =  zeros
cons(x1, x2)  =  x2
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
[mark1, active1] > zeros > [U12, s, U21, U22, U23, take, nil]
[mark1, active1] > length > 0 > [U12, s, U21, U22, U23, take, nil]
[mark1, active1] > length > U11 > [U12, s, U21, U22, U23, take, nil]
[mark1, active1] > length > tt > [U12, s, U21, U22, U23, take, nil]


The following usable rules [FROCOS05] were oriented:

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)

(107) Obligation:

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

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(active(X1), 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.

(108) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


CONS(mark(X1), X2) → CONS(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
CONS(x1, x2)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  x1
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  x1
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > 0 > nil > [mark1, cons]
length > 0 > nil > [mark1, cons]
length > U11 > tt > s > U21 > U22 > U23 > [mark1, cons]


The following usable rules [FROCOS05] were oriented:

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)

(109) Obligation:

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

CONS(active(X1), 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.

(110) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


CONS(active(X1), X2) → CONS(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
CONS(x1, x2)  =  CONS(x1)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Recursive Path Order [RPO].
Precedence:
zeros > 0 > [mark1, cons] > [CONS1, active1, nil]
length > 0 > [mark1, cons] > [CONS1, active1, nil]
length > U11 > U12 > [tt, s, U21] > U22 > U23 > [mark1, cons] > [CONS1, active1, nil]
take > [tt, s, U21] > U22 > U23 > [mark1, cons] > [CONS1, active1, nil]


The following usable rules [FROCOS05] were oriented:

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)

(111) Obligation:

Q DP problem:
P is empty.
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.

(112) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(113) TRUE

(114) 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.

(115) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  MARK
cons(x1, x2)  =  cons
ACTIVE(x1)  =  x1
mark(x1)  =  mark
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
zeros  =  zeros
0  =  0
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
active(x1)  =  active
nil  =  nil

Recursive Path Order [RPO].
Precedence:
[MARK, U11, U12, zeros, s, length, U21, U22, U23, take] > [mark, active] > tt > cons
[MARK, U11, U12, zeros, s, length, U21, U22, U23, take] > [mark, active] > 0 > nil


The following usable rules [FROCOS05] were oriented:

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)

(116) Obligation:

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

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.

(117) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MARK(s(X)) → ACTIVE(s(mark(X)))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ACTIVE(x1)  =  x1
U11(x1, x2)  =  U11
tt  =  tt
MARK(x1)  =  MARK
U12(x1, x2)  =  U12
cons(x1, x2)  =  cons
zeros  =  zeros
0  =  0
mark(x1)  =  mark
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
active(x1)  =  active
nil  =  nil

Recursive Path Order [RPO].
Precedence:
[U11, MARK, U12, cons, zeros, length, U21, U22, U23, take] > s > [tt, mark, active]
nil > 0 > [tt, mark, active]


The following usable rules [FROCOS05] were oriented:

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)

(118) Obligation:

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

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)
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.