(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

active(eq(0, 0)) → mark(true)
active(eq(s(X), s(Y))) → mark(eq(X, Y))
active(eq(X, Y)) → mark(false)
active(inf(X)) → mark(cons(X, inf(s(X))))
active(take(0, X)) → mark(nil)
active(take(s(X), cons(Y, L))) → mark(cons(Y, take(X, L)))
active(length(nil)) → mark(0)
active(length(cons(X, L))) → mark(s(length(L)))
mark(eq(X1, X2)) → active(eq(X1, X2))
mark(0) → active(0)
mark(true) → active(true)
mark(s(X)) → active(s(X))
mark(false) → active(false)
mark(inf(X)) → active(inf(mark(X)))
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(length(X)) → active(length(mark(X)))
eq(mark(X1), X2) → eq(X1, X2)
eq(X1, mark(X2)) → eq(X1, X2)
eq(active(X1), X2) → eq(X1, X2)
eq(X1, active(X2)) → eq(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
inf(mark(X)) → inf(X)
inf(active(X)) → inf(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)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
length(mark(X)) → length(X)
length(active(X)) → length(X)

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(eq(0, 0)) → mark(true)
active(eq(s(z0), s(z1))) → mark(eq(z0, z1))
active(eq(z0, z1)) → mark(false)
active(inf(z0)) → mark(cons(z0, inf(s(z0))))
active(take(0, z0)) → mark(nil)
active(take(s(z0), cons(z1, z2))) → mark(cons(z1, take(z0, z2)))
active(length(nil)) → mark(0)
active(length(cons(z0, z1))) → mark(s(length(z1)))
mark(eq(z0, z1)) → active(eq(z0, z1))
mark(0) → active(0)
mark(true) → active(true)
mark(s(z0)) → active(s(z0))
mark(false) → active(false)
mark(inf(z0)) → active(inf(mark(z0)))
mark(cons(z0, z1)) → active(cons(z0, z1))
mark(take(z0, z1)) → active(take(mark(z0), mark(z1)))
mark(nil) → active(nil)
mark(length(z0)) → active(length(mark(z0)))
eq(mark(z0), z1) → eq(z0, z1)
eq(z0, mark(z1)) → eq(z0, z1)
eq(active(z0), z1) → eq(z0, z1)
eq(z0, active(z1)) → eq(z0, z1)
s(mark(z0)) → s(z0)
s(active(z0)) → s(z0)
inf(mark(z0)) → inf(z0)
inf(active(z0)) → inf(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)
take(mark(z0), z1) → take(z0, z1)
take(z0, mark(z1)) → take(z0, z1)
take(active(z0), z1) → take(z0, z1)
take(z0, active(z1)) → take(z0, z1)
length(mark(z0)) → length(z0)
length(active(z0)) → length(z0)
Tuples:

ACTIVE(eq(0, 0)) → c(MARK(true))
ACTIVE(eq(s(z0), s(z1))) → c1(MARK(eq(z0, z1)), EQ(z0, z1))
ACTIVE(eq(z0, z1)) → c2(MARK(false))
ACTIVE(inf(z0)) → c3(MARK(cons(z0, inf(s(z0)))), CONS(z0, inf(s(z0))), INF(s(z0)), S(z0))
ACTIVE(take(0, z0)) → c4(MARK(nil))
ACTIVE(take(s(z0), cons(z1, z2))) → c5(MARK(cons(z1, take(z0, z2))), CONS(z1, take(z0, z2)), TAKE(z0, z2))
ACTIVE(length(nil)) → c6(MARK(0))
ACTIVE(length(cons(z0, z1))) → c7(MARK(s(length(z1))), S(length(z1)), LENGTH(z1))
MARK(eq(z0, z1)) → c8(ACTIVE(eq(z0, z1)), EQ(z0, z1))
MARK(0) → c9(ACTIVE(0))
MARK(true) → c10(ACTIVE(true))
MARK(s(z0)) → c11(ACTIVE(s(z0)), S(z0))
MARK(false) → c12(ACTIVE(false))
MARK(inf(z0)) → c13(ACTIVE(inf(mark(z0))), INF(mark(z0)), MARK(z0))
MARK(cons(z0, z1)) → c14(ACTIVE(cons(z0, z1)), CONS(z0, z1))
MARK(take(z0, z1)) → c15(ACTIVE(take(mark(z0), mark(z1))), TAKE(mark(z0), mark(z1)), MARK(z0), MARK(z1))
MARK(nil) → c16(ACTIVE(nil))
MARK(length(z0)) → c17(ACTIVE(length(mark(z0))), LENGTH(mark(z0)), MARK(z0))
EQ(mark(z0), z1) → c18(EQ(z0, z1))
EQ(z0, mark(z1)) → c19(EQ(z0, z1))
EQ(active(z0), z1) → c20(EQ(z0, z1))
EQ(z0, active(z1)) → c21(EQ(z0, z1))
S(mark(z0)) → c22(S(z0))
S(active(z0)) → c23(S(z0))
INF(mark(z0)) → c24(INF(z0))
INF(active(z0)) → c25(INF(z0))
CONS(mark(z0), z1) → c26(CONS(z0, z1))
CONS(z0, mark(z1)) → c27(CONS(z0, z1))
CONS(active(z0), z1) → c28(CONS(z0, z1))
CONS(z0, active(z1)) → c29(CONS(z0, z1))
TAKE(mark(z0), z1) → c30(TAKE(z0, z1))
TAKE(z0, mark(z1)) → c31(TAKE(z0, z1))
TAKE(active(z0), z1) → c32(TAKE(z0, z1))
TAKE(z0, active(z1)) → c33(TAKE(z0, z1))
LENGTH(mark(z0)) → c34(LENGTH(z0))
LENGTH(active(z0)) → c35(LENGTH(z0))
S tuples:

ACTIVE(eq(0, 0)) → c(MARK(true))
ACTIVE(eq(s(z0), s(z1))) → c1(MARK(eq(z0, z1)), EQ(z0, z1))
ACTIVE(eq(z0, z1)) → c2(MARK(false))
ACTIVE(inf(z0)) → c3(MARK(cons(z0, inf(s(z0)))), CONS(z0, inf(s(z0))), INF(s(z0)), S(z0))
ACTIVE(take(0, z0)) → c4(MARK(nil))
ACTIVE(take(s(z0), cons(z1, z2))) → c5(MARK(cons(z1, take(z0, z2))), CONS(z1, take(z0, z2)), TAKE(z0, z2))
ACTIVE(length(nil)) → c6(MARK(0))
ACTIVE(length(cons(z0, z1))) → c7(MARK(s(length(z1))), S(length(z1)), LENGTH(z1))
MARK(eq(z0, z1)) → c8(ACTIVE(eq(z0, z1)), EQ(z0, z1))
MARK(0) → c9(ACTIVE(0))
MARK(true) → c10(ACTIVE(true))
MARK(s(z0)) → c11(ACTIVE(s(z0)), S(z0))
MARK(false) → c12(ACTIVE(false))
MARK(inf(z0)) → c13(ACTIVE(inf(mark(z0))), INF(mark(z0)), MARK(z0))
MARK(cons(z0, z1)) → c14(ACTIVE(cons(z0, z1)), CONS(z0, z1))
MARK(take(z0, z1)) → c15(ACTIVE(take(mark(z0), mark(z1))), TAKE(mark(z0), mark(z1)), MARK(z0), MARK(z1))
MARK(nil) → c16(ACTIVE(nil))
MARK(length(z0)) → c17(ACTIVE(length(mark(z0))), LENGTH(mark(z0)), MARK(z0))
EQ(mark(z0), z1) → c18(EQ(z0, z1))
EQ(z0, mark(z1)) → c19(EQ(z0, z1))
EQ(active(z0), z1) → c20(EQ(z0, z1))
EQ(z0, active(z1)) → c21(EQ(z0, z1))
S(mark(z0)) → c22(S(z0))
S(active(z0)) → c23(S(z0))
INF(mark(z0)) → c24(INF(z0))
INF(active(z0)) → c25(INF(z0))
CONS(mark(z0), z1) → c26(CONS(z0, z1))
CONS(z0, mark(z1)) → c27(CONS(z0, z1))
CONS(active(z0), z1) → c28(CONS(z0, z1))
CONS(z0, active(z1)) → c29(CONS(z0, z1))
TAKE(mark(z0), z1) → c30(TAKE(z0, z1))
TAKE(z0, mark(z1)) → c31(TAKE(z0, z1))
TAKE(active(z0), z1) → c32(TAKE(z0, z1))
TAKE(z0, active(z1)) → c33(TAKE(z0, z1))
LENGTH(mark(z0)) → c34(LENGTH(z0))
LENGTH(active(z0)) → c35(LENGTH(z0))
K tuples:none
Defined Rule Symbols:

active, mark, eq, s, inf, cons, take, length

Defined Pair Symbols:

ACTIVE, MARK, EQ, S, INF, CONS, TAKE, LENGTH

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35

(3) CdtUnreachableProof (EQUIVALENT transformation)

The following tuples could be removed as they are not reachable from basic start terms:

ACTIVE(eq(0, 0)) → c(MARK(true))
ACTIVE(eq(s(z0), s(z1))) → c1(MARK(eq(z0, z1)), EQ(z0, z1))
ACTIVE(eq(z0, z1)) → c2(MARK(false))
ACTIVE(inf(z0)) → c3(MARK(cons(z0, inf(s(z0)))), CONS(z0, inf(s(z0))), INF(s(z0)), S(z0))
ACTIVE(take(0, z0)) → c4(MARK(nil))
ACTIVE(take(s(z0), cons(z1, z2))) → c5(MARK(cons(z1, take(z0, z2))), CONS(z1, take(z0, z2)), TAKE(z0, z2))
ACTIVE(length(nil)) → c6(MARK(0))
ACTIVE(length(cons(z0, z1))) → c7(MARK(s(length(z1))), S(length(z1)), LENGTH(z1))
MARK(eq(z0, z1)) → c8(ACTIVE(eq(z0, z1)), EQ(z0, z1))
MARK(s(z0)) → c11(ACTIVE(s(z0)), S(z0))
MARK(inf(z0)) → c13(ACTIVE(inf(mark(z0))), INF(mark(z0)), MARK(z0))
MARK(cons(z0, z1)) → c14(ACTIVE(cons(z0, z1)), CONS(z0, z1))
MARK(take(z0, z1)) → c15(ACTIVE(take(mark(z0), mark(z1))), TAKE(mark(z0), mark(z1)), MARK(z0), MARK(z1))
MARK(length(z0)) → c17(ACTIVE(length(mark(z0))), LENGTH(mark(z0)), MARK(z0))
EQ(mark(z0), z1) → c18(EQ(z0, z1))
EQ(z0, mark(z1)) → c19(EQ(z0, z1))
EQ(active(z0), z1) → c20(EQ(z0, z1))
EQ(z0, active(z1)) → c21(EQ(z0, z1))
S(mark(z0)) → c22(S(z0))
S(active(z0)) → c23(S(z0))
INF(mark(z0)) → c24(INF(z0))
INF(active(z0)) → c25(INF(z0))
CONS(mark(z0), z1) → c26(CONS(z0, z1))
CONS(z0, mark(z1)) → c27(CONS(z0, z1))
CONS(active(z0), z1) → c28(CONS(z0, z1))
CONS(z0, active(z1)) → c29(CONS(z0, z1))
TAKE(mark(z0), z1) → c30(TAKE(z0, z1))
TAKE(z0, mark(z1)) → c31(TAKE(z0, z1))
TAKE(active(z0), z1) → c32(TAKE(z0, z1))
TAKE(z0, active(z1)) → c33(TAKE(z0, z1))
LENGTH(mark(z0)) → c34(LENGTH(z0))
LENGTH(active(z0)) → c35(LENGTH(z0))

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(eq(0, 0)) → mark(true)
active(eq(s(z0), s(z1))) → mark(eq(z0, z1))
active(eq(z0, z1)) → mark(false)
active(inf(z0)) → mark(cons(z0, inf(s(z0))))
active(take(0, z0)) → mark(nil)
active(take(s(z0), cons(z1, z2))) → mark(cons(z1, take(z0, z2)))
active(length(nil)) → mark(0)
active(length(cons(z0, z1))) → mark(s(length(z1)))
mark(eq(z0, z1)) → active(eq(z0, z1))
mark(0) → active(0)
mark(true) → active(true)
mark(s(z0)) → active(s(z0))
mark(false) → active(false)
mark(inf(z0)) → active(inf(mark(z0)))
mark(cons(z0, z1)) → active(cons(z0, z1))
mark(take(z0, z1)) → active(take(mark(z0), mark(z1)))
mark(nil) → active(nil)
mark(length(z0)) → active(length(mark(z0)))
eq(mark(z0), z1) → eq(z0, z1)
eq(z0, mark(z1)) → eq(z0, z1)
eq(active(z0), z1) → eq(z0, z1)
eq(z0, active(z1)) → eq(z0, z1)
s(mark(z0)) → s(z0)
s(active(z0)) → s(z0)
inf(mark(z0)) → inf(z0)
inf(active(z0)) → inf(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)
take(mark(z0), z1) → take(z0, z1)
take(z0, mark(z1)) → take(z0, z1)
take(active(z0), z1) → take(z0, z1)
take(z0, active(z1)) → take(z0, z1)
length(mark(z0)) → length(z0)
length(active(z0)) → length(z0)
Tuples:

MARK(0) → c9(ACTIVE(0))
MARK(true) → c10(ACTIVE(true))
MARK(false) → c12(ACTIVE(false))
MARK(nil) → c16(ACTIVE(nil))
S tuples:

MARK(0) → c9(ACTIVE(0))
MARK(true) → c10(ACTIVE(true))
MARK(false) → c12(ACTIVE(false))
MARK(nil) → c16(ACTIVE(nil))
K tuples:none
Defined Rule Symbols:

active, mark, eq, s, inf, cons, take, length

Defined Pair Symbols:

MARK

Compound Symbols:

c9, c10, c12, c16

(5) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 4 trailing nodes:

MARK(nil) → c16(ACTIVE(nil))
MARK(0) → c9(ACTIVE(0))
MARK(false) → c12(ACTIVE(false))
MARK(true) → c10(ACTIVE(true))

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(eq(0, 0)) → mark(true)
active(eq(s(z0), s(z1))) → mark(eq(z0, z1))
active(eq(z0, z1)) → mark(false)
active(inf(z0)) → mark(cons(z0, inf(s(z0))))
active(take(0, z0)) → mark(nil)
active(take(s(z0), cons(z1, z2))) → mark(cons(z1, take(z0, z2)))
active(length(nil)) → mark(0)
active(length(cons(z0, z1))) → mark(s(length(z1)))
mark(eq(z0, z1)) → active(eq(z0, z1))
mark(0) → active(0)
mark(true) → active(true)
mark(s(z0)) → active(s(z0))
mark(false) → active(false)
mark(inf(z0)) → active(inf(mark(z0)))
mark(cons(z0, z1)) → active(cons(z0, z1))
mark(take(z0, z1)) → active(take(mark(z0), mark(z1)))
mark(nil) → active(nil)
mark(length(z0)) → active(length(mark(z0)))
eq(mark(z0), z1) → eq(z0, z1)
eq(z0, mark(z1)) → eq(z0, z1)
eq(active(z0), z1) → eq(z0, z1)
eq(z0, active(z1)) → eq(z0, z1)
s(mark(z0)) → s(z0)
s(active(z0)) → s(z0)
inf(mark(z0)) → inf(z0)
inf(active(z0)) → inf(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)
take(mark(z0), z1) → take(z0, z1)
take(z0, mark(z1)) → take(z0, z1)
take(active(z0), z1) → take(z0, z1)
take(z0, active(z1)) → take(z0, z1)
length(mark(z0)) → length(z0)
length(active(z0)) → length(z0)
Tuples:none
S tuples:none
K tuples:none
Defined Rule Symbols:

active, mark, eq, s, inf, cons, take, length

Defined Pair Symbols:none

Compound Symbols:none

(7) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(8) BOUNDS(O(1), O(1))