0 QTRS
↳1 DependencyPairsProof (⇔, 3 ms)
↳2 QDP
↳3 DependencyGraphProof (⇔, 0 ms)
↳4 AND
↳5 QDP
↳6 NonLoopProof (⇔, 0 ms)
↳7 NO
↳8 QDP
↳9 QDPSizeChangeProof (⇔, 0 ms)
↳10 YES
↳11 QDP
↳12 MNOCProof (⇔, 0 ms)
↳13 QDP
↳14 UsableRulesProof (⇔, 0 ms)
↳15 QDP
↳16 QReductionProof (⇔, 0 ms)
↳17 QDP
↳18 QDPOrderProof (⇔, 19 ms)
↳19 QDP
↳20 PisEmptyProof (⇔, 0 ms)
↳21 YES
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
sieve(cons(0, Y)) → cons(0, sieve(Y))
sieve(cons(s(N), Y)) → cons(s(N), sieve(filter(Y, N, N)))
nats(N) → cons(N, nats(s(N)))
zprimes → sieve(nats(s(s(0))))
FILTER(cons(X, Y), 0, M) → FILTER(Y, M, M)
FILTER(cons(X, Y), s(N), M) → FILTER(Y, N, M)
SIEVE(cons(0, Y)) → SIEVE(Y)
SIEVE(cons(s(N), Y)) → SIEVE(filter(Y, N, N))
SIEVE(cons(s(N), Y)) → FILTER(Y, N, N)
NATS(N) → NATS(s(N))
ZPRIMES → SIEVE(nats(s(s(0))))
ZPRIMES → NATS(s(s(0)))
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
sieve(cons(0, Y)) → cons(0, sieve(Y))
sieve(cons(s(N), Y)) → cons(s(N), sieve(filter(Y, N, N)))
nats(N) → cons(N, nats(s(N)))
zprimes → sieve(nats(s(s(0))))
NATS(N) → NATS(s(N))
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
sieve(cons(0, Y)) → cons(0, sieve(Y))
sieve(cons(s(N), Y)) → cons(s(N), sieve(filter(Y, N, N)))
nats(N) → cons(N, nats(s(N)))
zprimes → sieve(nats(s(s(0))))
FILTER(cons(X, Y), s(N), M) → FILTER(Y, N, M)
FILTER(cons(X, Y), 0, M) → FILTER(Y, M, M)
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
sieve(cons(0, Y)) → cons(0, sieve(Y))
sieve(cons(s(N), Y)) → cons(s(N), sieve(filter(Y, N, N)))
nats(N) → cons(N, nats(s(N)))
zprimes → sieve(nats(s(s(0))))
From the DPs we obtained the following set of size-change graphs:
SIEVE(cons(s(N), Y)) → SIEVE(filter(Y, N, N))
SIEVE(cons(0, Y)) → SIEVE(Y)
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
sieve(cons(0, Y)) → cons(0, sieve(Y))
sieve(cons(s(N), Y)) → cons(s(N), sieve(filter(Y, N, N)))
nats(N) → cons(N, nats(s(N)))
zprimes → sieve(nats(s(s(0))))
SIEVE(cons(s(N), Y)) → SIEVE(filter(Y, N, N))
SIEVE(cons(0, Y)) → SIEVE(Y)
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
sieve(cons(0, Y)) → cons(0, sieve(Y))
sieve(cons(s(N), Y)) → cons(s(N), sieve(filter(Y, N, N)))
nats(N) → cons(N, nats(s(N)))
zprimes → sieve(nats(s(s(0))))
filter(cons(x0, x1), 0, x2)
filter(cons(x0, x1), s(x2), x3)
sieve(cons(0, x0))
sieve(cons(s(x0), x1))
nats(x0)
zprimes
SIEVE(cons(s(N), Y)) → SIEVE(filter(Y, N, N))
SIEVE(cons(0, Y)) → SIEVE(Y)
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
filter(cons(x0, x1), 0, x2)
filter(cons(x0, x1), s(x2), x3)
sieve(cons(0, x0))
sieve(cons(s(x0), x1))
nats(x0)
zprimes
sieve(cons(0, x0))
sieve(cons(s(x0), x1))
nats(x0)
zprimes
SIEVE(cons(s(N), Y)) → SIEVE(filter(Y, N, N))
SIEVE(cons(0, Y)) → SIEVE(Y)
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
filter(cons(x0, x1), 0, x2)
filter(cons(x0, x1), s(x2), x3)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
SIEVE(cons(s(N), Y)) → SIEVE(filter(Y, N, N))
SIEVE(cons(0, Y)) → SIEVE(Y)
POL(0) = 0
POL(SIEVE(x1)) = x1
POL(cons(x1, x2)) = 1 + x2
POL(filter(x1, x2, x3)) = x1
POL(s(x1)) = 0
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
filter(cons(X, Y), s(N), M) → cons(X, filter(Y, N, M))
filter(cons(x0, x1), 0, x2)
filter(cons(x0, x1), s(x2), x3)