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

fac(s(x)) → *(fac(p(s(x))), s(x))
p(s(0)) → 0
p(s(s(x))) → s(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:


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

Rewrite Strategy: INNERMOST


Sliced the following arguments:
*'/1


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


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

Rewrite Strategy: INNERMOST


Infered types.


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

Types:
fac' :: s':0' → *'
s' :: s':0' → s':0'
*' :: *' → *'
p' :: s':0' → s':0'
0' :: s':0'
_hole_*'1 :: *'
_hole_s':0'2 :: s':0'
_gen_*'3 :: Nat → *'
_gen_s':0'4 :: Nat → s':0'


Heuristically decided to analyse the following defined symbols:
fac', p'

They will be analysed ascendingly in the following order:
p' < fac'


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

Types:
fac' :: s':0' → *'
s' :: s':0' → s':0'
*' :: *' → *'
p' :: s':0' → s':0'
0' :: s':0'
_hole_*'1 :: *'
_hole_s':0'2 :: s':0'
_gen_*'3 :: Nat → *'
_gen_s':0'4 :: Nat → s':0'

Generator Equations:
_gen_*'3(0) ⇔ _hole_*'1
_gen_*'3(+(x, 1)) ⇔ *'(_gen_*'3(x))
_gen_s':0'4(0) ⇔ 0'
_gen_s':0'4(+(x, 1)) ⇔ s'(_gen_s':0'4(x))

The following defined symbols remain to be analysed:
p', fac'

They will be analysed ascendingly in the following order:
p' < fac'


Proved the following rewrite lemma:
p'(_gen_s':0'4(+(1, _n6))) → _gen_s':0'4(_n6), rt ∈ Ω(1 + n6)

Induction Base:
p'(_gen_s':0'4(+(1, 0))) →RΩ(1)
0'

Induction Step:
p'(_gen_s':0'4(+(1, +(_$n7, 1)))) →RΩ(1)
s'(p'(s'(_gen_s':0'4(_$n7)))) →IH
s'(_gen_s':0'4(_$n7))

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


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

Types:
fac' :: s':0' → *'
s' :: s':0' → s':0'
*' :: *' → *'
p' :: s':0' → s':0'
0' :: s':0'
_hole_*'1 :: *'
_hole_s':0'2 :: s':0'
_gen_*'3 :: Nat → *'
_gen_s':0'4 :: Nat → s':0'

Lemmas:
p'(_gen_s':0'4(+(1, _n6))) → _gen_s':0'4(_n6), rt ∈ Ω(1 + n6)

Generator Equations:
_gen_*'3(0) ⇔ _hole_*'1
_gen_*'3(+(x, 1)) ⇔ *'(_gen_*'3(x))
_gen_s':0'4(0) ⇔ 0'
_gen_s':0'4(+(x, 1)) ⇔ s'(_gen_s':0'4(x))

The following defined symbols remain to be analysed:
fac'


Proved the following rewrite lemma:
fac'(_gen_s':0'4(+(1, _n182))) → _*5, rt ∈ Ω(n182 + n1822)

Induction Base:
fac'(_gen_s':0'4(+(1, 0)))

Induction Step:
fac'(_gen_s':0'4(+(1, +(_$n183, 1)))) →RΩ(1)
*'(fac'(p'(s'(_gen_s':0'4(+(1, _$n183)))))) →LΩ(2 + $n183)
*'(fac'(_gen_s':0'4(+(1, _$n183)))) →IH
*'(_*5)

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


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

Types:
fac' :: s':0' → *'
s' :: s':0' → s':0'
*' :: *' → *'
p' :: s':0' → s':0'
0' :: s':0'
_hole_*'1 :: *'
_hole_s':0'2 :: s':0'
_gen_*'3 :: Nat → *'
_gen_s':0'4 :: Nat → s':0'

Lemmas:
p'(_gen_s':0'4(+(1, _n6))) → _gen_s':0'4(_n6), rt ∈ Ω(1 + n6)
fac'(_gen_s':0'4(+(1, _n182))) → _*5, rt ∈ Ω(n182 + n1822)

Generator Equations:
_gen_*'3(0) ⇔ _hole_*'1
_gen_*'3(+(x, 1)) ⇔ *'(_gen_*'3(x))
_gen_s':0'4(0) ⇔ 0'
_gen_s':0'4(+(x, 1)) ⇔ s'(_gen_s':0'4(x))

No more defined symbols left to analyse.


The lowerbound Ω(n2) was proven with the following lemma:
fac'(_gen_s':0'4(+(1, _n182))) → _*5, rt ∈ Ω(n182 + n1822)