Term Rewriting System R:
[X, Y, Z, X1, X2, X3]
active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

ACTIVE(primes) -> SIEVE(from(s(s(0))))
ACTIVE(primes) -> FROM(s(s(0)))
ACTIVE(primes) -> S(s(0))
ACTIVE(primes) -> S(0)
ACTIVE(from(X)) -> CONS(X, from(s(X)))
ACTIVE(from(X)) -> FROM(s(X))
ACTIVE(from(X)) -> S(X)
ACTIVE(filter(s(s(X)), cons(Y, Z))) -> IF(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
ACTIVE(filter(s(s(X)), cons(Y, Z))) -> DIVIDES(s(s(X)), Y)
ACTIVE(filter(s(s(X)), cons(Y, Z))) -> FILTER(s(s(X)), Z)
ACTIVE(filter(s(s(X)), cons(Y, Z))) -> CONS(Y, filter(X, sieve(Y)))
ACTIVE(filter(s(s(X)), cons(Y, Z))) -> FILTER(X, sieve(Y))
ACTIVE(filter(s(s(X)), cons(Y, Z))) -> SIEVE(Y)
ACTIVE(sieve(cons(X, Y))) -> CONS(X, filter(X, sieve(Y)))
ACTIVE(sieve(cons(X, Y))) -> FILTER(X, sieve(Y))
ACTIVE(sieve(cons(X, Y))) -> SIEVE(Y)
ACTIVE(sieve(X)) -> SIEVE(active(X))
ACTIVE(sieve(X)) -> ACTIVE(X)
ACTIVE(from(X)) -> FROM(active(X))
ACTIVE(from(X)) -> ACTIVE(X)
ACTIVE(s(X)) -> S(active(X))
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(cons(X1, X2)) -> CONS(active(X1), X2)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(head(X)) -> HEAD(active(X))
ACTIVE(head(X)) -> ACTIVE(X)
ACTIVE(tail(X)) -> TAIL(active(X))
ACTIVE(tail(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> IF(active(X1), X2, X3)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(filter(X1, X2)) -> FILTER(active(X1), X2)
ACTIVE(filter(X1, X2)) -> ACTIVE(X1)
ACTIVE(filter(X1, X2)) -> FILTER(X1, active(X2))
ACTIVE(filter(X1, X2)) -> ACTIVE(X2)
ACTIVE(divides(X1, X2)) -> DIVIDES(active(X1), X2)
ACTIVE(divides(X1, X2)) -> ACTIVE(X1)
ACTIVE(divides(X1, X2)) -> DIVIDES(X1, active(X2))
ACTIVE(divides(X1, X2)) -> ACTIVE(X2)
SIEVE(mark(X)) -> SIEVE(X)
SIEVE(ok(X)) -> SIEVE(X)
FROM(mark(X)) -> FROM(X)
FROM(ok(X)) -> FROM(X)
S(mark(X)) -> S(X)
S(ok(X)) -> S(X)
CONS(mark(X1), X2) -> CONS(X1, X2)
CONS(ok(X1), ok(X2)) -> CONS(X1, X2)
HEAD(mark(X)) -> HEAD(X)
HEAD(ok(X)) -> HEAD(X)
TAIL(mark(X)) -> TAIL(X)
TAIL(ok(X)) -> TAIL(X)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
FILTER(mark(X1), X2) -> FILTER(X1, X2)
FILTER(X1, mark(X2)) -> FILTER(X1, X2)
FILTER(ok(X1), ok(X2)) -> FILTER(X1, X2)
DIVIDES(mark(X1), X2) -> DIVIDES(X1, X2)
DIVIDES(X1, mark(X2)) -> DIVIDES(X1, X2)
DIVIDES(ok(X1), ok(X2)) -> DIVIDES(X1, X2)
PROPER(sieve(X)) -> SIEVE(proper(X))
PROPER(sieve(X)) -> PROPER(X)
PROPER(from(X)) -> FROM(proper(X))
PROPER(from(X)) -> PROPER(X)
PROPER(s(X)) -> S(proper(X))
PROPER(s(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> CONS(proper(X1), proper(X2))
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(head(X)) -> HEAD(proper(X))
PROPER(head(X)) -> PROPER(X)
PROPER(tail(X)) -> TAIL(proper(X))
PROPER(tail(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> IF(proper(X1), proper(X2), proper(X3))
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(filter(X1, X2)) -> FILTER(proper(X1), proper(X2))
PROPER(filter(X1, X2)) -> PROPER(X1)
PROPER(filter(X1, X2)) -> PROPER(X2)
PROPER(divides(X1, X2)) -> DIVIDES(proper(X1), proper(X2))
PROPER(divides(X1, X2)) -> PROPER(X1)
PROPER(divides(X1, X2)) -> PROPER(X2)
TOP(mark(X)) -> TOP(proper(X))
TOP(mark(X)) -> PROPER(X)
TOP(ok(X)) -> TOP(active(X))
TOP(ok(X)) -> ACTIVE(X)

Furthermore, R contains 12 SCCs.


   R
DPs
       →DP Problem 1
Size-Change Principle
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
SCP
       →DP Problem 11
SCP
       →DP Problem 12
Nar


Dependency Pairs:

CONS(ok(X1), ok(X2)) -> CONS(X1, X2)
CONS(mark(X1), X2) -> CONS(X1, X2)


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. CONS(ok(X1), ok(X2)) -> CONS(X1, X2)
  2. CONS(mark(X1), X2) -> CONS(X1, X2)
and get the following Size-Change Graph(s):
{2, 1} , {2, 1}
1>1
2>2
{2, 1} , {2, 1}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{2, 1} , {2, 1}
1>1
2=2
{2, 1} , {2, 1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
Size-Change Principle
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
SCP
       →DP Problem 11
SCP
       →DP Problem 12
Nar


Dependency Pairs:

FROM(ok(X)) -> FROM(X)
FROM(mark(X)) -> FROM(X)


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. FROM(ok(X)) -> FROM(X)
  2. FROM(mark(X)) -> FROM(X)
and get the following Size-Change Graph(s):
{2, 1} , {2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{2, 1} , {2, 1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
Size-Change Principle
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
SCP
       →DP Problem 11
SCP
       →DP Problem 12
Nar


Dependency Pairs:

S(ok(X)) -> S(X)
S(mark(X)) -> S(X)


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. S(ok(X)) -> S(X)
  2. S(mark(X)) -> S(X)
and get the following Size-Change Graph(s):
{2, 1} , {2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{2, 1} , {2, 1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
Size-Change Principle
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
SCP
       →DP Problem 11
SCP
       →DP Problem 12
Nar


Dependency Pairs:

IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
  2. IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
and get the following Size-Change Graph(s):
{2, 1} , {2, 1}
1>1
2>2
3>3
{2, 1} , {2, 1}
1>1
2=2
3=3

which lead(s) to this/these maximal multigraph(s):
{2, 1} , {2, 1}
1>1
2=2
3=3
{2, 1} , {2, 1}
1>1
2>2
3>3

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
Size-Change Principle
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
SCP
       →DP Problem 11
SCP
       →DP Problem 12
Nar


Dependency Pairs:

DIVIDES(ok(X1), ok(X2)) -> DIVIDES(X1, X2)
DIVIDES(X1, mark(X2)) -> DIVIDES(X1, X2)
DIVIDES(mark(X1), X2) -> DIVIDES(X1, X2)


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. DIVIDES(ok(X1), ok(X2)) -> DIVIDES(X1, X2)
  2. DIVIDES(X1, mark(X2)) -> DIVIDES(X1, X2)
  3. DIVIDES(mark(X1), X2) -> DIVIDES(X1, X2)
and get the following Size-Change Graph(s):
{3, 2, 1} , {3, 2, 1}
1>1
2>2
{3, 2, 1} , {3, 2, 1}
1=1
2>2
{3, 2, 1} , {3, 2, 1}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{3, 2, 1} , {3, 2, 1}
1>1
2>2
{3, 2, 1} , {3, 2, 1}
1>1
2=2
{3, 2, 1} , {3, 2, 1}
1=1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
Size-Change Principle
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
SCP
       →DP Problem 11
SCP
       →DP Problem 12
Nar


Dependency Pairs:

FILTER(ok(X1), ok(X2)) -> FILTER(X1, X2)
FILTER(X1, mark(X2)) -> FILTER(X1, X2)
FILTER(mark(X1), X2) -> FILTER(X1, X2)


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. FILTER(ok(X1), ok(X2)) -> FILTER(X1, X2)
  2. FILTER(X1, mark(X2)) -> FILTER(X1, X2)
  3. FILTER(mark(X1), X2) -> FILTER(X1, X2)
and get the following Size-Change Graph(s):
{3, 2, 1} , {3, 2, 1}
1>1
2>2
{3, 2, 1} , {3, 2, 1}
1=1
2>2
{3, 2, 1} , {3, 2, 1}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{3, 2, 1} , {3, 2, 1}
1>1
2>2
{3, 2, 1} , {3, 2, 1}
1>1
2=2
{3, 2, 1} , {3, 2, 1}
1=1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
Size-Change Principle
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
SCP
       →DP Problem 11
SCP
       →DP Problem 12
Nar


Dependency Pairs:

SIEVE(ok(X)) -> SIEVE(X)
SIEVE(mark(X)) -> SIEVE(X)


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. SIEVE(ok(X)) -> SIEVE(X)
  2. SIEVE(mark(X)) -> SIEVE(X)
and get the following Size-Change Graph(s):
{2, 1} , {2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{2, 1} , {2, 1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
Size-Change Principle
       →DP Problem 9
SCP
       →DP Problem 10
SCP
       →DP Problem 11
SCP
       →DP Problem 12
Nar


Dependency Pairs:

HEAD(ok(X)) -> HEAD(X)
HEAD(mark(X)) -> HEAD(X)


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. HEAD(ok(X)) -> HEAD(X)
  2. HEAD(mark(X)) -> HEAD(X)
and get the following Size-Change Graph(s):
{2, 1} , {2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{2, 1} , {2, 1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
Size-Change Principle
       →DP Problem 10
SCP
       →DP Problem 11
SCP
       →DP Problem 12
Nar


Dependency Pairs:

TAIL(ok(X)) -> TAIL(X)
TAIL(mark(X)) -> TAIL(X)


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. TAIL(ok(X)) -> TAIL(X)
  2. TAIL(mark(X)) -> TAIL(X)
and get the following Size-Change Graph(s):
{2, 1} , {2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{2, 1} , {2, 1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
Size-Change Principle
       →DP Problem 11
SCP
       →DP Problem 12
Nar


Dependency Pairs:

ACTIVE(divides(X1, X2)) -> ACTIVE(X2)
ACTIVE(divides(X1, X2)) -> ACTIVE(X1)
ACTIVE(filter(X1, X2)) -> ACTIVE(X2)
ACTIVE(filter(X1, X2)) -> ACTIVE(X1)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(tail(X)) -> ACTIVE(X)
ACTIVE(head(X)) -> ACTIVE(X)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(from(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> ACTIVE(X)


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. ACTIVE(divides(X1, X2)) -> ACTIVE(X2)
  2. ACTIVE(divides(X1, X2)) -> ACTIVE(X1)
  3. ACTIVE(filter(X1, X2)) -> ACTIVE(X2)
  4. ACTIVE(filter(X1, X2)) -> ACTIVE(X1)
  5. ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
  6. ACTIVE(tail(X)) -> ACTIVE(X)
  7. ACTIVE(head(X)) -> ACTIVE(X)
  8. ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
  9. ACTIVE(s(X)) -> ACTIVE(X)
  10. ACTIVE(from(X)) -> ACTIVE(X)
  11. ACTIVE(sieve(X)) -> ACTIVE(X)
and get the following Size-Change Graph(s):
{11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1} , {11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1} , {11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
from(x1) -> from(x1)
filter(x1, x2) -> filter(x1, x2)
sieve(x1) -> sieve(x1)
if(x1, x2, x3) -> if(x1, x2, x3)
divides(x1, x2) -> divides(x1, x2)
cons(x1, x2) -> cons(x1, x2)
tail(x1) -> tail(x1)
s(x1) -> s(x1)
head(x1) -> head(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
SCP
       →DP Problem 11
Size-Change Principle
       →DP Problem 12
Nar


Dependency Pairs:

PROPER(divides(X1, X2)) -> PROPER(X2)
PROPER(divides(X1, X2)) -> PROPER(X1)
PROPER(filter(X1, X2)) -> PROPER(X2)
PROPER(filter(X1, X2)) -> PROPER(X1)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(tail(X)) -> PROPER(X)
PROPER(head(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(from(X)) -> PROPER(X)
PROPER(sieve(X)) -> PROPER(X)


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





We number the DPs as follows:
  1. PROPER(divides(X1, X2)) -> PROPER(X2)
  2. PROPER(divides(X1, X2)) -> PROPER(X1)
  3. PROPER(filter(X1, X2)) -> PROPER(X2)
  4. PROPER(filter(X1, X2)) -> PROPER(X1)
  5. PROPER(if(X1, X2, X3)) -> PROPER(X3)
  6. PROPER(if(X1, X2, X3)) -> PROPER(X2)
  7. PROPER(if(X1, X2, X3)) -> PROPER(X1)
  8. PROPER(tail(X)) -> PROPER(X)
  9. PROPER(head(X)) -> PROPER(X)
  10. PROPER(cons(X1, X2)) -> PROPER(X2)
  11. PROPER(cons(X1, X2)) -> PROPER(X1)
  12. PROPER(s(X)) -> PROPER(X)
  13. PROPER(from(X)) -> PROPER(X)
  14. PROPER(sieve(X)) -> PROPER(X)
and get the following Size-Change Graph(s):
{14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1} , {14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1} , {14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
from(x1) -> from(x1)
filter(x1, x2) -> filter(x1, x2)
sieve(x1) -> sieve(x1)
if(x1, x2, x3) -> if(x1, x2, x3)
divides(x1, x2) -> divides(x1, x2)
cons(x1, x2) -> cons(x1, x2)
tail(x1) -> tail(x1)
s(x1) -> s(x1)
head(x1) -> head(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
SCP
       →DP Problem 11
SCP
       →DP Problem 12
Narrowing Transformation


Dependency Pairs:

TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

TOP(mark(X)) -> TOP(proper(X))
13 new Dependency Pairs are created:

TOP(mark(primes)) -> TOP(ok(primes))
TOP(mark(sieve(X''))) -> TOP(sieve(proper(X'')))
TOP(mark(from(X''))) -> TOP(from(proper(X'')))
TOP(mark(s(X''))) -> TOP(s(proper(X'')))
TOP(mark(0)) -> TOP(ok(0))
TOP(mark(cons(X1', X2'))) -> TOP(cons(proper(X1'), proper(X2')))
TOP(mark(head(X''))) -> TOP(head(proper(X'')))
TOP(mark(tail(X''))) -> TOP(tail(proper(X'')))
TOP(mark(if(X1', X2', X3'))) -> TOP(if(proper(X1'), proper(X2'), proper(X3')))
TOP(mark(true)) -> TOP(ok(true))
TOP(mark(false)) -> TOP(ok(false))
TOP(mark(filter(X1', X2'))) -> TOP(filter(proper(X1'), proper(X2')))
TOP(mark(divides(X1', X2'))) -> TOP(divides(proper(X1'), proper(X2')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
SCP
       →DP Problem 11
SCP
       →DP Problem 12
Nar
           →DP Problem 13
Narrowing Transformation


Dependency Pairs:

TOP(mark(divides(X1', X2'))) -> TOP(divides(proper(X1'), proper(X2')))
TOP(mark(filter(X1', X2'))) -> TOP(filter(proper(X1'), proper(X2')))
TOP(mark(false)) -> TOP(ok(false))
TOP(mark(true)) -> TOP(ok(true))
TOP(mark(if(X1', X2', X3'))) -> TOP(if(proper(X1'), proper(X2'), proper(X3')))
TOP(mark(tail(X''))) -> TOP(tail(proper(X'')))
TOP(mark(head(X''))) -> TOP(head(proper(X'')))
TOP(mark(cons(X1', X2'))) -> TOP(cons(proper(X1'), proper(X2')))
TOP(mark(0)) -> TOP(ok(0))
TOP(mark(s(X''))) -> TOP(s(proper(X'')))
TOP(mark(from(X''))) -> TOP(from(proper(X'')))
TOP(mark(sieve(X''))) -> TOP(sieve(proper(X'')))
TOP(mark(primes)) -> TOP(ok(primes))
TOP(ok(X)) -> TOP(active(X))


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

TOP(ok(X)) -> TOP(active(X))
19 new Dependency Pairs are created:

TOP(ok(primes)) -> TOP(mark(sieve(from(s(s(0))))))
TOP(ok(from(X''))) -> TOP(mark(cons(X'', from(s(X'')))))
TOP(ok(head(cons(X'', Y')))) -> TOP(mark(X''))
TOP(ok(tail(cons(X'', Y')))) -> TOP(mark(Y'))
TOP(ok(if(true, X'', Y'))) -> TOP(mark(X''))
TOP(ok(if(false, X'', Y'))) -> TOP(mark(Y'))
TOP(ok(filter(s(s(X'')), cons(Y', Z')))) -> TOP(mark(if(divides(s(s(X'')), Y'), filter(s(s(X'')), Z'), cons(Y', filter(X'', sieve(Y'))))))
TOP(ok(sieve(cons(X'', Y')))) -> TOP(mark(cons(X'', filter(X'', sieve(Y')))))
TOP(ok(sieve(X''))) -> TOP(sieve(active(X'')))
TOP(ok(from(X''))) -> TOP(from(active(X'')))
TOP(ok(s(X''))) -> TOP(s(active(X'')))
TOP(ok(cons(X1', X2'))) -> TOP(cons(active(X1'), X2'))
TOP(ok(head(X''))) -> TOP(head(active(X'')))
TOP(ok(tail(X''))) -> TOP(tail(active(X'')))
TOP(ok(if(X1', X2', X3'))) -> TOP(if(active(X1'), X2', X3'))
TOP(ok(filter(X1', X2'))) -> TOP(filter(active(X1'), X2'))
TOP(ok(filter(X1', X2'))) -> TOP(filter(X1', active(X2')))
TOP(ok(divides(X1', X2'))) -> TOP(divides(active(X1'), X2'))
TOP(ok(divides(X1', X2'))) -> TOP(divides(X1', active(X2')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
SCP
       →DP Problem 11
SCP
       →DP Problem 12
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 14
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

TOP(ok(divides(X1', X2'))) -> TOP(divides(X1', active(X2')))
TOP(ok(divides(X1', X2'))) -> TOP(divides(active(X1'), X2'))
TOP(ok(filter(X1', X2'))) -> TOP(filter(X1', active(X2')))
TOP(ok(filter(X1', X2'))) -> TOP(filter(active(X1'), X2'))
TOP(ok(if(X1', X2', X3'))) -> TOP(if(active(X1'), X2', X3'))
TOP(ok(tail(X''))) -> TOP(tail(active(X'')))
TOP(ok(head(X''))) -> TOP(head(active(X'')))
TOP(ok(cons(X1', X2'))) -> TOP(cons(active(X1'), X2'))
TOP(ok(s(X''))) -> TOP(s(active(X'')))
TOP(ok(from(X''))) -> TOP(from(active(X'')))
TOP(ok(sieve(X''))) -> TOP(sieve(active(X'')))
TOP(ok(sieve(cons(X'', Y')))) -> TOP(mark(cons(X'', filter(X'', sieve(Y')))))
TOP(ok(filter(s(s(X'')), cons(Y', Z')))) -> TOP(mark(if(divides(s(s(X'')), Y'), filter(s(s(X'')), Z'), cons(Y', filter(X'', sieve(Y'))))))
TOP(ok(if(false, X'', Y'))) -> TOP(mark(Y'))
TOP(ok(if(true, X'', Y'))) -> TOP(mark(X''))
TOP(ok(tail(cons(X'', Y')))) -> TOP(mark(Y'))
TOP(ok(head(cons(X'', Y')))) -> TOP(mark(X''))
TOP(ok(from(X''))) -> TOP(mark(cons(X'', from(s(X'')))))
TOP(mark(filter(X1', X2'))) -> TOP(filter(proper(X1'), proper(X2')))
TOP(mark(if(X1', X2', X3'))) -> TOP(if(proper(X1'), proper(X2'), proper(X3')))
TOP(mark(tail(X''))) -> TOP(tail(proper(X'')))
TOP(mark(head(X''))) -> TOP(head(proper(X'')))
TOP(mark(cons(X1', X2'))) -> TOP(cons(proper(X1'), proper(X2')))
TOP(mark(s(X''))) -> TOP(s(proper(X'')))
TOP(mark(from(X''))) -> TOP(from(proper(X'')))
TOP(mark(sieve(X''))) -> TOP(sieve(proper(X'')))
TOP(ok(primes)) -> TOP(mark(sieve(from(s(s(0))))))
TOP(mark(primes)) -> TOP(ok(primes))
TOP(mark(divides(X1', X2'))) -> TOP(divides(proper(X1'), proper(X2')))


Rules:


active(primes) -> mark(sieve(from(s(s(0)))))
active(from(X)) -> mark(cons(X, from(s(X))))
active(head(cons(X, Y))) -> mark(X)
active(tail(cons(X, Y))) -> mark(Y)
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(filter(s(s(X)), cons(Y, Z))) -> mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) -> mark(cons(X, filter(X, sieve(Y))))
active(sieve(X)) -> sieve(active(X))
active(from(X)) -> from(active(X))
active(s(X)) -> s(active(X))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(head(X)) -> head(active(X))
active(tail(X)) -> tail(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(filter(X1, X2)) -> filter(active(X1), X2)
active(filter(X1, X2)) -> filter(X1, active(X2))
active(divides(X1, X2)) -> divides(active(X1), X2)
active(divides(X1, X2)) -> divides(X1, active(X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
from(mark(X)) -> mark(from(X))
from(ok(X)) -> ok(from(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
head(mark(X)) -> mark(head(X))
head(ok(X)) -> ok(head(X))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
filter(mark(X1), X2) -> mark(filter(X1, X2))
filter(X1, mark(X2)) -> mark(filter(X1, X2))
filter(ok(X1), ok(X2)) -> ok(filter(X1, X2))
divides(mark(X1), X2) -> mark(divides(X1, X2))
divides(X1, mark(X2)) -> mark(divides(X1, X2))
divides(ok(X1), ok(X2)) -> ok(divides(X1, X2))
proper(primes) -> ok(primes)
proper(sieve(X)) -> sieve(proper(X))
proper(from(X)) -> from(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(head(X)) -> head(proper(X))
proper(tail(X)) -> tail(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(filter(X1, X2)) -> filter(proper(X1), proper(X2))
proper(divides(X1, X2)) -> divides(proper(X1), proper(X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))




The Proof could not be continued due to a Timeout.
Termination of R could not be shown.
Duration:
1:00 minutes