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

max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
sort(nil) → nil
sort(cons(x, xs)) → cons(max(cons(x, xs)), sort(h(del(max(cons(x, xs)), cons(x, xs)))))
ge(0, 0) → true
ge(s(x), 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
h(nil) → nil
h(cons(x, xs)) → cons(x, h(xs))

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

max'(nil') → 0'
max'(cons'(x, nil')) → x
max'(cons'(x, cons'(y, xs))) → if1'(ge'(x, y), x, y, xs)
if1'(true', x, y, xs) → max'(cons'(x, xs))
if1'(false', x, y, xs) → max'(cons'(y, xs))
del'(x, nil') → nil'
del'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → xs
if2'(false', x, y, xs) → cons'(y, del'(x, xs))
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
sort'(nil') → nil'
sort'(cons'(x, xs)) → cons'(max'(cons'(x, xs)), sort'(h'(del'(max'(cons'(x, xs)), cons'(x, xs)))))
ge'(0', 0') → true'
ge'(s'(x), 0') → true'
ge'(0', s'(x)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
h'(nil') → nil'
h'(cons'(x, xs)) → cons'(x, h'(xs))

Rewrite Strategy: INNERMOST

Infered types.

Rules:
max'(nil') → 0'
max'(cons'(x, nil')) → x
max'(cons'(x, cons'(y, xs))) → if1'(ge'(x, y), x, y, xs)
if1'(true', x, y, xs) → max'(cons'(x, xs))
if1'(false', x, y, xs) → max'(cons'(y, xs))
del'(x, nil') → nil'
del'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → xs
if2'(false', x, y, xs) → cons'(y, del'(x, xs))
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
sort'(nil') → nil'
sort'(cons'(x, xs)) → cons'(max'(cons'(x, xs)), sort'(h'(del'(max'(cons'(x, xs)), cons'(x, xs)))))
ge'(0', 0') → true'
ge'(s'(x), 0') → true'
ge'(0', s'(x)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
h'(nil') → nil'
h'(cons'(x, xs)) → cons'(x, h'(xs))

Types:
max' :: nil':cons' → 0':s'
nil' :: nil':cons'
0' :: 0':s'
cons' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
ge' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
del' :: 0':s' → nil':cons' → nil':cons'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
eq' :: 0':s' → 0':s' → true':false'
s' :: 0':s' → 0':s'
sort' :: nil':cons' → nil':cons'
h' :: nil':cons' → nil':cons'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_hole_true':false'3 :: true':false'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Heuristically decided to analyse the following defined symbols:
max', ge', del', eq', sort', h'

They will be analysed ascendingly in the following order:
ge' < max'
max' < sort'
eq' < del'
del' < sort'
h' < sort'

Rules:
max'(nil') → 0'
max'(cons'(x, nil')) → x
max'(cons'(x, cons'(y, xs))) → if1'(ge'(x, y), x, y, xs)
if1'(true', x, y, xs) → max'(cons'(x, xs))
if1'(false', x, y, xs) → max'(cons'(y, xs))
del'(x, nil') → nil'
del'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → xs
if2'(false', x, y, xs) → cons'(y, del'(x, xs))
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
sort'(nil') → nil'
sort'(cons'(x, xs)) → cons'(max'(cons'(x, xs)), sort'(h'(del'(max'(cons'(x, xs)), cons'(x, xs)))))
ge'(0', 0') → true'
ge'(s'(x), 0') → true'
ge'(0', s'(x)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
h'(nil') → nil'
h'(cons'(x, xs)) → cons'(x, h'(xs))

Types:
max' :: nil':cons' → 0':s'
nil' :: nil':cons'
0' :: 0':s'
cons' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
ge' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
del' :: 0':s' → nil':cons' → nil':cons'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
eq' :: 0':s' → 0':s' → true':false'
s' :: 0':s' → 0':s'
sort' :: nil':cons' → nil':cons'
h' :: nil':cons' → nil':cons'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_hole_true':false'3 :: true':false'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Generator Equations:
_gen_0':s'4(0) ⇔ 0'
_gen_0':s'4(+(x, 1)) ⇔ s'(_gen_0':s'4(x))
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'5(x))

The following defined symbols remain to be analysed:
ge', max', del', eq', sort', h'

They will be analysed ascendingly in the following order:
ge' < max'
max' < sort'
eq' < del'
del' < sort'
h' < sort'

Proved the following rewrite lemma:
ge'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)

Induction Base:
ge'(_gen_0':s'4(0), _gen_0':s'4(0)) →RΩ(1)
true'

Induction Step:
ge'(_gen_0':s'4(+(_\$n8, 1)), _gen_0':s'4(+(_\$n8, 1))) →RΩ(1)
ge'(_gen_0':s'4(_\$n8), _gen_0':s'4(_\$n8)) →IH
true'

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

Rules:
max'(nil') → 0'
max'(cons'(x, nil')) → x
max'(cons'(x, cons'(y, xs))) → if1'(ge'(x, y), x, y, xs)
if1'(true', x, y, xs) → max'(cons'(x, xs))
if1'(false', x, y, xs) → max'(cons'(y, xs))
del'(x, nil') → nil'
del'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → xs
if2'(false', x, y, xs) → cons'(y, del'(x, xs))
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
sort'(nil') → nil'
sort'(cons'(x, xs)) → cons'(max'(cons'(x, xs)), sort'(h'(del'(max'(cons'(x, xs)), cons'(x, xs)))))
ge'(0', 0') → true'
ge'(s'(x), 0') → true'
ge'(0', s'(x)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
h'(nil') → nil'
h'(cons'(x, xs)) → cons'(x, h'(xs))

Types:
max' :: nil':cons' → 0':s'
nil' :: nil':cons'
0' :: 0':s'
cons' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
ge' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
del' :: 0':s' → nil':cons' → nil':cons'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
eq' :: 0':s' → 0':s' → true':false'
s' :: 0':s' → 0':s'
sort' :: nil':cons' → nil':cons'
h' :: nil':cons' → nil':cons'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_hole_true':false'3 :: true':false'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
ge'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)

Generator Equations:
_gen_0':s'4(0) ⇔ 0'
_gen_0':s'4(+(x, 1)) ⇔ s'(_gen_0':s'4(x))
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'5(x))

The following defined symbols remain to be analysed:
max', del', eq', sort', h'

They will be analysed ascendingly in the following order:
max' < sort'
eq' < del'
del' < sort'
h' < sort'

Proved the following rewrite lemma:
max'(_gen_nil':cons'5(+(1, _n1059))) → _gen_0':s'4(0), rt ∈ Ω(1 + n1059)

Induction Base:
max'(_gen_nil':cons'5(+(1, 0))) →RΩ(1)
0'

Induction Step:
max'(_gen_nil':cons'5(+(1, +(_\$n1060, 1)))) →RΩ(1)
if1'(ge'(0', 0'), 0', 0', _gen_nil':cons'5(_\$n1060)) →LΩ(1)
if1'(true', 0', 0', _gen_nil':cons'5(_\$n1060)) →RΩ(1)
max'(cons'(0', _gen_nil':cons'5(_\$n1060))) →IH
_gen_0':s'4(0)

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

Rules:
max'(nil') → 0'
max'(cons'(x, nil')) → x
max'(cons'(x, cons'(y, xs))) → if1'(ge'(x, y), x, y, xs)
if1'(true', x, y, xs) → max'(cons'(x, xs))
if1'(false', x, y, xs) → max'(cons'(y, xs))
del'(x, nil') → nil'
del'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → xs
if2'(false', x, y, xs) → cons'(y, del'(x, xs))
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
sort'(nil') → nil'
sort'(cons'(x, xs)) → cons'(max'(cons'(x, xs)), sort'(h'(del'(max'(cons'(x, xs)), cons'(x, xs)))))
ge'(0', 0') → true'
ge'(s'(x), 0') → true'
ge'(0', s'(x)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
h'(nil') → nil'
h'(cons'(x, xs)) → cons'(x, h'(xs))

Types:
max' :: nil':cons' → 0':s'
nil' :: nil':cons'
0' :: 0':s'
cons' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
ge' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
del' :: 0':s' → nil':cons' → nil':cons'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
eq' :: 0':s' → 0':s' → true':false'
s' :: 0':s' → 0':s'
sort' :: nil':cons' → nil':cons'
h' :: nil':cons' → nil':cons'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_hole_true':false'3 :: true':false'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
ge'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
max'(_gen_nil':cons'5(+(1, _n1059))) → _gen_0':s'4(0), rt ∈ Ω(1 + n1059)

Generator Equations:
_gen_0':s'4(0) ⇔ 0'
_gen_0':s'4(+(x, 1)) ⇔ s'(_gen_0':s'4(x))
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'5(x))

The following defined symbols remain to be analysed:
eq', del', sort', h'

They will be analysed ascendingly in the following order:
eq' < del'
del' < sort'
h' < sort'

Proved the following rewrite lemma:
eq'(_gen_0':s'4(_n3132), _gen_0':s'4(_n3132)) → true', rt ∈ Ω(1 + n3132)

Induction Base:
eq'(_gen_0':s'4(0), _gen_0':s'4(0)) →RΩ(1)
true'

Induction Step:
eq'(_gen_0':s'4(+(_\$n3133, 1)), _gen_0':s'4(+(_\$n3133, 1))) →RΩ(1)
eq'(_gen_0':s'4(_\$n3133), _gen_0':s'4(_\$n3133)) →IH
true'

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

Rules:
max'(nil') → 0'
max'(cons'(x, nil')) → x
max'(cons'(x, cons'(y, xs))) → if1'(ge'(x, y), x, y, xs)
if1'(true', x, y, xs) → max'(cons'(x, xs))
if1'(false', x, y, xs) → max'(cons'(y, xs))
del'(x, nil') → nil'
del'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → xs
if2'(false', x, y, xs) → cons'(y, del'(x, xs))
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
sort'(nil') → nil'
sort'(cons'(x, xs)) → cons'(max'(cons'(x, xs)), sort'(h'(del'(max'(cons'(x, xs)), cons'(x, xs)))))
ge'(0', 0') → true'
ge'(s'(x), 0') → true'
ge'(0', s'(x)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
h'(nil') → nil'
h'(cons'(x, xs)) → cons'(x, h'(xs))

Types:
max' :: nil':cons' → 0':s'
nil' :: nil':cons'
0' :: 0':s'
cons' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
ge' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
del' :: 0':s' → nil':cons' → nil':cons'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
eq' :: 0':s' → 0':s' → true':false'
s' :: 0':s' → 0':s'
sort' :: nil':cons' → nil':cons'
h' :: nil':cons' → nil':cons'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_hole_true':false'3 :: true':false'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
ge'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
max'(_gen_nil':cons'5(+(1, _n1059))) → _gen_0':s'4(0), rt ∈ Ω(1 + n1059)
eq'(_gen_0':s'4(_n3132), _gen_0':s'4(_n3132)) → true', rt ∈ Ω(1 + n3132)

Generator Equations:
_gen_0':s'4(0) ⇔ 0'
_gen_0':s'4(+(x, 1)) ⇔ s'(_gen_0':s'4(x))
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'5(x))

The following defined symbols remain to be analysed:
del', sort', h'

They will be analysed ascendingly in the following order:
del' < sort'
h' < sort'

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

Rules:
max'(nil') → 0'
max'(cons'(x, nil')) → x
max'(cons'(x, cons'(y, xs))) → if1'(ge'(x, y), x, y, xs)
if1'(true', x, y, xs) → max'(cons'(x, xs))
if1'(false', x, y, xs) → max'(cons'(y, xs))
del'(x, nil') → nil'
del'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → xs
if2'(false', x, y, xs) → cons'(y, del'(x, xs))
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
sort'(nil') → nil'
sort'(cons'(x, xs)) → cons'(max'(cons'(x, xs)), sort'(h'(del'(max'(cons'(x, xs)), cons'(x, xs)))))
ge'(0', 0') → true'
ge'(s'(x), 0') → true'
ge'(0', s'(x)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
h'(nil') → nil'
h'(cons'(x, xs)) → cons'(x, h'(xs))

Types:
max' :: nil':cons' → 0':s'
nil' :: nil':cons'
0' :: 0':s'
cons' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
ge' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
del' :: 0':s' → nil':cons' → nil':cons'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
eq' :: 0':s' → 0':s' → true':false'
s' :: 0':s' → 0':s'
sort' :: nil':cons' → nil':cons'
h' :: nil':cons' → nil':cons'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_hole_true':false'3 :: true':false'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
ge'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
max'(_gen_nil':cons'5(+(1, _n1059))) → _gen_0':s'4(0), rt ∈ Ω(1 + n1059)
eq'(_gen_0':s'4(_n3132), _gen_0':s'4(_n3132)) → true', rt ∈ Ω(1 + n3132)

Generator Equations:
_gen_0':s'4(0) ⇔ 0'
_gen_0':s'4(+(x, 1)) ⇔ s'(_gen_0':s'4(x))
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'5(x))

The following defined symbols remain to be analysed:
h', sort'

They will be analysed ascendingly in the following order:
h' < sort'

Proved the following rewrite lemma:
h'(_gen_nil':cons'5(_n4410)) → _gen_nil':cons'5(_n4410), rt ∈ Ω(1 + n4410)

Induction Base:
h'(_gen_nil':cons'5(0)) →RΩ(1)
nil'

Induction Step:
h'(_gen_nil':cons'5(+(_\$n4411, 1))) →RΩ(1)
cons'(0', h'(_gen_nil':cons'5(_\$n4411))) →IH
cons'(0', _gen_nil':cons'5(_\$n4411))

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

Rules:
max'(nil') → 0'
max'(cons'(x, nil')) → x
max'(cons'(x, cons'(y, xs))) → if1'(ge'(x, y), x, y, xs)
if1'(true', x, y, xs) → max'(cons'(x, xs))
if1'(false', x, y, xs) → max'(cons'(y, xs))
del'(x, nil') → nil'
del'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → xs
if2'(false', x, y, xs) → cons'(y, del'(x, xs))
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
sort'(nil') → nil'
sort'(cons'(x, xs)) → cons'(max'(cons'(x, xs)), sort'(h'(del'(max'(cons'(x, xs)), cons'(x, xs)))))
ge'(0', 0') → true'
ge'(s'(x), 0') → true'
ge'(0', s'(x)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
h'(nil') → nil'
h'(cons'(x, xs)) → cons'(x, h'(xs))

Types:
max' :: nil':cons' → 0':s'
nil' :: nil':cons'
0' :: 0':s'
cons' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
ge' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
del' :: 0':s' → nil':cons' → nil':cons'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
eq' :: 0':s' → 0':s' → true':false'
s' :: 0':s' → 0':s'
sort' :: nil':cons' → nil':cons'
h' :: nil':cons' → nil':cons'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_hole_true':false'3 :: true':false'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
ge'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
max'(_gen_nil':cons'5(+(1, _n1059))) → _gen_0':s'4(0), rt ∈ Ω(1 + n1059)
eq'(_gen_0':s'4(_n3132), _gen_0':s'4(_n3132)) → true', rt ∈ Ω(1 + n3132)
h'(_gen_nil':cons'5(_n4410)) → _gen_nil':cons'5(_n4410), rt ∈ Ω(1 + n4410)

Generator Equations:
_gen_0':s'4(0) ⇔ 0'
_gen_0':s'4(+(x, 1)) ⇔ s'(_gen_0':s'4(x))
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'5(x))

The following defined symbols remain to be analysed:
sort'

Proved the following rewrite lemma:
sort'(_gen_nil':cons'5(_n5250)) → _gen_nil':cons'5(_n5250), rt ∈ Ω(1 + n5250 + n52502)

Induction Base:
sort'(_gen_nil':cons'5(0)) →RΩ(1)
nil'

Induction Step:
sort'(_gen_nil':cons'5(+(_\$n5251, 1))) →RΩ(1)
cons'(max'(cons'(0', _gen_nil':cons'5(_\$n5251))), sort'(h'(del'(max'(cons'(0', _gen_nil':cons'5(_\$n5251))), cons'(0', _gen_nil':cons'5(_\$n5251)))))) →LΩ(1 + \$n5251)
cons'(_gen_0':s'4(0), sort'(h'(del'(max'(cons'(0', _gen_nil':cons'5(_\$n5251))), cons'(0', _gen_nil':cons'5(_\$n5251)))))) →LΩ(1 + \$n5251)
cons'(_gen_0':s'4(0), sort'(h'(del'(_gen_0':s'4(0), cons'(0', _gen_nil':cons'5(_\$n5251)))))) →RΩ(1)
cons'(_gen_0':s'4(0), sort'(h'(if2'(eq'(_gen_0':s'4(0), 0'), _gen_0':s'4(0), 0', _gen_nil':cons'5(_\$n5251))))) →LΩ(1)
cons'(_gen_0':s'4(0), sort'(h'(if2'(true', _gen_0':s'4(0), 0', _gen_nil':cons'5(_\$n5251))))) →RΩ(1)
cons'(_gen_0':s'4(0), sort'(h'(_gen_nil':cons'5(_\$n5251)))) →LΩ(1 + \$n5251)
cons'(_gen_0':s'4(0), sort'(_gen_nil':cons'5(_\$n5251))) →IH
cons'(_gen_0':s'4(0), _gen_nil':cons'5(_\$n5251))

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

Rules:
max'(nil') → 0'
max'(cons'(x, nil')) → x
max'(cons'(x, cons'(y, xs))) → if1'(ge'(x, y), x, y, xs)
if1'(true', x, y, xs) → max'(cons'(x, xs))
if1'(false', x, y, xs) → max'(cons'(y, xs))
del'(x, nil') → nil'
del'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → xs
if2'(false', x, y, xs) → cons'(y, del'(x, xs))
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
sort'(nil') → nil'
sort'(cons'(x, xs)) → cons'(max'(cons'(x, xs)), sort'(h'(del'(max'(cons'(x, xs)), cons'(x, xs)))))
ge'(0', 0') → true'
ge'(s'(x), 0') → true'
ge'(0', s'(x)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
h'(nil') → nil'
h'(cons'(x, xs)) → cons'(x, h'(xs))

Types:
max' :: nil':cons' → 0':s'
nil' :: nil':cons'
0' :: 0':s'
cons' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
ge' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
del' :: 0':s' → nil':cons' → nil':cons'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
eq' :: 0':s' → 0':s' → true':false'
s' :: 0':s' → 0':s'
sort' :: nil':cons' → nil':cons'
h' :: nil':cons' → nil':cons'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_hole_true':false'3 :: true':false'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
ge'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
max'(_gen_nil':cons'5(+(1, _n1059))) → _gen_0':s'4(0), rt ∈ Ω(1 + n1059)
eq'(_gen_0':s'4(_n3132), _gen_0':s'4(_n3132)) → true', rt ∈ Ω(1 + n3132)
h'(_gen_nil':cons'5(_n4410)) → _gen_nil':cons'5(_n4410), rt ∈ Ω(1 + n4410)
sort'(_gen_nil':cons'5(_n5250)) → _gen_nil':cons'5(_n5250), rt ∈ Ω(1 + n5250 + n52502)

Generator Equations:
_gen_0':s'4(0) ⇔ 0'
_gen_0':s'4(+(x, 1)) ⇔ s'(_gen_0':s'4(x))
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'5(x))

No more defined symbols left to analyse.

The lowerbound Ω(n2) was proven with the following lemma:
sort'(_gen_nil':cons'5(_n5250)) → _gen_nil':cons'5(_n5250), rt ∈ Ω(1 + n5250 + n52502)