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

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
minus'(x, 0') → x
minus'(0', s'(y)) → 0'
minus'(s'(x), s'(y)) → minus'(x, y)
plus'(x, 0') → x
plus'(x, s'(y)) → s'(plus'(x, y))
mod'(s'(x), 0') → 0'
mod'(x, s'(y)) → help'(x, s'(y), 0')
help'(x, s'(y), c) → if'(le'(c, x), x, s'(y), c)
if'(true', x, s'(y), c) → help'(x, s'(y), plus'(c, s'(y)))
if'(false', x, s'(y), c) → minus'(x, minus'(c, s'(y)))

Rewrite Strategy: INNERMOST

Infered types.

Rules:
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
minus'(x, 0') → x
minus'(0', s'(y)) → 0'
minus'(s'(x), s'(y)) → minus'(x, y)
plus'(x, 0') → x
plus'(x, s'(y)) → s'(plus'(x, y))
mod'(s'(x), 0') → 0'
mod'(x, s'(y)) → help'(x, s'(y), 0')
help'(x, s'(y), c) → if'(le'(c, x), x, s'(y), c)
if'(true', x, s'(y), c) → help'(x, s'(y), plus'(c, s'(y)))
if'(false', x, s'(y), c) → minus'(x, minus'(c, s'(y)))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
minus' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
mod' :: 0':s' → 0':s' → 0':s'
help' :: 0':s' → 0':s' → 0':s' → 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s' → 0':s'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_gen_0':s'3 :: Nat → 0':s'

Heuristically decided to analyse the following defined symbols:
le', minus', plus', help'

They will be analysed ascendingly in the following order:
le' < help'
minus' < help'
plus' < help'

Rules:
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
minus'(x, 0') → x
minus'(0', s'(y)) → 0'
minus'(s'(x), s'(y)) → minus'(x, y)
plus'(x, 0') → x
plus'(x, s'(y)) → s'(plus'(x, y))
mod'(s'(x), 0') → 0'
mod'(x, s'(y)) → help'(x, s'(y), 0')
help'(x, s'(y), c) → if'(le'(c, x), x, s'(y), c)
if'(true', x, s'(y), c) → help'(x, s'(y), plus'(c, s'(y)))
if'(false', x, s'(y), c) → minus'(x, minus'(c, s'(y)))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
minus' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
mod' :: 0':s' → 0':s' → 0':s'
help' :: 0':s' → 0':s' → 0':s' → 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s' → 0':s'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_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:
le', minus', plus', help'

They will be analysed ascendingly in the following order:
le' < help'
minus' < help'
plus' < help'

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

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

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

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

Rules:
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
minus'(x, 0') → x
minus'(0', s'(y)) → 0'
minus'(s'(x), s'(y)) → minus'(x, y)
plus'(x, 0') → x
plus'(x, s'(y)) → s'(plus'(x, y))
mod'(s'(x), 0') → 0'
mod'(x, s'(y)) → help'(x, s'(y), 0')
help'(x, s'(y), c) → if'(le'(c, x), x, s'(y), c)
if'(true', x, s'(y), c) → help'(x, s'(y), plus'(c, s'(y)))
if'(false', x, s'(y), c) → minus'(x, minus'(c, s'(y)))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
minus' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
mod' :: 0':s' → 0':s' → 0':s'
help' :: 0':s' → 0':s' → 0':s' → 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s' → 0':s'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
le'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → true', 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:
minus', plus', help'

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

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

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(+(_\$n738, 1)), _gen_0':s'3(+(_\$n738, 1))) →RΩ(1)
minus'(_gen_0':s'3(_\$n738), _gen_0':s'3(_\$n738)) →IH
_gen_0':s'3(0)

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

Rules:
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
minus'(x, 0') → x
minus'(0', s'(y)) → 0'
minus'(s'(x), s'(y)) → minus'(x, y)
plus'(x, 0') → x
plus'(x, s'(y)) → s'(plus'(x, y))
mod'(s'(x), 0') → 0'
mod'(x, s'(y)) → help'(x, s'(y), 0')
help'(x, s'(y), c) → if'(le'(c, x), x, s'(y), c)
if'(true', x, s'(y), c) → help'(x, s'(y), plus'(c, s'(y)))
if'(false', x, s'(y), c) → minus'(x, minus'(c, s'(y)))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
minus' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
mod' :: 0':s' → 0':s' → 0':s'
help' :: 0':s' → 0':s' → 0':s' → 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s' → 0':s'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
le'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → true', rt ∈ Ω(1 + n5)
minus'(_gen_0':s'3(_n737), _gen_0':s'3(_n737)) → _gen_0':s'3(0), rt ∈ Ω(1 + n737)

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:
plus', help'

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

Proved the following rewrite lemma:
plus'(_gen_0':s'3(a), _gen_0':s'3(_n1699)) → _gen_0':s'3(+(_n1699, a)), rt ∈ Ω(1 + n1699)

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

Induction Step:
plus'(_gen_0':s'3(_a1832), _gen_0':s'3(+(_\$n1700, 1))) →RΩ(1)
s'(plus'(_gen_0':s'3(_a1832), _gen_0':s'3(_\$n1700))) →IH
s'(_gen_0':s'3(+(_\$n1700, _a1832)))

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

Rules:
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
minus'(x, 0') → x
minus'(0', s'(y)) → 0'
minus'(s'(x), s'(y)) → minus'(x, y)
plus'(x, 0') → x
plus'(x, s'(y)) → s'(plus'(x, y))
mod'(s'(x), 0') → 0'
mod'(x, s'(y)) → help'(x, s'(y), 0')
help'(x, s'(y), c) → if'(le'(c, x), x, s'(y), c)
if'(true', x, s'(y), c) → help'(x, s'(y), plus'(c, s'(y)))
if'(false', x, s'(y), c) → minus'(x, minus'(c, s'(y)))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
minus' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
mod' :: 0':s' → 0':s' → 0':s'
help' :: 0':s' → 0':s' → 0':s' → 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s' → 0':s'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
le'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → true', rt ∈ Ω(1 + n5)
minus'(_gen_0':s'3(_n737), _gen_0':s'3(_n737)) → _gen_0':s'3(0), rt ∈ Ω(1 + n737)
plus'(_gen_0':s'3(a), _gen_0':s'3(_n1699)) → _gen_0':s'3(+(_n1699, a)), rt ∈ Ω(1 + n1699)

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:
help'

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

Rules:
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
minus'(x, 0') → x
minus'(0', s'(y)) → 0'
minus'(s'(x), s'(y)) → minus'(x, y)
plus'(x, 0') → x
plus'(x, s'(y)) → s'(plus'(x, y))
mod'(s'(x), 0') → 0'
mod'(x, s'(y)) → help'(x, s'(y), 0')
help'(x, s'(y), c) → if'(le'(c, x), x, s'(y), c)
if'(true', x, s'(y), c) → help'(x, s'(y), plus'(c, s'(y)))
if'(false', x, s'(y), c) → minus'(x, minus'(c, s'(y)))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
minus' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
mod' :: 0':s' → 0':s' → 0':s'
help' :: 0':s' → 0':s' → 0':s' → 0':s'
if' :: true':false' → 0':s' → 0':s' → 0':s' → 0':s'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
le'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → true', rt ∈ Ω(1 + n5)
minus'(_gen_0':s'3(_n737), _gen_0':s'3(_n737)) → _gen_0':s'3(0), rt ∈ Ω(1 + n737)
plus'(_gen_0':s'3(a), _gen_0':s'3(_n1699)) → _gen_0':s'3(+(_n1699, a)), rt ∈ Ω(1 + n1699)

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:
le'(_gen_0':s'3(_n5), _gen_0':s'3(_n5)) → true', rt ∈ Ω(1 + n5)