Term Rewriting System R:
[X, Y, M, N, X1, X2, X3]
active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

ACTIVE(filter(cons(X, Y), 0, M)) -> CONS(0, filter(Y, M, M))
ACTIVE(filter(cons(X, Y), 0, M)) -> FILTER(Y, M, M)
ACTIVE(filter(cons(X, Y), s(N), M)) -> CONS(X, filter(Y, N, M))
ACTIVE(filter(cons(X, Y), s(N), M)) -> FILTER(Y, N, M)
ACTIVE(sieve(cons(0, Y))) -> CONS(0, sieve(Y))
ACTIVE(sieve(cons(0, Y))) -> SIEVE(Y)
ACTIVE(sieve(cons(s(N), Y))) -> CONS(s(N), sieve(filter(Y, N, N)))
ACTIVE(sieve(cons(s(N), Y))) -> SIEVE(filter(Y, N, N))
ACTIVE(sieve(cons(s(N), Y))) -> FILTER(Y, N, N)
ACTIVE(nats(N)) -> CONS(N, nats(s(N)))
ACTIVE(nats(N)) -> NATS(s(N))
ACTIVE(nats(N)) -> S(N)
ACTIVE(zprimes) -> SIEVE(nats(s(s(0))))
ACTIVE(zprimes) -> NATS(s(s(0)))
ACTIVE(zprimes) -> S(s(0))
ACTIVE(zprimes) -> S(0)
ACTIVE(filter(X1, X2, X3)) -> FILTER(active(X1), X2, X3)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(filter(X1, X2, X3)) -> FILTER(X1, active(X2), X3)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X2)
ACTIVE(filter(X1, X2, X3)) -> FILTER(X1, X2, active(X3))
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X3)
ACTIVE(cons(X1, X2)) -> CONS(active(X1), X2)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> S(active(X))
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> SIEVE(active(X))
ACTIVE(sieve(X)) -> ACTIVE(X)
ACTIVE(nats(X)) -> NATS(active(X))
ACTIVE(nats(X)) -> ACTIVE(X)
FILTER(mark(X1), X2, X3) -> FILTER(X1, X2, X3)
FILTER(X1, mark(X2), X3) -> FILTER(X1, X2, X3)
FILTER(X1, X2, mark(X3)) -> FILTER(X1, X2, X3)
FILTER(ok(X1), ok(X2), ok(X3)) -> FILTER(X1, X2, X3)
CONS(mark(X1), X2) -> CONS(X1, X2)
CONS(ok(X1), ok(X2)) -> CONS(X1, X2)
S(mark(X)) -> S(X)
S(ok(X)) -> S(X)
SIEVE(mark(X)) -> SIEVE(X)
SIEVE(ok(X)) -> SIEVE(X)
NATS(mark(X)) -> NATS(X)
NATS(ok(X)) -> NATS(X)
PROPER(filter(X1, X2, X3)) -> FILTER(proper(X1), proper(X2), proper(X3))
PROPER(filter(X1, X2, X3)) -> PROPER(X1)
PROPER(filter(X1, X2, X3)) -> PROPER(X2)
PROPER(filter(X1, X2, X3)) -> PROPER(X3)
PROPER(cons(X1, X2)) -> CONS(proper(X1), proper(X2))
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(s(X)) -> S(proper(X))
PROPER(s(X)) -> PROPER(X)
PROPER(sieve(X)) -> SIEVE(proper(X))
PROPER(sieve(X)) -> PROPER(X)
PROPER(nats(X)) -> NATS(proper(X))
PROPER(nats(X)) -> PROPER(X)
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 eight SCCs.


   R
DPs
       →DP Problem 1
Usable Rules (Innermost)
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules


Dependency Pairs:

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


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




As we are in the innermost case, we can delete all 34 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
           →DP Problem 9
Size-Change Principle
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




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

which lead(s) to this/these maximal multigraph(s):
{1, 2, 3, 4} , {1, 2, 3, 4}
1>1
2=2
3=3
{1, 2, 3, 4} , {1, 2, 3, 4}
1=1
2>2
3=3
{1, 2, 3, 4} , {1, 2, 3, 4}
1=1
2=2
3>3
{1, 2, 3, 4} , {1, 2, 3, 4}
1>1
2>2
3>3
{1, 2, 3, 4} , {1, 2, 3, 4}
1=1
2>2
3>3
{1, 2, 3, 4} , {1, 2, 3, 4}
1>1
2=2
3>3
{1, 2, 3, 4} , {1, 2, 3, 4}
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
UsableRules
       →DP Problem 2
Usable Rules (Innermost)
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules


Dependency Pairs:

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


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




As we are in the innermost case, we can delete all 34 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
           →DP Problem 10
Size-Change Principle
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




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

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {1, 2}
1>1
2=2
{1, 2} , {1, 2}
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
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
Usable Rules (Innermost)
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules


Dependency Pairs:

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


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




As we are in the innermost case, we can delete all 34 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
           →DP Problem 11
Size-Change Principle
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




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):
{1, 2} , {1, 2}
1>1

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {1, 2}
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
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
Usable Rules (Innermost)
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules


Dependency Pairs:

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


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




As we are in the innermost case, we can delete all 34 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
           →DP Problem 12
Size-Change Principle
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




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):
{1, 2} , {1, 2}
1>1

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {1, 2}
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
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
Usable Rules (Innermost)
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules


Dependency Pairs:

NATS(ok(X)) -> NATS(X)
NATS(mark(X)) -> NATS(X)


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




As we are in the innermost case, we can delete all 34 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
           →DP Problem 13
Size-Change Principle
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules


Dependency Pairs:

NATS(ok(X)) -> NATS(X)
NATS(mark(X)) -> NATS(X)


Rule:

none


Strategy:

innermost




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

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {1, 2}
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
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
Usable Rules (Innermost)
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules


Dependency Pairs:

ACTIVE(nats(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> ACTIVE(X)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X3)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X2)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X1)


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




As we are in the innermost case, we can delete all 34 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
           →DP Problem 14
Size-Change Principle
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules


Dependency Pairs:

ACTIVE(nats(X)) -> ACTIVE(X)
ACTIVE(sieve(X)) -> ACTIVE(X)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X3)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X2)
ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X1)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. ACTIVE(nats(X)) -> ACTIVE(X)
  2. ACTIVE(sieve(X)) -> ACTIVE(X)
  3. ACTIVE(s(X)) -> ACTIVE(X)
  4. ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
  5. ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X3)
  6. ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X2)
  7. ACTIVE(filter(X1, X2, X3)) -> ACTIVE(X1)
and get the following Size-Change Graph(s):
{1, 2, 3, 4, 5, 6, 7} , {1, 2, 3, 4, 5, 6, 7}
1>1

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

DP: empty set
Oriented Rules: none

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

with Argument Filtering System:
filter(x1, x2, x3) -> filter(x1, x2, x3)
sieve(x1) -> sieve(x1)
cons(x1, x2) -> cons(x1, x2)
nats(x1) -> nats(x1)
s(x1) -> s(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
Usable Rules (Innermost)
       →DP Problem 8
UsableRules


Dependency Pairs:

PROPER(nats(X)) -> PROPER(X)
PROPER(sieve(X)) -> PROPER(X)
PROPER(s(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(filter(X1, X2, X3)) -> PROPER(X3)
PROPER(filter(X1, X2, X3)) -> PROPER(X2)
PROPER(filter(X1, X2, X3)) -> PROPER(X1)


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




As we are in the innermost case, we can delete all 34 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
           →DP Problem 15
Size-Change Principle
       →DP Problem 8
UsableRules


Dependency Pairs:

PROPER(nats(X)) -> PROPER(X)
PROPER(sieve(X)) -> PROPER(X)
PROPER(s(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(filter(X1, X2, X3)) -> PROPER(X3)
PROPER(filter(X1, X2, X3)) -> PROPER(X2)
PROPER(filter(X1, X2, X3)) -> PROPER(X1)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. PROPER(nats(X)) -> PROPER(X)
  2. PROPER(sieve(X)) -> PROPER(X)
  3. PROPER(s(X)) -> PROPER(X)
  4. PROPER(cons(X1, X2)) -> PROPER(X2)
  5. PROPER(cons(X1, X2)) -> PROPER(X1)
  6. PROPER(filter(X1, X2, X3)) -> PROPER(X3)
  7. PROPER(filter(X1, X2, X3)) -> PROPER(X2)
  8. PROPER(filter(X1, X2, X3)) -> PROPER(X1)
and get the following Size-Change Graph(s):
{1, 2, 3, 4, 5, 6, 7, 8} , {1, 2, 3, 4, 5, 6, 7, 8}
1>1

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

DP: empty set
Oriented Rules: none

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

with Argument Filtering System:
filter(x1, x2, x3) -> filter(x1, x2, x3)
sieve(x1) -> sieve(x1)
cons(x1, x2) -> cons(x1, x2)
nats(x1) -> nats(x1)
s(x1) -> s(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
Usable Rules (Innermost)


Dependency Pairs:

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


Rules:


active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(cons(X1, X2)) -> cons(active(X1), X2)
active(s(X)) -> s(active(X))
active(sieve(X)) -> sieve(active(X))
active(nats(X)) -> nats(active(X))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(sieve(X)) -> sieve(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(zprimes) -> ok(zprimes)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




As we are in the innermost case, we can delete all 2 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
           →DP Problem 16
Argument Filtering and Ordering


Dependency Pairs:

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


Rules:


active(cons(X1, X2)) -> cons(active(X1), X2)
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(sieve(X)) -> sieve(active(X))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(nats(X)) -> nats(active(X))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(s(X)) -> s(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
s(ok(X)) -> ok(s(X))
s(mark(X)) -> mark(s(X))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(sieve(X)) -> sieve(proper(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(zprimes) -> ok(zprimes)
proper(s(X)) -> s(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(0) -> ok(0)


Strategy:

innermost




The following dependency pair can be strictly oriented:

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


The following usable rules w.r.t. the AFS can be oriented:

active(cons(X1, X2)) -> cons(active(X1), X2)
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(sieve(X)) -> sieve(active(X))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(nats(X)) -> nats(active(X))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(s(X)) -> s(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
s(ok(X)) -> ok(s(X))
s(mark(X)) -> mark(s(X))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(sieve(X)) -> sieve(proper(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(zprimes) -> ok(zprimes)
proper(s(X)) -> s(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(0) -> ok(0)


Used ordering: Lexicographic Path Order with Precedence:
filter > mark
zprimes > sieve > mark
zprimes > 0
zprimes > nats > mark

resulting in one new DP problem.
Used Argument Filtering System:
TOP(x1) -> x1
ok(x1) -> x1
active(x1) -> x1
cons(x1, x2) -> x1
sieve(x1) -> sieve(x1)
mark(x1) -> mark(x1)
s(x1) -> x1
filter(x1, x2, x3) -> filter(x1, x2, x3)
nats(x1) -> nats(x1)
proper(x1) -> x1


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
           →DP Problem 16
AFS
             ...
               →DP Problem 17
Usable Rules (Innermost)


Dependency Pair:

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


Rules:


active(cons(X1, X2)) -> cons(active(X1), X2)
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(sieve(X)) -> sieve(active(X))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(nats(X)) -> nats(active(X))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(s(X)) -> s(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
s(ok(X)) -> ok(s(X))
s(mark(X)) -> mark(s(X))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(sieve(X)) -> sieve(proper(X))
proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3))
proper(zprimes) -> ok(zprimes)
proper(s(X)) -> s(proper(X))
proper(nats(X)) -> nats(proper(X))
proper(0) -> ok(0)


Strategy:

innermost




As we are in the innermost case, we can delete all 7 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
           →DP Problem 16
AFS
             ...
               →DP Problem 18
Negative Polynomial Order


Dependency Pair:

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


Rules:


active(cons(X1, X2)) -> cons(active(X1), X2)
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(sieve(X)) -> sieve(active(X))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(nats(X)) -> nats(active(X))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(s(X)) -> s(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
s(ok(X)) -> ok(s(X))
s(mark(X)) -> mark(s(X))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))


Strategy:

innermost




The following Dependency Pair can be strictly oriented using the given order.

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


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

active(cons(X1, X2)) -> cons(active(X1), X2)
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(sieve(X)) -> sieve(active(X))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(nats(X)) -> nats(active(X))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(s(X)) -> s(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
s(ok(X)) -> ok(s(X))
s(mark(X)) -> mark(s(X))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))


Used ordering:
Polynomial Order with Interpretation:

POL( TOP(x1) ) = x1

POL( ok(x1) ) = x1 + 1

POL( active(x1) ) = x1

POL( cons(x1, x2) ) = x2

POL( sieve(x1) ) = x1

POL( mark(x1) ) = 0

POL( filter(x1, ..., x3) ) = x3

POL( nats(x1) ) = x1

POL( s(x1) ) = x1


This results in one new DP problem.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
       →DP Problem 5
UsableRules
       →DP Problem 6
UsableRules
       →DP Problem 7
UsableRules
       →DP Problem 8
UsableRules
           →DP Problem 16
AFS
             ...
               →DP Problem 19
Dependency Graph


Dependency Pair:


Rules:


active(cons(X1, X2)) -> cons(active(X1), X2)
active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N))))
active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3))
active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3)
active(sieve(X)) -> sieve(active(X))
active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M)))
active(nats(N)) -> mark(cons(N, nats(s(N))))
active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M)))
active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3)
active(nats(X)) -> nats(active(X))
active(zprimes) -> mark(sieve(nats(s(s(0)))))
active(s(X)) -> s(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
sieve(mark(X)) -> mark(sieve(X))
sieve(ok(X)) -> ok(sieve(X))
s(ok(X)) -> ok(s(X))
s(mark(X)) -> mark(s(X))
filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3))
filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3))
nats(mark(X)) -> mark(nats(X))
nats(ok(X)) -> ok(nats(X))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

Innermost Termination of R successfully shown.
Duration:
0:15 minutes