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

Lexicographic Path Order [LPO].
Precedence:
top > [active1, tt, length1, U233, proper1] > [zeros, cons2, U212] > [ok1, 0, nil]
top > [active1, tt, length1, U233, proper1] > U223 > [ok1, 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))

(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(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)  =  TAKE(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, cons2, U112, U122, U214, U224, U234, take2] > [TAKE1, mark1, zeros] > 0 > [nil, top]
[active1, cons2, U112, U122, U214, U224, U234, take2] > tt > [nil, top]


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

(10) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


TAKE(mark(X1), X2) → TAKE(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
TAKE(x1, x2)  =  TAKE(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)  =  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)  =  x1
top(x1)  =  top

Lexicographic Path Order [LPO].
Precedence:
[active1, cons2, tt, s1, take2] > zeros > 0
[active1, cons2, tt, s1, take2] > U122 > [U112, length1] > [TAKE1, mark1]
[active1, cons2, tt, s1, take2] > U122 > [U112, length1] > 0
[active1, cons2, tt, s1, take2] > U214 > [TAKE1, mark1]
[active1, cons2, tt, s1, take2] > U224 > U234 > [TAKE1, mark1]
[active1, cons2, tt, s1, take2] > nil > [TAKE1, mark1]
[active1, cons2, tt, s1, take2] > 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))

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

Lexicographic Path Order [LPO].
Precedence:
[active1, U122, s1, U224, take2] > [zeros, cons2, U112, U214, U234] > mark1 > top
[active1, U122, s1, U224, take2] > [zeros, cons2, U112, U214, U234] > 0 > nil
[active1, U122, s1, U224, take2] > [zeros, cons2, U112, U214, U234] > 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))

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

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

Lexicographic Path Order [LPO].
Precedence:
proper1 > [active1, U212, top] > [U23^12, ok1] > mark
proper1 > [active1, U212, top] > zeros > mark
proper1 > [active1, U212, top] > [0, nil] > mark
proper1 > [active1, U212, top] > tt > 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))

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

Lexicographic Path Order [LPO].
Precedence:
[active1, U122, s1, U224, take2] > [zeros, cons2, U112, U214, U234] > mark1 > top
[active1, U122, s1, U224, take2] > [zeros, cons2, U112, U214, U234] > 0 > nil
[active1, U122, s1, U224, take2] > [zeros, cons2, U112, U214, U234] > 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))

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

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

Lexicographic Path Order [LPO].
Precedence:
proper1 > [active1, U212, top] > [U22^12, ok1] > mark
proper1 > [active1, U212, top] > zeros > mark
proper1 > [active1, U212, top] > [0, nil] > mark
proper1 > [active1, U212, top] > tt > 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))

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

Lexicographic Path Order [LPO].
Precedence:
0 > nil > [mark, zeros, cons1, U111, take1, proper1] > U122 > [ok1, U231] > top
tt > [mark, zeros, cons1, U111, take1, proper1] > U122 > [ok1, U231] > top


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

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


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

Lexicographic Path Order [LPO].
Precedence:
[0, nil] > [ok1, cons1, length1]
top > [active1, U221, proper1] > zeros
top > [active1, U221, proper1] > take1 > [U112, tt, s1, U212] > [ok1, cons1, length1]


The following usable rules [FROCOS05] were oriented:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
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)  =  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)  =  ok
top(x1)  =  top

Lexicographic Path Order [LPO].
Precedence:
active1 > zeros
active1 > U214 > [U224, ok, top] > [cons2, U234] > [U112, U122] > [LENGTH1, mark1, 0, s1] > tt
active1 > take2 > [U224, ok, top] > [cons2, U234] > [U112, U122] > [LENGTH1, mark1, 0, s1] > tt
active1 > nil > [U224, ok, top] > [cons2, U234] > [U112, U122] > [LENGTH1, mark1, 0, s1] > tt
proper1 > zeros
proper1 > U214 > [U224, ok, top] > [cons2, U234] > [U112, U122] > [LENGTH1, mark1, 0, s1] > tt
proper1 > take2 > [U224, ok, top] > [cons2, U234] > [U112, U122] > [LENGTH1, mark1, 0, s1] > tt
proper1 > nil > [U224, ok, top] > [cons2, U234] > [U112, U122] > [LENGTH1, mark1, 0, s1] > 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))

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

Lexicographic Path Order [LPO].
Precedence:
[0, nil] > [ok1, cons1, length1]
top > [active1, U221, proper1] > zeros
top > [active1, U221, proper1] > take1 > [U112, tt, s1, U212] > [ok1, cons1, length1]


The following usable rules [FROCOS05] were oriented:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
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)  =  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)  =  ok
top(x1)  =  top

Lexicographic Path Order [LPO].
Precedence:
active1 > zeros
active1 > U214 > [U224, ok, top] > [cons2, U234] > [U112, U122] > [S1, mark1, 0, s1] > tt
active1 > take2 > [U224, ok, top] > [cons2, U234] > [U112, U122] > [S1, mark1, 0, s1] > tt
active1 > nil > [U224, ok, top] > [cons2, U234] > [U112, U122] > [S1, mark1, 0, s1] > tt
proper1 > zeros
proper1 > U214 > [U224, ok, top] > [cons2, U234] > [U112, U122] > [S1, mark1, 0, s1] > tt
proper1 > take2 > [U224, ok, top] > [cons2, U234] > [U112, U122] > [S1, mark1, 0, s1] > tt
proper1 > nil > [U224, ok, top] > [cons2, U234] > [U112, U122] > [S1, mark1, 0, s1] > 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))

(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)  =  x1
zeros  =  zeros
cons(x1, x2)  =  x1
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)  =  x1
U23(x1, x2, x3, x4)  =  U23(x1)
take(x1, x2)  =  take(x1)
nil  =  nil
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic Path Order [LPO].
Precedence:
zeros > [ok1, tt, length1, take1] > mark
zeros > [ok1, tt, length1, take1] > [0, nil]
[U112, proper1, top] > U122 > [ok1, tt, length1, take1] > mark
[U112, proper1, top] > U122 > [ok1, tt, length1, take1] > [0, nil]
[U112, proper1, top] > U214 > [ok1, tt, length1, take1] > mark
[U112, proper1, top] > U214 > [ok1, tt, length1, take1] > [0, nil]
[U112, proper1, top] > U231 > [ok1, tt, length1, take1] > mark
[U112, proper1, top] > U231 > [ok1, tt, length1, take1] > [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))

(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)  =  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)  =  ok
top(x1)  =  top

Lexicographic Path Order [LPO].
Precedence:
active1 > [cons2, U122, proper1] > zeros > mark1 > tt
active1 > [cons2, U122, proper1] > [0, s1, U224, take2, nil, ok] > U112 > mark1 > tt
active1 > [cons2, U122, proper1] > [0, s1, U224, take2, nil, ok] > U214 > mark1 > tt
active1 > [cons2, U122, proper1] > [0, s1, U224, take2, nil, ok] > U234 > mark1 > tt
active1 > [cons2, U122, proper1] > [0, s1, U224, take2, nil, ok] > 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))

(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)  =  U111(x2)
ok(x1)  =  ok(x1)
mark(x1)  =  mark
active(x1)  =  active(x1)
zeros  =  zeros
cons(x1, x2)  =  x1
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)  =  x1
U23(x1, x2, x3, x4)  =  x4
take(x1, x2)  =  x1
nil  =  nil
proper(x1)  =  proper
top(x1)  =  top

Lexicographic Path Order [LPO].
Precedence:
U11^11 > [mark, tt]
active1 > zeros > ok1 > [mark, tt]
active1 > 0 > nil > ok1 > [mark, tt]
proper > zeros > ok1 > [mark, tt]
proper > 0 > nil > ok1 > [mark, tt]
top > [mark, 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))

(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)  =  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)  =  x1
ok(x1)  =  x1
top(x1)  =  top

Lexicographic Path Order [LPO].
Precedence:
[active1, tt, U122, U234] > [cons2, U112] > [mark1, 0]
[active1, tt, U122, U234] > s1 > [U214, U224] > [mark1, 0]
[active1, tt, U122, U234] > [take2, nil] > [mark1, 0]
zeros > [cons2, U112] > [mark1, 0]
top > [mark1, 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))

(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)  =  CONS(x2)
ok(x1)  =  ok(x1)
mark(x1)  =  mark
active(x1)  =  active(x1)
zeros  =  zeros
cons(x1, x2)  =  x1
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)  =  x1
U23(x1, x2, x3, x4)  =  x4
take(x1, x2)  =  x1
nil  =  nil
proper(x1)  =  proper
top(x1)  =  top

Lexicographic Path Order [LPO].
Precedence:
CONS1 > [mark, tt]
active1 > zeros > ok1 > [mark, tt]
active1 > 0 > nil > ok1 > [mark, tt]
proper > zeros > ok1 > [mark, tt]
proper > 0 > nil > ok1 > [mark, tt]
top > [mark, 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))

(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)  =  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)  =  x1
ok(x1)  =  x1
top(x1)  =  top

Lexicographic Path Order [LPO].
Precedence:
[active1, tt, U122, U234] > [cons2, U112] > [mark1, 0]
[active1, tt, U122, U234] > s1 > [U214, U224] > [mark1, 0]
[active1, tt, U122, U234] > [take2, nil] > [mark1, 0]
zeros > [cons2, U112] > [mark1, 0]
top > [mark1, 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))

(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)  =  x1
zeros  =  zeros
mark(x1)  =  mark
0  =  0
tt  =  tt
nil  =  nil
proper(x1)  =  proper(x1)
ok(x1)  =  x1
top(x1)  =  top

Lexicographic Path Order [LPO].
Precedence:
PROPER1 > [U122, U214]
[zeros, proper1] > [cons2, U234] > U112 > [U224, mark, 0] > [U122, U214]
[zeros, proper1] > take2 > nil > [U224, mark, 0] > [U122, U214]
tt > [cons2, U234] > U112 > [U224, mark, 0] > [U122, U214]
tt > take2 > nil > [U224, mark, 0] > [U122, U214]
top > [U122, U214]


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(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)  =  x1
s(x1)  =  s(x1)
length(x1)  =  x1
active(x1)  =  active(x1)
zeros  =  zeros
mark(x1)  =  mark
cons(x1, x2)  =  cons(x1)
0  =  0
U11(x1, x2)  =  x1
tt  =  tt
U12(x1, x2)  =  x1
U21(x1, x2, x3, x4)  =  U21(x1, x2)
U22(x1, x2, x3, x4)  =  U22(x1)
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:
tt > [active1, mark, cons1, take] > s1 > [nil, top]
tt > [active1, mark, cons1, take] > [zeros, 0] > [nil, top]
tt > [active1, mark, cons1, take] > [U212, U221] > [nil, top]
tt > [active1, mark, cons1, take] > U232 > [nil, top]


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

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

Lexicographic Path Order [LPO].
Precedence:
U11 > [length1, active1, 0, U211, U23, nil, proper1, ok, top] > cons2 > [zeros, mark]
tt > U12 > [length1, active1, 0, U211, U23, nil, proper1, ok, top] > cons2 > [zeros, 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))

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

Lexicographic Path Order [LPO].
Precedence:
[cons1, proper1] > ACTIVE1 > [U213, mark, 0]
[cons1, proper1] > zeros > [U213, mark, 0]
[cons1, proper1] > tt > U222 > [U213, mark, 0]
[cons1, proper1] > tt > [take2, nil] > [U213, mark, 0]
top > [U213, mark, 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:
The TRS P consists of the following rules:

ACTIVE(U11(X1, X2)) → ACTIVE(X1)
ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(length(X)) → ACTIVE(X)
ACTIVE(U23(X1, X2, X3, X4)) → ACTIVE(X1)

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

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic Path Order [LPO].
Precedence:
0 > [U232, active1, take1, proper1, ok, top] > ACTIVE1
0 > [U232, active1, take1, proper1, ok, top] > [zeros, mark, U221, nil] > cons1 > tt
0 > [U232, active1, take1, proper1, ok, top] > [zeros, mark, U221, nil] > cons1 > U214


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

(83) Obligation:

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

ACTIVE(U11(X1, X2)) → ACTIVE(X1)
ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(length(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.

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

Lexicographic Path Order [LPO].
Precedence:
zeros > [nil, ok, top] > [ACTIVE1, U111, active1, U212] > mark
0 > [nil, ok, top] > [ACTIVE1, U111, active1, U212] > mark
U223 > tt > U23 > [nil, ok, top] > [ACTIVE1, U111, active1, U212] > 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))

(85) Obligation:

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

ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(length(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.

(86) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic Path Order [LPO].
Precedence:
[s1, U112, proper1] > ACTIVE1 > [mark, tt]
[s1, U112, proper1] > zeros > [ok, top] > [mark, tt]
[s1, U112, proper1] > 0 > nil > [ok, top] > [mark, tt]
[s1, U112, proper1] > U212 > [ok, top] > [mark, 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))

(87) Obligation:

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

ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(length(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.

(88) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic Path Order [LPO].
Precedence:
length1 > ACTIVE1 > s1
length1 > [mark, tt] > [ok, top] > s1
length1 > 0 > [ok, top] > s1
zeros > [mark, tt] > [ok, top] > s1
zeros > 0 > [ok, top] > s1
U233 > cons1 > [mark, tt] > [ok, top] > s1
U233 > take1 > [mark, tt] > [ok, top] > s1
nil > [mark, tt] > [ok, top] > s1
nil > 0 > [ok, top] > s1


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

(89) Obligation:

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

ACTIVE(U12(X1, X2)) → ACTIVE(X1)

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.

(90) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic Path Order [LPO].
Precedence:
ACTIVE1 > [mark, length, ok, top]
U232 > [active1, take] > [zeros, cons2, tt] > U122 > [mark, length, ok, top]
U232 > [active1, take] > nil > 0 > [mark, length, ok, top]


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

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

(92) PisEmptyProof (EQUIVALENT transformation)

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

(93) TRUE

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