(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted CpxTRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
mark(first(z0, z1)) → active(first(mark(z0), mark(z1)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(z0)) → active(s(mark(z0)))
mark(cons(z0, z1)) → active(cons(mark(z0), z1))
mark(from(z0)) → active(from(mark(z0)))
first(mark(z0), z1) → first(z0, z1)
first(z0, mark(z1)) → first(z0, z1)
first(active(z0), z1) → first(z0, z1)
first(z0, active(z1)) → first(z0, z1)
s(mark(z0)) → s(z0)
s(active(z0)) → s(z0)
cons(mark(z0), z1) → cons(z0, z1)
cons(z0, mark(z1)) → cons(z0, z1)
cons(active(z0), z1) → cons(z0, z1)
cons(z0, active(z1)) → cons(z0, z1)
from(mark(z0)) → from(z0)
from(active(z0)) → from(z0)
Tuples:
ACTIVE(first(0, z0)) → c(MARK(nil))
ACTIVE(first(s(z0), cons(z1, z2))) → c1(MARK(cons(z1, first(z0, z2))), CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(from(z0)) → c2(MARK(cons(z0, from(s(z0)))), CONS(z0, from(s(z0))), FROM(s(z0)), S(z0))
MARK(first(z0, z1)) → c3(ACTIVE(first(mark(z0), mark(z1))), FIRST(mark(z0), mark(z1)), MARK(z0), MARK(z1))
MARK(0) → c4(ACTIVE(0))
MARK(nil) → c5(ACTIVE(nil))
MARK(s(z0)) → c6(ACTIVE(s(mark(z0))), S(mark(z0)), MARK(z0))
MARK(cons(z0, z1)) → c7(ACTIVE(cons(mark(z0), z1)), CONS(mark(z0), z1), MARK(z0))
MARK(from(z0)) → c8(ACTIVE(from(mark(z0))), FROM(mark(z0)), MARK(z0))
FIRST(mark(z0), z1) → c9(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c10(FIRST(z0, z1))
FIRST(active(z0), z1) → c11(FIRST(z0, z1))
FIRST(z0, active(z1)) → c12(FIRST(z0, z1))
S(mark(z0)) → c13(S(z0))
S(active(z0)) → c14(S(z0))
CONS(mark(z0), z1) → c15(CONS(z0, z1))
CONS(z0, mark(z1)) → c16(CONS(z0, z1))
CONS(active(z0), z1) → c17(CONS(z0, z1))
CONS(z0, active(z1)) → c18(CONS(z0, z1))
FROM(mark(z0)) → c19(FROM(z0))
FROM(active(z0)) → c20(FROM(z0))
S tuples:
ACTIVE(first(0, z0)) → c(MARK(nil))
ACTIVE(first(s(z0), cons(z1, z2))) → c1(MARK(cons(z1, first(z0, z2))), CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(from(z0)) → c2(MARK(cons(z0, from(s(z0)))), CONS(z0, from(s(z0))), FROM(s(z0)), S(z0))
MARK(first(z0, z1)) → c3(ACTIVE(first(mark(z0), mark(z1))), FIRST(mark(z0), mark(z1)), MARK(z0), MARK(z1))
MARK(0) → c4(ACTIVE(0))
MARK(nil) → c5(ACTIVE(nil))
MARK(s(z0)) → c6(ACTIVE(s(mark(z0))), S(mark(z0)), MARK(z0))
MARK(cons(z0, z1)) → c7(ACTIVE(cons(mark(z0), z1)), CONS(mark(z0), z1), MARK(z0))
MARK(from(z0)) → c8(ACTIVE(from(mark(z0))), FROM(mark(z0)), MARK(z0))
FIRST(mark(z0), z1) → c9(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c10(FIRST(z0, z1))
FIRST(active(z0), z1) → c11(FIRST(z0, z1))
FIRST(z0, active(z1)) → c12(FIRST(z0, z1))
S(mark(z0)) → c13(S(z0))
S(active(z0)) → c14(S(z0))
CONS(mark(z0), z1) → c15(CONS(z0, z1))
CONS(z0, mark(z1)) → c16(CONS(z0, z1))
CONS(active(z0), z1) → c17(CONS(z0, z1))
CONS(z0, active(z1)) → c18(CONS(z0, z1))
FROM(mark(z0)) → c19(FROM(z0))
FROM(active(z0)) → c20(FROM(z0))
K tuples:none
Defined Rule Symbols:
active, mark, first, s, cons, from
Defined Pair Symbols:
ACTIVE, MARK, FIRST, S, CONS, FROM
Compound Symbols:
c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20
(3) CdtUnreachableProof (EQUIVALENT transformation)
The following tuples could be removed as they are not reachable from basic start terms:
ACTIVE(first(0, z0)) → c(MARK(nil))
ACTIVE(first(s(z0), cons(z1, z2))) → c1(MARK(cons(z1, first(z0, z2))), CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(from(z0)) → c2(MARK(cons(z0, from(s(z0)))), CONS(z0, from(s(z0))), FROM(s(z0)), S(z0))
MARK(first(z0, z1)) → c3(ACTIVE(first(mark(z0), mark(z1))), FIRST(mark(z0), mark(z1)), MARK(z0), MARK(z1))
MARK(s(z0)) → c6(ACTIVE(s(mark(z0))), S(mark(z0)), MARK(z0))
MARK(cons(z0, z1)) → c7(ACTIVE(cons(mark(z0), z1)), CONS(mark(z0), z1), MARK(z0))
MARK(from(z0)) → c8(ACTIVE(from(mark(z0))), FROM(mark(z0)), MARK(z0))
FIRST(mark(z0), z1) → c9(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c10(FIRST(z0, z1))
FIRST(active(z0), z1) → c11(FIRST(z0, z1))
FIRST(z0, active(z1)) → c12(FIRST(z0, z1))
S(mark(z0)) → c13(S(z0))
S(active(z0)) → c14(S(z0))
CONS(mark(z0), z1) → c15(CONS(z0, z1))
CONS(z0, mark(z1)) → c16(CONS(z0, z1))
CONS(active(z0), z1) → c17(CONS(z0, z1))
CONS(z0, active(z1)) → c18(CONS(z0, z1))
FROM(mark(z0)) → c19(FROM(z0))
FROM(active(z0)) → c20(FROM(z0))
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
mark(first(z0, z1)) → active(first(mark(z0), mark(z1)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(z0)) → active(s(mark(z0)))
mark(cons(z0, z1)) → active(cons(mark(z0), z1))
mark(from(z0)) → active(from(mark(z0)))
first(mark(z0), z1) → first(z0, z1)
first(z0, mark(z1)) → first(z0, z1)
first(active(z0), z1) → first(z0, z1)
first(z0, active(z1)) → first(z0, z1)
s(mark(z0)) → s(z0)
s(active(z0)) → s(z0)
cons(mark(z0), z1) → cons(z0, z1)
cons(z0, mark(z1)) → cons(z0, z1)
cons(active(z0), z1) → cons(z0, z1)
cons(z0, active(z1)) → cons(z0, z1)
from(mark(z0)) → from(z0)
from(active(z0)) → from(z0)
Tuples:
MARK(0) → c4(ACTIVE(0))
MARK(nil) → c5(ACTIVE(nil))
S tuples:
MARK(0) → c4(ACTIVE(0))
MARK(nil) → c5(ACTIVE(nil))
K tuples:none
Defined Rule Symbols:
active, mark, first, s, cons, from
Defined Pair Symbols:
MARK
Compound Symbols:
c4, c5
(5) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 2 trailing nodes:
MARK(0) → c4(ACTIVE(0))
MARK(nil) → c5(ACTIVE(nil))
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
mark(first(z0, z1)) → active(first(mark(z0), mark(z1)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(z0)) → active(s(mark(z0)))
mark(cons(z0, z1)) → active(cons(mark(z0), z1))
mark(from(z0)) → active(from(mark(z0)))
first(mark(z0), z1) → first(z0, z1)
first(z0, mark(z1)) → first(z0, z1)
first(active(z0), z1) → first(z0, z1)
first(z0, active(z1)) → first(z0, z1)
s(mark(z0)) → s(z0)
s(active(z0)) → s(z0)
cons(mark(z0), z1) → cons(z0, z1)
cons(z0, mark(z1)) → cons(z0, z1)
cons(active(z0), z1) → cons(z0, z1)
cons(z0, active(z1)) → cons(z0, z1)
from(mark(z0)) → from(z0)
from(active(z0)) → from(z0)
Tuples:none
S tuples:none
K tuples:none
Defined Rule Symbols:
active, mark, first, s, cons, from
Defined Pair Symbols:none
Compound Symbols:none
(7) SIsEmptyProof (EQUIVALENT transformation)
The set S is empty
(8) BOUNDS(O(1), O(1))