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

fib(0) → 0
fib(s(0)) → s(0)
fib(s(s(x))) → +(fib(s(x)), fib(x))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


fib'(0') → 0'
fib'(s'(0')) → s'(0')
fib'(s'(s'(x))) → +'(fib'(s'(x)), fib'(x))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
fib'(0') → 0'
fib'(s'(0')) → s'(0')
fib'(s'(s'(x))) → +'(fib'(s'(x)), fib'(x))

Types:
fib' :: 0':s':+' → 0':s':+'
0' :: 0':s':+'
s' :: 0':s':+' → 0':s':+'
+' :: 0':s':+' → 0':s':+' → 0':s':+'
_hole_0':s':+'1 :: 0':s':+'
_gen_0':s':+'2 :: Nat → 0':s':+'


Heuristically decided to analyse the following defined symbols:
fib'


Rules:
fib'(0') → 0'
fib'(s'(0')) → s'(0')
fib'(s'(s'(x))) → +'(fib'(s'(x)), fib'(x))

Types:
fib' :: 0':s':+' → 0':s':+'
0' :: 0':s':+'
s' :: 0':s':+' → 0':s':+'
+' :: 0':s':+' → 0':s':+' → 0':s':+'
_hole_0':s':+'1 :: 0':s':+'
_gen_0':s':+'2 :: Nat → 0':s':+'

Generator Equations:
_gen_0':s':+'2(0) ⇔ 0'
_gen_0':s':+'2(+(x, 1)) ⇔ s'(_gen_0':s':+'2(x))

The following defined symbols remain to be analysed:
fib'


Proved the following rewrite lemma:
fib'(_gen_0':s':+'2(+(2, _n4))) → _*3, rt ∈ Ω(n4)

Induction Base:
fib'(_gen_0':s':+'2(+(2, 0)))

Induction Step:
fib'(_gen_0':s':+'2(+(2, +(_$n5, 1)))) →RΩ(1)
+'(fib'(s'(_gen_0':s':+'2(+(1, _$n5)))), fib'(_gen_0':s':+'2(+(1, _$n5)))) →IH
+'(_*3, fib'(_gen_0':s':+'2(+(1, _$n5))))

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


Rules:
fib'(0') → 0'
fib'(s'(0')) → s'(0')
fib'(s'(s'(x))) → +'(fib'(s'(x)), fib'(x))

Types:
fib' :: 0':s':+' → 0':s':+'
0' :: 0':s':+'
s' :: 0':s':+' → 0':s':+'
+' :: 0':s':+' → 0':s':+' → 0':s':+'
_hole_0':s':+'1 :: 0':s':+'
_gen_0':s':+'2 :: Nat → 0':s':+'

Lemmas:
fib'(_gen_0':s':+'2(+(2, _n4))) → _*3, rt ∈ Ω(n4)

Generator Equations:
_gen_0':s':+'2(0) ⇔ 0'
_gen_0':s':+'2(+(x, 1)) ⇔ s'(_gen_0':s':+'2(x))

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
fib'(_gen_0':s':+'2(+(2, _n4))) → _*3, rt ∈ Ω(n4)