(0) Obligation:

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

active(zeros) → mark(cons(0, zeros))
active(and(tt, X)) → mark(X)
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

Q is empty.

(1) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(active(x1)) = x1   
POL(and(x1, x2)) = 1 + 2·x1 + x2   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = 2 + x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 2·x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

active(and(tt, X)) → mark(X)
active(length(nil)) → mark(0)


(2) Obligation:

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

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

Q is empty.

(3) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(active(x1)) = x1   
POL(and(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = 2·x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 1 + 2·x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

active(take(0, IL)) → mark(nil)


(4) Obligation:

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

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

Q is empty.

(5) DependencyPairsProof (EQUIVALENT transformation)

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

(6) Obligation:

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

ACTIVE(zeros) → MARK(cons(0, zeros))
ACTIVE(zeros) → CONS(0, zeros)
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
ACTIVE(length(cons(N, L))) → S(length(L))
ACTIVE(length(cons(N, L))) → LENGTH(L)
ACTIVE(take(s(M), cons(N, IL))) → MARK(cons(N, take(M, IL)))
ACTIVE(take(s(M), cons(N, IL))) → CONS(N, take(M, IL))
ACTIVE(take(s(M), cons(N, IL))) → TAKE(M, IL)
MARK(zeros) → ACTIVE(zeros)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
MARK(cons(X1, X2)) → MARK(X1)
MARK(0) → ACTIVE(0)
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(and(X1, X2)) → AND(mark(X1), X2)
MARK(and(X1, X2)) → MARK(X1)
MARK(tt) → ACTIVE(tt)
MARK(length(X)) → ACTIVE(length(mark(X)))
MARK(length(X)) → LENGTH(mark(X))
MARK(length(X)) → MARK(X)
MARK(nil) → ACTIVE(nil)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → S(mark(X))
MARK(s(X)) → MARK(X)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))
MARK(take(X1, X2)) → TAKE(mark(X1), mark(X2))
MARK(take(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → MARK(X2)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)
AND(mark(X1), X2) → AND(X1, X2)
AND(X1, mark(X2)) → AND(X1, X2)
AND(active(X1), X2) → AND(X1, X2)
AND(X1, active(X2)) → AND(X1, X2)
LENGTH(mark(X)) → LENGTH(X)
LENGTH(active(X)) → LENGTH(X)
S(mark(X)) → S(X)
S(active(X)) → S(X)
TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(X1, mark(X2)) → TAKE(X1, X2)
TAKE(active(X1), X2) → TAKE(X1, X2)
TAKE(X1, active(X2)) → TAKE(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

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

(8) Complex Obligation (AND)

(9) Obligation:

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

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

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(10) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • TAKE(X1, mark(X2)) → TAKE(X1, X2)
    The graph contains the following edges 1 >= 1, 2 > 2

  • TAKE(mark(X1), X2) → TAKE(X1, X2)
    The graph contains the following edges 1 > 1, 2 >= 2

  • TAKE(active(X1), X2) → TAKE(X1, X2)
    The graph contains the following edges 1 > 1, 2 >= 2

  • TAKE(X1, active(X2)) → TAKE(X1, X2)
    The graph contains the following edges 1 >= 1, 2 > 2

(11) YES

(12) Obligation:

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

S(active(X)) → S(X)
S(mark(X)) → S(X)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(13) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • S(active(X)) → S(X)
    The graph contains the following edges 1 > 1

  • S(mark(X)) → S(X)
    The graph contains the following edges 1 > 1

(14) YES

(15) Obligation:

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

LENGTH(active(X)) → LENGTH(X)
LENGTH(mark(X)) → LENGTH(X)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(16) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LENGTH(active(X)) → LENGTH(X)
    The graph contains the following edges 1 > 1

  • LENGTH(mark(X)) → LENGTH(X)
    The graph contains the following edges 1 > 1

(17) YES

(18) Obligation:

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

AND(X1, mark(X2)) → AND(X1, X2)
AND(mark(X1), X2) → AND(X1, X2)
AND(active(X1), X2) → AND(X1, X2)
AND(X1, active(X2)) → AND(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(19) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • AND(X1, mark(X2)) → AND(X1, X2)
    The graph contains the following edges 1 >= 1, 2 > 2

  • AND(mark(X1), X2) → AND(X1, X2)
    The graph contains the following edges 1 > 1, 2 >= 2

  • AND(active(X1), X2) → AND(X1, X2)
    The graph contains the following edges 1 > 1, 2 >= 2

  • AND(X1, active(X2)) → AND(X1, X2)
    The graph contains the following edges 1 >= 1, 2 > 2

(20) YES

(21) Obligation:

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

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

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(22) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • CONS(X1, mark(X2)) → CONS(X1, X2)
    The graph contains the following edges 1 >= 1, 2 > 2

  • CONS(mark(X1), X2) → CONS(X1, X2)
    The graph contains the following edges 1 > 1, 2 >= 2

  • CONS(active(X1), X2) → CONS(X1, X2)
    The graph contains the following edges 1 > 1, 2 >= 2

  • CONS(X1, active(X2)) → CONS(X1, X2)
    The graph contains the following edges 1 >= 1, 2 > 2

(23) YES

(24) Obligation:

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

MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(zeros) → ACTIVE(zeros)
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
ACTIVE(take(s(M), cons(N, IL))) → MARK(cons(N, take(M, IL)))
MARK(and(X1, X2)) → MARK(X1)
MARK(length(X)) → ACTIVE(length(mark(X)))
MARK(length(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → MARK(X)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))
MARK(take(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → MARK(X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(25) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

MARK(and(X1, X2)) → MARK(X1)


Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(ACTIVE(x1)) = 2·x1   
POL(MARK(x1)) = 2·x1   
POL(active(x1)) = x1   
POL(and(x1, x2)) = 1 + x1 + 2·x2   
POL(cons(x1, x2)) = 2·x1 + 2·x2   
POL(length(x1)) = x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 2·x1   
POL(take(x1, x2)) = x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 0   

(26) Obligation:

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

MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(zeros) → ACTIVE(zeros)
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
ACTIVE(take(s(M), cons(N, IL))) → MARK(cons(N, take(M, IL)))
MARK(length(X)) → ACTIVE(length(mark(X)))
MARK(length(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → MARK(X)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))
MARK(take(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → MARK(X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(27) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

MARK(take(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → MARK(X2)


Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(ACTIVE(x1)) = 2·x1   
POL(MARK(x1)) = 2·x1   
POL(active(x1)) = x1   
POL(and(x1, x2)) = 2·x1 + 2·x2   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 2 + x1 + x2   
POL(tt) = 2   
POL(zeros) = 0   

(28) Obligation:

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

MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(zeros) → ACTIVE(zeros)
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
ACTIVE(take(s(M), cons(N, IL))) → MARK(cons(N, take(M, IL)))
MARK(length(X)) → ACTIVE(length(mark(X)))
MARK(length(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → MARK(X)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(29) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

MARK(length(X)) → MARK(X)


Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(ACTIVE(x1)) = 2·x1   
POL(MARK(x1)) = 2·x1   
POL(active(x1)) = x1   
POL(and(x1, x2)) = x1 + 2·x2   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = 1 + 2·x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 0   

(30) Obligation:

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

MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(zeros) → ACTIVE(zeros)
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
ACTIVE(take(s(M), cons(N, IL))) → MARK(cons(N, take(M, IL)))
MARK(length(X)) → ACTIVE(length(mark(X)))
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → MARK(X)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(31) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(s(X)) → ACTIVE(s(mark(X)))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = 1   
POL(active(x1)) = 0   
POL(and(x1, x2)) = 0   
POL(cons(x1, x2)) = 0   
POL(length(x1)) = 1   
POL(mark(x1)) = 0   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(take(x1, x2)) = 1   
POL(tt) = 0   
POL(zeros) = 1   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

cons(X1, mark(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
and(X1, mark(X2)) → and(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(mark(X1), X2) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

(32) Obligation:

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

ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(zeros) → ACTIVE(zeros)
ACTIVE(zeros) → MARK(cons(0, zeros))
ACTIVE(take(s(M), cons(N, IL))) → MARK(cons(N, take(M, IL)))
MARK(length(X)) → ACTIVE(length(mark(X)))
MARK(s(X)) → MARK(X)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(33) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


ACTIVE(take(s(M), cons(N, IL))) → MARK(cons(N, take(M, IL)))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ACTIVE(x1)  =  ACTIVE(x1)
length(x1)  =  length
cons(x1, x2)  =  x1
MARK(x1)  =  MARK(x1)
s(x1)  =  x1
zeros  =  zeros
0  =  0
take(x1, x2)  =  take(x2)
mark(x1)  =  x1
active(x1)  =  x1
and(x1, x2)  =  and
tt  =  tt
nil  =  nil

Recursive path order with status [RPO].
Quasi-Precedence:
[ACTIVE1, MARK1, zeros, 0] > length
[ACTIVE1, MARK1, zeros, 0] > take1

Status:
ACTIVE1: [1]
length: multiset
MARK1: [1]
zeros: multiset
0: multiset
take1: multiset
and: []
tt: multiset
nil: multiset


The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
take(X1, mark(X2)) → take(X1, X2)
take(mark(X1), X2) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(and(X1, X2)) → active(and(mark(X1), X2))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(tt) → active(tt)
mark(nil) → active(nil)
and(X1, mark(X2)) → and(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)

(34) Obligation:

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

ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(zeros) → ACTIVE(zeros)
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(length(X)) → ACTIVE(length(mark(X)))
MARK(s(X)) → MARK(X)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(35) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Quasi-Precedence:
[ACTIVE1, MARK1] > length > cons1
[ACTIVE1, MARK1] > zeros > 0 > cons1
[ACTIVE1, MARK1] > take > cons1
and > cons1
tt > cons1
nil > cons1

Status:
ACTIVE1: [1]
length: multiset
cons1: multiset
MARK1: [1]
zeros: multiset
0: multiset
take: multiset
and: multiset
tt: multiset
nil: multiset


The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
take(X1, mark(X2)) → take(X1, X2)
take(mark(X1), X2) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

(36) Obligation:

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

ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(zeros) → ACTIVE(zeros)
MARK(length(X)) → ACTIVE(length(mark(X)))
MARK(s(X)) → MARK(X)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(37) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(38) Obligation:

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

MARK(length(X)) → ACTIVE(length(mark(X)))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → MARK(X)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(39) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(ACTIVE(x1)) = 0   
POL(MARK(x1)) = x1   
POL(active(x1)) = x1   
POL(and(x1, x2)) = 0   
POL(cons(x1, x2)) = 0   
POL(length(x1)) = 0   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 1   
POL(tt) = 0   
POL(zeros) = 1   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)

(40) Obligation:

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

MARK(length(X)) → ACTIVE(length(mark(X)))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(41) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule MARK(length(X)) → ACTIVE(length(mark(X))) at position [0] we obtained the following new rules [LPAR04]:

MARK(length(x0)) → ACTIVE(length(x0))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
MARK(length(0)) → ACTIVE(length(active(0)))
MARK(length(and(x0, x1))) → ACTIVE(length(active(and(mark(x0), x1))))
MARK(length(tt)) → ACTIVE(length(active(tt)))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(nil)) → ACTIVE(length(active(nil)))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(take(x0, x1))) → ACTIVE(length(active(take(mark(x0), mark(x1)))))

(42) Obligation:

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

ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → MARK(X)
MARK(length(x0)) → ACTIVE(length(x0))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
MARK(length(0)) → ACTIVE(length(active(0)))
MARK(length(and(x0, x1))) → ACTIVE(length(active(and(mark(x0), x1))))
MARK(length(tt)) → ACTIVE(length(active(tt)))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(nil)) → ACTIVE(length(active(nil)))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(take(x0, x1))) → ACTIVE(length(active(take(mark(x0), mark(x1)))))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(43) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule MARK(length(0)) → ACTIVE(length(active(0))) at position [0] we obtained the following new rules [LPAR04]:

MARK(length(0)) → ACTIVE(length(0))

(44) Obligation:

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

ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(s(X)) → MARK(X)
MARK(length(x0)) → ACTIVE(length(x0))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
MARK(length(and(x0, x1))) → ACTIVE(length(active(and(mark(x0), x1))))
MARK(length(tt)) → ACTIVE(length(active(tt)))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(nil)) → ACTIVE(length(active(nil)))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(take(x0, x1))) → ACTIVE(length(active(take(mark(x0), mark(x1)))))
MARK(length(0)) → ACTIVE(length(0))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(45) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(46) Obligation:

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

MARK(s(X)) → MARK(X)
MARK(length(x0)) → ACTIVE(length(x0))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
MARK(length(and(x0, x1))) → ACTIVE(length(active(and(mark(x0), x1))))
MARK(length(tt)) → ACTIVE(length(active(tt)))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(nil)) → ACTIVE(length(active(nil)))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(take(x0, x1))) → ACTIVE(length(active(take(mark(x0), mark(x1)))))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(47) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule MARK(length(tt)) → ACTIVE(length(active(tt))) at position [0] we obtained the following new rules [LPAR04]:

MARK(length(tt)) → ACTIVE(length(tt))

(48) Obligation:

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

MARK(s(X)) → MARK(X)
MARK(length(x0)) → ACTIVE(length(x0))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
MARK(length(and(x0, x1))) → ACTIVE(length(active(and(mark(x0), x1))))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(nil)) → ACTIVE(length(active(nil)))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(take(x0, x1))) → ACTIVE(length(active(take(mark(x0), mark(x1)))))
MARK(length(tt)) → ACTIVE(length(tt))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(49) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(50) Obligation:

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

MARK(s(X)) → MARK(X)
MARK(length(x0)) → ACTIVE(length(x0))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
MARK(length(and(x0, x1))) → ACTIVE(length(active(and(mark(x0), x1))))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(nil)) → ACTIVE(length(active(nil)))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(take(x0, x1))) → ACTIVE(length(active(take(mark(x0), mark(x1)))))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(51) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule MARK(length(nil)) → ACTIVE(length(active(nil))) at position [0] we obtained the following new rules [LPAR04]:

MARK(length(nil)) → ACTIVE(length(nil))

(52) Obligation:

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

MARK(s(X)) → MARK(X)
MARK(length(x0)) → ACTIVE(length(x0))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
MARK(length(and(x0, x1))) → ACTIVE(length(active(and(mark(x0), x1))))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(take(x0, x1))) → ACTIVE(length(active(take(mark(x0), mark(x1)))))
MARK(length(nil)) → ACTIVE(length(nil))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(53) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(54) Obligation:

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

MARK(s(X)) → MARK(X)
MARK(length(x0)) → ACTIVE(length(x0))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
MARK(length(and(x0, x1))) → ACTIVE(length(active(and(mark(x0), x1))))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(take(x0, x1))) → ACTIVE(length(active(take(mark(x0), mark(x1)))))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(55) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


MARK(length(and(x0, x1))) → ACTIVE(length(active(and(mark(x0), x1))))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:

POL( ACTIVE(x1) ) = x1


POL( MARK(x1) ) = 2x1


POL( s(x1) ) = x1


POL( length(x1) ) = x1


POL( active(x1) ) = x1


POL( mark(x1) ) = 2x1


POL( cons(x1, x2) ) = 2x2


POL( zeros ) = 0


POL( 0 ) = 0


POL( and(x1, x2) ) = 2x1 + 2x2 + 2


POL( take(x1, x2) ) = max{0, -2}


POL( tt ) = 2


POL( nil ) = 1



The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(and(X1, X2)) → active(and(mark(X1), X2))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(tt) → active(tt)
mark(nil) → active(nil)
cons(X1, mark(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(mark(X1), X2) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

(56) Obligation:

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

MARK(s(X)) → MARK(X)
MARK(length(x0)) → ACTIVE(length(x0))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(take(x0, x1))) → ACTIVE(length(active(take(mark(x0), mark(x1)))))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(57) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


MARK(length(cons(x0, x1))) → ACTIVE(length(active(cons(mark(x0), x1))))
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO] with arctic natural numbers [ARCTIC]:

POL(MARK(x1)) = 1A + 1A·x1

POL(s(x1)) = -I + 0A·x1

POL(length(x1)) = -I + 0A·x1

POL(ACTIVE(x1)) = 1A + 0A·x1

POL(cons(x1, x2)) = 1A + 0A·x1 + 1A·x2

POL(zeros) = 0A

POL(active(x1)) = 1A + 0A·x1

POL(mark(x1)) = 1A + 0A·x1

POL(take(x1, x2)) = -I + -I·x1 + 0A·x2

POL(0) = 0A

POL(and(x1, x2)) = -I + 0A·x1 + -I·x2

POL(tt) = 4A

POL(nil) = 4A

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(and(X1, X2)) → active(and(mark(X1), X2))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(tt) → active(tt)
mark(nil) → active(nil)
cons(X1, mark(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(mark(X1), X2) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)

(58) Obligation:

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

MARK(s(X)) → MARK(X)
MARK(length(x0)) → ACTIVE(length(x0))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(take(x0, x1))) → ACTIVE(length(active(take(mark(x0), mark(x1)))))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(59) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


MARK(length(length(x0))) → ACTIVE(length(active(length(mark(x0)))))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:

POL( ACTIVE(x1) ) = x1 + 2


POL( MARK(x1) ) = 2x1


POL( s(x1) ) = x1


POL( length(x1) ) = x1 + 2


POL( active(x1) ) = x1


POL( mark(x1) ) = x1


POL( cons(x1, x2) ) = 2x2


POL( zeros ) = 0


POL( 0 ) = 2


POL( and(x1, x2) ) = 2


POL( take(x1, x2) ) = max{0, -2}


POL( tt ) = 1


POL( nil ) = 2



The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(and(X1, X2)) → active(and(mark(X1), X2))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(tt) → active(tt)
mark(nil) → active(nil)
take(X1, mark(X2)) → take(X1, X2)
take(mark(X1), X2) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)

(60) Obligation:

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

MARK(s(X)) → MARK(X)
MARK(length(x0)) → ACTIVE(length(x0))
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(take(x0, x1))) → ACTIVE(length(active(take(mark(x0), mark(x1)))))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(61) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


MARK(length(x0)) → ACTIVE(length(x0))
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO] with arctic natural numbers [ARCTIC]:

POL(MARK(x1)) = 3A + 1A·x1

POL(s(x1)) = -I + 0A·x1

POL(length(x1)) = -I + 0A·x1

POL(ACTIVE(x1)) = -I + 0A·x1

POL(cons(x1, x2)) = 3A + 0A·x1 + 1A·x2

POL(zeros) = 0A

POL(active(x1)) = 3A + 0A·x1

POL(mark(x1)) = 3A + 0A·x1

POL(take(x1, x2)) = -I + -I·x1 + 0A·x2

POL(0) = 0A

POL(and(x1, x2)) = 0A + 0A·x1 + -I·x2

POL(tt) = 0A

POL(nil) = 0A

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(and(X1, X2)) → active(and(mark(X1), X2))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(tt) → active(tt)
mark(nil) → active(nil)
take(X1, mark(X2)) → take(X1, X2)
take(mark(X1), X2) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)

(62) Obligation:

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

MARK(s(X)) → MARK(X)
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
MARK(length(take(x0, x1))) → ACTIVE(length(active(take(mark(x0), mark(x1)))))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(63) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


MARK(length(s(x0))) → ACTIVE(length(active(s(mark(x0)))))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = 1   
POL(active(x1)) = x1   
POL(and(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = 1   
POL(length(x1)) = x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(take(x1, x2)) = 1   
POL(tt) = 0   
POL(zeros) = 1   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

length(active(X)) → length(X)
length(mark(X)) → length(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
mark(zeros) → active(zeros)
mark(and(X1, X2)) → active(and(mark(X1), X2))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(length(X)) → active(length(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(tt) → active(tt)
mark(nil) → active(nil)
take(X1, mark(X2)) → take(X1, X2)
take(mark(X1), X2) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)

(64) Obligation:

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

MARK(s(X)) → MARK(X)
ACTIVE(length(cons(N, L))) → MARK(s(length(L)))
MARK(length(zeros)) → ACTIVE(length(active(zeros)))
MARK(length(take(x0, x1))) → ACTIVE(length(active(take(mark(x0), mark(x1)))))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(length(cons(N, L))) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(tt) → active(tt)
mark(length(X)) → active(length(mark(X)))
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)

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

(65) NonTerminationLoopProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = MARK(length(zeros)) evaluates to t =MARK(length(zeros))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
  • Matcher: [ ]
  • Semiunifier: [ ]




Rewriting sequence

MARK(length(zeros))ACTIVE(length(active(zeros)))
with rule MARK(length(zeros)) → ACTIVE(length(active(zeros))) at position [] and matcher [ ]

ACTIVE(length(active(zeros)))ACTIVE(length(mark(cons(0, zeros))))
with rule active(zeros) → mark(cons(0, zeros)) at position [0,0] and matcher [ ]

ACTIVE(length(mark(cons(0, zeros))))ACTIVE(length(cons(0, zeros)))
with rule length(mark(X)) → length(X) at position [0] and matcher [X / cons(0, zeros)]

ACTIVE(length(cons(0, zeros)))MARK(s(length(zeros)))
with rule ACTIVE(length(cons(N, L))) → MARK(s(length(L))) at position [] and matcher [N / 0, L / zeros]

MARK(s(length(zeros)))MARK(length(zeros))
with rule MARK(s(X)) → MARK(X)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.



(66) NO