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

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) → CONS(0, zeros)
ACTIVE(U11(tt, L)) → U121(tt, L)
ACTIVE(U12(tt, L)) → S(length(L))
ACTIVE(U12(tt, L)) → LENGTH(L)
ACTIVE(U21(tt, IL, M, N)) → U221(tt, IL, M, N)
ACTIVE(U22(tt, IL, M, N)) → U231(tt, IL, M, N)
ACTIVE(U23(tt, IL, M, N)) → CONS(N, take(M, IL))
ACTIVE(U23(tt, IL, M, N)) → TAKE(M, IL)
ACTIVE(length(cons(N, L))) → U111(tt, L)
ACTIVE(take(s(M), cons(N, IL))) → U211(tt, IL, M, N)
ACTIVE(cons(X1, X2)) → CONS(active(X1), X2)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(U11(X1, X2)) → U111(active(X1), X2)
ACTIVE(U11(X1, X2)) → ACTIVE(X1)
ACTIVE(U12(X1, X2)) → U121(active(X1), X2)
ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(s(X)) → S(active(X))
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(length(X)) → LENGTH(active(X))
ACTIVE(length(X)) → ACTIVE(X)
ACTIVE(U21(X1, X2, X3, X4)) → U211(active(X1), X2, X3, X4)
ACTIVE(U21(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(U22(X1, X2, X3, X4)) → U221(active(X1), X2, X3, X4)
ACTIVE(U22(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(U23(X1, X2, X3, X4)) → U231(active(X1), X2, X3, X4)
ACTIVE(U23(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → TAKE(active(X1), X2)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → TAKE(X1, active(X2))
ACTIVE(take(X1, X2)) → ACTIVE(X2)
CONS(mark(X1), X2) → CONS(X1, X2)
U111(mark(X1), X2) → U111(X1, X2)
U121(mark(X1), X2) → U121(X1, X2)
S(mark(X)) → S(X)
LENGTH(mark(X)) → LENGTH(X)
U211(mark(X1), X2, X3, X4) → U211(X1, X2, X3, X4)
U221(mark(X1), X2, X3, X4) → U221(X1, X2, X3, X4)
U231(mark(X1), X2, X3, X4) → U231(X1, X2, X3, X4)
TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(X1, mark(X2)) → TAKE(X1, X2)
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(U11(X1, X2)) → U111(proper(X1), proper(X2))
PROPER(U11(X1, X2)) → PROPER(X1)
PROPER(U11(X1, X2)) → PROPER(X2)
PROPER(U12(X1, X2)) → U121(proper(X1), proper(X2))
PROPER(U12(X1, X2)) → PROPER(X1)
PROPER(U12(X1, X2)) → PROPER(X2)
PROPER(s(X)) → S(proper(X))
PROPER(s(X)) → PROPER(X)
PROPER(length(X)) → LENGTH(proper(X))
PROPER(length(X)) → PROPER(X)
PROPER(U21(X1, X2, X3, X4)) → U211(proper(X1), proper(X2), proper(X3), proper(X4))
PROPER(U21(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U21(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U21(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U21(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U22(X1, X2, X3, X4)) → U221(proper(X1), proper(X2), proper(X3), proper(X4))
PROPER(U22(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U22(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U22(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U22(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U23(X1, X2, X3, X4)) → U231(proper(X1), proper(X2), proper(X3), proper(X4))
PROPER(U23(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U23(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U23(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U23(X1, X2, X3, X4)) → PROPER(X4)
PROPER(take(X1, X2)) → TAKE(proper(X1), proper(X2))
PROPER(take(X1, X2)) → PROPER(X1)
PROPER(take(X1, X2)) → PROPER(X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
U111(ok(X1), ok(X2)) → U111(X1, X2)
U121(ok(X1), ok(X2)) → U121(X1, X2)
S(ok(X)) → S(X)
LENGTH(ok(X)) → LENGTH(X)
U211(ok(X1), ok(X2), ok(X3), ok(X4)) → U211(X1, X2, X3, X4)
U221(ok(X1), ok(X2), ok(X3), ok(X4)) → U221(X1, X2, X3, X4)
U231(ok(X1), ok(X2), ok(X3), ok(X4)) → U231(X1, X2, X3, X4)
TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)
TOP(mark(X)) → TOP(proper(X))
TOP(mark(X)) → PROPER(X)
TOP(ok(X)) → TOP(active(X))
TOP(ok(X)) → ACTIVE(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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 12 SCCs with 31 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(ok(X1), ok(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

Lexicographic Path Order [LPO].
Precedence:
TAKE1 > tt
[0, nil] > [ok1, active1, cons1, U111, U121, length1, U211, U231, proper1] > zeros > tt
top > [ok1, active1, cons1, U111, U121, length1, U211, U231, proper1] > zeros > 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

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

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

Lexicographic Path Order [LPO].
Precedence:
[active1, U122] > [cons2, U112] > U214 > mark1 > top
[active1, U122] > [cons2, U112] > U214 > [zeros, tt, ok]
[active1, U122] > U224 > U234 > mark1 > top
[active1, U122] > U224 > U234 > [zeros, tt, ok]
[active1, U122] > take2 > U214 > mark1 > top
[active1, U122] > take2 > U214 > [zeros, tt, ok]
[active1, U122] > take2 > nil > 0 > mark1 > top
[active1, U122] > take2 > nil > 0 > [zeros, tt, ok]


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

(9) Obligation:

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

TAKE(X1, mark(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

Lexicographic Path Order [LPO].
Precedence:
[active1, U214, nil] > [cons2, U224, U234, take2] > mark1 > top
[active1, U214, nil] > [cons2, U224, U234, take2] > tt
[active1, U214, nil] > 0
[active1, U214, nil] > [U112, U122] > mark1 > top
[active1, U214, nil] > [U112, U122] > tt
zeros > [cons2, U224, U234, take2] > mark1 > top
zeros > [cons2, U224, U234, take2] > tt
zeros > 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

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(ok(X1), ok(X2), ok(X3), ok(X4)) → U231(X1, X2, X3, X4)
U231(mark(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

Lexicographic Path Order [LPO].
Precedence:
U23^11 > [mark, 0, nil]
proper > [ok1, top] > [mark, 0, nil]
proper > zeros > [mark, 0, nil]
proper > tt > [mark, 0, nil]


The following usable rules [FROCOS05] were oriented:

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

(16) Obligation:

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

U231(mark(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

Lexicographic Path Order [LPO].
Precedence:
[active1, take2, proper1, top] > zeros > [mark1, 0, tt, ok1] > nil
[active1, take2, proper1, top] > cons2 > [mark1, 0, tt, ok1] > nil
[active1, take2, proper1, top] > [U122, length1] > U112 > [mark1, 0, tt, ok1] > nil
[active1, take2, proper1, top] > [U214, U224] > U234 > [mark1, 0, tt, ok1] > 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(18) 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(19) PisEmptyProof (EQUIVALENT transformation)

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

(20) TRUE

(21) Obligation:

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

U221(ok(X1), ok(X2), ok(X3), ok(X4)) → U221(X1, X2, X3, X4)
U221(mark(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(22) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic Path Order [LPO].
Precedence:
U22^11 > [mark, 0, nil]
proper > [ok1, top] > [mark, 0, nil]
proper > zeros > [mark, 0, nil]
proper > tt > [mark, 0, nil]


The following usable rules [FROCOS05] were oriented:

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

(23) Obligation:

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

U221(mark(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

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

Lexicographic Path Order [LPO].
Precedence:
[active1, take2, proper1, top] > zeros > [mark1, 0, tt, ok1] > nil
[active1, take2, proper1, top] > cons2 > [mark1, 0, tt, ok1] > nil
[active1, take2, proper1, top] > [U122, length1] > U112 > [mark1, 0, tt, ok1] > nil
[active1, take2, proper1, top] > [U214, U224] > U234 > [mark1, 0, tt, ok1] > 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(25) 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(26) PisEmptyProof (EQUIVALENT transformation)

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

(27) TRUE

(28) Obligation:

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

U211(ok(X1), ok(X2), ok(X3), ok(X4)) → U211(X1, X2, X3, X4)
U211(mark(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(29) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic Path Order [LPO].
Precedence:
proper > tt > mark
proper > nil > [U21^11, ok1, zeros, 0] > top > mark


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

(30) Obligation:

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

U211(mark(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(31) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic Path Order [LPO].
Precedence:
proper1 > [active1, U214, U224, take2] > 0 > [U21^11, mark1, nil]
proper1 > [active1, U214, U224, take2] > U112 > [zeros, cons2, tt] > [U21^11, mark1, nil]
proper1 > [active1, U214, U224, take2] > U122 > s1 > [zeros, cons2, tt] > [U21^11, mark1, nil]
proper1 > [active1, U214, U224, take2] > U234 > [zeros, cons2, tt] > [U21^11, mark1, nil]
top > [active1, U214, U224, take2] > 0 > [U21^11, mark1, nil]
top > [active1, U214, U224, take2] > U112 > [zeros, cons2, tt] > [U21^11, mark1, nil]
top > [active1, U214, U224, take2] > U122 > s1 > [zeros, cons2, tt] > [U21^11, mark1, nil]
top > [active1, U214, U224, take2] > U234 > [zeros, cons2, tt] > [U21^11, mark1, 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(32) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

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

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

(33) PisEmptyProof (EQUIVALENT transformation)

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

(34) TRUE

(35) Obligation:

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

LENGTH(ok(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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.


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

Lexicographic Path Order [LPO].
Precedence:
top > active1 > [ok1, 0, tt] > nil
top > active1 > zeros
top > proper > [ok1, 0, tt] > nil
top > proper > zeros


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

(37) Obligation:

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

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

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.


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

Lexicographic Path Order [LPO].
Precedence:
LENGTH1 > ok
active1 > cons2 > tt > [U112, U122] > [mark1, length1] > ok
active1 > cons2 > tt > take2 > U214 > U224 > U234 > [mark1, length1] > ok
proper1 > zeros > cons2 > tt > [U112, U122] > [mark1, length1] > ok
proper1 > zeros > cons2 > tt > take2 > U214 > U224 > U234 > [mark1, length1] > ok
proper1 > zeros > [0, nil] > [mark1, length1] > ok
top > ok


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

(39) 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(40) PisEmptyProof (EQUIVALENT transformation)

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

(41) TRUE

(42) Obligation:

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

S(ok(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(43) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic Path Order [LPO].
Precedence:
top > active1 > [ok1, 0, tt] > nil
top > active1 > zeros
top > proper > [ok1, 0, tt] > nil
top > proper > zeros


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

(44) Obligation:

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

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

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

(45) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic Path Order [LPO].
Precedence:
S1 > ok
active1 > cons2 > tt > [U112, U122] > [mark1, length1] > ok
active1 > cons2 > tt > take2 > U214 > U224 > U234 > [mark1, length1] > ok
proper1 > zeros > cons2 > tt > [U112, U122] > [mark1, length1] > ok
proper1 > zeros > cons2 > tt > take2 > U214 > U224 > U234 > [mark1, length1] > ok
proper1 > zeros > [0, nil] > [mark1, length1] > ok
top > ok


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

(46) 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(47) PisEmptyProof (EQUIVALENT transformation)

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

(48) TRUE

(49) Obligation:

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

U121(ok(X1), ok(X2)) → U121(X1, X2)
U121(mark(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(50) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic Path Order [LPO].
Precedence:
top > proper > [ok1, active1, 0] > zeros > [mark, tt, 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(51) Obligation:

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

U121(mark(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

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

Lexicographic Path Order [LPO].
Precedence:
[active1, U214] > [0, nil] > [zeros, ok] > [U224, U234] > cons2 > [U112, U122] > [U12^12, mark1]
[active1, U214] > [0, nil] > [zeros, ok] > [U224, U234] > take2 > [U12^12, mark1]
[active1, U214] > [tt, s1] > length1 > [zeros, ok] > [U224, U234] > cons2 > [U112, U122] > [U12^12, mark1]
[active1, U214] > [tt, s1] > length1 > [zeros, ok] > [U224, U234] > take2 > [U12^12, mark1]
top > [U12^12, mark1]


The following usable rules [FROCOS05] were oriented:

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

(53) 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(54) PisEmptyProof (EQUIVALENT transformation)

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

(55) TRUE

(56) Obligation:

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

U111(ok(X1), ok(X2)) → U111(X1, X2)
U111(mark(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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.


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

Lexicographic Path Order [LPO].
Precedence:
top > proper > [ok1, active1] > zeros > [mark, 0, tt, 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(58) Obligation:

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

U111(mark(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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.


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

Lexicographic Path Order [LPO].
Precedence:
zeros > [active1, 0] > [U224, U234, nil, proper1] > [cons2, U112, U122, length1, U214, take2] > [U11^12, mark1, s1] > top > 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(60) 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(61) PisEmptyProof (EQUIVALENT transformation)

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

(62) TRUE

(63) Obligation:

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

CONS(ok(X1), ok(X2)) → CONS(X1, X2)
CONS(mark(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(64) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic Path Order [LPO].
Precedence:
top > proper > [ok1, active1] > zeros > [mark, 0, tt, 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(65) Obligation:

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

CONS(mark(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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.


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

Lexicographic Path Order [LPO].
Precedence:
zeros > [active1, 0] > [U224, U234, nil, proper1] > [cons2, U112, U122, length1, U214, take2] > [CONS2, mark1, s1] > top > 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

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:

PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(U11(X1, X2)) → PROPER(X1)
PROPER(U11(X1, X2)) → PROPER(X2)
PROPER(U12(X1, X2)) → PROPER(X1)
PROPER(U12(X1, X2)) → PROPER(X2)
PROPER(s(X)) → PROPER(X)
PROPER(length(X)) → PROPER(X)
PROPER(U21(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U21(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U21(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U21(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U22(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U22(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U22(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U22(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U23(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U23(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U23(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U23(X1, X2, X3, X4)) → PROPER(X4)
PROPER(take(X1, X2)) → PROPER(X1)
PROPER(take(X1, X2)) → PROPER(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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.


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

Lexicographic Path Order [LPO].
Precedence:
active1 > U224 > [U122, U214, take2, zeros, 0, tt, nil]
active1 > U234 > PROPER1 > [U122, U214, take2, zeros, 0, tt, nil]
active1 > U234 > [cons2, U112] > [U122, U214, take2, zeros, 0, tt, nil]
proper1 > U224 > [U122, U214, take2, zeros, 0, tt, nil]
proper1 > U234 > PROPER1 > [U122, U214, take2, zeros, 0, tt, nil]
proper1 > U234 > [cons2, U112] > [U122, U214, take2, zeros, 0, tt, nil]
top > [U122, U214, take2, zeros, 0, tt, 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(72) Obligation:

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

PROPER(s(X)) → PROPER(X)
PROPER(length(X)) → PROPER(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(73) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic Path Order [LPO].
Precedence:
[PROPER1, length1] > [mark, tt, U121]
[zeros, 0] > nil > [mark, tt, U121]
U11 > [mark, tt, U121]
U21 > U221 > U231 > [mark, tt, U121]
top > [mark, tt, U121]


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

(74) Obligation:

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

PROPER(s(X)) → PROPER(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(75) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic Path Order [LPO].
Precedence:
U12 > [active1, U211, U221, take] > s1 > PROPER1 > [mark, 0, U112, tt, U232]
U12 > [active1, U211, U221, take] > zeros > [mark, 0, U112, tt, U232]
U12 > [active1, U211, U221, take] > length > [mark, 0, U112, tt, U232]
U12 > [active1, U211, U221, take] > nil > [mark, 0, U112, tt, U232]
top > [active1, U211, U221, take] > s1 > PROPER1 > [mark, 0, U112, tt, U232]
top > [active1, U211, U221, take] > zeros > [mark, 0, U112, tt, U232]
top > [active1, U211, U221, take] > length > [mark, 0, U112, tt, U232]
top > [active1, U211, U221, take] > nil > [mark, 0, U112, tt, U232]


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

(76) 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(77) PisEmptyProof (EQUIVALENT transformation)

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

(78) TRUE

(79) Obligation:

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

ACTIVE(U11(X1, X2)) → ACTIVE(X1)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(length(X)) → ACTIVE(X)
ACTIVE(U21(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(U22(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(U23(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → ACTIVE(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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.


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

Lexicographic Path Order [LPO].
Precedence:
top > [U122, U214, take2, active1] > U112 > tt > cons2
top > [U122, U214, take2, active1] > U112 > tt > length1 > 0
top > [U122, U214, take2, active1] > U112 > tt > U224
top > [U122, U214, take2, active1] > U112 > tt > U234
top > [U122, U214, take2, active1] > s1 > tt > cons2
top > [U122, U214, take2, active1] > s1 > tt > length1 > 0
top > [U122, U214, take2, active1] > s1 > tt > U224
top > [U122, U214, take2, active1] > s1 > tt > U234
top > [U122, U214, take2, active1] > zeros > 0
top > [U122, U214, take2, active1] > 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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

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:

TOP(ok(X)) → TOP(active(X))
TOP(mark(X)) → TOP(proper(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))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U21(X1, X2, X3, X4)) → U21(active(X1), X2, X3, X4)
active(U22(X1, X2, X3, X4)) → U22(active(X1), X2, X3, X4)
active(U23(X1, X2, X3, X4)) → U23(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U21(mark(X1), X2, X3, X4) → mark(U21(X1, X2, X3, X4))
U22(mark(X1), X2, X3, X4) → mark(U22(X1, X2, X3, X4))
U23(mark(X1), X2, X3, X4) → mark(U23(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U21(X1, X2, X3, X4)) → U21(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U22(X1, X2, X3, X4)) → U22(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U23(X1, X2, X3, X4)) → U23(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U21(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U21(X1, X2, X3, X4))
U22(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U22(X1, X2, X3, X4))
U23(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U23(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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