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

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

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

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

(9) Obligation:

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

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

The TRS R consists of the following rules:

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

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

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

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


The following usable rules [FROCOS05] were oriented:

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

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

(12) PisEmptyProof (EQUIVALENT transformation)

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

(13) TRUE

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

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

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

(16) Obligation:

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

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

Recursive Path Order [RPO].
Precedence:
U23^12 > [mark1, cons, U111, s, U221, nil]
zeros > 0 > [mark1, cons, U111, s, U221, nil]
length > 0 > [mark1, cons, U111, s, U221, nil]
length > [tt, U23] > [mark1, cons, U111, s, U221, nil]
take > U21 > [tt, U23] > [mark1, cons, U111, s, U221, 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)

(18) Obligation:

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

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

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


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

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

Recursive Path Order [RPO].
Precedence:
zeros > [mark1, U111, U221] > cons
zeros > [mark1, U111, U221] > [0, nil]
zeros > [mark1, U111, U221] > s
length > [tt, U12] > U23 > [mark1, U111, U221] > cons
length > [tt, U12] > U23 > [mark1, U111, U221] > [0, nil]
length > [tt, U12] > U23 > [mark1, U111, U221] > s
take > U21 > [tt, U12] > U23 > [mark1, U111, U221] > cons
take > U21 > [tt, U12] > U23 > [mark1, U111, U221] > [0, nil]
take > U21 > [tt, U12] > U23 > [mark1, U111, U221] > 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(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.

(23) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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

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

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

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

(26) Obligation:

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

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

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

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

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

(29) PisEmptyProof (EQUIVALENT transformation)

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

(30) TRUE

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

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

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

(33) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(34) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
U22^12 > [mark1, cons, U111, s, U221, nil]
zeros > 0 > [mark1, cons, U111, s, U221, nil]
length > 0 > [mark1, cons, U111, s, U221, nil]
length > [tt, U23] > [mark1, cons, U111, s, U221, nil]
take > U21 > [tt, U23] > [mark1, cons, U111, s, U221, 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)

(35) Obligation:

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

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, 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(X1, X2, mark(X3), X4) → U221(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U221(x1, x2, x3, x4)  =  U221(x3)
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11(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(x1, x2)
nil  =  nil

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


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

The TRS R consists of the following rules:

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

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

(38) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U221(X1, 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(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

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


The following usable rules [FROCOS05] were oriented:

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

(39) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(40) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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

(41) Obligation:

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

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

The TRS R consists of the following rules:

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

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

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

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

(43) Obligation:

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

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

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

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

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

(46) PisEmptyProof (EQUIVALENT transformation)

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

(47) TRUE

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

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

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

(50) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(51) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
U21^12 > [mark1, cons, U111, s, U221, nil]
zeros > 0 > [mark1, cons, U111, s, U221, nil]
length > 0 > [mark1, cons, U111, s, U221, nil]
length > [tt, U23] > [mark1, cons, U111, s, U221, nil]
take > U21 > [tt, U23] > [mark1, cons, U111, s, U221, 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)

(52) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(53) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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


The following usable rules [FROCOS05] were oriented:

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

(54) Obligation:

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

U211(X1, X2, X3, mark(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)
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, X3, mark(X4)) → U211(X1, X2, X3, X4)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
U211(x1, x2, x3, x4)  =  x4
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  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

Recursive Path Order [RPO].
Precedence:
zeros > [mark1, U111, U221] > cons
zeros > [mark1, U111, U221] > [0, nil]
zeros > [mark1, U111, U221] > s
length > [tt, U12] > U23 > [mark1, U111, U221] > cons
length > [tt, U12] > U23 > [mark1, U111, U221] > [0, nil]
length > [tt, U12] > U23 > [mark1, U111, U221] > s
take > U21 > [tt, U12] > U23 > [mark1, U111, U221] > cons
take > U21 > [tt, U12] > U23 > [mark1, U111, U221] > [0, nil]
take > U21 > [tt, U12] > U23 > [mark1, U111, U221] > 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(active(X1), 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, 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)
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark(x1)
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  U12
s(x1)  =  s
length(x1)  =  length
U21(x1, x2, x3, x4)  =  U21
U22(x1, x2, x3, x4)  =  U22
U23(x1, x2, x3, x4)  =  U23
take(x1, x2)  =  take
nil  =  nil

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

(58) Obligation:

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

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

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

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

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

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

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

(63) PisEmptyProof (EQUIVALENT transformation)

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

(64) TRUE

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

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

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


The following usable rules [FROCOS05] were oriented:

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

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

(68) PisEmptyProof (EQUIVALENT transformation)

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

(69) TRUE

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

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

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


The following usable rules [FROCOS05] were oriented:

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

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

(73) PisEmptyProof (EQUIVALENT transformation)

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

(74) TRUE

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

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

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

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

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

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

(79) Obligation:

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

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

The TRS R consists of the following rules:

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

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

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

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


The following usable rules [FROCOS05] were oriented:

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

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

(82) PisEmptyProof (EQUIVALENT transformation)

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

(83) TRUE

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

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

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

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

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

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

(88) Obligation:

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

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

The TRS R consists of the following rules:

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

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

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

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


The following usable rules [FROCOS05] were oriented:

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

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

(91) PisEmptyProof (EQUIVALENT transformation)

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

(92) TRUE

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

(94) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


CONS(mark(X1), X2) → CONS(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
CONS(x1, x2)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  x1
zeros  =  zeros
cons(x1, x2)  =  cons
0  =  0
U11(x1, x2)  =  U11
tt  =  tt
U12(x1, x2)  =  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

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

(95) Obligation:

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

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

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

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

(97) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(98) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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


The following usable rules [FROCOS05] were oriented:

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

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

(100) PisEmptyProof (EQUIVALENT transformation)

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

(101) TRUE

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

(103) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
[MARK, U11, U12, zeros, 0, s, length, U21, U22, U23, take, nil] > [cons, 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)

(104) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(105) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
[U11, tt, MARK, U12, cons, zeros, length, U21, U22, U23, take] > s
[U11, tt, MARK, U12, cons, zeros, length, U21, U22, U23, take] > nil > 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)

(106) Obligation:

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

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

The TRS R consists of the following rules:

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

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