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

minus(x, y) → cond(ge(x, s(y)), x, y)
cond(false, x, y) → 0
cond(true, x, y) → s(minus(x, s(y)))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(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'(ge'(x, s'(y)), x, y)
cond'(false', x, y) → 0'
cond'(true', x, y) → s'(minus'(x, s'(y)))
ge'(u, 0') → true'
ge'(0', s'(v)) → false'
ge'(s'(u), s'(v)) → ge'(u, v)

Rewrite Strategy: INNERMOST


Infered types.


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

Types:
minus' :: s':0' → s':0' → s':0'
cond' :: false':true' → s':0' → s':0' → s':0'
ge' :: s':0' → s':0' → false':true'
s' :: s':0' → s':0'
false' :: false':true'
0' :: s':0'
true' :: false':true'
_hole_s':0'1 :: s':0'
_hole_false':true'2 :: false':true'
_gen_s':0'3 :: Nat → s':0'


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

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


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

Types:
minus' :: s':0' → s':0' → s':0'
cond' :: false':true' → s':0' → s':0' → s':0'
ge' :: s':0' → s':0' → false':true'
s' :: s':0' → s':0'
false' :: false':true'
0' :: s':0'
true' :: false':true'
_hole_s':0'1 :: s':0'
_hole_false':true'2 :: false':true'
_gen_s':0'3 :: Nat → s':0'

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

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

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


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

Induction Base:
ge'(_gen_s':0'3(0), _gen_s':0'3(0)) →RΩ(1)
true'

Induction Step:
ge'(_gen_s':0'3(+(_$n6, 1)), _gen_s':0'3(+(_$n6, 1))) →RΩ(1)
ge'(_gen_s':0'3(_$n6), _gen_s':0'3(_$n6)) →IH
true'

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


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

Types:
minus' :: s':0' → s':0' → s':0'
cond' :: false':true' → s':0' → s':0' → s':0'
ge' :: s':0' → s':0' → false':true'
s' :: s':0' → s':0'
false' :: false':true'
0' :: s':0'
true' :: false':true'
_hole_s':0'1 :: s':0'
_hole_false':true'2 :: false':true'
_gen_s':0'3 :: Nat → s':0'

Lemmas:
ge'(_gen_s':0'3(_n5), _gen_s':0'3(_n5)) → true', rt ∈ Ω(1 + n5)

Generator Equations:
_gen_s':0'3(0) ⇔ 0'
_gen_s':0'3(+(x, 1)) ⇔ s'(_gen_s':0'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'(ge'(x, s'(y)), x, y)
cond'(false', x, y) → 0'
cond'(true', x, y) → s'(minus'(x, s'(y)))
ge'(u, 0') → true'
ge'(0', s'(v)) → false'
ge'(s'(u), s'(v)) → ge'(u, v)

Types:
minus' :: s':0' → s':0' → s':0'
cond' :: false':true' → s':0' → s':0' → s':0'
ge' :: s':0' → s':0' → false':true'
s' :: s':0' → s':0'
false' :: false':true'
0' :: s':0'
true' :: false':true'
_hole_s':0'1 :: s':0'
_hole_false':true'2 :: false':true'
_gen_s':0'3 :: Nat → s':0'

Lemmas:
ge'(_gen_s':0'3(_n5), _gen_s':0'3(_n5)) → true', rt ∈ Ω(1 + n5)

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

No more defined symbols left to analyse.


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