MAYBE Termination proof of ../tpdb/TRS/CSR_Maude/lazy-nat-list/OvConsOS_nosorts-noand.trs
Termination of the following Term Rewriting System could not be shown:

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)

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-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)

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

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

↳ CSR
  ↳ Zantema-Transformation
QTRS
      ↳ RRRPoloQTRSProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-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:

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 + x1 + x2 + 2·x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + 2·x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + 2·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 + 2·x1 + x2   
POL(takeInact(x1, x2)) = 1 + 2·x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosInact) = 0   




↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
QTRS
          ↳ RRRPoloQTRSProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-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(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(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)) = x1 + 2·x2   
POL(U12(x1, x2)) = 2·x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + 2·x3 + x4   
POL(U22(x1, x2, x3, x4)) = 1 + x1 + x2 + 2·x3 + x4   
POL(U23(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + 2·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 + 2·x1 + x2   
POL(takeInact(x1, x2)) = 1 + 2·x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosInact) = 0   




↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
QTRS
              ↳ DependencyPairsProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-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:

U211(tt, IL, M, N) → A(N)
TAKE(s(M), cons(N, IL)) → A(IL)
U211(tt, IL, M, N) → A(IL)
U231(tt, IL, M, N) → A(N)
U111(tt, L) → U121(tt, a(L))
LENGTH(cons(N, L)) → A(L)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
A(takeInact(x1, x2)) → TAKE(x1, x2)
A(zerosInact) → ZEROS
U211(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(IL)
U121(tt, L) → LENGTH(a(L))
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
U121(tt, L) → A(L)
U221(tt, IL, M, N) → A(M)
U221(tt, IL, M, N) → A(IL)
U111(tt, L) → A(L)
U221(tt, IL, M, N) → A(N)
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))
LENGTH(cons(N, L)) → U111(tt, 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.

↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
QDP
                  ↳ DependencyGraphProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

U211(tt, IL, M, N) → A(N)
TAKE(s(M), cons(N, IL)) → A(IL)
U211(tt, IL, M, N) → A(IL)
U231(tt, IL, M, N) → A(N)
U111(tt, L) → U121(tt, a(L))
LENGTH(cons(N, L)) → A(L)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
A(takeInact(x1, x2)) → TAKE(x1, x2)
A(zerosInact) → ZEROS
U211(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(IL)
U121(tt, L) → LENGTH(a(L))
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
U121(tt, L) → A(L)
U221(tt, IL, M, N) → A(M)
U221(tt, IL, M, N) → A(IL)
U111(tt, L) → A(L)
U221(tt, IL, M, N) → A(N)
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))
LENGTH(cons(N, L)) → U111(tt, 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.
The approximation of the Dependency Graph [15,17,22] contains 2 SCCs with 4 less nodes.

↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

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

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
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ UsableRulesReductionPairsProof
                      ↳ QDP
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

U211(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(IL)
TAKE(s(M), cons(N, IL)) → A(IL)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
A(takeInact(x1, x2)) → TAKE(x1, x2)
U211(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(IL)
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
U221(tt, IL, M, N) → A(M)
U221(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(N)
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:

U211(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(IL)
TAKE(s(M), cons(N, IL)) → A(IL)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
U211(tt, IL, M, N) → A(M)
U221(tt, IL, M, N) → A(M)
U221(tt, IL, M, N) → A(IL)
U221(tt, IL, M, N) → A(N)
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))
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)) = 1 + 2·x1 + x2 + x3 + x4   
POL(U211(x1, x2, x3, x4)) = 1 + 2·x1 + 2·x2 + 2·x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + x4   
POL(U221(x1, x2, x3, x4)) = 1 + x1 + 2·x2 + 2·x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 2·x1 + x2 + 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)) = x1 + x2   
POL(takeInact(x1, x2)) = x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosInact) = 0   



↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ UsableRulesReductionPairsProof
QDP
                                ↳ DependencyGraphProof
                      ↳ QDP
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-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(IL)
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
A(takeInact(x1, x2)) → TAKE(x1, x2)
U231(tt, IL, M, N) → A(M)

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)
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.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 5 less nodes.

↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

U111(tt, L) → U121(tt, a(L))
U121(tt, L) → LENGTH(a(L))
LENGTH(cons(N, L)) → U111(tt, 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
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ UsableRulesReductionPairsProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

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



↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ UsableRulesReductionPairsProof
QDP
                                ↳ UsableRulesProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

U111(tt, L) → U121(tt, a(L))
U121(tt, L) → LENGTH(a(L))
LENGTH(cons(N, L)) → U111(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)
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
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ UsableRulesReductionPairsProof
                              ↳ QDP
                                ↳ UsableRulesProof
QDP
                                    ↳ Narrowing
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

U121(tt, L) → LENGTH(a(L))
U111(tt, L) → U121(tt, a(L))
LENGTH(cons(N, L)) → U111(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, takeInact(x0, x1)) → LENGTH(take(x0, x1))
U121(tt, x0) → LENGTH(x0)
U121(tt, zerosInact) → LENGTH(zeros)



↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ UsableRulesReductionPairsProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ Narrowing
QDP
                                        ↳ Narrowing
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

U121(tt, x0) → LENGTH(x0)
U121(tt, takeInact(x0, x1)) → LENGTH(take(x0, x1))
U111(tt, L) → U121(tt, a(L))
U121(tt, zerosInact) → LENGTH(zeros)
LENGTH(cons(N, L)) → U111(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
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ UsableRulesReductionPairsProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Narrowing
QDP
                                            ↳ DependencyGraphProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

U121(tt, x0) → LENGTH(x0)
U111(tt, L) → U121(tt, a(L))
U121(tt, zerosInact) → LENGTH(zeros)
U121(tt, takeInact(x0, x1)) → LENGTH(takeInact(x0, x1))
LENGTH(cons(N, L)) → U111(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.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ CSR
  ↳ 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
                                                ↳ NonTerminationProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

U121(tt, x0) → LENGTH(x0)
U111(tt, L) → U121(tt, a(L))
U121(tt, zerosInact) → LENGTH(zeros)
LENGTH(cons(N, L)) → U111(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.
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, x0) → LENGTH(x0)
U111(tt, L) → U121(tt, a(L))
U121(tt, zerosInact) → LENGTH(zeros)
LENGTH(cons(N, L)) → U111(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


s = LENGTH(a(a(zerosInact))) evaluates to t =LENGTH(a(a(zerosInact)))

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




Rewriting sequence

LENGTH(a(a(zerosInact)))LENGTH(a(zerosInact))
with rule a(x) → x at position [0] and matcher [x / a(zerosInact)]

LENGTH(a(zerosInact))LENGTH(zeros)
with rule a(zerosInact) → zeros at position [0] and matcher [ ]

LENGTH(zeros)LENGTH(cons(0, zerosInact))
with rule zeroscons(0, zerosInact) at position [0] and matcher [ ]

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

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

U121(tt, a(a(zerosInact)))LENGTH(a(a(zerosInact)))
with rule U121(tt, x0) → LENGTH(x0)

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 Incomplete Giesl Middeldorp [11] to transform the context-sensitive TRS to an usual TRS.

↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
QTRS
      ↳ RRRPoloQTRSProof
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(nil) → 0
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(0, IL) → nil
takeActive(s(M), cons(N, IL)) → U21Active(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:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(nil) → 0
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(0, IL) → nil
takeActive(s(M), cons(N, IL)) → U21Active(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:

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

POL(0) = 0   
POL(U11(x1, x2)) = 1 + x1 + 2·x2   
POL(U11Active(x1, x2)) = 1 + x1 + 2·x2   
POL(U12(x1, x2)) = 1 + x1 + 2·x2   
POL(U12Active(x1, x2)) = 1 + x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + 2·x4   
POL(U21Active(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = x1 + x2 + x3 + 2·x4   
POL(U22Active(x1, x2, x3, x4)) = x1 + x2 + x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = x1 + x2 + x3 + 2·x4   
POL(U23Active(x1, x2, x3, x4)) = x1 + x2 + x3 + 2·x4   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = 1 + 2·x1   
POL(lengthActive(x1)) = 1 + 2·x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = x1 + x2   
POL(takeActive(x1, x2)) = x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosActive) = 0   




↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
QTRS
          ↳ RRRPoloQTRSProof
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(0, IL) → nil
takeActive(s(M), cons(N, IL)) → U21Active(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:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(0, IL) → nil
takeActive(s(M), cons(N, IL)) → U21Active(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:

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

POL(0) = 0   
POL(U11(x1, x2)) = x1 + 2·x2   
POL(U11Active(x1, x2)) = x1 + 2·x2   
POL(U12(x1, x2)) = 2·x1 + 2·x2   
POL(U12Active(x1, x2)) = 2·x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + 2·x3 + x4   
POL(U21Active(x1, x2, x3, x4)) = 1 + 2·x1 + x2 + 2·x3 + x4   
POL(U22(x1, x2, x3, x4)) = 1 + x1 + x2 + 2·x3 + x4   
POL(U22Active(x1, x2, x3, x4)) = 1 + x1 + x2 + 2·x3 + x4   
POL(U23(x1, x2, x3, x4)) = 1 + x1 + x2 + 2·x3 + x4   
POL(U23Active(x1, x2, x3, x4)) = 1 + x1 + x2 + 2·x3 + x4   
POL(cons(x1, x2)) = x1 + x2   
POL(length(x1)) = 2·x1   
POL(lengthActive(x1)) = 2·x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 1 + 2·x1 + x2   
POL(takeActive(x1, x2)) = 1 + 2·x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosActive) = 0   




↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
QTRS
              ↳ DependencyPairsProof
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)

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:

TAKEACTIVE(s(M), cons(N, IL)) → U21ACTIVE(tt, IL, M, N)
MARK(U12(x1, x2)) → U12ACTIVE(mark(x1), x2)
MARK(take(x1, x2)) → MARK(x2)
MARK(U23(x1, x2, x3, x4)) → U23ACTIVE(mark(x1), x2, x3, x4)
MARK(U12(x1, x2)) → MARK(x1)
MARK(U22(x1, x2, x3, x4)) → MARK(x1)
MARK(U11(x1, x2)) → U11ACTIVE(mark(x1), x2)
U12ACTIVE(tt, L) → LENGTHACTIVE(mark(L))
MARK(U21(x1, x2, x3, x4)) → MARK(x1)
MARK(take(x1, x2)) → TAKEACTIVE(mark(x1), mark(x2))
U11ACTIVE(tt, L) → U12ACTIVE(tt, L)
MARK(cons(x1, x2)) → MARK(x1)
U12ACTIVE(tt, L) → MARK(L)
U21ACTIVE(tt, IL, M, N) → U22ACTIVE(tt, IL, M, N)
MARK(U22(x1, x2, x3, x4)) → U22ACTIVE(mark(x1), x2, x3, x4)
LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L)
MARK(zeros) → ZEROSACTIVE
MARK(U23(x1, x2, x3, x4)) → MARK(x1)
MARK(U21(x1, x2, x3, x4)) → U21ACTIVE(mark(x1), x2, x3, x4)
MARK(take(x1, x2)) → MARK(x1)
MARK(length(x1)) → MARK(x1)
MARK(s(x1)) → MARK(x1)
U23ACTIVE(tt, IL, M, N) → MARK(N)
MARK(length(x1)) → LENGTHACTIVE(mark(x1))
U22ACTIVE(tt, IL, M, N) → U23ACTIVE(tt, IL, M, N)
MARK(U11(x1, x2)) → MARK(x1)

The TRS R consists of the following rules:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)

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

↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
QDP
                  ↳ DependencyGraphProof
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

TAKEACTIVE(s(M), cons(N, IL)) → U21ACTIVE(tt, IL, M, N)
MARK(U12(x1, x2)) → U12ACTIVE(mark(x1), x2)
MARK(take(x1, x2)) → MARK(x2)
MARK(U23(x1, x2, x3, x4)) → U23ACTIVE(mark(x1), x2, x3, x4)
MARK(U12(x1, x2)) → MARK(x1)
MARK(U22(x1, x2, x3, x4)) → MARK(x1)
MARK(U11(x1, x2)) → U11ACTIVE(mark(x1), x2)
U12ACTIVE(tt, L) → LENGTHACTIVE(mark(L))
MARK(U21(x1, x2, x3, x4)) → MARK(x1)
MARK(take(x1, x2)) → TAKEACTIVE(mark(x1), mark(x2))
U11ACTIVE(tt, L) → U12ACTIVE(tt, L)
MARK(cons(x1, x2)) → MARK(x1)
U12ACTIVE(tt, L) → MARK(L)
U21ACTIVE(tt, IL, M, N) → U22ACTIVE(tt, IL, M, N)
MARK(U22(x1, x2, x3, x4)) → U22ACTIVE(mark(x1), x2, x3, x4)
LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L)
MARK(zeros) → ZEROSACTIVE
MARK(U23(x1, x2, x3, x4)) → MARK(x1)
MARK(U21(x1, x2, x3, x4)) → U21ACTIVE(mark(x1), x2, x3, x4)
MARK(take(x1, x2)) → MARK(x1)
MARK(length(x1)) → MARK(x1)
MARK(s(x1)) → MARK(x1)
U23ACTIVE(tt, IL, M, N) → MARK(N)
MARK(length(x1)) → LENGTHACTIVE(mark(x1))
U22ACTIVE(tt, IL, M, N) → U23ACTIVE(tt, IL, M, N)
MARK(U11(x1, x2)) → MARK(x1)

The TRS R consists of the following rules:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
QDP
                      ↳ RuleRemovalProof
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

MARK(U12(x1, x2)) → U12ACTIVE(mark(x1), x2)
TAKEACTIVE(s(M), cons(N, IL)) → U21ACTIVE(tt, IL, M, N)
MARK(take(x1, x2)) → MARK(x2)
MARK(U23(x1, x2, x3, x4)) → U23ACTIVE(mark(x1), x2, x3, x4)
MARK(U12(x1, x2)) → MARK(x1)
MARK(U11(x1, x2)) → U11ACTIVE(mark(x1), x2)
MARK(U22(x1, x2, x3, x4)) → MARK(x1)
U12ACTIVE(tt, L) → LENGTHACTIVE(mark(L))
MARK(U21(x1, x2, x3, x4)) → MARK(x1)
MARK(take(x1, x2)) → TAKEACTIVE(mark(x1), mark(x2))
U11ACTIVE(tt, L) → U12ACTIVE(tt, L)
MARK(cons(x1, x2)) → MARK(x1)
U12ACTIVE(tt, L) → MARK(L)
U21ACTIVE(tt, IL, M, N) → U22ACTIVE(tt, IL, M, N)
LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L)
MARK(U22(x1, x2, x3, x4)) → U22ACTIVE(mark(x1), x2, x3, x4)
MARK(U21(x1, x2, x3, x4)) → U21ACTIVE(mark(x1), x2, x3, x4)
MARK(U23(x1, x2, x3, x4)) → MARK(x1)
MARK(take(x1, x2)) → MARK(x1)
MARK(length(x1)) → MARK(x1)
MARK(s(x1)) → MARK(x1)
U23ACTIVE(tt, IL, M, N) → MARK(N)
U22ACTIVE(tt, IL, M, N) → U23ACTIVE(tt, IL, M, N)
MARK(length(x1)) → LENGTHACTIVE(mark(x1))
MARK(U11(x1, x2)) → MARK(x1)

The TRS R consists of the following rules:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)

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:

TAKEACTIVE(s(M), cons(N, IL)) → U21ACTIVE(tt, IL, M, N)
MARK(take(x1, x2)) → MARK(x2)
MARK(U23(x1, x2, x3, x4)) → U23ACTIVE(mark(x1), x2, x3, x4)
MARK(U22(x1, x2, x3, x4)) → MARK(x1)
MARK(U21(x1, x2, x3, x4)) → MARK(x1)
MARK(U22(x1, x2, x3, x4)) → U22ACTIVE(mark(x1), x2, x3, x4)
MARK(U21(x1, x2, x3, x4)) → U21ACTIVE(mark(x1), x2, x3, x4)
MARK(U23(x1, x2, x3, x4)) → MARK(x1)
MARK(take(x1, x2)) → MARK(x1)


Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(LENGTHACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(TAKEACTIVE(x1, x2)) = 2 + x1 + 2·x2   
POL(U11(x1, x2)) = 2·x1 + x2   
POL(U11ACTIVE(x1, x2)) = 2·x1 + x2   
POL(U11Active(x1, x2)) = 2·x1 + x2   
POL(U12(x1, x2)) = 2·x1 + x2   
POL(U12ACTIVE(x1, x2)) = x1 + x2   
POL(U12Active(x1, x2)) = 2·x1 + x2   
POL(U21(x1, x2, x3, x4)) = 2 + 2·x1 + 2·x2 + x3 + 2·x4   
POL(U21ACTIVE(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + 2·x4   
POL(U21Active(x1, x2, x3, x4)) = 2 + 2·x1 + 2·x2 + x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 2 + x1 + 2·x2 + x3 + 2·x4   
POL(U22ACTIVE(x1, x2, x3, x4)) = x1 + x2 + x3 + 2·x4   
POL(U22Active(x1, x2, x3, x4)) = 2 + x1 + 2·x2 + x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 2 + 2·x1 + 2·x2 + x3 + 2·x4   
POL(U23ACTIVE(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + x4   
POL(U23Active(x1, x2, x3, x4)) = 2 + 2·x1 + 2·x2 + x3 + 2·x4   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = x1   
POL(lengthActive(x1)) = x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 2 + x1 + 2·x2   
POL(takeActive(x1, x2)) = 2 + x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosActive) = 0   



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
QDP
                          ↳ DependencyGraphProof
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

MARK(U12(x1, x2)) → U12ACTIVE(mark(x1), x2)
U12ACTIVE(tt, L) → MARK(L)
U21ACTIVE(tt, IL, M, N) → U22ACTIVE(tt, IL, M, N)
LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L)
MARK(length(x1)) → MARK(x1)
MARK(U12(x1, x2)) → MARK(x1)
MARK(U11(x1, x2)) → U11ACTIVE(mark(x1), x2)
MARK(s(x1)) → MARK(x1)
U12ACTIVE(tt, L) → LENGTHACTIVE(mark(L))
U23ACTIVE(tt, IL, M, N) → MARK(N)
MARK(take(x1, x2)) → TAKEACTIVE(mark(x1), mark(x2))
U11ACTIVE(tt, L) → U12ACTIVE(tt, L)
MARK(length(x1)) → LENGTHACTIVE(mark(x1))
U22ACTIVE(tt, IL, M, N) → U23ACTIVE(tt, IL, M, N)
MARK(U11(x1, x2)) → MARK(x1)
MARK(cons(x1, x2)) → MARK(x1)

The TRS R consists of the following rules:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)

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

↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
QDP
                              ↳ RuleRemovalProof
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

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

The TRS R consists of the following rules:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)

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

MARK(U12(x1, x2)) → U12ACTIVE(mark(x1), x2)
MARK(U11(x1, x2)) → U11ACTIVE(mark(x1), x2)
MARK(length(x1)) → LENGTHACTIVE(mark(x1))
MARK(U11(x1, x2)) → MARK(x1)
MARK(length(x1)) → MARK(x1)
MARK(U12(x1, x2)) → MARK(x1)


Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(LENGTHACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(U11(x1, x2)) = 1 + 2·x1 + x2   
POL(U11ACTIVE(x1, x2)) = 2·x1 + x2   
POL(U11Active(x1, x2)) = 1 + 2·x1 + x2   
POL(U12(x1, x2)) = 1 + 2·x1 + x2   
POL(U12ACTIVE(x1, x2)) = 2·x1 + x2   
POL(U12Active(x1, x2)) = 1 + 2·x1 + x2   
POL(U21(x1, x2, x3, x4)) = x1 + x2 + x3 + x4   
POL(U21Active(x1, x2, x3, x4)) = x1 + x2 + x3 + x4   
POL(U22(x1, x2, x3, x4)) = x1 + x2 + x3 + x4   
POL(U22Active(x1, x2, x3, x4)) = x1 + x2 + x3 + x4   
POL(U23(x1, x2, x3, x4)) = x1 + x2 + x3 + x4   
POL(U23Active(x1, x2, x3, x4)) = x1 + x2 + x3 + x4   
POL(cons(x1, x2)) = x1 + x2   
POL(length(x1)) = 1 + x1   
POL(lengthActive(x1)) = 1 + x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = x1 + x2   
POL(takeActive(x1, x2)) = x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosActive) = 0   



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ RuleRemovalProof
QDP
                                  ↳ DependencyGraphProof
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

U12ACTIVE(tt, L) → MARK(L)
MARK(s(x1)) → MARK(x1)
U12ACTIVE(tt, L) → LENGTHACTIVE(mark(L))
LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L)
U11ACTIVE(tt, L) → U12ACTIVE(tt, L)
MARK(cons(x1, x2)) → MARK(x1)

The TRS R consists of the following rules:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)

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 1 less node.

↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ RuleRemovalProof
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ AND
QDP
                                        ↳ UsableRulesProof
                                      ↳ QDP
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

MARK(s(x1)) → MARK(x1)
MARK(cons(x1, x2)) → MARK(x1)

The TRS R consists of the following rules:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ RuleRemovalProof
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ AND
                                      ↳ QDP
                                        ↳ UsableRulesProof
QDP
                                            ↳ QDPSizeChangeProof
                                      ↳ QDP
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

MARK(s(x1)) → MARK(x1)
MARK(cons(x1, x2)) → MARK(x1)

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ RuleRemovalProof
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ AND
                                      ↳ QDP
QDP
                                        ↳ Narrowing
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L)
U12ACTIVE(tt, L) → LENGTHACTIVE(mark(L))
U11ACTIVE(tt, L) → U12ACTIVE(tt, L)

The TRS R consists of the following rules:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)

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

U12ACTIVE(tt, U21(x0, x1, x2, x3)) → LENGTHACTIVE(U21Active(mark(x0), x1, x2, x3))
U12ACTIVE(tt, cons(x0, x1)) → LENGTHACTIVE(cons(mark(x0), x1))
U12ACTIVE(tt, tt) → LENGTHACTIVE(tt)
U12ACTIVE(tt, U12(x0, x1)) → LENGTHACTIVE(U12Active(mark(x0), x1))
U12ACTIVE(tt, take(x0, x1)) → LENGTHACTIVE(takeActive(mark(x0), mark(x1)))
U12ACTIVE(tt, length(x0)) → LENGTHACTIVE(lengthActive(mark(x0)))
U12ACTIVE(tt, 0) → LENGTHACTIVE(0)
U12ACTIVE(tt, U11(x0, x1)) → LENGTHACTIVE(U11Active(mark(x0), x1))
U12ACTIVE(tt, U22(x0, x1, x2, x3)) → LENGTHACTIVE(U22Active(mark(x0), x1, x2, x3))
U12ACTIVE(tt, nil) → LENGTHACTIVE(nil)
U12ACTIVE(tt, zeros) → LENGTHACTIVE(zerosActive)
U12ACTIVE(tt, U23(x0, x1, x2, x3)) → LENGTHACTIVE(U23Active(mark(x0), x1, x2, x3))
U12ACTIVE(tt, s(x0)) → LENGTHACTIVE(s(mark(x0)))



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ RuleRemovalProof
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ AND
                                      ↳ QDP
                                      ↳ QDP
                                        ↳ Narrowing
QDP
                                            ↳ DependencyGraphProof
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

U12ACTIVE(tt, U21(x0, x1, x2, x3)) → LENGTHACTIVE(U21Active(mark(x0), x1, x2, x3))
LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L)
U12ACTIVE(tt, cons(x0, x1)) → LENGTHACTIVE(cons(mark(x0), x1))
U12ACTIVE(tt, tt) → LENGTHACTIVE(tt)
U12ACTIVE(tt, U12(x0, x1)) → LENGTHACTIVE(U12Active(mark(x0), x1))
U12ACTIVE(tt, take(x0, x1)) → LENGTHACTIVE(takeActive(mark(x0), mark(x1)))
U12ACTIVE(tt, length(x0)) → LENGTHACTIVE(lengthActive(mark(x0)))
U12ACTIVE(tt, 0) → LENGTHACTIVE(0)
U12ACTIVE(tt, U11(x0, x1)) → LENGTHACTIVE(U11Active(mark(x0), x1))
U12ACTIVE(tt, U22(x0, x1, x2, x3)) → LENGTHACTIVE(U22Active(mark(x0), x1, x2, x3))
U12ACTIVE(tt, nil) → LENGTHACTIVE(nil)
U12ACTIVE(tt, zeros) → LENGTHACTIVE(zerosActive)
U12ACTIVE(tt, U23(x0, x1, x2, x3)) → LENGTHACTIVE(U23Active(mark(x0), x1, x2, x3))
U11ACTIVE(tt, L) → U12ACTIVE(tt, L)
U12ACTIVE(tt, s(x0)) → LENGTHACTIVE(s(mark(x0)))

The TRS R consists of the following rules:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)

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

↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ RuleRemovalProof
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ AND
                                      ↳ QDP
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
QDP
                                                ↳ QDPOrderProof
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

U12ACTIVE(tt, U21(x0, x1, x2, x3)) → LENGTHACTIVE(U21Active(mark(x0), x1, x2, x3))
U12ACTIVE(tt, zeros) → LENGTHACTIVE(zerosActive)
U12ACTIVE(tt, cons(x0, x1)) → LENGTHACTIVE(cons(mark(x0), x1))
LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L)
U12ACTIVE(tt, take(x0, x1)) → LENGTHACTIVE(takeActive(mark(x0), mark(x1)))
U12ACTIVE(tt, U12(x0, x1)) → LENGTHACTIVE(U12Active(mark(x0), x1))
U12ACTIVE(tt, length(x0)) → LENGTHACTIVE(lengthActive(mark(x0)))
U12ACTIVE(tt, U23(x0, x1, x2, x3)) → LENGTHACTIVE(U23Active(mark(x0), x1, x2, x3))
U12ACTIVE(tt, U11(x0, x1)) → LENGTHACTIVE(U11Active(mark(x0), x1))
U11ACTIVE(tt, L) → U12ACTIVE(tt, L)
U12ACTIVE(tt, U22(x0, x1, x2, x3)) → LENGTHACTIVE(U22Active(mark(x0), x1, x2, x3))

The TRS R consists of the following rules:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)

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


The following pairs can be oriented strictly and are deleted.


U12ACTIVE(tt, U12(x0, x1)) → LENGTHACTIVE(U12Active(mark(x0), x1))
U12ACTIVE(tt, U11(x0, x1)) → LENGTHACTIVE(U11Active(mark(x0), x1))
The remaining pairs can at least be oriented weakly.

U12ACTIVE(tt, U21(x0, x1, x2, x3)) → LENGTHACTIVE(U21Active(mark(x0), x1, x2, x3))
U12ACTIVE(tt, zeros) → LENGTHACTIVE(zerosActive)
U12ACTIVE(tt, cons(x0, x1)) → LENGTHACTIVE(cons(mark(x0), x1))
LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L)
U12ACTIVE(tt, take(x0, x1)) → LENGTHACTIVE(takeActive(mark(x0), mark(x1)))
U12ACTIVE(tt, length(x0)) → LENGTHACTIVE(lengthActive(mark(x0)))
U12ACTIVE(tt, U23(x0, x1, x2, x3)) → LENGTHACTIVE(U23Active(mark(x0), x1, x2, x3))
U11ACTIVE(tt, L) → U12ACTIVE(tt, L)
U12ACTIVE(tt, U22(x0, x1, x2, x3)) → LENGTHACTIVE(U22Active(mark(x0), x1, x2, x3))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(LENGTHACTIVE(x1)) = 1 + x1   
POL(U11(x1, x2)) = 0   
POL(U11ACTIVE(x1, x2)) = 1 + x1   
POL(U11Active(x1, x2)) = 0   
POL(U12(x1, x2)) = 0   
POL(U12ACTIVE(x1, x2)) = 1 + x1   
POL(U12Active(x1, x2)) = 0   
POL(U21(x1, x2, x3, x4)) = 1   
POL(U21Active(x1, x2, x3, x4)) = 1   
POL(U22(x1, x2, x3, x4)) = 1   
POL(U22Active(x1, x2, x3, x4)) = 1   
POL(U23(x1, x2, x3, x4)) = 1   
POL(U23Active(x1, x2, x3, x4)) = 1   
POL(cons(x1, x2)) = 1   
POL(length(x1)) = 1   
POL(lengthActive(x1)) = 1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(take(x1, x2)) = 1   
POL(takeActive(x1, x2)) = 1   
POL(tt) = 1   
POL(zeros) = 0   
POL(zerosActive) = 1   

The following usable rules [17] were oriented:

U12Active(x1, x2) → U12(x1, x2)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
mark(length(x1)) → lengthActive(mark(x1))
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)
U11Active(x1, x2) → U11(x1, x2)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
mark(s(x1)) → s(mark(x1))
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
lengthActive(x1) → length(x1)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
zerosActivezeros
mark(cons(x1, x2)) → cons(mark(x1), x2)
zerosActivecons(0, zeros)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
U11Active(tt, L) → U12Active(tt, L)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(x1, x2) → take(x1, x2)
U12Active(tt, L) → s(lengthActive(mark(L)))
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ RuleRemovalProof
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ AND
                                      ↳ QDP
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
QDP
                                                    ↳ QDPOrderProof
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

U12ACTIVE(tt, U21(x0, x1, x2, x3)) → LENGTHACTIVE(U21Active(mark(x0), x1, x2, x3))
LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L)
U12ACTIVE(tt, cons(x0, x1)) → LENGTHACTIVE(cons(mark(x0), x1))
U12ACTIVE(tt, zeros) → LENGTHACTIVE(zerosActive)
U12ACTIVE(tt, take(x0, x1)) → LENGTHACTIVE(takeActive(mark(x0), mark(x1)))
U12ACTIVE(tt, length(x0)) → LENGTHACTIVE(lengthActive(mark(x0)))
U12ACTIVE(tt, U23(x0, x1, x2, x3)) → LENGTHACTIVE(U23Active(mark(x0), x1, x2, x3))
U11ACTIVE(tt, L) → U12ACTIVE(tt, L)
U12ACTIVE(tt, U22(x0, x1, x2, x3)) → LENGTHACTIVE(U22Active(mark(x0), x1, x2, x3))

The TRS R consists of the following rules:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)

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


The following pairs can be oriented strictly and are deleted.


U12ACTIVE(tt, U21(x0, x1, x2, x3)) → LENGTHACTIVE(U21Active(mark(x0), x1, x2, x3))
U12ACTIVE(tt, cons(x0, x1)) → LENGTHACTIVE(cons(mark(x0), x1))
U12ACTIVE(tt, length(x0)) → LENGTHACTIVE(lengthActive(mark(x0)))
U12ACTIVE(tt, U23(x0, x1, x2, x3)) → LENGTHACTIVE(U23Active(mark(x0), x1, x2, x3))
U12ACTIVE(tt, U22(x0, x1, x2, x3)) → LENGTHACTIVE(U22Active(mark(x0), x1, x2, x3))
The remaining pairs can at least be oriented weakly.

LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L)
U12ACTIVE(tt, zeros) → LENGTHACTIVE(zerosActive)
U12ACTIVE(tt, take(x0, x1)) → LENGTHACTIVE(takeActive(mark(x0), mark(x1)))
U11ACTIVE(tt, L) → U12ACTIVE(tt, L)
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(LENGTHACTIVE(x1)) = x1   
POL(U11(x1, x2)) = 1   
POL(U11ACTIVE(x1, x2)) = 1 + x2   
POL(U11Active(x1, x2)) = 1   
POL(U12(x1, x2)) = 0   
POL(U12ACTIVE(x1, x2)) = 1 + x2   
POL(U12Active(x1, x2)) = 0   
POL(U21(x1, x2, x3, x4)) = 1   
POL(U21Active(x1, x2, x3, x4)) = 1   
POL(U22(x1, x2, x3, x4)) = 1   
POL(U22Active(x1, x2, x3, x4)) = 1   
POL(U23(x1, x2, x3, x4)) = 1   
POL(U23Active(x1, x2, x3, x4)) = 1   
POL(cons(x1, x2)) = 1 + x2   
POL(length(x1)) = 1   
POL(lengthActive(x1)) = 1   
POL(mark(x1)) = 1 + x1   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(take(x1, x2)) = 0   
POL(takeActive(x1, x2)) = 1   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosActive) = 1   

The following usable rules [17] were oriented:

U12Active(x1, x2) → U12(x1, x2)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
mark(length(x1)) → lengthActive(mark(x1))
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)
U11Active(x1, x2) → U11(x1, x2)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
mark(s(x1)) → s(mark(x1))
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
lengthActive(x1) → length(x1)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
zerosActivezeros
mark(cons(x1, x2)) → cons(mark(x1), x2)
zerosActivecons(0, zeros)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
U11Active(tt, L) → U12Active(tt, L)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(x1, x2) → take(x1, x2)
U12Active(tt, L) → s(lengthActive(mark(L)))
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ RuleRemovalProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ RuleRemovalProof
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ AND
                                      ↳ QDP
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
QDP
                                                        ↳ NonTerminationProof
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation

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

U12ACTIVE(tt, zeros) → LENGTHACTIVE(zerosActive)
LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L)
U12ACTIVE(tt, take(x0, x1)) → LENGTHACTIVE(takeActive(mark(x0), mark(x1)))
U11ACTIVE(tt, L) → U12ACTIVE(tt, L)

The TRS R consists of the following rules:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)

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:

U12ACTIVE(tt, zeros) → LENGTHACTIVE(zerosActive)
LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L)
U12ACTIVE(tt, take(x0, x1)) → LENGTHACTIVE(takeActive(mark(x0), mark(x1)))
U11ACTIVE(tt, L) → U12ACTIVE(tt, L)

The TRS R consists of the following rules:

mark(zeros) → zerosActive
zerosActivezeros
mark(U11(x1, x2)) → U11Active(mark(x1), x2)
U11Active(x1, x2) → U11(x1, x2)
mark(U12(x1, x2)) → U12Active(mark(x1), x2)
U12Active(x1, x2) → U12(x1, x2)
mark(U21(x1, x2, x3, x4)) → U21Active(mark(x1), x2, x3, x4)
U21Active(x1, x2, x3, x4) → U21(x1, x2, x3, x4)
mark(U22(x1, x2, x3, x4)) → U22Active(mark(x1), x2, x3, x4)
U22Active(x1, x2, x3, x4) → U22(x1, x2, x3, x4)
mark(U23(x1, x2, x3, x4)) → U23Active(mark(x1), x2, x3, x4)
U23Active(x1, x2, x3, x4) → U23(x1, x2, x3, x4)
mark(length(x1)) → lengthActive(mark(x1))
lengthActive(x1) → length(x1)
mark(take(x1, x2)) → takeActive(mark(x1), mark(x2))
takeActive(x1, x2) → take(x1, x2)
mark(cons(x1, x2)) → cons(mark(x1), x2)
mark(0) → 0
mark(tt) → tt
mark(s(x1)) → s(mark(x1))
mark(nil) → nil
zerosActivecons(0, zeros)
U11Active(tt, L) → U12Active(tt, L)
U12Active(tt, L) → s(lengthActive(mark(L)))
U21Active(tt, IL, M, N) → U22Active(tt, IL, M, N)
U22Active(tt, IL, M, N) → U23Active(tt, IL, M, N)
U23Active(tt, IL, M, N) → cons(mark(N), take(M, IL))
lengthActive(cons(N, L)) → U11Active(tt, L)
takeActive(s(M), cons(N, IL)) → U21Active(tt, IL, M, N)


s = LENGTHACTIVE(zerosActive) evaluates to t =LENGTHACTIVE(zerosActive)

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




Rewriting sequence

LENGTHACTIVE(zerosActive)LENGTHACTIVE(cons(0, zeros))
with rule zerosActivecons(0, zeros) at position [0] and matcher [ ]

LENGTHACTIVE(cons(0, zeros))U11ACTIVE(tt, zeros)
with rule LENGTHACTIVE(cons(N, L)) → U11ACTIVE(tt, L) at position [] and matcher [L / zeros, N / 0]

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

U12ACTIVE(tt, zeros)LENGTHACTIVE(zerosActive)
with rule U12ACTIVE(tt, zeros) → LENGTHACTIVE(zerosActive)

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 Improved Ferreira Ribeiro [5,11] to transform the context-sensitive TRS to an usual TRS.

↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
QTRS
      ↳ RRRPoloQTRSProof
  ↳ Complete Giesl Middeldorp-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(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
take(0, IL) → nil
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(U11(x1, x2)) = 2·x1 + 2·x2   
POL(U12(x1, x2)) = x1 + 2·x2   
POL(U21(x1, x2, x3, x4)) = 2 + 2·x1 + 2·x2 + x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = 2 + 2·x1 + 2·x2 + x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 2 + 2·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)) = 2 + x1 + 2·x2   
POL(takeInact(x1, x2)) = 2 + x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosInact) = 0   




↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
QTRS
          ↳ DependencyPairsProof
  ↳ Complete Giesl Middeldorp-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(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:

U211(tt, IL, M, N) → A(N)
TAKE(s(M), cons(N, IL)) → A(IL)
U211(tt, IL, M, N) → A(IL)
U231(tt, IL, M, N) → A(N)
U111(tt, L) → U121(tt, a(L))
LENGTH(cons(N, L)) → A(L)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
A(zerosInact) → ZEROS
A(takeInact(x1, x2)) → A(x2)
U211(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(IL)
U121(tt, L) → LENGTH(a(L))
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
A(takeInact(x1, x2)) → A(x1)
U121(tt, L) → A(L)
U221(tt, IL, M, N) → A(M)
U221(tt, IL, M, N) → A(IL)
U111(tt, L) → A(L)
A(takeInact(x1, x2)) → TAKE(a(x1), a(x2))
U221(tt, IL, M, N) → A(N)
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))
LENGTH(cons(N, L)) → U111(tt, 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.

↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
QDP
              ↳ DependencyGraphProof
  ↳ Complete Giesl Middeldorp-Transformation

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

U211(tt, IL, M, N) → A(N)
TAKE(s(M), cons(N, IL)) → A(IL)
U211(tt, IL, M, N) → A(IL)
U231(tt, IL, M, N) → A(N)
U111(tt, L) → U121(tt, a(L))
LENGTH(cons(N, L)) → A(L)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
A(zerosInact) → ZEROS
A(takeInact(x1, x2)) → A(x2)
U211(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(IL)
U121(tt, L) → LENGTH(a(L))
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
A(takeInact(x1, x2)) → A(x1)
U121(tt, L) → A(L)
U221(tt, IL, M, N) → A(M)
U221(tt, IL, M, N) → A(IL)
U111(tt, L) → A(L)
A(takeInact(x1, x2)) → TAKE(a(x1), a(x2))
U221(tt, IL, M, N) → A(N)
U221(tt, IL, M, N) → U231(tt, a(IL), a(M), a(N))
LENGTH(cons(N, L)) → U111(tt, 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.
The approximation of the Dependency Graph [15,17,22] contains 2 SCCs with 4 less nodes.

↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
  ↳ Complete Giesl Middeldorp-Transformation

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

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ UsableRulesReductionPairsProof
                  ↳ QDP
  ↳ Complete Giesl Middeldorp-Transformation

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

U211(tt, IL, M, N) → A(N)
TAKE(s(M), cons(N, IL)) → A(IL)
U231(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(IL)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
A(takeInact(x1, x2)) → A(x2)
U211(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(IL)
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
A(takeInact(x1, x2)) → A(x1)
U221(tt, IL, M, N) → A(M)
U221(tt, IL, M, N) → A(IL)
A(takeInact(x1, x2)) → TAKE(a(x1), a(x2))
U221(tt, IL, M, N) → A(N)
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)
TAKE(s(M), cons(N, IL)) → U211(tt, a(IL), M, N)
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(A(x1)) = x1   
POL(TAKE(x1, x2)) = x1 + x2   
POL(U21(x1, x2, x3, x4)) = x1 + 2·x2 + 2·x3 + 2·x4   
POL(U211(x1, x2, x3, x4)) = x1 + x2 + 2·x3 + 2·x4   
POL(U22(x1, x2, x3, x4)) = x1 + 2·x2 + 2·x3 + 2·x4   
POL(U221(x1, x2, x3, x4)) = x1 + x2 + 2·x3 + 2·x4   
POL(U23(x1, x2, x3, x4)) = 2·x1 + 2·x2 + 2·x3 + 2·x4   
POL(U231(x1, x2, x3, x4)) = x1 + x2 + x3 + 2·x4   
POL(a(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + 2·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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ DependencyGraphProof
                  ↳ QDP
  ↳ Complete Giesl Middeldorp-Transformation

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

U211(tt, IL, M, N) → A(N)
U231(tt, IL, M, N) → A(N)
U211(tt, IL, M, N) → A(IL)
A(takeInact(x1, x2)) → A(x2)
U211(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(M)
U231(tt, IL, M, N) → A(IL)
U211(tt, IL, M, N) → U221(tt, a(IL), a(M), a(N))
A(takeInact(x1, x2)) → A(x1)
U221(tt, IL, M, N) → A(M)
U221(tt, IL, M, N) → A(IL)
A(takeInact(x1, x2)) → TAKE(a(x1), a(x2))
U221(tt, IL, M, N) → A(N)
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(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.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 12 less nodes.

↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
                          ↳ QDP
                            ↳ DependencyGraphProof
QDP
                                ↳ UsableRulesProof
                  ↳ QDP
  ↳ Complete Giesl Middeldorp-Transformation

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))
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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
QDP
                                    ↳ QDPSizeChangeProof
                  ↳ QDP
  ↳ Complete Giesl Middeldorp-Transformation

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
  ↳ Complete Giesl Middeldorp-Transformation

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

U111(tt, L) → U121(tt, a(L))
U121(tt, L) → LENGTH(a(L))
LENGTH(cons(N, L)) → U111(tt, 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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ UsableRulesReductionPairsProof
  ↳ Complete Giesl Middeldorp-Transformation

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

U121(tt, L) → LENGTH(a(L))
U111(tt, L) → U121(tt, a(L))
LENGTH(cons(N, L)) → U111(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)
U23(tt, IL, M, N) → cons(a(N), takeInact(a(M), a(IL)))
Used ordering: POLO with Polynomial interpretation [25]:

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ UsableRulesProof
  ↳ Complete Giesl Middeldorp-Transformation

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

U111(tt, L) → U121(tt, a(L))
U121(tt, L) → LENGTH(a(L))
LENGTH(cons(N, L)) → U111(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)
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))
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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ Narrowing
  ↳ Complete Giesl Middeldorp-Transformation

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

U121(tt, L) → LENGTH(a(L))
U111(tt, L) → U121(tt, a(L))
LENGTH(cons(N, L)) → U111(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, x0) → LENGTH(x0)
U121(tt, takeInact(x0, x1)) → LENGTH(take(a(x0), a(x1)))
U121(tt, zerosInact) → LENGTH(zeros)



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ Narrowing
QDP
                                    ↳ RuleRemovalProof
  ↳ Complete Giesl Middeldorp-Transformation

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

U121(tt, x0) → LENGTH(x0)
U111(tt, L) → U121(tt, a(L))
U121(tt, zerosInact) → LENGTH(zeros)
U121(tt, takeInact(x0, x1)) → LENGTH(take(a(x0), a(x1)))
LENGTH(cons(N, L)) → U111(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)) = 2 + x1 + x2   
POL(takeInact(x1, x2)) = 2 + x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   
POL(zerosInact) = 0   



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ RuleRemovalProof
QDP
                                        ↳ NonTerminationProof
  ↳ Complete Giesl Middeldorp-Transformation

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

U121(tt, x0) → LENGTH(x0)
U111(tt, L) → U121(tt, a(L))
U121(tt, zerosInact) → LENGTH(zeros)
LENGTH(cons(N, L)) → U111(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.
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, x0) → LENGTH(x0)
U111(tt, L) → U121(tt, a(L))
U121(tt, zerosInact) → LENGTH(zeros)
LENGTH(cons(N, L)) → U111(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


s = LENGTH(a(a(zerosInact))) evaluates to t =LENGTH(a(a(zerosInact)))

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




Rewriting sequence

LENGTH(a(a(zerosInact)))LENGTH(a(zerosInact))
with rule a(x) → x at position [0] and matcher [x / a(zerosInact)]

LENGTH(a(zerosInact))LENGTH(zeros)
with rule a(zerosInact) → zeros at position [0] and matcher [ ]

LENGTH(zeros)LENGTH(cons(0, zerosInact))
with rule zeroscons(0, zerosInact) at position [0] and matcher [ ]

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

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

U121(tt, a(a(zerosInact)))LENGTH(a(a(zerosInact)))
with rule U121(tt, x0) → LENGTH(x0)

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 Complete Giesl Middeldorp [11] to transform the context-sensitive TRS to an usual TRS.

↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
QTRS
      ↳ RRRPoloQTRSProof

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

The set Q consists of the following terms:

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


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

The set Q consists of the following terms:

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

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




↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
QTRS
          ↳ RRRPoloQTRSProof

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

The set Q consists of the following terms:

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


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

The set Q consists of the following terms:

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

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·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·x1   
POL(mark(x1)) = x1   
POL(nil) = 1   
POL(ok(x1)) = x1   
POL(proper(x1)) = x1   
POL(s(x1)) = x1   
POL(take(x1, x2)) = x1 + x2   
POL(top(x1)) = 2·x1   
POL(tt) = 0   
POL(zeros) = 0   




↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
QTRS
              ↳ DependencyPairsProof

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

The set Q consists of the following terms:

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


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

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

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

The set Q consists of the following terms:

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

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

↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
QDP
                  ↳ DependencyGraphProof

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

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

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

The set Q consists of the following terms:

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

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

↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

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

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

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

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

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

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

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.

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

TAKE(mark(x1), x2) → TAKE(x1, x2)
TAKE(x1, mark(x2)) → TAKE(x1, x2)
TAKE(ok(x1), ok(x2)) → TAKE(x1, 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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

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

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

The set Q consists of the following terms:

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

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

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

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

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.

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

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

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

The set Q consists of the following terms:

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

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

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

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

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.

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

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

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

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

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

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

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

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.

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

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

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

The set Q consists of the following terms:

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

LENGTH(mark(x1)) → LENGTH(x1)
LENGTH(ok(x1)) → LENGTH(x1)

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

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

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.

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

LENGTH(ok(x1)) → LENGTH(x1)
LENGTH(mark(x1)) → LENGTH(x1)

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

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

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

The set Q consists of the following terms:

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

S(ok(x1)) → S(x1)
S(mark(x1)) → S(x1)

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

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

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.

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

S(ok(x1)) → S(x1)
S(mark(x1)) → S(x1)

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

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

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

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

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

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

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

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.

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

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

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

The set Q consists of the following terms:

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

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

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

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

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.

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

U111(mark(x1), x2) → U111(x1, x2)
U111(ok(x1), ok(x2)) → U111(x1, 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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP

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

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

The set Q consists of the following terms:

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

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

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

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

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.

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete 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
                      ↳ QDP
                      ↳ QDP

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

CONS(mark(x1), x2) → CONS(x1, x2)
CONS(ok(x1), ok(x2)) → CONS(x1, 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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP

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

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

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ QReductionProof
                      ↳ QDP
                      ↳ QDP

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

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

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

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

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.

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
QDP
                                ↳ QDPSizeChangeProof
                      ↳ QDP
                      ↳ QDP

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

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

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

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP

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

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

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ QReductionProof
                      ↳ QDP

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

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

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

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

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.

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
QDP
                                ↳ QDPSizeChangeProof
                      ↳ QDP

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

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

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

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof

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

TOP(ok(x)) → TOP(active(x))
TOP(mark(x)) → TOP(proper(x))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ QReductionProof

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

TOP(ok(x)) → TOP(active(x))
TOP(mark(x)) → TOP(proper(x))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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.

top(mark(x0))
top(ok(x0))



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
QDP
                                ↳ Narrowing

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

TOP(ok(x)) → TOP(active(x))
TOP(mark(x)) → TOP(proper(x))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule TOP(ok(x)) → TOP(active(x)) at position [0] we obtained the following new rules:

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
                              ↳ QDP
                                ↳ Narrowing
QDP
                                    ↳ Narrowing

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

TOP(ok(U23(x0, x1, x2, x3))) → TOP(U23(active(x0), x1, x2, x3))
TOP(ok(U21(x0, x1, x2, x3))) → TOP(U21(active(x0), x1, x2, x3))
TOP(ok(U22(tt, x0, x1, x2))) → TOP(mark(U23(tt, x0, x1, x2)))
TOP(ok(zeros)) → TOP(mark(cons(0, zeros)))
TOP(ok(length(cons(x0, x1)))) → TOP(mark(U11(tt, x1)))
TOP(ok(U21(tt, x0, x1, x2))) → TOP(mark(U22(tt, x0, x1, x2)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(U21(tt, x2, x0, x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(x)) → TOP(proper(x))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(ok(U22(x0, x1, x2, x3))) → TOP(U22(active(x0), x1, x2, x3))
TOP(ok(U11(tt, x0))) → TOP(mark(U12(tt, x0)))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U23(tt, x0, x1, x2))) → TOP(mark(cons(x2, take(x1, x0))))

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

The set Q consists of the following terms:

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

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule TOP(mark(x)) → TOP(proper(x)) at position [0] we obtained the following new rules:

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ Narrowing
QDP
                                        ↳ DependencyGraphProof

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

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

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

The set Q consists of the following terms:

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

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

↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
QDP
                                            ↳ QDPOrderProof

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

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

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

The set Q consists of the following terms:

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


TOP(ok(zeros)) → TOP(mark(cons(0, zeros)))
The remaining pairs can at least be oriented weakly.

TOP(ok(U23(x0, x1, x2, x3))) → TOP(U23(active(x0), x1, x2, x3))
TOP(mark(U21(x0, x1, x2, x3))) → TOP(U21(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U22(tt, x0, x1, x2))) → TOP(mark(U23(tt, x0, x1, x2)))
TOP(ok(U21(x0, x1, x2, x3))) → TOP(U21(active(x0), x1, x2, x3))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U22(x0, x1, x2, x3))) → TOP(U22(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U11(tt, x0))) → TOP(mark(U12(tt, x0)))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(length(cons(x0, x1)))) → TOP(mark(U11(tt, x1)))
TOP(ok(U21(tt, x0, x1, x2))) → TOP(mark(U22(tt, x0, x1, x2)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(U21(tt, x2, x0, x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
TOP(mark(U23(x0, x1, x2, x3))) → TOP(U23(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U22(x0, x1, x2, x3))) → TOP(U22(active(x0), x1, x2, x3))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(ok(U23(tt, x0, x1, x2))) → TOP(mark(cons(x2, take(x1, x0))))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(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)) = 0   
POL(U23(x1, x2, x3, x4)) = 0   
POL(active(x1)) = 0   
POL(cons(x1, x2)) = 0   
POL(length(x1)) = 0   
POL(mark(x1)) = 0   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(proper(x1)) = 0   
POL(s(x1)) = 0   
POL(take(x1, x2)) = 0   
POL(tt) = 0   
POL(zeros) = 1   

The following usable rules [17] were oriented:

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
QDP
                                                ↳ QDPOrderProof

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

TOP(ok(U23(x0, x1, x2, x3))) → TOP(U23(active(x0), x1, x2, x3))
TOP(mark(U21(x0, x1, x2, x3))) → TOP(U21(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U21(x0, x1, x2, x3))) → TOP(U21(active(x0), x1, x2, x3))
TOP(ok(U22(tt, x0, x1, x2))) → TOP(mark(U23(tt, x0, x1, x2)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U22(x0, x1, x2, x3))) → TOP(U22(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U11(tt, x0))) → TOP(mark(U12(tt, x0)))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(length(cons(x0, x1)))) → TOP(mark(U11(tt, x1)))
TOP(ok(U21(tt, x0, x1, x2))) → TOP(mark(U22(tt, x0, x1, x2)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(U21(tt, x2, x0, x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
TOP(mark(U23(x0, x1, x2, x3))) → TOP(U23(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U22(x0, x1, x2, x3))) → TOP(U22(active(x0), x1, x2, x3))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(ok(U23(tt, x0, x1, x2))) → TOP(mark(cons(x2, take(x1, x0))))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))

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

The set Q consists of the following terms:

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


TOP(ok(length(cons(x0, x1)))) → TOP(mark(U11(tt, x1)))
The remaining pairs can at least be oriented weakly.

TOP(ok(U23(x0, x1, x2, x3))) → TOP(U23(active(x0), x1, x2, x3))
TOP(mark(U21(x0, x1, x2, x3))) → TOP(U21(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U21(x0, x1, x2, x3))) → TOP(U21(active(x0), x1, x2, x3))
TOP(ok(U22(tt, x0, x1, x2))) → TOP(mark(U23(tt, x0, x1, x2)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U22(x0, x1, x2, x3))) → TOP(U22(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U11(tt, x0))) → TOP(mark(U12(tt, x0)))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U21(tt, x0, x1, x2))) → TOP(mark(U22(tt, x0, x1, x2)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(U21(tt, x2, x0, x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
TOP(mark(U23(x0, x1, x2, x3))) → TOP(U23(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U22(x0, x1, x2, x3))) → TOP(U22(active(x0), x1, x2, x3))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(ok(U23(tt, x0, x1, x2))) → TOP(mark(cons(x2, take(x1, x0))))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(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)) = 0   
POL(U23(x1, x2, x3, x4)) = 0   
POL(active(x1)) = 0   
POL(cons(x1, x2)) = 0   
POL(length(x1)) = 1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(proper(x1)) = 0   
POL(s(x1)) = 0   
POL(take(x1, x2)) = 0   
POL(tt) = 0   
POL(zeros) = 0   

The following usable rules [17] were oriented:

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
QDP
                                                    ↳ QDPOrderProof

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

TOP(ok(U23(x0, x1, x2, x3))) → TOP(U23(active(x0), x1, x2, x3))
TOP(mark(U21(x0, x1, x2, x3))) → TOP(U21(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U22(tt, x0, x1, x2))) → TOP(mark(U23(tt, x0, x1, x2)))
TOP(ok(U21(x0, x1, x2, x3))) → TOP(U21(active(x0), x1, x2, x3))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U22(x0, x1, x2, x3))) → TOP(U22(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U11(tt, x0))) → TOP(mark(U12(tt, x0)))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U21(tt, x0, x1, x2))) → TOP(mark(U22(tt, x0, x1, x2)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(U21(tt, x2, x0, x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
TOP(mark(U23(x0, x1, x2, x3))) → TOP(U23(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U22(x0, x1, x2, x3))) → TOP(U22(active(x0), x1, x2, x3))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(ok(U23(tt, x0, x1, x2))) → TOP(mark(cons(x2, take(x1, x0))))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))

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

The set Q consists of the following terms:

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


TOP(ok(U22(tt, x0, x1, x2))) → TOP(mark(U23(tt, x0, x1, x2)))
TOP(ok(U11(tt, x0))) → TOP(mark(U12(tt, x0)))
The remaining pairs can at least be oriented weakly.

TOP(ok(U23(x0, x1, x2, x3))) → TOP(U23(active(x0), x1, x2, x3))
TOP(mark(U21(x0, x1, x2, x3))) → TOP(U21(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U21(x0, x1, x2, x3))) → TOP(U21(active(x0), x1, x2, x3))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U22(x0, x1, x2, x3))) → TOP(U22(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U21(tt, x0, x1, x2))) → TOP(mark(U22(tt, x0, x1, x2)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(U21(tt, x2, x0, x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
TOP(mark(U23(x0, x1, x2, x3))) → TOP(U23(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U22(x0, x1, x2, x3))) → TOP(U22(active(x0), x1, x2, x3))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(ok(U23(tt, x0, x1, x2))) → TOP(mark(cons(x2, take(x1, x0))))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
Used ordering: Polynomial interpretation [25]:

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

The following usable rules [17] were oriented:

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
QDP
                                                        ↳ QDPOrderProof

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

TOP(ok(U23(x0, x1, x2, x3))) → TOP(U23(active(x0), x1, x2, x3))
TOP(mark(U21(x0, x1, x2, x3))) → TOP(U21(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1, x2, x3))) → TOP(U21(active(x0), x1, x2, x3))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U21(tt, x0, x1, x2))) → TOP(mark(U22(tt, x0, x1, x2)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(U21(tt, x2, x0, x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U23(x0, x1, x2, x3))) → TOP(U23(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U22(x0, x1, x2, x3))) → TOP(U22(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(ok(U22(x0, x1, x2, x3))) → TOP(U22(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U23(tt, x0, x1, x2))) → TOP(mark(cons(x2, take(x1, x0))))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))

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

The set Q consists of the following terms:

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


TOP(ok(U21(tt, x0, x1, x2))) → TOP(mark(U22(tt, x0, x1, x2)))
The remaining pairs can at least be oriented weakly.

TOP(ok(U23(x0, x1, x2, x3))) → TOP(U23(active(x0), x1, x2, x3))
TOP(mark(U21(x0, x1, x2, x3))) → TOP(U21(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1, x2, x3))) → TOP(U21(active(x0), x1, x2, x3))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(U21(tt, x2, x0, x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U23(x0, x1, x2, x3))) → TOP(U23(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U22(x0, x1, x2, x3))) → TOP(U22(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(ok(U22(x0, x1, x2, x3))) → TOP(U22(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U23(tt, x0, x1, x2))) → TOP(mark(cons(x2, take(x1, x0))))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
Used ordering: Polynomial interpretation [25]:

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

The following usable rules [17] were oriented:

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
QDP
                                                            ↳ QDPOrderProof

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

TOP(ok(U23(x0, x1, x2, x3))) → TOP(U23(active(x0), x1, x2, x3))
TOP(mark(U21(x0, x1, x2, x3))) → TOP(U21(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1, x2, x3))) → TOP(U21(active(x0), x1, x2, x3))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(U21(tt, x2, x0, x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U22(x0, x1, x2, x3))) → TOP(U22(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U23(x0, x1, x2, x3))) → TOP(U23(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U22(x0, x1, x2, x3))) → TOP(U22(active(x0), x1, x2, x3))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(U23(tt, x0, x1, x2))) → TOP(mark(cons(x2, take(x1, x0))))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))

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

The set Q consists of the following terms:

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


TOP(ok(take(s(x0), cons(x1, x2)))) → TOP(mark(U21(tt, x2, x0, x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(ok(U23(tt, x0, x1, x2))) → TOP(mark(cons(x2, take(x1, x0))))
The remaining pairs can at least be oriented weakly.

TOP(ok(U23(x0, x1, x2, x3))) → TOP(U23(active(x0), x1, x2, x3))
TOP(mark(U21(x0, x1, x2, x3))) → TOP(U21(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1, x2, x3))) → TOP(U21(active(x0), x1, x2, x3))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U22(x0, x1, x2, x3))) → TOP(U22(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U23(x0, x1, x2, x3))) → TOP(U23(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(U22(x0, x1, x2, x3))) → TOP(U22(active(x0), x1, x2, x3))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2)) = 0   
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)) = 1   
POL(active(x1)) = 0   
POL(cons(x1, x2)) = 0   
POL(length(x1)) = 0   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(proper(x1)) = 0   
POL(s(x1)) = 0   
POL(take(x1, x2)) = 1   
POL(tt) = 0   
POL(zeros) = 0   

The following usable rules [17] were oriented:

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



↳ CSR
  ↳ Zantema-Transformation
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Improved Ferreira Ribeiro-Transformation
  ↳ Complete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
                                                          ↳ QDP
                                                            ↳ QDPOrderProof
QDP

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

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

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

The set Q consists of the following terms:

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

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