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)
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)
isempty(nil) → true
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

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)
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)
isempty'(nil') → true'
if_qs'(true', x, n, y) → nil'
if_qs'(false', x, n, y) → app'(quicksort'(x), add'(n, quicksort'(y)))

Rewrite Strategy: INNERMOST

Infered types.

Rules:
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)
isempty'(nil') → true'
if_qs'(true', x, n, y) → nil'
if_qs'(false', x, n, y) → app'(quicksort'(x), add'(n, quicksort'(y)))

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

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

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

Rules:
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)
isempty'(nil') → true'
if_qs'(true', x, n, y) → nil'
if_qs'(false', x, n, y) → app'(quicksort'(x), add'(n, quicksort'(y)))

Types:
le' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_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:
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(_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)
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)
isempty'(nil') → true'
if_qs'(true', x, n, y) → nil'
if_qs'(false', x, n, y) → app'(quicksort'(x), add'(n, quicksort'(y)))

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

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))

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:
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)
isempty'(nil') → true'
if_qs'(true', x, n, y) → nil'
if_qs'(false', x, n, y) → app'(quicksort'(x), add'(n, quicksort'(y)))

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

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))

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:
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)
isempty'(nil') → true'
if_qs'(true', x, n, y) → nil'
if_qs'(false', x, n, y) → app'(quicksort'(x), add'(n, quicksort'(y)))

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

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))

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:
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)
isempty'(nil') → true'
if_qs'(true', x, n, y) → nil'
if_qs'(false', x, n, y) → app'(quicksort'(x), add'(n, quicksort'(y)))

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

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))

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:
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)
isempty'(nil') → true'
if_qs'(true', x, n, y) → nil'
if_qs'(false', x, n, y) → app'(quicksort'(x), add'(n, quicksort'(y)))

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

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