(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

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

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 12 SCCs with 31 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

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

TAKE(X1, mark(X2)) → TAKE(X1, X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)

The TRS R consists of the following rules:

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

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

(6) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
active1 > zeros > cons2 > U214 > ok1
active1 > 0 > nil > ok1
active1 > U111 > U122 > ok1
active1 > tt > cons2 > U214 > ok1
active1 > tt > U122 > ok1
active1 > tt > length1 > ok1
active1 > tt > U224 > U234 > ok1
active1 > tt > take2 > U214 > ok1
proper1 > zeros > cons2 > U214 > ok1
proper1 > U111 > U122 > ok1
proper1 > tt > cons2 > U214 > ok1
proper1 > tt > U122 > ok1
proper1 > tt > length1 > ok1
proper1 > tt > U224 > U234 > ok1
proper1 > tt > take2 > U214 > ok1
proper1 > nil > ok1

Status:
TAKE1: [1]
U234: [3,4,1,2]
U224: [1,3,4,2]
ok1: [1]
U122: [1,2]
U214: [3,1,4,2]
take2: [1,2]
0: []
active1: [1]
cons2: [1,2]
tt: []
zeros: []
U111: [1]
proper1: [1]
length1: [1]
top: []
nil: []

The following usable rules [FROCOS05] were oriented:

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

(7) Obligation:

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

TAKE(X1, mark(X2)) → TAKE(X1, X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)

The TRS R consists of the following rules:

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

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

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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

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

The following usable rules [FROCOS05] were oriented:

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

(9) Obligation:

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

TAKE(mark(X1), X2) → TAKE(X1, X2)

The TRS R consists of the following rules:

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

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

(10) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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

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

The following usable rules [FROCOS05] were oriented:

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

(11) Obligation:

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

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

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

(12) PisEmptyProof (EQUIVALENT transformation)

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

(13) TRUE

(14) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(15) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
U23^11 > mark
nil > ok1 > mark
nil > 0 > mark
proper1 > zeros > mark
proper1 > 0 > mark
proper1 > U121 > ok1 > mark
proper1 > U211 > tt > ok1 > mark
proper1 > U221 > tt > ok1 > mark
proper1 > U231 > cons1 > ok1 > mark
top > active1 > zeros > mark
top > active1 > cons1 > ok1 > mark
top > active1 > 0 > mark
top > active1 > tt > ok1 > mark
top > active1 > U121 > ok1 > mark

Status:
cons1: [1]
ok1: [1]
U23^11: [1]
0: []
U231: [1]
active1: [1]
U221: [1]
tt: []
zeros: []
mark: []
U121: [1]
proper1: [1]
top: []
nil: []
U211: [1]

The following usable rules [FROCOS05] were oriented:

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

(16) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(17) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
zeros > cons2 > mark1 > U23^11 > tt
zeros > 0 > tt
top > active1 > U112 > mark1 > U23^11 > tt
top > active1 > U122 > mark1 > U23^11 > tt
top > active1 > U224 > mark1 > U23^11 > tt
top > active1 > U234 > cons2 > mark1 > U23^11 > tt
top > active1 > take2 > U214 > mark1 > U23^11 > tt
top > active1 > nil > mark1 > U23^11 > tt
top > active1 > nil > 0 > tt

Status:
U234: [2,1,4,3]
U224: [2,1,3,4]
mark1: [1]
U122: [2,1]
U112: [2,1]
U23^11: [1]
take2: [2,1]
U214: [1,2,3,4]
0: []
cons2: [2,1]
active1: [1]
tt: []
zeros: []
top: []
nil: []

The following usable rules [FROCOS05] were oriented:

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

(18) Obligation:

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

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

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

(19) PisEmptyProof (EQUIVALENT transformation)

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

(20) TRUE

(21) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(22) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
U22^11 > mark
nil > ok1 > mark
nil > 0 > mark
proper1 > zeros > mark
proper1 > 0 > mark
proper1 > U121 > ok1 > mark
proper1 > U211 > tt > ok1 > mark
proper1 > U221 > tt > ok1 > mark
proper1 > U231 > cons1 > ok1 > mark
top > active1 > zeros > mark
top > active1 > cons1 > ok1 > mark
top > active1 > 0 > mark
top > active1 > tt > ok1 > mark
top > active1 > U121 > ok1 > mark

Status:
cons1: [1]
ok1: [1]
0: []
U231: [1]
active1: [1]
U221: [1]
tt: []
U22^11: [1]
zeros: []
mark: []
U121: [1]
proper1: [1]
top: []
nil: []
U211: [1]

The following usable rules [FROCOS05] were oriented:

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

(23) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(24) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
zeros > cons2 > mark1 > U22^11 > tt
zeros > 0 > tt
top > active1 > U112 > mark1 > U22^11 > tt
top > active1 > U122 > mark1 > U22^11 > tt
top > active1 > U224 > mark1 > U22^11 > tt
top > active1 > U234 > cons2 > mark1 > U22^11 > tt
top > active1 > take2 > U214 > mark1 > U22^11 > tt
top > active1 > nil > mark1 > U22^11 > tt
top > active1 > nil > 0 > tt

Status:
U234: [2,1,4,3]
U224: [2,1,3,4]
mark1: [1]
U122: [2,1]
U112: [2,1]
take2: [2,1]
U214: [1,2,3,4]
0: []
cons2: [2,1]
active1: [1]
tt: []
U22^11: [1]
zeros: []
top: []
nil: []

The following usable rules [FROCOS05] were oriented:

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

(25) Obligation:

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

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

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

(26) PisEmptyProof (EQUIVALENT transformation)

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

(27) TRUE

(28) Obligation:

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

U211(ok(X1), ok(X2), ok(X3), ok(X4)) → U211(X1, X2, X3, X4)
U211(mark(X1), X2, X3, X4) → U211(X1, X2, X3, X4)

The TRS R consists of the following rules:

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

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

(29) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
zeros > cons1 > ok1
zeros > cons1 > mark
0 > nil > ok1
0 > nil > mark
tt > cons1 > ok1
tt > cons1 > mark
tt > length1 > ok1
tt > length1 > mark
tt > U234 > ok1
tt > U234 > mark
tt > take1 > ok1
tt > take1 > mark
proper1 > U212 > active1 > cons1 > ok1
proper1 > U212 > active1 > cons1 > mark
proper1 > U212 > active1 > U111 > ok1
proper1 > U212 > active1 > U111 > mark
proper1 > U212 > active1 > length1 > ok1
proper1 > U212 > active1 > length1 > mark
proper1 > U212 > active1 > U234 > ok1
proper1 > U212 > active1 > U234 > mark
proper1 > U212 > active1 > take1 > ok1
proper1 > U212 > active1 > take1 > mark
proper1 > nil > ok1
proper1 > nil > mark
top > active1 > cons1 > ok1
top > active1 > cons1 > mark
top > active1 > U111 > ok1
top > active1 > U111 > mark
top > active1 > length1 > ok1
top > active1 > length1 > mark
top > active1 > U234 > ok1
top > active1 > U234 > mark
top > active1 > take1 > ok1
top > active1 > take1 > mark

Status:
cons1: [1]
U234: [2,4,3,1]
ok1: [1]
0: []
U212: [2,1]
active1: [1]
tt: []
zeros: []
mark: []
U111: [1]
proper1: [1]
length1: [1]
top: []
take1: [1]
nil: []

The following usable rules [FROCOS05] were oriented:

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

(30) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(31) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
active1 > zeros > ok > cons2 > mark1 > top > U21^11
active1 > zeros > ok > length1 > mark1 > top > U21^11
active1 > 0 > nil > ok > cons2 > mark1 > top > U21^11
active1 > 0 > nil > ok > length1 > mark1 > top > U21^11
active1 > U112 > tt > U234 > ok > cons2 > mark1 > top > U21^11
active1 > U112 > tt > U234 > ok > length1 > mark1 > top > U21^11
active1 > U112 > tt > take2 > nil > ok > cons2 > mark1 > top > U21^11
active1 > U112 > tt > take2 > nil > ok > length1 > mark1 > top > U21^11
active1 > U122 > ok > cons2 > mark1 > top > U21^11
active1 > U122 > ok > length1 > mark1 > top > U21^11
active1 > s1 > tt > U234 > ok > cons2 > mark1 > top > U21^11
active1 > s1 > tt > U234 > ok > length1 > mark1 > top > U21^11
active1 > s1 > tt > take2 > nil > ok > cons2 > mark1 > top > U21^11
active1 > s1 > tt > take2 > nil > ok > length1 > mark1 > top > U21^11
active1 > U214 > tt > U234 > ok > cons2 > mark1 > top > U21^11
active1 > U214 > tt > U234 > ok > length1 > mark1 > top > U21^11
active1 > U214 > tt > take2 > nil > ok > cons2 > mark1 > top > U21^11
active1 > U214 > tt > take2 > nil > ok > length1 > mark1 > top > U21^11
active1 > U224 > tt > U234 > ok > cons2 > mark1 > top > U21^11
active1 > U224 > tt > U234 > ok > length1 > mark1 > top > U21^11
active1 > U224 > tt > take2 > nil > ok > cons2 > mark1 > top > U21^11
active1 > U224 > tt > take2 > nil > ok > length1 > mark1 > top > U21^11

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

The following usable rules [FROCOS05] were oriented:

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

(32) Obligation:

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

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

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

(33) PisEmptyProof (EQUIVALENT transformation)

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

(34) TRUE

(35) Obligation:

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

LENGTH(ok(X)) → LENGTH(X)
LENGTH(mark(X)) → LENGTH(X)

The TRS R consists of the following rules:

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

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

(36) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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

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

The following usable rules [FROCOS05] were oriented:

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

(37) Obligation:

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

LENGTH(ok(X)) → LENGTH(X)

The TRS R consists of the following rules:

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

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

(38) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
LENGTH1 > mark
nil > ok1 > mark
nil > 0 > mark
top > active1 > zeros > mark
top > active1 > tt > ok1 > mark
top > active1 > U121 > ok1 > mark
top > active1 > length1 > 0 > mark
top > active1 > length1 > U112 > ok1 > mark
top > active1 > U211 > ok1 > mark
top > active1 > U233 > ok1 > mark
top > active1 > take2 > ok1 > mark
top > proper1 > zeros > mark
top > proper1 > tt > ok1 > mark
top > proper1 > U121 > ok1 > mark
top > proper1 > length1 > 0 > mark
top > proper1 > length1 > U112 > ok1 > mark
top > proper1 > U211 > ok1 > mark
top > proper1 > U233 > ok1 > mark
top > proper1 > take2 > ok1 > mark

Status:
LENGTH1: [1]
ok1: [1]
U112: [1,2]
take2: [1,2]
0: []
active1: [1]
U233: [2,1,3]
tt: []
zeros: []
mark: []
U121: [1]
proper1: [1]
length1: [1]
top: []
nil: []
U211: [1]

The following usable rules [FROCOS05] were oriented:

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

(39) Obligation:

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

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

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

(40) PisEmptyProof (EQUIVALENT transformation)

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

(41) TRUE

(42) Obligation:

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

S(ok(X)) → S(X)
S(mark(X)) → S(X)

The TRS R consists of the following rules:

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

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

(43) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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

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

The following usable rules [FROCOS05] were oriented:

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

(44) Obligation:

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

S(ok(X)) → S(X)

The TRS R consists of the following rules:

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

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

(45) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
S1 > mark
nil > ok1 > mark
nil > 0 > mark
top > active1 > zeros > mark
top > active1 > tt > ok1 > mark
top > active1 > U121 > ok1 > mark
top > active1 > length1 > 0 > mark
top > active1 > length1 > U112 > ok1 > mark
top > active1 > U211 > ok1 > mark
top > active1 > U233 > ok1 > mark
top > active1 > take2 > ok1 > mark
top > proper1 > zeros > mark
top > proper1 > tt > ok1 > mark
top > proper1 > U121 > ok1 > mark
top > proper1 > length1 > 0 > mark
top > proper1 > length1 > U112 > ok1 > mark
top > proper1 > U211 > ok1 > mark
top > proper1 > U233 > ok1 > mark
top > proper1 > take2 > ok1 > mark

Status:
ok1: [1]
U112: [1,2]
take2: [1,2]
0: []
active1: [1]
U233: [2,1,3]
tt: []
zeros: []
mark: []
U121: [1]
proper1: [1]
length1: [1]
top: []
nil: []
U211: [1]
S1: [1]

The following usable rules [FROCOS05] were oriented:

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

(46) Obligation:

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

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

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

(47) PisEmptyProof (EQUIVALENT transformation)

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

(48) TRUE

(49) Obligation:

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

U121(ok(X1), ok(X2)) → U121(X1, X2)
U121(mark(X1), X2) → U121(X1, X2)

The TRS R consists of the following rules:

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

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

(50) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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

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

The following usable rules [FROCOS05] were oriented:

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

(51) Obligation:

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

U121(ok(X1), ok(X2)) → U121(X1, X2)

The TRS R consists of the following rules:

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

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

(52) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
zeros > ok1 > top > mark
zeros > 0 > mark
tt > length1 > ok1 > top > mark
tt > length1 > 0 > mark
tt > U223 > ok1 > top > mark
tt > take1 > ok1 > top > mark
tt > take1 > nil > 0 > mark
proper1 > length1 > ok1 > top > mark
proper1 > length1 > 0 > mark
proper1 > U212 > ok1 > top > mark
proper1 > U223 > ok1 > top > mark
proper1 > take1 > ok1 > top > mark
proper1 > take1 > nil > 0 > mark

Status:
ok1: [1]
0: []
U212: [2,1]
tt: []
U223: [1,2,3]
zeros: []
mark: []
proper1: [1]
length1: [1]
top: []
take1: [1]
nil: []

The following usable rules [FROCOS05] were oriented:

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

(53) Obligation:

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

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

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

(54) PisEmptyProof (EQUIVALENT transformation)

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

(55) TRUE

(56) Obligation:

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

U111(ok(X1), ok(X2)) → U111(X1, X2)
U111(mark(X1), X2) → U111(X1, X2)

The TRS R consists of the following rules:

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

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

(57) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
active1 > zeros > mark
active1 > 0 > nil > mark
active1 > U122 > ok1 > U11^11 > mark
active1 > U122 > ok1 > top > mark
active1 > s1 > U213 > ok1 > U11^11 > mark
active1 > s1 > U213 > ok1 > top > mark
active1 > s1 > U213 > tt > mark
active1 > U223 > tt > mark
active1 > U223 > U233 > ok1 > U11^11 > mark
active1 > U223 > U233 > ok1 > top > mark
active1 > take1 > U213 > ok1 > U11^11 > mark
active1 > take1 > U213 > ok1 > top > mark
active1 > take1 > U213 > tt > mark
active1 > take1 > nil > mark
proper1 > zeros > mark
proper1 > 0 > nil > mark
proper1 > U122 > ok1 > U11^11 > mark
proper1 > U122 > ok1 > top > mark
proper1 > s1 > U213 > ok1 > U11^11 > mark
proper1 > s1 > U213 > ok1 > top > mark
proper1 > s1 > U213 > tt > mark
proper1 > U223 > tt > mark
proper1 > U223 > U233 > ok1 > U11^11 > mark
proper1 > U223 > U233 > ok1 > top > mark
proper1 > take1 > U213 > ok1 > U11^11 > mark
proper1 > take1 > U213 > ok1 > top > mark
proper1 > take1 > U213 > tt > mark
proper1 > take1 > nil > mark

Status:
U11^11: [1]
ok1: [1]
U122: [2,1]
0: []
active1: [1]
U233: [1,3,2]
tt: []
U223: [3,2,1]
zeros: []
mark: []
s1: [1]
proper1: [1]
top: []
take1: [1]
U213: [1,2,3]
nil: []

The following usable rules [FROCOS05] were oriented:

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

(58) Obligation:

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

U111(mark(X1), X2) → U111(X1, X2)

The TRS R consists of the following rules:

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

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

(59) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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

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

The following usable rules [FROCOS05] were oriented:

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

(60) Obligation:

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

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

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

(61) PisEmptyProof (EQUIVALENT transformation)

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

(62) TRUE

(63) Obligation:

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

CONS(ok(X1), ok(X2)) → CONS(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)

The TRS R consists of the following rules:

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

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

(64) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
active1 > zeros > mark
active1 > 0 > nil > mark
active1 > U122 > ok1 > CONS1 > mark
active1 > U122 > ok1 > top > mark
active1 > s1 > U213 > ok1 > CONS1 > mark
active1 > s1 > U213 > ok1 > top > mark
active1 > s1 > U213 > tt > mark
active1 > U223 > tt > mark
active1 > U223 > U233 > ok1 > CONS1 > mark
active1 > U223 > U233 > ok1 > top > mark
active1 > take1 > U213 > ok1 > CONS1 > mark
active1 > take1 > U213 > ok1 > top > mark
active1 > take1 > U213 > tt > mark
active1 > take1 > nil > mark
proper1 > zeros > mark
proper1 > 0 > nil > mark
proper1 > U122 > ok1 > CONS1 > mark
proper1 > U122 > ok1 > top > mark
proper1 > s1 > U213 > ok1 > CONS1 > mark
proper1 > s1 > U213 > ok1 > top > mark
proper1 > s1 > U213 > tt > mark
proper1 > U223 > tt > mark
proper1 > U223 > U233 > ok1 > CONS1 > mark
proper1 > U223 > U233 > ok1 > top > mark
proper1 > take1 > U213 > ok1 > CONS1 > mark
proper1 > take1 > U213 > ok1 > top > mark
proper1 > take1 > U213 > tt > mark
proper1 > take1 > nil > mark

Status:
CONS1: [1]
ok1: [1]
U122: [2,1]
0: []
active1: [1]
U233: [1,3,2]
tt: []
U223: [3,2,1]
zeros: []
mark: []
s1: [1]
proper1: [1]
top: []
take1: [1]
U213: [1,2,3]
nil: []

The following usable rules [FROCOS05] were oriented:

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

(65) Obligation:

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

CONS(mark(X1), X2) → CONS(X1, X2)

The TRS R consists of the following rules:

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

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

(66) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

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

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

The following usable rules [FROCOS05] were oriented:

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

(67) Obligation:

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

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

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

(68) PisEmptyProof (EQUIVALENT transformation)

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

(69) TRUE

(70) Obligation:

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

PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(U11(X1, X2)) → PROPER(X1)
PROPER(U11(X1, X2)) → PROPER(X2)
PROPER(U12(X1, X2)) → PROPER(X1)
PROPER(U12(X1, X2)) → PROPER(X2)
PROPER(s(X)) → PROPER(X)
PROPER(length(X)) → PROPER(X)
PROPER(U21(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U21(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U21(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U21(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U22(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U22(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U22(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U22(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U23(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U23(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U23(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U23(X1, X2, X3, X4)) → PROPER(X4)
PROPER(take(X1, X2)) → PROPER(X1)
PROPER(take(X1, X2)) → PROPER(X2)

The TRS R consists of the following rules:

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

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

(71) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
PROPER1 > top
active1 > mark > proper1 > U112 > top
active1 > mark > proper1 > U122 > top
active1 > mark > proper1 > U214 > top
active1 > mark > proper1 > U224 > top
active1 > mark > proper1 > U234 > cons2 > top
active1 > mark > proper1 > U234 > take2 > top
active1 > mark > proper1 > zeros > cons2 > top
active1 > 0 > top
active1 > nil > top
tt > mark > proper1 > U112 > top
tt > mark > proper1 > U122 > top
tt > mark > proper1 > U214 > top
tt > mark > proper1 > U224 > top
tt > mark > proper1 > U234 > cons2 > top
tt > mark > proper1 > U234 > take2 > top
tt > mark > proper1 > zeros > cons2 > top

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

The following usable rules [FROCOS05] were oriented:

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

(72) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(73) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
top > active1 > zeros > U112
top > active1 > 0 > nil > ok > s1 > PROPER1 > U112
top > active1 > 0 > nil > ok > U222 > U112
top > active1 > U121 > s1 > PROPER1 > U112
top > active1 > U211 > tt > U222 > U112
top > active1 > U211 > ok > s1 > PROPER1 > U112
top > active1 > U211 > ok > U222 > U112
top > proper1 > zeros > U112
top > proper1 > U121 > s1 > PROPER1 > U112
top > proper1 > U211 > tt > U222 > U112
top > proper1 > U211 > ok > s1 > PROPER1 > U112
top > proper1 > U211 > ok > U222 > U112

Status:
PROPER1: [1]
U222: [2,1]
U112: [2,1]
0: []
active1: [1]
tt: []
zeros: []
U121: [1]
ok: []
s1: [1]
proper1: [1]
top: []
nil: []
U211: [1]

The following usable rules [FROCOS05] were oriented:

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

(74) Obligation:

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

PROPER(length(X)) → PROPER(X)

The TRS R consists of the following rules:

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

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

(75) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROPER(length(X)) → PROPER(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PROPER(x1)  =  PROPER(x1)
length(x1)  =  length(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)  =  x2
s(x1)  =  x1
U21(x1, x2, x3, x4)  =  U21(x1, x3)
U22(x1, x2, x3, x4)  =  x3
U23(x1, x2, x3, x4)  =  x3
take(x1, x2)  =  take(x1)
nil  =  nil
proper(x1)  =  proper(x1)
ok(x1)  =  ok
top(x1)  =  top

Lexicographic path order with status [LPO].
Precedence:
top > active1 > length1
top > active1 > zeros > 0
top > active1 > zeros > ok
top > active1 > tt
top > active1 > U212
top > active1 > take1
top > active1 > nil
top > proper1 > length1
top > proper1 > zeros > 0
top > proper1 > zeros > ok
top > proper1 > tt
top > proper1 > U212
top > proper1 > take1
top > proper1 > nil

Status:
PROPER1: [1]
0: []
U212: [2,1]
active1: [1]
tt: []
zeros: []
ok: []
proper1: [1]
length1: [1]
top: []
take1: [1]
nil: []

The following usable rules [FROCOS05] were oriented:

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

(76) Obligation:

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

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

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

(77) PisEmptyProof (EQUIVALENT transformation)

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

(78) TRUE

(79) Obligation:

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

ACTIVE(U11(X1, X2)) → ACTIVE(X1)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(length(X)) → ACTIVE(X)
ACTIVE(U21(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(U22(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(U23(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → ACTIVE(X2)

The TRS R consists of the following rules:

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

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

(80) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
ACTIVE1 > U111
nil > 0 > mark > length1 > tt > take2 > U111
nil > 0 > mark > length1 > ok > U213 > U111
nil > 0 > mark > length1 > ok > take2 > U111
nil > 0 > mark > U233 > ok > U213 > U111
nil > 0 > mark > U233 > ok > take2 > U111
top > active1 > zeros > U111
top > active1 > mark > length1 > tt > take2 > U111
top > active1 > mark > length1 > ok > U213 > U111
top > active1 > mark > length1 > ok > take2 > U111
top > active1 > mark > U233 > ok > U213 > U111
top > active1 > mark > U233 > ok > take2 > U111
top > proper1 > length1 > tt > take2 > U111
top > proper1 > length1 > ok > U213 > U111
top > proper1 > length1 > ok > take2 > U111
top > proper1 > U233 > ok > U213 > U111
top > proper1 > U233 > ok > take2 > U111
top > proper1 > zeros > U111

Status:
take2: [2,1]
0: []
ACTIVE1: [1]
active1: [1]
U233: [2,1,3]
tt: []
zeros: []
mark: []
U111: [1]
ok: []
proper1: [1]
length1: [1]
top: []
U213: [1,3,2]
nil: []

The following usable rules [FROCOS05] were oriented:

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

(81) Obligation:

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

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

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

Lexicographic path order with status [LPO].
Precedence:
zeros > ok > U224 > ACTIVE1 > mark
zeros > ok > U224 > U233 > mark
zeros > ok > length1 > mark
U11 > active1 > U224 > ACTIVE1 > mark
U11 > active1 > U224 > U233 > mark
U11 > active1 > length1 > mark
U11 > ok > U224 > ACTIVE1 > mark
U11 > ok > U224 > U233 > mark
U11 > ok > length1 > mark
U21 > active1 > U224 > ACTIVE1 > mark
U21 > active1 > U224 > U233 > mark
U21 > active1 > length1 > mark
U21 > tt > ok > U224 > ACTIVE1 > mark
U21 > tt > ok > U224 > U233 > mark
U21 > tt > ok > length1 > mark
nil > 0 > ok > U224 > ACTIVE1 > mark
nil > 0 > ok > U224 > U233 > mark
nil > 0 > ok > length1 > mark
top > active1 > U224 > ACTIVE1 > mark
top > active1 > U224 > U233 > mark
top > active1 > length1 > mark

Status:
U21: []
U224: [1,2,3,4]
U11: []
0: []
ACTIVE1: [1]
active1: [1]
U233: [3,2,1]
tt: []
zeros: []
mark: []
ok: []
length1: [1]
top: []
nil: []

The following usable rules [FROCOS05] were oriented:

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

(83) Obligation:

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

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.

(84) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
zeros > mark > U122 > s1 > U224
zeros > mark > U233 > cons2 > U224
zeros > ok > active1 > U122 > s1 > U224
zeros > ok > active1 > 0 > U224
zeros > ok > active1 > U233 > cons2 > U224
U11 > proper1 > nil > mark > U122 > s1 > U224
U11 > proper1 > nil > mark > U233 > cons2 > U224
U11 > proper1 > nil > ok > active1 > U122 > s1 > U224
U11 > proper1 > nil > ok > active1 > 0 > U224
U11 > proper1 > nil > ok > active1 > U233 > cons2 > U224
tt > mark > U122 > s1 > U224
tt > mark > U233 > cons2 > U224
tt > ok > active1 > U122 > s1 > U224
tt > ok > active1 > 0 > U224
tt > ok > active1 > U233 > cons2 > U224
length > proper1 > nil > mark > U122 > s1 > U224
length > proper1 > nil > mark > U233 > cons2 > U224
length > proper1 > nil > ok > active1 > U122 > s1 > U224
length > proper1 > nil > ok > active1 > 0 > U224
length > proper1 > nil > ok > active1 > U233 > cons2 > U224
U21 > proper1 > nil > mark > U122 > s1 > U224
U21 > proper1 > nil > mark > U233 > cons2 > U224
U21 > proper1 > nil > ok > active1 > U122 > s1 > U224
U21 > proper1 > nil > ok > active1 > 0 > U224
U21 > proper1 > nil > ok > active1 > U233 > cons2 > U224
take > proper1 > nil > mark > U122 > s1 > U224
take > proper1 > nil > mark > U233 > cons2 > U224
take > proper1 > nil > ok > active1 > U122 > s1 > U224
take > proper1 > nil > ok > active1 > 0 > U224
take > proper1 > nil > ok > active1 > U233 > cons2 > U224
top > active1 > U122 > s1 > U224
top > active1 > 0 > U224
top > active1 > U233 > cons2 > U224

Status:
U21: []
U224: [2,1,4,3]
U11: []
U122: [1,2]
length: []
0: []
take: []
cons2: [1,2]
active1: [1]
U233: [2,3,1]
tt: []
zeros: []
mark: []
s1: [1]
ok: []
proper1: [1]
top: []
nil: []

The following usable rules [FROCOS05] were oriented:

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

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

(86) PisEmptyProof (EQUIVALENT transformation)

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

(87) TRUE

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