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

p(s(x)) → x
fac(0) → s(0)
fac(s(x)) → times(s(x), fac(p(s(x))))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


p'(s'(x)) → x
fac'(0') → s'(0')
fac'(s'(x)) → times'(s'(x), fac'(p'(s'(x))))

Rewrite Strategy: INNERMOST


Sliced the following arguments:
times'/0


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


p'(s'(x)) → x
fac'(0') → s'(0')
fac'(s'(x)) → times'(fac'(p'(s'(x))))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
p'(s'(x)) → x
fac'(0') → s'(0')
fac'(s'(x)) → times'(fac'(p'(s'(x))))

Types:
p' :: s':0':times' → s':0':times'
s' :: s':0':times' → s':0':times'
fac' :: s':0':times' → s':0':times'
0' :: s':0':times'
times' :: s':0':times' → s':0':times'
_hole_s':0':times'1 :: s':0':times'
_gen_s':0':times'2 :: Nat → s':0':times'


Heuristically decided to analyse the following defined symbols:
fac'


Rules:
p'(s'(x)) → x
fac'(0') → s'(0')
fac'(s'(x)) → times'(fac'(p'(s'(x))))

Types:
p' :: s':0':times' → s':0':times'
s' :: s':0':times' → s':0':times'
fac' :: s':0':times' → s':0':times'
0' :: s':0':times'
times' :: s':0':times' → s':0':times'
_hole_s':0':times'1 :: s':0':times'
_gen_s':0':times'2 :: Nat → s':0':times'

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

The following defined symbols remain to be analysed:
fac'


Proved the following rewrite lemma:
fac'(_gen_s':0':times'2(_n4)) → _*3, rt ∈ Ω(n4)

Induction Base:
fac'(_gen_s':0':times'2(0))

Induction Step:
fac'(_gen_s':0':times'2(+(_$n5, 1))) →RΩ(1)
times'(fac'(p'(s'(_gen_s':0':times'2(_$n5))))) →RΩ(1)
times'(fac'(_gen_s':0':times'2(_$n5))) →IH
times'(_*3)

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


Rules:
p'(s'(x)) → x
fac'(0') → s'(0')
fac'(s'(x)) → times'(fac'(p'(s'(x))))

Types:
p' :: s':0':times' → s':0':times'
s' :: s':0':times' → s':0':times'
fac' :: s':0':times' → s':0':times'
0' :: s':0':times'
times' :: s':0':times' → s':0':times'
_hole_s':0':times'1 :: s':0':times'
_gen_s':0':times'2 :: Nat → s':0':times'

Lemmas:
fac'(_gen_s':0':times'2(_n4)) → _*3, rt ∈ Ω(n4)

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

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
fac'(_gen_s':0':times'2(_n4)) → _*3, rt ∈ Ω(n4)