R
↳Dependency Pair Analysis
PRIMES -> SIEVE(from(s(s(0))))
PRIMES -> FROM(s(s(0)))
FROM(X) -> FROM(s(X))
FILTER(s(s(X)), cons(Y, Z)) -> IF(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(s(s(X)), Z)
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(X, sieve(Y))
FILTER(s(s(X)), cons(Y, Z)) -> SIEVE(Y)
SIEVE(cons(X, Y)) -> FILTER(X, sieve(Y))
SIEVE(cons(X, Y)) -> SIEVE(Y)
R
↳DPs
→DP Problem 1
↳Remaining Obligation(s)
→DP Problem 2
↳Remaining Obligation(s)
SIEVE(cons(X, Y)) -> SIEVE(Y)
FILTER(s(s(X)), cons(Y, Z)) -> SIEVE(Y)
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(X, sieve(Y))
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(s(s(X)), Z)
SIEVE(cons(X, Y)) -> FILTER(X, sieve(Y))
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, from(s(X)))
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> Y
if(true, X, Y) -> X
if(false, X, Y) -> Y
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
sieve(cons(X, Y)) -> cons(X, filter(X, sieve(Y)))
FROM(X) -> FROM(s(X))
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, from(s(X)))
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> Y
if(true, X, Y) -> X
if(false, X, Y) -> Y
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
sieve(cons(X, Y)) -> cons(X, filter(X, sieve(Y)))
R
↳DPs
→DP Problem 1
↳Remaining Obligation(s)
→DP Problem 2
↳Remaining Obligation(s)
SIEVE(cons(X, Y)) -> SIEVE(Y)
FILTER(s(s(X)), cons(Y, Z)) -> SIEVE(Y)
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(X, sieve(Y))
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(s(s(X)), Z)
SIEVE(cons(X, Y)) -> FILTER(X, sieve(Y))
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, from(s(X)))
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> Y
if(true, X, Y) -> X
if(false, X, Y) -> Y
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
sieve(cons(X, Y)) -> cons(X, filter(X, sieve(Y)))
FROM(X) -> FROM(s(X))
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, from(s(X)))
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> Y
if(true, X, Y) -> X
if(false, X, Y) -> Y
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
sieve(cons(X, Y)) -> cons(X, filter(X, sieve(Y)))