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

division(x, y) → div(x, y, 0)
div(x, y, z) → if(lt(x, y), x, y, inc(z))
if(true, x, y, z) → z
if(false, x, s(y), z) → div(minus(x, s(y)), s(y), z)
minus(x, 0) → x
minus(s(x), s(y)) → minus(x, y)
lt(x, 0) → false
lt(0, s(y)) → true
lt(s(x), s(y)) → lt(x, y)
inc(0) → s(0)
inc(s(x)) → s(inc(x))

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

division'(x, y) → div'(x, y, 0')
div'(x, y, z) → if'(lt'(x, y), x, y, inc'(z))
if'(true', x, y, z) → z
if'(false', x, s'(y), z) → div'(minus'(x, s'(y)), s'(y), z)
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
lt'(x, 0') → false'
lt'(0', s'(y)) → true'
lt'(s'(x), s'(y)) → lt'(x, y)
inc'(0') → s'(0')
inc'(s'(x)) → s'(inc'(x))

Rewrite Strategy: INNERMOST

Infered types.

Rules:
division'(x, y) → div'(x, y, 0')
div'(x, y, z) → if'(lt'(x, y), x, y, inc'(z))
if'(true', x, y, z) → z
if'(false', x, s'(y), z) → div'(minus'(x, s'(y)), s'(y), z)
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
lt'(x, 0') → false'
lt'(0', s'(y)) → true'
lt'(s'(x), s'(y)) → lt'(x, y)
inc'(0') → s'(0')
inc'(s'(x)) → s'(inc'(x))

Types:
division' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s' → 0':s'
0' :: 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s' → 0':s'
lt' :: 0':s' → 0':s' → true':false'
inc' :: 0':s' → 0':s'
true' :: true':false'
false' :: true':false'
s' :: 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Heuristically decided to analyse the following defined symbols:
div', lt', inc', minus'

They will be analysed ascendingly in the following order:
lt' < div'
inc' < div'
minus' < div'

Rules:
division'(x, y) → div'(x, y, 0')
div'(x, y, z) → if'(lt'(x, y), x, y, inc'(z))
if'(true', x, y, z) → z
if'(false', x, s'(y), z) → div'(minus'(x, s'(y)), s'(y), z)
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
lt'(x, 0') → false'
lt'(0', s'(y)) → true'
lt'(s'(x), s'(y)) → lt'(x, y)
inc'(0') → s'(0')
inc'(s'(x)) → s'(inc'(x))

Types:
division' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s' → 0':s'
0' :: 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s' → 0':s'
lt' :: 0':s' → 0':s' → true':false'
inc' :: 0':s' → 0':s'
true' :: true':false'
false' :: true':false'
s' :: 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

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

The following defined symbols remain to be analysed:
lt', div', inc', minus'

They will be analysed ascendingly in the following order:
lt' < div'
inc' < div'
minus' < div'

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

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

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

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

Rules:
division'(x, y) → div'(x, y, 0')
div'(x, y, z) → if'(lt'(x, y), x, y, inc'(z))
if'(true', x, y, z) → z
if'(false', x, s'(y), z) → div'(minus'(x, s'(y)), s'(y), z)
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
lt'(x, 0') → false'
lt'(0', s'(y)) → true'
lt'(s'(x), s'(y)) → lt'(x, y)
inc'(0') → s'(0')
inc'(s'(x)) → s'(inc'(x))

Types:
division' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s' → 0':s'
0' :: 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s' → 0':s'
lt' :: 0':s' → 0':s' → true':false'
inc' :: 0':s' → 0':s'
true' :: true':false'
false' :: true':false'
s' :: 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

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

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

The following defined symbols remain to be analysed:
inc', div', minus'

They will be analysed ascendingly in the following order:
inc' < div'
minus' < div'

Proved the following rewrite lemma:
inc'(_gen_0':s'3(_n629)) → _gen_0':s'3(+(1, _n629)), rt ∈ Ω(1 + n629)

Induction Base:
inc'(_gen_0':s'3(0)) →RΩ(1)
s'(0')

Induction Step:
inc'(_gen_0':s'3(+(_\$n630, 1))) →RΩ(1)
s'(inc'(_gen_0':s'3(_\$n630))) →IH
s'(_gen_0':s'3(+(1, _\$n630)))

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

Rules:
division'(x, y) → div'(x, y, 0')
div'(x, y, z) → if'(lt'(x, y), x, y, inc'(z))
if'(true', x, y, z) → z
if'(false', x, s'(y), z) → div'(minus'(x, s'(y)), s'(y), z)
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
lt'(x, 0') → false'
lt'(0', s'(y)) → true'
lt'(s'(x), s'(y)) → lt'(x, y)
inc'(0') → s'(0')
inc'(s'(x)) → s'(inc'(x))

Types:
division' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s' → 0':s'
0' :: 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s' → 0':s'
lt' :: 0':s' → 0':s' → true':false'
inc' :: 0':s' → 0':s'
true' :: true':false'
false' :: true':false'
s' :: 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
lt'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → false', rt ∈ Ω(1 + n5)
inc'(_gen_0':s'3(_n629)) → _gen_0':s'3(+(1, _n629)), rt ∈ Ω(1 + n629)

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

The following defined symbols remain to be analysed:
minus', div'

They will be analysed ascendingly in the following order:
minus' < div'

Proved the following rewrite lemma:
minus'(_gen_0':s'3(_n1158), _gen_0':s'3(_n1158)) → _gen_0':s'3(0), rt ∈ Ω(1 + n1158)

Induction Base:
minus'(_gen_0':s'3(0), _gen_0':s'3(0)) →RΩ(1)
_gen_0':s'3(0)

Induction Step:
minus'(_gen_0':s'3(+(_\$n1159, 1)), _gen_0':s'3(+(_\$n1159, 1))) →RΩ(1)
minus'(_gen_0':s'3(_\$n1159), _gen_0':s'3(_\$n1159)) →IH
_gen_0':s'3(0)

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

Rules:
division'(x, y) → div'(x, y, 0')
div'(x, y, z) → if'(lt'(x, y), x, y, inc'(z))
if'(true', x, y, z) → z
if'(false', x, s'(y), z) → div'(minus'(x, s'(y)), s'(y), z)
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
lt'(x, 0') → false'
lt'(0', s'(y)) → true'
lt'(s'(x), s'(y)) → lt'(x, y)
inc'(0') → s'(0')
inc'(s'(x)) → s'(inc'(x))

Types:
division' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s' → 0':s'
0' :: 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s' → 0':s'
lt' :: 0':s' → 0':s' → true':false'
inc' :: 0':s' → 0':s'
true' :: true':false'
false' :: true':false'
s' :: 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
lt'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → false', rt ∈ Ω(1 + n5)
inc'(_gen_0':s'3(_n629)) → _gen_0':s'3(+(1, _n629)), rt ∈ Ω(1 + n629)
minus'(_gen_0':s'3(_n1158), _gen_0':s'3(_n1158)) → _gen_0':s'3(0), rt ∈ Ω(1 + n1158)

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

The following defined symbols remain to be analysed:
div'

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

Rules:
division'(x, y) → div'(x, y, 0')
div'(x, y, z) → if'(lt'(x, y), x, y, inc'(z))
if'(true', x, y, z) → z
if'(false', x, s'(y), z) → div'(minus'(x, s'(y)), s'(y), z)
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
lt'(x, 0') → false'
lt'(0', s'(y)) → true'
lt'(s'(x), s'(y)) → lt'(x, y)
inc'(0') → s'(0')
inc'(s'(x)) → s'(inc'(x))

Types:
division' :: 0':s' → 0':s' → 0':s'
div' :: 0':s' → 0':s' → 0':s' → 0':s'
0' :: 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s' → 0':s'
lt' :: 0':s' → 0':s' → true':false'
inc' :: 0':s' → 0':s'
true' :: true':false'
false' :: true':false'
s' :: 0':s' → 0':s'
minus' :: 0':s' → 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
lt'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → false', rt ∈ Ω(1 + n5)
inc'(_gen_0':s'3(_n629)) → _gen_0':s'3(+(1, _n629)), rt ∈ Ω(1 + n629)
minus'(_gen_0':s'3(_n1158), _gen_0':s'3(_n1158)) → _gen_0':s'3(0), rt ∈ Ω(1 + n1158)

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

No more defined symbols left to analyse.

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