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

f(true, x, y, z) → g(gt(x, y), x, y, z)
g(true, x, y, z) → f(gt(x, z), x, s(y), z)
g(true, x, y, z) → f(gt(x, z), x, y, s(z))
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:


f'(true', x, y, z) → g'(gt'(x, y), x, y, z)
g'(true', x, y, z) → f'(gt'(x, z), x, s'(y), z)
g'(true', x, y, z) → f'(gt'(x, z), x, y, s'(z))
gt'(0', v) → false'
gt'(s'(u), 0') → true'
gt'(s'(u), s'(v)) → gt'(u, v)

Rewrite Strategy: INNERMOST


Infered types.


Rules:
f'(true', x, y, z) → g'(gt'(x, y), x, y, z)
g'(true', x, y, z) → f'(gt'(x, z), x, s'(y), z)
g'(true', x, y, z) → f'(gt'(x, z), x, y, s'(z))
gt'(0', v) → false'
gt'(s'(u), 0') → true'
gt'(s'(u), s'(v)) → gt'(u, v)

Types:
f' :: true':false' → s':0' → s':0' → s':0' → f':g'
true' :: true':false'
g' :: true':false' → s':0' → s':0' → s':0' → f':g'
gt' :: s':0' → s':0' → true':false'
s' :: s':0' → s':0'
0' :: s':0'
false' :: true':false'
_hole_f':g'1 :: f':g'
_hole_true':false'2 :: true':false'
_hole_s':0'3 :: s':0'
_gen_s':0'4 :: Nat → s':0'


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

They will be analysed ascendingly in the following order:
f' = g'
gt' < f'
gt' < g'


Rules:
f'(true', x, y, z) → g'(gt'(x, y), x, y, z)
g'(true', x, y, z) → f'(gt'(x, z), x, s'(y), z)
g'(true', x, y, z) → f'(gt'(x, z), x, y, s'(z))
gt'(0', v) → false'
gt'(s'(u), 0') → true'
gt'(s'(u), s'(v)) → gt'(u, v)

Types:
f' :: true':false' → s':0' → s':0' → s':0' → f':g'
true' :: true':false'
g' :: true':false' → s':0' → s':0' → s':0' → f':g'
gt' :: s':0' → s':0' → true':false'
s' :: s':0' → s':0'
0' :: s':0'
false' :: true':false'
_hole_f':g'1 :: f':g'
_hole_true':false'2 :: true':false'
_hole_s':0'3 :: s':0'
_gen_s':0'4 :: Nat → s':0'

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

The following defined symbols remain to be analysed:
gt', f', g'

They will be analysed ascendingly in the following order:
f' = g'
gt' < f'
gt' < g'


Proved the following rewrite lemma:
gt'(_gen_s':0'4(_n6), _gen_s':0'4(_n6)) → false', rt ∈ Ω(1 + n6)

Induction Base:
gt'(_gen_s':0'4(0), _gen_s':0'4(0)) →RΩ(1)
false'

Induction Step:
gt'(_gen_s':0'4(+(_$n7, 1)), _gen_s':0'4(+(_$n7, 1))) →RΩ(1)
gt'(_gen_s':0'4(_$n7), _gen_s':0'4(_$n7)) →IH
false'

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


Rules:
f'(true', x, y, z) → g'(gt'(x, y), x, y, z)
g'(true', x, y, z) → f'(gt'(x, z), x, s'(y), z)
g'(true', x, y, z) → f'(gt'(x, z), x, y, s'(z))
gt'(0', v) → false'
gt'(s'(u), 0') → true'
gt'(s'(u), s'(v)) → gt'(u, v)

Types:
f' :: true':false' → s':0' → s':0' → s':0' → f':g'
true' :: true':false'
g' :: true':false' → s':0' → s':0' → s':0' → f':g'
gt' :: s':0' → s':0' → true':false'
s' :: s':0' → s':0'
0' :: s':0'
false' :: true':false'
_hole_f':g'1 :: f':g'
_hole_true':false'2 :: true':false'
_hole_s':0'3 :: s':0'
_gen_s':0'4 :: Nat → s':0'

Lemmas:
gt'(_gen_s':0'4(_n6), _gen_s':0'4(_n6)) → false', rt ∈ Ω(1 + n6)

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

The following defined symbols remain to be analysed:
g', f'

They will be analysed ascendingly in the following order:
f' = g'


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


Rules:
f'(true', x, y, z) → g'(gt'(x, y), x, y, z)
g'(true', x, y, z) → f'(gt'(x, z), x, s'(y), z)
g'(true', x, y, z) → f'(gt'(x, z), x, y, s'(z))
gt'(0', v) → false'
gt'(s'(u), 0') → true'
gt'(s'(u), s'(v)) → gt'(u, v)

Types:
f' :: true':false' → s':0' → s':0' → s':0' → f':g'
true' :: true':false'
g' :: true':false' → s':0' → s':0' → s':0' → f':g'
gt' :: s':0' → s':0' → true':false'
s' :: s':0' → s':0'
0' :: s':0'
false' :: true':false'
_hole_f':g'1 :: f':g'
_hole_true':false'2 :: true':false'
_hole_s':0'3 :: s':0'
_gen_s':0'4 :: Nat → s':0'

Lemmas:
gt'(_gen_s':0'4(_n6), _gen_s':0'4(_n6)) → false', rt ∈ Ω(1 + n6)

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

The following defined symbols remain to be analysed:
f'

They will be analysed ascendingly in the following order:
f' = g'


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


Rules:
f'(true', x, y, z) → g'(gt'(x, y), x, y, z)
g'(true', x, y, z) → f'(gt'(x, z), x, s'(y), z)
g'(true', x, y, z) → f'(gt'(x, z), x, y, s'(z))
gt'(0', v) → false'
gt'(s'(u), 0') → true'
gt'(s'(u), s'(v)) → gt'(u, v)

Types:
f' :: true':false' → s':0' → s':0' → s':0' → f':g'
true' :: true':false'
g' :: true':false' → s':0' → s':0' → s':0' → f':g'
gt' :: s':0' → s':0' → true':false'
s' :: s':0' → s':0'
0' :: s':0'
false' :: true':false'
_hole_f':g'1 :: f':g'
_hole_true':false'2 :: true':false'
_hole_s':0'3 :: s':0'
_gen_s':0'4 :: Nat → s':0'

Lemmas:
gt'(_gen_s':0'4(_n6), _gen_s':0'4(_n6)) → false', rt ∈ Ω(1 + n6)

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

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
gt'(_gen_s':0'4(_n6), _gen_s':0'4(_n6)) → false', rt ∈ Ω(1 + n6)