(0) Obligation:

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

zeroscons(0, n__zeros)
and(tt, X) → activate(X)
length(nil) → 0
length(cons(N, L)) → s(length(activate(L)))
take(0, IL) → nil
take(s(M), cons(N, IL)) → cons(N, n__take(M, activate(IL)))
zerosn__zeros
take(X1, X2) → n__take(X1, X2)
activate(n__zeros) → zeros
activate(n__take(X1, X2)) → take(activate(X1), activate(X2))
activate(X) → X

Q is empty.

(1) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

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

and(tt, X) → activate(X)


(2) Obligation:

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

zeroscons(0, n__zeros)
length(nil) → 0
length(cons(N, L)) → s(length(activate(L)))
take(0, IL) → nil
take(s(M), cons(N, IL)) → cons(N, n__take(M, activate(IL)))
zerosn__zeros
take(X1, X2) → n__take(X1, X2)
activate(n__zeros) → zeros
activate(n__take(X1, X2)) → take(activate(X1), activate(X2))
activate(X) → X

Q is empty.

(3) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

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

length(nil) → 0


(4) Obligation:

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

zeroscons(0, n__zeros)
length(cons(N, L)) → s(length(activate(L)))
take(0, IL) → nil
take(s(M), cons(N, IL)) → cons(N, n__take(M, activate(IL)))
zerosn__zeros
take(X1, X2) → n__take(X1, X2)
activate(n__zeros) → zeros
activate(n__take(X1, X2)) → take(activate(X1), activate(X2))
activate(X) → X

Q is empty.

(5) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

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

take(0, IL) → nil


(6) Obligation:

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

zeroscons(0, n__zeros)
length(cons(N, L)) → s(length(activate(L)))
take(s(M), cons(N, IL)) → cons(N, n__take(M, activate(IL)))
zerosn__zeros
take(X1, X2) → n__take(X1, X2)
activate(n__zeros) → zeros
activate(n__take(X1, X2)) → take(activate(X1), activate(X2))
activate(X) → X

Q is empty.

(7) DependencyPairsProof (EQUIVALENT transformation)

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

(8) Obligation:

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

LENGTH(cons(N, L)) → LENGTH(activate(L))
LENGTH(cons(N, L)) → ACTIVATE(L)
TAKE(s(M), cons(N, IL)) → ACTIVATE(IL)
ACTIVATE(n__zeros) → ZEROS
ACTIVATE(n__take(X1, X2)) → TAKE(activate(X1), activate(X2))
ACTIVATE(n__take(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__take(X1, X2)) → ACTIVATE(X2)

The TRS R consists of the following rules:

zeroscons(0, n__zeros)
length(cons(N, L)) → s(length(activate(L)))
take(s(M), cons(N, IL)) → cons(N, n__take(M, activate(IL)))
zerosn__zeros
take(X1, X2) → n__take(X1, X2)
activate(n__zeros) → zeros
activate(n__take(X1, X2)) → take(activate(X1), activate(X2))
activate(X) → X

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

(9) DependencyGraphProof (EQUIVALENT transformation)

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

(10) Complex Obligation (AND)

(11) Obligation:

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

ACTIVATE(n__take(X1, X2)) → TAKE(activate(X1), activate(X2))
TAKE(s(M), cons(N, IL)) → ACTIVATE(IL)
ACTIVATE(n__take(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__take(X1, X2)) → ACTIVATE(X2)

The TRS R consists of the following rules:

zeroscons(0, n__zeros)
length(cons(N, L)) → s(length(activate(L)))
take(s(M), cons(N, IL)) → cons(N, n__take(M, activate(IL)))
zerosn__zeros
take(X1, X2) → n__take(X1, X2)
activate(n__zeros) → zeros
activate(n__take(X1, X2)) → take(activate(X1), activate(X2))
activate(X) → X

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

(12) UsableRulesProof (EQUIVALENT transformation)

We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.

(13) Obligation:

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

ACTIVATE(n__take(X1, X2)) → TAKE(activate(X1), activate(X2))
TAKE(s(M), cons(N, IL)) → ACTIVATE(IL)
ACTIVATE(n__take(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__take(X1, X2)) → ACTIVATE(X2)

The TRS R consists of the following rules:

activate(n__zeros) → zeros
activate(n__take(X1, X2)) → take(activate(X1), activate(X2))
activate(X) → X
take(s(M), cons(N, IL)) → cons(N, n__take(M, activate(IL)))
take(X1, X2) → n__take(X1, X2)
zeroscons(0, n__zeros)
zerosn__zeros

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

(14) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] 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)) → ACTIVATE(IL)
The following rules are removed from R:

take(s(M), cons(N, IL)) → cons(N, n__take(M, activate(IL)))
Used ordering: POLO with Polynomial interpretation [POLO]:

POL(0) = 0   
POL(ACTIVATE(x1)) = 2·x1   
POL(TAKE(x1, x2)) = x1 + 2·x2   
POL(activate(x1)) = x1   
POL(cons(x1, x2)) = x1 + x2   
POL(n__take(x1, x2)) = 2·x1 + 2·x2   
POL(n__zeros) = 0   
POL(s(x1)) = 2 + 2·x1   
POL(take(x1, x2)) = 2·x1 + 2·x2   
POL(zeros) = 0   

(15) Obligation:

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

ACTIVATE(n__take(X1, X2)) → TAKE(activate(X1), activate(X2))
ACTIVATE(n__take(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__take(X1, X2)) → ACTIVATE(X2)

The TRS R consists of the following rules:

activate(n__zeros) → zeros
activate(n__take(X1, X2)) → take(activate(X1), activate(X2))
activate(X) → X
take(X1, X2) → n__take(X1, X2)
zeroscons(0, n__zeros)
zerosn__zeros

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

(16) DependencyGraphProof (EQUIVALENT transformation)

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

(17) Obligation:

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

ACTIVATE(n__take(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__take(X1, X2)) → ACTIVATE(X1)

The TRS R consists of the following rules:

activate(n__zeros) → zeros
activate(n__take(X1, X2)) → take(activate(X1), activate(X2))
activate(X) → X
take(X1, X2) → n__take(X1, X2)
zeroscons(0, n__zeros)
zerosn__zeros

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

(18) UsableRulesProof (EQUIVALENT transformation)

We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.

(19) Obligation:

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

ACTIVATE(n__take(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__take(X1, X2)) → ACTIVATE(X1)

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

(20) QDPSizeChangeProof (EQUIVALENT transformation)

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

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

  • ACTIVATE(n__take(X1, X2)) → ACTIVATE(X2)
    The graph contains the following edges 1 > 1

  • ACTIVATE(n__take(X1, X2)) → ACTIVATE(X1)
    The graph contains the following edges 1 > 1

(21) YES

(22) Obligation:

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

LENGTH(cons(N, L)) → LENGTH(activate(L))

The TRS R consists of the following rules:

zeroscons(0, n__zeros)
length(cons(N, L)) → s(length(activate(L)))
take(s(M), cons(N, IL)) → cons(N, n__take(M, activate(IL)))
zerosn__zeros
take(X1, X2) → n__take(X1, X2)
activate(n__zeros) → zeros
activate(n__take(X1, X2)) → take(activate(X1), activate(X2))
activate(X) → X

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

(23) NonLoopProof (EQUIVALENT transformation)

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

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

                activate(n__zeros)[ ]n[ ] → zeros[ ]n[ ]
                    by OriginalRule from TRS R

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

(24) NO