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

ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
id_inc(x) → x
id_inc(x) → s(x)
quot(x, y) → div(x, y, 0)
div(x, y, z) → if(ge(y, s(0)), ge(x, y), x, y, z)
if(false, b, x, y, z) → div_by_zero
if(true, false, x, y, z) → z
if(true, true, x, y, z) → div(minus(x, y), y, id_inc(z))

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
minus'(x, 0') → x
minus'(0', y) → 0'
minus'(s'(x), s'(y)) → minus'(x, y)
id_inc'(x) → x
id_inc'(x) → s'(x)
quot'(x, y) → div'(x, y, 0')
div'(x, y, z) → if'(ge'(y, s'(0')), ge'(x, y), x, y, z)
if'(false', b, x, y, z) → div_by_zero'
if'(true', false', x, y, z) → z
if'(true', true', x, y, z) → div'(minus'(x, y), y, id_inc'(z))

Rewrite Strategy: INNERMOST

Infered types.

Rules:
ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
minus'(x, 0') → x
minus'(0', y) → 0'
minus'(s'(x), s'(y)) → minus'(x, y)
id_inc'(x) → x
id_inc'(x) → s'(x)
quot'(x, y) → div'(x, y, 0')
div'(x, y, z) → if'(ge'(y, s'(0')), ge'(x, y), x, y, z)
if'(false', b, x, y, z) → div_by_zero'
if'(true', false', x, y, z) → z
if'(true', true', x, y, z) → div'(minus'(x, y), y, id_inc'(z))

Types:
ge' :: 0':s':div_by_zero' → 0':s':div_by_zero' → true':false'
0' :: 0':s':div_by_zero'
true' :: true':false'
s' :: 0':s':div_by_zero' → 0':s':div_by_zero'
false' :: true':false'
minus' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
id_inc' :: 0':s':div_by_zero' → 0':s':div_by_zero'
quot' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
div' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
if' :: true':false' → true':false' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
div_by_zero' :: 0':s':div_by_zero'
_hole_true':false'1 :: true':false'
_hole_0':s':div_by_zero'2 :: 0':s':div_by_zero'
_gen_0':s':div_by_zero'3 :: Nat → 0':s':div_by_zero'

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

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

Rules:
ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
minus'(x, 0') → x
minus'(0', y) → 0'
minus'(s'(x), s'(y)) → minus'(x, y)
id_inc'(x) → x
id_inc'(x) → s'(x)
quot'(x, y) → div'(x, y, 0')
div'(x, y, z) → if'(ge'(y, s'(0')), ge'(x, y), x, y, z)
if'(false', b, x, y, z) → div_by_zero'
if'(true', false', x, y, z) → z
if'(true', true', x, y, z) → div'(minus'(x, y), y, id_inc'(z))

Types:
ge' :: 0':s':div_by_zero' → 0':s':div_by_zero' → true':false'
0' :: 0':s':div_by_zero'
true' :: true':false'
s' :: 0':s':div_by_zero' → 0':s':div_by_zero'
false' :: true':false'
minus' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
id_inc' :: 0':s':div_by_zero' → 0':s':div_by_zero'
quot' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
div' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
if' :: true':false' → true':false' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
div_by_zero' :: 0':s':div_by_zero'
_hole_true':false'1 :: true':false'
_hole_0':s':div_by_zero'2 :: 0':s':div_by_zero'
_gen_0':s':div_by_zero'3 :: Nat → 0':s':div_by_zero'

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

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

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

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

Induction Base:
ge'(_gen_0':s':div_by_zero'3(0), _gen_0':s':div_by_zero'3(0)) →RΩ(1)
true'

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

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

Rules:
ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
minus'(x, 0') → x
minus'(0', y) → 0'
minus'(s'(x), s'(y)) → minus'(x, y)
id_inc'(x) → x
id_inc'(x) → s'(x)
quot'(x, y) → div'(x, y, 0')
div'(x, y, z) → if'(ge'(y, s'(0')), ge'(x, y), x, y, z)
if'(false', b, x, y, z) → div_by_zero'
if'(true', false', x, y, z) → z
if'(true', true', x, y, z) → div'(minus'(x, y), y, id_inc'(z))

Types:
ge' :: 0':s':div_by_zero' → 0':s':div_by_zero' → true':false'
0' :: 0':s':div_by_zero'
true' :: true':false'
s' :: 0':s':div_by_zero' → 0':s':div_by_zero'
false' :: true':false'
minus' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
id_inc' :: 0':s':div_by_zero' → 0':s':div_by_zero'
quot' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
div' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
if' :: true':false' → true':false' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
div_by_zero' :: 0':s':div_by_zero'
_hole_true':false'1 :: true':false'
_hole_0':s':div_by_zero'2 :: 0':s':div_by_zero'
_gen_0':s':div_by_zero'3 :: Nat → 0':s':div_by_zero'

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

Generator Equations:
_gen_0':s':div_by_zero'3(0) ⇔ 0'
_gen_0':s':div_by_zero'3(+(x, 1)) ⇔ s'(_gen_0':s':div_by_zero'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':div_by_zero'3(_n779), _gen_0':s':div_by_zero'3(_n779)) → _gen_0':s':div_by_zero'3(0), rt ∈ Ω(1 + n779)

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

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

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

Rules:
ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
minus'(x, 0') → x
minus'(0', y) → 0'
minus'(s'(x), s'(y)) → minus'(x, y)
id_inc'(x) → x
id_inc'(x) → s'(x)
quot'(x, y) → div'(x, y, 0')
div'(x, y, z) → if'(ge'(y, s'(0')), ge'(x, y), x, y, z)
if'(false', b, x, y, z) → div_by_zero'
if'(true', false', x, y, z) → z
if'(true', true', x, y, z) → div'(minus'(x, y), y, id_inc'(z))

Types:
ge' :: 0':s':div_by_zero' → 0':s':div_by_zero' → true':false'
0' :: 0':s':div_by_zero'
true' :: true':false'
s' :: 0':s':div_by_zero' → 0':s':div_by_zero'
false' :: true':false'
minus' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
id_inc' :: 0':s':div_by_zero' → 0':s':div_by_zero'
quot' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
div' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
if' :: true':false' → true':false' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
div_by_zero' :: 0':s':div_by_zero'
_hole_true':false'1 :: true':false'
_hole_0':s':div_by_zero'2 :: 0':s':div_by_zero'
_gen_0':s':div_by_zero'3 :: Nat → 0':s':div_by_zero'

Lemmas:
ge'(_gen_0':s':div_by_zero'3(_n5), _gen_0':s':div_by_zero'3(_n5)) → true', rt ∈ Ω(1 + n5)
minus'(_gen_0':s':div_by_zero'3(_n779), _gen_0':s':div_by_zero'3(_n779)) → _gen_0':s':div_by_zero'3(0), rt ∈ Ω(1 + n779)

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

The following defined symbols remain to be analysed:
div'

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

Rules:
ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
minus'(x, 0') → x
minus'(0', y) → 0'
minus'(s'(x), s'(y)) → minus'(x, y)
id_inc'(x) → x
id_inc'(x) → s'(x)
quot'(x, y) → div'(x, y, 0')
div'(x, y, z) → if'(ge'(y, s'(0')), ge'(x, y), x, y, z)
if'(false', b, x, y, z) → div_by_zero'
if'(true', false', x, y, z) → z
if'(true', true', x, y, z) → div'(minus'(x, y), y, id_inc'(z))

Types:
ge' :: 0':s':div_by_zero' → 0':s':div_by_zero' → true':false'
0' :: 0':s':div_by_zero'
true' :: true':false'
s' :: 0':s':div_by_zero' → 0':s':div_by_zero'
false' :: true':false'
minus' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
id_inc' :: 0':s':div_by_zero' → 0':s':div_by_zero'
quot' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
div' :: 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
if' :: true':false' → true':false' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero' → 0':s':div_by_zero'
div_by_zero' :: 0':s':div_by_zero'
_hole_true':false'1 :: true':false'
_hole_0':s':div_by_zero'2 :: 0':s':div_by_zero'
_gen_0':s':div_by_zero'3 :: Nat → 0':s':div_by_zero'

Lemmas:
ge'(_gen_0':s':div_by_zero'3(_n5), _gen_0':s':div_by_zero'3(_n5)) → true', rt ∈ Ω(1 + n5)
minus'(_gen_0':s':div_by_zero'3(_n779), _gen_0':s':div_by_zero'3(_n779)) → _gen_0':s':div_by_zero'3(0), rt ∈ Ω(1 + n779)

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

No more defined symbols left to analyse.

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