(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(X1, mark(X2)) → TAKE(X1, X2)
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, x2)
mark(x1)  =  mark(x1)
ok(x1)  =  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)  =  proper(x1)
top(x1)  =  top

Recursive path order with status [RPO].
Precedence:
TAKE2 > mark1
active1 > 0 > nil > mark1
active1 > U112 > U122 > mark1
active1 > U214 > tt > cons2 > mark1
active1 > U214 > tt > U122 > mark1
active1 > U214 > tt > take2 > nil > mark1
active1 > U214 > U224 > mark1
active1 > U234 > cons2 > mark1
active1 > U234 > take2 > nil > mark1
zeros > cons2 > mark1
zeros > 0 > nil > mark1
proper1 > 0 > nil > mark1
proper1 > U112 > U122 > mark1
proper1 > U214 > tt > cons2 > mark1
proper1 > U214 > tt > U122 > mark1
proper1 > U214 > tt > take2 > nil > mark1
proper1 > U214 > U224 > mark1
proper1 > U234 > cons2 > mark1
proper1 > U234 > take2 > nil > mark1
top > mark1

Status:
TAKE2: [1,2]
mark1: multiset
active1: [1]
zeros: multiset
cons2: multiset
0: multiset
U112: multiset
tt: multiset
U122: [2,1]
U214: [1,2,3,4]
U224: [3,2,1,4]
U234: [1,3,4,2]
take2: multiset
nil: multiset
proper1: [1]
top: multiset

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

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

Recursive path order with status [RPO].
Precedence:
proper > zeros > ok1 > active1 > 0 > mark
proper > tt > ok1 > active1 > 0 > mark
proper > nil > 0 > mark
top > active1 > 0 > mark

Status:
ok1: [1]
active1: [1]
zeros: multiset
mark: []
0: multiset
tt: multiset
nil: multiset
proper: multiset
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:
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.

(10) PisEmptyProof (EQUIVALENT transformation)

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

(11) TRUE

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

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

Recursive path order with status [RPO].
Precedence:
U23^12 > ok1
top > active1 > zeros > ok1
top > active1 > cons1 > ok1
top > active1 > U111 > ok1
top > active1 > U121 > ok1
top > active1 > s1 > ok1
top > active1 > U211 > tt > ok1
top > active1 > U231 > ok1
top > active1 > take1 > tt > ok1
top > active1 > take1 > nil > 0 > ok1
top > proper1 > zeros > ok1
top > proper1 > cons1 > ok1
top > proper1 > U111 > ok1
top > proper1 > U121 > ok1
top > proper1 > s1 > ok1
top > proper1 > U211 > tt > ok1
top > proper1 > U231 > ok1
top > proper1 > take1 > tt > ok1
top > proper1 > take1 > nil > 0 > ok1

Status:
U23^12: multiset
ok1: multiset
active1: [1]
zeros: multiset
cons1: [1]
0: multiset
U111: [1]
tt: multiset
U121: [1]
s1: multiset
U211: [1]
U231: [1]
take1: [1]
nil: multiset
proper1: multiset
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))

(14) Obligation:

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

U231(mark(X1), X2, X3, X4) → U231(X1, X2, X3, X4)

The TRS R consists of the following rules:

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

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

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

Recursive path order with status [RPO].
Precedence:
active1 > 0 > ok > mark1
active1 > tt > cons2 > mark1
active1 > tt > U122 > mark1
active1 > tt > s1 > mark1
active1 > tt > U234 > mark1
active1 > tt > take2 > mark1
active1 > tt > ok > mark1
active1 > length1 > U112 > mark1
active1 > length1 > ok > mark1
active1 > U214 > ok > mark1
active1 > U224 > U234 > mark1
active1 > U224 > ok > mark1
active1 > nil > ok > mark1
zeros > cons2 > mark1
zeros > 0 > ok > mark1
top > mark1

Status:
mark1: multiset
active1: multiset
zeros: multiset
cons2: [2,1]
0: multiset
U112: [2,1]
tt: multiset
U122: [1,2]
s1: [1]
length1: multiset
U214: multiset
U224: [1,2,3,4]
U234: multiset
take2: [1,2]
nil: multiset
ok: multiset
top: multiset

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

(17) PisEmptyProof (EQUIVALENT transformation)

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

(18) TRUE

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

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

Recursive path order with status [RPO].
Precedence:
U22^12 > ok1
top > active1 > zeros > ok1
top > active1 > cons1 > ok1
top > active1 > U111 > ok1
top > active1 > U121 > ok1
top > active1 > s1 > ok1
top > active1 > U211 > tt > ok1
top > active1 > U231 > ok1
top > active1 > take1 > tt > ok1
top > active1 > take1 > nil > 0 > ok1
top > proper1 > zeros > ok1
top > proper1 > cons1 > ok1
top > proper1 > U111 > ok1
top > proper1 > U121 > ok1
top > proper1 > s1 > ok1
top > proper1 > U211 > tt > ok1
top > proper1 > U231 > ok1
top > proper1 > take1 > tt > ok1
top > proper1 > take1 > nil > 0 > ok1

Status:
U22^12: multiset
ok1: multiset
active1: [1]
zeros: multiset
cons1: [1]
0: multiset
U111: [1]
tt: multiset
U121: [1]
s1: multiset
U211: [1]
U231: [1]
take1: [1]
nil: multiset
proper1: multiset
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))

(21) Obligation:

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

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

The TRS R consists of the following rules:

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

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

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

Recursive path order with status [RPO].
Precedence:
active1 > 0 > ok > mark1
active1 > tt > cons2 > mark1
active1 > tt > U122 > mark1
active1 > tt > s1 > mark1
active1 > tt > U234 > mark1
active1 > tt > take2 > mark1
active1 > tt > ok > mark1
active1 > length1 > U112 > mark1
active1 > length1 > ok > mark1
active1 > U214 > ok > mark1
active1 > U224 > U234 > mark1
active1 > U224 > ok > mark1
active1 > nil > ok > mark1
zeros > cons2 > mark1
zeros > 0 > ok > mark1
top > mark1

Status:
mark1: multiset
active1: multiset
zeros: multiset
cons2: [2,1]
0: multiset
U112: [2,1]
tt: multiset
U122: [1,2]
s1: [1]
length1: multiset
U214: multiset
U224: [1,2,3,4]
U234: multiset
take2: [1,2]
nil: multiset
ok: multiset
top: multiset

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

(24) PisEmptyProof (EQUIVALENT transformation)

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

(25) TRUE

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

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

Recursive path order with status [RPO].
Precedence:
active1 > zeros > cons1 > U211 > U221 > ok1
active1 > 0 > nil > ok1
active1 > tt > cons1 > U211 > U221 > ok1
active1 > tt > s1 > ok1
active1 > tt > take1 > ok1
active1 > length1 > U111 > ok1
active1 > U231 > cons1 > U211 > U221 > ok1
active1 > U231 > take1 > ok1
proper1 > zeros > cons1 > U211 > U221 > ok1
proper1 > 0 > nil > ok1
proper1 > tt > cons1 > U211 > U221 > ok1
proper1 > tt > s1 > ok1
proper1 > tt > take1 > ok1
proper1 > length1 > U111 > ok1
proper1 > U231 > cons1 > U211 > U221 > ok1
proper1 > U231 > take1 > ok1
top > ok1

Status:
ok1: multiset
active1: multiset
zeros: multiset
cons1: [1]
0: multiset
U111: [1]
tt: multiset
s1: [1]
length1: [1]
U211: [1]
U221: [1]
U231: [1]
take1: [1]
nil: multiset
proper1: multiset
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))

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

(29) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Precedence:
active1 > zeros > cons2 > mark1 > U21^13 > tt
active1 > 0 > mark1 > U21^13 > tt
active1 > U112 > U122 > s1 > mark1 > U21^13 > tt
active1 > U214 > U224 > mark1 > U21^13 > tt
active1 > U234 > cons2 > mark1 > U21^13 > tt
active1 > U234 > take2 > mark1 > U21^13 > tt
active1 > nil > mark1 > U21^13 > tt
top > tt

Status:
U21^13: [3,2,1]
mark1: [1]
active1: multiset
zeros: multiset
cons2: [2,1]
0: multiset
U112: [1,2]
tt: multiset
U122: [1,2]
s1: multiset
U214: multiset
U224: multiset
U234: multiset
take2: [1,2]
nil: multiset
top: multiset

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

(31) PisEmptyProof (EQUIVALENT transformation)

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

(32) TRUE

(33) Obligation:

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

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.

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

Recursive path order with status [RPO].
Precedence:
proper > zeros > ok1
proper > zeros > 0
proper > tt
proper > nil > 0
top > active1 > tt
top > active1 > nil > 0

Status:
LENGTH1: multiset
ok1: multiset
active1: multiset
zeros: multiset
0: multiset
tt: multiset
nil: multiset
proper: []
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))

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

(36) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Precedence:
active1 > zeros > mark1 > LENGTH1
active1 > 0 > nil > mark1 > LENGTH1
active1 > U112 > tt > cons2 > mark1 > LENGTH1
active1 > U112 > tt > U234 > mark1 > LENGTH1
active1 > U122 > mark1 > LENGTH1
active1 > U214 > tt > cons2 > mark1 > LENGTH1
active1 > U214 > tt > U234 > mark1 > LENGTH1
active1 > U224 > tt > cons2 > mark1 > LENGTH1
active1 > U224 > tt > U234 > mark1 > LENGTH1
active1 > take2 > tt > cons2 > mark1 > LENGTH1
active1 > take2 > tt > U234 > mark1 > LENGTH1
active1 > take2 > nil > mark1 > LENGTH1
proper1 > zeros > mark1 > LENGTH1
proper1 > 0 > nil > mark1 > LENGTH1
proper1 > U112 > tt > cons2 > mark1 > LENGTH1
proper1 > U112 > tt > U234 > mark1 > LENGTH1
proper1 > U122 > mark1 > LENGTH1
proper1 > U214 > tt > cons2 > mark1 > LENGTH1
proper1 > U214 > tt > U234 > mark1 > LENGTH1
proper1 > U224 > tt > cons2 > mark1 > LENGTH1
proper1 > U224 > tt > U234 > mark1 > LENGTH1
proper1 > take2 > tt > cons2 > mark1 > LENGTH1
proper1 > take2 > tt > U234 > mark1 > LENGTH1
proper1 > take2 > nil > mark1 > LENGTH1
top > LENGTH1

Status:
LENGTH1: multiset
mark1: [1]
active1: multiset
zeros: multiset
cons2: multiset
0: multiset
U112: multiset
tt: multiset
U122: [1,2]
U214: [1,3,2,4]
U224: [4,3,1,2]
U234: multiset
take2: [2,1]
nil: multiset
proper1: [1]
top: multiset

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

(38) PisEmptyProof (EQUIVALENT transformation)

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

(39) TRUE

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

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

Recursive path order with status [RPO].
Precedence:
proper > zeros > ok1
proper > zeros > 0
proper > tt
proper > nil > 0
top > active1 > tt
top > active1 > nil > 0

Status:
S1: multiset
ok1: multiset
active1: multiset
zeros: multiset
0: multiset
tt: multiset
nil: multiset
proper: []
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))

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

(43) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Precedence:
active1 > zeros > mark1 > S1
active1 > 0 > nil > mark1 > S1
active1 > U112 > tt > cons2 > mark1 > S1
active1 > U112 > tt > U234 > mark1 > S1
active1 > U122 > mark1 > S1
active1 > U214 > tt > cons2 > mark1 > S1
active1 > U214 > tt > U234 > mark1 > S1
active1 > U224 > tt > cons2 > mark1 > S1
active1 > U224 > tt > U234 > mark1 > S1
active1 > take2 > tt > cons2 > mark1 > S1
active1 > take2 > tt > U234 > mark1 > S1
active1 > take2 > nil > mark1 > S1
proper1 > zeros > mark1 > S1
proper1 > 0 > nil > mark1 > S1
proper1 > U112 > tt > cons2 > mark1 > S1
proper1 > U112 > tt > U234 > mark1 > S1
proper1 > U122 > mark1 > S1
proper1 > U214 > tt > cons2 > mark1 > S1
proper1 > U214 > tt > U234 > mark1 > S1
proper1 > U224 > tt > cons2 > mark1 > S1
proper1 > U224 > tt > U234 > mark1 > S1
proper1 > take2 > tt > cons2 > mark1 > S1
proper1 > take2 > tt > U234 > mark1 > S1
proper1 > take2 > nil > mark1 > S1
top > S1

Status:
S1: multiset
mark1: [1]
active1: multiset
zeros: multiset
cons2: multiset
0: multiset
U112: multiset
tt: multiset
U122: [1,2]
U214: [1,3,2,4]
U224: [4,3,1,2]
U234: multiset
take2: [2,1]
nil: multiset
proper1: [1]
top: multiset

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

(45) PisEmptyProof (EQUIVALENT transformation)

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

(46) TRUE

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

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

Recursive path order with status [RPO].
Precedence:
active1 > zeros > U12^11
active1 > 0 > nil > ok1 > U12^11
active1 > tt > ok1 > U12^11
proper > zeros > U12^11
proper > 0 > nil > ok1 > U12^11
proper > tt > ok1 > U12^11
top > U12^11

Status:
U12^11: multiset
ok1: multiset
active1: multiset
zeros: multiset
0: multiset
tt: multiset
nil: multiset
proper: multiset
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))

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

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

Recursive path order with status [RPO].
Precedence:
active1 > 0 > mark1 > nil
active1 > U122 > s1 > tt > cons2 > U112 > mark1 > nil
active1 > U122 > s1 > tt > cons2 > U214 > mark1 > nil
active1 > U122 > s1 > tt > length1 > mark1 > nil
active1 > U122 > s1 > tt > take2 > U214 > mark1 > nil
active1 > U224 > tt > cons2 > U112 > mark1 > nil
active1 > U224 > tt > cons2 > U214 > mark1 > nil
active1 > U224 > tt > length1 > mark1 > nil
active1 > U224 > tt > take2 > U214 > mark1 > nil
active1 > U234 > cons2 > U112 > mark1 > nil
active1 > U234 > cons2 > U214 > mark1 > nil
active1 > U234 > take2 > U214 > mark1 > nil
zeros > 0 > mark1 > nil
zeros > ok > U122 > s1 > tt > cons2 > U112 > mark1 > nil
zeros > ok > U122 > s1 > tt > cons2 > U214 > mark1 > nil
zeros > ok > U122 > s1 > tt > length1 > mark1 > nil
zeros > ok > U122 > s1 > tt > take2 > U214 > mark1 > nil
zeros > ok > U224 > tt > cons2 > U112 > mark1 > nil
zeros > ok > U224 > tt > cons2 > U214 > mark1 > nil
zeros > ok > U224 > tt > length1 > mark1 > nil
zeros > ok > U224 > tt > take2 > U214 > mark1 > nil
zeros > ok > U234 > cons2 > U112 > mark1 > nil
zeros > ok > U234 > cons2 > U214 > mark1 > nil
zeros > ok > U234 > take2 > U214 > mark1 > nil
proper1 > 0 > mark1 > nil
proper1 > ok > U122 > s1 > tt > cons2 > U112 > mark1 > nil
proper1 > ok > U122 > s1 > tt > cons2 > U214 > mark1 > nil
proper1 > ok > U122 > s1 > tt > length1 > mark1 > nil
proper1 > ok > U122 > s1 > tt > take2 > U214 > mark1 > nil
proper1 > ok > U224 > tt > cons2 > U112 > mark1 > nil
proper1 > ok > U224 > tt > cons2 > U214 > mark1 > nil
proper1 > ok > U224 > tt > length1 > mark1 > nil
proper1 > ok > U224 > tt > take2 > U214 > mark1 > nil
proper1 > ok > U234 > cons2 > U112 > mark1 > nil
proper1 > ok > U234 > cons2 > U214 > mark1 > nil
proper1 > ok > U234 > take2 > U214 > mark1 > nil
top > nil

Status:
mark1: multiset
active1: multiset
zeros: multiset
cons2: [1,2]
0: multiset
U112: multiset
tt: multiset
U122: [2,1]
s1: [1]
length1: [1]
U214: [3,4,1,2]
U224: [3,1,4,2]
U234: [1,4,3,2]
take2: [2,1]
nil: multiset
proper1: [1]
ok: multiset
top: multiset

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

(52) PisEmptyProof (EQUIVALENT transformation)

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

(53) TRUE

(54) Obligation:

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

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.

(55) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Precedence:
U11^12 > mark1
zeros > cons2 > U112 > U122 > mark1
zeros > cons2 > U214 > mark1
zeros > 0 > mark1
top > active1 > tt > cons2 > U112 > U122 > mark1
top > active1 > tt > cons2 > U214 > mark1
top > active1 > tt > s1 > mark1
top > active1 > tt > length1 > 0 > mark1
top > active1 > tt > length1 > U112 > U122 > mark1
top > active1 > tt > U224 > mark1
top > active1 > tt > U234 > mark1
top > active1 > take2 > U214 > mark1
top > active1 > take2 > nil > mark1

Status:
U11^12: multiset
mark1: multiset
active1: [1]
zeros: multiset
cons2: [2,1]
0: multiset
U112: [1,2]
tt: multiset
U122: [1,2]
s1: multiset
length1: multiset
U214: multiset
U224: [1,4,2,3]
U234: [1,2,3,4]
take2: [1,2]
nil: multiset
top: multiset

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

(56) Obligation:

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

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

Recursive path order with status [RPO].
Precedence:
active1 > zeros > 0 > ok1
active1 > tt > s1 > U211 > ok1
active1 > tt > length1 > 0 > ok1
active1 > tt > take1 > U211 > ok1
active1 > tt > take1 > nil > ok1
active1 > U122 > s1 > U211 > ok1
active1 > U122 > length1 > 0 > ok1
proper1 > zeros > 0 > ok1
proper1 > tt > s1 > U211 > ok1
proper1 > tt > length1 > 0 > ok1
proper1 > tt > take1 > U211 > ok1
proper1 > tt > take1 > nil > ok1
proper1 > U122 > s1 > U211 > ok1
proper1 > U122 > length1 > 0 > ok1
top > ok1

Status:
ok1: [1]
active1: [1]
zeros: multiset
0: multiset
tt: multiset
U122: [1,2]
s1: multiset
length1: multiset
U211: [1]
take1: multiset
nil: multiset
proper1: multiset
top: multiset

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

(59) PisEmptyProof (EQUIVALENT transformation)

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

(60) TRUE

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

(62) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Precedence:
CONS2 > mark1
zeros > cons2 > U112 > U122 > mark1
zeros > cons2 > U214 > mark1
zeros > 0 > mark1
top > active1 > tt > cons2 > U112 > U122 > mark1
top > active1 > tt > cons2 > U214 > mark1
top > active1 > tt > s1 > mark1
top > active1 > tt > length1 > 0 > mark1
top > active1 > tt > length1 > U112 > U122 > mark1
top > active1 > tt > U224 > mark1
top > active1 > tt > U234 > mark1
top > active1 > take2 > U214 > mark1
top > active1 > take2 > nil > mark1

Status:
CONS2: multiset
mark1: multiset
active1: [1]
zeros: multiset
cons2: [2,1]
0: multiset
U112: [1,2]
tt: multiset
U122: [1,2]
s1: multiset
length1: multiset
U214: multiset
U224: [1,4,2,3]
U234: [1,2,3,4]
take2: [1,2]
nil: multiset
top: multiset

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

(63) Obligation:

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

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

Recursive path order with status [RPO].
Precedence:
active1 > zeros > 0 > ok1
active1 > tt > s1 > U211 > ok1
active1 > tt > length1 > 0 > ok1
active1 > tt > take1 > U211 > ok1
active1 > tt > take1 > nil > ok1
active1 > U122 > s1 > U211 > ok1
active1 > U122 > length1 > 0 > ok1
proper1 > zeros > 0 > ok1
proper1 > tt > s1 > U211 > ok1
proper1 > tt > length1 > 0 > ok1
proper1 > tt > take1 > U211 > ok1
proper1 > tt > take1 > nil > ok1
proper1 > U122 > s1 > U211 > ok1
proper1 > U122 > length1 > 0 > ok1
top > ok1

Status:
ok1: [1]
active1: [1]
zeros: multiset
0: multiset
tt: multiset
U122: [1,2]
s1: multiset
length1: multiset
U211: [1]
take1: multiset
nil: multiset
proper1: multiset
top: multiset

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

(66) PisEmptyProof (EQUIVALENT transformation)

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

(67) TRUE

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

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

Recursive path order with status [RPO].
Precedence:
U112 > mark > U224 > U234 > PROPER1
U112 > mark > U224 > ok > PROPER1
U112 > mark > take2 > U214 > PROPER1
U112 > mark > take2 > ok > PROPER1
U122 > mark > U224 > U234 > PROPER1
U122 > mark > U224 > ok > PROPER1
U122 > mark > take2 > U214 > PROPER1
U122 > mark > take2 > ok > PROPER1
zeros > mark > U224 > U234 > PROPER1
zeros > mark > U224 > ok > PROPER1
zeros > mark > take2 > U214 > PROPER1
zeros > mark > take2 > ok > PROPER1
tt > cons2 > mark > U224 > U234 > PROPER1
tt > cons2 > mark > U224 > ok > PROPER1
tt > cons2 > mark > take2 > U214 > PROPER1
tt > cons2 > mark > take2 > ok > PROPER1
nil > 0 > mark > U224 > U234 > PROPER1
nil > 0 > mark > U224 > ok > PROPER1
nil > 0 > mark > take2 > U214 > PROPER1
nil > 0 > mark > take2 > ok > PROPER1
top > PROPER1

Status:
PROPER1: multiset
cons2: [1,2]
U112: [2,1]
U122: [2,1]
U214: multiset
U224: [2,4,1,3]
U234: [2,1,4,3]
take2: multiset
zeros: multiset
mark: []
0: multiset
tt: multiset
nil: multiset
ok: multiset
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))

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

(71) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Precedence:
active1 > U122 > length1 > PROPER1
active1 > U122 > length1 > 0
active1 > U122 > length1 > U112
active1 > U122 > length1 > tt
active1 > nil > 0
zeros > 0

Status:
PROPER1: multiset
length1: multiset
active1: multiset
zeros: multiset
0: multiset
U112: multiset
tt: multiset
U122: [1,2]
nil: multiset
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))

(72) Obligation:

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

PROPER(s(X)) → PROPER(X)

The TRS R consists of the following rules:

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

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

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

Recursive path order with status [RPO].
Precedence:
PROPER1 > ok
zeros > cons1 > tt > s1 > ok
zeros > cons1 > tt > U23 > ok
zeros > cons1 > tt > take > nil > 0 > ok
top > active1 > cons1 > tt > s1 > ok
top > active1 > cons1 > tt > U23 > ok
top > active1 > cons1 > tt > take > nil > 0 > ok
top > active1 > U122 > s1 > ok
top > active1 > U122 > length1 > 0 > ok
top > active1 > U21 > U22 > tt > s1 > ok
top > active1 > U21 > U22 > tt > U23 > ok
top > active1 > U21 > U22 > tt > take > nil > 0 > ok

Status:
PROPER1: multiset
s1: [1]
active1: multiset
zeros: multiset
cons1: [1]
0: multiset
tt: multiset
U122: [1,2]
length1: multiset
U21: []
U22: []
U23: multiset
take: multiset
nil: multiset
ok: multiset
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:
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.

(75) PisEmptyProof (EQUIVALENT transformation)

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

(76) TRUE

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

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

Recursive path order with status [RPO].
Precedence:
ACTIVE1 > mark
take2 > tt > U231 > mark
zeros > mark
nil > 0 > mark
top > mark

Status:
ACTIVE1: [1]
U231: multiset
take2: [2,1]
zeros: multiset
mark: multiset
0: multiset
tt: multiset
nil: multiset
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))

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

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

Recursive path order with status [RPO].
Precedence:
ACTIVE1 > ok
active1 > zeros > ok
active1 > tt > U221 > mark > ok
active1 > tt > take2 > nil > mark > ok
active1 > tt > take2 > nil > 0 > ok
active1 > U231 > take2 > nil > mark > ok
active1 > U231 > take2 > nil > 0 > ok
top > ok

Status:
ACTIVE1: [1]
U221: multiset
active1: [1]
zeros: multiset
mark: multiset
0: multiset
tt: multiset
U231: multiset
take2: [2,1]
nil: multiset
ok: multiset
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))

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

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

Recursive path order with status [RPO].
Precedence:
ACTIVE1 > mark
active1 > U211 > mark
active1 > zeros > mark
active1 > 0 > nil > mark
active1 > U22 > tt > U23 > take > mark
top > proper1 > U211 > mark
top > proper1 > tt > U23 > take > mark
top > proper1 > nil > mark

Status:
ACTIVE1: multiset
U211: multiset
active1: [1]
zeros: multiset
mark: multiset
0: multiset
tt: multiset
U22: []
U23: multiset
take: multiset
nil: multiset
proper1: multiset
top: multiset

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

Recursive path order with status [RPO].
Precedence:
tt > length1 > 0 > mark
tt > U232 > mark
tt > take2 > U212 > mark
tt > take2 > nil > mark
proper1 > length1 > 0 > mark
proper1 > zeros > 0 > mark
proper1 > U232 > mark
proper1 > take2 > U212 > mark
proper1 > take2 > nil > mark
top > mark

Status:
length1: [1]
zeros: multiset
mark: multiset
0: multiset
tt: multiset
U212: [2,1]
U232: [1,2]
take2: multiset
nil: multiset
proper1: multiset
top: multiset

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

Recursive path order with status [RPO].
Precedence:
zeros > 0 > mark
tt > length > active1 > s1 > mark
tt > length > active1 > 0 > mark
tt > length > active1 > U211 > U221 > mark
tt > length > active1 > nil > mark
top > mark

Status:
s1: [1]
active1: multiset
zeros: multiset
mark: multiset
0: multiset
tt: multiset
length: []
U211: [1]
U221: [1]
nil: multiset
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))

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

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

Recursive path order with status [RPO].
Precedence:
active1 > zeros > U232
active1 > length1 > U112 > ACTIVE1 > U232
active1 > length1 > U112 > mark > U232
active1 > length1 > U112 > ok > U232
active1 > length1 > 0 > mark > U232
active1 > length1 > 0 > nil > U232
active1 > length1 > 0 > ok > U232
active1 > take1 > U211 > mark > U232
active1 > take1 > U211 > U221 > U232
active1 > take1 > U211 > ok > U232
active1 > take1 > nil > U232
tt > length1 > U112 > ACTIVE1 > U232
tt > length1 > U112 > mark > U232
tt > length1 > U112 > ok > U232
tt > length1 > 0 > mark > U232
tt > length1 > 0 > nil > U232
tt > length1 > 0 > ok > U232
tt > take1 > U211 > mark > U232
tt > take1 > U211 > U221 > U232
tt > take1 > U211 > ok > U232
tt > take1 > nil > U232
proper1 > zeros > U232
proper1 > length1 > U112 > ACTIVE1 > U232
proper1 > length1 > U112 > mark > U232
proper1 > length1 > U112 > ok > U232
proper1 > length1 > 0 > mark > U232
proper1 > length1 > 0 > nil > U232
proper1 > length1 > 0 > ok > U232
proper1 > take1 > U211 > mark > U232
proper1 > take1 > U211 > U221 > U232
proper1 > take1 > U211 > ok > U232
proper1 > take1 > nil > U232
top > U232

Status:
ACTIVE1: [1]
U112: multiset
active1: multiset
zeros: multiset
mark: multiset
0: multiset
tt: multiset
length1: multiset
U211: [1]
U221: multiset
U232: multiset
take1: multiset
nil: multiset
proper1: [1]
ok: multiset
top: multiset

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

Recursive path order with status [RPO].
Precedence:
take > proper1 > zeros > 0 > mark
take > proper1 > tt > length > 0 > mark
take > proper1 > tt > length > U11 > U121 > ACTIVE1 > mark
take > proper1 > U231 > mark
take > proper1 > nil > 0 > mark
top > mark

Status:
ACTIVE1: multiset
U121: [1]
zeros: multiset
mark: multiset
0: multiset
U11: multiset
tt: multiset
length: multiset
U231: multiset
take: multiset
nil: multiset
proper1: [1]
top: multiset

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:
The TRS P consists of the following rules:

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

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

Recursive path order with status [RPO].
Precedence:
ACTIVE1 > mark
proper1 > zeros > cons2 > ok1 > mark
proper1 > zeros > 0 > nil > mark
proper1 > length1 > 0 > nil > mark
proper1 > length1 > tt > U121 > ok1 > mark
proper1 > length1 > tt > s1 > ok1 > mark
proper1 > U211 > tt > U121 > ok1 > mark
proper1 > U211 > tt > s1 > ok1 > mark
proper1 > U221 > tt > U121 > ok1 > mark
proper1 > U221 > tt > s1 > ok1 > mark
proper1 > U221 > U231 > cons2 > ok1 > mark
proper1 > U221 > U231 > take1 > nil > mark
proper1 > U221 > U231 > take1 > ok1 > mark
top > mark

Status:
ACTIVE1: multiset
cons2: multiset
zeros: multiset
mark: multiset
0: multiset
tt: multiset
U121: multiset
s1: [1]
length1: [1]
U211: [1]
U221: [1]
U231: [1]
take1: [1]
nil: multiset
proper1: [1]
ok1: multiset
top: multiset

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

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

(94) PisEmptyProof (EQUIVALENT transformation)

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

(95) TRUE

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