(0) Obligation:
The Runtime Complexity (innermost) of the given
CpxTRS could be proven to be
BOUNDS(1, 1).
The TRS R consists of the following rules:
filter(cons(X), 0, M) → cons(0)
filter(cons(X), s(N), M) → cons(X)
sieve(cons(0)) → cons(0)
sieve(cons(s(N))) → cons(s(N))
nats(N) → cons(N)
zprimes → sieve(nats(s(s(0))))
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted Cpx (relative) TRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
filter(cons(z0), 0, z1) → cons(0)
filter(cons(z0), s(z1), z2) → cons(z0)
sieve(cons(0)) → cons(0)
sieve(cons(s(z0))) → cons(s(z0))
nats(z0) → cons(z0)
zprimes → sieve(nats(s(s(0))))
Tuples:
FILTER(cons(z0), 0, z1) → c
FILTER(cons(z0), s(z1), z2) → c1
SIEVE(cons(0)) → c2
SIEVE(cons(s(z0))) → c3
NATS(z0) → c4
ZPRIMES → c5(SIEVE(nats(s(s(0)))), NATS(s(s(0))))
S tuples:
FILTER(cons(z0), 0, z1) → c
FILTER(cons(z0), s(z1), z2) → c1
SIEVE(cons(0)) → c2
SIEVE(cons(s(z0))) → c3
NATS(z0) → c4
ZPRIMES → c5(SIEVE(nats(s(s(0)))), NATS(s(s(0))))
K tuples:none
Defined Rule Symbols:
filter, sieve, nats, zprimes
Defined Pair Symbols:
FILTER, SIEVE, NATS, ZPRIMES
Compound Symbols:
c, c1, c2, c3, c4, c5
(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 6 trailing nodes:
NATS(z0) → c4
ZPRIMES → c5(SIEVE(nats(s(s(0)))), NATS(s(s(0))))
FILTER(cons(z0), s(z1), z2) → c1
FILTER(cons(z0), 0, z1) → c
SIEVE(cons(s(z0))) → c3
SIEVE(cons(0)) → c2
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
filter(cons(z0), 0, z1) → cons(0)
filter(cons(z0), s(z1), z2) → cons(z0)
sieve(cons(0)) → cons(0)
sieve(cons(s(z0))) → cons(s(z0))
nats(z0) → cons(z0)
zprimes → sieve(nats(s(s(0))))
Tuples:none
S tuples:none
K tuples:none
Defined Rule Symbols:
filter, sieve, nats, zprimes
Defined Pair Symbols:none
Compound Symbols:none
(5) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(6) BOUNDS(1, 1)