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

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

Rewrite Strategy: INNERMOST


Infered types.


Rules:
minus'(x, y) → cond'(min'(x, y), x, y)
cond'(y, x, y) → s'(minus'(x, s'(y)))
min'(0', v) → 0'
min'(u, 0') → 0'
min'(s'(u), s'(v)) → s'(min'(u, v))

Types:
minus' :: s':0' → s':0' → s':0'
cond' :: s':0' → s':0' → s':0' → s':0'
min' :: s':0' → s':0' → s':0'
s' :: s':0' → s':0'
0' :: s':0'
_hole_s':0'1 :: s':0'
_gen_s':0'2 :: Nat → s':0'


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

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


Rules:
minus'(x, y) → cond'(min'(x, y), x, y)
cond'(y, x, y) → s'(minus'(x, s'(y)))
min'(0', v) → 0'
min'(u, 0') → 0'
min'(s'(u), s'(v)) → s'(min'(u, v))

Types:
minus' :: s':0' → s':0' → s':0'
cond' :: s':0' → s':0' → s':0' → s':0'
min' :: s':0' → s':0' → s':0'
s' :: s':0' → s':0'
0' :: s':0'
_hole_s':0'1 :: s':0'
_gen_s':0'2 :: Nat → s':0'

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

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

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


Proved the following rewrite lemma:
min'(_gen_s':0'2(_n4), _gen_s':0'2(_n4)) → _gen_s':0'2(_n4), rt ∈ Ω(1 + n4)

Induction Base:
min'(_gen_s':0'2(0), _gen_s':0'2(0)) →RΩ(1)
0'

Induction Step:
min'(_gen_s':0'2(+(_$n5, 1)), _gen_s':0'2(+(_$n5, 1))) →RΩ(1)
s'(min'(_gen_s':0'2(_$n5), _gen_s':0'2(_$n5))) →IH
s'(_gen_s':0'2(_$n5))

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


Rules:
minus'(x, y) → cond'(min'(x, y), x, y)
cond'(y, x, y) → s'(minus'(x, s'(y)))
min'(0', v) → 0'
min'(u, 0') → 0'
min'(s'(u), s'(v)) → s'(min'(u, v))

Types:
minus' :: s':0' → s':0' → s':0'
cond' :: s':0' → s':0' → s':0' → s':0'
min' :: s':0' → s':0' → s':0'
s' :: s':0' → s':0'
0' :: s':0'
_hole_s':0'1 :: s':0'
_gen_s':0'2 :: Nat → s':0'

Lemmas:
min'(_gen_s':0'2(_n4), _gen_s':0'2(_n4)) → _gen_s':0'2(_n4), rt ∈ Ω(1 + n4)

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

Types:
minus' :: s':0' → s':0' → s':0'
cond' :: s':0' → s':0' → s':0' → s':0'
min' :: s':0' → s':0' → s':0'
s' :: s':0' → s':0'
0' :: s':0'
_hole_s':0'1 :: s':0'
_gen_s':0'2 :: Nat → s':0'

Lemmas:
min'(_gen_s':0'2(_n4), _gen_s':0'2(_n4)) → _gen_s':0'2(_n4), rt ∈ Ω(1 + n4)

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

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
min'(_gen_s':0'2(_n4), _gen_s':0'2(_n4)) → _gen_s':0'2(_n4), rt ∈ Ω(1 + n4)