(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(X1, X2)
activate(X) → X

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

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

(2) Obligation:

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

AND(tt, X) → ACTIVATE(X)
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(X1, X2)

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(X1, X2)
activate(X) → X

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

(3) DependencyGraphProof (EQUIVALENT transformation)

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

(4) Complex Obligation (AND)

(5) Obligation:

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

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

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(X1, X2)
activate(X) → X

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

(6) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ACTIVATE(n__take(X1, X2)) → TAKE(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ACTIVATE(x1)  =  ACTIVATE(x1)
n__take(x1, x2)  =  x2
TAKE(x1, x2)  =  x2
s(x1)  =  x1
cons(x1, x2)  =  cons(x2)
zeros  =  zeros
0  =  0
n__zeros  =  n__zeros
and(x1, x2)  =  and(x1, x2)
tt  =  tt
activate(x1)  =  activate(x1)
length(x1)  =  length
nil  =  nil
take(x1, x2)  =  take(x2)

Lexicographic path order with status [LPO].
Quasi-Precedence:
and2 > [activate1, take1] > [zeros, 0] > nzeros > [ACTIVATE1, cons1, nil]
tt > [activate1, take1] > [zeros, 0] > nzeros > [ACTIVATE1, cons1, nil]
length > [activate1, take1] > [zeros, 0] > nzeros > [ACTIVATE1, cons1, nil]

Status:
ACTIVATE1: [1]
cons1: [1]
zeros: []
0: []
nzeros: []
and2: [1,2]
tt: []
activate1: [1]
length: []
nil: []
take1: [1]


The following usable rules [FROCOS05] were oriented:

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(X1, X2)
activate(X) → X

(7) Obligation:

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

TAKE(s(M), cons(N, IL)) → ACTIVATE(IL)

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(X1, X2)
activate(X) → X

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

(8) DependencyGraphProof (EQUIVALENT transformation)

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

(9) TRUE

(10) 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)
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(X1, X2)
activate(X) → X

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