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

minus(x, y) → cond(gt(x, y), x, y)
cond(false, x, y) → 0
cond(true, x, y) → s(minus(x, s(y)))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

minus'(x, y) → cond'(gt'(x, y), x, y)
cond'(false', x, y) → 0'
cond'(true', x, y) → s'(minus'(x, s'(y)))
gt'(0', v) → false'
gt'(s'(u), 0') → true'
gt'(s'(u), s'(v)) → gt'(u, v)

Rewrite Strategy: INNERMOST

Infered types.

Rules:
minus'(x, y) → cond'(gt'(x, y), x, y)
cond'(false', x, y) → 0'
cond'(true', x, y) → s'(minus'(x, s'(y)))
gt'(0', v) → false'
gt'(s'(u), 0') → true'
gt'(s'(u), s'(v)) → gt'(u, v)

Types:
minus' :: 0':s' → 0':s' → 0':s'
cond' :: false':true' → 0':s' → 0':s' → 0':s'
gt' :: 0':s' → 0':s' → false':true'
false' :: false':true'
0' :: 0':s'
true' :: false':true'
s' :: 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_false':true'2 :: false':true'
_gen_0':s'3 :: Nat → 0':s'

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

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

Rules:
minus'(x, y) → cond'(gt'(x, y), x, y)
cond'(false', x, y) → 0'
cond'(true', x, y) → s'(minus'(x, s'(y)))
gt'(0', v) → false'
gt'(s'(u), 0') → true'
gt'(s'(u), s'(v)) → gt'(u, v)

Types:
minus' :: 0':s' → 0':s' → 0':s'
cond' :: false':true' → 0':s' → 0':s' → 0':s'
gt' :: 0':s' → 0':s' → false':true'
false' :: false':true'
0' :: 0':s'
true' :: false':true'
s' :: 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_false':true'2 :: false':true'
_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:
gt', minus'

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

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

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

Induction Step:
gt'(_gen_0':s'3(+(_\$n6, 1)), _gen_0':s'3(+(_\$n6, 1))) →RΩ(1)
gt'(_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:
minus'(x, y) → cond'(gt'(x, y), x, y)
cond'(false', x, y) → 0'
cond'(true', x, y) → s'(minus'(x, s'(y)))
gt'(0', v) → false'
gt'(s'(u), 0') → true'
gt'(s'(u), s'(v)) → gt'(u, v)

Types:
minus' :: 0':s' → 0':s' → 0':s'
cond' :: false':true' → 0':s' → 0':s' → 0':s'
gt' :: 0':s' → 0':s' → false':true'
false' :: false':true'
0' :: 0':s'
true' :: false':true'
s' :: 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_false':true'2 :: false':true'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
gt'(_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:
minus'

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

Rules:
minus'(x, y) → cond'(gt'(x, y), x, y)
cond'(false', x, y) → 0'
cond'(true', x, y) → s'(minus'(x, s'(y)))
gt'(0', v) → false'
gt'(s'(u), 0') → true'
gt'(s'(u), s'(v)) → gt'(u, v)

Types:
minus' :: 0':s' → 0':s' → 0':s'
cond' :: false':true' → 0':s' → 0':s' → 0':s'
gt' :: 0':s' → 0':s' → false':true'
false' :: false':true'
0' :: 0':s'
true' :: false':true'
s' :: 0':s' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_false':true'2 :: false':true'
_gen_0':s'3 :: Nat → 0':s'

Lemmas:
gt'(_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))

No more defined symbols left to analyse.

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