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

Termination of R to be shown.



   R
Removing Redundant Rules



Removing the following rules from R which fullfill a polynomial ordering:

filter(cons(X), 0, M) -> cons(0)
filter(cons(X), s(N), M) -> cons(X)

where the Polynomial interpretation:
  POL(filter(x1, x2, x3))=  1 + x1 + x2 + x3  
  POL(sieve(x1))=  x1  
  POL(0)=  0  
  POL(cons(x1))=  x1  
  POL(nats(x1))=  x1  
  POL(s(x1))=  x1  
  POL(zprimes)=  0  
was used.

Not all Rules of R can be deleted, so we still have to regard a part of R.


   R
RRRPolo
       →TRS2
Removing Redundant Rules



Removing the following rules from R which fullfill a polynomial ordering:

sieve(cons(0)) -> cons(0)
sieve(cons(s(N))) -> cons(s(N))

where the Polynomial interpretation:
  POL(sieve(x1))=  2·x1  
  POL(0)=  0  
  POL(cons(x1))=  1 + x1  
  POL(nats(x1))=  1 + x1  
  POL(s(x1))=  x1  
  POL(zprimes)=  2  
was used.

Not all Rules of R can be deleted, so we still have to regard a part of R.


   R
RRRPolo
       →TRS2
RRRPolo
           →TRS3
Removing Redundant Rules



Removing the following rules from R which fullfill a polynomial ordering:

zprimes -> sieve(nats(s(s(0))))

where the Polynomial interpretation:
  POL(sieve(x1))=  x1  
  POL(0)=  0  
  POL(cons(x1))=  x1  
  POL(nats(x1))=  x1  
  POL(s(x1))=  x1  
  POL(zprimes)=  1  
was used.

Not all Rules of R can be deleted, so we still have to regard a part of R.


   R
RRRPolo
       →TRS2
RRRPolo
           →TRS3
RRRPolo
             ...
               →TRS4
Removing Redundant Rules



Removing the following rules from R which fullfill a polynomial ordering:

nats(N) -> cons(N)

where the Polynomial interpretation:
  POL(cons(x1))=  x1  
  POL(nats(x1))=  1 + x1  
was used.

All Rules of R can be deleted.


   R
RRRPolo
       →TRS2
RRRPolo
           →TRS3
RRRPolo
             ...
               →TRS5
Overlay and local confluence Check



The TRS is overlay and locally confluent (all critical pairs are trivially joinable).Hence, we can switch to innermost.


   R
RRRPolo
       →TRS2
RRRPolo
           →TRS3
RRRPolo
             ...
               →TRS6
Dependency Pair Analysis



R contains no Dependency Pairs and therefore no SCCs.

Termination of R successfully shown.
Duration:
0:00 minutes