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

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
minsort(nil) → nil
minsort(cons(x, xs)) → cons(min(cons(x, xs)), minsort(rm(min(cons(x, xs)), cons(x, xs))))
min(nil) → 0
min(cons(x, nil)) → x
min(cons(x, cons(y, xs))) → if1(le(x, y), x, y, xs)
if1(true, x, y, xs) → min(cons(x, xs))
if1(false, x, y, xs) → min(cons(y, xs))
rm(x, nil) → nil
rm(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
if2(true, x, y, xs) → rm(x, xs)
if2(false, x, y, xs) → cons(y, rm(x, xs))

Rewrite Strategy: INNERMOST

Renamed function symbols to avoid clashes with predefined symbol.

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

le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
minsort'(nil') → nil'
minsort'(cons'(x, xs)) → cons'(min'(cons'(x, xs)), minsort'(rm'(min'(cons'(x, xs)), cons'(x, xs))))
min'(nil') → 0'
min'(cons'(x, nil')) → x
min'(cons'(x, cons'(y, xs))) → if1'(le'(x, y), x, y, xs)
if1'(true', x, y, xs) → min'(cons'(x, xs))
if1'(false', x, y, xs) → min'(cons'(y, xs))
rm'(x, nil') → nil'
rm'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → rm'(x, xs)
if2'(false', x, y, xs) → cons'(y, rm'(x, xs))

Rewrite Strategy: INNERMOST

Infered types.

Rules:
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
minsort'(nil') → nil'
minsort'(cons'(x, xs)) → cons'(min'(cons'(x, xs)), minsort'(rm'(min'(cons'(x, xs)), cons'(x, xs))))
min'(nil') → 0'
min'(cons'(x, nil')) → x
min'(cons'(x, cons'(y, xs))) → if1'(le'(x, y), x, y, xs)
if1'(true', x, y, xs) → min'(cons'(x, xs))
if1'(false', x, y, xs) → min'(cons'(y, xs))
rm'(x, nil') → nil'
rm'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → rm'(x, xs)
if2'(false', x, y, xs) → cons'(y, rm'(x, xs))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
eq' :: 0':s' → 0':s' → true':false'
minsort' :: nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
min' :: nil':cons' → 0':s'
rm' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':cons'3 :: nil':cons'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Heuristically decided to analyse the following defined symbols:
le', eq', minsort', min', rm'

They will be analysed ascendingly in the following order:
le' < min'
eq' < rm'
min' < minsort'
rm' < minsort'

Rules:
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
minsort'(nil') → nil'
minsort'(cons'(x, xs)) → cons'(min'(cons'(x, xs)), minsort'(rm'(min'(cons'(x, xs)), cons'(x, xs))))
min'(nil') → 0'
min'(cons'(x, nil')) → x
min'(cons'(x, cons'(y, xs))) → if1'(le'(x, y), x, y, xs)
if1'(true', x, y, xs) → min'(cons'(x, xs))
if1'(false', x, y, xs) → min'(cons'(y, xs))
rm'(x, nil') → nil'
rm'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → rm'(x, xs)
if2'(false', x, y, xs) → cons'(y, rm'(x, xs))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
eq' :: 0':s' → 0':s' → true':false'
minsort' :: nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
min' :: nil':cons' → 0':s'
rm' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':cons'3 :: nil':cons'
_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:
le', eq', minsort', min', rm'

They will be analysed ascendingly in the following order:
le' < min'
eq' < rm'
min' < minsort'
rm' < minsort'

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

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

Induction Step:
le'(_gen_0':s'4(+(_\$n8, 1)), _gen_0':s'4(+(_\$n8, 1))) →RΩ(1)
le'(_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:
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
minsort'(nil') → nil'
minsort'(cons'(x, xs)) → cons'(min'(cons'(x, xs)), minsort'(rm'(min'(cons'(x, xs)), cons'(x, xs))))
min'(nil') → 0'
min'(cons'(x, nil')) → x
min'(cons'(x, cons'(y, xs))) → if1'(le'(x, y), x, y, xs)
if1'(true', x, y, xs) → min'(cons'(x, xs))
if1'(false', x, y, xs) → min'(cons'(y, xs))
rm'(x, nil') → nil'
rm'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → rm'(x, xs)
if2'(false', x, y, xs) → cons'(y, rm'(x, xs))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
eq' :: 0':s' → 0':s' → true':false'
minsort' :: nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
min' :: nil':cons' → 0':s'
rm' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':cons'3 :: nil':cons'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
le'(_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:
eq', minsort', min', rm'

They will be analysed ascendingly in the following order:
eq' < rm'
min' < minsort'
rm' < minsort'

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

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

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

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

Rules:
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
minsort'(nil') → nil'
minsort'(cons'(x, xs)) → cons'(min'(cons'(x, xs)), minsort'(rm'(min'(cons'(x, xs)), cons'(x, xs))))
min'(nil') → 0'
min'(cons'(x, nil')) → x
min'(cons'(x, cons'(y, xs))) → if1'(le'(x, y), x, y, xs)
if1'(true', x, y, xs) → min'(cons'(x, xs))
if1'(false', x, y, xs) → min'(cons'(y, xs))
rm'(x, nil') → nil'
rm'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → rm'(x, xs)
if2'(false', x, y, xs) → cons'(y, rm'(x, xs))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
eq' :: 0':s' → 0':s' → true':false'
minsort' :: nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
min' :: nil':cons' → 0':s'
rm' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':cons'3 :: nil':cons'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
le'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
eq'(_gen_0':s'4(_n890), _gen_0':s'4(_n890)) → true', rt ∈ Ω(1 + n890)

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:
min', minsort', rm'

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

Proved the following rewrite lemma:
min'(_gen_nil':cons'5(+(1, _n1909))) → _gen_0':s'4(0), rt ∈ Ω(1 + n1909)

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

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

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

Rules:
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
minsort'(nil') → nil'
minsort'(cons'(x, xs)) → cons'(min'(cons'(x, xs)), minsort'(rm'(min'(cons'(x, xs)), cons'(x, xs))))
min'(nil') → 0'
min'(cons'(x, nil')) → x
min'(cons'(x, cons'(y, xs))) → if1'(le'(x, y), x, y, xs)
if1'(true', x, y, xs) → min'(cons'(x, xs))
if1'(false', x, y, xs) → min'(cons'(y, xs))
rm'(x, nil') → nil'
rm'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → rm'(x, xs)
if2'(false', x, y, xs) → cons'(y, rm'(x, xs))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
eq' :: 0':s' → 0':s' → true':false'
minsort' :: nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
min' :: nil':cons' → 0':s'
rm' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':cons'3 :: nil':cons'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
le'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
eq'(_gen_0':s'4(_n890), _gen_0':s'4(_n890)) → true', rt ∈ Ω(1 + n890)
min'(_gen_nil':cons'5(+(1, _n1909))) → _gen_0':s'4(0), rt ∈ Ω(1 + n1909)

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:
rm', minsort'

They will be analysed ascendingly in the following order:
rm' < minsort'

Proved the following rewrite lemma:
rm'(_gen_0':s'4(0), _gen_nil':cons'5(_n3902)) → _gen_nil':cons'5(0), rt ∈ Ω(1 + n3902)

Induction Base:
rm'(_gen_0':s'4(0), _gen_nil':cons'5(0)) →RΩ(1)
nil'

Induction Step:
rm'(_gen_0':s'4(0), _gen_nil':cons'5(+(_\$n3903, 1))) →RΩ(1)
if2'(eq'(_gen_0':s'4(0), 0'), _gen_0':s'4(0), 0', _gen_nil':cons'5(_\$n3903)) →LΩ(1)
if2'(true', _gen_0':s'4(0), 0', _gen_nil':cons'5(_\$n3903)) →RΩ(1)
rm'(_gen_0':s'4(0), _gen_nil':cons'5(_\$n3903)) →IH
_gen_nil':cons'5(0)

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

Rules:
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
minsort'(nil') → nil'
minsort'(cons'(x, xs)) → cons'(min'(cons'(x, xs)), minsort'(rm'(min'(cons'(x, xs)), cons'(x, xs))))
min'(nil') → 0'
min'(cons'(x, nil')) → x
min'(cons'(x, cons'(y, xs))) → if1'(le'(x, y), x, y, xs)
if1'(true', x, y, xs) → min'(cons'(x, xs))
if1'(false', x, y, xs) → min'(cons'(y, xs))
rm'(x, nil') → nil'
rm'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → rm'(x, xs)
if2'(false', x, y, xs) → cons'(y, rm'(x, xs))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
eq' :: 0':s' → 0':s' → true':false'
minsort' :: nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
min' :: nil':cons' → 0':s'
rm' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':cons'3 :: nil':cons'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
le'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
eq'(_gen_0':s'4(_n890), _gen_0':s'4(_n890)) → true', rt ∈ Ω(1 + n890)
min'(_gen_nil':cons'5(+(1, _n1909))) → _gen_0':s'4(0), rt ∈ Ω(1 + n1909)
rm'(_gen_0':s'4(0), _gen_nil':cons'5(_n3902)) → _gen_nil':cons'5(0), rt ∈ Ω(1 + n3902)

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:
minsort'

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

Rules:
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
eq'(0', 0') → true'
eq'(0', s'(y)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
minsort'(nil') → nil'
minsort'(cons'(x, xs)) → cons'(min'(cons'(x, xs)), minsort'(rm'(min'(cons'(x, xs)), cons'(x, xs))))
min'(nil') → 0'
min'(cons'(x, nil')) → x
min'(cons'(x, cons'(y, xs))) → if1'(le'(x, y), x, y, xs)
if1'(true', x, y, xs) → min'(cons'(x, xs))
if1'(false', x, y, xs) → min'(cons'(y, xs))
rm'(x, nil') → nil'
rm'(x, cons'(y, xs)) → if2'(eq'(x, y), x, y, xs)
if2'(true', x, y, xs) → rm'(x, xs)
if2'(false', x, y, xs) → cons'(y, rm'(x, xs))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
eq' :: 0':s' → 0':s' → true':false'
minsort' :: nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
min' :: nil':cons' → 0':s'
rm' :: 0':s' → nil':cons' → nil':cons'
if1' :: true':false' → 0':s' → 0':s' → nil':cons' → 0':s'
if2' :: true':false' → 0':s' → 0':s' → nil':cons' → nil':cons'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':cons'3 :: nil':cons'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
le'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
eq'(_gen_0':s'4(_n890), _gen_0':s'4(_n890)) → true', rt ∈ Ω(1 + n890)
min'(_gen_nil':cons'5(+(1, _n1909))) → _gen_0':s'4(0), rt ∈ Ω(1 + n1909)
rm'(_gen_0':s'4(0), _gen_nil':cons'5(_n3902)) → _gen_nil':cons'5(0), rt ∈ Ω(1 + n3902)

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 Ω(n) was proven with the following lemma:
le'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)