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

lt(0, s(x)) → true
lt(x, 0) → false
lt(s(x), s(y)) → lt(x, y)
fac(x) → help(x, 0)
help(x, c) → if(lt(c, x), x, c)
if(true, x, c) → times(s(c), help(x, s(c)))
if(false, x, c) → s(0)

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


lt'(0', s'(x)) → true'
lt'(x, 0') → false'
lt'(s'(x), s'(y)) → lt'(x, y)
fac'(x) → help'(x, 0')
help'(x, c) → if'(lt'(c, x), x, c)
if'(true', x, c) → times'(s'(c), help'(x, s'(c)))
if'(false', x, c) → s'(0')

Rewrite Strategy: INNERMOST


Sliced the following arguments:
times'/0


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


lt'(0', s'(x)) → true'
lt'(x, 0') → false'
lt'(s'(x), s'(y)) → lt'(x, y)
fac'(x) → help'(x, 0')
help'(x, c) → if'(lt'(c, x), x, c)
if'(true', x, c) → times'(help'(x, s'(c)))
if'(false', x, c) → s'(0')

Rewrite Strategy: INNERMOST


Infered types.


Rules:
lt'(0', s'(x)) → true'
lt'(x, 0') → false'
lt'(s'(x), s'(y)) → lt'(x, y)
fac'(x) → help'(x, 0')
help'(x, c) → if'(lt'(c, x), x, c)
if'(true', x, c) → times'(help'(x, s'(c)))
if'(false', x, c) → s'(0')

Types:
lt' :: 0':s':times' → 0':s':times' → true':false'
0' :: 0':s':times'
s' :: 0':s':times' → 0':s':times'
true' :: true':false'
false' :: true':false'
fac' :: 0':s':times' → 0':s':times'
help' :: 0':s':times' → 0':s':times' → 0':s':times'
if' :: true':false' → 0':s':times' → 0':s':times' → 0':s':times'
times' :: 0':s':times' → 0':s':times'
_hole_true':false'1 :: true':false'
_hole_0':s':times'2 :: 0':s':times'
_gen_0':s':times'3 :: Nat → 0':s':times'


Heuristically decided to analyse the following defined symbols:
lt', help'

They will be analysed ascendingly in the following order:
lt' < help'


Rules:
lt'(0', s'(x)) → true'
lt'(x, 0') → false'
lt'(s'(x), s'(y)) → lt'(x, y)
fac'(x) → help'(x, 0')
help'(x, c) → if'(lt'(c, x), x, c)
if'(true', x, c) → times'(help'(x, s'(c)))
if'(false', x, c) → s'(0')

Types:
lt' :: 0':s':times' → 0':s':times' → true':false'
0' :: 0':s':times'
s' :: 0':s':times' → 0':s':times'
true' :: true':false'
false' :: true':false'
fac' :: 0':s':times' → 0':s':times'
help' :: 0':s':times' → 0':s':times' → 0':s':times'
if' :: true':false' → 0':s':times' → 0':s':times' → 0':s':times'
times' :: 0':s':times' → 0':s':times'
_hole_true':false'1 :: true':false'
_hole_0':s':times'2 :: 0':s':times'
_gen_0':s':times'3 :: Nat → 0':s':times'

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

The following defined symbols remain to be analysed:
lt', help'

They will be analysed ascendingly in the following order:
lt' < help'


Proved the following rewrite lemma:
lt'(_gen_0':s':times'3(_n5), _gen_0':s':times'3(+(1, _n5))) → true', rt ∈ Ω(1 + n5)

Induction Base:
lt'(_gen_0':s':times'3(0), _gen_0':s':times'3(+(1, 0))) →RΩ(1)
true'

Induction Step:
lt'(_gen_0':s':times'3(+(_$n6, 1)), _gen_0':s':times'3(+(1, +(_$n6, 1)))) →RΩ(1)
lt'(_gen_0':s':times'3(_$n6), _gen_0':s':times'3(+(1, _$n6))) →IH
true'

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


Rules:
lt'(0', s'(x)) → true'
lt'(x, 0') → false'
lt'(s'(x), s'(y)) → lt'(x, y)
fac'(x) → help'(x, 0')
help'(x, c) → if'(lt'(c, x), x, c)
if'(true', x, c) → times'(help'(x, s'(c)))
if'(false', x, c) → s'(0')

Types:
lt' :: 0':s':times' → 0':s':times' → true':false'
0' :: 0':s':times'
s' :: 0':s':times' → 0':s':times'
true' :: true':false'
false' :: true':false'
fac' :: 0':s':times' → 0':s':times'
help' :: 0':s':times' → 0':s':times' → 0':s':times'
if' :: true':false' → 0':s':times' → 0':s':times' → 0':s':times'
times' :: 0':s':times' → 0':s':times'
_hole_true':false'1 :: true':false'
_hole_0':s':times'2 :: 0':s':times'
_gen_0':s':times'3 :: Nat → 0':s':times'

Lemmas:
lt'(_gen_0':s':times'3(_n5), _gen_0':s':times'3(+(1, _n5))) → true', rt ∈ Ω(1 + n5)

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

The following defined symbols remain to be analysed:
help'


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


Rules:
lt'(0', s'(x)) → true'
lt'(x, 0') → false'
lt'(s'(x), s'(y)) → lt'(x, y)
fac'(x) → help'(x, 0')
help'(x, c) → if'(lt'(c, x), x, c)
if'(true', x, c) → times'(help'(x, s'(c)))
if'(false', x, c) → s'(0')

Types:
lt' :: 0':s':times' → 0':s':times' → true':false'
0' :: 0':s':times'
s' :: 0':s':times' → 0':s':times'
true' :: true':false'
false' :: true':false'
fac' :: 0':s':times' → 0':s':times'
help' :: 0':s':times' → 0':s':times' → 0':s':times'
if' :: true':false' → 0':s':times' → 0':s':times' → 0':s':times'
times' :: 0':s':times' → 0':s':times'
_hole_true':false'1 :: true':false'
_hole_0':s':times'2 :: 0':s':times'
_gen_0':s':times'3 :: Nat → 0':s':times'

Lemmas:
lt'(_gen_0':s':times'3(_n5), _gen_0':s':times'3(+(1, _n5))) → true', rt ∈ Ω(1 + n5)

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

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
lt'(_gen_0':s':times'3(_n5), _gen_0':s':times'3(+(1, _n5))) → true', rt ∈ Ω(1 + n5)