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

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
app'(add'(n, x), y) → add'(n, app'(x, y))
min'(add'(n, nil')) → n
min'(add'(n, add'(m, x))) → if_min'(le'(n, m), add'(n, add'(m, x)))
if_min'(true', add'(n, add'(m, x))) → min'(add'(n, x))
if_min'(false', add'(n, add'(m, x))) → min'(add'(m, x))
head'(add'(n, x)) → n
tail'(add'(n, x)) → x
tail'(nil') → nil'
null'(nil') → true'
null'(add'(n, x)) → false'
rm'(n, nil') → nil'
rm'(n, add'(m, x)) → if_rm'(eq'(n, m), n, add'(m, x))
if_rm'(true', n, add'(m, x)) → rm'(n, x)
if_rm'(false', n, add'(m, x)) → add'(m, rm'(n, x))
minsort'(x) → mins'(x, nil', nil')
mins'(x, y, z) → if'(null'(x), x, y, z)
if'(true', x, y, z) → z
if'(false', x, y, z) → if2'(eq'(head'(x), min'(x)), x, y, z)
if2'(true', x, y, z) → mins'(app'(rm'(head'(x), tail'(x)), y), nil', app'(z, add'(head'(x), nil')))
if2'(false', x, y, z) → mins'(tail'(x), add'(head'(x), y), z)

Rewrite Strategy: INNERMOST


Infered types.


Rules:
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
app'(add'(n, x), y) → add'(n, app'(x, y))
min'(add'(n, nil')) → n
min'(add'(n, add'(m, x))) → if_min'(le'(n, m), add'(n, add'(m, x)))
if_min'(true', add'(n, add'(m, x))) → min'(add'(n, x))
if_min'(false', add'(n, add'(m, x))) → min'(add'(m, x))
head'(add'(n, x)) → n
tail'(add'(n, x)) → x
tail'(nil') → nil'
null'(nil') → true'
null'(add'(n, x)) → false'
rm'(n, nil') → nil'
rm'(n, add'(m, x)) → if_rm'(eq'(n, m), n, add'(m, x))
if_rm'(true', n, add'(m, x)) → rm'(n, x)
if_rm'(false', n, add'(m, x)) → add'(m, rm'(n, x))
minsort'(x) → mins'(x, nil', nil')
mins'(x, y, z) → if'(null'(x), x, y, z)
if'(true', x, y, z) → z
if'(false', x, y, z) → if2'(eq'(head'(x), min'(x)), x, y, z)
if2'(true', x, y, z) → mins'(app'(rm'(head'(x), tail'(x)), y), nil', app'(z, add'(head'(x), nil')))
if2'(false', x, y, z) → mins'(tail'(x), add'(head'(x), y), z)

Types:
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
le' :: 0':s' → 0':s' → true':false'
app' :: nil':add' → nil':add' → nil':add'
nil' :: nil':add'
add' :: 0':s' → nil':add' → nil':add'
min' :: nil':add' → 0':s'
if_min' :: true':false' → nil':add' → 0':s'
head' :: nil':add' → 0':s'
tail' :: nil':add' → nil':add'
null' :: nil':add' → true':false'
rm' :: 0':s' → nil':add' → nil':add'
if_rm' :: true':false' → 0':s' → nil':add' → nil':add'
minsort' :: nil':add' → nil':add'
mins' :: nil':add' → nil':add' → nil':add' → nil':add'
if' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
if2' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':add'3 :: nil':add'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':add'5 :: Nat → nil':add'


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

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


Rules:
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
app'(add'(n, x), y) → add'(n, app'(x, y))
min'(add'(n, nil')) → n
min'(add'(n, add'(m, x))) → if_min'(le'(n, m), add'(n, add'(m, x)))
if_min'(true', add'(n, add'(m, x))) → min'(add'(n, x))
if_min'(false', add'(n, add'(m, x))) → min'(add'(m, x))
head'(add'(n, x)) → n
tail'(add'(n, x)) → x
tail'(nil') → nil'
null'(nil') → true'
null'(add'(n, x)) → false'
rm'(n, nil') → nil'
rm'(n, add'(m, x)) → if_rm'(eq'(n, m), n, add'(m, x))
if_rm'(true', n, add'(m, x)) → rm'(n, x)
if_rm'(false', n, add'(m, x)) → add'(m, rm'(n, x))
minsort'(x) → mins'(x, nil', nil')
mins'(x, y, z) → if'(null'(x), x, y, z)
if'(true', x, y, z) → z
if'(false', x, y, z) → if2'(eq'(head'(x), min'(x)), x, y, z)
if2'(true', x, y, z) → mins'(app'(rm'(head'(x), tail'(x)), y), nil', app'(z, add'(head'(x), nil')))
if2'(false', x, y, z) → mins'(tail'(x), add'(head'(x), y), z)

Types:
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
le' :: 0':s' → 0':s' → true':false'
app' :: nil':add' → nil':add' → nil':add'
nil' :: nil':add'
add' :: 0':s' → nil':add' → nil':add'
min' :: nil':add' → 0':s'
if_min' :: true':false' → nil':add' → 0':s'
head' :: nil':add' → 0':s'
tail' :: nil':add' → nil':add'
null' :: nil':add' → true':false'
rm' :: 0':s' → nil':add' → nil':add'
if_rm' :: true':false' → 0':s' → nil':add' → nil':add'
minsort' :: nil':add' → nil':add'
mins' :: nil':add' → nil':add' → nil':add' → nil':add'
if' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
if2' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':add'3 :: nil':add'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':add'5 :: Nat → nil':add'

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

The following defined symbols remain to be analysed:
eq', le', app', min', rm', mins'

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


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

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

Induction Step:
eq'(_gen_0':s'4(+(_$n8, 1)), _gen_0':s'4(+(_$n8, 1))) →RΩ(1)
eq'(_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:
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
app'(add'(n, x), y) → add'(n, app'(x, y))
min'(add'(n, nil')) → n
min'(add'(n, add'(m, x))) → if_min'(le'(n, m), add'(n, add'(m, x)))
if_min'(true', add'(n, add'(m, x))) → min'(add'(n, x))
if_min'(false', add'(n, add'(m, x))) → min'(add'(m, x))
head'(add'(n, x)) → n
tail'(add'(n, x)) → x
tail'(nil') → nil'
null'(nil') → true'
null'(add'(n, x)) → false'
rm'(n, nil') → nil'
rm'(n, add'(m, x)) → if_rm'(eq'(n, m), n, add'(m, x))
if_rm'(true', n, add'(m, x)) → rm'(n, x)
if_rm'(false', n, add'(m, x)) → add'(m, rm'(n, x))
minsort'(x) → mins'(x, nil', nil')
mins'(x, y, z) → if'(null'(x), x, y, z)
if'(true', x, y, z) → z
if'(false', x, y, z) → if2'(eq'(head'(x), min'(x)), x, y, z)
if2'(true', x, y, z) → mins'(app'(rm'(head'(x), tail'(x)), y), nil', app'(z, add'(head'(x), nil')))
if2'(false', x, y, z) → mins'(tail'(x), add'(head'(x), y), z)

Types:
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
le' :: 0':s' → 0':s' → true':false'
app' :: nil':add' → nil':add' → nil':add'
nil' :: nil':add'
add' :: 0':s' → nil':add' → nil':add'
min' :: nil':add' → 0':s'
if_min' :: true':false' → nil':add' → 0':s'
head' :: nil':add' → 0':s'
tail' :: nil':add' → nil':add'
null' :: nil':add' → true':false'
rm' :: 0':s' → nil':add' → nil':add'
if_rm' :: true':false' → 0':s' → nil':add' → nil':add'
minsort' :: nil':add' → nil':add'
mins' :: nil':add' → nil':add' → nil':add' → nil':add'
if' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
if2' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':add'3 :: nil':add'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':add'5 :: Nat → nil':add'

Lemmas:
eq'(_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':add'5(0) ⇔ nil'
_gen_nil':add'5(+(x, 1)) ⇔ add'(0', _gen_nil':add'5(x))

The following defined symbols remain to be analysed:
le', app', min', rm', mins'

They will be analysed ascendingly in the following order:
le' < min'
app' < mins'
min' < mins'
rm' < mins'


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

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

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

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


Rules:
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
app'(add'(n, x), y) → add'(n, app'(x, y))
min'(add'(n, nil')) → n
min'(add'(n, add'(m, x))) → if_min'(le'(n, m), add'(n, add'(m, x)))
if_min'(true', add'(n, add'(m, x))) → min'(add'(n, x))
if_min'(false', add'(n, add'(m, x))) → min'(add'(m, x))
head'(add'(n, x)) → n
tail'(add'(n, x)) → x
tail'(nil') → nil'
null'(nil') → true'
null'(add'(n, x)) → false'
rm'(n, nil') → nil'
rm'(n, add'(m, x)) → if_rm'(eq'(n, m), n, add'(m, x))
if_rm'(true', n, add'(m, x)) → rm'(n, x)
if_rm'(false', n, add'(m, x)) → add'(m, rm'(n, x))
minsort'(x) → mins'(x, nil', nil')
mins'(x, y, z) → if'(null'(x), x, y, z)
if'(true', x, y, z) → z
if'(false', x, y, z) → if2'(eq'(head'(x), min'(x)), x, y, z)
if2'(true', x, y, z) → mins'(app'(rm'(head'(x), tail'(x)), y), nil', app'(z, add'(head'(x), nil')))
if2'(false', x, y, z) → mins'(tail'(x), add'(head'(x), y), z)

Types:
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
le' :: 0':s' → 0':s' → true':false'
app' :: nil':add' → nil':add' → nil':add'
nil' :: nil':add'
add' :: 0':s' → nil':add' → nil':add'
min' :: nil':add' → 0':s'
if_min' :: true':false' → nil':add' → 0':s'
head' :: nil':add' → 0':s'
tail' :: nil':add' → nil':add'
null' :: nil':add' → true':false'
rm' :: 0':s' → nil':add' → nil':add'
if_rm' :: true':false' → 0':s' → nil':add' → nil':add'
minsort' :: nil':add' → nil':add'
mins' :: nil':add' → nil':add' → nil':add' → nil':add'
if' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
if2' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':add'3 :: nil':add'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':add'5 :: Nat → nil':add'

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

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

The following defined symbols remain to be analysed:
app', min', rm', mins'

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


Proved the following rewrite lemma:
app'(_gen_nil':add'5(_n3037), _gen_nil':add'5(b)) → _gen_nil':add'5(+(_n3037, b)), rt ∈ Ω(1 + n3037)

Induction Base:
app'(_gen_nil':add'5(0), _gen_nil':add'5(b)) →RΩ(1)
_gen_nil':add'5(b)

Induction Step:
app'(_gen_nil':add'5(+(_$n3038, 1)), _gen_nil':add'5(_b3268)) →RΩ(1)
add'(0', app'(_gen_nil':add'5(_$n3038), _gen_nil':add'5(_b3268))) →IH
add'(0', _gen_nil':add'5(+(_$n3038, _b3268)))

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


Rules:
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
app'(add'(n, x), y) → add'(n, app'(x, y))
min'(add'(n, nil')) → n
min'(add'(n, add'(m, x))) → if_min'(le'(n, m), add'(n, add'(m, x)))
if_min'(true', add'(n, add'(m, x))) → min'(add'(n, x))
if_min'(false', add'(n, add'(m, x))) → min'(add'(m, x))
head'(add'(n, x)) → n
tail'(add'(n, x)) → x
tail'(nil') → nil'
null'(nil') → true'
null'(add'(n, x)) → false'
rm'(n, nil') → nil'
rm'(n, add'(m, x)) → if_rm'(eq'(n, m), n, add'(m, x))
if_rm'(true', n, add'(m, x)) → rm'(n, x)
if_rm'(false', n, add'(m, x)) → add'(m, rm'(n, x))
minsort'(x) → mins'(x, nil', nil')
mins'(x, y, z) → if'(null'(x), x, y, z)
if'(true', x, y, z) → z
if'(false', x, y, z) → if2'(eq'(head'(x), min'(x)), x, y, z)
if2'(true', x, y, z) → mins'(app'(rm'(head'(x), tail'(x)), y), nil', app'(z, add'(head'(x), nil')))
if2'(false', x, y, z) → mins'(tail'(x), add'(head'(x), y), z)

Types:
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
le' :: 0':s' → 0':s' → true':false'
app' :: nil':add' → nil':add' → nil':add'
nil' :: nil':add'
add' :: 0':s' → nil':add' → nil':add'
min' :: nil':add' → 0':s'
if_min' :: true':false' → nil':add' → 0':s'
head' :: nil':add' → 0':s'
tail' :: nil':add' → nil':add'
null' :: nil':add' → true':false'
rm' :: 0':s' → nil':add' → nil':add'
if_rm' :: true':false' → 0':s' → nil':add' → nil':add'
minsort' :: nil':add' → nil':add'
mins' :: nil':add' → nil':add' → nil':add' → nil':add'
if' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
if2' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':add'3 :: nil':add'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':add'5 :: Nat → nil':add'

Lemmas:
eq'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
le'(_gen_0':s'4(_n1563), _gen_0':s'4(_n1563)) → true', rt ∈ Ω(1 + n1563)
app'(_gen_nil':add'5(_n3037), _gen_nil':add'5(b)) → _gen_nil':add'5(+(_n3037, b)), rt ∈ Ω(1 + n3037)

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

The following defined symbols remain to be analysed:
min', rm', mins'

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


Proved the following rewrite lemma:
min'(_gen_nil':add'5(+(1, _n5110))) → _gen_0':s'4(0), rt ∈ Ω(1 + n5110)

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

Induction Step:
min'(_gen_nil':add'5(+(1, +(_$n5111, 1)))) →RΩ(1)
if_min'(le'(0', 0'), add'(0', add'(0', _gen_nil':add'5(_$n5111)))) →LΩ(1)
if_min'(true', add'(0', add'(0', _gen_nil':add'5(_$n5111)))) →RΩ(1)
min'(add'(0', _gen_nil':add'5(_$n5111))) →IH
_gen_0':s'4(0)

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


Rules:
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
app'(add'(n, x), y) → add'(n, app'(x, y))
min'(add'(n, nil')) → n
min'(add'(n, add'(m, x))) → if_min'(le'(n, m), add'(n, add'(m, x)))
if_min'(true', add'(n, add'(m, x))) → min'(add'(n, x))
if_min'(false', add'(n, add'(m, x))) → min'(add'(m, x))
head'(add'(n, x)) → n
tail'(add'(n, x)) → x
tail'(nil') → nil'
null'(nil') → true'
null'(add'(n, x)) → false'
rm'(n, nil') → nil'
rm'(n, add'(m, x)) → if_rm'(eq'(n, m), n, add'(m, x))
if_rm'(true', n, add'(m, x)) → rm'(n, x)
if_rm'(false', n, add'(m, x)) → add'(m, rm'(n, x))
minsort'(x) → mins'(x, nil', nil')
mins'(x, y, z) → if'(null'(x), x, y, z)
if'(true', x, y, z) → z
if'(false', x, y, z) → if2'(eq'(head'(x), min'(x)), x, y, z)
if2'(true', x, y, z) → mins'(app'(rm'(head'(x), tail'(x)), y), nil', app'(z, add'(head'(x), nil')))
if2'(false', x, y, z) → mins'(tail'(x), add'(head'(x), y), z)

Types:
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
le' :: 0':s' → 0':s' → true':false'
app' :: nil':add' → nil':add' → nil':add'
nil' :: nil':add'
add' :: 0':s' → nil':add' → nil':add'
min' :: nil':add' → 0':s'
if_min' :: true':false' → nil':add' → 0':s'
head' :: nil':add' → 0':s'
tail' :: nil':add' → nil':add'
null' :: nil':add' → true':false'
rm' :: 0':s' → nil':add' → nil':add'
if_rm' :: true':false' → 0':s' → nil':add' → nil':add'
minsort' :: nil':add' → nil':add'
mins' :: nil':add' → nil':add' → nil':add' → nil':add'
if' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
if2' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':add'3 :: nil':add'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':add'5 :: Nat → nil':add'

Lemmas:
eq'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
le'(_gen_0':s'4(_n1563), _gen_0':s'4(_n1563)) → true', rt ∈ Ω(1 + n1563)
app'(_gen_nil':add'5(_n3037), _gen_nil':add'5(b)) → _gen_nil':add'5(+(_n3037, b)), rt ∈ Ω(1 + n3037)
min'(_gen_nil':add'5(+(1, _n5110))) → _gen_0':s'4(0), rt ∈ Ω(1 + n5110)

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

The following defined symbols remain to be analysed:
rm', mins'

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


Proved the following rewrite lemma:
rm'(_gen_0':s'4(0), _gen_nil':add'5(_n8694)) → _gen_nil':add'5(0), rt ∈ Ω(1 + n8694)

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

Induction Step:
rm'(_gen_0':s'4(0), _gen_nil':add'5(+(_$n8695, 1))) →RΩ(1)
if_rm'(eq'(_gen_0':s'4(0), 0'), _gen_0':s'4(0), add'(0', _gen_nil':add'5(_$n8695))) →LΩ(1)
if_rm'(true', _gen_0':s'4(0), add'(0', _gen_nil':add'5(_$n8695))) →RΩ(1)
rm'(_gen_0':s'4(0), _gen_nil':add'5(_$n8695)) →IH
_gen_nil':add'5(0)

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


Rules:
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
app'(add'(n, x), y) → add'(n, app'(x, y))
min'(add'(n, nil')) → n
min'(add'(n, add'(m, x))) → if_min'(le'(n, m), add'(n, add'(m, x)))
if_min'(true', add'(n, add'(m, x))) → min'(add'(n, x))
if_min'(false', add'(n, add'(m, x))) → min'(add'(m, x))
head'(add'(n, x)) → n
tail'(add'(n, x)) → x
tail'(nil') → nil'
null'(nil') → true'
null'(add'(n, x)) → false'
rm'(n, nil') → nil'
rm'(n, add'(m, x)) → if_rm'(eq'(n, m), n, add'(m, x))
if_rm'(true', n, add'(m, x)) → rm'(n, x)
if_rm'(false', n, add'(m, x)) → add'(m, rm'(n, x))
minsort'(x) → mins'(x, nil', nil')
mins'(x, y, z) → if'(null'(x), x, y, z)
if'(true', x, y, z) → z
if'(false', x, y, z) → if2'(eq'(head'(x), min'(x)), x, y, z)
if2'(true', x, y, z) → mins'(app'(rm'(head'(x), tail'(x)), y), nil', app'(z, add'(head'(x), nil')))
if2'(false', x, y, z) → mins'(tail'(x), add'(head'(x), y), z)

Types:
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
le' :: 0':s' → 0':s' → true':false'
app' :: nil':add' → nil':add' → nil':add'
nil' :: nil':add'
add' :: 0':s' → nil':add' → nil':add'
min' :: nil':add' → 0':s'
if_min' :: true':false' → nil':add' → 0':s'
head' :: nil':add' → 0':s'
tail' :: nil':add' → nil':add'
null' :: nil':add' → true':false'
rm' :: 0':s' → nil':add' → nil':add'
if_rm' :: true':false' → 0':s' → nil':add' → nil':add'
minsort' :: nil':add' → nil':add'
mins' :: nil':add' → nil':add' → nil':add' → nil':add'
if' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
if2' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':add'3 :: nil':add'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':add'5 :: Nat → nil':add'

Lemmas:
eq'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
le'(_gen_0':s'4(_n1563), _gen_0':s'4(_n1563)) → true', rt ∈ Ω(1 + n1563)
app'(_gen_nil':add'5(_n3037), _gen_nil':add'5(b)) → _gen_nil':add'5(+(_n3037, b)), rt ∈ Ω(1 + n3037)
min'(_gen_nil':add'5(+(1, _n5110))) → _gen_0':s'4(0), rt ∈ Ω(1 + n5110)
rm'(_gen_0':s'4(0), _gen_nil':add'5(_n8694)) → _gen_nil':add'5(0), rt ∈ Ω(1 + n8694)

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

The following defined symbols remain to be analysed:
mins'


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


Rules:
eq'(0', 0') → true'
eq'(0', s'(x)) → false'
eq'(s'(x), 0') → false'
eq'(s'(x), s'(y)) → eq'(x, y)
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
app'(nil', y) → y
app'(add'(n, x), y) → add'(n, app'(x, y))
min'(add'(n, nil')) → n
min'(add'(n, add'(m, x))) → if_min'(le'(n, m), add'(n, add'(m, x)))
if_min'(true', add'(n, add'(m, x))) → min'(add'(n, x))
if_min'(false', add'(n, add'(m, x))) → min'(add'(m, x))
head'(add'(n, x)) → n
tail'(add'(n, x)) → x
tail'(nil') → nil'
null'(nil') → true'
null'(add'(n, x)) → false'
rm'(n, nil') → nil'
rm'(n, add'(m, x)) → if_rm'(eq'(n, m), n, add'(m, x))
if_rm'(true', n, add'(m, x)) → rm'(n, x)
if_rm'(false', n, add'(m, x)) → add'(m, rm'(n, x))
minsort'(x) → mins'(x, nil', nil')
mins'(x, y, z) → if'(null'(x), x, y, z)
if'(true', x, y, z) → z
if'(false', x, y, z) → if2'(eq'(head'(x), min'(x)), x, y, z)
if2'(true', x, y, z) → mins'(app'(rm'(head'(x), tail'(x)), y), nil', app'(z, add'(head'(x), nil')))
if2'(false', x, y, z) → mins'(tail'(x), add'(head'(x), y), z)

Types:
eq' :: 0':s' → 0':s' → true':false'
0' :: 0':s'
true' :: true':false'
s' :: 0':s' → 0':s'
false' :: true':false'
le' :: 0':s' → 0':s' → true':false'
app' :: nil':add' → nil':add' → nil':add'
nil' :: nil':add'
add' :: 0':s' → nil':add' → nil':add'
min' :: nil':add' → 0':s'
if_min' :: true':false' → nil':add' → 0':s'
head' :: nil':add' → 0':s'
tail' :: nil':add' → nil':add'
null' :: nil':add' → true':false'
rm' :: 0':s' → nil':add' → nil':add'
if_rm' :: true':false' → 0':s' → nil':add' → nil':add'
minsort' :: nil':add' → nil':add'
mins' :: nil':add' → nil':add' → nil':add' → nil':add'
if' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
if2' :: true':false' → nil':add' → nil':add' → nil':add' → nil':add'
_hole_true':false'1 :: true':false'
_hole_0':s'2 :: 0':s'
_hole_nil':add'3 :: nil':add'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':add'5 :: Nat → nil':add'

Lemmas:
eq'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
le'(_gen_0':s'4(_n1563), _gen_0':s'4(_n1563)) → true', rt ∈ Ω(1 + n1563)
app'(_gen_nil':add'5(_n3037), _gen_nil':add'5(b)) → _gen_nil':add'5(+(_n3037, b)), rt ∈ Ω(1 + n3037)
min'(_gen_nil':add'5(+(1, _n5110))) → _gen_0':s'4(0), rt ∈ Ω(1 + n5110)
rm'(_gen_0':s'4(0), _gen_nil':add'5(_n8694)) → _gen_nil':add'5(0), rt ∈ Ω(1 + n8694)

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

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
eq'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)