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

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

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
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(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
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)
FROM(X) → CONS(X, n__from(s(X)))
ACTIVATE(n__filter(X1, X2)) → FILTER(X1, X2)
SIEVE(cons(X, Y)) → CONS(X, n__filter(X, sieve(activate(Y))))
FILTER(s(s(X)), cons(Y, Z)) → SIEVE(Y)
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)
FILTER(s(s(X)), cons(Y, Z)) → IF(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
ACTIVATE(n__cons(X1, X2)) → CONS(X1, X2)
ACTIVATE(n__from(X)) → FROM(X)
SIEVE(cons(X, Y)) → 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(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
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)
FROM(X) → CONS(X, n__from(s(X)))
ACTIVATE(n__filter(X1, X2)) → FILTER(X1, X2)
SIEVE(cons(X, Y)) → CONS(X, n__filter(X, sieve(activate(Y))))
FILTER(s(s(X)), cons(Y, Z)) → SIEVE(Y)
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)
FILTER(s(s(X)), cons(Y, Z)) → IF(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
ACTIVATE(n__cons(X1, X2)) → CONS(X1, X2)
ACTIVATE(n__from(X)) → FROM(X)
SIEVE(cons(X, Y)) → 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(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
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 10 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
QDP
          ↳ QDPOrderProof

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

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

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X

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.


SIEVE(cons(X, Y)) → ACTIVATE(Y)
The remaining pairs can at least be oriented weakly.

ACTIVATE(n__filter(X1, X2)) → FILTER(X1, X2)
FILTER(s(s(X)), cons(Y, Z)) → SIEVE(Y)
SIEVE(cons(X, Y)) → SIEVE(activate(Y))
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)
Used ordering: Matrix interpretation [3]:
Non-tuple symbols:
M( cons(x1, x2) ) =
/1\
\0/
+
/10\
\10/
·x1+
/10\
\10/
·x2

M( from(x1) ) =
/1\
\1/
+
/10\
\10/
·x1

M( if(x1, ..., x3) ) =
/0\
\0/
+
/00\
\10/
·x1+
/00\
\00/
·x2+
/00\
\01/
·x3

M( n__from(x1) ) =
/0\
\0/
+
/10\
\00/
·x1

M( filter(x1, x2) ) =
/1\
\1/
+
/00\
\00/
·x1+
/01\
\11/
·x2

M( n__cons(x1, x2) ) =
/0\
\0/
+
/10\
\10/
·x1+
/10\
\00/
·x2

M( s(x1) ) =
/0\
\0/
+
/00\
\00/
·x1

M( activate(x1) ) =
/1\
\1/
+
/10\
\11/
·x1

M( divides(x1, x2) ) =
/1\
\0/
+
/00\
\00/
·x1+
/00\
\00/
·x2

M( sieve(x1) ) =
/1\
\0/
+
/10\
\10/
·x1

M( n__filter(x1, x2) ) =
/0\
\0/
+
/00\
\00/
·x1+
/01\
\10/
·x2

Tuple symbols:
M( SIEVE(x1) ) = 0+
[1,0]
·x1

M( ACTIVATE(x1) ) = 0+
[1,0]
·x1

M( FILTER(x1, x2) ) = 0+
[0,0]
·x1+
[0,1]
·x2


Matrix type:
We used a basic matrix type which is not further parametrizeable.


As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order.
The following usable rules [17] were oriented:

filter(s(s(X)), cons(Y, Z)) → if(divides(s(s(X)), Y), n__filter(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
cons(X1, X2) → n__cons(X1, X2)
filter(X1, X2) → n__filter(X1, X2)
from(X) → n__from(X)
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
activate(X) → X
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__from(X)) → from(X)
from(X) → cons(X, n__from(s(X)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
QDP
              ↳ DependencyGraphProof

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

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

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
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 2 SCCs with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
QDP
                    ↳ Narrowing
                  ↳ QDP

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

SIEVE(cons(X, Y)) → SIEVE(activate(Y))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X

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

SIEVE(cons(y0, n__from(x0))) → SIEVE(from(x0))
SIEVE(cons(y0, x0)) → SIEVE(x0)
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
SIEVE(cons(y0, n__filter(x0, x1))) → SIEVE(filter(x0, x1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ Narrowing
QDP
                        ↳ Narrowing
                  ↳ QDP

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

SIEVE(cons(y0, n__from(x0))) → SIEVE(from(x0))
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
SIEVE(cons(y0, x0)) → SIEVE(x0)
SIEVE(cons(y0, n__filter(x0, x1))) → SIEVE(filter(x0, x1))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule SIEVE(cons(y0, n__from(x0))) → SIEVE(from(x0)) at position [0] we obtained the following new rules:

SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
SIEVE(cons(y0, n__from(x0))) → SIEVE(n__from(x0))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ DependencyGraphProof
                  ↳ QDP

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

SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
SIEVE(cons(y0, n__from(x0))) → SIEVE(n__from(x0))
SIEVE(cons(y0, x0)) → SIEVE(x0)
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
SIEVE(cons(y0, n__filter(x0, x1))) → SIEVE(filter(x0, x1))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
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 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
QDP
                                ↳ Narrowing
                  ↳ QDP

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

SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
SIEVE(cons(y0, x0)) → SIEVE(x0)
SIEVE(cons(y0, n__filter(x0, x1))) → SIEVE(filter(x0, x1))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X

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

SIEVE(cons(y0, n__filter(s(s(x0)), cons(x1, x2)))) → SIEVE(if(divides(s(s(x0)), x1), n__filter(s(s(x0)), activate(x2)), n__cons(x1, n__filter(x0, sieve(x1)))))
SIEVE(cons(y0, n__filter(x0, x1))) → SIEVE(n__filter(x0, x1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Narrowing
QDP
                                    ↳ DependencyGraphProof
                  ↳ QDP

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

SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
SIEVE(cons(y0, n__filter(s(s(x0)), cons(x1, x2)))) → SIEVE(if(divides(s(s(x0)), x1), n__filter(s(s(x0)), activate(x2)), n__cons(x1, n__filter(x0, sieve(x1)))))
SIEVE(cons(y0, x0)) → SIEVE(x0)
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
SIEVE(cons(y0, n__filter(x0, x1))) → SIEVE(n__filter(x0, x1))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
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 2 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
QDP
                                        ↳ QDPOrderProof
                  ↳ QDP

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

SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
SIEVE(cons(y0, x0)) → SIEVE(x0)

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X

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.


SIEVE(cons(y0, x0)) → SIEVE(x0)
The remaining pairs can at least be oriented weakly.

SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
Used ordering: Polynomial interpretation [25]:

POL(SIEVE(x1)) = x1   
POL(cons(x1, x2)) = 1 + x2   
POL(n__cons(x1, x2)) = x2   
POL(n__from(x1)) = x1   
POL(s(x1)) = 0   

The following usable rules [17] were oriented:

cons(X1, X2) → n__cons(X1, X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
QDP
                                            ↳ QDPOrderProof
                  ↳ QDP

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

SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X

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.


SIEVE(cons(y0, n__cons(x0, x1))) → SIEVE(cons(x0, x1))
The remaining pairs can at least be oriented weakly.

SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))
Used ordering: Polynomial interpretation [25]:

POL(SIEVE(x1)) = x1   
POL(cons(x1, x2)) = 1 + x2   
POL(n__cons(x1, x2)) = 1 + x2   
POL(n__from(x1)) = x1   
POL(s(x1)) = 0   

The following usable rules [17] were oriented:

cons(X1, X2) → n__cons(X1, X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
QDP
                                                ↳ NonTerminationProof
                  ↳ QDP

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

SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

SIEVE(cons(y0, n__from(x0))) → SIEVE(cons(x0, n__from(s(x0))))

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X


s = SIEVE(cons(y0, n__from(x0))) evaluates to t =SIEVE(cons(x0, n__from(s(x0))))

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




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from SIEVE(cons(y0, n__from(x0))) to SIEVE(cons(x0, n__from(s(x0)))).





↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
QDP

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

ACTIVATE(n__filter(X1, X2)) → FILTER(X1, X2)
FILTER(s(s(X)), cons(Y, Z)) → ACTIVATE(Z)

The TRS R consists of the following rules:

primessieve(from(s(s(0))))
from(X) → cons(X, n__from(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(s(s(X)), activate(Z)), n__cons(Y, n__filter(X, sieve(Y))))
sieve(cons(X, Y)) → cons(X, n__filter(X, sieve(activate(Y))))
from(X) → n__from(X)
filter(X1, X2) → n__filter(X1, X2)
cons(X1, X2) → n__cons(X1, X2)
activate(n__from(X)) → from(X)
activate(n__filter(X1, X2)) → filter(X1, X2)
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(X) → X

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