MAYBE Problem: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Proof: DP Processor: DPs: active#(primes()) -> s#(0()) active#(primes()) -> s#(s(0())) active#(primes()) -> from#(s(s(0()))) active#(primes()) -> sieve#(from(s(s(0())))) active#(from(X)) -> s#(X) active#(from(X)) -> from#(s(X)) active#(from(X)) -> cons#(X,from(s(X))) active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) 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#(sieve(cons(X,Y))) -> sieve#(Y) active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) active#(sieve(X)) -> active#(X) active#(sieve(X)) -> sieve#(active(X)) active#(from(X)) -> active#(X) active#(from(X)) -> from#(active(X)) active#(s(X)) -> active#(X) active#(s(X)) -> s#(active(X)) active#(cons(X1,X2)) -> active#(X1) active#(cons(X1,X2)) -> cons#(active(X1),X2) active#(head(X)) -> active#(X) active#(head(X)) -> head#(active(X)) active#(tail(X)) -> active#(X) active#(tail(X)) -> tail#(active(X)) active#(if(X1,X2,X3)) -> active#(X1) active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) active#(filter(X1,X2)) -> active#(X1) active#(filter(X1,X2)) -> filter#(active(X1),X2) active#(filter(X1,X2)) -> active#(X2) active#(filter(X1,X2)) -> filter#(X1,active(X2)) active#(divides(X1,X2)) -> active#(X1) active#(divides(X1,X2)) -> divides#(active(X1),X2) active#(divides(X1,X2)) -> active#(X2) active#(divides(X1,X2)) -> divides#(X1,active(X2)) sieve#(mark(X)) -> sieve#(X) from#(mark(X)) -> from#(X) s#(mark(X)) -> s#(X) cons#(mark(X1),X2) -> cons#(X1,X2) head#(mark(X)) -> head#(X) tail#(mark(X)) -> tail#(X) if#(mark(X1),X2,X3) -> if#(X1,X2,X3) filter#(mark(X1),X2) -> filter#(X1,X2) filter#(X1,mark(X2)) -> filter#(X1,X2) divides#(mark(X1),X2) -> divides#(X1,X2) divides#(X1,mark(X2)) -> divides#(X1,X2) proper#(sieve(X)) -> proper#(X) proper#(sieve(X)) -> sieve#(proper(X)) proper#(from(X)) -> proper#(X) proper#(from(X)) -> from#(proper(X)) proper#(s(X)) -> proper#(X) proper#(s(X)) -> s#(proper(X)) proper#(cons(X1,X2)) -> proper#(X2) proper#(cons(X1,X2)) -> proper#(X1) proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(head(X)) -> proper#(X) proper#(head(X)) -> head#(proper(X)) proper#(tail(X)) -> proper#(X) proper#(tail(X)) -> tail#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X3) proper#(if(X1,X2,X3)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X1) proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(filter(X1,X2)) -> proper#(X2) proper#(filter(X1,X2)) -> proper#(X1) proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(divides(X1,X2)) -> proper#(X2) proper#(divides(X1,X2)) -> proper#(X1) proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) sieve#(ok(X)) -> sieve#(X) from#(ok(X)) -> from#(X) s#(ok(X)) -> s#(X) cons#(ok(X1),ok(X2)) -> cons#(X1,X2) head#(ok(X)) -> head#(X) tail#(ok(X)) -> tail#(X) if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) filter#(ok(X1),ok(X2)) -> filter#(X1,X2) divides#(ok(X1),ok(X2)) -> divides#(X1,X2) top#(mark(X)) -> proper#(X) top#(mark(X)) -> top#(proper(X)) top#(ok(X)) -> active#(X) top#(ok(X)) -> top#(active(X)) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) EDG Processor: DPs: active#(primes()) -> s#(0()) active#(primes()) -> s#(s(0())) active#(primes()) -> from#(s(s(0()))) active#(primes()) -> sieve#(from(s(s(0())))) active#(from(X)) -> s#(X) active#(from(X)) -> from#(s(X)) active#(from(X)) -> cons#(X,from(s(X))) active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) 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#(sieve(cons(X,Y))) -> sieve#(Y) active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) active#(sieve(X)) -> active#(X) active#(sieve(X)) -> sieve#(active(X)) active#(from(X)) -> active#(X) active#(from(X)) -> from#(active(X)) active#(s(X)) -> active#(X) active#(s(X)) -> s#(active(X)) active#(cons(X1,X2)) -> active#(X1) active#(cons(X1,X2)) -> cons#(active(X1),X2) active#(head(X)) -> active#(X) active#(head(X)) -> head#(active(X)) active#(tail(X)) -> active#(X) active#(tail(X)) -> tail#(active(X)) active#(if(X1,X2,X3)) -> active#(X1) active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) active#(filter(X1,X2)) -> active#(X1) active#(filter(X1,X2)) -> filter#(active(X1),X2) active#(filter(X1,X2)) -> active#(X2) active#(filter(X1,X2)) -> filter#(X1,active(X2)) active#(divides(X1,X2)) -> active#(X1) active#(divides(X1,X2)) -> divides#(active(X1),X2) active#(divides(X1,X2)) -> active#(X2) active#(divides(X1,X2)) -> divides#(X1,active(X2)) sieve#(mark(X)) -> sieve#(X) from#(mark(X)) -> from#(X) s#(mark(X)) -> s#(X) cons#(mark(X1),X2) -> cons#(X1,X2) head#(mark(X)) -> head#(X) tail#(mark(X)) -> tail#(X) if#(mark(X1),X2,X3) -> if#(X1,X2,X3) filter#(mark(X1),X2) -> filter#(X1,X2) filter#(X1,mark(X2)) -> filter#(X1,X2) divides#(mark(X1),X2) -> divides#(X1,X2) divides#(X1,mark(X2)) -> divides#(X1,X2) proper#(sieve(X)) -> proper#(X) proper#(sieve(X)) -> sieve#(proper(X)) proper#(from(X)) -> proper#(X) proper#(from(X)) -> from#(proper(X)) proper#(s(X)) -> proper#(X) proper#(s(X)) -> s#(proper(X)) proper#(cons(X1,X2)) -> proper#(X2) proper#(cons(X1,X2)) -> proper#(X1) proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(head(X)) -> proper#(X) proper#(head(X)) -> head#(proper(X)) proper#(tail(X)) -> proper#(X) proper#(tail(X)) -> tail#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X3) proper#(if(X1,X2,X3)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X1) proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(filter(X1,X2)) -> proper#(X2) proper#(filter(X1,X2)) -> proper#(X1) proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(divides(X1,X2)) -> proper#(X2) proper#(divides(X1,X2)) -> proper#(X1) proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) sieve#(ok(X)) -> sieve#(X) from#(ok(X)) -> from#(X) s#(ok(X)) -> s#(X) cons#(ok(X1),ok(X2)) -> cons#(X1,X2) head#(ok(X)) -> head#(X) tail#(ok(X)) -> tail#(X) if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) filter#(ok(X1),ok(X2)) -> filter#(X1,X2) divides#(ok(X1),ok(X2)) -> divides#(X1,X2) top#(mark(X)) -> proper#(X) top#(mark(X)) -> top#(proper(X)) top#(ok(X)) -> active#(X) top#(ok(X)) -> top#(active(X)) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) graph: top#(ok(X)) -> top#(active(X)) -> top#(mark(X)) -> proper#(X) top#(ok(X)) -> top#(active(X)) -> top#(mark(X)) -> top#(proper(X)) top#(ok(X)) -> top#(active(X)) -> top#(ok(X)) -> active#(X) top#(ok(X)) -> top#(active(X)) -> top#(ok(X)) -> top#(active(X)) top#(ok(X)) -> active#(X) -> active#(primes()) -> s#(0()) top#(ok(X)) -> active#(X) -> active#(primes()) -> s#(s(0())) top#(ok(X)) -> active#(X) -> active#(primes()) -> from#(s(s(0()))) top#(ok(X)) -> active#(X) -> active#(primes()) -> sieve#(from(s(s(0())))) top#(ok(X)) -> active#(X) -> active#(from(X)) -> s#(X) top#(ok(X)) -> active#(X) -> active#(from(X)) -> from#(s(X)) top#(ok(X)) -> active#(X) -> active#(from(X)) -> cons#(X,from(s(X))) top#(ok(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) top#(ok(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) top#(ok(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) top#(ok(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) top#(ok(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) top#(ok(X)) -> active#(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)))) top#(ok(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> sieve#(Y) top#(ok(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) top#(ok(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) top#(ok(X)) -> active#(X) -> active#(sieve(X)) -> active#(X) top#(ok(X)) -> active#(X) -> active#(sieve(X)) -> sieve#(active(X)) top#(ok(X)) -> active#(X) -> active#(from(X)) -> active#(X) top#(ok(X)) -> active#(X) -> active#(from(X)) -> from#(active(X)) top#(ok(X)) -> active#(X) -> active#(s(X)) -> active#(X) top#(ok(X)) -> active#(X) -> active#(s(X)) -> s#(active(X)) top#(ok(X)) -> active#(X) -> active#(cons(X1,X2)) -> active#(X1) top#(ok(X)) -> active#(X) -> active#(cons(X1,X2)) -> cons#(active(X1),X2) top#(ok(X)) -> active#(X) -> active#(head(X)) -> active#(X) top#(ok(X)) -> active#(X) -> active#(head(X)) -> head#(active(X)) top#(ok(X)) -> active#(X) -> active#(tail(X)) -> active#(X) top#(ok(X)) -> active#(X) -> active#(tail(X)) -> tail#(active(X)) top#(ok(X)) -> active#(X) -> active#(if(X1,X2,X3)) -> active#(X1) top#(ok(X)) -> active#(X) -> active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) top#(ok(X)) -> active#(X) -> active#(filter(X1,X2)) -> active#(X1) top#(ok(X)) -> active#(X) -> active#(filter(X1,X2)) -> filter#(active(X1),X2) top#(ok(X)) -> active#(X) -> active#(filter(X1,X2)) -> active#(X2) top#(ok(X)) -> active#(X) -> active#(filter(X1,X2)) -> filter#(X1,active(X2)) top#(ok(X)) -> active#(X) -> active#(divides(X1,X2)) -> active#(X1) top#(ok(X)) -> active#(X) -> active#(divides(X1,X2)) -> divides#(active(X1),X2) top#(ok(X)) -> active#(X) -> active#(divides(X1,X2)) -> active#(X2) top#(ok(X)) -> active#(X) -> active#(divides(X1,X2)) -> divides#(X1,active(X2)) top#(mark(X)) -> top#(proper(X)) -> top#(mark(X)) -> proper#(X) top#(mark(X)) -> top#(proper(X)) -> top#(mark(X)) -> top#(proper(X)) top#(mark(X)) -> top#(proper(X)) -> top#(ok(X)) -> active#(X) top#(mark(X)) -> top#(proper(X)) -> top#(ok(X)) -> top#(active(X)) top#(mark(X)) -> proper#(X) -> proper#(sieve(X)) -> proper#(X) top#(mark(X)) -> proper#(X) -> proper#(sieve(X)) -> sieve#(proper(X)) top#(mark(X)) -> proper#(X) -> proper#(from(X)) -> proper#(X) top#(mark(X)) -> proper#(X) -> proper#(from(X)) -> from#(proper(X)) top#(mark(X)) -> proper#(X) -> proper#(s(X)) -> proper#(X) top#(mark(X)) -> proper#(X) -> proper#(s(X)) -> s#(proper(X)) top#(mark(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> proper#(X2) top#(mark(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> proper#(X1) top#(mark(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) top#(mark(X)) -> proper#(X) -> proper#(head(X)) -> proper#(X) top#(mark(X)) -> proper#(X) -> proper#(head(X)) -> head#(proper(X)) top#(mark(X)) -> proper#(X) -> proper#(tail(X)) -> proper#(X) top#(mark(X)) -> proper#(X) -> proper#(tail(X)) -> tail#(proper(X)) top#(mark(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X3) top#(mark(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X2) top#(mark(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X1) top#(mark(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) top#(mark(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> proper#(X2) top#(mark(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> proper#(X1) top#(mark(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) top#(mark(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> proper#(X2) top#(mark(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> proper#(X1) top#(mark(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(sieve(X)) -> proper#(X) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(from(X)) -> proper#(X) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(from(X)) -> from#(proper(X)) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(s(X)) -> proper#(X) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(s(X)) -> s#(proper(X)) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(head(X)) -> proper#(X) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(head(X)) -> head#(proper(X)) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(tail(X)) -> proper#(X) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(tail(X)) -> tail#(proper(X)) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(divides(X1,X2)) -> proper#(X2) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(sieve(X)) -> proper#(X) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(from(X)) -> proper#(X) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(from(X)) -> from#(proper(X)) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(s(X)) -> proper#(X) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(s(X)) -> s#(proper(X)) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(head(X)) -> proper#(X) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(head(X)) -> head#(proper(X)) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(tail(X)) -> proper#(X) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(tail(X)) -> tail#(proper(X)) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(divides(X1,X2)) -> proper#(X1) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) -> divides#(mark(X1),X2) -> divides#(X1,X2) proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) -> divides#(X1,mark(X2)) -> divides#(X1,X2) proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) -> divides#(ok(X1),ok(X2)) -> divides#(X1,X2) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(sieve(X)) -> proper#(X) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(from(X)) -> proper#(X) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(from(X)) -> from#(proper(X)) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(s(X)) -> proper#(X) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(s(X)) -> s#(proper(X)) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(head(X)) -> proper#(X) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(head(X)) -> head#(proper(X)) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(tail(X)) -> proper#(X) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(tail(X)) -> tail#(proper(X)) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(filter(X1,X2)) -> proper#(X2) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(sieve(X)) -> proper#(X) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(from(X)) -> proper#(X) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(from(X)) -> from#(proper(X)) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(s(X)) -> proper#(X) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(s(X)) -> s#(proper(X)) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(head(X)) -> proper#(X) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(head(X)) -> head#(proper(X)) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(tail(X)) -> proper#(X) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(tail(X)) -> tail#(proper(X)) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(filter(X1,X2)) -> proper#(X1) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) -> filter#(mark(X1),X2) -> filter#(X1,X2) proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) -> filter#(X1,mark(X2)) -> filter#(X1,X2) proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) -> filter#(ok(X1),ok(X2)) -> filter#(X1,X2) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(sieve(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(from(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(from(X)) -> from#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(s(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(s(X)) -> s#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(head(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(head(X)) -> head#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(tail(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(tail(X)) -> tail#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X3) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(sieve(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(from(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(from(X)) -> from#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(s(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(s(X)) -> s#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(head(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(head(X)) -> head#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(tail(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(tail(X)) -> tail#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X2) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(sieve(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(from(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(from(X)) -> from#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(s(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(s(X)) -> s#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(head(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(head(X)) -> head#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(tail(X)) -> proper#(X) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(tail(X)) -> tail#(proper(X)) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X1) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) -> if#(mark(X1),X2,X3) -> if#(X1,X2,X3) proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) -> if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) proper#(tail(X)) -> proper#(X) -> proper#(sieve(X)) -> proper#(X) proper#(tail(X)) -> proper#(X) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(tail(X)) -> proper#(X) -> proper#(from(X)) -> proper#(X) proper#(tail(X)) -> proper#(X) -> proper#(from(X)) -> from#(proper(X)) proper#(tail(X)) -> proper#(X) -> proper#(s(X)) -> proper#(X) proper#(tail(X)) -> proper#(X) -> proper#(s(X)) -> s#(proper(X)) proper#(tail(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(tail(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(tail(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(tail(X)) -> proper#(X) -> proper#(head(X)) -> proper#(X) proper#(tail(X)) -> proper#(X) -> proper#(head(X)) -> head#(proper(X)) proper#(tail(X)) -> proper#(X) -> proper#(tail(X)) -> proper#(X) proper#(tail(X)) -> proper#(X) -> proper#(tail(X)) -> tail#(proper(X)) proper#(tail(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(tail(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(tail(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(tail(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(tail(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(tail(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(tail(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(tail(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(tail(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(tail(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(tail(X)) -> tail#(proper(X)) -> tail#(mark(X)) -> tail#(X) proper#(tail(X)) -> tail#(proper(X)) -> tail#(ok(X)) -> tail#(X) proper#(head(X)) -> proper#(X) -> proper#(sieve(X)) -> proper#(X) proper#(head(X)) -> proper#(X) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(head(X)) -> proper#(X) -> proper#(from(X)) -> proper#(X) proper#(head(X)) -> proper#(X) -> proper#(from(X)) -> from#(proper(X)) proper#(head(X)) -> proper#(X) -> proper#(s(X)) -> proper#(X) proper#(head(X)) -> proper#(X) -> proper#(s(X)) -> s#(proper(X)) proper#(head(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(head(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(head(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(head(X)) -> proper#(X) -> proper#(head(X)) -> proper#(X) proper#(head(X)) -> proper#(X) -> proper#(head(X)) -> head#(proper(X)) proper#(head(X)) -> proper#(X) -> proper#(tail(X)) -> proper#(X) proper#(head(X)) -> proper#(X) -> proper#(tail(X)) -> tail#(proper(X)) proper#(head(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(head(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(head(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(head(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(head(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(head(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(head(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(head(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(head(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(head(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(head(X)) -> head#(proper(X)) -> head#(mark(X)) -> head#(X) proper#(head(X)) -> head#(proper(X)) -> head#(ok(X)) -> head#(X) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(sieve(X)) -> proper#(X) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(from(X)) -> proper#(X) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(from(X)) -> from#(proper(X)) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(s(X)) -> proper#(X) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(s(X)) -> s#(proper(X)) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(head(X)) -> proper#(X) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(head(X)) -> head#(proper(X)) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(tail(X)) -> proper#(X) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(tail(X)) -> tail#(proper(X)) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(cons(X1,X2)) -> proper#(X2) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(sieve(X)) -> proper#(X) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(from(X)) -> proper#(X) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(from(X)) -> from#(proper(X)) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(s(X)) -> proper#(X) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(s(X)) -> s#(proper(X)) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(head(X)) -> proper#(X) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(head(X)) -> head#(proper(X)) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(tail(X)) -> proper#(X) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(tail(X)) -> tail#(proper(X)) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(cons(X1,X2)) -> proper#(X1) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) -> cons#(mark(X1),X2) -> cons#(X1,X2) proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) -> cons#(ok(X1),ok(X2)) -> cons#(X1,X2) proper#(sieve(X)) -> proper#(X) -> proper#(sieve(X)) -> proper#(X) proper#(sieve(X)) -> proper#(X) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(sieve(X)) -> proper#(X) -> proper#(from(X)) -> proper#(X) proper#(sieve(X)) -> proper#(X) -> proper#(from(X)) -> from#(proper(X)) proper#(sieve(X)) -> proper#(X) -> proper#(s(X)) -> proper#(X) proper#(sieve(X)) -> proper#(X) -> proper#(s(X)) -> s#(proper(X)) proper#(sieve(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(sieve(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(sieve(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(sieve(X)) -> proper#(X) -> proper#(head(X)) -> proper#(X) proper#(sieve(X)) -> proper#(X) -> proper#(head(X)) -> head#(proper(X)) proper#(sieve(X)) -> proper#(X) -> proper#(tail(X)) -> proper#(X) proper#(sieve(X)) -> proper#(X) -> proper#(tail(X)) -> tail#(proper(X)) proper#(sieve(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(sieve(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(sieve(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(sieve(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(sieve(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(sieve(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(sieve(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(sieve(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(sieve(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(sieve(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(sieve(X)) -> sieve#(proper(X)) -> sieve#(mark(X)) -> sieve#(X) proper#(sieve(X)) -> sieve#(proper(X)) -> sieve#(ok(X)) -> sieve#(X) proper#(from(X)) -> proper#(X) -> proper#(sieve(X)) -> proper#(X) proper#(from(X)) -> proper#(X) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(from(X)) -> proper#(X) -> proper#(from(X)) -> proper#(X) proper#(from(X)) -> proper#(X) -> proper#(from(X)) -> from#(proper(X)) proper#(from(X)) -> proper#(X) -> proper#(s(X)) -> proper#(X) proper#(from(X)) -> proper#(X) -> proper#(s(X)) -> s#(proper(X)) proper#(from(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(from(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(from(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(from(X)) -> proper#(X) -> proper#(head(X)) -> proper#(X) proper#(from(X)) -> proper#(X) -> proper#(head(X)) -> head#(proper(X)) proper#(from(X)) -> proper#(X) -> proper#(tail(X)) -> proper#(X) proper#(from(X)) -> proper#(X) -> proper#(tail(X)) -> tail#(proper(X)) proper#(from(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(from(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(from(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(from(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(from(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(from(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(from(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(from(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(from(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(from(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(from(X)) -> from#(proper(X)) -> from#(mark(X)) -> from#(X) proper#(from(X)) -> from#(proper(X)) -> from#(ok(X)) -> from#(X) proper#(s(X)) -> proper#(X) -> proper#(sieve(X)) -> proper#(X) proper#(s(X)) -> proper#(X) -> proper#(sieve(X)) -> sieve#(proper(X)) proper#(s(X)) -> proper#(X) -> proper#(from(X)) -> proper#(X) proper#(s(X)) -> proper#(X) -> proper#(from(X)) -> from#(proper(X)) proper#(s(X)) -> proper#(X) -> proper#(s(X)) -> proper#(X) proper#(s(X)) -> proper#(X) -> proper#(s(X)) -> s#(proper(X)) proper#(s(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> proper#(X2) proper#(s(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> proper#(X1) proper#(s(X)) -> proper#(X) -> proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) proper#(s(X)) -> proper#(X) -> proper#(head(X)) -> proper#(X) proper#(s(X)) -> proper#(X) -> proper#(head(X)) -> head#(proper(X)) proper#(s(X)) -> proper#(X) -> proper#(tail(X)) -> proper#(X) proper#(s(X)) -> proper#(X) -> proper#(tail(X)) -> tail#(proper(X)) proper#(s(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X3) proper#(s(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X2) proper#(s(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> proper#(X1) proper#(s(X)) -> proper#(X) -> proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) proper#(s(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> proper#(X2) proper#(s(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> proper#(X1) proper#(s(X)) -> proper#(X) -> proper#(filter(X1,X2)) -> filter#(proper(X1),proper(X2)) proper#(s(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> proper#(X2) proper#(s(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> proper#(X1) proper#(s(X)) -> proper#(X) -> proper#(divides(X1,X2)) -> divides#(proper(X1),proper(X2)) proper#(s(X)) -> s#(proper(X)) -> s#(mark(X)) -> s#(X) proper#(s(X)) -> s#(proper(X)) -> s#(ok(X)) -> s#(X) tail#(ok(X)) -> tail#(X) -> tail#(mark(X)) -> tail#(X) tail#(ok(X)) -> tail#(X) -> tail#(ok(X)) -> tail#(X) tail#(mark(X)) -> tail#(X) -> tail#(mark(X)) -> tail#(X) tail#(mark(X)) -> tail#(X) -> tail#(ok(X)) -> tail#(X) head#(ok(X)) -> head#(X) -> head#(mark(X)) -> head#(X) head#(ok(X)) -> head#(X) -> head#(ok(X)) -> head#(X) head#(mark(X)) -> head#(X) -> head#(mark(X)) -> head#(X) head#(mark(X)) -> head#(X) -> head#(ok(X)) -> head#(X) if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) -> if#(mark(X1),X2,X3) -> if#(X1,X2,X3) if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) -> if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) if#(mark(X1),X2,X3) -> if#(X1,X2,X3) -> if#(mark(X1),X2,X3) -> if#(X1,X2,X3) if#(mark(X1),X2,X3) -> if#(X1,X2,X3) -> if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) divides#(ok(X1),ok(X2)) -> divides#(X1,X2) -> divides#(mark(X1),X2) -> divides#(X1,X2) divides#(ok(X1),ok(X2)) -> divides#(X1,X2) -> divides#(X1,mark(X2)) -> divides#(X1,X2) divides#(ok(X1),ok(X2)) -> divides#(X1,X2) -> divides#(ok(X1),ok(X2)) -> divides#(X1,X2) divides#(mark(X1),X2) -> divides#(X1,X2) -> divides#(mark(X1),X2) -> divides#(X1,X2) divides#(mark(X1),X2) -> divides#(X1,X2) -> divides#(X1,mark(X2)) -> divides#(X1,X2) divides#(mark(X1),X2) -> divides#(X1,X2) -> divides#(ok(X1),ok(X2)) -> divides#(X1,X2) divides#(X1,mark(X2)) -> divides#(X1,X2) -> divides#(mark(X1),X2) -> divides#(X1,X2) divides#(X1,mark(X2)) -> divides#(X1,X2) -> divides#(X1,mark(X2)) -> divides#(X1,X2) divides#(X1,mark(X2)) -> divides#(X1,X2) -> divides#(ok(X1),ok(X2)) -> divides#(X1,X2) filter#(ok(X1),ok(X2)) -> filter#(X1,X2) -> filter#(mark(X1),X2) -> filter#(X1,X2) filter#(ok(X1),ok(X2)) -> filter#(X1,X2) -> filter#(X1,mark(X2)) -> filter#(X1,X2) filter#(ok(X1),ok(X2)) -> filter#(X1,X2) -> filter#(ok(X1),ok(X2)) -> filter#(X1,X2) filter#(mark(X1),X2) -> filter#(X1,X2) -> filter#(mark(X1),X2) -> filter#(X1,X2) filter#(mark(X1),X2) -> filter#(X1,X2) -> filter#(X1,mark(X2)) -> filter#(X1,X2) filter#(mark(X1),X2) -> filter#(X1,X2) -> filter#(ok(X1),ok(X2)) -> filter#(X1,X2) filter#(X1,mark(X2)) -> filter#(X1,X2) -> filter#(mark(X1),X2) -> filter#(X1,X2) filter#(X1,mark(X2)) -> filter#(X1,X2) -> filter#(X1,mark(X2)) -> filter#(X1,X2) filter#(X1,mark(X2)) -> filter#(X1,X2) -> filter#(ok(X1),ok(X2)) -> filter#(X1,X2) cons#(ok(X1),ok(X2)) -> cons#(X1,X2) -> cons#(mark(X1),X2) -> cons#(X1,X2) cons#(ok(X1),ok(X2)) -> cons#(X1,X2) -> cons#(ok(X1),ok(X2)) -> cons#(X1,X2) cons#(mark(X1),X2) -> cons#(X1,X2) -> cons#(mark(X1),X2) -> cons#(X1,X2) cons#(mark(X1),X2) -> cons#(X1,X2) -> cons#(ok(X1),ok(X2)) -> cons#(X1,X2) sieve#(ok(X)) -> sieve#(X) -> sieve#(mark(X)) -> sieve#(X) sieve#(ok(X)) -> sieve#(X) -> sieve#(ok(X)) -> sieve#(X) sieve#(mark(X)) -> sieve#(X) -> sieve#(mark(X)) -> sieve#(X) sieve#(mark(X)) -> sieve#(X) -> sieve#(ok(X)) -> sieve#(X) from#(ok(X)) -> from#(X) -> from#(mark(X)) -> from#(X) from#(ok(X)) -> from#(X) -> from#(ok(X)) -> from#(X) from#(mark(X)) -> from#(X) -> from#(mark(X)) -> from#(X) from#(mark(X)) -> from#(X) -> from#(ok(X)) -> from#(X) s#(ok(X)) -> s#(X) -> s#(mark(X)) -> s#(X) s#(ok(X)) -> s#(X) -> s#(ok(X)) -> s#(X) s#(mark(X)) -> s#(X) -> s#(mark(X)) -> s#(X) s#(mark(X)) -> s#(X) -> s#(ok(X)) -> s#(X) active#(divides(X1,X2)) -> divides#(active(X1),X2) -> divides#(mark(X1),X2) -> divides#(X1,X2) active#(divides(X1,X2)) -> divides#(active(X1),X2) -> divides#(ok(X1),ok(X2)) -> divides#(X1,X2) active#(divides(X1,X2)) -> divides#(X1,active(X2)) -> divides#(X1,mark(X2)) -> divides#(X1,X2) active#(divides(X1,X2)) -> divides#(X1,active(X2)) -> divides#(ok(X1),ok(X2)) -> divides#(X1,X2) active#(divides(X1,X2)) -> active#(X2) -> active#(primes()) -> s#(0()) active#(divides(X1,X2)) -> active#(X2) -> active#(primes()) -> s#(s(0())) active#(divides(X1,X2)) -> active#(X2) -> active#(primes()) -> from#(s(s(0()))) active#(divides(X1,X2)) -> active#(X2) -> active#(primes()) -> sieve#(from(s(s(0())))) active#(divides(X1,X2)) -> active#(X2) -> active#(from(X)) -> s#(X) active#(divides(X1,X2)) -> active#(X2) -> active#(from(X)) -> from#(s(X)) active#(divides(X1,X2)) -> active#(X2) -> active#(from(X)) -> cons#(X,from(s(X))) active#(divides(X1,X2)) -> active#(X2) -> active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) active#(divides(X1,X2)) -> active#(X2) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) active#(divides(X1,X2)) -> active#(X2) -> active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) active#(divides(X1,X2)) -> active#(X2) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) active#(divides(X1,X2)) -> active#(X2) -> active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) active#(divides(X1,X2)) -> active#(X2) -> 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#(divides(X1,X2)) -> active#(X2) -> active#(sieve(cons(X,Y))) -> sieve#(Y) active#(divides(X1,X2)) -> active#(X2) -> active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) active#(divides(X1,X2)) -> active#(X2) -> active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) active#(divides(X1,X2)) -> active#(X2) -> active#(sieve(X)) -> active#(X) active#(divides(X1,X2)) -> active#(X2) -> active#(sieve(X)) -> sieve#(active(X)) active#(divides(X1,X2)) -> active#(X2) -> active#(from(X)) -> active#(X) active#(divides(X1,X2)) -> active#(X2) -> active#(from(X)) -> from#(active(X)) active#(divides(X1,X2)) -> active#(X2) -> active#(s(X)) -> active#(X) active#(divides(X1,X2)) -> active#(X2) -> active#(s(X)) -> s#(active(X)) active#(divides(X1,X2)) -> active#(X2) -> active#(cons(X1,X2)) -> active#(X1) active#(divides(X1,X2)) -> active#(X2) -> active#(cons(X1,X2)) -> cons#(active(X1),X2) active#(divides(X1,X2)) -> active#(X2) -> active#(head(X)) -> active#(X) active#(divides(X1,X2)) -> active#(X2) -> active#(head(X)) -> head#(active(X)) active#(divides(X1,X2)) -> active#(X2) -> active#(tail(X)) -> active#(X) active#(divides(X1,X2)) -> active#(X2) -> active#(tail(X)) -> tail#(active(X)) active#(divides(X1,X2)) -> active#(X2) -> active#(if(X1,X2,X3)) -> active#(X1) active#(divides(X1,X2)) -> active#(X2) -> active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) active#(divides(X1,X2)) -> active#(X2) -> active#(filter(X1,X2)) -> active#(X1) active#(divides(X1,X2)) -> active#(X2) -> active#(filter(X1,X2)) -> filter#(active(X1),X2) active#(divides(X1,X2)) -> active#(X2) -> active#(filter(X1,X2)) -> active#(X2) active#(divides(X1,X2)) -> active#(X2) -> active#(filter(X1,X2)) -> filter#(X1,active(X2)) active#(divides(X1,X2)) -> active#(X2) -> active#(divides(X1,X2)) -> active#(X1) active#(divides(X1,X2)) -> active#(X2) -> active#(divides(X1,X2)) -> divides#(active(X1),X2) active#(divides(X1,X2)) -> active#(X2) -> active#(divides(X1,X2)) -> active#(X2) active#(divides(X1,X2)) -> active#(X2) -> active#(divides(X1,X2)) -> divides#(X1,active(X2)) active#(divides(X1,X2)) -> active#(X1) -> active#(primes()) -> s#(0()) active#(divides(X1,X2)) -> active#(X1) -> active#(primes()) -> s#(s(0())) active#(divides(X1,X2)) -> active#(X1) -> active#(primes()) -> from#(s(s(0()))) active#(divides(X1,X2)) -> active#(X1) -> active#(primes()) -> sieve#(from(s(s(0())))) active#(divides(X1,X2)) -> active#(X1) -> active#(from(X)) -> s#(X) active#(divides(X1,X2)) -> active#(X1) -> active#(from(X)) -> from#(s(X)) active#(divides(X1,X2)) -> active#(X1) -> active#(from(X)) -> cons#(X,from(s(X))) active#(divides(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) active#(divides(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) active#(divides(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) active#(divides(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) active#(divides(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) active#(divides(X1,X2)) -> active#(X1) -> 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#(divides(X1,X2)) -> active#(X1) -> active#(sieve(cons(X,Y))) -> sieve#(Y) active#(divides(X1,X2)) -> active#(X1) -> active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) active#(divides(X1,X2)) -> active#(X1) -> active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) active#(divides(X1,X2)) -> active#(X1) -> active#(sieve(X)) -> active#(X) active#(divides(X1,X2)) -> active#(X1) -> active#(sieve(X)) -> sieve#(active(X)) active#(divides(X1,X2)) -> active#(X1) -> active#(from(X)) -> active#(X) active#(divides(X1,X2)) -> active#(X1) -> active#(from(X)) -> from#(active(X)) active#(divides(X1,X2)) -> active#(X1) -> active#(s(X)) -> active#(X) active#(divides(X1,X2)) -> active#(X1) -> active#(s(X)) -> s#(active(X)) active#(divides(X1,X2)) -> active#(X1) -> active#(cons(X1,X2)) -> active#(X1) active#(divides(X1,X2)) -> active#(X1) -> active#(cons(X1,X2)) -> cons#(active(X1),X2) active#(divides(X1,X2)) -> active#(X1) -> active#(head(X)) -> active#(X) active#(divides(X1,X2)) -> active#(X1) -> active#(head(X)) -> head#(active(X)) active#(divides(X1,X2)) -> active#(X1) -> active#(tail(X)) -> active#(X) active#(divides(X1,X2)) -> active#(X1) -> active#(tail(X)) -> tail#(active(X)) active#(divides(X1,X2)) -> active#(X1) -> active#(if(X1,X2,X3)) -> active#(X1) active#(divides(X1,X2)) -> active#(X1) -> active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) active#(divides(X1,X2)) -> active#(X1) -> active#(filter(X1,X2)) -> active#(X1) active#(divides(X1,X2)) -> active#(X1) -> active#(filter(X1,X2)) -> filter#(active(X1),X2) active#(divides(X1,X2)) -> active#(X1) -> active#(filter(X1,X2)) -> active#(X2) active#(divides(X1,X2)) -> active#(X1) -> active#(filter(X1,X2)) -> filter#(X1,active(X2)) active#(divides(X1,X2)) -> active#(X1) -> active#(divides(X1,X2)) -> active#(X1) active#(divides(X1,X2)) -> active#(X1) -> active#(divides(X1,X2)) -> divides#(active(X1),X2) active#(divides(X1,X2)) -> active#(X1) -> active#(divides(X1,X2)) -> active#(X2) active#(divides(X1,X2)) -> active#(X1) -> active#(divides(X1,X2)) -> divides#(X1,active(X2)) 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)))) -> if#(mark(X1),X2,X3) -> if#(X1,X2,X3) 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)))) -> if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) -> filter#(X1,mark(X2)) -> filter#(X1,X2) active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) -> filter#(X1,mark(X2)) -> filter#(X1,X2) active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) -> cons#(ok(X1),ok(X2)) -> cons#(X1,X2) active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) -> sieve#(ok(X)) -> sieve#(X) active#(filter(X1,X2)) -> filter#(active(X1),X2) -> filter#(mark(X1),X2) -> filter#(X1,X2) active#(filter(X1,X2)) -> filter#(active(X1),X2) -> filter#(ok(X1),ok(X2)) -> filter#(X1,X2) active#(filter(X1,X2)) -> filter#(X1,active(X2)) -> filter#(X1,mark(X2)) -> filter#(X1,X2) active#(filter(X1,X2)) -> filter#(X1,active(X2)) -> filter#(ok(X1),ok(X2)) -> filter#(X1,X2) active#(filter(X1,X2)) -> active#(X2) -> active#(primes()) -> s#(0()) active#(filter(X1,X2)) -> active#(X2) -> active#(primes()) -> s#(s(0())) active#(filter(X1,X2)) -> active#(X2) -> active#(primes()) -> from#(s(s(0()))) active#(filter(X1,X2)) -> active#(X2) -> active#(primes()) -> sieve#(from(s(s(0())))) active#(filter(X1,X2)) -> active#(X2) -> active#(from(X)) -> s#(X) active#(filter(X1,X2)) -> active#(X2) -> active#(from(X)) -> from#(s(X)) active#(filter(X1,X2)) -> active#(X2) -> active#(from(X)) -> cons#(X,from(s(X))) active#(filter(X1,X2)) -> active#(X2) -> active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) active#(filter(X1,X2)) -> active#(X2) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) active#(filter(X1,X2)) -> active#(X2) -> active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) active#(filter(X1,X2)) -> active#(X2) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) active#(filter(X1,X2)) -> active#(X2) -> active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) active#(filter(X1,X2)) -> active#(X2) -> 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(X1,X2)) -> active#(X2) -> active#(sieve(cons(X,Y))) -> sieve#(Y) active#(filter(X1,X2)) -> active#(X2) -> active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) active#(filter(X1,X2)) -> active#(X2) -> active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) active#(filter(X1,X2)) -> active#(X2) -> active#(sieve(X)) -> active#(X) active#(filter(X1,X2)) -> active#(X2) -> active#(sieve(X)) -> sieve#(active(X)) active#(filter(X1,X2)) -> active#(X2) -> active#(from(X)) -> active#(X) active#(filter(X1,X2)) -> active#(X2) -> active#(from(X)) -> from#(active(X)) active#(filter(X1,X2)) -> active#(X2) -> active#(s(X)) -> active#(X) active#(filter(X1,X2)) -> active#(X2) -> active#(s(X)) -> s#(active(X)) active#(filter(X1,X2)) -> active#(X2) -> active#(cons(X1,X2)) -> active#(X1) active#(filter(X1,X2)) -> active#(X2) -> active#(cons(X1,X2)) -> cons#(active(X1),X2) active#(filter(X1,X2)) -> active#(X2) -> active#(head(X)) -> active#(X) active#(filter(X1,X2)) -> active#(X2) -> active#(head(X)) -> head#(active(X)) active#(filter(X1,X2)) -> active#(X2) -> active#(tail(X)) -> active#(X) active#(filter(X1,X2)) -> active#(X2) -> active#(tail(X)) -> tail#(active(X)) active#(filter(X1,X2)) -> active#(X2) -> active#(if(X1,X2,X3)) -> active#(X1) active#(filter(X1,X2)) -> active#(X2) -> active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) active#(filter(X1,X2)) -> active#(X2) -> active#(filter(X1,X2)) -> active#(X1) active#(filter(X1,X2)) -> active#(X2) -> active#(filter(X1,X2)) -> filter#(active(X1),X2) active#(filter(X1,X2)) -> active#(X2) -> active#(filter(X1,X2)) -> active#(X2) active#(filter(X1,X2)) -> active#(X2) -> active#(filter(X1,X2)) -> filter#(X1,active(X2)) active#(filter(X1,X2)) -> active#(X2) -> active#(divides(X1,X2)) -> active#(X1) active#(filter(X1,X2)) -> active#(X2) -> active#(divides(X1,X2)) -> divides#(active(X1),X2) active#(filter(X1,X2)) -> active#(X2) -> active#(divides(X1,X2)) -> active#(X2) active#(filter(X1,X2)) -> active#(X2) -> active#(divides(X1,X2)) -> divides#(X1,active(X2)) active#(filter(X1,X2)) -> active#(X1) -> active#(primes()) -> s#(0()) active#(filter(X1,X2)) -> active#(X1) -> active#(primes()) -> s#(s(0())) active#(filter(X1,X2)) -> active#(X1) -> active#(primes()) -> from#(s(s(0()))) active#(filter(X1,X2)) -> active#(X1) -> active#(primes()) -> sieve#(from(s(s(0())))) active#(filter(X1,X2)) -> active#(X1) -> active#(from(X)) -> s#(X) active#(filter(X1,X2)) -> active#(X1) -> active#(from(X)) -> from#(s(X)) active#(filter(X1,X2)) -> active#(X1) -> active#(from(X)) -> cons#(X,from(s(X))) active#(filter(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) active#(filter(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) active#(filter(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) active#(filter(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) active#(filter(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) active#(filter(X1,X2)) -> active#(X1) -> 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(X1,X2)) -> active#(X1) -> active#(sieve(cons(X,Y))) -> sieve#(Y) active#(filter(X1,X2)) -> active#(X1) -> active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) active#(filter(X1,X2)) -> active#(X1) -> active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) active#(filter(X1,X2)) -> active#(X1) -> active#(sieve(X)) -> active#(X) active#(filter(X1,X2)) -> active#(X1) -> active#(sieve(X)) -> sieve#(active(X)) active#(filter(X1,X2)) -> active#(X1) -> active#(from(X)) -> active#(X) active#(filter(X1,X2)) -> active#(X1) -> active#(from(X)) -> from#(active(X)) active#(filter(X1,X2)) -> active#(X1) -> active#(s(X)) -> active#(X) active#(filter(X1,X2)) -> active#(X1) -> active#(s(X)) -> s#(active(X)) active#(filter(X1,X2)) -> active#(X1) -> active#(cons(X1,X2)) -> active#(X1) active#(filter(X1,X2)) -> active#(X1) -> active#(cons(X1,X2)) -> cons#(active(X1),X2) active#(filter(X1,X2)) -> active#(X1) -> active#(head(X)) -> active#(X) active#(filter(X1,X2)) -> active#(X1) -> active#(head(X)) -> head#(active(X)) active#(filter(X1,X2)) -> active#(X1) -> active#(tail(X)) -> active#(X) active#(filter(X1,X2)) -> active#(X1) -> active#(tail(X)) -> tail#(active(X)) active#(filter(X1,X2)) -> active#(X1) -> active#(if(X1,X2,X3)) -> active#(X1) active#(filter(X1,X2)) -> active#(X1) -> active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) active#(filter(X1,X2)) -> active#(X1) -> active#(filter(X1,X2)) -> active#(X1) active#(filter(X1,X2)) -> active#(X1) -> active#(filter(X1,X2)) -> filter#(active(X1),X2) active#(filter(X1,X2)) -> active#(X1) -> active#(filter(X1,X2)) -> active#(X2) active#(filter(X1,X2)) -> active#(X1) -> active#(filter(X1,X2)) -> filter#(X1,active(X2)) active#(filter(X1,X2)) -> active#(X1) -> active#(divides(X1,X2)) -> active#(X1) active#(filter(X1,X2)) -> active#(X1) -> active#(divides(X1,X2)) -> divides#(active(X1),X2) active#(filter(X1,X2)) -> active#(X1) -> active#(divides(X1,X2)) -> active#(X2) active#(filter(X1,X2)) -> active#(X1) -> active#(divides(X1,X2)) -> divides#(X1,active(X2)) active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) -> if#(mark(X1),X2,X3) -> if#(X1,X2,X3) active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) -> if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) active#(if(X1,X2,X3)) -> active#(X1) -> active#(primes()) -> s#(0()) active#(if(X1,X2,X3)) -> active#(X1) -> active#(primes()) -> s#(s(0())) active#(if(X1,X2,X3)) -> active#(X1) -> active#(primes()) -> from#(s(s(0()))) active#(if(X1,X2,X3)) -> active#(X1) -> active#(primes()) -> sieve#(from(s(s(0())))) active#(if(X1,X2,X3)) -> active#(X1) -> active#(from(X)) -> s#(X) active#(if(X1,X2,X3)) -> active#(X1) -> active#(from(X)) -> from#(s(X)) active#(if(X1,X2,X3)) -> active#(X1) -> active#(from(X)) -> cons#(X,from(s(X))) active#(if(X1,X2,X3)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) active#(if(X1,X2,X3)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) active#(if(X1,X2,X3)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) active#(if(X1,X2,X3)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) active#(if(X1,X2,X3)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) active#(if(X1,X2,X3)) -> active#(X1) -> 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#(if(X1,X2,X3)) -> active#(X1) -> active#(sieve(cons(X,Y))) -> sieve#(Y) active#(if(X1,X2,X3)) -> active#(X1) -> active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) active#(if(X1,X2,X3)) -> active#(X1) -> active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) active#(if(X1,X2,X3)) -> active#(X1) -> active#(sieve(X)) -> active#(X) active#(if(X1,X2,X3)) -> active#(X1) -> active#(sieve(X)) -> sieve#(active(X)) active#(if(X1,X2,X3)) -> active#(X1) -> active#(from(X)) -> active#(X) active#(if(X1,X2,X3)) -> active#(X1) -> active#(from(X)) -> from#(active(X)) active#(if(X1,X2,X3)) -> active#(X1) -> active#(s(X)) -> active#(X) active#(if(X1,X2,X3)) -> active#(X1) -> active#(s(X)) -> s#(active(X)) active#(if(X1,X2,X3)) -> active#(X1) -> active#(cons(X1,X2)) -> active#(X1) active#(if(X1,X2,X3)) -> active#(X1) -> active#(cons(X1,X2)) -> cons#(active(X1),X2) active#(if(X1,X2,X3)) -> active#(X1) -> active#(head(X)) -> active#(X) active#(if(X1,X2,X3)) -> active#(X1) -> active#(head(X)) -> head#(active(X)) active#(if(X1,X2,X3)) -> active#(X1) -> active#(tail(X)) -> active#(X) active#(if(X1,X2,X3)) -> active#(X1) -> active#(tail(X)) -> tail#(active(X)) active#(if(X1,X2,X3)) -> active#(X1) -> active#(if(X1,X2,X3)) -> active#(X1) active#(if(X1,X2,X3)) -> active#(X1) -> active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) active#(if(X1,X2,X3)) -> active#(X1) -> active#(filter(X1,X2)) -> active#(X1) active#(if(X1,X2,X3)) -> active#(X1) -> active#(filter(X1,X2)) -> filter#(active(X1),X2) active#(if(X1,X2,X3)) -> active#(X1) -> active#(filter(X1,X2)) -> active#(X2) active#(if(X1,X2,X3)) -> active#(X1) -> active#(filter(X1,X2)) -> filter#(X1,active(X2)) active#(if(X1,X2,X3)) -> active#(X1) -> active#(divides(X1,X2)) -> active#(X1) active#(if(X1,X2,X3)) -> active#(X1) -> active#(divides(X1,X2)) -> divides#(active(X1),X2) active#(if(X1,X2,X3)) -> active#(X1) -> active#(divides(X1,X2)) -> active#(X2) active#(if(X1,X2,X3)) -> active#(X1) -> active#(divides(X1,X2)) -> divides#(X1,active(X2)) active#(tail(X)) -> tail#(active(X)) -> tail#(mark(X)) -> tail#(X) active#(tail(X)) -> tail#(active(X)) -> tail#(ok(X)) -> tail#(X) active#(tail(X)) -> active#(X) -> active#(primes()) -> s#(0()) active#(tail(X)) -> active#(X) -> active#(primes()) -> s#(s(0())) active#(tail(X)) -> active#(X) -> active#(primes()) -> from#(s(s(0()))) active#(tail(X)) -> active#(X) -> active#(primes()) -> sieve#(from(s(s(0())))) active#(tail(X)) -> active#(X) -> active#(from(X)) -> s#(X) active#(tail(X)) -> active#(X) -> active#(from(X)) -> from#(s(X)) active#(tail(X)) -> active#(X) -> active#(from(X)) -> cons#(X,from(s(X))) active#(tail(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) active#(tail(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) active#(tail(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) active#(tail(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) active#(tail(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) active#(tail(X)) -> active#(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#(tail(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> sieve#(Y) active#(tail(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) active#(tail(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) active#(tail(X)) -> active#(X) -> active#(sieve(X)) -> active#(X) active#(tail(X)) -> active#(X) -> active#(sieve(X)) -> sieve#(active(X)) active#(tail(X)) -> active#(X) -> active#(from(X)) -> active#(X) active#(tail(X)) -> active#(X) -> active#(from(X)) -> from#(active(X)) active#(tail(X)) -> active#(X) -> active#(s(X)) -> active#(X) active#(tail(X)) -> active#(X) -> active#(s(X)) -> s#(active(X)) active#(tail(X)) -> active#(X) -> active#(cons(X1,X2)) -> active#(X1) active#(tail(X)) -> active#(X) -> active#(cons(X1,X2)) -> cons#(active(X1),X2) active#(tail(X)) -> active#(X) -> active#(head(X)) -> active#(X) active#(tail(X)) -> active#(X) -> active#(head(X)) -> head#(active(X)) active#(tail(X)) -> active#(X) -> active#(tail(X)) -> active#(X) active#(tail(X)) -> active#(X) -> active#(tail(X)) -> tail#(active(X)) active#(tail(X)) -> active#(X) -> active#(if(X1,X2,X3)) -> active#(X1) active#(tail(X)) -> active#(X) -> active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) active#(tail(X)) -> active#(X) -> active#(filter(X1,X2)) -> active#(X1) active#(tail(X)) -> active#(X) -> active#(filter(X1,X2)) -> filter#(active(X1),X2) active#(tail(X)) -> active#(X) -> active#(filter(X1,X2)) -> active#(X2) active#(tail(X)) -> active#(X) -> active#(filter(X1,X2)) -> filter#(X1,active(X2)) active#(tail(X)) -> active#(X) -> active#(divides(X1,X2)) -> active#(X1) active#(tail(X)) -> active#(X) -> active#(divides(X1,X2)) -> divides#(active(X1),X2) active#(tail(X)) -> active#(X) -> active#(divides(X1,X2)) -> active#(X2) active#(tail(X)) -> active#(X) -> active#(divides(X1,X2)) -> divides#(X1,active(X2)) active#(head(X)) -> head#(active(X)) -> head#(mark(X)) -> head#(X) active#(head(X)) -> head#(active(X)) -> head#(ok(X)) -> head#(X) active#(head(X)) -> active#(X) -> active#(primes()) -> s#(0()) active#(head(X)) -> active#(X) -> active#(primes()) -> s#(s(0())) active#(head(X)) -> active#(X) -> active#(primes()) -> from#(s(s(0()))) active#(head(X)) -> active#(X) -> active#(primes()) -> sieve#(from(s(s(0())))) active#(head(X)) -> active#(X) -> active#(from(X)) -> s#(X) active#(head(X)) -> active#(X) -> active#(from(X)) -> from#(s(X)) active#(head(X)) -> active#(X) -> active#(from(X)) -> cons#(X,from(s(X))) active#(head(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) active#(head(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) active#(head(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) active#(head(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) active#(head(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) active#(head(X)) -> active#(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#(head(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> sieve#(Y) active#(head(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) active#(head(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) active#(head(X)) -> active#(X) -> active#(sieve(X)) -> active#(X) active#(head(X)) -> active#(X) -> active#(sieve(X)) -> sieve#(active(X)) active#(head(X)) -> active#(X) -> active#(from(X)) -> active#(X) active#(head(X)) -> active#(X) -> active#(from(X)) -> from#(active(X)) active#(head(X)) -> active#(X) -> active#(s(X)) -> active#(X) active#(head(X)) -> active#(X) -> active#(s(X)) -> s#(active(X)) active#(head(X)) -> active#(X) -> active#(cons(X1,X2)) -> active#(X1) active#(head(X)) -> active#(X) -> active#(cons(X1,X2)) -> cons#(active(X1),X2) active#(head(X)) -> active#(X) -> active#(head(X)) -> active#(X) active#(head(X)) -> active#(X) -> active#(head(X)) -> head#(active(X)) active#(head(X)) -> active#(X) -> active#(tail(X)) -> active#(X) active#(head(X)) -> active#(X) -> active#(tail(X)) -> tail#(active(X)) active#(head(X)) -> active#(X) -> active#(if(X1,X2,X3)) -> active#(X1) active#(head(X)) -> active#(X) -> active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) active#(head(X)) -> active#(X) -> active#(filter(X1,X2)) -> active#(X1) active#(head(X)) -> active#(X) -> active#(filter(X1,X2)) -> filter#(active(X1),X2) active#(head(X)) -> active#(X) -> active#(filter(X1,X2)) -> active#(X2) active#(head(X)) -> active#(X) -> active#(filter(X1,X2)) -> filter#(X1,active(X2)) active#(head(X)) -> active#(X) -> active#(divides(X1,X2)) -> active#(X1) active#(head(X)) -> active#(X) -> active#(divides(X1,X2)) -> divides#(active(X1),X2) active#(head(X)) -> active#(X) -> active#(divides(X1,X2)) -> active#(X2) active#(head(X)) -> active#(X) -> active#(divides(X1,X2)) -> divides#(X1,active(X2)) active#(cons(X1,X2)) -> cons#(active(X1),X2) -> cons#(mark(X1),X2) -> cons#(X1,X2) active#(cons(X1,X2)) -> cons#(active(X1),X2) -> cons#(ok(X1),ok(X2)) -> cons#(X1,X2) active#(cons(X1,X2)) -> active#(X1) -> active#(primes()) -> s#(0()) active#(cons(X1,X2)) -> active#(X1) -> active#(primes()) -> s#(s(0())) active#(cons(X1,X2)) -> active#(X1) -> active#(primes()) -> from#(s(s(0()))) active#(cons(X1,X2)) -> active#(X1) -> active#(primes()) -> sieve#(from(s(s(0())))) active#(cons(X1,X2)) -> active#(X1) -> active#(from(X)) -> s#(X) active#(cons(X1,X2)) -> active#(X1) -> active#(from(X)) -> from#(s(X)) active#(cons(X1,X2)) -> active#(X1) -> active#(from(X)) -> cons#(X,from(s(X))) active#(cons(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) active#(cons(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) active#(cons(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) active#(cons(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) active#(cons(X1,X2)) -> active#(X1) -> active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) active#(cons(X1,X2)) -> active#(X1) -> 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#(cons(X1,X2)) -> active#(X1) -> active#(sieve(cons(X,Y))) -> sieve#(Y) active#(cons(X1,X2)) -> active#(X1) -> active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) active#(cons(X1,X2)) -> active#(X1) -> active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) active#(cons(X1,X2)) -> active#(X1) -> active#(sieve(X)) -> active#(X) active#(cons(X1,X2)) -> active#(X1) -> active#(sieve(X)) -> sieve#(active(X)) active#(cons(X1,X2)) -> active#(X1) -> active#(from(X)) -> active#(X) active#(cons(X1,X2)) -> active#(X1) -> active#(from(X)) -> from#(active(X)) active#(cons(X1,X2)) -> active#(X1) -> active#(s(X)) -> active#(X) active#(cons(X1,X2)) -> active#(X1) -> active#(s(X)) -> s#(active(X)) active#(cons(X1,X2)) -> active#(X1) -> active#(cons(X1,X2)) -> active#(X1) active#(cons(X1,X2)) -> active#(X1) -> active#(cons(X1,X2)) -> cons#(active(X1),X2) active#(cons(X1,X2)) -> active#(X1) -> active#(head(X)) -> active#(X) active#(cons(X1,X2)) -> active#(X1) -> active#(head(X)) -> head#(active(X)) active#(cons(X1,X2)) -> active#(X1) -> active#(tail(X)) -> active#(X) active#(cons(X1,X2)) -> active#(X1) -> active#(tail(X)) -> tail#(active(X)) active#(cons(X1,X2)) -> active#(X1) -> active#(if(X1,X2,X3)) -> active#(X1) active#(cons(X1,X2)) -> active#(X1) -> active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) active#(cons(X1,X2)) -> active#(X1) -> active#(filter(X1,X2)) -> active#(X1) active#(cons(X1,X2)) -> active#(X1) -> active#(filter(X1,X2)) -> filter#(active(X1),X2) active#(cons(X1,X2)) -> active#(X1) -> active#(filter(X1,X2)) -> active#(X2) active#(cons(X1,X2)) -> active#(X1) -> active#(filter(X1,X2)) -> filter#(X1,active(X2)) active#(cons(X1,X2)) -> active#(X1) -> active#(divides(X1,X2)) -> active#(X1) active#(cons(X1,X2)) -> active#(X1) -> active#(divides(X1,X2)) -> divides#(active(X1),X2) active#(cons(X1,X2)) -> active#(X1) -> active#(divides(X1,X2)) -> active#(X2) active#(cons(X1,X2)) -> active#(X1) -> active#(divides(X1,X2)) -> divides#(X1,active(X2)) active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) -> filter#(X1,mark(X2)) -> filter#(X1,X2) active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) -> filter#(ok(X1),ok(X2)) -> filter#(X1,X2) active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) -> cons#(ok(X1),ok(X2)) -> cons#(X1,X2) active#(sieve(cons(X,Y))) -> sieve#(Y) -> sieve#(mark(X)) -> sieve#(X) active#(sieve(cons(X,Y))) -> sieve#(Y) -> sieve#(ok(X)) -> sieve#(X) active#(sieve(X)) -> sieve#(active(X)) -> sieve#(mark(X)) -> sieve#(X) active#(sieve(X)) -> sieve#(active(X)) -> sieve#(ok(X)) -> sieve#(X) active#(sieve(X)) -> active#(X) -> active#(primes()) -> s#(0()) active#(sieve(X)) -> active#(X) -> active#(primes()) -> s#(s(0())) active#(sieve(X)) -> active#(X) -> active#(primes()) -> from#(s(s(0()))) active#(sieve(X)) -> active#(X) -> active#(primes()) -> sieve#(from(s(s(0())))) active#(sieve(X)) -> active#(X) -> active#(from(X)) -> s#(X) active#(sieve(X)) -> active#(X) -> active#(from(X)) -> from#(s(X)) active#(sieve(X)) -> active#(X) -> active#(from(X)) -> cons#(X,from(s(X))) active#(sieve(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) active#(sieve(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) active#(sieve(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) active#(sieve(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) active#(sieve(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) active#(sieve(X)) -> active#(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#(sieve(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> sieve#(Y) active#(sieve(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) active#(sieve(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) active#(sieve(X)) -> active#(X) -> active#(sieve(X)) -> active#(X) active#(sieve(X)) -> active#(X) -> active#(sieve(X)) -> sieve#(active(X)) active#(sieve(X)) -> active#(X) -> active#(from(X)) -> active#(X) active#(sieve(X)) -> active#(X) -> active#(from(X)) -> from#(active(X)) active#(sieve(X)) -> active#(X) -> active#(s(X)) -> active#(X) active#(sieve(X)) -> active#(X) -> active#(s(X)) -> s#(active(X)) active#(sieve(X)) -> active#(X) -> active#(cons(X1,X2)) -> active#(X1) active#(sieve(X)) -> active#(X) -> active#(cons(X1,X2)) -> cons#(active(X1),X2) active#(sieve(X)) -> active#(X) -> active#(head(X)) -> active#(X) active#(sieve(X)) -> active#(X) -> active#(head(X)) -> head#(active(X)) active#(sieve(X)) -> active#(X) -> active#(tail(X)) -> active#(X) active#(sieve(X)) -> active#(X) -> active#(tail(X)) -> tail#(active(X)) active#(sieve(X)) -> active#(X) -> active#(if(X1,X2,X3)) -> active#(X1) active#(sieve(X)) -> active#(X) -> active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) active#(sieve(X)) -> active#(X) -> active#(filter(X1,X2)) -> active#(X1) active#(sieve(X)) -> active#(X) -> active#(filter(X1,X2)) -> filter#(active(X1),X2) active#(sieve(X)) -> active#(X) -> active#(filter(X1,X2)) -> active#(X2) active#(sieve(X)) -> active#(X) -> active#(filter(X1,X2)) -> filter#(X1,active(X2)) active#(sieve(X)) -> active#(X) -> active#(divides(X1,X2)) -> active#(X1) active#(sieve(X)) -> active#(X) -> active#(divides(X1,X2)) -> divides#(active(X1),X2) active#(sieve(X)) -> active#(X) -> active#(divides(X1,X2)) -> active#(X2) active#(sieve(X)) -> active#(X) -> active#(divides(X1,X2)) -> divides#(X1,active(X2)) active#(from(X)) -> from#(active(X)) -> from#(mark(X)) -> from#(X) active#(from(X)) -> from#(active(X)) -> from#(ok(X)) -> from#(X) active#(from(X)) -> active#(X) -> active#(primes()) -> s#(0()) active#(from(X)) -> active#(X) -> active#(primes()) -> s#(s(0())) active#(from(X)) -> active#(X) -> active#(primes()) -> from#(s(s(0()))) active#(from(X)) -> active#(X) -> active#(primes()) -> sieve#(from(s(s(0())))) active#(from(X)) -> active#(X) -> active#(from(X)) -> s#(X) active#(from(X)) -> active#(X) -> active#(from(X)) -> from#(s(X)) active#(from(X)) -> active#(X) -> active#(from(X)) -> cons#(X,from(s(X))) active#(from(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) active#(from(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) active#(from(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) active#(from(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) active#(from(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) active#(from(X)) -> active#(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#(from(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> sieve#(Y) active#(from(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) active#(from(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) active#(from(X)) -> active#(X) -> active#(sieve(X)) -> active#(X) active#(from(X)) -> active#(X) -> active#(sieve(X)) -> sieve#(active(X)) active#(from(X)) -> active#(X) -> active#(from(X)) -> active#(X) active#(from(X)) -> active#(X) -> active#(from(X)) -> from#(active(X)) active#(from(X)) -> active#(X) -> active#(s(X)) -> active#(X) active#(from(X)) -> active#(X) -> active#(s(X)) -> s#(active(X)) active#(from(X)) -> active#(X) -> active#(cons(X1,X2)) -> active#(X1) active#(from(X)) -> active#(X) -> active#(cons(X1,X2)) -> cons#(active(X1),X2) active#(from(X)) -> active#(X) -> active#(head(X)) -> active#(X) active#(from(X)) -> active#(X) -> active#(head(X)) -> head#(active(X)) active#(from(X)) -> active#(X) -> active#(tail(X)) -> active#(X) active#(from(X)) -> active#(X) -> active#(tail(X)) -> tail#(active(X)) active#(from(X)) -> active#(X) -> active#(if(X1,X2,X3)) -> active#(X1) active#(from(X)) -> active#(X) -> active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) active#(from(X)) -> active#(X) -> active#(filter(X1,X2)) -> active#(X1) active#(from(X)) -> active#(X) -> active#(filter(X1,X2)) -> filter#(active(X1),X2) active#(from(X)) -> active#(X) -> active#(filter(X1,X2)) -> active#(X2) active#(from(X)) -> active#(X) -> active#(filter(X1,X2)) -> filter#(X1,active(X2)) active#(from(X)) -> active#(X) -> active#(divides(X1,X2)) -> active#(X1) active#(from(X)) -> active#(X) -> active#(divides(X1,X2)) -> divides#(active(X1),X2) active#(from(X)) -> active#(X) -> active#(divides(X1,X2)) -> active#(X2) active#(from(X)) -> active#(X) -> active#(divides(X1,X2)) -> divides#(X1,active(X2)) active#(s(X)) -> s#(active(X)) -> s#(mark(X)) -> s#(X) active#(s(X)) -> s#(active(X)) -> s#(ok(X)) -> s#(X) active#(s(X)) -> active#(X) -> active#(primes()) -> s#(0()) active#(s(X)) -> active#(X) -> active#(primes()) -> s#(s(0())) active#(s(X)) -> active#(X) -> active#(primes()) -> from#(s(s(0()))) active#(s(X)) -> active#(X) -> active#(primes()) -> sieve#(from(s(s(0())))) active#(s(X)) -> active#(X) -> active#(from(X)) -> s#(X) active#(s(X)) -> active#(X) -> active#(from(X)) -> from#(s(X)) active#(s(X)) -> active#(X) -> active#(from(X)) -> cons#(X,from(s(X))) active#(s(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> sieve#(Y) active#(s(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(X,sieve(Y)) active#(s(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> cons#(Y,filter(X,sieve(Y))) active#(s(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> filter#(s(s(X)),Z) active#(s(X)) -> active#(X) -> active#(filter(s(s(X)),cons(Y,Z))) -> divides#(s(s(X)),Y) active#(s(X)) -> active#(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#(s(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> sieve#(Y) active#(s(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> filter#(X,sieve(Y)) active#(s(X)) -> active#(X) -> active#(sieve(cons(X,Y))) -> cons#(X,filter(X,sieve(Y))) active#(s(X)) -> active#(X) -> active#(sieve(X)) -> active#(X) active#(s(X)) -> active#(X) -> active#(sieve(X)) -> sieve#(active(X)) active#(s(X)) -> active#(X) -> active#(from(X)) -> active#(X) active#(s(X)) -> active#(X) -> active#(from(X)) -> from#(active(X)) active#(s(X)) -> active#(X) -> active#(s(X)) -> active#(X) active#(s(X)) -> active#(X) -> active#(s(X)) -> s#(active(X)) active#(s(X)) -> active#(X) -> active#(cons(X1,X2)) -> active#(X1) active#(s(X)) -> active#(X) -> active#(cons(X1,X2)) -> cons#(active(X1),X2) active#(s(X)) -> active#(X) -> active#(head(X)) -> active#(X) active#(s(X)) -> active#(X) -> active#(head(X)) -> head#(active(X)) active#(s(X)) -> active#(X) -> active#(tail(X)) -> active#(X) active#(s(X)) -> active#(X) -> active#(tail(X)) -> tail#(active(X)) active#(s(X)) -> active#(X) -> active#(if(X1,X2,X3)) -> active#(X1) active#(s(X)) -> active#(X) -> active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) active#(s(X)) -> active#(X) -> active#(filter(X1,X2)) -> active#(X1) active#(s(X)) -> active#(X) -> active#(filter(X1,X2)) -> filter#(active(X1),X2) active#(s(X)) -> active#(X) -> active#(filter(X1,X2)) -> active#(X2) active#(s(X)) -> active#(X) -> active#(filter(X1,X2)) -> filter#(X1,active(X2)) active#(s(X)) -> active#(X) -> active#(divides(X1,X2)) -> active#(X1) active#(s(X)) -> active#(X) -> active#(divides(X1,X2)) -> divides#(active(X1),X2) active#(s(X)) -> active#(X) -> active#(divides(X1,X2)) -> active#(X2) active#(s(X)) -> active#(X) -> active#(divides(X1,X2)) -> divides#(X1,active(X2)) SCC Processor: #sccs: 12 #rules: 47 #arcs: 908/7225 DPs: top#(ok(X)) -> top#(active(X)) top#(mark(X)) -> top#(proper(X)) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Open DPs: proper#(divides(X1,X2)) -> proper#(X1) proper#(divides(X1,X2)) -> proper#(X2) proper#(filter(X1,X2)) -> proper#(X1) proper#(filter(X1,X2)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X3) proper#(tail(X)) -> proper#(X) proper#(head(X)) -> proper#(X) proper#(cons(X1,X2)) -> proper#(X1) proper#(cons(X1,X2)) -> proper#(X2) proper#(s(X)) -> proper#(X) proper#(from(X)) -> proper#(X) proper#(sieve(X)) -> proper#(X) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Matrix Interpretation Processor: dimension: 1 interpretation: [proper#](x0) = x0 + 1, [top](x0) = 1, [ok](x0) = x0, [proper](x0) = x0, [divides](x0, x1) = x0 + x1 + 1, [filter](x0, x1) = x0 + x1 + 1, [false] = 1, [if](x0, x1, x2) = x0 + x1 + x2, [true] = 1, [tail](x0) = x0, [head](x0) = x0, [cons](x0, x1) = x0 + x1, [mark](x0) = 1, [sieve](x0) = x0, [from](x0) = x0 + 1, [s](x0) = x0, [0] = 0, [active](x0) = x0 + 1, [primes] = 0 orientation: proper#(divides(X1,X2)) = X1 + X2 + 2 >= X1 + 1 = proper#(X1) proper#(divides(X1,X2)) = X1 + X2 + 2 >= X2 + 1 = proper#(X2) proper#(filter(X1,X2)) = X1 + X2 + 2 >= X1 + 1 = proper#(X1) proper#(filter(X1,X2)) = X1 + X2 + 2 >= X2 + 1 = proper#(X2) proper#(if(X1,X2,X3)) = X1 + X2 + X3 + 1 >= X1 + 1 = proper#(X1) proper#(if(X1,X2,X3)) = X1 + X2 + X3 + 1 >= X2 + 1 = proper#(X2) proper#(if(X1,X2,X3)) = X1 + X2 + X3 + 1 >= X3 + 1 = proper#(X3) proper#(tail(X)) = X + 1 >= X + 1 = proper#(X) proper#(head(X)) = X + 1 >= X + 1 = proper#(X) proper#(cons(X1,X2)) = X1 + X2 + 1 >= X1 + 1 = proper#(X1) proper#(cons(X1,X2)) = X1 + X2 + 1 >= X2 + 1 = proper#(X2) proper#(s(X)) = X + 1 >= X + 1 = proper#(X) proper#(from(X)) = X + 2 >= X + 1 = proper#(X) proper#(sieve(X)) = X + 1 >= X + 1 = proper#(X) active(primes()) = 1 >= 1 = mark(sieve(from(s(s(0()))))) active(from(X)) = X + 2 >= 1 = mark(cons(X,from(s(X)))) active(head(cons(X,Y))) = X + Y + 1 >= 1 = mark(X) active(tail(cons(X,Y))) = X + Y + 1 >= 1 = mark(Y) active(if(true(),X,Y)) = X + Y + 2 >= 1 = mark(X) active(if(false(),X,Y)) = X + Y + 2 >= 1 = mark(Y) active(filter(s(s(X)),cons(Y,Z))) = X + Y + Z + 2 >= 1 = mark(if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y))))) active(sieve(cons(X,Y))) = X + Y + 1 >= 1 = mark(cons(X,filter(X,sieve(Y)))) active(sieve(X)) = X + 1 >= X + 1 = sieve(active(X)) active(from(X)) = X + 2 >= X + 2 = from(active(X)) active(s(X)) = X + 1 >= X + 1 = s(active(X)) active(cons(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = cons(active(X1),X2) active(head(X)) = X + 1 >= X + 1 = head(active(X)) active(tail(X)) = X + 1 >= X + 1 = tail(active(X)) active(if(X1,X2,X3)) = X1 + X2 + X3 + 1 >= X1 + X2 + X3 + 1 = if(active(X1),X2,X3) active(filter(X1,X2)) = X1 + X2 + 2 >= X1 + X2 + 2 = filter(active(X1),X2) active(filter(X1,X2)) = X1 + X2 + 2 >= X1 + X2 + 2 = filter(X1,active(X2)) active(divides(X1,X2)) = X1 + X2 + 2 >= X1 + X2 + 2 = divides(active(X1),X2) active(divides(X1,X2)) = X1 + X2 + 2 >= X1 + X2 + 2 = divides(X1,active(X2)) sieve(mark(X)) = 1 >= 1 = mark(sieve(X)) from(mark(X)) = 2 >= 1 = mark(from(X)) s(mark(X)) = 1 >= 1 = mark(s(X)) cons(mark(X1),X2) = X2 + 1 >= 1 = mark(cons(X1,X2)) head(mark(X)) = 1 >= 1 = mark(head(X)) tail(mark(X)) = 1 >= 1 = mark(tail(X)) if(mark(X1),X2,X3) = X2 + X3 + 1 >= 1 = mark(if(X1,X2,X3)) filter(mark(X1),X2) = X2 + 2 >= 1 = mark(filter(X1,X2)) filter(X1,mark(X2)) = X1 + 2 >= 1 = mark(filter(X1,X2)) divides(mark(X1),X2) = X2 + 2 >= 1 = mark(divides(X1,X2)) divides(X1,mark(X2)) = X1 + 2 >= 1 = mark(divides(X1,X2)) proper(primes()) = 0 >= 0 = ok(primes()) proper(sieve(X)) = X >= X = sieve(proper(X)) proper(from(X)) = X + 1 >= X + 1 = from(proper(X)) proper(s(X)) = X >= X = s(proper(X)) proper(0()) = 0 >= 0 = ok(0()) proper(cons(X1,X2)) = X1 + X2 >= X1 + X2 = cons(proper(X1),proper(X2)) proper(head(X)) = X >= X = head(proper(X)) proper(tail(X)) = X >= X = tail(proper(X)) proper(if(X1,X2,X3)) = X1 + X2 + X3 >= X1 + X2 + X3 = if(proper(X1),proper(X2),proper(X3)) proper(true()) = 1 >= 1 = ok(true()) proper(false()) = 1 >= 1 = ok(false()) proper(filter(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = filter(proper(X1),proper(X2)) proper(divides(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = divides(proper(X1),proper(X2)) sieve(ok(X)) = X >= X = ok(sieve(X)) from(ok(X)) = X + 1 >= X + 1 = ok(from(X)) s(ok(X)) = X >= X = ok(s(X)) cons(ok(X1),ok(X2)) = X1 + X2 >= X1 + X2 = ok(cons(X1,X2)) head(ok(X)) = X >= X = ok(head(X)) tail(ok(X)) = X >= X = ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) = X1 + X2 + X3 >= X1 + X2 + X3 = ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = ok(filter(X1,X2)) divides(ok(X1),ok(X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = ok(divides(X1,X2)) top(mark(X)) = 1 >= 1 = top(proper(X)) top(ok(X)) = 1 >= 1 = top(active(X)) problem: DPs: proper#(if(X1,X2,X3)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X3) proper#(tail(X)) -> proper#(X) proper#(head(X)) -> proper#(X) proper#(cons(X1,X2)) -> proper#(X1) proper#(cons(X1,X2)) -> proper#(X2) proper#(s(X)) -> proper#(X) proper#(sieve(X)) -> proper#(X) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Matrix Interpretation Processor: dimension: 1 interpretation: [proper#](x0) = x0, [top](x0) = 0, [ok](x0) = x0, [proper](x0) = x0, [divides](x0, x1) = 1, [filter](x0, x1) = 1, [false] = 0, [if](x0, x1, x2) = x0 + x1 + x2, [true] = 0, [tail](x0) = x0, [head](x0) = x0, [cons](x0, x1) = x0 + x1, [mark](x0) = 1, [sieve](x0) = x0 + 1, [from](x0) = x0 + 1, [s](x0) = x0, [0] = 0, [active](x0) = x0 + 1, [primes] = 0 orientation: proper#(if(X1,X2,X3)) = X1 + X2 + X3 >= X1 = proper#(X1) proper#(if(X1,X2,X3)) = X1 + X2 + X3 >= X2 = proper#(X2) proper#(if(X1,X2,X3)) = X1 + X2 + X3 >= X3 = proper#(X3) proper#(tail(X)) = X >= X = proper#(X) proper#(head(X)) = X >= X = proper#(X) proper#(cons(X1,X2)) = X1 + X2 >= X1 = proper#(X1) proper#(cons(X1,X2)) = X1 + X2 >= X2 = proper#(X2) proper#(s(X)) = X >= X = proper#(X) proper#(sieve(X)) = X + 1 >= X = proper#(X) active(primes()) = 1 >= 1 = mark(sieve(from(s(s(0()))))) active(from(X)) = X + 2 >= 1 = mark(cons(X,from(s(X)))) active(head(cons(X,Y))) = X + Y + 1 >= 1 = mark(X) active(tail(cons(X,Y))) = X + Y + 1 >= 1 = mark(Y) active(if(true(),X,Y)) = X + Y + 1 >= 1 = mark(X) active(if(false(),X,Y)) = X + Y + 1 >= 1 = mark(Y) active(filter(s(s(X)),cons(Y,Z))) = 2 >= 1 = mark(if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y))))) active(sieve(cons(X,Y))) = X + Y + 2 >= 1 = mark(cons(X,filter(X,sieve(Y)))) active(sieve(X)) = X + 2 >= X + 2 = sieve(active(X)) active(from(X)) = X + 2 >= X + 2 = from(active(X)) active(s(X)) = X + 1 >= X + 1 = s(active(X)) active(cons(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = cons(active(X1),X2) active(head(X)) = X + 1 >= X + 1 = head(active(X)) active(tail(X)) = X + 1 >= X + 1 = tail(active(X)) active(if(X1,X2,X3)) = X1 + X2 + X3 + 1 >= X1 + X2 + X3 + 1 = if(active(X1),X2,X3) active(filter(X1,X2)) = 2 >= 1 = filter(active(X1),X2) active(filter(X1,X2)) = 2 >= 1 = filter(X1,active(X2)) active(divides(X1,X2)) = 2 >= 1 = divides(active(X1),X2) active(divides(X1,X2)) = 2 >= 1 = divides(X1,active(X2)) sieve(mark(X)) = 2 >= 1 = mark(sieve(X)) from(mark(X)) = 2 >= 1 = mark(from(X)) s(mark(X)) = 1 >= 1 = mark(s(X)) cons(mark(X1),X2) = X2 + 1 >= 1 = mark(cons(X1,X2)) head(mark(X)) = 1 >= 1 = mark(head(X)) tail(mark(X)) = 1 >= 1 = mark(tail(X)) if(mark(X1),X2,X3) = X2 + X3 + 1 >= 1 = mark(if(X1,X2,X3)) filter(mark(X1),X2) = 1 >= 1 = mark(filter(X1,X2)) filter(X1,mark(X2)) = 1 >= 1 = mark(filter(X1,X2)) divides(mark(X1),X2) = 1 >= 1 = mark(divides(X1,X2)) divides(X1,mark(X2)) = 1 >= 1 = mark(divides(X1,X2)) proper(primes()) = 0 >= 0 = ok(primes()) proper(sieve(X)) = X + 1 >= X + 1 = sieve(proper(X)) proper(from(X)) = X + 1 >= X + 1 = from(proper(X)) proper(s(X)) = X >= X = s(proper(X)) proper(0()) = 0 >= 0 = ok(0()) proper(cons(X1,X2)) = X1 + X2 >= X1 + X2 = cons(proper(X1),proper(X2)) proper(head(X)) = X >= X = head(proper(X)) proper(tail(X)) = X >= X = tail(proper(X)) proper(if(X1,X2,X3)) = X1 + X2 + X3 >= X1 + X2 + X3 = if(proper(X1),proper(X2),proper(X3)) proper(true()) = 0 >= 0 = ok(true()) proper(false()) = 0 >= 0 = ok(false()) proper(filter(X1,X2)) = 1 >= 1 = filter(proper(X1),proper(X2)) proper(divides(X1,X2)) = 1 >= 1 = divides(proper(X1),proper(X2)) sieve(ok(X)) = X + 1 >= X + 1 = ok(sieve(X)) from(ok(X)) = X + 1 >= X + 1 = ok(from(X)) s(ok(X)) = X >= X = ok(s(X)) cons(ok(X1),ok(X2)) = X1 + X2 >= X1 + X2 = ok(cons(X1,X2)) head(ok(X)) = X >= X = ok(head(X)) tail(ok(X)) = X >= X = ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) = X1 + X2 + X3 >= X1 + X2 + X3 = ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) = 1 >= 1 = ok(filter(X1,X2)) divides(ok(X1),ok(X2)) = 1 >= 1 = ok(divides(X1,X2)) top(mark(X)) = 0 >= 0 = top(proper(X)) top(ok(X)) = 0 >= 0 = top(active(X)) problem: DPs: proper#(if(X1,X2,X3)) -> proper#(X1) proper#(if(X1,X2,X3)) -> proper#(X2) proper#(if(X1,X2,X3)) -> proper#(X3) proper#(tail(X)) -> proper#(X) proper#(head(X)) -> proper#(X) proper#(cons(X1,X2)) -> proper#(X1) proper#(cons(X1,X2)) -> proper#(X2) proper#(s(X)) -> proper#(X) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Matrix Interpretation Processor: dimension: 1 interpretation: [proper#](x0) = x0 + 1, [top](x0) = 0, [ok](x0) = x0, [proper](x0) = x0, [divides](x0, x1) = 0, [filter](x0, x1) = x1, [false] = 0, [if](x0, x1, x2) = x0 + x1 + x2 + 1, [true] = 0, [tail](x0) = x0 + 1, [head](x0) = x0 + 1, [cons](x0, x1) = x0 + x1 + 1, [mark](x0) = 0, [sieve](x0) = 1, [from](x0) = 0, [s](x0) = x0 + 1, [0] = 0, [active](x0) = x0, [primes] = 0 orientation: proper#(if(X1,X2,X3)) = X1 + X2 + X3 + 2 >= X1 + 1 = proper#(X1) proper#(if(X1,X2,X3)) = X1 + X2 + X3 + 2 >= X2 + 1 = proper#(X2) proper#(if(X1,X2,X3)) = X1 + X2 + X3 + 2 >= X3 + 1 = proper#(X3) proper#(tail(X)) = X + 2 >= X + 1 = proper#(X) proper#(head(X)) = X + 2 >= X + 1 = proper#(X) proper#(cons(X1,X2)) = X1 + X2 + 2 >= X1 + 1 = proper#(X1) proper#(cons(X1,X2)) = X1 + X2 + 2 >= X2 + 1 = proper#(X2) proper#(s(X)) = X + 2 >= X + 1 = proper#(X) active(primes()) = 0 >= 0 = mark(sieve(from(s(s(0()))))) active(from(X)) = 0 >= 0 = mark(cons(X,from(s(X)))) active(head(cons(X,Y))) = X + Y + 2 >= 0 = mark(X) active(tail(cons(X,Y))) = X + Y + 2 >= 0 = mark(Y) active(if(true(),X,Y)) = X + Y + 1 >= 0 = mark(X) active(if(false(),X,Y)) = X + Y + 1 >= 0 = mark(Y) active(filter(s(s(X)),cons(Y,Z))) = Y + Z + 1 >= 0 = mark(if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y))))) active(sieve(cons(X,Y))) = 1 >= 0 = mark(cons(X,filter(X,sieve(Y)))) active(sieve(X)) = 1 >= 1 = sieve(active(X)) active(from(X)) = 0 >= 0 = from(active(X)) active(s(X)) = X + 1 >= X + 1 = s(active(X)) active(cons(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = cons(active(X1),X2) active(head(X)) = X + 1 >= X + 1 = head(active(X)) active(tail(X)) = X + 1 >= X + 1 = tail(active(X)) active(if(X1,X2,X3)) = X1 + X2 + X3 + 1 >= X1 + X2 + X3 + 1 = if(active(X1),X2,X3) active(filter(X1,X2)) = X2 >= X2 = filter(active(X1),X2) active(filter(X1,X2)) = X2 >= X2 = filter(X1,active(X2)) active(divides(X1,X2)) = 0 >= 0 = divides(active(X1),X2) active(divides(X1,X2)) = 0 >= 0 = divides(X1,active(X2)) sieve(mark(X)) = 1 >= 0 = mark(sieve(X)) from(mark(X)) = 0 >= 0 = mark(from(X)) s(mark(X)) = 1 >= 0 = mark(s(X)) cons(mark(X1),X2) = X2 + 1 >= 0 = mark(cons(X1,X2)) head(mark(X)) = 1 >= 0 = mark(head(X)) tail(mark(X)) = 1 >= 0 = mark(tail(X)) if(mark(X1),X2,X3) = X2 + X3 + 1 >= 0 = mark(if(X1,X2,X3)) filter(mark(X1),X2) = X2 >= 0 = mark(filter(X1,X2)) filter(X1,mark(X2)) = 0 >= 0 = mark(filter(X1,X2)) divides(mark(X1),X2) = 0 >= 0 = mark(divides(X1,X2)) divides(X1,mark(X2)) = 0 >= 0 = mark(divides(X1,X2)) proper(primes()) = 0 >= 0 = ok(primes()) proper(sieve(X)) = 1 >= 1 = sieve(proper(X)) proper(from(X)) = 0 >= 0 = from(proper(X)) proper(s(X)) = X + 1 >= X + 1 = s(proper(X)) proper(0()) = 0 >= 0 = ok(0()) proper(cons(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = cons(proper(X1),proper(X2)) proper(head(X)) = X + 1 >= X + 1 = head(proper(X)) proper(tail(X)) = X + 1 >= X + 1 = tail(proper(X)) proper(if(X1,X2,X3)) = X1 + X2 + X3 + 1 >= X1 + X2 + X3 + 1 = if(proper(X1),proper(X2),proper(X3)) proper(true()) = 0 >= 0 = ok(true()) proper(false()) = 0 >= 0 = ok(false()) proper(filter(X1,X2)) = X2 >= X2 = filter(proper(X1),proper(X2)) proper(divides(X1,X2)) = 0 >= 0 = divides(proper(X1),proper(X2)) sieve(ok(X)) = 1 >= 1 = ok(sieve(X)) from(ok(X)) = 0 >= 0 = ok(from(X)) s(ok(X)) = X + 1 >= X + 1 = ok(s(X)) cons(ok(X1),ok(X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = ok(cons(X1,X2)) head(ok(X)) = X + 1 >= X + 1 = ok(head(X)) tail(ok(X)) = X + 1 >= X + 1 = ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) = X1 + X2 + X3 + 1 >= X1 + X2 + X3 + 1 = ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) = X2 >= X2 = ok(filter(X1,X2)) divides(ok(X1),ok(X2)) = 0 >= 0 = ok(divides(X1,X2)) top(mark(X)) = 0 >= 0 = top(proper(X)) top(ok(X)) = 0 >= 0 = top(active(X)) problem: DPs: TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Qed DPs: 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) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Matrix Interpretation Processor: dimension: 1 interpretation: [active#](x0) = x0 + 1, [top](x0) = 0, [ok](x0) = 0, [proper](x0) = x0, [divides](x0, x1) = x0 + x1 + 1, [filter](x0, x1) = x0 + x1 + 1, [false] = 0, [if](x0, x1, x2) = x0 + 1, [true] = 0, [tail](x0) = x0 + 1, [head](x0) = x0 + 1, [cons](x0, x1) = x0 + x1 + 1, [mark](x0) = 1, [sieve](x0) = x0, [from](x0) = x0 + 1, [s](x0) = x0, [0] = 0, [active](x0) = x0, [primes] = 1 orientation: active#(divides(X1,X2)) = X1 + X2 + 2 >= X2 + 1 = active#(X2) active#(divides(X1,X2)) = X1 + X2 + 2 >= X1 + 1 = active#(X1) active#(filter(X1,X2)) = X1 + X2 + 2 >= X2 + 1 = active#(X2) active#(filter(X1,X2)) = X1 + X2 + 2 >= X1 + 1 = active#(X1) active#(if(X1,X2,X3)) = X1 + 2 >= X1 + 1 = active#(X1) active#(tail(X)) = X + 2 >= X + 1 = active#(X) active#(head(X)) = X + 2 >= X + 1 = active#(X) active#(cons(X1,X2)) = X1 + X2 + 2 >= X1 + 1 = active#(X1) active#(s(X)) = X + 1 >= X + 1 = active#(X) active#(from(X)) = X + 2 >= X + 1 = active#(X) active#(sieve(X)) = X + 1 >= X + 1 = active#(X) active(primes()) = 1 >= 1 = mark(sieve(from(s(s(0()))))) active(from(X)) = X + 1 >= 1 = mark(cons(X,from(s(X)))) active(head(cons(X,Y))) = X + Y + 2 >= 1 = mark(X) active(tail(cons(X,Y))) = X + Y + 2 >= 1 = mark(Y) active(if(true(),X,Y)) = 1 >= 1 = mark(X) active(if(false(),X,Y)) = 1 >= 1 = mark(Y) active(filter(s(s(X)),cons(Y,Z))) = X + Y + Z + 2 >= 1 = mark(if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y))))) active(sieve(cons(X,Y))) = X + Y + 1 >= 1 = mark(cons(X,filter(X,sieve(Y)))) active(sieve(X)) = X >= X = sieve(active(X)) active(from(X)) = X + 1 >= X + 1 = from(active(X)) active(s(X)) = X >= X = s(active(X)) active(cons(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = cons(active(X1),X2) active(head(X)) = X + 1 >= X + 1 = head(active(X)) active(tail(X)) = X + 1 >= X + 1 = tail(active(X)) active(if(X1,X2,X3)) = X1 + 1 >= X1 + 1 = if(active(X1),X2,X3) active(filter(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = filter(active(X1),X2) active(filter(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = filter(X1,active(X2)) active(divides(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = divides(active(X1),X2) active(divides(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = divides(X1,active(X2)) sieve(mark(X)) = 1 >= 1 = mark(sieve(X)) from(mark(X)) = 2 >= 1 = mark(from(X)) s(mark(X)) = 1 >= 1 = mark(s(X)) cons(mark(X1),X2) = X2 + 2 >= 1 = mark(cons(X1,X2)) head(mark(X)) = 2 >= 1 = mark(head(X)) tail(mark(X)) = 2 >= 1 = mark(tail(X)) if(mark(X1),X2,X3) = 2 >= 1 = mark(if(X1,X2,X3)) filter(mark(X1),X2) = X2 + 2 >= 1 = mark(filter(X1,X2)) filter(X1,mark(X2)) = X1 + 2 >= 1 = mark(filter(X1,X2)) divides(mark(X1),X2) = X2 + 2 >= 1 = mark(divides(X1,X2)) divides(X1,mark(X2)) = X1 + 2 >= 1 = mark(divides(X1,X2)) proper(primes()) = 1 >= 0 = ok(primes()) proper(sieve(X)) = X >= X = sieve(proper(X)) proper(from(X)) = X + 1 >= X + 1 = from(proper(X)) proper(s(X)) = X >= X = s(proper(X)) proper(0()) = 0 >= 0 = ok(0()) proper(cons(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = cons(proper(X1),proper(X2)) proper(head(X)) = X + 1 >= X + 1 = head(proper(X)) proper(tail(X)) = X + 1 >= X + 1 = tail(proper(X)) proper(if(X1,X2,X3)) = X1 + 1 >= X1 + 1 = if(proper(X1),proper(X2),proper(X3)) proper(true()) = 0 >= 0 = ok(true()) proper(false()) = 0 >= 0 = ok(false()) proper(filter(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = filter(proper(X1),proper(X2)) proper(divides(X1,X2)) = X1 + X2 + 1 >= X1 + X2 + 1 = divides(proper(X1),proper(X2)) sieve(ok(X)) = 0 >= 0 = ok(sieve(X)) from(ok(X)) = 1 >= 0 = ok(from(X)) s(ok(X)) = 0 >= 0 = ok(s(X)) cons(ok(X1),ok(X2)) = 1 >= 0 = ok(cons(X1,X2)) head(ok(X)) = 1 >= 0 = ok(head(X)) tail(ok(X)) = 1 >= 0 = ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) = 1 >= 0 = ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) = 1 >= 0 = ok(filter(X1,X2)) divides(ok(X1),ok(X2)) = 1 >= 0 = ok(divides(X1,X2)) top(mark(X)) = 0 >= 0 = top(proper(X)) top(ok(X)) = 0 >= 0 = top(active(X)) problem: DPs: active#(s(X)) -> active#(X) active#(sieve(X)) -> active#(X) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Matrix Interpretation Processor: dimension: 1 interpretation: [active#](x0) = x0 + 1, [top](x0) = 1, [ok](x0) = x0, [proper](x0) = x0, [divides](x0, x1) = 0, [filter](x0, x1) = 0, [false] = 0, [if](x0, x1, x2) = 1, [true] = 0, [tail](x0) = 0, [head](x0) = 0, [cons](x0, x1) = 0, [mark](x0) = 0, [sieve](x0) = x0, [from](x0) = 1, [s](x0) = x0 + 1, [0] = 1, [active](x0) = x0, [primes] = 0 orientation: active#(s(X)) = X + 2 >= X + 1 = active#(X) active#(sieve(X)) = X + 1 >= X + 1 = active#(X) active(primes()) = 0 >= 0 = mark(sieve(from(s(s(0()))))) active(from(X)) = 1 >= 0 = mark(cons(X,from(s(X)))) active(head(cons(X,Y))) = 0 >= 0 = mark(X) active(tail(cons(X,Y))) = 0 >= 0 = mark(Y) active(if(true(),X,Y)) = 1 >= 0 = mark(X) active(if(false(),X,Y)) = 1 >= 0 = mark(Y) active(filter(s(s(X)),cons(Y,Z))) = 0 >= 0 = mark(if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y))))) active(sieve(cons(X,Y))) = 0 >= 0 = mark(cons(X,filter(X,sieve(Y)))) active(sieve(X)) = X >= X = sieve(active(X)) active(from(X)) = 1 >= 1 = from(active(X)) active(s(X)) = X + 1 >= X + 1 = s(active(X)) active(cons(X1,X2)) = 0 >= 0 = cons(active(X1),X2) active(head(X)) = 0 >= 0 = head(active(X)) active(tail(X)) = 0 >= 0 = tail(active(X)) active(if(X1,X2,X3)) = 1 >= 1 = if(active(X1),X2,X3) active(filter(X1,X2)) = 0 >= 0 = filter(active(X1),X2) active(filter(X1,X2)) = 0 >= 0 = filter(X1,active(X2)) active(divides(X1,X2)) = 0 >= 0 = divides(active(X1),X2) active(divides(X1,X2)) = 0 >= 0 = divides(X1,active(X2)) sieve(mark(X)) = 0 >= 0 = mark(sieve(X)) from(mark(X)) = 1 >= 0 = mark(from(X)) s(mark(X)) = 1 >= 0 = mark(s(X)) cons(mark(X1),X2) = 0 >= 0 = mark(cons(X1,X2)) head(mark(X)) = 0 >= 0 = mark(head(X)) tail(mark(X)) = 0 >= 0 = mark(tail(X)) if(mark(X1),X2,X3) = 1 >= 0 = mark(if(X1,X2,X3)) filter(mark(X1),X2) = 0 >= 0 = mark(filter(X1,X2)) filter(X1,mark(X2)) = 0 >= 0 = mark(filter(X1,X2)) divides(mark(X1),X2) = 0 >= 0 = mark(divides(X1,X2)) divides(X1,mark(X2)) = 0 >= 0 = mark(divides(X1,X2)) proper(primes()) = 0 >= 0 = ok(primes()) proper(sieve(X)) = X >= X = sieve(proper(X)) proper(from(X)) = 1 >= 1 = from(proper(X)) proper(s(X)) = X + 1 >= X + 1 = s(proper(X)) proper(0()) = 1 >= 1 = ok(0()) proper(cons(X1,X2)) = 0 >= 0 = cons(proper(X1),proper(X2)) proper(head(X)) = 0 >= 0 = head(proper(X)) proper(tail(X)) = 0 >= 0 = tail(proper(X)) proper(if(X1,X2,X3)) = 1 >= 1 = if(proper(X1),proper(X2),proper(X3)) proper(true()) = 0 >= 0 = ok(true()) proper(false()) = 0 >= 0 = ok(false()) proper(filter(X1,X2)) = 0 >= 0 = filter(proper(X1),proper(X2)) proper(divides(X1,X2)) = 0 >= 0 = divides(proper(X1),proper(X2)) sieve(ok(X)) = X >= X = ok(sieve(X)) from(ok(X)) = 1 >= 1 = ok(from(X)) s(ok(X)) = X + 1 >= X + 1 = ok(s(X)) cons(ok(X1),ok(X2)) = 0 >= 0 = ok(cons(X1,X2)) head(ok(X)) = 0 >= 0 = ok(head(X)) tail(ok(X)) = 0 >= 0 = ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) = 1 >= 1 = ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) = 0 >= 0 = ok(filter(X1,X2)) divides(ok(X1),ok(X2)) = 0 >= 0 = ok(divides(X1,X2)) top(mark(X)) = 1 >= 1 = top(proper(X)) top(ok(X)) = 1 >= 1 = top(active(X)) problem: DPs: active#(sieve(X)) -> active#(X) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Matrix Interpretation Processor: dimension: 1 interpretation: [active#](x0) = x0 + 1, [top](x0) = 0, [ok](x0) = x0, [proper](x0) = x0, [divides](x0, x1) = 0, [filter](x0, x1) = 0, [false] = 0, [if](x0, x1, x2) = x0, [true] = 1, [tail](x0) = 0, [head](x0) = 0, [cons](x0, x1) = 0, [mark](x0) = 0, [sieve](x0) = x0 + 1, [from](x0) = 0, [s](x0) = 0, [0] = 0, [active](x0) = x0, [primes] = 0 orientation: active#(sieve(X)) = X + 2 >= X + 1 = active#(X) active(primes()) = 0 >= 0 = mark(sieve(from(s(s(0()))))) active(from(X)) = 0 >= 0 = mark(cons(X,from(s(X)))) active(head(cons(X,Y))) = 0 >= 0 = mark(X) active(tail(cons(X,Y))) = 0 >= 0 = mark(Y) active(if(true(),X,Y)) = 1 >= 0 = mark(X) active(if(false(),X,Y)) = 0 >= 0 = mark(Y) active(filter(s(s(X)),cons(Y,Z))) = 0 >= 0 = mark(if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y))))) active(sieve(cons(X,Y))) = 1 >= 0 = mark(cons(X,filter(X,sieve(Y)))) active(sieve(X)) = X + 1 >= X + 1 = sieve(active(X)) active(from(X)) = 0 >= 0 = from(active(X)) active(s(X)) = 0 >= 0 = s(active(X)) active(cons(X1,X2)) = 0 >= 0 = cons(active(X1),X2) active(head(X)) = 0 >= 0 = head(active(X)) active(tail(X)) = 0 >= 0 = tail(active(X)) active(if(X1,X2,X3)) = X1 >= X1 = if(active(X1),X2,X3) active(filter(X1,X2)) = 0 >= 0 = filter(active(X1),X2) active(filter(X1,X2)) = 0 >= 0 = filter(X1,active(X2)) active(divides(X1,X2)) = 0 >= 0 = divides(active(X1),X2) active(divides(X1,X2)) = 0 >= 0 = divides(X1,active(X2)) sieve(mark(X)) = 1 >= 0 = mark(sieve(X)) from(mark(X)) = 0 >= 0 = mark(from(X)) s(mark(X)) = 0 >= 0 = mark(s(X)) cons(mark(X1),X2) = 0 >= 0 = mark(cons(X1,X2)) head(mark(X)) = 0 >= 0 = mark(head(X)) tail(mark(X)) = 0 >= 0 = mark(tail(X)) if(mark(X1),X2,X3) = 0 >= 0 = mark(if(X1,X2,X3)) filter(mark(X1),X2) = 0 >= 0 = mark(filter(X1,X2)) filter(X1,mark(X2)) = 0 >= 0 = mark(filter(X1,X2)) divides(mark(X1),X2) = 0 >= 0 = mark(divides(X1,X2)) divides(X1,mark(X2)) = 0 >= 0 = mark(divides(X1,X2)) proper(primes()) = 0 >= 0 = ok(primes()) proper(sieve(X)) = X + 1 >= X + 1 = sieve(proper(X)) proper(from(X)) = 0 >= 0 = from(proper(X)) proper(s(X)) = 0 >= 0 = s(proper(X)) proper(0()) = 0 >= 0 = ok(0()) proper(cons(X1,X2)) = 0 >= 0 = cons(proper(X1),proper(X2)) proper(head(X)) = 0 >= 0 = head(proper(X)) proper(tail(X)) = 0 >= 0 = tail(proper(X)) proper(if(X1,X2,X3)) = X1 >= X1 = if(proper(X1),proper(X2),proper(X3)) proper(true()) = 1 >= 1 = ok(true()) proper(false()) = 0 >= 0 = ok(false()) proper(filter(X1,X2)) = 0 >= 0 = filter(proper(X1),proper(X2)) proper(divides(X1,X2)) = 0 >= 0 = divides(proper(X1),proper(X2)) sieve(ok(X)) = X + 1 >= X + 1 = ok(sieve(X)) from(ok(X)) = 0 >= 0 = ok(from(X)) s(ok(X)) = 0 >= 0 = ok(s(X)) cons(ok(X1),ok(X2)) = 0 >= 0 = ok(cons(X1,X2)) head(ok(X)) = 0 >= 0 = ok(head(X)) tail(ok(X)) = 0 >= 0 = ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) = X1 >= X1 = ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) = 0 >= 0 = ok(filter(X1,X2)) divides(ok(X1),ok(X2)) = 0 >= 0 = ok(divides(X1,X2)) top(mark(X)) = 0 >= 0 = top(proper(X)) top(ok(X)) = 0 >= 0 = top(active(X)) problem: DPs: TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Qed DPs: sieve#(ok(X)) -> sieve#(X) sieve#(mark(X)) -> sieve#(X) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Open DPs: from#(ok(X)) -> from#(X) from#(mark(X)) -> from#(X) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Open DPs: s#(ok(X)) -> s#(X) s#(mark(X)) -> s#(X) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Open DPs: cons#(ok(X1),ok(X2)) -> cons#(X1,X2) cons#(mark(X1),X2) -> cons#(X1,X2) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Matrix Interpretation Processor: dimension: 1 interpretation: [cons#](x0, x1) = x1 + 1, [top](x0) = 1, [ok](x0) = x0 + 1, [proper](x0) = x0 + 1, [divides](x0, x1) = x1, [filter](x0, x1) = x0, [false] = 1, [if](x0, x1, x2) = x1, [true] = 0, [tail](x0) = x0, [head](x0) = x0, [cons](x0, x1) = x0, [mark](x0) = 0, [sieve](x0) = x0, [from](x0) = x0, [s](x0) = x0 + 1, [0] = 1, [active](x0) = x0, [primes] = 0 orientation: cons#(ok(X1),ok(X2)) = X2 + 2 >= X2 + 1 = cons#(X1,X2) cons#(mark(X1),X2) = X2 + 1 >= X2 + 1 = cons#(X1,X2) active(primes()) = 0 >= 0 = mark(sieve(from(s(s(0()))))) active(from(X)) = X >= 0 = mark(cons(X,from(s(X)))) active(head(cons(X,Y))) = X >= 0 = mark(X) active(tail(cons(X,Y))) = X >= 0 = mark(Y) active(if(true(),X,Y)) = X >= 0 = mark(X) active(if(false(),X,Y)) = X >= 0 = mark(Y) active(filter(s(s(X)),cons(Y,Z))) = X + 2 >= 0 = mark(if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y))))) active(sieve(cons(X,Y))) = X >= 0 = mark(cons(X,filter(X,sieve(Y)))) active(sieve(X)) = X >= X = sieve(active(X)) active(from(X)) = X >= X = from(active(X)) active(s(X)) = X + 1 >= X + 1 = s(active(X)) active(cons(X1,X2)) = X1 >= X1 = cons(active(X1),X2) active(head(X)) = X >= X = head(active(X)) active(tail(X)) = X >= X = tail(active(X)) active(if(X1,X2,X3)) = X2 >= X2 = if(active(X1),X2,X3) active(filter(X1,X2)) = X1 >= X1 = filter(active(X1),X2) active(filter(X1,X2)) = X1 >= X1 = filter(X1,active(X2)) active(divides(X1,X2)) = X2 >= X2 = divides(active(X1),X2) active(divides(X1,X2)) = X2 >= X2 = divides(X1,active(X2)) sieve(mark(X)) = 0 >= 0 = mark(sieve(X)) from(mark(X)) = 0 >= 0 = mark(from(X)) s(mark(X)) = 1 >= 0 = mark(s(X)) cons(mark(X1),X2) = 0 >= 0 = mark(cons(X1,X2)) head(mark(X)) = 0 >= 0 = mark(head(X)) tail(mark(X)) = 0 >= 0 = mark(tail(X)) if(mark(X1),X2,X3) = X2 >= 0 = mark(if(X1,X2,X3)) filter(mark(X1),X2) = 0 >= 0 = mark(filter(X1,X2)) filter(X1,mark(X2)) = X1 >= 0 = mark(filter(X1,X2)) divides(mark(X1),X2) = X2 >= 0 = mark(divides(X1,X2)) divides(X1,mark(X2)) = 0 >= 0 = mark(divides(X1,X2)) proper(primes()) = 1 >= 1 = ok(primes()) proper(sieve(X)) = X + 1 >= X + 1 = sieve(proper(X)) proper(from(X)) = X + 1 >= X + 1 = from(proper(X)) proper(s(X)) = X + 2 >= X + 2 = s(proper(X)) proper(0()) = 2 >= 2 = ok(0()) proper(cons(X1,X2)) = X1 + 1 >= X1 + 1 = cons(proper(X1),proper(X2)) proper(head(X)) = X + 1 >= X + 1 = head(proper(X)) proper(tail(X)) = X + 1 >= X + 1 = tail(proper(X)) proper(if(X1,X2,X3)) = X2 + 1 >= X2 + 1 = if(proper(X1),proper(X2),proper(X3)) proper(true()) = 1 >= 1 = ok(true()) proper(false()) = 2 >= 2 = ok(false()) proper(filter(X1,X2)) = X1 + 1 >= X1 + 1 = filter(proper(X1),proper(X2)) proper(divides(X1,X2)) = X2 + 1 >= X2 + 1 = divides(proper(X1),proper(X2)) sieve(ok(X)) = X + 1 >= X + 1 = ok(sieve(X)) from(ok(X)) = X + 1 >= X + 1 = ok(from(X)) s(ok(X)) = X + 2 >= X + 2 = ok(s(X)) cons(ok(X1),ok(X2)) = X1 + 1 >= X1 + 1 = ok(cons(X1,X2)) head(ok(X)) = X + 1 >= X + 1 = ok(head(X)) tail(ok(X)) = X + 1 >= X + 1 = ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) = X2 + 1 >= X2 + 1 = ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) = X1 + 1 >= X1 + 1 = ok(filter(X1,X2)) divides(ok(X1),ok(X2)) = X2 + 1 >= X2 + 1 = ok(divides(X1,X2)) top(mark(X)) = 1 >= 1 = top(proper(X)) top(ok(X)) = 1 >= 1 = top(active(X)) problem: DPs: cons#(mark(X1),X2) -> cons#(X1,X2) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Open DPs: head#(ok(X)) -> head#(X) head#(mark(X)) -> head#(X) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Open DPs: tail#(ok(X)) -> tail#(X) tail#(mark(X)) -> tail#(X) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Open DPs: if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) if#(mark(X1),X2,X3) -> if#(X1,X2,X3) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Matrix Interpretation Processor: dimension: 1 interpretation: [if#](x0, x1, x2) = x1 + x2, [top](x0) = 0, [ok](x0) = x0 + 1, [proper](x0) = x0 + 1, [divides](x0, x1) = x1, [filter](x0, x1) = x0 + 1, [false] = 0, [if](x0, x1, x2) = x0, [true] = 0, [tail](x0) = x0, [head](x0) = x0 + 1, [cons](x0, x1) = x0 + 1, [mark](x0) = 0, [sieve](x0) = x0, [from](x0) = x0 + 1, [s](x0) = x0, [0] = 1, [active](x0) = x0, [primes] = 0 orientation: if#(ok(X1),ok(X2),ok(X3)) = X2 + X3 + 2 >= X2 + X3 = if#(X1,X2,X3) if#(mark(X1),X2,X3) = X2 + X3 >= X2 + X3 = if#(X1,X2,X3) active(primes()) = 0 >= 0 = mark(sieve(from(s(s(0()))))) active(from(X)) = X + 1 >= 0 = mark(cons(X,from(s(X)))) active(head(cons(X,Y))) = X + 2 >= 0 = mark(X) active(tail(cons(X,Y))) = X + 1 >= 0 = mark(Y) active(if(true(),X,Y)) = 0 >= 0 = mark(X) active(if(false(),X,Y)) = 0 >= 0 = mark(Y) active(filter(s(s(X)),cons(Y,Z))) = X + 1 >= 0 = mark(if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y))))) active(sieve(cons(X,Y))) = X + 1 >= 0 = mark(cons(X,filter(X,sieve(Y)))) active(sieve(X)) = X >= X = sieve(active(X)) active(from(X)) = X + 1 >= X + 1 = from(active(X)) active(s(X)) = X >= X = s(active(X)) active(cons(X1,X2)) = X1 + 1 >= X1 + 1 = cons(active(X1),X2) active(head(X)) = X + 1 >= X + 1 = head(active(X)) active(tail(X)) = X >= X = tail(active(X)) active(if(X1,X2,X3)) = X1 >= X1 = if(active(X1),X2,X3) active(filter(X1,X2)) = X1 + 1 >= X1 + 1 = filter(active(X1),X2) active(filter(X1,X2)) = X1 + 1 >= X1 + 1 = filter(X1,active(X2)) active(divides(X1,X2)) = X2 >= X2 = divides(active(X1),X2) active(divides(X1,X2)) = X2 >= X2 = divides(X1,active(X2)) sieve(mark(X)) = 0 >= 0 = mark(sieve(X)) from(mark(X)) = 1 >= 0 = mark(from(X)) s(mark(X)) = 0 >= 0 = mark(s(X)) cons(mark(X1),X2) = 1 >= 0 = mark(cons(X1,X2)) head(mark(X)) = 1 >= 0 = mark(head(X)) tail(mark(X)) = 0 >= 0 = mark(tail(X)) if(mark(X1),X2,X3) = 0 >= 0 = mark(if(X1,X2,X3)) filter(mark(X1),X2) = 1 >= 0 = mark(filter(X1,X2)) filter(X1,mark(X2)) = X1 + 1 >= 0 = mark(filter(X1,X2)) divides(mark(X1),X2) = X2 >= 0 = mark(divides(X1,X2)) divides(X1,mark(X2)) = 0 >= 0 = mark(divides(X1,X2)) proper(primes()) = 1 >= 1 = ok(primes()) proper(sieve(X)) = X + 1 >= X + 1 = sieve(proper(X)) proper(from(X)) = X + 2 >= X + 2 = from(proper(X)) proper(s(X)) = X + 1 >= X + 1 = s(proper(X)) proper(0()) = 2 >= 2 = ok(0()) proper(cons(X1,X2)) = X1 + 2 >= X1 + 2 = cons(proper(X1),proper(X2)) proper(head(X)) = X + 2 >= X + 2 = head(proper(X)) proper(tail(X)) = X + 1 >= X + 1 = tail(proper(X)) proper(if(X1,X2,X3)) = X1 + 1 >= X1 + 1 = if(proper(X1),proper(X2),proper(X3)) proper(true()) = 1 >= 1 = ok(true()) proper(false()) = 1 >= 1 = ok(false()) proper(filter(X1,X2)) = X1 + 2 >= X1 + 2 = filter(proper(X1),proper(X2)) proper(divides(X1,X2)) = X2 + 1 >= X2 + 1 = divides(proper(X1),proper(X2)) sieve(ok(X)) = X + 1 >= X + 1 = ok(sieve(X)) from(ok(X)) = X + 2 >= X + 2 = ok(from(X)) s(ok(X)) = X + 1 >= X + 1 = ok(s(X)) cons(ok(X1),ok(X2)) = X1 + 2 >= X1 + 2 = ok(cons(X1,X2)) head(ok(X)) = X + 2 >= X + 2 = ok(head(X)) tail(ok(X)) = X + 1 >= X + 1 = ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) = X1 + 1 >= X1 + 1 = ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) = X1 + 2 >= X1 + 2 = ok(filter(X1,X2)) divides(ok(X1),ok(X2)) = X2 + 1 >= X2 + 1 = ok(divides(X1,X2)) top(mark(X)) = 0 >= 0 = top(proper(X)) top(ok(X)) = 0 >= 0 = top(active(X)) problem: DPs: if#(mark(X1),X2,X3) -> if#(X1,X2,X3) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Open DPs: filter#(ok(X1),ok(X2)) -> filter#(X1,X2) filter#(X1,mark(X2)) -> filter#(X1,X2) filter#(mark(X1),X2) -> filter#(X1,X2) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Open DPs: divides#(ok(X1),ok(X2)) -> divides#(X1,X2) divides#(X1,mark(X2)) -> divides#(X1,X2) divides#(mark(X1),X2) -> divides#(X1,X2) TRS: 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)) from(mark(X)) -> mark(from(X)) s(mark(X)) -> mark(s(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) head(mark(X)) -> mark(head(X)) tail(mark(X)) -> mark(tail(X)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) filter(mark(X1),X2) -> mark(filter(X1,X2)) filter(X1,mark(X2)) -> mark(filter(X1,X2)) divides(mark(X1),X2) -> mark(divides(X1,X2)) divides(X1,mark(X2)) -> mark(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)) sieve(ok(X)) -> ok(sieve(X)) from(ok(X)) -> ok(from(X)) s(ok(X)) -> ok(s(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) head(ok(X)) -> ok(head(X)) tail(ok(X)) -> ok(tail(X)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) filter(ok(X1),ok(X2)) -> ok(filter(X1,X2)) divides(ok(X1),ok(X2)) -> ok(divides(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Open