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

a__zeroscons(0, zeros)
a__tail(cons(X, XS)) → mark(XS)
mark(zeros) → a__zeros
mark(tail(X)) → a__tail(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
a__zeroszeros
a__tail(X) → tail(X)

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


a__zeros'cons'(0', zeros')
a__tail'(cons'(X, XS)) → mark'(XS)
mark'(zeros') → a__zeros'
mark'(tail'(X)) → a__tail'(mark'(X))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(0') → 0'
a__zeros'zeros'
a__tail'(X) → tail'(X)

Rewrite Strategy: INNERMOST


Infered types.


Rules:
a__zeros'cons'(0', zeros')
a__tail'(cons'(X, XS)) → mark'(XS)
mark'(zeros') → a__zeros'
mark'(tail'(X)) → a__tail'(mark'(X))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(0') → 0'
a__zeros'zeros'
a__tail'(X) → tail'(X)

Types:
a__zeros' :: 0':zeros':cons':tail'
cons' :: 0':zeros':cons':tail' → 0':zeros':cons':tail' → 0':zeros':cons':tail'
0' :: 0':zeros':cons':tail'
zeros' :: 0':zeros':cons':tail'
a__tail' :: 0':zeros':cons':tail' → 0':zeros':cons':tail'
mark' :: 0':zeros':cons':tail' → 0':zeros':cons':tail'
tail' :: 0':zeros':cons':tail' → 0':zeros':cons':tail'
_hole_0':zeros':cons':tail'1 :: 0':zeros':cons':tail'
_gen_0':zeros':cons':tail'2 :: Nat → 0':zeros':cons':tail'


Heuristically decided to analyse the following defined symbols:
a__tail', mark'

They will be analysed ascendingly in the following order:
a__tail' = mark'


Rules:
a__zeros'cons'(0', zeros')
a__tail'(cons'(X, XS)) → mark'(XS)
mark'(zeros') → a__zeros'
mark'(tail'(X)) → a__tail'(mark'(X))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(0') → 0'
a__zeros'zeros'
a__tail'(X) → tail'(X)

Types:
a__zeros' :: 0':zeros':cons':tail'
cons' :: 0':zeros':cons':tail' → 0':zeros':cons':tail' → 0':zeros':cons':tail'
0' :: 0':zeros':cons':tail'
zeros' :: 0':zeros':cons':tail'
a__tail' :: 0':zeros':cons':tail' → 0':zeros':cons':tail'
mark' :: 0':zeros':cons':tail' → 0':zeros':cons':tail'
tail' :: 0':zeros':cons':tail' → 0':zeros':cons':tail'
_hole_0':zeros':cons':tail'1 :: 0':zeros':cons':tail'
_gen_0':zeros':cons':tail'2 :: Nat → 0':zeros':cons':tail'

Generator Equations:
_gen_0':zeros':cons':tail'2(0) ⇔ 0'
_gen_0':zeros':cons':tail'2(+(x, 1)) ⇔ cons'(_gen_0':zeros':cons':tail'2(x), 0')

The following defined symbols remain to be analysed:
mark', a__tail'

They will be analysed ascendingly in the following order:
a__tail' = mark'


Proved the following rewrite lemma:
mark'(_gen_0':zeros':cons':tail'2(_n4)) → _gen_0':zeros':cons':tail'2(_n4), rt ∈ Ω(1 + n4)

Induction Base:
mark'(_gen_0':zeros':cons':tail'2(0)) →RΩ(1)
0'

Induction Step:
mark'(_gen_0':zeros':cons':tail'2(+(_$n5, 1))) →RΩ(1)
cons'(mark'(_gen_0':zeros':cons':tail'2(_$n5)), 0') →IH
cons'(_gen_0':zeros':cons':tail'2(_$n5), 0')

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


Rules:
a__zeros'cons'(0', zeros')
a__tail'(cons'(X, XS)) → mark'(XS)
mark'(zeros') → a__zeros'
mark'(tail'(X)) → a__tail'(mark'(X))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(0') → 0'
a__zeros'zeros'
a__tail'(X) → tail'(X)

Types:
a__zeros' :: 0':zeros':cons':tail'
cons' :: 0':zeros':cons':tail' → 0':zeros':cons':tail' → 0':zeros':cons':tail'
0' :: 0':zeros':cons':tail'
zeros' :: 0':zeros':cons':tail'
a__tail' :: 0':zeros':cons':tail' → 0':zeros':cons':tail'
mark' :: 0':zeros':cons':tail' → 0':zeros':cons':tail'
tail' :: 0':zeros':cons':tail' → 0':zeros':cons':tail'
_hole_0':zeros':cons':tail'1 :: 0':zeros':cons':tail'
_gen_0':zeros':cons':tail'2 :: Nat → 0':zeros':cons':tail'

Lemmas:
mark'(_gen_0':zeros':cons':tail'2(_n4)) → _gen_0':zeros':cons':tail'2(_n4), rt ∈ Ω(1 + n4)

Generator Equations:
_gen_0':zeros':cons':tail'2(0) ⇔ 0'
_gen_0':zeros':cons':tail'2(+(x, 1)) ⇔ cons'(_gen_0':zeros':cons':tail'2(x), 0')

The following defined symbols remain to be analysed:
a__tail'

They will be analysed ascendingly in the following order:
a__tail' = mark'


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


Rules:
a__zeros'cons'(0', zeros')
a__tail'(cons'(X, XS)) → mark'(XS)
mark'(zeros') → a__zeros'
mark'(tail'(X)) → a__tail'(mark'(X))
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(0') → 0'
a__zeros'zeros'
a__tail'(X) → tail'(X)

Types:
a__zeros' :: 0':zeros':cons':tail'
cons' :: 0':zeros':cons':tail' → 0':zeros':cons':tail' → 0':zeros':cons':tail'
0' :: 0':zeros':cons':tail'
zeros' :: 0':zeros':cons':tail'
a__tail' :: 0':zeros':cons':tail' → 0':zeros':cons':tail'
mark' :: 0':zeros':cons':tail' → 0':zeros':cons':tail'
tail' :: 0':zeros':cons':tail' → 0':zeros':cons':tail'
_hole_0':zeros':cons':tail'1 :: 0':zeros':cons':tail'
_gen_0':zeros':cons':tail'2 :: Nat → 0':zeros':cons':tail'

Lemmas:
mark'(_gen_0':zeros':cons':tail'2(_n4)) → _gen_0':zeros':cons':tail'2(_n4), rt ∈ Ω(1 + n4)

Generator Equations:
_gen_0':zeros':cons':tail'2(0) ⇔ 0'
_gen_0':zeros':cons':tail'2(+(x, 1)) ⇔ cons'(_gen_0':zeros':cons':tail'2(x), 0')

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
mark'(_gen_0':zeros':cons':tail'2(_n4)) → _gen_0':zeros':cons':tail'2(_n4), rt ∈ Ω(1 + n4)