(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(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)  =  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

Lexicographic Path Order [LPO].
Precedence:
zeros > cons > U11 > U12 > s > tt > mark1
zeros > 0 > nil > mark1
length > 0 > nil > mark1
length > U11 > U12 > s > tt > mark1
take > U21 > U22 > U23 > cons > U11 > U12 > s > tt > mark1
take > nil > 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)

(7) Obligation:

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

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.

(8) 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)  =  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

Lexicographic Path Order [LPO].
Precedence:
zeros > cons > U11 > U12 > s > mark1
zeros > 0 > mark1
take > U21 > U22 > tt > length > 0 > mark1
take > U21 > U22 > tt > length > U11 > U12 > s > mark1
take > U21 > U22 > U23 > cons > U11 > U12 > s > mark1
take > nil > 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)

(9) Obligation:

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

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.

(10) 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(x1)
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
zeros > mark1 > s > active1 > 0 > TAKE1
zeros > mark1 > U221 > active1 > 0 > TAKE1
zeros > cons > active1 > 0 > TAKE1
length > U11 > tt > U23 > mark1 > s > active1 > 0 > TAKE1
length > U11 > tt > U23 > mark1 > U221 > active1 > 0 > TAKE1
length > U11 > tt > U23 > cons > active1 > 0 > TAKE1
length > U11 > U12 > mark1 > s > active1 > 0 > TAKE1
length > U11 > U12 > mark1 > U221 > active1 > 0 > TAKE1
take > U21 > tt > U23 > mark1 > s > active1 > 0 > TAKE1
take > U21 > tt > U23 > mark1 > U221 > active1 > 0 > TAKE1
take > U21 > tt > U23 > cons > active1 > 0 > TAKE1
take > nil > active1 > 0 > TAKE1

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

(12) 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
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

Lexicographic Path Order [LPO].
Precedence:
zeros > 0 > nil > mark1 > cons > active1
zeros > 0 > nil > mark1 > cons > tt
zeros > 0 > nil > mark1 > s > active1
zeros > 0 > nil > mark1 > s > tt
length > 0 > nil > mark1 > cons > active1
length > 0 > nil > mark1 > cons > tt
length > 0 > nil > mark1 > s > active1
length > 0 > nil > mark1 > s > tt
length > U11 > U12 > mark1 > cons > active1
length > U11 > U12 > mark1 > cons > tt
length > U11 > U12 > mark1 > s > active1
length > U11 > U12 > mark1 > s > tt
take > U21 > U22 > U23 > mark1 > cons > active1
take > U21 > U22 > U23 > mark1 > cons > tt
take > U21 > U22 > U23 > mark1 > s > active1
take > U21 > U22 > U23 > mark1 > s > tt
take > nil > mark1 > cons > active1
take > nil > mark1 > cons > tt
take > nil > mark1 > s > active1
take > nil > mark1 > s > tt

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)  =  U12
s(x1)  =  s
length(x1)  =  x1
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  x1
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
U23^11 > s
zeros > cons > U11 > U12 > mark1 > s
zeros > 0 > mark1 > s
take > U21 > tt > U23 > cons > U11 > 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)

(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)  =  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

Lexicographic Path Order [LPO].
Precedence:
zeros > mark1 > 0
zeros > mark1 > nil
zeros > cons
length > U11 > tt > s > mark1 > 0
length > U11 > tt > s > mark1 > nil
length > U11 > tt > U23 > mark1 > 0
length > U11 > tt > U23 > mark1 > nil
length > U11 > tt > U23 > cons
take > U21 > tt > s > mark1 > 0
take > U21 > tt > s > mark1 > nil
take > U21 > tt > U23 > mark1 > 0
take > U21 > tt > U23 > mark1 > nil
take > U21 > tt > U23 > 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)

(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, 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)  =  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)  =  x1
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
zeros > mark1 > cons
zeros > mark1 > 0 > nil
zeros > mark1 > s
length > U11 > tt > mark1 > cons
length > U11 > tt > mark1 > 0 > nil
length > U11 > tt > mark1 > s
take > U21 > U22 > tt > mark1 > cons
take > U21 > U22 > tt > mark1 > 0 > nil
take > U21 > U22 > tt > 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)

(22) Obligation:

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

U231(X1, mark(X2), X3, 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, 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(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
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  x1
take(x1, x2)  =  take
nil  =  nil

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

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(X1, active(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(x2)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11(x1)
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

Lexicographic Path Order [LPO].
Precedence:
U23^11 > length1
zeros > cons > tt > U12 > mark1 > active1 > length1
zeros > cons > tt > U12 > mark1 > U111 > length1
zeros > cons > tt > U12 > s > active1 > length1
zeros > 0 > mark1 > active1 > length1
zeros > 0 > mark1 > U111 > length1
take > U21 > U22 > U23 > cons > tt > U12 > mark1 > active1 > length1
take > U21 > U22 > U23 > cons > tt > U12 > mark1 > U111 > length1
take > U21 > U22 > U23 > cons > tt > U12 > s > active1 > length1
take > nil > 0 > mark1 > active1 > length1
take > nil > 0 > mark1 > U111 > 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(active(X1), 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, 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(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

Lexicographic Path Order [LPO].
Precedence:
zeros > mark1 > s > active1 > 0
zeros > mark1 > nil > active1 > 0
zeros > cons > active1 > 0
tt > length > U11 > U12 > mark1 > s > active1 > 0
tt > length > U11 > U12 > mark1 > nil > active1 > 0
tt > take > U21 > U22 > U23 > mark1 > s > active1 > 0
tt > take > U21 > U22 > U23 > mark1 > nil > active1 > 0
tt > take > U21 > U22 > U23 > cons > active1 > 0

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(active(X1), X2, X3, X4) → U231(X1, X2, X3, X4)
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(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)  =  U231(x1)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11(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

Lexicographic Path Order [LPO].
Precedence:
U23^11 > active1
zeros > mark1 > cons > U211 > active1
zeros > mark1 > U111 > active1
zeros > mark1 > s > U211 > active1
zeros > mark1 > nil > 0 > active1
length > tt > U12 > mark1 > cons > U211 > active1
length > tt > U12 > mark1 > U111 > active1
length > tt > U12 > mark1 > s > U211 > active1
length > tt > U12 > mark1 > nil > 0 > active1
length > tt > U22 > U23 > mark1 > cons > U211 > active1
length > tt > U22 > U23 > mark1 > U111 > active1
length > tt > U22 > U23 > mark1 > s > U211 > active1
length > tt > U22 > U23 > mark1 > nil > 0 > active1
take > tt > U12 > mark1 > cons > U211 > active1
take > tt > U12 > mark1 > U111 > active1
take > tt > U12 > mark1 > s > U211 > active1
take > tt > U12 > mark1 > nil > 0 > active1
take > tt > U22 > U23 > mark1 > cons > U211 > active1
take > tt > U22 > U23 > mark1 > U111 > active1
take > tt > U22 > U23 > mark1 > s > U211 > active1
take > tt > U22 > U23 > mark1 > nil > 0 > active1

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

(31) 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, x3)
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

Lexicographic Path Order [LPO].
Precedence:
zeros > cons > active1 > U23^12
zeros > 0 > mark1 > active1 > U23^12
zeros > 0 > mark1 > nil > U23^12
length > 0 > mark1 > active1 > U23^12
length > 0 > mark1 > nil > U23^12
length > U11 > tt > s > mark1 > active1 > U23^12
length > U11 > tt > s > mark1 > nil > U23^12
length > U11 > tt > U23 > mark1 > active1 > U23^12
length > U11 > tt > U23 > mark1 > nil > U23^12
length > U11 > tt > U23 > cons > active1 > U23^12
length > U11 > U12 > s > mark1 > active1 > U23^12
length > U11 > U12 > s > mark1 > nil > U23^12
take > U21 > tt > s > mark1 > active1 > U23^12
take > U21 > tt > s > mark1 > nil > U23^12
take > U21 > tt > U23 > mark1 > active1 > U23^12
take > U21 > tt > U23 > mark1 > nil > U23^12
take > U21 > tt > U23 > cons > active1 > U23^12
take > U21 > U22 > U23 > mark1 > active1 > U23^12
take > U21 > U22 > U23 > mark1 > nil > U23^12
take > U21 > U22 > U23 > cons > active1 > U23^12

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)

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

(33) PisEmptyProof (EQUIVALENT transformation)

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

(34) TRUE

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

(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(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

Lexicographic Path Order [LPO].
Precedence:
zeros > mark1 > cons > U211
zeros > mark1 > U111
zeros > mark1 > s > U211
length > 0 > nil > mark1 > cons > U211
length > 0 > nil > mark1 > U111
length > 0 > nil > mark1 > s > U211
length > tt > U12 > mark1 > cons > U211
length > tt > U12 > mark1 > U111
length > tt > U12 > mark1 > s > U211
length > tt > U22 > U23 > mark1 > cons > U211
length > tt > U22 > U23 > mark1 > U111
length > tt > U22 > U23 > mark1 > s > U211
take > tt > U12 > mark1 > cons > U211
take > tt > U12 > mark1 > U111
take > tt > U12 > mark1 > s > U211
take > tt > U22 > U23 > mark1 > cons > U211
take > tt > U22 > U23 > mark1 > U111
take > tt > U22 > U23 > mark1 > s > U211
take > nil > mark1 > cons > U211
take > nil > mark1 > U111
take > nil > mark1 > s > U211

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

(38) 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)  =  U221(x1)
mark(x1)  =  mark(x1)
active(x1)  =  active(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)  =  U21
U22(x1, x2, x3, x4)  =  U22(x1)
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

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

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, 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(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, 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)  =  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)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22(x1)
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  x1
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
zeros > mark1 > U221
zeros > cons > U221
length > 0 > nil > mark1 > U221
length > U11 > U12 > s > U21 > tt > U23 > mark1 > U221
length > U11 > U12 > s > U21 > tt > U23 > cons > U221

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(X1, mark(X2), X3, X4) → U221(X1, X2, X3, X4)
U221(X1, X2, X3, mark(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(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)  =  x3
mark(x1)  =  mark(x1)
active(x1)  =  active(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)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
zeros > mark1 > active1
zeros > cons > active1
length > 0 > mark1 > active1
length > U11 > U12 > mark1 > active1
length > U11 > U12 > s > active1
length > tt > U12 > mark1 > active1
length > tt > U12 > s > active1
length > tt > U23 > mark1 > active1
length > tt > U23 > cons > active1
take > U21 > U22 > tt > U12 > mark1 > active1
take > U21 > U22 > tt > U12 > s > active1
take > U21 > U22 > tt > U23 > mark1 > active1
take > U21 > U22 > tt > U23 > cons > active1
take > nil > 0 > mark1 > active1

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, mark(X2), X3, X4) → U221(X1, X2, X3, X4)
U221(X1, X2, X3, mark(X4)) → U221(X1, X2, X3, X4)
U221(X1, active(X2), 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, 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(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)  =  U12
s(x1)  =  s
length(x1)  =  length(x1)
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  x1
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
zeros > cons > U11 > U12 > mark1 > U22^11 > s
zeros > cons > U11 > U12 > mark1 > length1 > 0 > s
take > U21 > tt > U23 > cons > U11 > U12 > mark1 > U22^11 > s
take > U21 > tt > U23 > cons > U11 > U12 > mark1 > length1 > 0 > s
take > nil > mark1 > U22^11 > s
take > nil > mark1 > length1 > 0 > 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)

(45) Obligation:

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

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

(46) 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)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  x1
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  x1
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
zeros > cons > U11 > U12 > s > mark1
zeros > 0 > mark1
take > U21 > tt > U23 > cons > U11 > U12 > s > mark1
take > nil > 0 > 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)

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

(48) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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)  =  x4
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11(x1)
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22(x1)
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
zeros > mark1 > U111 > active1 > cons > nil
zeros > mark1 > U111 > active1 > 0 > nil
zeros > mark1 > U111 > active1 > U221 > nil
zeros > mark1 > s > nil
length > tt > U12 > mark1 > U111 > active1 > cons > nil
length > tt > U12 > mark1 > U111 > active1 > 0 > nil
length > tt > U12 > mark1 > U111 > active1 > U221 > nil
length > tt > U12 > mark1 > s > nil
length > tt > U23 > mark1 > U111 > active1 > cons > nil
length > tt > U23 > mark1 > U111 > active1 > 0 > nil
length > tt > U23 > mark1 > U111 > active1 > U221 > nil
length > tt > U23 > mark1 > s > nil
take > U21 > tt > U12 > mark1 > U111 > active1 > cons > nil
take > U21 > tt > U12 > mark1 > U111 > active1 > 0 > nil
take > U21 > tt > U12 > mark1 > U111 > active1 > U221 > nil
take > U21 > tt > U12 > mark1 > s > nil
take > U21 > tt > U23 > mark1 > U111 > active1 > cons > nil
take > U21 > tt > U23 > mark1 > U111 > active1 > 0 > nil
take > U21 > tt > U23 > mark1 > U111 > active1 > U221 > nil
take > U21 > tt > U23 > mark1 > s > 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)

(49) Obligation:

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

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

(50) 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)
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(x2, x3)
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

Lexicographic Path Order [LPO].
Precedence:
U22^12 > active1
zeros > mark1 > active1
zeros > cons > active1
length > 0 > mark1 > active1
length > 0 > nil > active1
length > U11 > U12 > s > U21 > U22 > tt > mark1 > active1
length > U11 > U12 > s > U21 > U22 > tt > cons > active1
length > U11 > U12 > s > U21 > U22 > U23 > mark1 > active1
length > U11 > U12 > s > U21 > U22 > U23 > cons > active1
take > U21 > U22 > tt > mark1 > active1
take > U21 > U22 > tt > cons > active1
take > U21 > U22 > U23 > mark1 > active1
take > U21 > U22 > U23 > cons > active1
take > nil > active1

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)

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

(52) PisEmptyProof (EQUIVALENT transformation)

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

(53) TRUE

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

(55) 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)  =  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

Lexicographic Path Order [LPO].
Precedence:
zeros > mark1 > U21^11 > s
zeros > mark1 > 0 > s
zeros > cons > s
length > U11 > tt > U12 > mark1 > U21^11 > s
length > U11 > tt > U12 > mark1 > 0 > s
length > U11 > tt > U22 > U23 > mark1 > U21^11 > s
length > U11 > tt > U22 > U23 > mark1 > 0 > s
length > U11 > tt > U22 > U23 > cons > s
take > tt > U12 > mark1 > U21^11 > s
take > tt > U12 > mark1 > 0 > s
take > tt > U22 > U23 > mark1 > U21^11 > s
take > tt > U22 > U23 > mark1 > 0 > s
take > tt > U22 > U23 > cons > s
take > nil > mark1 > U21^11 > s
take > nil > mark1 > 0 > 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, 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.

(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)
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(x4)
mark(x1)  =  mark(x1)
active(x1)  =  active(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)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
zeros > 0 > mark1 > active1 > nil
zeros > 0 > mark1 > cons
length > 0 > mark1 > active1 > nil
length > 0 > mark1 > cons
length > U11 > tt > mark1 > active1 > nil
length > U11 > tt > mark1 > cons
length > U11 > tt > s > active1 > nil
length > U11 > U12 > mark1 > active1 > nil
length > U11 > U12 > mark1 > cons
length > U11 > U12 > s > active1 > nil
take > U21 > U22 > tt > mark1 > active1 > nil
take > U21 > U22 > tt > mark1 > cons
take > U21 > U22 > tt > s > active1 > nil
take > U21 > U22 > U23 > mark1 > active1 > nil
take > 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)

(58) 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(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)

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(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(x2, 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)  =  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

Lexicographic Path Order [LPO].
Precedence:
zeros > mark1 > nil > 0 > U21^12
zeros > cons > U21^12
length > U11 > U12 > mark1 > nil > 0 > U21^12
length > U11 > U12 > s > U21^12
take > tt > U12 > mark1 > nil > 0 > U21^12
take > tt > U12 > s > U21^12
take > tt > U22 > U23 > mark1 > nil > 0 > U21^12
take > tt > U22 > U23 > cons > U21^12

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

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)
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(x2)
mark(x1)  =  mark(x1)
active(x1)  =  active(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)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

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

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(mark(X1), X2, X3, X4) → U211(X1, X2, X3, X4)
U211(active(X1), X2, X3, X4) → U211(X1, X2, X3, X4)
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(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)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
zeros > mark1 > cons
zeros > mark1 > 0
zeros > mark1 > s
length > U11 > U12 > mark1 > cons
length > U11 > U12 > mark1 > 0
length > U11 > U12 > mark1 > s
length > tt > U12 > mark1 > cons
length > tt > U12 > mark1 > 0
length > tt > U12 > mark1 > s
length > tt > take > U21 > U22 > U23 > mark1 > cons
length > tt > take > U21 > U22 > U23 > mark1 > 0
length > tt > take > U21 > U22 > U23 > mark1 > s
length > tt > take > nil > mark1 > cons
length > tt > take > nil > mark1 > 0
length > tt > take > nil > 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)

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

(65) 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(x3)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11(x1)
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

Lexicographic Path Order [LPO].
Precedence:
U21^11 > nil
zeros > 0 > mark1 > cons > active1 > U111 > nil
zeros > 0 > mark1 > s > nil
length > 0 > mark1 > cons > active1 > U111 > nil
length > 0 > mark1 > s > nil
length > tt > U12 > mark1 > cons > active1 > U111 > nil
length > tt > U12 > mark1 > s > nil
length > tt > U22 > U23 > mark1 > cons > active1 > U111 > nil
length > tt > U22 > U23 > mark1 > s > nil
take > U21 > U22 > U23 > mark1 > cons > active1 > U111 > nil
take > U21 > U22 > U23 > mark1 > s > 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)

(66) Obligation:

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

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

(67) 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)  =  U211(x1, x2)
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

Lexicographic Path Order [LPO].
Precedence:
U21^12 > active1
zeros > mark1 > 0 > active1
zeros > cons > active1
length > U11 > U12 > s > U21 > U22 > tt > mark1 > 0 > active1
length > U11 > U12 > s > U21 > U22 > tt > cons > active1
length > U11 > U12 > s > U21 > U22 > U23 > mark1 > 0 > active1
length > U11 > U12 > s > U21 > U22 > U23 > cons > active1
take > U21 > U22 > tt > mark1 > 0 > active1
take > U21 > U22 > tt > cons > active1
take > U21 > U22 > U23 > mark1 > 0 > active1
take > U21 > U22 > U23 > cons > active1
take > nil > 0 > active1

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)

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

(69) PisEmptyProof (EQUIVALENT transformation)

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

(70) TRUE

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

(72) 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)
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)  =  active(x1)
mark(x1)  =  mark(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(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

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

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)

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

(74) PisEmptyProof (EQUIVALENT transformation)

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

(75) TRUE

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

(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)
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)  =  active(x1)
mark(x1)  =  mark(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(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

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

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(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)  =  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

Lexicographic Path Order [LPO].
Precedence:
zeros > cons > U11 > U12 > s > tt > mark1
zeros > 0 > nil > mark1
length > 0 > nil > mark1
length > U11 > U12 > s > tt > mark1
take > U21 > U22 > U23 > cons > U11 > U12 > s > tt > mark1
take > nil > 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)

(83) Obligation:

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

U121(X1, mark(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, 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)  =  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

Lexicographic Path Order [LPO].
Precedence:
zeros > cons > U11 > U12 > s > mark1
zeros > 0 > mark1
take > U21 > U22 > tt > length > 0 > mark1
take > U21 > U22 > tt > length > U11 > U12 > s > mark1
take > U21 > U22 > U23 > cons > U11 > U12 > s > mark1
take > nil > 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)

(85) Obligation:

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

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.

(86) 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(x1)
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
zeros > mark1 > s > active1 > 0 > U12^11
zeros > mark1 > U221 > active1 > 0 > U12^11
zeros > cons > active1 > 0 > U12^11
length > U11 > tt > U23 > mark1 > s > active1 > 0 > U12^11
length > U11 > tt > U23 > mark1 > U221 > active1 > 0 > U12^11
length > U11 > tt > U23 > cons > active1 > 0 > U12^11
length > U11 > U12 > mark1 > s > active1 > 0 > U12^11
length > U11 > U12 > mark1 > U221 > active1 > 0 > U12^11
take > U21 > tt > U23 > mark1 > s > active1 > 0 > U12^11
take > U21 > tt > U23 > mark1 > U221 > active1 > 0 > U12^11
take > U21 > tt > U23 > cons > active1 > 0 > U12^11
take > nil > active1 > 0 > U12^11

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

(88) 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
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

Lexicographic Path Order [LPO].
Precedence:
zeros > 0 > nil > mark1 > cons > active1
zeros > 0 > nil > mark1 > cons > tt
zeros > 0 > nil > mark1 > s > active1
zeros > 0 > nil > mark1 > s > tt
length > 0 > nil > mark1 > cons > active1
length > 0 > nil > mark1 > cons > tt
length > 0 > nil > mark1 > s > active1
length > 0 > nil > mark1 > s > tt
length > U11 > U12 > mark1 > cons > active1
length > U11 > U12 > mark1 > cons > tt
length > U11 > U12 > mark1 > s > active1
length > U11 > U12 > mark1 > s > tt
take > U21 > U22 > U23 > mark1 > cons > active1
take > U21 > U22 > U23 > mark1 > cons > tt
take > U21 > U22 > U23 > mark1 > s > active1
take > U21 > U22 > U23 > mark1 > s > tt
take > nil > mark1 > cons > active1
take > nil > mark1 > cons > tt
take > nil > mark1 > s > active1
take > nil > mark1 > s > tt

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(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)  =  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

Lexicographic Path Order [LPO].
Precedence:
zeros > cons > U11 > U12 > s > tt > mark1
zeros > 0 > nil > mark1
length > 0 > nil > mark1
length > U11 > U12 > s > tt > mark1
take > U21 > U22 > U23 > cons > U11 > U12 > s > tt > mark1
take > nil > 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)

(94) Obligation:

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

U111(X1, mark(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, 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)  =  U12
s(x1)  =  s
length(x1)  =  x1
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  x1
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
zeros > cons > U11 > U12 > s > mark1
zeros > 0 > mark1
take > U21 > tt > U23 > cons > U11 > U12 > s > mark1
take > nil > 0 > 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)

(96) Obligation:

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

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.

(97) 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(x1)
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
zeros > mark1 > s > active1 > 0 > U11^11
zeros > mark1 > U221 > active1 > 0 > U11^11
zeros > cons > active1 > 0 > U11^11
length > U11 > tt > U23 > mark1 > s > active1 > 0 > U11^11
length > U11 > tt > U23 > mark1 > U221 > active1 > 0 > U11^11
length > U11 > tt > U23 > cons > active1 > 0 > U11^11
length > U11 > U12 > mark1 > s > active1 > 0 > U11^11
length > U11 > U12 > mark1 > U221 > active1 > 0 > U11^11
take > U21 > tt > U23 > mark1 > s > active1 > 0 > U11^11
take > U21 > tt > U23 > mark1 > U221 > active1 > 0 > U11^11
take > U21 > tt > U23 > cons > active1 > 0 > U11^11
take > nil > active1 > 0 > U11^11

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

(99) 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
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

Lexicographic Path Order [LPO].
Precedence:
zeros > 0 > nil > mark1 > cons > active1
zeros > 0 > nil > mark1 > cons > tt
zeros > 0 > nil > mark1 > s > active1
zeros > 0 > nil > mark1 > s > tt
length > 0 > nil > mark1 > cons > active1
length > 0 > nil > mark1 > cons > tt
length > 0 > nil > mark1 > s > active1
length > 0 > nil > mark1 > s > tt
length > U11 > U12 > mark1 > cons > active1
length > U11 > U12 > mark1 > cons > tt
length > U11 > U12 > mark1 > s > active1
length > U11 > U12 > mark1 > s > tt
take > U21 > U22 > U23 > mark1 > cons > active1
take > U21 > U22 > U23 > mark1 > cons > tt
take > U21 > U22 > U23 > mark1 > s > active1
take > U21 > U22 > U23 > mark1 > s > tt
take > nil > mark1 > cons > active1
take > nil > mark1 > cons > tt
take > nil > mark1 > s > active1
take > nil > mark1 > s > tt

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(mark(X1), X2) → CONS(X1, X2)
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)
mark(x1)  =  mark(x1)
active(x1)  =  active(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)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23(x1)
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
CONS1 > nil
zeros > cons > mark1 > active1 > nil
zeros > cons > mark1 > U231 > nil
length > 0 > mark1 > active1 > nil
length > 0 > mark1 > U231 > nil
length > U11 > tt > cons > mark1 > active1 > nil
length > U11 > tt > cons > mark1 > U231 > nil
length > U11 > U12 > s > mark1 > active1 > nil
length > U11 > U12 > s > mark1 > U231 > nil
take > U21 > U22 > tt > cons > mark1 > active1 > nil
take > U21 > U22 > tt > cons > mark1 > U231 > 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(X1, mark(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, 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)  =  CONS(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)  =  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

Lexicographic Path Order [LPO].
Precedence:
zeros > cons > U11 > U12 > mark1
zeros > cons > U11 > U12 > s
zeros > 0 > nil > mark1
length > 0 > nil > mark1
length > tt > U22 > U23 > cons > U11 > U12 > mark1
length > tt > U22 > U23 > cons > U11 > U12 > s
take > tt > U22 > U23 > cons > U11 > U12 > mark1
take > tt > U22 > U23 > cons > U11 > U12 > s
take > nil > 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)

(107) Obligation:

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

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.

(108) 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)  =  CONS(x2)
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(x1)
take(x1, x2)  =  take
nil  =  nil

Lexicographic Path Order [LPO].
Precedence:
CONS1 > cons
zeros > mark1 > active1 > s > cons
zeros > mark1 > active1 > U231 > cons
zeros > mark1 > active1 > nil > cons
zeros > 0 > active1 > s > cons
zeros > 0 > active1 > U231 > cons
zeros > 0 > active1 > nil > cons
length > 0 > active1 > s > cons
length > 0 > active1 > U231 > cons
length > 0 > active1 > nil > cons
length > U11 > tt > mark1 > active1 > s > cons
length > U11 > tt > mark1 > active1 > U231 > cons
length > U11 > tt > mark1 > active1 > nil > cons
length > U11 > U12 > mark1 > active1 > s > cons
length > U11 > U12 > mark1 > active1 > U231 > cons
length > U11 > U12 > mark1 > active1 > nil > cons
take > U21 > U22 > tt > mark1 > active1 > s > cons
take > U21 > U22 > tt > mark1 > active1 > U231 > cons
take > U21 > U22 > tt > mark1 > active1 > nil > 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:
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.

(110) PisEmptyProof (EQUIVALENT transformation)

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

(111) TRUE

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