(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

Q DP problem:
The TRS P consists of the following rules:

A__FILTER(cons(X, Y), s(N), M) → MARK(X)
A__SIEVE(cons(s(N), Y)) → MARK(N)
A__NATS(N) → MARK(N)
A__ZPRIMESA__SIEVE(a__nats(s(s(0))))
A__ZPRIMESA__NATS(s(s(0)))
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(filter(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2, X3)) → MARK(X2)
MARK(filter(X1, X2, X3)) → MARK(X3)
MARK(sieve(X)) → A__SIEVE(mark(X))
MARK(sieve(X)) → MARK(X)
MARK(nats(X)) → A__NATS(mark(X))
MARK(nats(X)) → MARK(X)
MARK(zprimes) → A__ZPRIMES
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(3) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(filter(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2, X3)) → MARK(X2)
MARK(filter(X1, X2, X3)) → MARK(X3)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
A__FILTER(x1, x2, x3)  =  x1
cons(x1, x2)  =  x1
s(x1)  =  x1
MARK(x1)  =  x1
A__SIEVE(x1)  =  x1
A__NATS(x1)  =  x1
A__ZPRIMES  =  A__ZPRIMES
a__nats(x1)  =  x1
0  =  0
filter(x1, x2, x3)  =  filter(x1, x2, x3)
mark(x1)  =  x1
sieve(x1)  =  x1
nats(x1)  =  x1
zprimes  =  zprimes
a__filter(x1, x2, x3)  =  a__filter(x1, x2, x3)
a__sieve(x1)  =  x1
a__zprimes  =  a__zprimes

Recursive path order with status [RPO].
Quasi-Precedence:
[filter3, afilter3] > [AZPRIMES, 0, zprimes, azprimes]

Status:
AZPRIMES: multiset
0: multiset
filter3: multiset
zprimes: multiset
afilter3: multiset
azprimes: multiset


The following usable rules [FROCOS05] were oriented:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

(4) Obligation:

Q DP problem:
The TRS P consists of the following rules:

A__FILTER(cons(X, Y), s(N), M) → MARK(X)
A__SIEVE(cons(s(N), Y)) → MARK(N)
A__NATS(N) → MARK(N)
A__ZPRIMESA__SIEVE(a__nats(s(s(0))))
A__ZPRIMESA__NATS(s(s(0)))
MARK(sieve(X)) → A__SIEVE(mark(X))
MARK(sieve(X)) → MARK(X)
MARK(nats(X)) → A__NATS(mark(X))
MARK(nats(X)) → MARK(X)
MARK(zprimes) → A__ZPRIMES
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(6) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MARK(sieve(X)) → A__SIEVE(mark(X))
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(sieve(X)) → MARK(X)
MARK(nats(X)) → A__NATS(mark(X))
A__NATS(N) → MARK(N)
MARK(nats(X)) → MARK(X)
MARK(zprimes) → A__ZPRIMES
A__ZPRIMESA__SIEVE(a__nats(s(s(0))))
A__ZPRIMESA__NATS(s(s(0)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(7) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MARK(sieve(X)) → MARK(X)
MARK(nats(X)) → MARK(X)
MARK(zprimes) → A__ZPRIMES
A__ZPRIMESA__SIEVE(a__nats(s(s(0))))
A__ZPRIMESA__NATS(s(s(0)))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  MARK(x1)
sieve(x1)  =  sieve(x1)
A__SIEVE(x1)  =  A__SIEVE(x1)
mark(x1)  =  mark(x1)
cons(x1, x2)  =  x1
s(x1)  =  x1
nats(x1)  =  nats(x1)
A__NATS(x1)  =  A__NATS(x1)
zprimes  =  zprimes
A__ZPRIMES  =  A__ZPRIMES
a__nats(x1)  =  a__nats(x1)
0  =  0
a__filter(x1, x2, x3)  =  a__filter(x1, x2, x3)
filter(x1, x2, x3)  =  filter(x1, x2, x3)
a__sieve(x1)  =  a__sieve(x1)
a__zprimes  =  a__zprimes

Recursive path order with status [RPO].
Quasi-Precedence:
[zprimes, AZPRIMES, azprimes] > [MARK1, sieve1, ASIEVE1, mark1, nats1, ANATS1, anats1, afilter3, filter3, asieve1] > 0

Status:
MARK1: multiset
sieve1: multiset
ASIEVE1: multiset
mark1: multiset
nats1: multiset
ANATS1: multiset
zprimes: multiset
AZPRIMES: multiset
anats1: multiset
0: multiset
afilter3: multiset
filter3: multiset
asieve1: multiset
azprimes: multiset


The following usable rules [FROCOS05] were oriented:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

(8) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MARK(sieve(X)) → A__SIEVE(mark(X))
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(nats(X)) → A__NATS(mark(X))
A__NATS(N) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(9) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(s(X)) → MARK(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  MARK(x1)
sieve(x1)  =  sieve(x1)
A__SIEVE(x1)  =  A__SIEVE(x1)
mark(x1)  =  mark(x1)
cons(x1, x2)  =  x1
s(x1)  =  s(x1)
nats(x1)  =  nats(x1)
A__NATS(x1)  =  A__NATS(x1)
a__filter(x1, x2, x3)  =  a__filter(x1, x2, x3)
0  =  0
filter(x1, x2, x3)  =  filter(x1, x2, x3)
a__sieve(x1)  =  a__sieve(x1)
a__nats(x1)  =  a__nats(x1)
a__zprimes  =  a__zprimes
zprimes  =  zprimes

Recursive path order with status [RPO].
Quasi-Precedence:
[azprimes, zprimes] > [MARK1, sieve1, ASIEVE1, mark1, s1, nats1, ANATS1, afilter3, 0, filter3, asieve1, anats1]

Status:
MARK1: multiset
sieve1: multiset
ASIEVE1: multiset
mark1: multiset
s1: multiset
nats1: multiset
ANATS1: multiset
afilter3: multiset
0: multiset
filter3: multiset
asieve1: multiset
anats1: multiset
azprimes: multiset
zprimes: multiset


The following usable rules [FROCOS05] were oriented:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

(10) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MARK(sieve(X)) → A__SIEVE(mark(X))
MARK(nats(X)) → A__NATS(mark(X))
A__NATS(N) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(11) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(12) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MARK(nats(X)) → A__NATS(mark(X))
A__NATS(N) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MARK(nats(X)) → A__NATS(mark(X))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  MARK(x1)
nats(x1)  =  nats(x1)
A__NATS(x1)  =  A__NATS(x1)
mark(x1)  =  x1
cons(x1, x2)  =  x1
a__filter(x1, x2, x3)  =  a__filter(x1, x2, x3)
0  =  0
filter(x1, x2, x3)  =  filter(x1, x2, x3)
s(x1)  =  s
a__sieve(x1)  =  a__sieve
sieve(x1)  =  sieve
a__nats(x1)  =  a__nats(x1)
a__zprimes  =  a__zprimes
zprimes  =  zprimes

Recursive path order with status [RPO].
Quasi-Precedence:
[nats1, anats1] > [0, s, asieve, sieve, azprimes, zprimes] > [MARK1, ANATS1, afilter3, filter3]

Status:
MARK1: multiset
nats1: [1]
ANATS1: multiset
afilter3: [1,2,3]
0: multiset
filter3: [1,2,3]
s: multiset
asieve: multiset
sieve: multiset
anats1: [1]
azprimes: multiset
zprimes: multiset


The following usable rules [FROCOS05] were oriented:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

(14) Obligation:

Q DP problem:
The TRS P consists of the following rules:

A__NATS(N) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(15) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(16) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(17) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MARK(cons(X1, X2)) → MARK(X1)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  x1
cons(x1, x2)  =  cons(x1)
a__filter(x1, x2, x3)  =  x1
0  =  0
filter(x1, x2, x3)  =  x1
s(x1)  =  s(x1)
mark(x1)  =  x1
a__sieve(x1)  =  x1
sieve(x1)  =  x1
a__nats(x1)  =  a__nats(x1)
nats(x1)  =  nats(x1)
a__zprimes  =  a__zprimes
zprimes  =  zprimes

Recursive path order with status [RPO].
Quasi-Precedence:
[azprimes, zprimes] > [cons1, anats1, nats1] > [0, s1]

Status:
cons1: multiset
0: multiset
s1: multiset
anats1: multiset
nats1: multiset
azprimes: multiset
zprimes: multiset


The following usable rules [FROCOS05] were oriented:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

(18) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(19) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(20) TRUE