Term Rewriting System R:
[X, Y, M, N]
filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) -> cons(X, filter(Y, N, M))
sieve(cons(0, Y)) -> cons(0, sieve(Y))
sieve(cons(s(N), Y)) -> cons(s(N), sieve(filter(Y, N, N)))
nats(N) -> cons(N, nats(s(N)))
zprimes -> sieve(nats(s(s(0))))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

FILTER(cons(X, Y), 0, M) -> FILTER(Y, M, M)
FILTER(cons(X, Y), s(N), M) -> FILTER(Y, N, M)
SIEVE(cons(0, Y)) -> SIEVE(Y)
SIEVE(cons(s(N), Y)) -> SIEVE(filter(Y, N, N))
SIEVE(cons(s(N), Y)) -> FILTER(Y, N, N)
NATS(N) -> NATS(s(N))
ZPRIMES -> SIEVE(nats(s(s(0))))
ZPRIMES -> NATS(s(s(0)))

Furthermore, R contains three SCCs.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering
       →DP Problem 2
Inst
       →DP Problem 3
Remaining


Dependency Pairs:

FILTER(cons(X, Y), s(N), M) -> FILTER(Y, N, M)
FILTER(cons(X, Y), 0, M) -> FILTER(Y, M, M)


Rules:


filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) -> cons(X, filter(Y, N, M))
sieve(cons(0, Y)) -> cons(0, sieve(Y))
sieve(cons(s(N), Y)) -> cons(s(N), sieve(filter(Y, N, N)))
nats(N) -> cons(N, nats(s(N)))
zprimes -> sieve(nats(s(s(0))))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

FILTER(cons(X, Y), s(N), M) -> FILTER(Y, N, M)
FILTER(cons(X, Y), 0, M) -> FILTER(Y, M, M)


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
FILTER(x1, x2, x3) -> FILTER(x1, x2, x3)
cons(x1, x2) -> cons(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 4
Dependency Graph
       →DP Problem 2
Inst
       →DP Problem 3
Remaining


Dependency Pair:


Rules:


filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) -> cons(X, filter(Y, N, M))
sieve(cons(0, Y)) -> cons(0, sieve(Y))
sieve(cons(s(N), Y)) -> cons(s(N), sieve(filter(Y, N, N)))
nats(N) -> cons(N, nats(s(N)))
zprimes -> sieve(nats(s(s(0))))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Instantiation Transformation
       →DP Problem 3
Remaining


Dependency Pair:

NATS(N) -> NATS(s(N))


Rules:


filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) -> cons(X, filter(Y, N, M))
sieve(cons(0, Y)) -> cons(0, sieve(Y))
sieve(cons(s(N), Y)) -> cons(s(N), sieve(filter(Y, N, N)))
nats(N) -> cons(N, nats(s(N)))
zprimes -> sieve(nats(s(s(0))))


Strategy:

innermost




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

NATS(N) -> NATS(s(N))
one new Dependency Pair is created:

NATS(s(N'')) -> NATS(s(s(N'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Inst
       →DP Problem 3
Remaining Obligation(s)




The following remains to be proven:


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Inst
       →DP Problem 3
Remaining Obligation(s)




The following remains to be proven:

Innermost Termination of R could not be shown.
Duration:
0:00 minutes