(0) Obligation:
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)
if1(true, x, y, xs) → min(x, xs)
if1(false, x, y, xs) → min(y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
minsort(nil) → nil
minsort(cons(x, y)) → cons(min(x, y), minsort(del(min(x, y), cons(x, y))))
min(x, nil) → x
min(x, cons(y, z)) → if1(le(x, y), x, y, z)
del(x, nil) → nil
del(x, cons(y, z)) → if2(eq(x, y), x, y, z)
Rewrite Strategy: INNERMOST
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative 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)
if1(true, x, y, xs) → min(x, xs)
if1(false, x, y, xs) → min(y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
minsort(nil) → nil
minsort(cons(x, y)) → cons(min(x, y), minsort(del(min(x, y), cons(x, y))))
min(x, nil) → x
min(x, cons(y, z)) → if1(le(x, y), x, y, z)
del(x, nil) → nil
del(x, cons(y, z)) → if2(eq(x, y), x, y, z)
S is empty.
Rewrite Strategy: INNERMOST
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
Innermost TRS:
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)
if1(true, x, y, xs) → min(x, xs)
if1(false, x, y, xs) → min(y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
minsort(nil) → nil
minsort(cons(x, y)) → cons(min(x, y), minsort(del(min(x, y), cons(x, y))))
min(x, nil) → x
min(x, cons(y, z)) → if1(le(x, y), x, y, z)
del(x, nil) → nil
del(x, cons(y, z)) → if2(eq(x, y), x, y, z)
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
if1 :: true:false → 0':s → 0':s → cons:nil → 0':s
min :: 0':s → cons:nil → 0':s
if2 :: true:false → 0':s → 0':s → cons:nil → cons:nil
cons :: 0':s → cons:nil → cons:nil
del :: 0':s → cons:nil → cons:nil
minsort :: cons:nil → cons:nil
nil :: cons:nil
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
hole_cons:nil3_0 :: cons:nil
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
le,
eq,
min,
del,
minsortThey will be analysed ascendingly in the following order:
le < min
eq < del
min < minsort
del < minsort
(6) Obligation:
Innermost TRS:
Rules:
le(
0',
y) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
eq(
0',
0') →
trueeq(
0',
s(
y)) →
falseeq(
s(
x),
0') →
falseeq(
s(
x),
s(
y)) →
eq(
x,
y)
if1(
true,
x,
y,
xs) →
min(
x,
xs)
if1(
false,
x,
y,
xs) →
min(
y,
xs)
if2(
true,
x,
y,
xs) →
xsif2(
false,
x,
y,
xs) →
cons(
y,
del(
x,
xs))
minsort(
nil) →
nilminsort(
cons(
x,
y)) →
cons(
min(
x,
y),
minsort(
del(
min(
x,
y),
cons(
x,
y))))
min(
x,
nil) →
xmin(
x,
cons(
y,
z)) →
if1(
le(
x,
y),
x,
y,
z)
del(
x,
nil) →
nildel(
x,
cons(
y,
z)) →
if2(
eq(
x,
y),
x,
y,
z)
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
if1 :: true:false → 0':s → 0':s → cons:nil → 0':s
min :: 0':s → cons:nil → 0':s
if2 :: true:false → 0':s → 0':s → cons:nil → cons:nil
cons :: 0':s → cons:nil → cons:nil
del :: 0':s → cons:nil → cons:nil
minsort :: cons:nil → cons:nil
nil :: cons:nil
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
hole_cons:nil3_0 :: cons:nil
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))
The following defined symbols remain to be analysed:
le, eq, min, del, minsort
They will be analysed ascendingly in the following order:
le < min
eq < del
min < minsort
del < minsort
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
le(
gen_0':s4_0(
n7_0),
gen_0':s4_0(
n7_0)) →
true, rt ∈ Ω(1 + n7
0)
Induction Base:
le(gen_0':s4_0(0), gen_0':s4_0(0)) →RΩ(1)
true
Induction Step:
le(gen_0':s4_0(+(n7_0, 1)), gen_0':s4_0(+(n7_0, 1))) →RΩ(1)
le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) →IH
true
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
Innermost TRS:
Rules:
le(
0',
y) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
eq(
0',
0') →
trueeq(
0',
s(
y)) →
falseeq(
s(
x),
0') →
falseeq(
s(
x),
s(
y)) →
eq(
x,
y)
if1(
true,
x,
y,
xs) →
min(
x,
xs)
if1(
false,
x,
y,
xs) →
min(
y,
xs)
if2(
true,
x,
y,
xs) →
xsif2(
false,
x,
y,
xs) →
cons(
y,
del(
x,
xs))
minsort(
nil) →
nilminsort(
cons(
x,
y)) →
cons(
min(
x,
y),
minsort(
del(
min(
x,
y),
cons(
x,
y))))
min(
x,
nil) →
xmin(
x,
cons(
y,
z)) →
if1(
le(
x,
y),
x,
y,
z)
del(
x,
nil) →
nildel(
x,
cons(
y,
z)) →
if2(
eq(
x,
y),
x,
y,
z)
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
if1 :: true:false → 0':s → 0':s → cons:nil → 0':s
min :: 0':s → cons:nil → 0':s
if2 :: true:false → 0':s → 0':s → cons:nil → cons:nil
cons :: 0':s → cons:nil → cons:nil
del :: 0':s → cons:nil → cons:nil
minsort :: cons:nil → cons:nil
nil :: cons:nil
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
hole_cons:nil3_0 :: cons:nil
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil
Lemmas:
le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → true, rt ∈ Ω(1 + n70)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))
The following defined symbols remain to be analysed:
eq, min, del, minsort
They will be analysed ascendingly in the following order:
eq < del
min < minsort
del < minsort
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
eq(
gen_0':s4_0(
n348_0),
gen_0':s4_0(
n348_0)) →
true, rt ∈ Ω(1 + n348
0)
Induction Base:
eq(gen_0':s4_0(0), gen_0':s4_0(0)) →RΩ(1)
true
Induction Step:
eq(gen_0':s4_0(+(n348_0, 1)), gen_0':s4_0(+(n348_0, 1))) →RΩ(1)
eq(gen_0':s4_0(n348_0), gen_0':s4_0(n348_0)) →IH
true
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
Innermost TRS:
Rules:
le(
0',
y) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
eq(
0',
0') →
trueeq(
0',
s(
y)) →
falseeq(
s(
x),
0') →
falseeq(
s(
x),
s(
y)) →
eq(
x,
y)
if1(
true,
x,
y,
xs) →
min(
x,
xs)
if1(
false,
x,
y,
xs) →
min(
y,
xs)
if2(
true,
x,
y,
xs) →
xsif2(
false,
x,
y,
xs) →
cons(
y,
del(
x,
xs))
minsort(
nil) →
nilminsort(
cons(
x,
y)) →
cons(
min(
x,
y),
minsort(
del(
min(
x,
y),
cons(
x,
y))))
min(
x,
nil) →
xmin(
x,
cons(
y,
z)) →
if1(
le(
x,
y),
x,
y,
z)
del(
x,
nil) →
nildel(
x,
cons(
y,
z)) →
if2(
eq(
x,
y),
x,
y,
z)
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
if1 :: true:false → 0':s → 0':s → cons:nil → 0':s
min :: 0':s → cons:nil → 0':s
if2 :: true:false → 0':s → 0':s → cons:nil → cons:nil
cons :: 0':s → cons:nil → cons:nil
del :: 0':s → cons:nil → cons:nil
minsort :: cons:nil → cons:nil
nil :: cons:nil
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
hole_cons:nil3_0 :: cons:nil
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil
Lemmas:
le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → true, rt ∈ Ω(1 + n70)
eq(gen_0':s4_0(n348_0), gen_0':s4_0(n348_0)) → true, rt ∈ Ω(1 + n3480)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))
The following defined symbols remain to be analysed:
min, del, minsort
They will be analysed ascendingly in the following order:
min < minsort
del < minsort
(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
min(
gen_0':s4_0(
0),
gen_cons:nil5_0(
n929_0)) →
gen_0':s4_0(
0), rt ∈ Ω(1 + n929
0)
Induction Base:
min(gen_0':s4_0(0), gen_cons:nil5_0(0)) →RΩ(1)
gen_0':s4_0(0)
Induction Step:
min(gen_0':s4_0(0), gen_cons:nil5_0(+(n929_0, 1))) →RΩ(1)
if1(le(gen_0':s4_0(0), 0'), gen_0':s4_0(0), 0', gen_cons:nil5_0(n929_0)) →LΩ(1)
if1(true, gen_0':s4_0(0), 0', gen_cons:nil5_0(n929_0)) →RΩ(1)
min(gen_0':s4_0(0), gen_cons:nil5_0(n929_0)) →IH
gen_0':s4_0(0)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(14) Complex Obligation (BEST)
(15) Obligation:
Innermost TRS:
Rules:
le(
0',
y) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
eq(
0',
0') →
trueeq(
0',
s(
y)) →
falseeq(
s(
x),
0') →
falseeq(
s(
x),
s(
y)) →
eq(
x,
y)
if1(
true,
x,
y,
xs) →
min(
x,
xs)
if1(
false,
x,
y,
xs) →
min(
y,
xs)
if2(
true,
x,
y,
xs) →
xsif2(
false,
x,
y,
xs) →
cons(
y,
del(
x,
xs))
minsort(
nil) →
nilminsort(
cons(
x,
y)) →
cons(
min(
x,
y),
minsort(
del(
min(
x,
y),
cons(
x,
y))))
min(
x,
nil) →
xmin(
x,
cons(
y,
z)) →
if1(
le(
x,
y),
x,
y,
z)
del(
x,
nil) →
nildel(
x,
cons(
y,
z)) →
if2(
eq(
x,
y),
x,
y,
z)
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
if1 :: true:false → 0':s → 0':s → cons:nil → 0':s
min :: 0':s → cons:nil → 0':s
if2 :: true:false → 0':s → 0':s → cons:nil → cons:nil
cons :: 0':s → cons:nil → cons:nil
del :: 0':s → cons:nil → cons:nil
minsort :: cons:nil → cons:nil
nil :: cons:nil
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
hole_cons:nil3_0 :: cons:nil
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil
Lemmas:
le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → true, rt ∈ Ω(1 + n70)
eq(gen_0':s4_0(n348_0), gen_0':s4_0(n348_0)) → true, rt ∈ Ω(1 + n3480)
min(gen_0':s4_0(0), gen_cons:nil5_0(n929_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n9290)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))
The following defined symbols remain to be analysed:
del, minsort
They will be analysed ascendingly in the following order:
del < minsort
(16) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol del.
(17) Obligation:
Innermost TRS:
Rules:
le(
0',
y) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
eq(
0',
0') →
trueeq(
0',
s(
y)) →
falseeq(
s(
x),
0') →
falseeq(
s(
x),
s(
y)) →
eq(
x,
y)
if1(
true,
x,
y,
xs) →
min(
x,
xs)
if1(
false,
x,
y,
xs) →
min(
y,
xs)
if2(
true,
x,
y,
xs) →
xsif2(
false,
x,
y,
xs) →
cons(
y,
del(
x,
xs))
minsort(
nil) →
nilminsort(
cons(
x,
y)) →
cons(
min(
x,
y),
minsort(
del(
min(
x,
y),
cons(
x,
y))))
min(
x,
nil) →
xmin(
x,
cons(
y,
z)) →
if1(
le(
x,
y),
x,
y,
z)
del(
x,
nil) →
nildel(
x,
cons(
y,
z)) →
if2(
eq(
x,
y),
x,
y,
z)
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
if1 :: true:false → 0':s → 0':s → cons:nil → 0':s
min :: 0':s → cons:nil → 0':s
if2 :: true:false → 0':s → 0':s → cons:nil → cons:nil
cons :: 0':s → cons:nil → cons:nil
del :: 0':s → cons:nil → cons:nil
minsort :: cons:nil → cons:nil
nil :: cons:nil
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
hole_cons:nil3_0 :: cons:nil
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil
Lemmas:
le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → true, rt ∈ Ω(1 + n70)
eq(gen_0':s4_0(n348_0), gen_0':s4_0(n348_0)) → true, rt ∈ Ω(1 + n3480)
min(gen_0':s4_0(0), gen_cons:nil5_0(n929_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n9290)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))
The following defined symbols remain to be analysed:
minsort
(18) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
minsort(
gen_cons:nil5_0(
n1626_0)) →
gen_cons:nil5_0(
n1626_0), rt ∈ Ω(1 + n1626
0 + n1626
02)
Induction Base:
minsort(gen_cons:nil5_0(0)) →RΩ(1)
nil
Induction Step:
minsort(gen_cons:nil5_0(+(n1626_0, 1))) →RΩ(1)
cons(min(0', gen_cons:nil5_0(n1626_0)), minsort(del(min(0', gen_cons:nil5_0(n1626_0)), cons(0', gen_cons:nil5_0(n1626_0))))) →LΩ(1 + n16260)
cons(gen_0':s4_0(0), minsort(del(min(0', gen_cons:nil5_0(n1626_0)), cons(0', gen_cons:nil5_0(n1626_0))))) →LΩ(1 + n16260)
cons(gen_0':s4_0(0), minsort(del(gen_0':s4_0(0), cons(0', gen_cons:nil5_0(n1626_0))))) →RΩ(1)
cons(gen_0':s4_0(0), minsort(if2(eq(gen_0':s4_0(0), 0'), gen_0':s4_0(0), 0', gen_cons:nil5_0(n1626_0)))) →LΩ(1)
cons(gen_0':s4_0(0), minsort(if2(true, gen_0':s4_0(0), 0', gen_cons:nil5_0(n1626_0)))) →RΩ(1)
cons(gen_0':s4_0(0), minsort(gen_cons:nil5_0(n1626_0))) →IH
cons(gen_0':s4_0(0), gen_cons:nil5_0(c1627_0))
We have rt ∈ Ω(n2) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n2).
(19) Complex Obligation (BEST)
(20) Obligation:
Innermost TRS:
Rules:
le(
0',
y) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
eq(
0',
0') →
trueeq(
0',
s(
y)) →
falseeq(
s(
x),
0') →
falseeq(
s(
x),
s(
y)) →
eq(
x,
y)
if1(
true,
x,
y,
xs) →
min(
x,
xs)
if1(
false,
x,
y,
xs) →
min(
y,
xs)
if2(
true,
x,
y,
xs) →
xsif2(
false,
x,
y,
xs) →
cons(
y,
del(
x,
xs))
minsort(
nil) →
nilminsort(
cons(
x,
y)) →
cons(
min(
x,
y),
minsort(
del(
min(
x,
y),
cons(
x,
y))))
min(
x,
nil) →
xmin(
x,
cons(
y,
z)) →
if1(
le(
x,
y),
x,
y,
z)
del(
x,
nil) →
nildel(
x,
cons(
y,
z)) →
if2(
eq(
x,
y),
x,
y,
z)
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
if1 :: true:false → 0':s → 0':s → cons:nil → 0':s
min :: 0':s → cons:nil → 0':s
if2 :: true:false → 0':s → 0':s → cons:nil → cons:nil
cons :: 0':s → cons:nil → cons:nil
del :: 0':s → cons:nil → cons:nil
minsort :: cons:nil → cons:nil
nil :: cons:nil
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
hole_cons:nil3_0 :: cons:nil
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil
Lemmas:
le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → true, rt ∈ Ω(1 + n70)
eq(gen_0':s4_0(n348_0), gen_0':s4_0(n348_0)) → true, rt ∈ Ω(1 + n3480)
min(gen_0':s4_0(0), gen_cons:nil5_0(n929_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n9290)
minsort(gen_cons:nil5_0(n1626_0)) → gen_cons:nil5_0(n1626_0), rt ∈ Ω(1 + n16260 + n162602)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))
No more defined symbols left to analyse.
(21) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n2) was proven with the following lemma:
minsort(gen_cons:nil5_0(n1626_0)) → gen_cons:nil5_0(n1626_0), rt ∈ Ω(1 + n16260 + n162602)
(22) BOUNDS(n^2, INF)
(23) Obligation:
Innermost TRS:
Rules:
le(
0',
y) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
eq(
0',
0') →
trueeq(
0',
s(
y)) →
falseeq(
s(
x),
0') →
falseeq(
s(
x),
s(
y)) →
eq(
x,
y)
if1(
true,
x,
y,
xs) →
min(
x,
xs)
if1(
false,
x,
y,
xs) →
min(
y,
xs)
if2(
true,
x,
y,
xs) →
xsif2(
false,
x,
y,
xs) →
cons(
y,
del(
x,
xs))
minsort(
nil) →
nilminsort(
cons(
x,
y)) →
cons(
min(
x,
y),
minsort(
del(
min(
x,
y),
cons(
x,
y))))
min(
x,
nil) →
xmin(
x,
cons(
y,
z)) →
if1(
le(
x,
y),
x,
y,
z)
del(
x,
nil) →
nildel(
x,
cons(
y,
z)) →
if2(
eq(
x,
y),
x,
y,
z)
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
if1 :: true:false → 0':s → 0':s → cons:nil → 0':s
min :: 0':s → cons:nil → 0':s
if2 :: true:false → 0':s → 0':s → cons:nil → cons:nil
cons :: 0':s → cons:nil → cons:nil
del :: 0':s → cons:nil → cons:nil
minsort :: cons:nil → cons:nil
nil :: cons:nil
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
hole_cons:nil3_0 :: cons:nil
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil
Lemmas:
le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → true, rt ∈ Ω(1 + n70)
eq(gen_0':s4_0(n348_0), gen_0':s4_0(n348_0)) → true, rt ∈ Ω(1 + n3480)
min(gen_0':s4_0(0), gen_cons:nil5_0(n929_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n9290)
minsort(gen_cons:nil5_0(n1626_0)) → gen_cons:nil5_0(n1626_0), rt ∈ Ω(1 + n16260 + n162602)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))
No more defined symbols left to analyse.
(24) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n2) was proven with the following lemma:
minsort(gen_cons:nil5_0(n1626_0)) → gen_cons:nil5_0(n1626_0), rt ∈ Ω(1 + n16260 + n162602)
(25) BOUNDS(n^2, INF)
(26) Obligation:
Innermost TRS:
Rules:
le(
0',
y) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
eq(
0',
0') →
trueeq(
0',
s(
y)) →
falseeq(
s(
x),
0') →
falseeq(
s(
x),
s(
y)) →
eq(
x,
y)
if1(
true,
x,
y,
xs) →
min(
x,
xs)
if1(
false,
x,
y,
xs) →
min(
y,
xs)
if2(
true,
x,
y,
xs) →
xsif2(
false,
x,
y,
xs) →
cons(
y,
del(
x,
xs))
minsort(
nil) →
nilminsort(
cons(
x,
y)) →
cons(
min(
x,
y),
minsort(
del(
min(
x,
y),
cons(
x,
y))))
min(
x,
nil) →
xmin(
x,
cons(
y,
z)) →
if1(
le(
x,
y),
x,
y,
z)
del(
x,
nil) →
nildel(
x,
cons(
y,
z)) →
if2(
eq(
x,
y),
x,
y,
z)
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
if1 :: true:false → 0':s → 0':s → cons:nil → 0':s
min :: 0':s → cons:nil → 0':s
if2 :: true:false → 0':s → 0':s → cons:nil → cons:nil
cons :: 0':s → cons:nil → cons:nil
del :: 0':s → cons:nil → cons:nil
minsort :: cons:nil → cons:nil
nil :: cons:nil
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
hole_cons:nil3_0 :: cons:nil
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil
Lemmas:
le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → true, rt ∈ Ω(1 + n70)
eq(gen_0':s4_0(n348_0), gen_0':s4_0(n348_0)) → true, rt ∈ Ω(1 + n3480)
min(gen_0':s4_0(0), gen_cons:nil5_0(n929_0)) → gen_0':s4_0(0), rt ∈ Ω(1 + n9290)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))
No more defined symbols left to analyse.
(27) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → true, rt ∈ Ω(1 + n70)
(28) BOUNDS(n^1, INF)
(29) Obligation:
Innermost TRS:
Rules:
le(
0',
y) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
eq(
0',
0') →
trueeq(
0',
s(
y)) →
falseeq(
s(
x),
0') →
falseeq(
s(
x),
s(
y)) →
eq(
x,
y)
if1(
true,
x,
y,
xs) →
min(
x,
xs)
if1(
false,
x,
y,
xs) →
min(
y,
xs)
if2(
true,
x,
y,
xs) →
xsif2(
false,
x,
y,
xs) →
cons(
y,
del(
x,
xs))
minsort(
nil) →
nilminsort(
cons(
x,
y)) →
cons(
min(
x,
y),
minsort(
del(
min(
x,
y),
cons(
x,
y))))
min(
x,
nil) →
xmin(
x,
cons(
y,
z)) →
if1(
le(
x,
y),
x,
y,
z)
del(
x,
nil) →
nildel(
x,
cons(
y,
z)) →
if2(
eq(
x,
y),
x,
y,
z)
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
if1 :: true:false → 0':s → 0':s → cons:nil → 0':s
min :: 0':s → cons:nil → 0':s
if2 :: true:false → 0':s → 0':s → cons:nil → cons:nil
cons :: 0':s → cons:nil → cons:nil
del :: 0':s → cons:nil → cons:nil
minsort :: cons:nil → cons:nil
nil :: cons:nil
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
hole_cons:nil3_0 :: cons:nil
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil
Lemmas:
le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → true, rt ∈ Ω(1 + n70)
eq(gen_0':s4_0(n348_0), gen_0':s4_0(n348_0)) → true, rt ∈ Ω(1 + n3480)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))
No more defined symbols left to analyse.
(30) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → true, rt ∈ Ω(1 + n70)
(31) BOUNDS(n^1, INF)
(32) Obligation:
Innermost TRS:
Rules:
le(
0',
y) →
truele(
s(
x),
0') →
falsele(
s(
x),
s(
y)) →
le(
x,
y)
eq(
0',
0') →
trueeq(
0',
s(
y)) →
falseeq(
s(
x),
0') →
falseeq(
s(
x),
s(
y)) →
eq(
x,
y)
if1(
true,
x,
y,
xs) →
min(
x,
xs)
if1(
false,
x,
y,
xs) →
min(
y,
xs)
if2(
true,
x,
y,
xs) →
xsif2(
false,
x,
y,
xs) →
cons(
y,
del(
x,
xs))
minsort(
nil) →
nilminsort(
cons(
x,
y)) →
cons(
min(
x,
y),
minsort(
del(
min(
x,
y),
cons(
x,
y))))
min(
x,
nil) →
xmin(
x,
cons(
y,
z)) →
if1(
le(
x,
y),
x,
y,
z)
del(
x,
nil) →
nildel(
x,
cons(
y,
z)) →
if2(
eq(
x,
y),
x,
y,
z)
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
if1 :: true:false → 0':s → 0':s → cons:nil → 0':s
min :: 0':s → cons:nil → 0':s
if2 :: true:false → 0':s → 0':s → cons:nil → cons:nil
cons :: 0':s → cons:nil → cons:nil
del :: 0':s → cons:nil → cons:nil
minsort :: cons:nil → cons:nil
nil :: cons:nil
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
hole_cons:nil3_0 :: cons:nil
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil
Lemmas:
le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → true, rt ∈ Ω(1 + n70)
Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))
No more defined symbols left to analyse.
(33) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) → true, rt ∈ Ω(1 + n70)
(34) BOUNDS(n^1, INF)