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

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

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X

Q is empty.


QTRS
  ↳ DependencyPairsProof

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

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X

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:

SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__sieve(X)) → SIEVE(activate(X))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__filter(X1, X2)) → FILTER(activate(X1), activate(X2))
PRIMESS(0)
FILTER(s(s(X)), cons(Y, Z)) → IF(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
ACTIVATE(n__s(X)) → S(activate(X))
ACTIVATE(n__cons(X1, X2)) → CONS(activate(X1), X2)
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
IF(true, X, Y) → ACTIVATE(X)
PRIMESFROM(s(s(0)))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
IF(false, X, Y) → ACTIVATE(Y)
ACTIVATE(n__s(X)) → ACTIVATE(X)
PRIMESS(s(0))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
FROM(X) → CONS(X, n__from(n__s(X)))
ACTIVATE(n__from(X)) → FROM(activate(X))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
SIEVE(cons(X, Y)) → CONS(X, n__filter(X, n__sieve(activate(Y))))
PRIMESSIEVE(from(s(s(0))))
TAIL(cons(X, Y)) → ACTIVATE(Y)

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X

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

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

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

SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__sieve(X)) → SIEVE(activate(X))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__filter(X1, X2)) → FILTER(activate(X1), activate(X2))
PRIMESS(0)
FILTER(s(s(X)), cons(Y, Z)) → IF(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
ACTIVATE(n__s(X)) → S(activate(X))
ACTIVATE(n__cons(X1, X2)) → CONS(activate(X1), X2)
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
IF(true, X, Y) → ACTIVATE(X)
PRIMESFROM(s(s(0)))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
IF(false, X, Y) → ACTIVATE(Y)
ACTIVATE(n__s(X)) → ACTIVATE(X)
PRIMESS(s(0))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
FROM(X) → CONS(X, n__from(n__s(X)))
ACTIVATE(n__from(X)) → FROM(activate(X))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
SIEVE(cons(X, Y)) → CONS(X, n__filter(X, n__sieve(activate(Y))))
PRIMESSIEVE(from(s(s(0))))
TAIL(cons(X, Y)) → ACTIVATE(Y)

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X

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

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
QDP
          ↳ Narrowing

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

SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sieve(X)) → SIEVE(activate(X))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__filter(X1, X2)) → FILTER(activate(X1), activate(X2))
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__s(X)) → ACTIVATE(X)

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__filter(X1, X2)) → FILTER(activate(X1), activate(X2)) at position [0] we obtained the following new rules:

ACTIVATE(n__filter(x0, y1)) → FILTER(x0, activate(y1))
ACTIVATE(n__filter(n__filter(x0, x1), y1)) → FILTER(filter(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__filter(n__sieve(x0), y1)) → FILTER(sieve(activate(x0)), activate(y1))
ACTIVATE(n__filter(n__s(x0), y1)) → FILTER(s(activate(x0)), activate(y1))
ACTIVATE(n__filter(n__cons(x0, x1), y1)) → FILTER(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__filter(n__from(x0), y1)) → FILTER(from(activate(x0)), activate(y1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
QDP
              ↳ Narrowing

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

SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__sieve(X)) → SIEVE(activate(X))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
ACTIVATE(n__filter(x0, y1)) → FILTER(x0, activate(y1))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(n__s(x0), y1)) → FILTER(s(activate(x0)), activate(y1))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__s(X)) → ACTIVATE(X)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(n__sieve(x0), y1)) → FILTER(sieve(activate(x0)), activate(y1))
ACTIVATE(n__filter(n__from(x0), y1)) → FILTER(from(activate(x0)), activate(y1))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__filter(n__filter(x0, x1), y1)) → FILTER(filter(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__filter(n__cons(x0, x1), y1)) → FILTER(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sieve(X)) → SIEVE(activate(X)) at position [0] we obtained the following new rules:

ACTIVATE(n__sieve(x0)) → SIEVE(x0)
ACTIVATE(n__sieve(n__sieve(x0))) → SIEVE(sieve(activate(x0)))
ACTIVATE(n__sieve(n__cons(x0, x1))) → SIEVE(cons(activate(x0), x1))
ACTIVATE(n__sieve(n__filter(x0, x1))) → SIEVE(filter(activate(x0), activate(x1)))
ACTIVATE(n__sieve(n__from(x0))) → SIEVE(from(activate(x0)))
ACTIVATE(n__sieve(n__s(x0))) → SIEVE(s(activate(x0)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
QDP
                  ↳ Narrowing

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

SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__sieve(n__cons(x0, x1))) → SIEVE(cons(activate(x0), x1))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(n__filter(x0, x1))) → SIEVE(filter(activate(x0), activate(x1)))
ACTIVATE(n__sieve(x0)) → SIEVE(x0)
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
ACTIVATE(n__filter(x0, y1)) → FILTER(x0, activate(y1))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__filter(n__s(x0), y1)) → FILTER(s(activate(x0)), activate(y1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(n__s(x0))) → SIEVE(s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(n__sieve(x0), y1)) → FILTER(sieve(activate(x0)), activate(y1))
ACTIVATE(n__filter(n__from(x0), y1)) → FILTER(from(activate(x0)), activate(y1))
ACTIVATE(n__sieve(n__sieve(x0))) → SIEVE(sieve(activate(x0)))
ACTIVATE(n__filter(n__filter(x0, x1), y1)) → FILTER(filter(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__filter(n__cons(x0, x1), y1)) → FILTER(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__sieve(n__from(x0))) → SIEVE(from(activate(x0)))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__filter(x0, y1)) → FILTER(x0, activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__filter(y0, n__from(x0))) → FILTER(y0, from(activate(x0)))
ACTIVATE(n__filter(y0, x0)) → FILTER(y0, x0)
ACTIVATE(n__filter(y0, n__sieve(x0))) → FILTER(y0, sieve(activate(x0)))
ACTIVATE(n__filter(y0, n__filter(x0, x1))) → FILTER(y0, filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(y0, n__cons(x0, x1))) → FILTER(y0, cons(activate(x0), x1))
ACTIVATE(n__filter(y0, n__s(x0))) → FILTER(y0, s(activate(x0)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
QDP
                      ↳ Narrowing

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

ACTIVATE(n__filter(y0, x0)) → FILTER(y0, x0)
ACTIVATE(n__sieve(n__filter(x0, x1))) → SIEVE(filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(y0, n__from(x0))) → FILTER(y0, from(activate(x0)))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__filter(n__s(x0), y1)) → FILTER(s(activate(x0)), activate(y1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(n__s(x0))) → SIEVE(s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(y0, n__filter(x0, x1))) → FILTER(y0, filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__from(x0), y1)) → FILTER(from(activate(x0)), activate(y1))
ACTIVATE(n__filter(n__filter(x0, x1), y1)) → FILTER(filter(activate(x0), activate(x1)), activate(y1))
SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__sieve(n__cons(x0, x1))) → SIEVE(cons(activate(x0), x1))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__filter(y0, n__sieve(x0))) → FILTER(y0, sieve(activate(x0)))
ACTIVATE(n__sieve(x0)) → SIEVE(x0)
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(n__sieve(x0), y1)) → FILTER(sieve(activate(x0)), activate(y1))
ACTIVATE(n__filter(y0, n__cons(x0, x1))) → FILTER(y0, cons(activate(x0), x1))
ACTIVATE(n__filter(y0, n__s(x0))) → FILTER(y0, s(activate(x0)))
ACTIVATE(n__sieve(n__sieve(x0))) → SIEVE(sieve(activate(x0)))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__filter(n__cons(x0, x1), y1)) → FILTER(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__sieve(n__from(x0))) → SIEVE(from(activate(x0)))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__filter(n__filter(x0, x1), y1)) → FILTER(filter(activate(x0), activate(x1)), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__filter(n__filter(y0, y1), x0)) → FILTER(filter(activate(y0), activate(y1)), x0)
ACTIVATE(n__filter(n__filter(y0, y1), n__sieve(x0))) → FILTER(filter(activate(y0), activate(y1)), sieve(activate(x0)))
ACTIVATE(n__filter(n__filter(y0, y1), n__from(x0))) → FILTER(filter(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__filter(n__filter(y0, y1), n__s(x0))) → FILTER(filter(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__filter(n__filter(y0, y1), n__cons(x0, x1))) → FILTER(filter(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__filter(n__filter(y0, y1), n__filter(x0, x1))) → FILTER(filter(activate(y0), activate(y1)), filter(activate(x0), activate(x1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ Narrowing
QDP
                          ↳ Narrowing

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

ACTIVATE(n__filter(y0, x0)) → FILTER(y0, x0)
ACTIVATE(n__sieve(n__filter(x0, x1))) → SIEVE(filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(y0, n__from(x0))) → FILTER(y0, from(activate(x0)))
ACTIVATE(n__filter(n__filter(y0, y1), n__sieve(x0))) → FILTER(filter(activate(y0), activate(y1)), sieve(activate(x0)))
ACTIVATE(n__filter(n__s(x0), y1)) → FILTER(s(activate(x0)), activate(y1))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__filter(n__filter(y0, y1), n__from(x0))) → FILTER(filter(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__s(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(n__s(x0))) → SIEVE(s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(y0, n__filter(x0, x1))) → FILTER(y0, filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__from(x0), y1)) → FILTER(from(activate(x0)), activate(y1))
ACTIVATE(n__filter(n__filter(y0, y1), n__cons(x0, x1))) → FILTER(filter(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__filter(n__filter(y0, y1), n__filter(x0, x1))) → FILTER(filter(activate(y0), activate(y1)), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__filter(y0, y1), x0)) → FILTER(filter(activate(y0), activate(y1)), x0)
SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__filter(y0, n__sieve(x0))) → FILTER(y0, sieve(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(n__cons(x0, x1))) → SIEVE(cons(activate(x0), x1))
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(x0)) → SIEVE(x0)
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(n__filter(y0, y1), n__s(x0))) → FILTER(filter(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__filter(n__sieve(x0), y1)) → FILTER(sieve(activate(x0)), activate(y1))
ACTIVATE(n__filter(y0, n__cons(x0, x1))) → FILTER(y0, cons(activate(x0), x1))
ACTIVATE(n__filter(y0, n__s(x0))) → FILTER(y0, s(activate(x0)))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sieve(n__sieve(x0))) → SIEVE(sieve(activate(x0)))
ACTIVATE(n__filter(n__cons(x0, x1), y1)) → FILTER(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__sieve(n__from(x0))) → SIEVE(from(activate(x0)))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__filter(n__sieve(x0), y1)) → FILTER(sieve(activate(x0)), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__filter(n__sieve(y0), n__cons(x0, x1))) → FILTER(sieve(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__filter(n__sieve(y0), n__s(x0))) → FILTER(sieve(activate(y0)), s(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), x0)) → FILTER(sieve(activate(y0)), x0)
ACTIVATE(n__filter(n__sieve(y0), n__filter(x0, x1))) → FILTER(sieve(activate(y0)), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__sieve(y0), n__sieve(x0))) → FILTER(sieve(activate(y0)), sieve(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), n__from(x0))) → FILTER(sieve(activate(y0)), from(activate(x0)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ Narrowing
QDP
                              ↳ Narrowing

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

ACTIVATE(n__filter(n__sieve(y0), n__s(x0))) → FILTER(sieve(activate(y0)), s(activate(x0)))
ACTIVATE(n__filter(y0, x0)) → FILTER(y0, x0)
ACTIVATE(n__sieve(n__filter(x0, x1))) → SIEVE(filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(y0, n__from(x0))) → FILTER(y0, from(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), n__filter(x0, x1))) → FILTER(sieve(activate(y0)), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__filter(y0, y1), n__sieve(x0))) → FILTER(filter(activate(y0), activate(y1)), sieve(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), n__sieve(x0))) → FILTER(sieve(activate(y0)), sieve(activate(x0)))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__filter(n__s(x0), y1)) → FILTER(s(activate(x0)), activate(y1))
ACTIVATE(n__filter(n__filter(y0, y1), n__from(x0))) → FILTER(filter(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__s(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(n__s(x0))) → SIEVE(s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(y0, n__filter(x0, x1))) → FILTER(y0, filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__from(x0), y1)) → FILTER(from(activate(x0)), activate(y1))
ACTIVATE(n__filter(n__filter(y0, y1), n__cons(x0, x1))) → FILTER(filter(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__filter(n__filter(y0, y1), n__filter(x0, x1))) → FILTER(filter(activate(y0), activate(y1)), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__sieve(y0), n__cons(x0, x1))) → FILTER(sieve(activate(y0)), cons(activate(x0), x1))
SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__filter(n__filter(y0, y1), x0)) → FILTER(filter(activate(y0), activate(y1)), x0)
ACTIVATE(n__sieve(n__cons(x0, x1))) → SIEVE(cons(activate(x0), x1))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__filter(y0, n__sieve(x0))) → FILTER(y0, sieve(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), x0)) → FILTER(sieve(activate(y0)), x0)
ACTIVATE(n__sieve(x0)) → SIEVE(x0)
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(n__filter(y0, y1), n__s(x0))) → FILTER(filter(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__filter(y0, n__cons(x0, x1))) → FILTER(y0, cons(activate(x0), x1))
ACTIVATE(n__filter(y0, n__s(x0))) → FILTER(y0, s(activate(x0)))
ACTIVATE(n__sieve(n__sieve(x0))) → SIEVE(sieve(activate(x0)))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__filter(n__cons(x0, x1), y1)) → FILTER(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__sieve(n__from(x0))) → SIEVE(from(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), n__from(x0))) → FILTER(sieve(activate(y0)), from(activate(x0)))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__filter(n__s(x0), y1)) → FILTER(s(activate(x0)), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__filter(n__s(y0), n__sieve(x0))) → FILTER(s(activate(y0)), sieve(activate(x0)))
ACTIVATE(n__filter(n__s(y0), n__s(x0))) → FILTER(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__filter(n__s(y0), n__from(x0))) → FILTER(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__filter(n__s(y0), n__cons(x0, x1))) → FILTER(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__filter(n__s(y0), x0)) → FILTER(s(activate(y0)), x0)
ACTIVATE(n__filter(n__s(y0), n__filter(x0, x1))) → FILTER(s(activate(y0)), filter(activate(x0), activate(x1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
QDP
                                  ↳ Narrowing

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

ACTIVATE(n__filter(n__s(y0), n__sieve(x0))) → FILTER(s(activate(y0)), sieve(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), n__s(x0))) → FILTER(sieve(activate(y0)), s(activate(x0)))
ACTIVATE(n__filter(y0, x0)) → FILTER(y0, x0)
ACTIVATE(n__sieve(n__filter(x0, x1))) → SIEVE(filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(y0, n__from(x0))) → FILTER(y0, from(activate(x0)))
ACTIVATE(n__filter(n__filter(y0, y1), n__sieve(x0))) → FILTER(filter(activate(y0), activate(y1)), sieve(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), n__filter(x0, x1))) → FILTER(sieve(activate(y0)), filter(activate(x0), activate(x1)))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__filter(n__sieve(y0), n__sieve(x0))) → FILTER(sieve(activate(y0)), sieve(activate(x0)))
ACTIVATE(n__filter(n__filter(y0, y1), n__from(x0))) → FILTER(filter(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__s(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(n__s(x0))) → SIEVE(s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(y0, n__filter(x0, x1))) → FILTER(y0, filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__from(x0), y1)) → FILTER(from(activate(x0)), activate(y1))
ACTIVATE(n__filter(n__filter(y0, y1), n__cons(x0, x1))) → FILTER(filter(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__filter(n__s(y0), n__from(x0))) → FILTER(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__filter(n__s(y0), n__cons(x0, x1))) → FILTER(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__filter(n__filter(y0, y1), n__filter(x0, x1))) → FILTER(filter(activate(y0), activate(y1)), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__s(y0), x0)) → FILTER(s(activate(y0)), x0)
ACTIVATE(n__filter(n__sieve(y0), n__cons(x0, x1))) → FILTER(sieve(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__filter(n__filter(y0, y1), x0)) → FILTER(filter(activate(y0), activate(y1)), x0)
SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__filter(y0, n__sieve(x0))) → FILTER(y0, sieve(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(n__cons(x0, x1))) → SIEVE(cons(activate(x0), x1))
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(x0)) → SIEVE(x0)
ACTIVATE(n__filter(n__sieve(y0), x0)) → FILTER(sieve(activate(y0)), x0)
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(n__s(y0), n__filter(x0, x1))) → FILTER(s(activate(y0)), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__filter(y0, y1), n__s(x0))) → FILTER(filter(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__filter(y0, n__cons(x0, x1))) → FILTER(y0, cons(activate(x0), x1))
ACTIVATE(n__filter(y0, n__s(x0))) → FILTER(y0, s(activate(x0)))
ACTIVATE(n__filter(n__s(y0), n__s(x0))) → FILTER(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sieve(n__sieve(x0))) → SIEVE(sieve(activate(x0)))
ACTIVATE(n__filter(n__cons(x0, x1), y1)) → FILTER(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__sieve(n__from(x0))) → SIEVE(from(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), n__from(x0))) → FILTER(sieve(activate(y0)), from(activate(x0)))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__filter(n__cons(x0, x1), y1)) → FILTER(cons(activate(x0), x1), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__filter(n__cons(y0, y1), x0)) → FILTER(cons(activate(y0), y1), x0)
ACTIVATE(n__filter(n__cons(y0, y1), n__cons(x0, x1))) → FILTER(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__filter(n__cons(y0, y1), n__s(x0))) → FILTER(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__filter(n__cons(y0, y1), n__from(x0))) → FILTER(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__filter(n__cons(y0, y1), n__sieve(x0))) → FILTER(cons(activate(y0), y1), sieve(activate(x0)))
ACTIVATE(n__filter(n__cons(y0, y1), n__filter(x0, x1))) → FILTER(cons(activate(y0), y1), filter(activate(x0), activate(x1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
QDP
                                      ↳ Narrowing

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

ACTIVATE(n__filter(n__sieve(y0), n__s(x0))) → FILTER(sieve(activate(y0)), s(activate(x0)))
ACTIVATE(n__filter(n__s(y0), n__sieve(x0))) → FILTER(s(activate(y0)), sieve(activate(x0)))
ACTIVATE(n__filter(y0, x0)) → FILTER(y0, x0)
ACTIVATE(n__sieve(n__filter(x0, x1))) → SIEVE(filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__cons(y0, y1), n__from(x0))) → FILTER(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__filter(y0, n__from(x0))) → FILTER(y0, from(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), n__filter(x0, x1))) → FILTER(sieve(activate(y0)), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__filter(y0, y1), n__sieve(x0))) → FILTER(filter(activate(y0), activate(y1)), sieve(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), n__sieve(x0))) → FILTER(sieve(activate(y0)), sieve(activate(x0)))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__filter(n__filter(y0, y1), n__from(x0))) → FILTER(filter(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__s(X)) → ACTIVATE(X)
ACTIVATE(n__sieve(n__s(x0))) → SIEVE(s(activate(x0)))
ACTIVATE(n__filter(n__cons(y0, y1), x0)) → FILTER(cons(activate(y0), y1), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(y0, n__filter(x0, x1))) → FILTER(y0, filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__from(x0), y1)) → FILTER(from(activate(x0)), activate(y1))
ACTIVATE(n__filter(n__filter(y0, y1), n__cons(x0, x1))) → FILTER(filter(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__filter(n__s(y0), n__from(x0))) → FILTER(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__filter(n__filter(y0, y1), n__filter(x0, x1))) → FILTER(filter(activate(y0), activate(y1)), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__s(y0), n__cons(x0, x1))) → FILTER(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__filter(n__cons(y0, y1), n__sieve(x0))) → FILTER(cons(activate(y0), y1), sieve(activate(x0)))
ACTIVATE(n__filter(n__cons(y0, y1), n__filter(x0, x1))) → FILTER(cons(activate(y0), y1), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__s(y0), x0)) → FILTER(s(activate(y0)), x0)
ACTIVATE(n__filter(n__sieve(y0), n__cons(x0, x1))) → FILTER(sieve(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__filter(n__cons(y0, y1), n__s(x0))) → FILTER(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__filter(n__cons(y0, y1), n__cons(x0, x1))) → FILTER(cons(activate(y0), y1), cons(activate(x0), x1))
SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__filter(n__filter(y0, y1), x0)) → FILTER(filter(activate(y0), activate(y1)), x0)
ACTIVATE(n__sieve(n__cons(x0, x1))) → SIEVE(cons(activate(x0), x1))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__filter(y0, n__sieve(x0))) → FILTER(y0, sieve(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), x0)) → FILTER(sieve(activate(y0)), x0)
ACTIVATE(n__sieve(x0)) → SIEVE(x0)
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(n__filter(y0, y1), n__s(x0))) → FILTER(filter(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__filter(n__s(y0), n__filter(x0, x1))) → FILTER(s(activate(y0)), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(y0, n__cons(x0, x1))) → FILTER(y0, cons(activate(x0), x1))
ACTIVATE(n__filter(y0, n__s(x0))) → FILTER(y0, s(activate(x0)))
ACTIVATE(n__sieve(n__sieve(x0))) → SIEVE(sieve(activate(x0)))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__filter(n__s(y0), n__s(x0))) → FILTER(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sieve(n__from(x0))) → SIEVE(from(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), n__from(x0))) → FILTER(sieve(activate(y0)), from(activate(x0)))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__filter(n__from(x0), y1)) → FILTER(from(activate(x0)), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__filter(n__from(y0), n__from(x0))) → FILTER(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__filter(n__from(y0), x0)) → FILTER(from(activate(y0)), x0)
ACTIVATE(n__filter(n__from(y0), n__s(x0))) → FILTER(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__filter(n__from(y0), n__filter(x0, x1))) → FILTER(from(activate(y0)), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__from(y0), n__sieve(x0))) → FILTER(from(activate(y0)), sieve(activate(x0)))
ACTIVATE(n__filter(n__from(y0), n__cons(x0, x1))) → FILTER(from(activate(y0)), cons(activate(x0), x1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ Narrowing
QDP

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

ACTIVATE(n__filter(n__sieve(y0), n__s(x0))) → FILTER(sieve(activate(y0)), s(activate(x0)))
ACTIVATE(n__filter(n__s(y0), n__sieve(x0))) → FILTER(s(activate(y0)), sieve(activate(x0)))
ACTIVATE(n__filter(y0, x0)) → FILTER(y0, x0)
ACTIVATE(n__filter(n__sieve(y0), n__sieve(x0))) → FILTER(sieve(activate(y0)), sieve(activate(x0)))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__s(X)) → ACTIVATE(X)
ACTIVATE(n__filter(n__cons(y0, y1), n__sieve(x0))) → FILTER(cons(activate(y0), y1), sieve(activate(x0)))
ACTIVATE(n__filter(n__s(y0), x0)) → FILTER(s(activate(y0)), x0)
ACTIVATE(n__filter(n__cons(y0, y1), n__s(x0))) → FILTER(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__filter(n__cons(y0, y1), n__cons(x0, x1))) → FILTER(cons(activate(y0), y1), cons(activate(x0), x1))
SIEVE(cons(X, Y)) → ACTIVATE(Y)
ACTIVATE(n__filter(n__filter(y0, y1), x0)) → FILTER(filter(activate(y0), activate(y1)), x0)
ACTIVATE(n__sieve(x0)) → SIEVE(x0)
ACTIVATE(n__sieve(X)) → ACTIVATE(X)
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(y0, n__cons(x0, x1))) → FILTER(y0, cons(activate(x0), x1))
ACTIVATE(n__filter(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__filter(n__from(y0), n__sieve(x0))) → FILTER(from(activate(y0)), sieve(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), n__from(x0))) → FILTER(sieve(activate(y0)), from(activate(x0)))
ACTIVATE(n__filter(n__from(y0), n__cons(x0, x1))) → FILTER(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sieve(n__filter(x0, x1))) → SIEVE(filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__from(y0), n__from(x0))) → FILTER(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__filter(n__cons(y0, y1), n__from(x0))) → FILTER(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__filter(y0, n__from(x0))) → FILTER(y0, from(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), n__filter(x0, x1))) → FILTER(sieve(activate(y0)), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__filter(y0, y1), n__sieve(x0))) → FILTER(filter(activate(y0), activate(y1)), sieve(activate(x0)))
ACTIVATE(n__filter(n__filter(y0, y1), n__from(x0))) → FILTER(filter(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__filter(n__from(y0), n__filter(x0, x1))) → FILTER(from(activate(y0)), filter(activate(x0), activate(x1)))
ACTIVATE(n__sieve(n__s(x0))) → SIEVE(s(activate(x0)))
ACTIVATE(n__filter(n__cons(y0, y1), x0)) → FILTER(cons(activate(y0), y1), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__filter(y0, n__filter(x0, x1))) → FILTER(y0, filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__filter(y0, y1), n__cons(x0, x1))) → FILTER(filter(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__filter(n__from(y0), x0)) → FILTER(from(activate(y0)), x0)
ACTIVATE(n__filter(n__s(y0), n__from(x0))) → FILTER(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__filter(n__from(y0), n__s(x0))) → FILTER(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__filter(n__filter(y0, y1), n__filter(x0, x1))) → FILTER(filter(activate(y0), activate(y1)), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__s(y0), n__cons(x0, x1))) → FILTER(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__filter(n__cons(y0, y1), n__filter(x0, x1))) → FILTER(cons(activate(y0), y1), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(n__sieve(y0), n__cons(x0, x1))) → FILTER(sieve(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sieve(n__cons(x0, x1))) → SIEVE(cons(activate(x0), x1))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__filter(y0, n__sieve(x0))) → FILTER(y0, sieve(activate(x0)))
ACTIVATE(n__filter(n__sieve(y0), x0)) → FILTER(sieve(activate(y0)), x0)
ACTIVATE(n__filter(n__filter(y0, y1), n__s(x0))) → FILTER(filter(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__filter(n__s(y0), n__filter(x0, x1))) → FILTER(s(activate(y0)), filter(activate(x0), activate(x1)))
ACTIVATE(n__filter(y0, n__s(x0))) → FILTER(y0, s(activate(x0)))
ACTIVATE(n__sieve(n__sieve(x0))) → SIEVE(sieve(activate(x0)))
ACTIVATE(n__filter(n__s(y0), n__s(x0))) → FILTER(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sieve(n__from(x0))) → SIEVE(from(activate(x0)))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(n__s(X)))
head(cons(X, Y)) → X
tail(cons(X, Y)) → activate(Y)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(n__s(n__s(X)), activate(Z)), n__cons(Y, n__filter(X, n__sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, n__sieve(activate(Y))))
from(X) → n__from(X)
s(X) → n__s(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
sieve(X) → n__sieve(X)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__filter(X1, X2)) → filter(activate(X1), activate(X2))
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__sieve(X)) → sieve(activate(X))
activate(X) → X

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