Termination w.r.t. Q of the following Term Rewriting System could be disproven:

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

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(nil) → 0
a__length(cons(N, L)) → a__U11(tt, L)
a__take(0, IL) → nil
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.


QTRS
  ↳ RRRPoloQTRSProof

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

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(nil) → 0
a__length(cons(N, L)) → a__U11(tt, L)
a__take(0, IL) → nil
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.

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

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(nil) → 0
a__length(cons(N, L)) → a__U11(tt, L)
a__take(0, IL) → nil
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

a__length(nil) → 0
a__take(0, IL) → nil
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(U11(x1, x2)) = x1 + x2   
POL(U12(x1, x2)) = x1 + x2   
POL(U21(x1, x2, x3, x4)) = 2 + x1 + x2 + x3 + x4   
POL(U22(x1, x2, x3, x4)) = 2 + x1 + x2 + x3 + x4   
POL(U23(x1, x2, x3, x4)) = 2 + x1 + x2 + x3 + x4   
POL(a__U11(x1, x2)) = x1 + x2   
POL(a__U12(x1, x2)) = x1 + x2   
POL(a__U21(x1, x2, x3, x4)) = 2 + x1 + x2 + x3 + x4   
POL(a__U22(x1, x2, x3, x4)) = 2 + x1 + x2 + x3 + x4   
POL(a__U23(x1, x2, x3, x4)) = 2 + x1 + x2 + x3 + x4   
POL(a__length(x1)) = x1   
POL(a__take(x1, x2)) = 2 + x1 + x2   
POL(a__zeros) = 0   
POL(cons(x1, x2)) = x1 + x2   
POL(length(x1)) = x1   
POL(mark(x1)) = x1   
POL(nil) = 1   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 2 + x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   




↳ QTRS
  ↳ RRRPoloQTRSProof
QTRS
      ↳ DependencyPairsProof

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

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

MARK(U22(X1, X2, X3, X4)) → MARK(X1)
A__U22(tt, IL, M, N) → A__U23(tt, IL, M, N)
MARK(U23(X1, X2, X3, X4)) → A__U23(mark(X1), X2, X3, X4)
MARK(take(X1, X2)) → MARK(X2)
MARK(U11(X1, X2)) → MARK(X1)
MARK(zeros) → A__ZEROS
MARK(U21(X1, X2, X3, X4)) → A__U21(mark(X1), X2, X3, X4)
MARK(s(X)) → MARK(X)
A__LENGTH(cons(N, L)) → A__U11(tt, L)
MARK(cons(X1, X2)) → MARK(X1)
MARK(length(X)) → A__LENGTH(mark(X))
MARK(U22(X1, X2, X3, X4)) → A__U22(mark(X1), X2, X3, X4)
MARK(length(X)) → MARK(X)
MARK(U11(X1, X2)) → A__U11(mark(X1), X2)
MARK(U12(X1, X2)) → A__U12(mark(X1), X2)
MARK(take(X1, X2)) → MARK(X1)
MARK(U23(X1, X2, X3, X4)) → MARK(X1)
A__U12(tt, L) → A__LENGTH(mark(L))
A__U21(tt, IL, M, N) → A__U22(tt, IL, M, N)
MARK(U12(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → A__TAKE(mark(X1), mark(X2))
A__U23(tt, IL, M, N) → MARK(N)
A__U12(tt, L) → MARK(L)
A__U11(tt, L) → A__U12(tt, L)
MARK(U21(X1, X2, X3, X4)) → MARK(X1)
A__TAKE(s(M), cons(N, IL)) → A__U21(tt, IL, M, N)

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

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

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ DependencyGraphProof

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

MARK(U22(X1, X2, X3, X4)) → MARK(X1)
A__U22(tt, IL, M, N) → A__U23(tt, IL, M, N)
MARK(U23(X1, X2, X3, X4)) → A__U23(mark(X1), X2, X3, X4)
MARK(take(X1, X2)) → MARK(X2)
MARK(U11(X1, X2)) → MARK(X1)
MARK(zeros) → A__ZEROS
MARK(U21(X1, X2, X3, X4)) → A__U21(mark(X1), X2, X3, X4)
MARK(s(X)) → MARK(X)
A__LENGTH(cons(N, L)) → A__U11(tt, L)
MARK(cons(X1, X2)) → MARK(X1)
MARK(length(X)) → A__LENGTH(mark(X))
MARK(U22(X1, X2, X3, X4)) → A__U22(mark(X1), X2, X3, X4)
MARK(length(X)) → MARK(X)
MARK(U11(X1, X2)) → A__U11(mark(X1), X2)
MARK(U12(X1, X2)) → A__U12(mark(X1), X2)
MARK(take(X1, X2)) → MARK(X1)
MARK(U23(X1, X2, X3, X4)) → MARK(X1)
A__U12(tt, L) → A__LENGTH(mark(L))
A__U21(tt, IL, M, N) → A__U22(tt, IL, M, N)
MARK(U12(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → A__TAKE(mark(X1), mark(X2))
A__U23(tt, IL, M, N) → MARK(N)
A__U12(tt, L) → MARK(L)
A__U11(tt, L) → A__U12(tt, L)
MARK(U21(X1, X2, X3, X4)) → MARK(X1)
A__TAKE(s(M), cons(N, IL)) → A__U21(tt, IL, M, N)

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
QDP
              ↳ RuleRemovalProof

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

MARK(U22(X1, X2, X3, X4)) → MARK(X1)
A__U22(tt, IL, M, N) → A__U23(tt, IL, M, N)
MARK(U23(X1, X2, X3, X4)) → A__U23(mark(X1), X2, X3, X4)
MARK(take(X1, X2)) → MARK(X2)
MARK(U21(X1, X2, X3, X4)) → A__U21(mark(X1), X2, X3, X4)
MARK(U11(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)
A__LENGTH(cons(N, L)) → A__U11(tt, L)
MARK(cons(X1, X2)) → MARK(X1)
MARK(length(X)) → A__LENGTH(mark(X))
MARK(U22(X1, X2, X3, X4)) → A__U22(mark(X1), X2, X3, X4)
MARK(length(X)) → MARK(X)
MARK(U11(X1, X2)) → A__U11(mark(X1), X2)
MARK(U12(X1, X2)) → A__U12(mark(X1), X2)
MARK(take(X1, X2)) → MARK(X1)
MARK(U23(X1, X2, X3, X4)) → MARK(X1)
A__U12(tt, L) → A__LENGTH(mark(L))
A__U21(tt, IL, M, N) → A__U22(tt, IL, M, N)
MARK(U12(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → A__TAKE(mark(X1), mark(X2))
A__U23(tt, IL, M, N) → MARK(N)
A__U12(tt, L) → MARK(L)
A__U11(tt, L) → A__U12(tt, L)
MARK(U21(X1, X2, X3, X4)) → MARK(X1)
A__TAKE(s(M), cons(N, IL)) → A__U21(tt, IL, M, N)

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

MARK(U22(X1, X2, X3, X4)) → MARK(X1)
A__U22(tt, IL, M, N) → A__U23(tt, IL, M, N)
MARK(U23(X1, X2, X3, X4)) → A__U23(mark(X1), X2, X3, X4)
MARK(take(X1, X2)) → MARK(X2)
MARK(take(X1, X2)) → MARK(X1)
MARK(U23(X1, X2, X3, X4)) → MARK(X1)
MARK(U21(X1, X2, X3, X4)) → MARK(X1)


Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(A__LENGTH(x1)) = x1   
POL(A__TAKE(x1, x2)) = 1 + x1 + 2·x2   
POL(A__U11(x1, x2)) = x1 + x2   
POL(A__U12(x1, x2)) = 2·x1 + x2   
POL(A__U21(x1, x2, x3, x4)) = 1 + x1 + x2 + x3 + 2·x4   
POL(A__U22(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + x3 + 2·x4   
POL(A__U23(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + 2·x4   
POL(MARK(x1)) = x1   
POL(U11(x1, x2)) = x1 + 2·x2   
POL(U12(x1, x2)) = 2·x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 1 + x1 + 2·x2 + x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 1 + 2·x1 + 2·x2 + x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 1 + 2·x1 + 2·x2 + x3 + 2·x4   
POL(a__U11(x1, x2)) = x1 + 2·x2   
POL(a__U12(x1, x2)) = 2·x1 + 2·x2   
POL(a__U21(x1, x2, x3, x4)) = 1 + x1 + 2·x2 + x3 + 2·x4   
POL(a__U22(x1, x2, x3, x4)) = 1 + 2·x1 + 2·x2 + x3 + 2·x4   
POL(a__U23(x1, x2, x3, x4)) = 1 + 2·x1 + 2·x2 + x3 + 2·x4   
POL(a__length(x1)) = 2·x1   
POL(a__take(x1, x2)) = 1 + x1 + 2·x2   
POL(a__zeros) = 0   
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 + x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 0   



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ RuleRemovalProof
QDP
                  ↳ DependencyGraphProof

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

A__U21(tt, IL, M, N) → A__U22(tt, IL, M, N)
MARK(take(X1, X2)) → A__TAKE(mark(X1), mark(X2))
MARK(U12(X1, X2)) → MARK(X1)
A__U23(tt, IL, M, N) → MARK(N)
MARK(U21(X1, X2, X3, X4)) → A__U21(mark(X1), X2, X3, X4)
MARK(U11(X1, X2)) → MARK(X1)
A__U12(tt, L) → MARK(L)
MARK(s(X)) → MARK(X)
A__LENGTH(cons(N, L)) → A__U11(tt, L)
MARK(cons(X1, X2)) → MARK(X1)
MARK(length(X)) → A__LENGTH(mark(X))
MARK(U22(X1, X2, X3, X4)) → A__U22(mark(X1), X2, X3, X4)
MARK(length(X)) → MARK(X)
MARK(U11(X1, X2)) → A__U11(mark(X1), X2)
MARK(U12(X1, X2)) → A__U12(mark(X1), X2)
A__U11(tt, L) → A__U12(tt, L)
A__TAKE(s(M), cons(N, IL)) → A__U21(tt, IL, M, N)
A__U12(tt, L) → A__LENGTH(mark(L))

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 6 less nodes.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ RuleRemovalProof
                ↳ QDP
                  ↳ DependencyGraphProof
QDP
                      ↳ RuleRemovalProof

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

MARK(length(X)) → MARK(X)
MARK(U11(X1, X2)) → A__U11(mark(X1), X2)
MARK(U12(X1, X2)) → MARK(X1)
MARK(U11(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)
MARK(U12(X1, X2)) → A__U12(mark(X1), X2)
A__U12(tt, L) → MARK(L)
A__LENGTH(cons(N, L)) → A__U11(tt, L)
A__U11(tt, L) → A__U12(tt, L)
MARK(cons(X1, X2)) → MARK(X1)
MARK(length(X)) → A__LENGTH(mark(X))
A__U12(tt, L) → A__LENGTH(mark(L))

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], 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)
MARK(U11(X1, X2)) → A__U11(mark(X1), X2)
MARK(U12(X1, X2)) → MARK(X1)
MARK(U11(X1, X2)) → MARK(X1)
MARK(U12(X1, X2)) → A__U12(mark(X1), X2)
A__U12(tt, L) → MARK(L)
MARK(length(X)) → A__LENGTH(mark(X))


Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(A__LENGTH(x1)) = 2 + 2·x1   
POL(A__U11(x1, x2)) = 2 + x1 + 2·x2   
POL(A__U12(x1, x2)) = 2 + x1 + 2·x2   
POL(MARK(x1)) = 1 + 2·x1   
POL(U11(x1, x2)) = 2 + x1 + 2·x2   
POL(U12(x1, x2)) = 2 + x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 2·x1 + 2·x2 + x3 + x4   
POL(U22(x1, x2, x3, x4)) = x1 + 2·x2 + x3 + x4   
POL(U23(x1, x2, x3, x4)) = x1 + 2·x2 + x3 + x4   
POL(a__U11(x1, x2)) = 2 + x1 + 2·x2   
POL(a__U12(x1, x2)) = 2 + x1 + 2·x2   
POL(a__U21(x1, x2, x3, x4)) = 2·x1 + 2·x2 + x3 + x4   
POL(a__U22(x1, x2, x3, x4)) = x1 + 2·x2 + x3 + x4   
POL(a__U23(x1, x2, x3, x4)) = x1 + 2·x2 + x3 + x4   
POL(a__length(x1)) = 2 + 2·x1   
POL(a__take(x1, x2)) = x1 + 2·x2   
POL(a__zeros) = 0   
POL(cons(x1, x2)) = x1 + x2   
POL(length(x1)) = 2 + 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   



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ RuleRemovalProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
QDP
                          ↳ DependencyGraphProof

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

MARK(s(X)) → MARK(X)
A__U11(tt, L) → A__U12(tt, L)
A__LENGTH(cons(N, L)) → A__U11(tt, L)
MARK(cons(X1, X2)) → MARK(X1)
A__U12(tt, L) → A__LENGTH(mark(L))

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 2 SCCs.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ RuleRemovalProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
QDP
                                ↳ Narrowing
                              ↳ QDP

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

A__LENGTH(cons(N, L)) → A__U11(tt, L)
A__U11(tt, L) → A__U12(tt, L)
A__U12(tt, L) → A__LENGTH(mark(L))

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule A__U12(tt, L) → A__LENGTH(mark(L)) at position [0] we obtained the following new rules:

A__U12(tt, zeros) → A__LENGTH(a__zeros)
A__U12(tt, take(x0, x1)) → A__LENGTH(a__take(mark(x0), mark(x1)))
A__U12(tt, tt) → A__LENGTH(tt)
A__U12(tt, U12(x0, x1)) → A__LENGTH(a__U12(mark(x0), x1))
A__U12(tt, length(x0)) → A__LENGTH(a__length(mark(x0)))
A__U12(tt, cons(x0, x1)) → A__LENGTH(cons(mark(x0), x1))
A__U12(tt, 0) → A__LENGTH(0)
A__U12(tt, U11(x0, x1)) → A__LENGTH(a__U11(mark(x0), x1))
A__U12(tt, U22(x0, x1, x2, x3)) → A__LENGTH(a__U22(mark(x0), x1, x2, x3))
A__U12(tt, s(x0)) → A__LENGTH(s(mark(x0)))
A__U12(tt, nil) → A__LENGTH(nil)
A__U12(tt, U23(x0, x1, x2, x3)) → A__LENGTH(a__U23(mark(x0), x1, x2, x3))
A__U12(tt, U21(x0, x1, x2, x3)) → A__LENGTH(a__U21(mark(x0), x1, x2, x3))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ RuleRemovalProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
                                ↳ Narrowing
QDP
                                    ↳ DependencyGraphProof
                              ↳ QDP

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

A__U12(tt, zeros) → A__LENGTH(a__zeros)
A__LENGTH(cons(N, L)) → A__U11(tt, L)
A__U12(tt, take(x0, x1)) → A__LENGTH(a__take(mark(x0), mark(x1)))
A__U12(tt, tt) → A__LENGTH(tt)
A__U12(tt, U12(x0, x1)) → A__LENGTH(a__U12(mark(x0), x1))
A__U12(tt, length(x0)) → A__LENGTH(a__length(mark(x0)))
A__U12(tt, cons(x0, x1)) → A__LENGTH(cons(mark(x0), x1))
A__U12(tt, 0) → A__LENGTH(0)
A__U12(tt, U11(x0, x1)) → A__LENGTH(a__U11(mark(x0), x1))
A__U11(tt, L) → A__U12(tt, L)
A__U12(tt, U22(x0, x1, x2, x3)) → A__LENGTH(a__U22(mark(x0), x1, x2, x3))
A__U12(tt, nil) → A__LENGTH(nil)
A__U12(tt, s(x0)) → A__LENGTH(s(mark(x0)))
A__U12(tt, U23(x0, x1, x2, x3)) → A__LENGTH(a__U23(mark(x0), x1, x2, x3))
A__U12(tt, U21(x0, x1, x2, x3)) → A__LENGTH(a__U21(mark(x0), x1, x2, x3))

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 4 less nodes.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ RuleRemovalProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
QDP
                                        ↳ Narrowing
                              ↳ QDP

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

A__U12(tt, cons(x0, x1)) → A__LENGTH(cons(mark(x0), x1))
A__U12(tt, U11(x0, x1)) → A__LENGTH(a__U11(mark(x0), x1))
A__U12(tt, zeros) → A__LENGTH(a__zeros)
A__U12(tt, take(x0, x1)) → A__LENGTH(a__take(mark(x0), mark(x1)))
A__U11(tt, L) → A__U12(tt, L)
A__LENGTH(cons(N, L)) → A__U11(tt, L)
A__U12(tt, U22(x0, x1, x2, x3)) → A__LENGTH(a__U22(mark(x0), x1, x2, x3))
A__U12(tt, U12(x0, x1)) → A__LENGTH(a__U12(mark(x0), x1))
A__U12(tt, U23(x0, x1, x2, x3)) → A__LENGTH(a__U23(mark(x0), x1, x2, x3))
A__U12(tt, length(x0)) → A__LENGTH(a__length(mark(x0)))
A__U12(tt, U21(x0, x1, x2, x3)) → A__LENGTH(a__U21(mark(x0), x1, x2, x3))

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule A__U12(tt, zeros) → A__LENGTH(a__zeros) at position [0] we obtained the following new rules:

A__U12(tt, zeros) → A__LENGTH(zeros)
A__U12(tt, zeros) → A__LENGTH(cons(0, zeros))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ RuleRemovalProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
QDP
                                            ↳ DependencyGraphProof
                              ↳ QDP

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

A__U12(tt, take(x0, x1)) → A__LENGTH(a__take(mark(x0), mark(x1)))
A__LENGTH(cons(N, L)) → A__U11(tt, L)
A__U12(tt, U12(x0, x1)) → A__LENGTH(a__U12(mark(x0), x1))
A__U12(tt, length(x0)) → A__LENGTH(a__length(mark(x0)))
A__U12(tt, cons(x0, x1)) → A__LENGTH(cons(mark(x0), x1))
A__U12(tt, U11(x0, x1)) → A__LENGTH(a__U11(mark(x0), x1))
A__U11(tt, L) → A__U12(tt, L)
A__U12(tt, U22(x0, x1, x2, x3)) → A__LENGTH(a__U22(mark(x0), x1, x2, x3))
A__U12(tt, zeros) → A__LENGTH(zeros)
A__U12(tt, zeros) → A__LENGTH(cons(0, zeros))
A__U12(tt, U23(x0, x1, x2, x3)) → A__LENGTH(a__U23(mark(x0), x1, x2, x3))
A__U12(tt, U21(x0, x1, x2, x3)) → A__LENGTH(a__U21(mark(x0), x1, x2, x3))

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ RuleRemovalProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
QDP
                                                ↳ QDPOrderProof
                              ↳ QDP

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

A__U12(tt, cons(x0, x1)) → A__LENGTH(cons(mark(x0), x1))
A__U12(tt, U11(x0, x1)) → A__LENGTH(a__U11(mark(x0), x1))
A__LENGTH(cons(N, L)) → A__U11(tt, L)
A__U12(tt, take(x0, x1)) → A__LENGTH(a__take(mark(x0), mark(x1)))
A__U11(tt, L) → A__U12(tt, L)
A__U12(tt, zeros) → A__LENGTH(cons(0, zeros))
A__U12(tt, U22(x0, x1, x2, x3)) → A__LENGTH(a__U22(mark(x0), x1, x2, x3))
A__U12(tt, U12(x0, x1)) → A__LENGTH(a__U12(mark(x0), x1))
A__U12(tt, U23(x0, x1, x2, x3)) → A__LENGTH(a__U23(mark(x0), x1, x2, x3))
A__U12(tt, length(x0)) → A__LENGTH(a__length(mark(x0)))
A__U12(tt, U21(x0, x1, x2, x3)) → A__LENGTH(a__U21(mark(x0), x1, x2, x3))

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


A__U12(tt, U11(x0, x1)) → A__LENGTH(a__U11(mark(x0), x1))
A__U12(tt, U12(x0, x1)) → A__LENGTH(a__U12(mark(x0), x1))
A__U12(tt, length(x0)) → A__LENGTH(a__length(mark(x0)))
The remaining pairs can at least be oriented weakly.

A__U12(tt, cons(x0, x1)) → A__LENGTH(cons(mark(x0), x1))
A__LENGTH(cons(N, L)) → A__U11(tt, L)
A__U12(tt, take(x0, x1)) → A__LENGTH(a__take(mark(x0), mark(x1)))
A__U11(tt, L) → A__U12(tt, L)
A__U12(tt, zeros) → A__LENGTH(cons(0, zeros))
A__U12(tt, U22(x0, x1, x2, x3)) → A__LENGTH(a__U22(mark(x0), x1, x2, x3))
A__U12(tt, U23(x0, x1, x2, x3)) → A__LENGTH(a__U23(mark(x0), x1, x2, x3))
A__U12(tt, U21(x0, x1, x2, x3)) → A__LENGTH(a__U21(mark(x0), x1, x2, x3))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(A__LENGTH(x1)) = 1 + x1   
POL(A__U11(x1, x2)) = 1 + x1   
POL(A__U12(x1, x2)) = 1 + x1   
POL(U11(x1, x2)) = 0   
POL(U12(x1, x2)) = 0   
POL(U21(x1, x2, x3, x4)) = 1   
POL(U22(x1, x2, x3, x4)) = 1   
POL(U23(x1, x2, x3, x4)) = 1   
POL(a__U11(x1, x2)) = 0   
POL(a__U12(x1, x2)) = 0   
POL(a__U21(x1, x2, x3, x4)) = 1   
POL(a__U22(x1, x2, x3, x4)) = 1   
POL(a__U23(x1, x2, x3, x4)) = 1   
POL(a__length(x1)) = 0   
POL(a__take(x1, x2)) = 1   
POL(a__zeros) = 0   
POL(cons(x1, x2)) = 1   
POL(length(x1)) = 0   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(take(x1, x2)) = 1   
POL(tt) = 1   
POL(zeros) = 0   

The following usable rules [17] were oriented:

a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U11(X1, X2) → U11(X1, X2)
mark(s(X)) → s(mark(X))
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__length(X) → length(X)
a__U12(X1, X2) → U12(X1, X2)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(length(X)) → a__length(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ RuleRemovalProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
QDP
                                                    ↳ QDPOrderProof
                              ↳ QDP

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

A__U12(tt, cons(x0, x1)) → A__LENGTH(cons(mark(x0), x1))
A__U11(tt, L) → A__U12(tt, L)
A__U12(tt, take(x0, x1)) → A__LENGTH(a__take(mark(x0), mark(x1)))
A__LENGTH(cons(N, L)) → A__U11(tt, L)
A__U12(tt, U22(x0, x1, x2, x3)) → A__LENGTH(a__U22(mark(x0), x1, x2, x3))
A__U12(tt, zeros) → A__LENGTH(cons(0, zeros))
A__U12(tt, U23(x0, x1, x2, x3)) → A__LENGTH(a__U23(mark(x0), x1, x2, x3))
A__U12(tt, U21(x0, x1, x2, x3)) → A__LENGTH(a__U21(mark(x0), x1, x2, x3))

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


A__U12(tt, cons(x0, x1)) → A__LENGTH(cons(mark(x0), x1))
A__U12(tt, U22(x0, x1, x2, x3)) → A__LENGTH(a__U22(mark(x0), x1, x2, x3))
A__U12(tt, U23(x0, x1, x2, x3)) → A__LENGTH(a__U23(mark(x0), x1, x2, x3))
A__U12(tt, U21(x0, x1, x2, x3)) → A__LENGTH(a__U21(mark(x0), x1, x2, x3))
The remaining pairs can at least be oriented weakly.

A__U11(tt, L) → A__U12(tt, L)
A__U12(tt, take(x0, x1)) → A__LENGTH(a__take(mark(x0), mark(x1)))
A__LENGTH(cons(N, L)) → A__U11(tt, L)
A__U12(tt, zeros) → A__LENGTH(cons(0, zeros))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(A__LENGTH(x1)) = 1 + x1   
POL(A__U11(x1, x2)) = 1 + x1 + x2   
POL(A__U12(x1, x2)) = 1 + x1 + x2   
POL(U11(x1, x2)) = 0   
POL(U12(x1, x2)) = 0   
POL(U21(x1, x2, x3, x4)) = 1   
POL(U22(x1, x2, x3, x4)) = 1   
POL(U23(x1, x2, x3, x4)) = 1   
POL(a__U11(x1, x2)) = 1   
POL(a__U12(x1, x2)) = 1   
POL(a__U21(x1, x2, x3, x4)) = 1   
POL(a__U22(x1, x2, x3, x4)) = 1   
POL(a__U23(x1, x2, x3, x4)) = 1   
POL(a__length(x1)) = 1   
POL(a__take(x1, x2)) = 1   
POL(a__zeros) = 0   
POL(cons(x1, x2)) = 1 + x2   
POL(length(x1)) = 1   
POL(mark(x1)) = 1 + x1   
POL(nil) = 0   
POL(s(x1)) = 1   
POL(take(x1, x2)) = 0   
POL(tt) = 1   
POL(zeros) = 0   

The following usable rules [17] were oriented:

a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U11(X1, X2) → U11(X1, X2)
mark(s(X)) → s(mark(X))
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__length(X) → length(X)
a__U12(X1, X2) → U12(X1, X2)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(length(X)) → a__length(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ RuleRemovalProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
QDP
                                                        ↳ NonTerminationProof
                              ↳ QDP

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

A__LENGTH(cons(N, L)) → A__U11(tt, L)
A__U12(tt, take(x0, x1)) → A__LENGTH(a__take(mark(x0), mark(x1)))
A__U11(tt, L) → A__U12(tt, L)
A__U12(tt, zeros) → A__LENGTH(cons(0, zeros))

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

A__LENGTH(cons(N, L)) → A__U11(tt, L)
A__U12(tt, take(x0, x1)) → A__LENGTH(a__take(mark(x0), mark(x1)))
A__U11(tt, L) → A__U12(tt, L)
A__U12(tt, zeros) → A__LENGTH(cons(0, zeros))

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)


s = A__U11(tt, zeros) evaluates to t =A__U11(tt, zeros)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

A__U11(tt, zeros)A__U12(tt, zeros)
with rule A__U11(tt, L) → A__U12(tt, L) at position [] and matcher [L / zeros]

A__U12(tt, zeros)A__LENGTH(cons(0, zeros))
with rule A__U12(tt, zeros) → A__LENGTH(cons(0, zeros)) at position [] and matcher [ ]

A__LENGTH(cons(0, zeros))A__U11(tt, zeros)
with rule A__LENGTH(cons(N, L)) → A__U11(tt, L)

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.





↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ RuleRemovalProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
QDP

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

MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__U11(tt, L) → a__U12(tt, L)
a__U12(tt, L) → s(a__length(mark(L)))
a__U21(tt, IL, M, N) → a__U22(tt, IL, M, N)
a__U22(tt, IL, M, N) → a__U23(tt, IL, M, N)
a__U23(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__length(cons(N, L)) → a__U11(tt, L)
a__take(s(M), cons(N, IL)) → a__U21(tt, IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U12(X1, X2)) → a__U12(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X1, X2, X3, X4)) → a__U21(mark(X1), X2, X3, X4)
mark(U22(X1, X2, X3, X4)) → a__U22(mark(X1), X2, X3, X4)
mark(U23(X1, X2, X3, X4)) → a__U23(mark(X1), X2, X3, X4)
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(s(X)) → s(mark(X))
mark(nil) → nil
a__zeroszeros
a__U11(X1, X2) → U11(X1, X2)
a__U12(X1, X2) → U12(X1, X2)
a__length(X) → length(X)
a__U21(X1, X2, X3, X4) → U21(X1, X2, X3, X4)
a__U22(X1, X2, X3, X4) → U22(X1, X2, X3, X4)
a__U23(X1, X2, X3, X4) → U23(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)

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