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

minus(x, 0) → x
minus(s(x), s(y)) → minus(x, y)
quot(0, s(y)) → 0
quot(s(x), s(y)) → s(quot(minus(x, y), s(y)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
low(n, nil) → nil
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
if_high(true, n, add(m, x)) → high(n, x)
quicksort(nil) → nil

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, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
low'(n, nil') → nil'
if_low'(false', n, add'(m, x)) → low'(n, x)
high'(n, nil') → nil'
if_high'(true', n, add'(m, x)) → high'(n, x)
quicksort'(nil') → nil'

Rewrite Strategy: INNERMOST

Infered types.

Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
low'(n, nil') → nil'
if_low'(false', n, add'(m, x)) → low'(n, x)
high'(n, nil') → nil'
if_high'(true', n, add'(m, x)) → high'(n, x)
quicksort'(nil') → nil'

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'4 :: Nat → 0':s'

Heuristically decided to analyse the following defined symbols:
minus', quot', le', app', low', high', quicksort'

They will be analysed ascendingly in the following order:
minus' < quot'
le' < low'
le' < high'
app' < quicksort'
low' < quicksort'
high' < quicksort'

Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
low'(n, nil') → nil'
if_low'(false', n, add'(m, x)) → low'(n, x)
high'(n, nil') → nil'
if_high'(true', n, add'(m, x)) → high'(n, x)
quicksort'(nil') → nil'

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'4 :: Nat → 0':s'

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

The following defined symbols remain to be analysed:
minus', quot', le', app', low', high', quicksort'

They will be analysed ascendingly in the following order:
minus' < quot'
le' < low'
le' < high'
app' < quicksort'
low' < quicksort'
high' < quicksort'

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

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

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

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

Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
low'(n, nil') → nil'
if_low'(false', n, add'(m, x)) → low'(n, x)
high'(n, nil') → nil'
if_high'(true', n, add'(m, x)) → high'(n, x)
quicksort'(nil') → nil'

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'4 :: Nat → 0':s'

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

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

The following defined symbols remain to be analysed:
quot', le', app', low', high', quicksort'

They will be analysed ascendingly in the following order:
le' < low'
le' < high'
app' < quicksort'
low' < quicksort'
high' < quicksort'

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

Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
low'(n, nil') → nil'
if_low'(false', n, add'(m, x)) → low'(n, x)
high'(n, nil') → nil'
if_high'(true', n, add'(m, x)) → high'(n, x)
quicksort'(nil') → nil'

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'4 :: Nat → 0':s'

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

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

The following defined symbols remain to be analysed:
le', app', low', high', quicksort'

They will be analysed ascendingly in the following order:
le' < low'
le' < high'
app' < quicksort'
low' < quicksort'
high' < quicksort'

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

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

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

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

Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
low'(n, nil') → nil'
if_low'(false', n, add'(m, x)) → low'(n, x)
high'(n, nil') → nil'
if_high'(true', n, add'(m, x)) → high'(n, x)
quicksort'(nil') → nil'

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'4 :: Nat → 0':s'

Lemmas:
minus'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → _gen_0':s'4(0), rt ∈ Ω(1 + n7)
le'(_gen_0':s'4(_n1396), _gen_0':s'4(_n1396)) → true', rt ∈ Ω(1 + n1396)

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

The following defined symbols remain to be analysed:
app', low', high', quicksort'

They will be analysed ascendingly in the following order:
app' < quicksort'
low' < quicksort'
high' < quicksort'

Proved the following rewrite lemma:

Induction Base:

Induction Step:

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

Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
low'(n, nil') → nil'
if_low'(false', n, add'(m, x)) → low'(n, x)
high'(n, nil') → nil'
if_high'(true', n, add'(m, x)) → high'(n, x)
quicksort'(nil') → nil'

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'4 :: Nat → 0':s'

Lemmas:
minus'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → _gen_0':s'4(0), rt ∈ Ω(1 + n7)
le'(_gen_0':s'4(_n1396), _gen_0':s'4(_n1396)) → true', rt ∈ Ω(1 + n1396)

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

The following defined symbols remain to be analysed:
low', high', quicksort'

They will be analysed ascendingly in the following order:
low' < quicksort'
high' < quicksort'

Proved the following rewrite lemma:

Induction Base:
nil'

Induction Step:

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

Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
low'(n, nil') → nil'
if_low'(false', n, add'(m, x)) → low'(n, x)
high'(n, nil') → nil'
if_high'(true', n, add'(m, x)) → high'(n, x)
quicksort'(nil') → nil'

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'4 :: Nat → 0':s'

Lemmas:
minus'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → _gen_0':s'4(0), rt ∈ Ω(1 + n7)
le'(_gen_0':s'4(_n1396), _gen_0':s'4(_n1396)) → true', rt ∈ Ω(1 + n1396)

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

The following defined symbols remain to be analysed:
high', quicksort'

They will be analysed ascendingly in the following order:
high' < quicksort'

Proved the following rewrite lemma:

Induction Base:
nil'

Induction Step:

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

Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
low'(n, nil') → nil'
if_low'(false', n, add'(m, x)) → low'(n, x)
high'(n, nil') → nil'
if_high'(true', n, add'(m, x)) → high'(n, x)
quicksort'(nil') → nil'

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'4 :: Nat → 0':s'

Lemmas:
minus'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → _gen_0':s'4(0), rt ∈ Ω(1 + n7)
le'(_gen_0':s'4(_n1396), _gen_0':s'4(_n1396)) → true', rt ∈ Ω(1 + n1396)

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

The following defined symbols remain to be analysed:
quicksort'

Proved the following rewrite lemma:

Induction Base:
nil'

Induction Step:

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

Rules:
minus'(x, 0') → x
minus'(s'(x), s'(y)) → minus'(x, y)
quot'(0', s'(y)) → 0'
quot'(s'(x), s'(y)) → s'(quot'(minus'(x, y), s'(y)))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
low'(n, nil') → nil'
if_low'(false', n, add'(m, x)) → low'(n, x)
high'(n, nil') → nil'
if_high'(true', n, add'(m, x)) → high'(n, x)
quicksort'(nil') → nil'

Types:
minus' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
quot' :: 0':s' → 0':s' → 0':s'
le' :: 0':s' → 0':s' → true':false'
true' :: true':false'
false' :: true':false'
_hole_0':s'1 :: 0':s'
_hole_true':false'2 :: true':false'
_gen_0':s'4 :: Nat → 0':s'

Lemmas:
minus'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → _gen_0':s'4(0), rt ∈ Ω(1 + n7)
le'(_gen_0':s'4(_n1396), _gen_0':s'4(_n1396)) → true', rt ∈ Ω(1 + n1396)