Termination of the following Term Rewriting System could not be shown:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(nil) → 0
length(cons(N, L)) → U11(tt, L)
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

The replacement map contains the following entries:

zeros: empty set
cons: {1}
0: empty set
U11: {1}
tt: empty set
U12: {1}
s: {1}
length: {1}
U21: {1}
U22: {1}
U23: {1}
take: {1, 2}
nil: empty set


CSR
  ↳ CSRInnermostProof

Context-sensitive rewrite system:
The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(nil) → 0
length(cons(N, L)) → U11(tt, L)
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

The replacement map contains the following entries:

zeros: empty set
cons: {1}
0: empty set
U11: {1}
tt: empty set
U12: {1}
s: {1}
length: {1}
U21: {1}
U22: {1}
U23: {1}
take: {1, 2}
nil: empty set

The CSR is orthogonal. By [10] we can switch to innermost.

↳ CSR
  ↳ CSRInnermostProof
CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Context-sensitive rewrite system:
The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(nil) → 0
length(cons(N, L)) → U11(tt, L)
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

The replacement map contains the following entries:

zeros: empty set
cons: {1}
0: empty set
U11: {1}
tt: empty set
U12: {1}
s: {1}
length: {1}
U21: {1}
U22: {1}
U23: {1}
take: {1, 2}
nil: empty set

Innermost Strategy.

Using Improved CS-DPs we result in the following initial Q-CSDP problem.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
QCSDP
          ↳ QCSDependencyGraphProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, length, take, LENGTH, TAKE} are replacing on all positions.
For all symbols f in {cons, U11, U12, U21, U22, U23, U121, U111, U221, U211, U231} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The ordinary context-sensitive dependency pairs DPo are:

U111(tt, L) → U121(tt, L)
U121(tt, L) → LENGTH(L)
U211(tt, IL, M, N) → U221(tt, IL, M, N)
U221(tt, IL, M, N) → U231(tt, IL, M, N)
LENGTH(cons(N, L)) → U111(tt, L)
TAKE(s(M), cons(N, IL)) → U211(tt, IL, M, N)

The collapsing dependency pairs are DPc:

U121(tt, L) → L
U231(tt, IL, M, N) → N


The hidden terms of R are:

zeros
take(M, IL)

Every hiding context is built from:

take on positions {1, 2}

Hence, the new unhiding pairs DPu are :

U121(tt, L) → U(L)
U231(tt, IL, M, N) → U(N)
U(take(x_0, x_1)) → U(x_0)
U(take(x_0, x_1)) → U(x_1)
U(zeros) → ZEROS
U(take(M, IL)) → TAKE(M, IL)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(nil) → 0
length(cons(N, L)) → U11(tt, L)
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

The set Q consists of the following terms:

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(nil)
length(cons(x0, x1))
take(0, x0)
take(s(x0), cons(x1, x2))


The approximation of the Context-Sensitive Dependency Graph contains 2 SCCs with 2 less nodes.


↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
QCSDP
                ↳ QCSDPSubtermProof
              ↳ QCSDP
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, length, take, TAKE} are replacing on all positions.
For all symbols f in {cons, U11, U12, U21, U22, U23, U231, U221, U211} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

U221(tt, IL, M, N) → U231(tt, IL, M, N)
U231(tt, IL, M, N) → U(N)
U(take(x_0, x_1)) → U(x_0)
U(take(x_0, x_1)) → U(x_1)
U(take(M, IL)) → TAKE(M, IL)
TAKE(s(M), cons(N, IL)) → U211(tt, IL, M, N)
U211(tt, IL, M, N) → U221(tt, IL, M, N)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(nil) → 0
length(cons(N, L)) → U11(tt, L)
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

The set Q consists of the following terms:

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(nil)
length(cons(x0, x1))
take(0, x0)
take(s(x0), cons(x1, x2))


We use the subterm processor [20].


The following pairs can be oriented strictly and are deleted.


U(take(x_0, x_1)) → U(x_0)
U(take(x_0, x_1)) → U(x_1)
U(take(M, IL)) → TAKE(M, IL)
TAKE(s(M), cons(N, IL)) → U211(tt, IL, M, N)
The remaining pairs can at least be oriented weakly.

U221(tt, IL, M, N) → U231(tt, IL, M, N)
U231(tt, IL, M, N) → U(N)
U211(tt, IL, M, N) → U221(tt, IL, M, N)
Used ordering: Combined order from the following AFS and order.
U231(x1, x2, x3, x4)  =  x4
U221(x1, x2, x3, x4)  =  x4
U(x1)  =  x1
TAKE(x1, x2)  =  x2
U211(x1, x2, x3, x4)  =  x4

Subterm Order


↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
                ↳ QCSDPSubtermProof
QCSDP
                    ↳ QCSDependencyGraphProof
              ↳ QCSDP
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, length, take} are replacing on all positions.
For all symbols f in {cons, U11, U12, U21, U22, U23, U231, U221, U211} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

U221(tt, IL, M, N) → U231(tt, IL, M, N)
U231(tt, IL, M, N) → U(N)
U211(tt, IL, M, N) → U221(tt, IL, M, N)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(nil) → 0
length(cons(N, L)) → U11(tt, L)
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

The set Q consists of the following terms:

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(nil)
length(cons(x0, x1))
take(0, x0)
take(s(x0), cons(x1, x2))


The approximation of the Context-Sensitive Dependency Graph contains 0 SCCs with 3 less nodes.


↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
QCSDP
                ↳ ConvertedToQDPProblemProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, length, take, LENGTH} are replacing on all positions.
For all symbols f in {cons, U11, U12, U21, U22, U23, U121, U111} we have µ(f) = {1}.

The TRS P consists of the following rules:

U121(tt, L) → LENGTH(L)
LENGTH(cons(N, L)) → U111(tt, L)
U111(tt, L) → U121(tt, L)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(nil) → 0
length(cons(N, L)) → U11(tt, L)
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

The set Q consists of the following terms:

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(nil)
length(cons(x0, x1))
take(0, x0)
take(s(x0), cons(x1, x2))


Converted QDP Problem, but could not keep Q or minimality.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
                ↳ ConvertedToQDPProblemProof
QDP
                    ↳ RuleRemovalProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(cons(N, L)) → U111(tt, L)
U111(tt, L) → U121(tt, L)
U121(tt, L) → LENGTH(L)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(nil) → 0
length(cons(N, L)) → U11(tt, L)
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

Q is empty.
We have to consider all (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 rules of the TRS R:

length(nil) → 0

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(LENGTH(x1)) = x1   
POL(U11(x1, x2)) = 1 + x1 + 2·x2   
POL(U111(x1, x2)) = x1 + x2   
POL(U12(x1, x2)) = 1 + x1 + 2·x2   
POL(U121(x1, x2)) = x1 + x2   
POL(U21(x1, x2, x3, x4)) = x1 + x2 + x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + 2·x4   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = 1 + 2·x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
                ↳ ConvertedToQDPProblemProof
                  ↳ QDP
                    ↳ RuleRemovalProof
QDP
                        ↳ RuleRemovalProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(cons(N, L)) → U111(tt, L)
U121(tt, L) → LENGTH(L)
U111(tt, L) → U121(tt, L)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(cons(N, L)) → U11(tt, L)
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

Q is empty.
We have to consider all (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 rules of the TRS R:

take(0, IL) → nil

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(LENGTH(x1)) = x1   
POL(U11(x1, x2)) = 2·x1 + x2   
POL(U111(x1, x2)) = 2·x1 + x2   
POL(U12(x1, x2)) = 2·x1 + x2   
POL(U121(x1, x2)) = 2·x1 + x2   
POL(U21(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + x3 + 2·x4   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 1 + x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
                ↳ ConvertedToQDPProblemProof
                  ↳ QDP
                    ↳ RuleRemovalProof
                      ↳ QDP
                        ↳ RuleRemovalProof
QDP
                            ↳ NonTerminationProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(cons(N, L)) → U111(tt, L)
U111(tt, L) → U121(tt, L)
U121(tt, L) → LENGTH(L)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(cons(N, L)) → U11(tt, L)
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

Q is empty.
We have to consider all (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:

LENGTH(cons(N, L)) → U111(tt, L)
U111(tt, L) → U121(tt, L)
U121(tt, L) → LENGTH(L)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(cons(N, L)) → U11(tt, L)
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)


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

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




Rewriting sequence

U111(tt, zeros)U111(tt, cons(0, zeros))
with rule zeroscons(0, zeros) at position [1] and matcher [ ]

U111(tt, cons(0, zeros))U121(tt, cons(0, zeros))
with rule U111(tt, L') → U121(tt, L') at position [] and matcher [L' / cons(0, zeros)]

U121(tt, cons(0, zeros))LENGTH(cons(0, zeros))
with rule U121(tt, L') → LENGTH(L') at position [] and matcher [L' / cons(0, zeros)]

LENGTH(cons(0, zeros))U111(tt, zeros)
with rule LENGTH(cons(N, L)) → U111(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.




We applied the Zantema transformation [34] to transform the context-sensitive TRS to a usual TRS.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
QTRS
          ↳ RRRPoloQTRSProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(nil) → 0
length(cons(N, L)) → U11(tt, a(L))
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(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:

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(nil) → 0
length(cons(N, L)) → U11(tt, a(L))
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(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:

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

POL(0) = 0   
POL(U11(x1, x2)) = 2·x1 + 2·x2   
POL(U12(x1, x2)) = 2·x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 1 + x1 + 2·x2 + x3 + x4   
POL(U22(x1, x2, x3, x4)) = 1 + x1 + 2·x2 + x3 + x4   
POL(U23(x1, x2, x3, x4)) = 1 + x1 + 2·x2 + x3 + x4   
POL(a(x1)) = x1   
POL(cons(x1, x2)) = x1 + x2   
POL(length(x1)) = 2·x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 1 + x1 + 2·x2   
POL(takeInact(x1, x2)) = 1 + x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosInact) = 0   




↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
QTRS
              ↳ RRRPoloQTRSProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(nil) → 0
length(cons(N, L)) → U11(tt, a(L))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(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:

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(nil) → 0
length(cons(N, L)) → U11(tt, a(L))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(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:

length(nil) → 0
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(U11(x1, x2)) = x1 + 2·x2   
POL(U12(x1, x2)) = 2·x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 2·x1 + 2·x2 + 2·x3 + x4   
POL(U22(x1, x2, x3, x4)) = x1 + 2·x2 + 2·x3 + x4   
POL(U23(x1, x2, x3, x4)) = x1 + 2·x2 + 2·x3 + x4   
POL(a(x1)) = x1   
POL(cons(x1, x2)) = x1 + 2·x2   
POL(length(x1)) = x1   
POL(nil) = 1   
POL(s(x1)) = 2·x1   
POL(take(x1, x2)) = x1 + x2   
POL(takeInact(x1, x2)) = x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosInact) = 0   




↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
QTRS
                  ↳ DependencyPairsProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(cons(N, L)) → U11(tt, a(L))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(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:

LENGTH(cons(N, L)) → A(L)
A(takeInact(x1, x2)) → TAKE(x1, x2)
TAKE(s(M), cons(N, IL)) → A(IL)
U211(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(M)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
U231(tt, IL, M, N) → A(IL)
U111(tt, L) → U121(tt, a(L))
U121(tt, L) → LENGTH(a(L))
U221(tt, IL, M, N) → A(N)
A(zerosInact) → ZEROS
U231(tt, IL, M, N) → A(N)
U121(tt, L) → A(L)
U211(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → A(L)
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))
U221(tt, IL, M, N) → A(IL)

The TRS R consists of the following rules:

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(cons(N, L)) → U11(tt, a(L))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(x1, x2)) → take(x1, x2)

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
QDP
                      ↳ DependencyGraphProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(cons(N, L)) → A(L)
A(takeInact(x1, x2)) → TAKE(x1, x2)
TAKE(s(M), cons(N, IL)) → A(IL)
U211(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(M)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
U231(tt, IL, M, N) → A(IL)
U111(tt, L) → U121(tt, a(L))
U121(tt, L) → LENGTH(a(L))
U221(tt, IL, M, N) → A(N)
A(zerosInact) → ZEROS
U231(tt, IL, M, N) → A(N)
U121(tt, L) → A(L)
U211(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → A(L)
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))
U221(tt, IL, M, N) → A(IL)

The TRS R consists of the following rules:

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(cons(N, L)) → U11(tt, a(L))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(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 with 4 less nodes.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
QDP
                            ↳ UsableRulesProof
                          ↳ QDP
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

A(takeInact(x1, x2)) → TAKE(x1, x2)
TAKE(s(M), cons(N, IL)) → A(IL)
U211(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(M)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
U231(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))
U221(tt, IL, M, N) → A(IL)

The TRS R consists of the following rules:

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(cons(N, L)) → U11(tt, a(L))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(x1, x2)) → take(x1, x2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ UsableRulesReductionPairsProof
                          ↳ QDP
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

A(takeInact(x1, x2)) → TAKE(x1, x2)
TAKE(s(M), cons(N, IL)) → A(IL)
U211(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(M)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
U231(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
U221(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(x1, x2)
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
take(x1, x2) → takeInact(x1, x2)
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
zeroscons(0, zerosInact)
zeroszerosInact

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

TAKE(s(M), cons(N, IL)) → A(IL)
U211(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(M)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
U221(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
U221(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))
The following rules are removed from R:

take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(A(x1)) = 2·x1   
POL(TAKE(x1, x2)) = 2·x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 2 + 2·x1 + x2 + 2·x3 + x4   
POL(U211(x1, x2, x3, x4)) = 2 + 2·x1 + 2·x2 + 2·x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + 2·x3 + x4   
POL(U221(x1, x2, x3, x4)) = 1 + 2·x1 + 2·x2 + 2·x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 2·x1 + x2 + 2·x3 + x4   
POL(U231(x1, x2, x3, x4)) = x1 + 2·x2 + 2·x3 + 2·x4   
POL(a(x1)) = x1   
POL(cons(x1, x2)) = x1 + x2   
POL(s(x1)) = 1 + x1   
POL(take(x1, x2)) = 2·x1 + x2   
POL(takeInact(x1, x2)) = 2·x1 + x2   
POL(tt) = 0   
POL(zeros) = 1   
POL(zerosInact) = 1   



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
QDP
                                    ↳ DependencyGraphProof
                          ↳ QDP
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U231(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(M)
A(takeInact(x1, x2)) → TAKE(x1, x2)
U231(tt, IL, M, N) → A(IL)

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(x1, x2)
take(x1, x2) → takeInact(x1, x2)
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
zeroscons(0, zerosInact)
zeroszerosInact

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
QDP
                            ↳ UsableRulesProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → U121(tt, a(L))
U121(tt, L) → LENGTH(a(L))

The TRS R consists of the following rules:

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(cons(N, L)) → U11(tt, a(L))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(x1, x2)) → take(x1, x2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ UsableRulesReductionPairsProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(cons(N, L)) → U111(tt, a(L))
U121(tt, L) → LENGTH(a(L))
U111(tt, L) → U121(tt, a(L))

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(x1, x2)
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
take(x1, x2) → takeInact(x1, x2)
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
zeroscons(0, zerosInact)
zeroszerosInact

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(LENGTH(x1)) = 2·x1   
POL(U111(x1, x2)) = x1 + 2·x2   
POL(U121(x1, x2)) = x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 2 + 2·x1 + 2·x2 + 2·x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 2 + x1 + 2·x2 + 2·x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 2·x1 + 2·x2 + 2·x3 + 2·x4   
POL(a(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + 2·x2   
POL(s(x1)) = 2 + 2·x1   
POL(take(x1, x2)) = x1 + x2   
POL(takeInact(x1, x2)) = x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosInact) = 0   



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
QDP
                                    ↳ UsableRulesProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → U121(tt, a(L))
U121(tt, L) → LENGTH(a(L))

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(x1, x2)
take(x1, x2) → takeInact(x1, x2)
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
zeroscons(0, zerosInact)
zeroszerosInact

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
QDP
                                        ↳ Narrowing
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(cons(N, L)) → U111(tt, a(L))
U121(tt, L) → LENGTH(a(L))
U111(tt, L) → U121(tt, a(L))

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(x1, x2)
take(x1, x2) → takeInact(x1, x2)
zeroscons(0, zerosInact)
zeroszerosInact

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

U121(tt, zerosInact) → LENGTH(zeros)
U121(tt, takeInact(x0, x1)) → LENGTH(take(x0, x1))
U121(tt, x0) → LENGTH(x0)



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
                                      ↳ QDP
                                        ↳ Narrowing
QDP
                                            ↳ Narrowing
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U121(tt, zerosInact) → LENGTH(zeros)
LENGTH(cons(N, L)) → U111(tt, a(L))
U121(tt, x0) → LENGTH(x0)
U121(tt, takeInact(x0, x1)) → LENGTH(take(x0, x1))
U111(tt, L) → U121(tt, a(L))

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(x1, x2)
take(x1, x2) → takeInact(x1, x2)
zeroscons(0, zerosInact)
zeroszerosInact

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

U121(tt, zerosInact) → LENGTH(zerosInact)
U121(tt, zerosInact) → LENGTH(cons(0, zerosInact))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
QDP
                                                ↳ DependencyGraphProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U121(tt, zerosInact) → LENGTH(cons(0, zerosInact))
U121(tt, zerosInact) → LENGTH(zerosInact)
LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → U121(tt, a(L))
U121(tt, takeInact(x0, x1)) → LENGTH(take(x0, x1))
U121(tt, x0) → LENGTH(x0)

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(x1, x2)
take(x1, x2) → takeInact(x1, x2)
zeroscons(0, zerosInact)
zeroszerosInact

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ DependencyGraphProof
QDP
                                                    ↳ Narrowing
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U121(tt, zerosInact) → LENGTH(cons(0, zerosInact))
LENGTH(cons(N, L)) → U111(tt, a(L))
U121(tt, x0) → LENGTH(x0)
U121(tt, takeInact(x0, x1)) → LENGTH(take(x0, x1))
U111(tt, L) → U121(tt, a(L))

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(x1, x2)
take(x1, x2) → takeInact(x1, x2)
zeroscons(0, zerosInact)
zeroszerosInact

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule U121(tt, takeInact(x0, x1)) → LENGTH(take(x0, x1)) at position [0] we obtained the following new rules:

U121(tt, takeInact(x0, x1)) → LENGTH(takeInact(x0, x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
QDP
                                                        ↳ DependencyGraphProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U121(tt, takeInact(x0, x1)) → LENGTH(takeInact(x0, x1))
U121(tt, zerosInact) → LENGTH(cons(0, zerosInact))
LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → U121(tt, a(L))
U121(tt, x0) → LENGTH(x0)

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(x1, x2)
take(x1, x2) → takeInact(x1, x2)
zeroscons(0, zerosInact)
zeroszerosInact

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
QDP
                                                            ↳ NonTerminationProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U121(tt, zerosInact) → LENGTH(cons(0, zerosInact))
LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → U121(tt, a(L))
U121(tt, x0) → LENGTH(x0)

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(x1, x2)
take(x1, x2) → takeInact(x1, x2)
zeroscons(0, zerosInact)
zeroszerosInact

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:

U121(tt, zerosInact) → LENGTH(cons(0, zerosInact))
LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → U121(tt, a(L))
U121(tt, x0) → LENGTH(x0)

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(x1, x2)
take(x1, x2) → takeInact(x1, x2)
zeroscons(0, zerosInact)
zeroszerosInact


s = LENGTH(cons(N, zerosInact)) evaluates to t =LENGTH(cons(0, zerosInact))

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




Rewriting sequence

LENGTH(cons(N, zerosInact))U111(tt, a(zerosInact))
with rule LENGTH(cons(N', L)) → U111(tt, a(L)) at position [] and matcher [L / zerosInact, N' / N]

U111(tt, a(zerosInact))U111(tt, zerosInact)
with rule a(x) → x at position [1] and matcher [x / zerosInact]

U111(tt, zerosInact)U121(tt, a(zerosInact))
with rule U111(tt, L) → U121(tt, a(L)) at position [] and matcher [L / zerosInact]

U121(tt, a(zerosInact))U121(tt, zerosInact)
with rule a(x) → x at position [1] and matcher [x / zerosInact]

U121(tt, zerosInact)LENGTH(cons(0, zerosInact))
with rule U121(tt, zerosInact) → LENGTH(cons(0, zerosInact))

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.




We applied the Innermost Giesl Middeldorp transformation [10] to transform the context-sensitive TRS to a usual TRS.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
QTRS
          ↳ RRRPoloQTRSProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)


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

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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

active(length(nil)) → mark(0)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(U11(x1, x2)) = 2·x1 + 2·x2   
POL(U12(x1, x2)) = 2·x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 2 + 2·x1 + x2 + x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 2 + x1 + x2 + x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 2 + x1 + x2 + x3 + 2·x4   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = 2·x1   
POL(mark(x1)) = x1   
POL(nil) = 2   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 2 + x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   




↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
QTRS
              ↳ RRRPoloQTRSProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)


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

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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

active(take(0, IL)) → mark(nil)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(U11(x1, x2)) = 2·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 + x1 + 2·x2 + x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 1 + x1 + 2·x2 + x3 + 2·x4   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = 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   




↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
QTRS
                  ↳ DependencyPairsProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)


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)
U211(active(x1), x2, x3, x4) → U211(x1, x2, x3, x4)
ACTIVE(U23(tt, IL, M, N)) → TAKE(M, IL)
ACTIVE(U11(tt, L)) → U121(tt, L)
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
MARK(tt) → ACTIVE(tt)
ACTIVE(U23(tt, IL, M, N)) → CONS(N, take(M, IL))
MARK(U11(x1, x2)) → MARK(x1)
TAKE(x1, active(x2)) → TAKE(x1, x2)
MARK(cons(x1, x2)) → MARK(x1)
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
ACTIVE(U12(tt, L)) → S(length(L))
MARK(length(x1)) → MARK(x1)
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(zeros) → CONS(0, zeros)
MARK(take(x1, x2)) → MARK(x1)
MARK(take(x1, x2)) → TAKE(mark(x1), mark(x2))
U121(active(x1), x2) → U121(x1, x2)
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
S(active(x1)) → S(x1)
MARK(U12(x1, x2)) → MARK(x1)
MARK(cons(x1, x2)) → CONS(mark(x1), x2)
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
TAKE(active(x1), x2) → TAKE(x1, x2)
MARK(length(x1)) → ACTIVE(length(mark(x1)))
U221(mark(x1), x2, x3, x4) → U221(x1, x2, x3, x4)
MARK(zeros) → ACTIVE(zeros)
ACTIVE(length(cons(N, L))) → U111(tt, L)
MARK(length(x1)) → LENGTH(mark(x1))
MARK(U21(x1, x2, x3, x4)) → MARK(x1)
TAKE(mark(x1), x2) → TAKE(x1, x2)
U221(active(x1), x2, x3, x4) → U221(x1, x2, x3, x4)
CONS(active(x1), x2) → CONS(x1, x2)
ACTIVE(take(s(M), cons(N, IL))) → U211(tt, IL, M, N)
U111(mark(x1), x2) → U111(x1, x2)
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
ACTIVE(U12(tt, L)) → LENGTH(L)
MARK(U23(x1, x2, x3, x4)) → U231(mark(x1), x2, x3, x4)
MARK(take(x1, x2)) → MARK(x2)
CONS(mark(x1), x2) → CONS(x1, x2)
MARK(s(x1)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
U231(mark(x1), x2, x3, x4) → U231(x1, x2, x3, x4)
MARK(U11(x1, x2)) → U111(mark(x1), x2)
ACTIVE(U21(tt, IL, M, N)) → U221(tt, IL, M, N)
MARK(U12(x1, x2)) → U121(mark(x1), x2)
U211(mark(x1), x2, x3, x4) → U211(x1, x2, x3, x4)
MARK(s(x1)) → ACTIVE(s(mark(x1)))
ACTIVE(U22(tt, IL, M, N)) → U231(tt, IL, M, N)
LENGTH(mark(x1)) → LENGTH(x1)
MARK(U23(x1, x2, x3, x4)) → MARK(x1)
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
LENGTH(active(x1)) → LENGTH(x1)
MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
U111(active(x1), x2) → U111(x1, x2)
MARK(s(x1)) → S(mark(x1))
S(mark(x1)) → S(x1)
MARK(cons(x1, x2)) → ACTIVE(cons(mark(x1), x2))
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(U21(x1, x2, x3, x4)) → U211(mark(x1), x2, x3, x4)
ACTIVE(take(s(M), cons(N, IL))) → MARK(U21(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
TAKE(x1, mark(x2)) → TAKE(x1, x2)
U231(active(x1), x2, x3, x4) → U231(x1, x2, x3, x4)
MARK(0) → ACTIVE(0)
ACTIVE(zeros) → MARK(cons(0, zeros))
U121(mark(x1), x2) → U121(x1, x2)
MARK(nil) → ACTIVE(nil)
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(U22(x1, x2, x3, x4)) → U221(mark(x1), x2, x3, x4)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
QDP
                      ↳ DependencyGraphProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U22(x1, x2, x3, x4)) → MARK(x1)
U211(active(x1), x2, x3, x4) → U211(x1, x2, x3, x4)
ACTIVE(U23(tt, IL, M, N)) → TAKE(M, IL)
ACTIVE(U11(tt, L)) → U121(tt, L)
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
MARK(tt) → ACTIVE(tt)
ACTIVE(U23(tt, IL, M, N)) → CONS(N, take(M, IL))
MARK(U11(x1, x2)) → MARK(x1)
TAKE(x1, active(x2)) → TAKE(x1, x2)
MARK(cons(x1, x2)) → MARK(x1)
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
ACTIVE(U12(tt, L)) → S(length(L))
MARK(length(x1)) → MARK(x1)
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(zeros) → CONS(0, zeros)
MARK(take(x1, x2)) → MARK(x1)
MARK(take(x1, x2)) → TAKE(mark(x1), mark(x2))
U121(active(x1), x2) → U121(x1, x2)
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
S(active(x1)) → S(x1)
MARK(U12(x1, x2)) → MARK(x1)
MARK(cons(x1, x2)) → CONS(mark(x1), x2)
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
TAKE(active(x1), x2) → TAKE(x1, x2)
MARK(length(x1)) → ACTIVE(length(mark(x1)))
U221(mark(x1), x2, x3, x4) → U221(x1, x2, x3, x4)
MARK(zeros) → ACTIVE(zeros)
ACTIVE(length(cons(N, L))) → U111(tt, L)
MARK(length(x1)) → LENGTH(mark(x1))
MARK(U21(x1, x2, x3, x4)) → MARK(x1)
TAKE(mark(x1), x2) → TAKE(x1, x2)
U221(active(x1), x2, x3, x4) → U221(x1, x2, x3, x4)
CONS(active(x1), x2) → CONS(x1, x2)
ACTIVE(take(s(M), cons(N, IL))) → U211(tt, IL, M, N)
U111(mark(x1), x2) → U111(x1, x2)
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
ACTIVE(U12(tt, L)) → LENGTH(L)
MARK(U23(x1, x2, x3, x4)) → U231(mark(x1), x2, x3, x4)
MARK(take(x1, x2)) → MARK(x2)
CONS(mark(x1), x2) → CONS(x1, x2)
MARK(s(x1)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
U231(mark(x1), x2, x3, x4) → U231(x1, x2, x3, x4)
MARK(U11(x1, x2)) → U111(mark(x1), x2)
ACTIVE(U21(tt, IL, M, N)) → U221(tt, IL, M, N)
MARK(U12(x1, x2)) → U121(mark(x1), x2)
U211(mark(x1), x2, x3, x4) → U211(x1, x2, x3, x4)
MARK(s(x1)) → ACTIVE(s(mark(x1)))
ACTIVE(U22(tt, IL, M, N)) → U231(tt, IL, M, N)
LENGTH(mark(x1)) → LENGTH(x1)
MARK(U23(x1, x2, x3, x4)) → MARK(x1)
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
LENGTH(active(x1)) → LENGTH(x1)
MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
U111(active(x1), x2) → U111(x1, x2)
MARK(s(x1)) → S(mark(x1))
S(mark(x1)) → S(x1)
MARK(cons(x1, x2)) → ACTIVE(cons(mark(x1), x2))
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(U21(x1, x2, x3, x4)) → U211(mark(x1), x2, x3, x4)
ACTIVE(take(s(M), cons(N, IL))) → MARK(U21(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
TAKE(x1, mark(x2)) → TAKE(x1, x2)
U231(active(x1), x2, x3, x4) → U231(x1, x2, x3, x4)
MARK(0) → ACTIVE(0)
ACTIVE(zeros) → MARK(cons(0, zeros))
U121(mark(x1), x2) → U121(x1, x2)
MARK(nil) → ACTIVE(nil)
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(U22(x1, x2, x3, x4)) → U221(mark(x1), x2, x3, x4)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
QDP
                            ↳ UsableRulesProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

TAKE(x1, active(x2)) → TAKE(x1, x2)
TAKE(active(x1), x2) → TAKE(x1, x2)
TAKE(mark(x1), x2) → TAKE(x1, x2)
TAKE(x1, mark(x2)) → TAKE(x1, x2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

TAKE(x1, active(x2)) → TAKE(x1, x2)
TAKE(active(x1), x2) → TAKE(x1, x2)
TAKE(mark(x1), x2) → TAKE(x1, x2)
TAKE(x1, mark(x2)) → TAKE(x1, x2)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

cons(active(x0), x1)
cons(mark(x0), x1)
U11(active(x0), x1)
U11(mark(x0), x1)
U12(active(x0), x1)
U12(mark(x0), x1)
s(active(x0))
s(mark(x0))
length(active(x0))
length(mark(x0))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ QDPSizeChangeProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

TAKE(x1, active(x2)) → TAKE(x1, x2)
TAKE(mark(x1), x2) → TAKE(x1, x2)
TAKE(active(x1), x2) → TAKE(x1, x2)
TAKE(x1, mark(x2)) → TAKE(x1, x2)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
mark(0)
mark(U11(x0, x1))
mark(tt)
mark(U12(x0, x1))
mark(s(x0))
mark(length(x0))
mark(U21(x0, x1, x2, x3))
mark(U22(x0, x1, x2, x3))
mark(U23(x0, x1, x2, x3))
mark(take(x0, x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
QDP
                            ↳ UsableRulesProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U231(active(x1), x2, x3, x4) → U231(x1, x2, x3, x4)
U231(mark(x1), x2, x3, x4) → U231(x1, x2, x3, x4)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U231(active(x1), x2, x3, x4) → U231(x1, x2, x3, x4)
U231(mark(x1), x2, x3, x4) → U231(x1, x2, x3, x4)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

cons(active(x0), x1)
cons(mark(x0), x1)
U11(active(x0), x1)
U11(mark(x0), x1)
U12(active(x0), x1)
U12(mark(x0), x1)
s(active(x0))
s(mark(x0))
length(active(x0))
length(mark(x0))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ QDPSizeChangeProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U231(active(x1), x2, x3, x4) → U231(x1, x2, x3, x4)
U231(mark(x1), x2, x3, x4) → U231(x1, x2, x3, x4)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
mark(0)
mark(U11(x0, x1))
mark(tt)
mark(U12(x0, x1))
mark(s(x0))
mark(length(x0))
mark(U21(x0, x1, x2, x3))
mark(U22(x0, x1, x2, x3))
mark(U23(x0, x1, x2, x3))
mark(take(x0, x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
QDP
                            ↳ UsableRulesProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U221(active(x1), x2, x3, x4) → U221(x1, x2, x3, x4)
U221(mark(x1), x2, x3, x4) → U221(x1, x2, x3, x4)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U221(active(x1), x2, x3, x4) → U221(x1, x2, x3, x4)
U221(mark(x1), x2, x3, x4) → U221(x1, x2, x3, x4)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

cons(active(x0), x1)
cons(mark(x0), x1)
U11(active(x0), x1)
U11(mark(x0), x1)
U12(active(x0), x1)
U12(mark(x0), x1)
s(active(x0))
s(mark(x0))
length(active(x0))
length(mark(x0))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ QDPSizeChangeProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U221(active(x1), x2, x3, x4) → U221(x1, x2, x3, x4)
U221(mark(x1), x2, x3, x4) → U221(x1, x2, x3, x4)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
mark(0)
mark(U11(x0, x1))
mark(tt)
mark(U12(x0, x1))
mark(s(x0))
mark(length(x0))
mark(U21(x0, x1, x2, x3))
mark(U22(x0, x1, x2, x3))
mark(U23(x0, x1, x2, x3))
mark(take(x0, x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
QDP
                            ↳ UsableRulesProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U211(active(x1), x2, x3, x4) → U211(x1, x2, x3, x4)
U211(mark(x1), x2, x3, x4) → U211(x1, x2, x3, x4)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U211(active(x1), x2, x3, x4) → U211(x1, x2, x3, x4)
U211(mark(x1), x2, x3, x4) → U211(x1, x2, x3, x4)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

cons(active(x0), x1)
cons(mark(x0), x1)
U11(active(x0), x1)
U11(mark(x0), x1)
U12(active(x0), x1)
U12(mark(x0), x1)
s(active(x0))
s(mark(x0))
length(active(x0))
length(mark(x0))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ QDPSizeChangeProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U211(active(x1), x2, x3, x4) → U211(x1, x2, x3, x4)
U211(mark(x1), x2, x3, x4) → U211(x1, x2, x3, x4)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
mark(0)
mark(U11(x0, x1))
mark(tt)
mark(U12(x0, x1))
mark(s(x0))
mark(length(x0))
mark(U21(x0, x1, x2, x3))
mark(U22(x0, x1, x2, x3))
mark(U23(x0, x1, x2, x3))
mark(take(x0, x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
QDP
                            ↳ UsableRulesProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(mark(x1)) → LENGTH(x1)
LENGTH(active(x1)) → LENGTH(x1)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(mark(x1)) → LENGTH(x1)
LENGTH(active(x1)) → LENGTH(x1)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

cons(active(x0), x1)
cons(mark(x0), x1)
U11(active(x0), x1)
U11(mark(x0), x1)
U12(active(x0), x1)
U12(mark(x0), x1)
s(active(x0))
s(mark(x0))
length(active(x0))
length(mark(x0))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ QDPSizeChangeProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(mark(x1)) → LENGTH(x1)
LENGTH(active(x1)) → LENGTH(x1)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
mark(0)
mark(U11(x0, x1))
mark(tt)
mark(U12(x0, x1))
mark(s(x0))
mark(length(x0))
mark(U21(x0, x1, x2, x3))
mark(U22(x0, x1, x2, x3))
mark(U23(x0, x1, x2, x3))
mark(take(x0, x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
QDP
                            ↳ UsableRulesProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

S(active(x1)) → S(x1)
S(mark(x1)) → S(x1)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

S(active(x1)) → S(x1)
S(mark(x1)) → S(x1)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

cons(active(x0), x1)
cons(mark(x0), x1)
U11(active(x0), x1)
U11(mark(x0), x1)
U12(active(x0), x1)
U12(mark(x0), x1)
s(active(x0))
s(mark(x0))
length(active(x0))
length(mark(x0))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ QDPSizeChangeProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

S(mark(x1)) → S(x1)
S(active(x1)) → S(x1)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
mark(0)
mark(U11(x0, x1))
mark(tt)
mark(U12(x0, x1))
mark(s(x0))
mark(length(x0))
mark(U21(x0, x1, x2, x3))
mark(U22(x0, x1, x2, x3))
mark(U23(x0, x1, x2, x3))
mark(take(x0, x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
QDP
                            ↳ UsableRulesProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U121(mark(x1), x2) → U121(x1, x2)
U121(active(x1), x2) → U121(x1, x2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U121(mark(x1), x2) → U121(x1, x2)
U121(active(x1), x2) → U121(x1, x2)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

cons(active(x0), x1)
cons(mark(x0), x1)
U11(active(x0), x1)
U11(mark(x0), x1)
U12(active(x0), x1)
U12(mark(x0), x1)
s(active(x0))
s(mark(x0))
length(active(x0))
length(mark(x0))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ QDPSizeChangeProof
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U121(mark(x1), x2) → U121(x1, x2)
U121(active(x1), x2) → U121(x1, x2)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
mark(0)
mark(U11(x0, x1))
mark(tt)
mark(U12(x0, x1))
mark(s(x0))
mark(length(x0))
mark(U21(x0, x1, x2, x3))
mark(U22(x0, x1, x2, x3))
mark(U23(x0, x1, x2, x3))
mark(take(x0, x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
QDP
                            ↳ UsableRulesProof
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U111(active(x1), x2) → U111(x1, x2)
U111(mark(x1), x2) → U111(x1, x2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U111(active(x1), x2) → U111(x1, x2)
U111(mark(x1), x2) → U111(x1, x2)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

cons(active(x0), x1)
cons(mark(x0), x1)
U11(active(x0), x1)
U11(mark(x0), x1)
U12(active(x0), x1)
U12(mark(x0), x1)
s(active(x0))
s(mark(x0))
length(active(x0))
length(mark(x0))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ QDPSizeChangeProof
                          ↳ QDP
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

U111(active(x1), x2) → U111(x1, x2)
U111(mark(x1), x2) → U111(x1, x2)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
mark(0)
mark(U11(x0, x1))
mark(tt)
mark(U12(x0, x1))
mark(s(x0))
mark(length(x0))
mark(U21(x0, x1, x2, x3))
mark(U22(x0, x1, x2, x3))
mark(U23(x0, x1, x2, x3))
mark(take(x0, x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
QDP
                            ↳ UsableRulesProof
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

CONS(mark(x1), x2) → CONS(x1, x2)
CONS(active(x1), x2) → CONS(x1, x2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

CONS(mark(x1), x2) → CONS(x1, x2)
CONS(active(x1), x2) → CONS(x1, x2)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

cons(active(x0), x1)
cons(mark(x0), x1)
U11(active(x0), x1)
U11(mark(x0), x1)
U12(active(x0), x1)
U12(mark(x0), x1)
s(active(x0))
s(mark(x0))
length(active(x0))
length(mark(x0))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ QDPSizeChangeProof
                          ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

CONS(mark(x1), x2) → CONS(x1, x2)
CONS(active(x1), x2) → CONS(x1, x2)

R is empty.
The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
mark(0)
mark(U11(x0, x1))
mark(tt)
mark(U12(x0, x1))
mark(s(x0))
mark(length(x0))
mark(U21(x0, x1, x2, x3))
mark(U22(x0, x1, x2, x3))
mark(U23(x0, x1, x2, x3))
mark(take(x0, x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
QDP
                            ↳ RuleRemovalProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U22(x1, x2, x3, x4)) → MARK(x1)
MARK(take(x1, x2)) → MARK(x2)
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
MARK(U11(x1, x2)) → MARK(x1)
MARK(s(x1)) → MARK(x1)
MARK(cons(x1, x2)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → MARK(x1)
MARK(s(x1)) → ACTIVE(s(mark(x1)))
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
MARK(take(x1, x2)) → MARK(x1)
MARK(U23(x1, x2, x3, x4)) → MARK(x1)
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
MARK(U12(x1, x2)) → MARK(x1)
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(cons(x1, x2)) → ACTIVE(cons(mark(x1), x2))
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
ACTIVE(take(s(M), cons(N, IL))) → MARK(U21(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(zeros) → ACTIVE(zeros)
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(U21(x1, x2, x3, x4)) → MARK(x1)
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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)
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(ACTIVE(x1)) = x1   
POL(MARK(x1)) = 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 + 2·x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 2 + 2·x1 + 2·x2 + 2·x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 2 + 2·x1 + 2·x2 + 2·x3 + x4   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = x1 + x2   
POL(length(x1)) = 2·x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 2 + 2·x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 0   



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ RuleRemovalProof
QDP
                                ↳ RuleRemovalProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
MARK(U12(x1, x2)) → MARK(x1)
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(U11(x1, x2)) → MARK(x1)
MARK(cons(x1, x2)) → ACTIVE(cons(mark(x1), x2))
MARK(s(x1)) → MARK(x1)
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
ACTIVE(take(s(M), cons(N, IL))) → MARK(U21(tt, IL, M, N))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(length(x1)) → MARK(x1)
MARK(zeros) → ACTIVE(zeros)
MARK(s(x1)) → ACTIVE(s(mark(x1)))
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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(U12(x1, x2)) → MARK(x1)
MARK(U11(x1, x2)) → MARK(x1)
MARK(length(x1)) → MARK(x1)


Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = 2·x1   
POL(MARK(x1)) = 2·x1   
POL(U11(x1, x2)) = 2 + x1 + 2·x2   
POL(U12(x1, x2)) = 2 + 2·x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = x1 + x2 + x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + 2·x4   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = 2 + 2·x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ RuleRemovalProof
                              ↳ QDP
                                ↳ RuleRemovalProof
QDP
                                    ↳ QDPOrderProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(cons(x1, x2)) → ACTIVE(cons(mark(x1), x2))
MARK(s(x1)) → MARK(x1)
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
ACTIVE(take(s(M), cons(N, IL))) → MARK(U21(tt, IL, M, N))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(s(x1)) → ACTIVE(s(mark(x1)))
MARK(zeros) → ACTIVE(zeros)
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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.


MARK(cons(x1, x2)) → ACTIVE(cons(mark(x1), x2))
MARK(s(x1)) → ACTIVE(s(mark(x1)))
The remaining pairs can at least be oriented weakly.

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
ACTIVE(take(s(M), cons(N, IL))) → MARK(U21(tt, IL, M, N))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(zeros) → ACTIVE(zeros)
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = 1   
POL(U11(x1, x2)) = 1   
POL(U12(x1, x2)) = 1   
POL(U21(x1, x2, x3, x4)) = 1   
POL(U22(x1, x2, x3, x4)) = 1   
POL(U23(x1, x2, x3, x4)) = 1   
POL(active(x1)) = 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 [17] were oriented:

cons(mark(x1), x2) → cons(x1, x2)
cons(active(x1), x2) → cons(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
U12(active(x1), x2) → U12(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
U11(active(x1), x2) → U11(x1, x2)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
s(mark(x1)) → s(x1)
s(active(x1)) → s(x1)
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
take(x1, mark(x2)) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(active(x1), x2) → take(x1, x2)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ RuleRemovalProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
QDP
                                        ↳ QDPOrderProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
ACTIVE(take(s(M), cons(N, IL))) → MARK(U21(tt, IL, M, N))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(zeros) → ACTIVE(zeros)
ACTIVE(zeros) → MARK(cons(0, zeros))
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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.


ACTIVE(zeros) → MARK(cons(0, zeros))
The remaining pairs can at least be oriented weakly.

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
ACTIVE(take(s(M), cons(N, IL))) → MARK(U21(tt, IL, M, N))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(zeros) → ACTIVE(zeros)
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(U11(x1, x2)) = 0   
POL(U12(x1, x2)) = 0   
POL(U21(x1, x2, x3, x4)) = x4   
POL(U22(x1, x2, x3, x4)) = x4   
POL(U23(x1, x2, x3, x4)) = x4   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = x1   
POL(length(x1)) = 0   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   
POL(zeros) = 1   

The following usable rules [17] were oriented:

mark(0) → active(0)
cons(mark(x1), x2) → cons(x1, x2)
cons(active(x1), x2) → cons(x1, x2)
mark(zeros) → active(zeros)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(U12(tt, L)) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
active(length(cons(N, L))) → mark(U11(tt, L))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
mark(length(x1)) → active(length(mark(x1)))
active(zeros) → mark(cons(0, zeros))
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
mark(s(x1)) → active(s(mark(x1)))
active(U11(tt, L)) → mark(U12(tt, L))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
mark(nil) → active(nil)
U12(mark(x1), x2) → U12(x1, x2)
U12(active(x1), x2) → U12(x1, x2)
mark(tt) → active(tt)
U11(mark(x1), x2) → U11(x1, x2)
U11(active(x1), x2) → U11(x1, x2)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
s(mark(x1)) → s(x1)
s(active(x1)) → s(x1)
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
take(x1, mark(x2)) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(active(x1), x2) → take(x1, x2)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ RuleRemovalProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
QDP
                                            ↳ DependencyGraphProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
ACTIVE(take(s(M), cons(N, IL))) → MARK(U21(tt, IL, M, N))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(zeros) → ACTIVE(zeros)
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ RuleRemovalProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ DependencyGraphProof
QDP
                                                ↳ QDPOrderProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
ACTIVE(take(s(M), cons(N, IL))) → MARK(U21(tt, IL, M, N))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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.


ACTIVE(take(s(M), cons(N, IL))) → MARK(U21(tt, IL, M, N))
The remaining pairs can at least be oriented weakly.

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(U11(x1, x2)) = 0   
POL(U12(x1, x2)) = 0   
POL(U21(x1, x2, x3, x4)) = x4   
POL(U22(x1, x2, x3, x4)) = x4   
POL(U23(x1, x2, x3, x4)) = x4   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = x1   
POL(length(x1)) = 0   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 1 + x2   
POL(tt) = 0   
POL(zeros) = 0   

The following usable rules [17] were oriented:

mark(0) → active(0)
cons(mark(x1), x2) → cons(x1, x2)
cons(active(x1), x2) → cons(x1, x2)
mark(zeros) → active(zeros)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(U12(tt, L)) → mark(s(length(L)))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
active(length(cons(N, L))) → mark(U11(tt, L))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
mark(length(x1)) → active(length(mark(x1)))
active(zeros) → mark(cons(0, zeros))
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
mark(s(x1)) → active(s(mark(x1)))
active(U11(tt, L)) → mark(U12(tt, L))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
mark(nil) → active(nil)
U12(mark(x1), x2) → U12(x1, x2)
U12(active(x1), x2) → U12(x1, x2)
mark(tt) → active(tt)
U11(mark(x1), x2) → U11(x1, x2)
U11(active(x1), x2) → U11(x1, x2)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
s(mark(x1)) → s(x1)
s(active(x1)) → s(x1)
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
take(x1, mark(x2)) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(active(x1), x2) → take(x1, x2)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ RuleRemovalProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
QDP
                                                    ↳ QDPOrderProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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.


ACTIVE(U21(tt, IL, M, N)) → MARK(U22(tt, IL, M, N))
The remaining pairs can at least be oriented weakly.

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(U11(x1, x2)) = 0   
POL(U12(x1, x2)) = 0   
POL(U21(x1, x2, x3, x4)) = 1 + x2 + x3 + x4   
POL(U22(x1, x2, x3, x4)) = x2 + x3 + x4   
POL(U23(x1, x2, x3, x4)) = x3 + x4   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = x1   
POL(length(x1)) = 0   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 0   
POL(tt) = 0   
POL(zeros) = 0   

The following usable rules [17] were oriented:

cons(mark(x1), x2) → cons(x1, x2)
cons(active(x1), x2) → cons(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
U12(active(x1), x2) → U12(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
U11(active(x1), x2) → U11(x1, x2)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
s(mark(x1)) → s(x1)
s(active(x1)) → s(x1)
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
take(x1, mark(x2)) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(active(x1), x2) → take(x1, x2)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ RuleRemovalProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
QDP
                                                        ↳ QDPOrderProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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.


MARK(U21(x1, x2, x3, x4)) → ACTIVE(U21(mark(x1), x2, x3, x4))
MARK(take(x1, x2)) → ACTIVE(take(mark(x1), mark(x2)))
The remaining pairs can at least be oriented weakly.

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = 1   
POL(U11(x1, x2)) = 1   
POL(U12(x1, x2)) = 1   
POL(U21(x1, x2, x3, x4)) = 0   
POL(U22(x1, x2, x3, x4)) = 1   
POL(U23(x1, x2, x3, x4)) = 1   
POL(active(x1)) = 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)) = 0   
POL(tt) = 0   
POL(zeros) = 0   

The following usable rules [17] were oriented:

U12(mark(x1), x2) → U12(x1, x2)
U12(active(x1), x2) → U12(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
U11(active(x1), x2) → U11(x1, x2)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
take(x1, mark(x2)) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(active(x1), x2) → take(x1, x2)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ RuleRemovalProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
QDP
                                                            ↳ QDPOrderProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
MARK(cons(x1, x2)) → MARK(x1)
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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.


ACTIVE(U22(tt, IL, M, N)) → MARK(U23(tt, IL, M, N))
The remaining pairs can at least be oriented weakly.

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(U11(x1, x2)) = 0   
POL(U12(x1, x2)) = 0   
POL(U21(x1, x2, x3, x4)) = 0   
POL(U22(x1, x2, x3, x4)) = 1 + x2 + x3 + x4   
POL(U23(x1, x2, x3, x4)) = x4   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = x1   
POL(length(x1)) = 0   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 0   
POL(tt) = 0   
POL(zeros) = 0   

The following usable rules [17] were oriented:

cons(mark(x1), x2) → cons(x1, x2)
cons(active(x1), x2) → cons(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
U12(active(x1), x2) → U12(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
U11(active(x1), x2) → U11(x1, x2)
s(mark(x1)) → s(x1)
s(active(x1)) → s(x1)
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ RuleRemovalProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
                                                          ↳ QDP
                                                            ↳ QDPOrderProof
QDP
                                                                ↳ QDPOrderProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(cons(x1, x2)) → MARK(x1)
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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.


MARK(cons(x1, x2)) → MARK(x1)
The remaining pairs can at least be oriented weakly.

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(U11(x1, x2)) = 0   
POL(U12(x1, x2)) = 0   
POL(U21(x1, x2, x3, x4)) = 0   
POL(U22(x1, x2, x3, x4)) = x2   
POL(U23(x1, x2, x3, x4)) = 1 + x4   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = 1 + x1   
POL(length(x1)) = 0   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 0   
POL(tt) = 0   
POL(zeros) = 0   

The following usable rules [17] were oriented:

cons(mark(x1), x2) → cons(x1, x2)
cons(active(x1), x2) → cons(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
U12(active(x1), x2) → U12(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
U11(active(x1), x2) → U11(x1, x2)
s(mark(x1)) → s(x1)
s(active(x1)) → s(x1)
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ RuleRemovalProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
                                                          ↳ QDP
                                                            ↳ QDPOrderProof
                                                              ↳ QDP
                                                                ↳ QDPOrderProof
QDP
                                                                    ↳ DependencyGraphProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
ACTIVE(U23(tt, IL, M, N)) → MARK(cons(N, take(M, IL)))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ RuleRemovalProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
                                                          ↳ QDP
                                                            ↳ QDPOrderProof
                                                              ↳ QDP
                                                                ↳ QDPOrderProof
                                                                  ↳ QDP
                                                                    ↳ DependencyGraphProof
QDP
                                                                        ↳ QDPOrderProof
                                                                        ↳ QDPOrderProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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.


MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
The remaining pairs can at least be oriented weakly.

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = 0   
POL(MARK(x1)) = x1   
POL(U11(x1, x2)) = 0   
POL(U12(x1, x2)) = x1   
POL(U21(x1, x2, x3, x4)) = 1 + x3   
POL(U22(x1, x2, x3, x4)) = 1 + x3   
POL(U23(x1, x2, x3, x4)) = 1 + x1 + x3   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = 1   
POL(length(x1)) = 0   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = x1 + x2   
POL(tt) = 0   
POL(zeros) = 1   

The following usable rules [17] were oriented:

s(mark(x1)) → s(x1)
s(active(x1)) → s(x1)
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ RuleRemovalProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
                                                          ↳ QDP
                                                            ↳ QDPOrderProof
                                                              ↳ QDP
                                                                ↳ QDPOrderProof
                                                                  ↳ QDP
                                                                    ↳ DependencyGraphProof
                                                                      ↳ QDP
                                                                        ↳ QDPOrderProof
QDP
                                                                        ↳ QDPOrderProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

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.


MARK(U22(x1, x2, x3, x4)) → ACTIVE(U22(mark(x1), x2, x3, x4))
MARK(U23(x1, x2, x3, x4)) → ACTIVE(U23(mark(x1), x2, x3, x4))
The remaining pairs can at least be oriented weakly.

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = 1   
POL(U11(x1, x2)) = 1   
POL(U12(x1, x2)) = 1   
POL(U21(x1, x2, x3, x4)) = 0   
POL(U22(x1, x2, x3, x4)) = 0   
POL(U23(x1, x2, x3, x4)) = 0   
POL(active(x1)) = 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)) = 0   
POL(tt) = 0   
POL(zeros) = 0   

The following usable rules [17] were oriented:

U12(mark(x1), x2) → U12(x1, x2)
U12(active(x1), x2) → U12(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
U11(active(x1), x2) → U11(x1, x2)
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                          ↳ QDP
                            ↳ RuleRemovalProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
                                                          ↳ QDP
                                                            ↳ QDPOrderProof
                                                              ↳ QDP
                                                                ↳ QDPOrderProof
                                                                  ↳ QDP
                                                                    ↳ DependencyGraphProof
                                                                      ↳ QDP
                                                                        ↳ QDPOrderProof
                                                                        ↳ QDPOrderProof
QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(U11(x1, x2)) → ACTIVE(U11(mark(x1), x2))
ACTIVE(length(cons(N, L))) → MARK(U11(tt, L))
MARK(s(x1)) → MARK(x1)
MARK(U12(x1, x2)) → ACTIVE(U12(mark(x1), x2))
MARK(length(x1)) → ACTIVE(length(mark(x1)))
ACTIVE(U11(tt, L)) → MARK(U12(tt, L))
ACTIVE(U12(tt, L)) → MARK(s(length(L)))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U21(tt, IL, M, N)) → mark(U22(tt, IL, M, N))
active(U22(tt, IL, M, N)) → mark(U23(tt, IL, M, N))
active(U23(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(take(s(M), cons(N, IL))) → mark(U21(tt, IL, M, N))
mark(zeros) → active(zeros)
mark(cons(x1, x2)) → active(cons(mark(x1), x2))
cons(active(x1), x2) → cons(x1, x2)
cons(mark(x1), x2) → cons(x1, x2)
mark(0) → active(0)
mark(U11(x1, x2)) → active(U11(mark(x1), x2))
U11(active(x1), x2) → U11(x1, x2)
U11(mark(x1), x2) → U11(x1, x2)
mark(tt) → active(tt)
mark(U12(x1, x2)) → active(U12(mark(x1), x2))
U12(active(x1), x2) → U12(x1, x2)
U12(mark(x1), x2) → U12(x1, x2)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(length(x1)) → active(length(mark(x1)))
length(active(x1)) → length(x1)
length(mark(x1)) → length(x1)
mark(U21(x1, x2, x3, x4)) → active(U21(mark(x1), x2, x3, x4))
U21(active(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
U21(mark(x1), x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → active(U22(mark(x1), x2, x3, x4))
U22(active(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
U22(mark(x1), x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → active(U23(mark(x1), x2, x3, x4))
U23(active(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
U23(mark(x1), x2, x3, x4) → U23(x1, x2, x3, x4)
mark(take(x1, x2)) → active(take(mark(x1), mark(x2)))
take(active(x1), x2) → take(x1, x2)
take(mark(x1), x2) → take(x1, x2)
take(x1, active(x2)) → take(x1, x2)
take(x1, mark(x2)) → take(x1, x2)
mark(nil) → active(nil)

The set Q consists of the following terms:

active(zeros)
active(U11(tt, x0))
active(U12(tt, x0))
active(U21(tt, x0, x1, x2))
active(U22(tt, x0, x1, x2))
active(U23(tt, x0, x1, x2))
active(length(nil))
active(length(cons(x0, x1)))
active(take(0, x0))
active(take(s(x0), cons(x1, x2)))
mark(zeros)
mark(cons(x0, x1))
cons(active(x0), x1)
cons(mark(x0), x1)
mark(0)
mark(U11(x0, x1))
U11(active(x0), x1)
U11(mark(x0), x1)
mark(tt)
mark(U12(x0, x1))
U12(active(x0), x1)
U12(mark(x0), x1)
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(length(x0))
length(active(x0))
length(mark(x0))
mark(U21(x0, x1, x2, x3))
U21(active(x0), x1, x2, x3)
U21(mark(x0), x1, x2, x3)
mark(U22(x0, x1, x2, x3))
U22(active(x0), x1, x2, x3)
U22(mark(x0), x1, x2, x3)
mark(U23(x0, x1, x2, x3))
U23(active(x0), x1, x2, x3)
U23(mark(x0), x1, x2, x3)
mark(take(x0, x1))
take(active(x0), x1)
take(mark(x0), x1)
take(x0, active(x1))
take(x0, mark(x1))
mark(nil)

We have to consider all minimal (P,Q,R)-chains.
We applied the Trivial transformation to transform the context-sensitive TRS to a usual TRS.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
QTRS
          ↳ RRRPoloQTRSProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(nil) → 0
length(cons(N, L)) → U11(tt, L)
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

Q is empty.

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

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(nil) → 0
length(cons(N, L)) → U11(tt, L)
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

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

length(nil) → 0
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(U11(x1, x2)) = 2·x1 + x2   
POL(U12(x1, x2)) = x1 + x2   
POL(U21(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + 2·x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 1 + x1 + x2 + 2·x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 1 + x1 + x2 + 2·x3 + 2·x4   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = x1   
POL(nil) = 1   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 1 + 2·x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   




↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
QTRS
              ↳ RRRPoloQTRSProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(cons(N, L)) → U11(tt, L)
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

Q is empty.

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

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(cons(N, L)) → U11(tt, L)
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

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

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

POL(0) = 0   
POL(U11(x1, x2)) = x1 + x2   
POL(U12(x1, x2)) = 2·x1 + x2   
POL(U21(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + x3 + 2·x4   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 1 + x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   




↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
QTRS
                  ↳ Overlay + Local Confluence
      ↳ Improved Ferreira Ribeiro-Transformation

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

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(cons(N, L)) → U11(tt, L)
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

Q is empty.

The TRS is overlay and locally confluent. By [19] we can switch to innermost.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ Overlay + Local Confluence
QTRS
                      ↳ DependencyPairsProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(cons(N, L)) → U11(tt, L)
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

The set Q consists of the following terms:

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(cons(x0, x1))
take(s(x0), cons(x1, x2))


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

ZEROSZEROS
U211(tt, IL, M, N) → U221(tt, IL, M, N)
U231(tt, IL, M, N) → TAKE(M, IL)
LENGTH(cons(N, L)) → U111(tt, L)
U221(tt, IL, M, N) → U231(tt, IL, M, N)
TAKE(s(M), cons(N, IL)) → U211(tt, IL, M, N)
U121(tt, L) → LENGTH(L)
U111(tt, L) → U121(tt, L)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(cons(N, L)) → U11(tt, L)
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

The set Q consists of the following terms:

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(cons(x0, x1))
take(s(x0), cons(x1, x2))

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ Overlay + Local Confluence
                    ↳ QTRS
                      ↳ DependencyPairsProof
QDP
                          ↳ DependencyGraphProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

ZEROSZEROS
U211(tt, IL, M, N) → U221(tt, IL, M, N)
U231(tt, IL, M, N) → TAKE(M, IL)
LENGTH(cons(N, L)) → U111(tt, L)
U221(tt, IL, M, N) → U231(tt, IL, M, N)
TAKE(s(M), cons(N, IL)) → U211(tt, IL, M, N)
U121(tt, L) → LENGTH(L)
U111(tt, L) → U121(tt, L)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(cons(N, L)) → U11(tt, L)
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

The set Q consists of the following terms:

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(cons(x0, x1))
take(s(x0), cons(x1, x2))

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ Overlay + Local Confluence
                    ↳ QTRS
                      ↳ DependencyPairsProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
QDP
                                ↳ UsableRulesProof
                              ↳ QDP
                              ↳ QDP
      ↳ Improved Ferreira Ribeiro-Transformation

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

U211(tt, IL, M, N) → U221(tt, IL, M, N)
U231(tt, IL, M, N) → TAKE(M, IL)
U221(tt, IL, M, N) → U231(tt, IL, M, N)
TAKE(s(M), cons(N, IL)) → U211(tt, IL, M, N)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(cons(N, L)) → U11(tt, L)
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

The set Q consists of the following terms:

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(cons(x0, x1))
take(s(x0), cons(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ Overlay + Local Confluence
                    ↳ QTRS
                      ↳ DependencyPairsProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
                                ↳ UsableRulesProof
QDP
                                    ↳ QReductionProof
                              ↳ QDP
                              ↳ QDP
      ↳ Improved Ferreira Ribeiro-Transformation

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

U211(tt, IL, M, N) → U221(tt, IL, M, N)
U231(tt, IL, M, N) → TAKE(M, IL)
U221(tt, IL, M, N) → U231(tt, IL, M, N)
TAKE(s(M), cons(N, IL)) → U211(tt, IL, M, N)

R is empty.
The set Q consists of the following terms:

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(cons(x0, x1))
take(s(x0), cons(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(cons(x0, x1))
take(s(x0), cons(x1, x2))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ Overlay + Local Confluence
                    ↳ QTRS
                      ↳ DependencyPairsProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
QDP
                                        ↳ QDPSizeChangeProof
                              ↳ QDP
                              ↳ QDP
      ↳ Improved Ferreira Ribeiro-Transformation

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

U211(tt, IL, M, N) → U221(tt, IL, M, N)
U231(tt, IL, M, N) → TAKE(M, IL)
U221(tt, IL, M, N) → U231(tt, IL, M, N)
TAKE(s(M), cons(N, IL)) → U211(tt, IL, M, N)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ Overlay + Local Confluence
                    ↳ QTRS
                      ↳ DependencyPairsProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
QDP
                                ↳ UsableRulesProof
                              ↳ QDP
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(cons(N, L)) → U111(tt, L)
U111(tt, L) → U121(tt, L)
U121(tt, L) → LENGTH(L)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(cons(N, L)) → U11(tt, L)
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

The set Q consists of the following terms:

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(cons(x0, x1))
take(s(x0), cons(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ Overlay + Local Confluence
                    ↳ QTRS
                      ↳ DependencyPairsProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
                              ↳ QDP
                                ↳ UsableRulesProof
QDP
                                    ↳ QReductionProof
                              ↳ QDP
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(cons(N, L)) → U111(tt, L)
U111(tt, L) → U121(tt, L)
U121(tt, L) → LENGTH(L)

R is empty.
The set Q consists of the following terms:

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(cons(x0, x1))
take(s(x0), cons(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(cons(x0, x1))
take(s(x0), cons(x1, x2))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ Overlay + Local Confluence
                    ↳ QTRS
                      ↳ DependencyPairsProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
QDP
                                        ↳ QDPSizeChangeProof
                              ↳ QDP
      ↳ Improved Ferreira Ribeiro-Transformation

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

LENGTH(cons(N, L)) → U111(tt, L)
U121(tt, L) → LENGTH(L)
U111(tt, L) → U121(tt, L)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ Overlay + Local Confluence
                    ↳ QTRS
                      ↳ DependencyPairsProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
                              ↳ QDP
QDP
                                ↳ UsableRulesProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

ZEROSZEROS

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt, L) → U12(tt, L)
U12(tt, L) → s(length(L))
U21(tt, IL, M, N) → U22(tt, IL, M, N)
U22(tt, IL, M, N) → U23(tt, IL, M, N)
U23(tt, IL, M, N) → cons(N, take(M, IL))
length(cons(N, L)) → U11(tt, L)
take(s(M), cons(N, IL)) → U21(tt, IL, M, N)

The set Q consists of the following terms:

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(cons(x0, x1))
take(s(x0), cons(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ Overlay + Local Confluence
                    ↳ QTRS
                      ↳ DependencyPairsProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
                              ↳ QDP
                              ↳ QDP
                                ↳ UsableRulesProof
QDP
                                    ↳ QReductionProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

ZEROSZEROS

R is empty.
The set Q consists of the following terms:

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(cons(x0, x1))
take(s(x0), cons(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

zeros
U11(tt, x0)
U12(tt, x0)
U21(tt, x0, x1, x2)
U22(tt, x0, x1, x2)
U23(tt, x0, x1, x2)
length(cons(x0, x1))
take(s(x0), cons(x1, x2))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ Overlay + Local Confluence
                    ↳ QTRS
                      ↳ DependencyPairsProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ AND
                              ↳ QDP
                              ↳ QDP
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
QDP
                                        ↳ NonTerminationProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

ZEROSZEROS

R is empty.
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 semiunifying a rule from P directly.

The TRS P consists of the following rules:

ZEROSZEROS

The TRS R consists of the following rules:none


s = ZEROS evaluates to t =ZEROS

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




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from ZEROS to ZEROS.




We applied the Improved Ferreira Ribeiro transformation [5,11] to transform the context-sensitive TRS to a usual TRS.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
QTRS
          ↳ RRRPoloQTRSProof

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

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(nil) → 0
length(cons(N, L)) → U11(tt, a(L))
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(x1, x2)) → take(a(x1), a(x2))

Q is empty.

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

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(nil) → 0
length(cons(N, L)) → U11(tt, a(L))
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(x1, x2)) → take(a(x1), a(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:

length(nil) → 0
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(U11(x1, x2)) = 2·x1 + 2·x2   
POL(U12(x1, x2)) = 2·x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 1 + 2·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 + x1 + 2·x2 + x3 + 2·x4   
POL(a(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = 2·x1   
POL(nil) = 1   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 1 + x1 + 2·x2   
POL(takeInact(x1, x2)) = 1 + x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosInact) = 0   




↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
QTRS
              ↳ RRRPoloQTRSProof

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

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(cons(N, L)) → U11(tt, a(L))
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(x1, x2)) → take(a(x1), a(x2))

Q is empty.

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

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(cons(N, L)) → U11(tt, a(L))
take(0, IL) → nil
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(x1, x2)) → take(a(x1), a(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:

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

POL(0) = 0   
POL(U11(x1, x2)) = x1 + x2   
POL(U12(x1, x2)) = 2·x1 + x2   
POL(U21(x1, x2, x3, x4)) = 1 + x1 + 2·x2 + x3 + x4   
POL(U22(x1, x2, x3, x4)) = 1 + x1 + 2·x2 + x3 + x4   
POL(U23(x1, x2, x3, x4)) = 1 + x1 + 2·x2 + x3 + x4   
POL(a(x1)) = x1   
POL(cons(x1, x2)) = x1 + x2   
POL(length(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 1 + x1 + 2·x2   
POL(takeInact(x1, x2)) = 1 + x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosInact) = 0   




↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
QTRS
                  ↳ DependencyPairsProof

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

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(cons(N, L)) → U11(tt, a(L))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(x1, x2)) → take(a(x1), a(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:

LENGTH(cons(N, L)) → A(L)
A(takeInact(x1, x2)) → TAKE(a(x1), a(x2))
TAKE(s(M), cons(N, IL)) → A(IL)
A(takeInact(x1, x2)) → A(x1)
U211(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(M)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
A(takeInact(x1, x2)) → A(x2)
U231(tt, IL, M, N) → A(IL)
U111(tt, L) → U121(tt, a(L))
U121(tt, L) → LENGTH(a(L))
U221(tt, IL, M, N) → A(N)
A(zerosInact) → ZEROS
U231(tt, IL, M, N) → A(N)
U121(tt, L) → A(L)
U211(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → A(L)
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))
U221(tt, IL, M, N) → A(IL)

The TRS R consists of the following rules:

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(cons(N, L)) → U11(tt, a(L))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(x1, x2)) → take(a(x1), a(x2))

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
QDP
                      ↳ DependencyGraphProof

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

LENGTH(cons(N, L)) → A(L)
A(takeInact(x1, x2)) → TAKE(a(x1), a(x2))
TAKE(s(M), cons(N, IL)) → A(IL)
A(takeInact(x1, x2)) → A(x1)
U211(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(M)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
A(takeInact(x1, x2)) → A(x2)
U231(tt, IL, M, N) → A(IL)
U111(tt, L) → U121(tt, a(L))
U121(tt, L) → LENGTH(a(L))
U221(tt, IL, M, N) → A(N)
A(zerosInact) → ZEROS
U231(tt, IL, M, N) → A(N)
U121(tt, L) → A(L)
U211(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → A(L)
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))
U221(tt, IL, M, N) → A(IL)

The TRS R consists of the following rules:

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(cons(N, L)) → U11(tt, a(L))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(x1, x2)) → take(a(x1), a(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 with 4 less nodes.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
QDP
                            ↳ UsableRulesProof
                          ↳ QDP

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

A(takeInact(x1, x2)) → TAKE(a(x1), a(x2))
TAKE(s(M), cons(N, IL)) → A(IL)
A(takeInact(x1, x2)) → A(x1)
U211(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(M)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
U231(tt, IL, M, N) → A(IL)
A(takeInact(x1, x2)) → A(x2)
U221(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))
U221(tt, IL, M, N) → A(IL)

The TRS R consists of the following rules:

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(cons(N, L)) → U11(tt, a(L))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(x1, x2)) → take(a(x1), a(x2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ UsableRulesReductionPairsProof
                          ↳ QDP

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

A(takeInact(x1, x2)) → TAKE(a(x1), a(x2))
TAKE(s(M), cons(N, IL)) → A(IL)
A(takeInact(x1, x2)) → A(x1)
U211(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(M)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
U231(tt, IL, M, N) → A(IL)
A(takeInact(x1, x2)) → A(x2)
U221(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → A(M)
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
U221(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(a(x1), a(x2))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
take(x1, x2) → takeInact(x1, x2)
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
zeroscons(0, zerosInact)
zeroszerosInact

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

TAKE(s(M), cons(N, IL)) → A(IL)
U211(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(M)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
U221(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(M)
U221(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))
The following rules are removed from R:

take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(A(x1)) = x1   
POL(TAKE(x1, x2)) = x1 + x2   
POL(U21(x1, x2, x3, x4)) = 2 + 2·x1 + x2 + 2·x3 + 2·x4   
POL(U211(x1, x2, x3, x4)) = 2 + 2·x1 + x2 + x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 2 + x1 + x2 + 2·x3 + 2·x4   
POL(U221(x1, x2, x3, x4)) = 2 + x1 + x2 + x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 2·x1 + x2 + 2·x3 + 2·x4   
POL(U231(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + 2·x4   
POL(a(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(s(x1)) = 2 + 2·x1   
POL(take(x1, x2)) = x1 + x2   
POL(takeInact(x1, x2)) = x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosInact) = 0   



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
QDP
                                    ↳ DependencyGraphProof
                          ↳ QDP

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

U231(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(M)
A(takeInact(x1, x2)) → TAKE(a(x1), a(x2))
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
A(takeInact(x1, x2)) → A(x1)
A(takeInact(x1, x2)) → A(x2)
U231(tt, IL, M, N) → A(IL)

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(a(x1), a(x2))
take(x1, x2) → takeInact(x1, x2)
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
zeroscons(0, zerosInact)
zeroszerosInact

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 5 less nodes.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ DependencyGraphProof
QDP
                                        ↳ UsableRulesProof
                          ↳ QDP

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

A(takeInact(x1, x2)) → A(x1)
A(takeInact(x1, x2)) → A(x2)

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(a(x1), a(x2))
take(x1, x2) → takeInact(x1, x2)
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
zeroscons(0, zerosInact)
zeroszerosInact

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ UsableRulesProof
QDP
                                            ↳ QDPSizeChangeProof
                          ↳ QDP

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

A(takeInact(x1, x2)) → A(x1)
A(takeInact(x1, x2)) → A(x2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
QDP
                            ↳ UsableRulesProof

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

LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → U121(tt, a(L))
U121(tt, L) → LENGTH(a(L))

The TRS R consists of the following rules:

zeroscons(0, zerosInact)
U11(tt, L) → U12(tt, a(L))
U12(tt, L) → s(length(a(L)))
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
length(cons(N, L)) → U11(tt, a(L))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
a(x) → x
zeroszerosInact
a(zerosInact) → zeros
take(x1, x2) → takeInact(x1, x2)
a(takeInact(x1, x2)) → take(a(x1), a(x2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ UsableRulesReductionPairsProof

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

LENGTH(cons(N, L)) → U111(tt, a(L))
U121(tt, L) → LENGTH(a(L))
U111(tt, L) → U121(tt, a(L))

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(a(x1), a(x2))
take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
take(x1, x2) → takeInact(x1, x2)
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
zeroscons(0, zerosInact)
zeroszerosInact

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

take(s(M), cons(N, IL)) → U21(tt, a(IL), M, N)
Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(LENGTH(x1)) = 2·x1   
POL(U111(x1, x2)) = x1 + 2·x2   
POL(U121(x1, x2)) = x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 2·x1 + x2 + 2·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(x1)) = x1   
POL(cons(x1, x2)) = x1 + x2   
POL(s(x1)) = 2·x1   
POL(take(x1, x2)) = x1 + x2   
POL(takeInact(x1, x2)) = x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosInact) = 0   



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
QDP
                                    ↳ UsableRulesProof

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

LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → U121(tt, a(L))
U121(tt, L) → LENGTH(a(L))

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(a(x1), a(x2))
take(x1, x2) → takeInact(x1, x2)
U21(tt, IL, M, N) → U22(tt, a(IL), a(M), a(N))
U22(tt, IL, M, N) → U23(tt, a(IL), a(M), a(N))
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
zeroscons(0, zerosInact)
zeroszerosInact

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
QDP
                                        ↳ Narrowing

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

LENGTH(cons(N, L)) → U111(tt, a(L))
U121(tt, L) → LENGTH(a(L))
U111(tt, L) → U121(tt, a(L))

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(a(x1), a(x2))
take(x1, x2) → takeInact(x1, x2)
zeroscons(0, zerosInact)
zeroszerosInact

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

U121(tt, takeInact(x0, x1)) → LENGTH(take(a(x0), a(x1)))
U121(tt, zerosInact) → LENGTH(zeros)
U121(tt, x0) → LENGTH(x0)



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
                                      ↳ QDP
                                        ↳ Narrowing
QDP
                                            ↳ Narrowing

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

U121(tt, zerosInact) → LENGTH(zeros)
LENGTH(cons(N, L)) → U111(tt, a(L))
U121(tt, takeInact(x0, x1)) → LENGTH(take(a(x0), a(x1)))
U121(tt, x0) → LENGTH(x0)
U111(tt, L) → U121(tt, a(L))

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(a(x1), a(x2))
take(x1, x2) → takeInact(x1, x2)
zeroscons(0, zerosInact)
zeroszerosInact

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

U121(tt, zerosInact) → LENGTH(zerosInact)
U121(tt, zerosInact) → LENGTH(cons(0, zerosInact))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
QDP
                                                ↳ DependencyGraphProof

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

U121(tt, zerosInact) → LENGTH(cons(0, zerosInact))
U121(tt, zerosInact) → LENGTH(zerosInact)
LENGTH(cons(N, L)) → U111(tt, a(L))
U121(tt, takeInact(x0, x1)) → LENGTH(take(a(x0), a(x1)))
U111(tt, L) → U121(tt, a(L))
U121(tt, x0) → LENGTH(x0)

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(a(x1), a(x2))
take(x1, x2) → takeInact(x1, x2)
zeroscons(0, zerosInact)
zeroszerosInact

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ DependencyGraphProof
QDP
                                                    ↳ RuleRemovalProof

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

U121(tt, zerosInact) → LENGTH(cons(0, zerosInact))
LENGTH(cons(N, L)) → U111(tt, a(L))
U121(tt, takeInact(x0, x1)) → LENGTH(take(a(x0), a(x1)))
U121(tt, x0) → LENGTH(x0)
U111(tt, L) → U121(tt, a(L))

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(a(x1), a(x2))
take(x1, x2) → takeInact(x1, x2)
zeroscons(0, zerosInact)
zeroszerosInact

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:

U121(tt, takeInact(x0, x1)) → LENGTH(take(a(x0), a(x1)))


Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(LENGTH(x1)) = x1   
POL(U111(x1, x2)) = 2·x1 + 2·x2   
POL(U121(x1, x2)) = 2·x1 + 2·x2   
POL(a(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + 2·x2   
POL(take(x1, x2)) = 1 + x1 + x2   
POL(takeInact(x1, x2)) = 1 + x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosInact) = 0   



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
                ↳ QTRS
                  ↳ DependencyPairsProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ UsableRulesProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ RuleRemovalProof
QDP
                                                        ↳ NonTerminationProof

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

U121(tt, zerosInact) → LENGTH(cons(0, zerosInact))
LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → U121(tt, a(L))
U121(tt, x0) → LENGTH(x0)

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(a(x1), a(x2))
take(x1, x2) → takeInact(x1, x2)
zeroscons(0, zerosInact)
zeroszerosInact

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:

U121(tt, zerosInact) → LENGTH(cons(0, zerosInact))
LENGTH(cons(N, L)) → U111(tt, a(L))
U111(tt, L) → U121(tt, a(L))
U121(tt, x0) → LENGTH(x0)

The TRS R consists of the following rules:

a(x) → x
a(zerosInact) → zeros
a(takeInact(x1, x2)) → take(a(x1), a(x2))
take(x1, x2) → takeInact(x1, x2)
zeroscons(0, zerosInact)
zeroszerosInact


s = LENGTH(cons(N, zerosInact)) evaluates to t =LENGTH(cons(0, zerosInact))

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




Rewriting sequence

LENGTH(cons(N, zerosInact))U111(tt, a(zerosInact))
with rule LENGTH(cons(N', L)) → U111(tt, a(L)) at position [] and matcher [L / zerosInact, N' / N]

U111(tt, a(zerosInact))U111(tt, zerosInact)
with rule a(x) → x at position [1] and matcher [x / zerosInact]

U111(tt, zerosInact)U121(tt, a(zerosInact))
with rule U111(tt, L) → U121(tt, a(L)) at position [] and matcher [L / zerosInact]

U121(tt, a(zerosInact))U121(tt, zerosInact)
with rule a(x) → x at position [1] and matcher [x / zerosInact]

U121(tt, zerosInact)LENGTH(cons(0, zerosInact))
with rule U121(tt, zerosInact) → LENGTH(cons(0, zerosInact))

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.