(0) Obligation:

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

a__zeroscons(0, zeros)
a__and(tt, X) → mark(X)
a__length(nil) → 0
a__length(cons(N, L)) → s(a__length(mark(L)))
a__take(0, IL) → nil
a__take(s(M), cons(N, IL)) → cons(mark(N), take(M, IL))
mark(zeros) → a__zeros
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(nil) → nil
mark(s(X)) → s(mark(X))
a__zeroszeros
a__and(X1, X2) → and(X1, X2)
a__length(X) → length(X)
a__take(X1, X2) → take(X1, X2)

Q is empty.

(1) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(a__and(x1, x2)) = x1 + x2   
POL(a__length(x1)) = x1   
POL(a__take(x1, x2)) = x1 + x2   
POL(a__zeros) = 0   
POL(and(x1, x2)) = x1 + 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 + x2   
POL(tt) = 1   
POL(zeros) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

a__and(tt, X) → mark(X)


(2) Obligation:

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

a__zeroscons(0, zeros)
a__length(nil) → 0
a__length(cons(N, L)) → s(a__length(mark(L)))
a__take(0, IL) → nil
a__take(s(M), cons(N, IL)) → cons(mark(N), take(M, IL))
mark(zeros) → a__zeros
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(nil) → nil
mark(s(X)) → s(mark(X))
a__zeroszeros
a__and(X1, X2) → and(X1, X2)
a__length(X) → length(X)
a__take(X1, X2) → take(X1, X2)

Q is empty.

(3) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(a__and(x1, x2)) = 2·x1 + 2·x2   
POL(a__length(x1)) = x1   
POL(a__take(x1, x2)) = 1 + 2·x1 + x2   
POL(a__zeros) = 0   
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)) = 1 + 2·x1 + 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:

a__take(0, IL) → nil


(4) Obligation:

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

a__zeroscons(0, zeros)
a__length(nil) → 0
a__length(cons(N, L)) → s(a__length(mark(L)))
a__take(s(M), cons(N, IL)) → cons(mark(N), take(M, IL))
mark(zeros) → a__zeros
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(nil) → nil
mark(s(X)) → s(mark(X))
a__zeroszeros
a__and(X1, X2) → and(X1, X2)
a__length(X) → length(X)
a__take(X1, X2) → take(X1, X2)

Q is empty.

(5) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

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

a__length(nil) → 0


(6) Obligation:

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

a__zeroscons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
a__take(s(M), cons(N, IL)) → cons(mark(N), take(M, IL))
mark(zeros) → a__zeros
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(nil) → nil
mark(s(X)) → s(mark(X))
a__zeroszeros
a__and(X1, X2) → and(X1, X2)
a__length(X) → length(X)
a__take(X1, X2) → take(X1, X2)

Q is empty.

(7) DependencyPairsProof (EQUIVALENT transformation)

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

(8) Obligation:

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

A__LENGTH(cons(N, L)) → A__LENGTH(mark(L))
A__LENGTH(cons(N, L)) → MARK(L)
A__TAKE(s(M), cons(N, IL)) → MARK(N)
MARK(zeros) → A__ZEROS
MARK(and(X1, X2)) → A__AND(mark(X1), X2)
MARK(and(X1, X2)) → MARK(X1)
MARK(length(X)) → A__LENGTH(mark(X))
MARK(length(X)) → MARK(X)
MARK(take(X1, X2)) → A__TAKE(mark(X1), mark(X2))
MARK(take(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → MARK(X2)
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
a__take(s(M), cons(N, IL)) → cons(mark(N), take(M, IL))
mark(zeros) → a__zeros
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(nil) → nil
mark(s(X)) → s(mark(X))
a__zeroszeros
a__and(X1, X2) → and(X1, X2)
a__length(X) → length(X)
a__take(X1, X2) → take(X1, X2)

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

(9) DependencyGraphProof (EQUIVALENT transformation)

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

(10) Obligation:

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

A__LENGTH(cons(N, L)) → MARK(L)
MARK(and(X1, X2)) → MARK(X1)
MARK(length(X)) → A__LENGTH(mark(X))
A__LENGTH(cons(N, L)) → A__LENGTH(mark(L))
MARK(length(X)) → MARK(X)
MARK(take(X1, X2)) → A__TAKE(mark(X1), mark(X2))
A__TAKE(s(M), cons(N, IL)) → MARK(N)
MARK(take(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → MARK(X2)
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
a__take(s(M), cons(N, IL)) → cons(mark(N), take(M, IL))
mark(zeros) → a__zeros
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(nil) → nil
mark(s(X)) → s(mark(X))
a__zeroszeros
a__and(X1, X2) → and(X1, X2)
a__length(X) → length(X)
a__take(X1, X2) → take(X1, X2)

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

(11) NonLoopProof (EQUIVALENT transformation)

By Theorem 8 [NONLOOP] we deduce infiniteness of the QDP.
We apply the theorem with m = 1, b = 0,
σ' = [ ], and μ' = [x0 / 0] on the rule
A__LENGTH(cons(0, zeros))[ ]n[ ] → A__LENGTH(cons(0, zeros))[ ]n[x0 / 0]
This rule is correct for the QDP as the following derivation shows:

intermediate steps: Equivalent (Simplify mu) - Instantiate mu
A__LENGTH(cons(x0, zeros))[ ]n[ ] → A__LENGTH(cons(0, zeros))[ ]n[ ]
    by Narrowing at position: [0]
        A__LENGTH(cons(x0, zeros))[ ]n[ ] → A__LENGTH(a__zeros)[ ]n[ ]
            by Narrowing at position: [0]
                intermediate steps: Instantiation - Instantiation
                A__LENGTH(cons(N, L))[ ]n[ ] → A__LENGTH(mark(L))[ ]n[ ]
                    by OriginalRule from TRS P

                mark(zeros)[ ]n[ ] → a__zeros[ ]n[ ]
                    by OriginalRule from TRS R

        a__zeros[ ]n[ ] → cons(0, zeros)[ ]n[ ]
            by OriginalRule from TRS R

(12) NO