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

active(zeros) → mark(cons(0, zeros))
active(tail(cons(X, XS))) → mark(XS)
active(cons(X1, X2)) → cons(active(X1), X2)
active(tail(X)) → tail(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
tail(mark(X)) → mark(tail(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(tail(X)) → tail(proper(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
tail(ok(X)) → ok(tail(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


active'(zeros') → mark'(cons'(0', zeros'))
active'(tail'(cons'(X, XS))) → mark'(XS)
active'(cons'(X1, X2)) → cons'(active'(X1), X2)
active'(tail'(X)) → tail'(active'(X))
cons'(mark'(X1), X2) → mark'(cons'(X1, X2))
tail'(mark'(X)) → mark'(tail'(X))
proper'(zeros') → ok'(zeros')
proper'(cons'(X1, X2)) → cons'(proper'(X1), proper'(X2))
proper'(0') → ok'(0')
proper'(tail'(X)) → tail'(proper'(X))
cons'(ok'(X1), ok'(X2)) → ok'(cons'(X1, X2))
tail'(ok'(X)) → ok'(tail'(X))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
active'(zeros') → mark'(cons'(0', zeros'))
active'(tail'(cons'(X, XS))) → mark'(XS)
active'(cons'(X1, X2)) → cons'(active'(X1), X2)
active'(tail'(X)) → tail'(active'(X))
cons'(mark'(X1), X2) → mark'(cons'(X1, X2))
tail'(mark'(X)) → mark'(tail'(X))
proper'(zeros') → ok'(zeros')
proper'(cons'(X1, X2)) → cons'(proper'(X1), proper'(X2))
proper'(0') → ok'(0')
proper'(tail'(X)) → tail'(proper'(X))
cons'(ok'(X1), ok'(X2)) → ok'(cons'(X1, X2))
tail'(ok'(X)) → ok'(tail'(X))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: zeros':0':mark':ok' → zeros':0':mark':ok'
zeros' :: zeros':0':mark':ok'
mark' :: zeros':0':mark':ok' → zeros':0':mark':ok'
cons' :: zeros':0':mark':ok' → zeros':0':mark':ok' → zeros':0':mark':ok'
0' :: zeros':0':mark':ok'
tail' :: zeros':0':mark':ok' → zeros':0':mark':ok'
proper' :: zeros':0':mark':ok' → zeros':0':mark':ok'
ok' :: zeros':0':mark':ok' → zeros':0':mark':ok'
top' :: zeros':0':mark':ok' → top'
_hole_zeros':0':mark':ok'1 :: zeros':0':mark':ok'
_hole_top'2 :: top'
_gen_zeros':0':mark':ok'3 :: Nat → zeros':0':mark':ok'


Heuristically decided to analyse the following defined symbols:
active', cons', tail', proper', top'

They will be analysed ascendingly in the following order:
cons' < active'
tail' < active'
active' < top'
cons' < proper'
tail' < proper'
proper' < top'


Rules:
active'(zeros') → mark'(cons'(0', zeros'))
active'(tail'(cons'(X, XS))) → mark'(XS)
active'(cons'(X1, X2)) → cons'(active'(X1), X2)
active'(tail'(X)) → tail'(active'(X))
cons'(mark'(X1), X2) → mark'(cons'(X1, X2))
tail'(mark'(X)) → mark'(tail'(X))
proper'(zeros') → ok'(zeros')
proper'(cons'(X1, X2)) → cons'(proper'(X1), proper'(X2))
proper'(0') → ok'(0')
proper'(tail'(X)) → tail'(proper'(X))
cons'(ok'(X1), ok'(X2)) → ok'(cons'(X1, X2))
tail'(ok'(X)) → ok'(tail'(X))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: zeros':0':mark':ok' → zeros':0':mark':ok'
zeros' :: zeros':0':mark':ok'
mark' :: zeros':0':mark':ok' → zeros':0':mark':ok'
cons' :: zeros':0':mark':ok' → zeros':0':mark':ok' → zeros':0':mark':ok'
0' :: zeros':0':mark':ok'
tail' :: zeros':0':mark':ok' → zeros':0':mark':ok'
proper' :: zeros':0':mark':ok' → zeros':0':mark':ok'
ok' :: zeros':0':mark':ok' → zeros':0':mark':ok'
top' :: zeros':0':mark':ok' → top'
_hole_zeros':0':mark':ok'1 :: zeros':0':mark':ok'
_hole_top'2 :: top'
_gen_zeros':0':mark':ok'3 :: Nat → zeros':0':mark':ok'

Generator Equations:
_gen_zeros':0':mark':ok'3(0) ⇔ zeros'
_gen_zeros':0':mark':ok'3(+(x, 1)) ⇔ mark'(_gen_zeros':0':mark':ok'3(x))

The following defined symbols remain to be analysed:
cons', active', tail', proper', top'

They will be analysed ascendingly in the following order:
cons' < active'
tail' < active'
active' < top'
cons' < proper'
tail' < proper'
proper' < top'


Proved the following rewrite lemma:
cons'(_gen_zeros':0':mark':ok'3(+(1, _n5)), _gen_zeros':0':mark':ok'3(b)) → _*4, rt ∈ Ω(n5)

Induction Base:
cons'(_gen_zeros':0':mark':ok'3(+(1, 0)), _gen_zeros':0':mark':ok'3(b))

Induction Step:
cons'(_gen_zeros':0':mark':ok'3(+(1, +(_$n6, 1))), _gen_zeros':0':mark':ok'3(_b610)) →RΩ(1)
mark'(cons'(_gen_zeros':0':mark':ok'3(+(1, _$n6)), _gen_zeros':0':mark':ok'3(_b610))) →IH
mark'(_*4)

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


Rules:
active'(zeros') → mark'(cons'(0', zeros'))
active'(tail'(cons'(X, XS))) → mark'(XS)
active'(cons'(X1, X2)) → cons'(active'(X1), X2)
active'(tail'(X)) → tail'(active'(X))
cons'(mark'(X1), X2) → mark'(cons'(X1, X2))
tail'(mark'(X)) → mark'(tail'(X))
proper'(zeros') → ok'(zeros')
proper'(cons'(X1, X2)) → cons'(proper'(X1), proper'(X2))
proper'(0') → ok'(0')
proper'(tail'(X)) → tail'(proper'(X))
cons'(ok'(X1), ok'(X2)) → ok'(cons'(X1, X2))
tail'(ok'(X)) → ok'(tail'(X))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: zeros':0':mark':ok' → zeros':0':mark':ok'
zeros' :: zeros':0':mark':ok'
mark' :: zeros':0':mark':ok' → zeros':0':mark':ok'
cons' :: zeros':0':mark':ok' → zeros':0':mark':ok' → zeros':0':mark':ok'
0' :: zeros':0':mark':ok'
tail' :: zeros':0':mark':ok' → zeros':0':mark':ok'
proper' :: zeros':0':mark':ok' → zeros':0':mark':ok'
ok' :: zeros':0':mark':ok' → zeros':0':mark':ok'
top' :: zeros':0':mark':ok' → top'
_hole_zeros':0':mark':ok'1 :: zeros':0':mark':ok'
_hole_top'2 :: top'
_gen_zeros':0':mark':ok'3 :: Nat → zeros':0':mark':ok'

Lemmas:
cons'(_gen_zeros':0':mark':ok'3(+(1, _n5)), _gen_zeros':0':mark':ok'3(b)) → _*4, rt ∈ Ω(n5)

Generator Equations:
_gen_zeros':0':mark':ok'3(0) ⇔ zeros'
_gen_zeros':0':mark':ok'3(+(x, 1)) ⇔ mark'(_gen_zeros':0':mark':ok'3(x))

The following defined symbols remain to be analysed:
tail', active', proper', top'

They will be analysed ascendingly in the following order:
tail' < active'
active' < top'
tail' < proper'
proper' < top'


Proved the following rewrite lemma:
tail'(_gen_zeros':0':mark':ok'3(+(1, _n1121))) → _*4, rt ∈ Ω(n1121)

Induction Base:
tail'(_gen_zeros':0':mark':ok'3(+(1, 0)))

Induction Step:
tail'(_gen_zeros':0':mark':ok'3(+(1, +(_$n1122, 1)))) →RΩ(1)
mark'(tail'(_gen_zeros':0':mark':ok'3(+(1, _$n1122)))) →IH
mark'(_*4)

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


Rules:
active'(zeros') → mark'(cons'(0', zeros'))
active'(tail'(cons'(X, XS))) → mark'(XS)
active'(cons'(X1, X2)) → cons'(active'(X1), X2)
active'(tail'(X)) → tail'(active'(X))
cons'(mark'(X1), X2) → mark'(cons'(X1, X2))
tail'(mark'(X)) → mark'(tail'(X))
proper'(zeros') → ok'(zeros')
proper'(cons'(X1, X2)) → cons'(proper'(X1), proper'(X2))
proper'(0') → ok'(0')
proper'(tail'(X)) → tail'(proper'(X))
cons'(ok'(X1), ok'(X2)) → ok'(cons'(X1, X2))
tail'(ok'(X)) → ok'(tail'(X))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: zeros':0':mark':ok' → zeros':0':mark':ok'
zeros' :: zeros':0':mark':ok'
mark' :: zeros':0':mark':ok' → zeros':0':mark':ok'
cons' :: zeros':0':mark':ok' → zeros':0':mark':ok' → zeros':0':mark':ok'
0' :: zeros':0':mark':ok'
tail' :: zeros':0':mark':ok' → zeros':0':mark':ok'
proper' :: zeros':0':mark':ok' → zeros':0':mark':ok'
ok' :: zeros':0':mark':ok' → zeros':0':mark':ok'
top' :: zeros':0':mark':ok' → top'
_hole_zeros':0':mark':ok'1 :: zeros':0':mark':ok'
_hole_top'2 :: top'
_gen_zeros':0':mark':ok'3 :: Nat → zeros':0':mark':ok'

Lemmas:
cons'(_gen_zeros':0':mark':ok'3(+(1, _n5)), _gen_zeros':0':mark':ok'3(b)) → _*4, rt ∈ Ω(n5)
tail'(_gen_zeros':0':mark':ok'3(+(1, _n1121))) → _*4, rt ∈ Ω(n1121)

Generator Equations:
_gen_zeros':0':mark':ok'3(0) ⇔ zeros'
_gen_zeros':0':mark':ok'3(+(x, 1)) ⇔ mark'(_gen_zeros':0':mark':ok'3(x))

The following defined symbols remain to be analysed:
active', proper', top'

They will be analysed ascendingly in the following order:
active' < top'
proper' < top'


Could not prove a rewrite lemma for the defined symbol active'.


Rules:
active'(zeros') → mark'(cons'(0', zeros'))
active'(tail'(cons'(X, XS))) → mark'(XS)
active'(cons'(X1, X2)) → cons'(active'(X1), X2)
active'(tail'(X)) → tail'(active'(X))
cons'(mark'(X1), X2) → mark'(cons'(X1, X2))
tail'(mark'(X)) → mark'(tail'(X))
proper'(zeros') → ok'(zeros')
proper'(cons'(X1, X2)) → cons'(proper'(X1), proper'(X2))
proper'(0') → ok'(0')
proper'(tail'(X)) → tail'(proper'(X))
cons'(ok'(X1), ok'(X2)) → ok'(cons'(X1, X2))
tail'(ok'(X)) → ok'(tail'(X))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: zeros':0':mark':ok' → zeros':0':mark':ok'
zeros' :: zeros':0':mark':ok'
mark' :: zeros':0':mark':ok' → zeros':0':mark':ok'
cons' :: zeros':0':mark':ok' → zeros':0':mark':ok' → zeros':0':mark':ok'
0' :: zeros':0':mark':ok'
tail' :: zeros':0':mark':ok' → zeros':0':mark':ok'
proper' :: zeros':0':mark':ok' → zeros':0':mark':ok'
ok' :: zeros':0':mark':ok' → zeros':0':mark':ok'
top' :: zeros':0':mark':ok' → top'
_hole_zeros':0':mark':ok'1 :: zeros':0':mark':ok'
_hole_top'2 :: top'
_gen_zeros':0':mark':ok'3 :: Nat → zeros':0':mark':ok'

Lemmas:
cons'(_gen_zeros':0':mark':ok'3(+(1, _n5)), _gen_zeros':0':mark':ok'3(b)) → _*4, rt ∈ Ω(n5)
tail'(_gen_zeros':0':mark':ok'3(+(1, _n1121))) → _*4, rt ∈ Ω(n1121)

Generator Equations:
_gen_zeros':0':mark':ok'3(0) ⇔ zeros'
_gen_zeros':0':mark':ok'3(+(x, 1)) ⇔ mark'(_gen_zeros':0':mark':ok'3(x))

The following defined symbols remain to be analysed:
proper', top'

They will be analysed ascendingly in the following order:
proper' < top'


Could not prove a rewrite lemma for the defined symbol proper'.


Rules:
active'(zeros') → mark'(cons'(0', zeros'))
active'(tail'(cons'(X, XS))) → mark'(XS)
active'(cons'(X1, X2)) → cons'(active'(X1), X2)
active'(tail'(X)) → tail'(active'(X))
cons'(mark'(X1), X2) → mark'(cons'(X1, X2))
tail'(mark'(X)) → mark'(tail'(X))
proper'(zeros') → ok'(zeros')
proper'(cons'(X1, X2)) → cons'(proper'(X1), proper'(X2))
proper'(0') → ok'(0')
proper'(tail'(X)) → tail'(proper'(X))
cons'(ok'(X1), ok'(X2)) → ok'(cons'(X1, X2))
tail'(ok'(X)) → ok'(tail'(X))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: zeros':0':mark':ok' → zeros':0':mark':ok'
zeros' :: zeros':0':mark':ok'
mark' :: zeros':0':mark':ok' → zeros':0':mark':ok'
cons' :: zeros':0':mark':ok' → zeros':0':mark':ok' → zeros':0':mark':ok'
0' :: zeros':0':mark':ok'
tail' :: zeros':0':mark':ok' → zeros':0':mark':ok'
proper' :: zeros':0':mark':ok' → zeros':0':mark':ok'
ok' :: zeros':0':mark':ok' → zeros':0':mark':ok'
top' :: zeros':0':mark':ok' → top'
_hole_zeros':0':mark':ok'1 :: zeros':0':mark':ok'
_hole_top'2 :: top'
_gen_zeros':0':mark':ok'3 :: Nat → zeros':0':mark':ok'

Lemmas:
cons'(_gen_zeros':0':mark':ok'3(+(1, _n5)), _gen_zeros':0':mark':ok'3(b)) → _*4, rt ∈ Ω(n5)
tail'(_gen_zeros':0':mark':ok'3(+(1, _n1121))) → _*4, rt ∈ Ω(n1121)

Generator Equations:
_gen_zeros':0':mark':ok'3(0) ⇔ zeros'
_gen_zeros':0':mark':ok'3(+(x, 1)) ⇔ mark'(_gen_zeros':0':mark':ok'3(x))

The following defined symbols remain to be analysed:
top'


Could not prove a rewrite lemma for the defined symbol top'.


Rules:
active'(zeros') → mark'(cons'(0', zeros'))
active'(tail'(cons'(X, XS))) → mark'(XS)
active'(cons'(X1, X2)) → cons'(active'(X1), X2)
active'(tail'(X)) → tail'(active'(X))
cons'(mark'(X1), X2) → mark'(cons'(X1, X2))
tail'(mark'(X)) → mark'(tail'(X))
proper'(zeros') → ok'(zeros')
proper'(cons'(X1, X2)) → cons'(proper'(X1), proper'(X2))
proper'(0') → ok'(0')
proper'(tail'(X)) → tail'(proper'(X))
cons'(ok'(X1), ok'(X2)) → ok'(cons'(X1, X2))
tail'(ok'(X)) → ok'(tail'(X))
top'(mark'(X)) → top'(proper'(X))
top'(ok'(X)) → top'(active'(X))

Types:
active' :: zeros':0':mark':ok' → zeros':0':mark':ok'
zeros' :: zeros':0':mark':ok'
mark' :: zeros':0':mark':ok' → zeros':0':mark':ok'
cons' :: zeros':0':mark':ok' → zeros':0':mark':ok' → zeros':0':mark':ok'
0' :: zeros':0':mark':ok'
tail' :: zeros':0':mark':ok' → zeros':0':mark':ok'
proper' :: zeros':0':mark':ok' → zeros':0':mark':ok'
ok' :: zeros':0':mark':ok' → zeros':0':mark':ok'
top' :: zeros':0':mark':ok' → top'
_hole_zeros':0':mark':ok'1 :: zeros':0':mark':ok'
_hole_top'2 :: top'
_gen_zeros':0':mark':ok'3 :: Nat → zeros':0':mark':ok'

Lemmas:
cons'(_gen_zeros':0':mark':ok'3(+(1, _n5)), _gen_zeros':0':mark':ok'3(b)) → _*4, rt ∈ Ω(n5)
tail'(_gen_zeros':0':mark':ok'3(+(1, _n1121))) → _*4, rt ∈ Ω(n1121)

Generator Equations:
_gen_zeros':0':mark':ok'3(0) ⇔ zeros'
_gen_zeros':0':mark':ok'3(+(x, 1)) ⇔ mark'(_gen_zeros':0':mark':ok'3(x))

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
cons'(_gen_zeros':0':mark':ok'3(+(1, _n5)), _gen_zeros':0':mark':ok'3(b)) → _*4, rt ∈ Ω(n5)