(0) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
remove(x', Cons(x, xs)) → remove[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs))
remove(x, Nil) → Nil
minsort(Cons(x, xs)) → appmin(x, xs, Cons(x, xs))
minsort(Nil) → Nil
appmin(min, Cons(x, xs), xs') → appmin[Ite][True][Ite](<(x, min), min, Cons(x, xs), xs')
appmin(min, Nil, xs) → Cons(min, minsort(remove(min, xs)))
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(xs) → minsort(xs)
The (relative) TRS S consists of the following rules:
!EQ(S(x), S(y)) → !EQ(x, y)
!EQ(0, S(y)) → False
!EQ(S(x), 0) → False
!EQ(0, 0) → True
<(S(x), S(y)) → <(x, y)
<(0, S(y)) → True
<(x, 0) → False
remove[Ite][True][Ite](False, x', Cons(x, xs)) → Cons(x, remove(x', xs))
appmin[Ite][True][Ite](True, min, Cons(x, xs), xs') → appmin(x, xs, xs')
remove[Ite][True][Ite](True, x', Cons(x, xs)) → xs
appmin[Ite][True][Ite](False, min, Cons(x, xs), xs') → appmin(min, xs, xs')
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:
remove(x', Cons(x, xs)) → remove[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs))
remove(x, Nil) → Nil
minsort(Cons(x, xs)) → appmin(x, xs, Cons(x, xs))
minsort(Nil) → Nil
appmin(min, Cons(x, xs), xs') → appmin[Ite][True][Ite](<(x, min), min, Cons(x, xs), xs')
appmin(min, Nil, xs) → Cons(min, minsort(remove(min, xs)))
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(xs) → minsort(xs)
The (relative) TRS S consists of the following rules:
!EQ(S(x), S(y)) → !EQ(x, y)
!EQ(0', S(y)) → False
!EQ(S(x), 0') → False
!EQ(0', 0') → True
<(S(x), S(y)) → <(x, y)
<(0', S(y)) → True
<(x, 0') → False
remove[Ite][True][Ite](False, x', Cons(x, xs)) → Cons(x, remove(x', xs))
appmin[Ite][True][Ite](True, min, Cons(x, xs), xs') → appmin(x, xs, xs')
remove[Ite][True][Ite](True, x', Cons(x, xs)) → xs
appmin[Ite][True][Ite](False, min, Cons(x, xs), xs') → appmin(min, xs, xs')
Rewrite Strategy: INNERMOST
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
Innermost TRS:
Rules:
remove(x', Cons(x, xs)) → remove[Ite][True][Ite](!EQ(x', x), x', Cons(x, xs))
remove(x, Nil) → Nil
minsort(Cons(x, xs)) → appmin(x, xs, Cons(x, xs))
minsort(Nil) → Nil
appmin(min, Cons(x, xs), xs') → appmin[Ite][True][Ite](<(x, min), min, Cons(x, xs), xs')
appmin(min, Nil, xs) → Cons(min, minsort(remove(min, xs)))
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(xs) → minsort(xs)
!EQ(S(x), S(y)) → !EQ(x, y)
!EQ(0', S(y)) → False
!EQ(S(x), 0') → False
!EQ(0', 0') → True
<(S(x), S(y)) → <(x, y)
<(0', S(y)) → True
<(x, 0') → False
remove[Ite][True][Ite](False, x', Cons(x, xs)) → Cons(x, remove(x', xs))
appmin[Ite][True][Ite](True, min, Cons(x, xs), xs') → appmin(x, xs, xs')
remove[Ite][True][Ite](True, x', Cons(x, xs)) → xs
appmin[Ite][True][Ite](False, min, Cons(x, xs), xs') → appmin(min, xs, xs')
Types:
remove :: S:0' → Cons:Nil → Cons:Nil
Cons :: S:0' → Cons:Nil → Cons:Nil
remove[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil
!EQ :: S:0' → S:0' → True:False
Nil :: Cons:Nil
minsort :: Cons:Nil → Cons:Nil
appmin :: S:0' → Cons:Nil → Cons:Nil → Cons:Nil
appmin[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil → Cons:Nil
< :: S:0' → S:0' → True:False
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil
S :: S:0' → S:0'
0' :: S:0'
hole_Cons:Nil1_0 :: Cons:Nil
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_S:0'5_0 :: Nat → S:0'
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
remove,
!EQ,
minsort,
appmin,
<They will be analysed ascendingly in the following order:
!EQ < remove
remove < appmin
minsort = appmin
< < appmin
(6) Obligation:
Innermost TRS:
Rules:
remove(
x',
Cons(
x,
xs)) →
remove[Ite][True][Ite](
!EQ(
x',
x),
x',
Cons(
x,
xs))
remove(
x,
Nil) →
Nilminsort(
Cons(
x,
xs)) →
appmin(
x,
xs,
Cons(
x,
xs))
minsort(
Nil) →
Nilappmin(
min,
Cons(
x,
xs),
xs') →
appmin[Ite][True][Ite](
<(
x,
min),
min,
Cons(
x,
xs),
xs')
appmin(
min,
Nil,
xs) →
Cons(
min,
minsort(
remove(
min,
xs)))
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
minsort(
xs)
!EQ(
S(
x),
S(
y)) →
!EQ(
x,
y)
!EQ(
0',
S(
y)) →
False!EQ(
S(
x),
0') →
False!EQ(
0',
0') →
True<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
Falseremove[Ite][True][Ite](
False,
x',
Cons(
x,
xs)) →
Cons(
x,
remove(
x',
xs))
appmin[Ite][True][Ite](
True,
min,
Cons(
x,
xs),
xs') →
appmin(
x,
xs,
xs')
remove[Ite][True][Ite](
True,
x',
Cons(
x,
xs)) →
xsappmin[Ite][True][Ite](
False,
min,
Cons(
x,
xs),
xs') →
appmin(
min,
xs,
xs')
Types:
remove :: S:0' → Cons:Nil → Cons:Nil
Cons :: S:0' → Cons:Nil → Cons:Nil
remove[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil
!EQ :: S:0' → S:0' → True:False
Nil :: Cons:Nil
minsort :: Cons:Nil → Cons:Nil
appmin :: S:0' → Cons:Nil → Cons:Nil → Cons:Nil
appmin[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil → Cons:Nil
< :: S:0' → S:0' → True:False
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil
S :: S:0' → S:0'
0' :: S:0'
hole_Cons:Nil1_0 :: Cons:Nil
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_S:0'5_0 :: Nat → S:0'
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
The following defined symbols remain to be analysed:
!EQ, remove, minsort, appmin, <
They will be analysed ascendingly in the following order:
!EQ < remove
remove < appmin
minsort = appmin
< < appmin
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
!EQ(
gen_S:0'5_0(
n7_0),
gen_S:0'5_0(
+(
1,
n7_0))) →
False, rt ∈ Ω(0)
Induction Base:
!EQ(gen_S:0'5_0(0), gen_S:0'5_0(+(1, 0))) →RΩ(0)
False
Induction Step:
!EQ(gen_S:0'5_0(+(n7_0, 1)), gen_S:0'5_0(+(1, +(n7_0, 1)))) →RΩ(0)
!EQ(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) →IH
False
We have rt ∈ Ω(1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n0).
(8) Complex Obligation (BEST)
(9) Obligation:
Innermost TRS:
Rules:
remove(
x',
Cons(
x,
xs)) →
remove[Ite][True][Ite](
!EQ(
x',
x),
x',
Cons(
x,
xs))
remove(
x,
Nil) →
Nilminsort(
Cons(
x,
xs)) →
appmin(
x,
xs,
Cons(
x,
xs))
minsort(
Nil) →
Nilappmin(
min,
Cons(
x,
xs),
xs') →
appmin[Ite][True][Ite](
<(
x,
min),
min,
Cons(
x,
xs),
xs')
appmin(
min,
Nil,
xs) →
Cons(
min,
minsort(
remove(
min,
xs)))
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
minsort(
xs)
!EQ(
S(
x),
S(
y)) →
!EQ(
x,
y)
!EQ(
0',
S(
y)) →
False!EQ(
S(
x),
0') →
False!EQ(
0',
0') →
True<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
Falseremove[Ite][True][Ite](
False,
x',
Cons(
x,
xs)) →
Cons(
x,
remove(
x',
xs))
appmin[Ite][True][Ite](
True,
min,
Cons(
x,
xs),
xs') →
appmin(
x,
xs,
xs')
remove[Ite][True][Ite](
True,
x',
Cons(
x,
xs)) →
xsappmin[Ite][True][Ite](
False,
min,
Cons(
x,
xs),
xs') →
appmin(
min,
xs,
xs')
Types:
remove :: S:0' → Cons:Nil → Cons:Nil
Cons :: S:0' → Cons:Nil → Cons:Nil
remove[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil
!EQ :: S:0' → S:0' → True:False
Nil :: Cons:Nil
minsort :: Cons:Nil → Cons:Nil
appmin :: S:0' → Cons:Nil → Cons:Nil → Cons:Nil
appmin[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil → Cons:Nil
< :: S:0' → S:0' → True:False
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil
S :: S:0' → S:0'
0' :: S:0'
hole_Cons:Nil1_0 :: Cons:Nil
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
!EQ(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) → False, rt ∈ Ω(0)
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
The following defined symbols remain to be analysed:
remove, minsort, appmin, <
They will be analysed ascendingly in the following order:
remove < appmin
minsort = appmin
< < appmin
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
remove(
gen_S:0'5_0(
1),
gen_Cons:Nil4_0(
n366_0)) →
gen_Cons:Nil4_0(
n366_0), rt ∈ Ω(1 + n366
0)
Induction Base:
remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(0)) →RΩ(1)
Nil
Induction Step:
remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(+(n366_0, 1))) →RΩ(1)
remove[Ite][True][Ite](!EQ(gen_S:0'5_0(1), 0'), gen_S:0'5_0(1), Cons(0', gen_Cons:Nil4_0(n366_0))) →RΩ(0)
remove[Ite][True][Ite](False, gen_S:0'5_0(1), Cons(0', gen_Cons:Nil4_0(n366_0))) →RΩ(0)
Cons(0', remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(n366_0))) →IH
Cons(0', gen_Cons:Nil4_0(c367_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
Innermost TRS:
Rules:
remove(
x',
Cons(
x,
xs)) →
remove[Ite][True][Ite](
!EQ(
x',
x),
x',
Cons(
x,
xs))
remove(
x,
Nil) →
Nilminsort(
Cons(
x,
xs)) →
appmin(
x,
xs,
Cons(
x,
xs))
minsort(
Nil) →
Nilappmin(
min,
Cons(
x,
xs),
xs') →
appmin[Ite][True][Ite](
<(
x,
min),
min,
Cons(
x,
xs),
xs')
appmin(
min,
Nil,
xs) →
Cons(
min,
minsort(
remove(
min,
xs)))
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
minsort(
xs)
!EQ(
S(
x),
S(
y)) →
!EQ(
x,
y)
!EQ(
0',
S(
y)) →
False!EQ(
S(
x),
0') →
False!EQ(
0',
0') →
True<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
Falseremove[Ite][True][Ite](
False,
x',
Cons(
x,
xs)) →
Cons(
x,
remove(
x',
xs))
appmin[Ite][True][Ite](
True,
min,
Cons(
x,
xs),
xs') →
appmin(
x,
xs,
xs')
remove[Ite][True][Ite](
True,
x',
Cons(
x,
xs)) →
xsappmin[Ite][True][Ite](
False,
min,
Cons(
x,
xs),
xs') →
appmin(
min,
xs,
xs')
Types:
remove :: S:0' → Cons:Nil → Cons:Nil
Cons :: S:0' → Cons:Nil → Cons:Nil
remove[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil
!EQ :: S:0' → S:0' → True:False
Nil :: Cons:Nil
minsort :: Cons:Nil → Cons:Nil
appmin :: S:0' → Cons:Nil → Cons:Nil → Cons:Nil
appmin[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil → Cons:Nil
< :: S:0' → S:0' → True:False
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil
S :: S:0' → S:0'
0' :: S:0'
hole_Cons:Nil1_0 :: Cons:Nil
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
!EQ(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) → False, rt ∈ Ω(0)
remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(n366_0)) → gen_Cons:Nil4_0(n366_0), rt ∈ Ω(1 + n3660)
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
The following defined symbols remain to be analysed:
<, minsort, appmin
They will be analysed ascendingly in the following order:
minsort = appmin
< < appmin
(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
<(
gen_S:0'5_0(
n882_0),
gen_S:0'5_0(
+(
1,
n882_0))) →
True, rt ∈ Ω(0)
Induction Base:
<(gen_S:0'5_0(0), gen_S:0'5_0(+(1, 0))) →RΩ(0)
True
Induction Step:
<(gen_S:0'5_0(+(n882_0, 1)), gen_S:0'5_0(+(1, +(n882_0, 1)))) →RΩ(0)
<(gen_S:0'5_0(n882_0), gen_S:0'5_0(+(1, n882_0))) →IH
True
We have rt ∈ Ω(1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n0).
(14) Complex Obligation (BEST)
(15) Obligation:
Innermost TRS:
Rules:
remove(
x',
Cons(
x,
xs)) →
remove[Ite][True][Ite](
!EQ(
x',
x),
x',
Cons(
x,
xs))
remove(
x,
Nil) →
Nilminsort(
Cons(
x,
xs)) →
appmin(
x,
xs,
Cons(
x,
xs))
minsort(
Nil) →
Nilappmin(
min,
Cons(
x,
xs),
xs') →
appmin[Ite][True][Ite](
<(
x,
min),
min,
Cons(
x,
xs),
xs')
appmin(
min,
Nil,
xs) →
Cons(
min,
minsort(
remove(
min,
xs)))
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
minsort(
xs)
!EQ(
S(
x),
S(
y)) →
!EQ(
x,
y)
!EQ(
0',
S(
y)) →
False!EQ(
S(
x),
0') →
False!EQ(
0',
0') →
True<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
Falseremove[Ite][True][Ite](
False,
x',
Cons(
x,
xs)) →
Cons(
x,
remove(
x',
xs))
appmin[Ite][True][Ite](
True,
min,
Cons(
x,
xs),
xs') →
appmin(
x,
xs,
xs')
remove[Ite][True][Ite](
True,
x',
Cons(
x,
xs)) →
xsappmin[Ite][True][Ite](
False,
min,
Cons(
x,
xs),
xs') →
appmin(
min,
xs,
xs')
Types:
remove :: S:0' → Cons:Nil → Cons:Nil
Cons :: S:0' → Cons:Nil → Cons:Nil
remove[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil
!EQ :: S:0' → S:0' → True:False
Nil :: Cons:Nil
minsort :: Cons:Nil → Cons:Nil
appmin :: S:0' → Cons:Nil → Cons:Nil → Cons:Nil
appmin[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil → Cons:Nil
< :: S:0' → S:0' → True:False
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil
S :: S:0' → S:0'
0' :: S:0'
hole_Cons:Nil1_0 :: Cons:Nil
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
!EQ(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) → False, rt ∈ Ω(0)
remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(n366_0)) → gen_Cons:Nil4_0(n366_0), rt ∈ Ω(1 + n3660)
<(gen_S:0'5_0(n882_0), gen_S:0'5_0(+(1, n882_0))) → True, rt ∈ Ω(0)
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
The following defined symbols remain to be analysed:
appmin, minsort
They will be analysed ascendingly in the following order:
minsort = appmin
(16) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
appmin(
gen_S:0'5_0(
0),
gen_Cons:Nil4_0(
n1193_0),
gen_Cons:Nil4_0(
0)) →
gen_Cons:Nil4_0(
1), rt ∈ Ω(1 + n1193
0)
Induction Base:
appmin(gen_S:0'5_0(0), gen_Cons:Nil4_0(0), gen_Cons:Nil4_0(0)) →RΩ(1)
Cons(gen_S:0'5_0(0), minsort(remove(gen_S:0'5_0(0), gen_Cons:Nil4_0(0)))) →RΩ(1)
Cons(gen_S:0'5_0(0), minsort(Nil)) →RΩ(1)
Cons(gen_S:0'5_0(0), Nil)
Induction Step:
appmin(gen_S:0'5_0(0), gen_Cons:Nil4_0(+(n1193_0, 1)), gen_Cons:Nil4_0(0)) →RΩ(1)
appmin[Ite][True][Ite](<(0', gen_S:0'5_0(0)), gen_S:0'5_0(0), Cons(0', gen_Cons:Nil4_0(n1193_0)), gen_Cons:Nil4_0(0)) →RΩ(0)
appmin[Ite][True][Ite](False, gen_S:0'5_0(0), Cons(0', gen_Cons:Nil4_0(n1193_0)), gen_Cons:Nil4_0(0)) →RΩ(0)
appmin(gen_S:0'5_0(0), gen_Cons:Nil4_0(n1193_0), gen_Cons:Nil4_0(0)) →IH
gen_Cons:Nil4_0(1)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(17) Complex Obligation (BEST)
(18) Obligation:
Innermost TRS:
Rules:
remove(
x',
Cons(
x,
xs)) →
remove[Ite][True][Ite](
!EQ(
x',
x),
x',
Cons(
x,
xs))
remove(
x,
Nil) →
Nilminsort(
Cons(
x,
xs)) →
appmin(
x,
xs,
Cons(
x,
xs))
minsort(
Nil) →
Nilappmin(
min,
Cons(
x,
xs),
xs') →
appmin[Ite][True][Ite](
<(
x,
min),
min,
Cons(
x,
xs),
xs')
appmin(
min,
Nil,
xs) →
Cons(
min,
minsort(
remove(
min,
xs)))
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
minsort(
xs)
!EQ(
S(
x),
S(
y)) →
!EQ(
x,
y)
!EQ(
0',
S(
y)) →
False!EQ(
S(
x),
0') →
False!EQ(
0',
0') →
True<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
Falseremove[Ite][True][Ite](
False,
x',
Cons(
x,
xs)) →
Cons(
x,
remove(
x',
xs))
appmin[Ite][True][Ite](
True,
min,
Cons(
x,
xs),
xs') →
appmin(
x,
xs,
xs')
remove[Ite][True][Ite](
True,
x',
Cons(
x,
xs)) →
xsappmin[Ite][True][Ite](
False,
min,
Cons(
x,
xs),
xs') →
appmin(
min,
xs,
xs')
Types:
remove :: S:0' → Cons:Nil → Cons:Nil
Cons :: S:0' → Cons:Nil → Cons:Nil
remove[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil
!EQ :: S:0' → S:0' → True:False
Nil :: Cons:Nil
minsort :: Cons:Nil → Cons:Nil
appmin :: S:0' → Cons:Nil → Cons:Nil → Cons:Nil
appmin[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil → Cons:Nil
< :: S:0' → S:0' → True:False
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil
S :: S:0' → S:0'
0' :: S:0'
hole_Cons:Nil1_0 :: Cons:Nil
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
!EQ(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) → False, rt ∈ Ω(0)
remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(n366_0)) → gen_Cons:Nil4_0(n366_0), rt ∈ Ω(1 + n3660)
<(gen_S:0'5_0(n882_0), gen_S:0'5_0(+(1, n882_0))) → True, rt ∈ Ω(0)
appmin(gen_S:0'5_0(0), gen_Cons:Nil4_0(n1193_0), gen_Cons:Nil4_0(0)) → gen_Cons:Nil4_0(1), rt ∈ Ω(1 + n11930)
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
The following defined symbols remain to be analysed:
minsort
They will be analysed ascendingly in the following order:
minsort = appmin
(19) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol minsort.
(20) Obligation:
Innermost TRS:
Rules:
remove(
x',
Cons(
x,
xs)) →
remove[Ite][True][Ite](
!EQ(
x',
x),
x',
Cons(
x,
xs))
remove(
x,
Nil) →
Nilminsort(
Cons(
x,
xs)) →
appmin(
x,
xs,
Cons(
x,
xs))
minsort(
Nil) →
Nilappmin(
min,
Cons(
x,
xs),
xs') →
appmin[Ite][True][Ite](
<(
x,
min),
min,
Cons(
x,
xs),
xs')
appmin(
min,
Nil,
xs) →
Cons(
min,
minsort(
remove(
min,
xs)))
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
minsort(
xs)
!EQ(
S(
x),
S(
y)) →
!EQ(
x,
y)
!EQ(
0',
S(
y)) →
False!EQ(
S(
x),
0') →
False!EQ(
0',
0') →
True<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
Falseremove[Ite][True][Ite](
False,
x',
Cons(
x,
xs)) →
Cons(
x,
remove(
x',
xs))
appmin[Ite][True][Ite](
True,
min,
Cons(
x,
xs),
xs') →
appmin(
x,
xs,
xs')
remove[Ite][True][Ite](
True,
x',
Cons(
x,
xs)) →
xsappmin[Ite][True][Ite](
False,
min,
Cons(
x,
xs),
xs') →
appmin(
min,
xs,
xs')
Types:
remove :: S:0' → Cons:Nil → Cons:Nil
Cons :: S:0' → Cons:Nil → Cons:Nil
remove[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil
!EQ :: S:0' → S:0' → True:False
Nil :: Cons:Nil
minsort :: Cons:Nil → Cons:Nil
appmin :: S:0' → Cons:Nil → Cons:Nil → Cons:Nil
appmin[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil → Cons:Nil
< :: S:0' → S:0' → True:False
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil
S :: S:0' → S:0'
0' :: S:0'
hole_Cons:Nil1_0 :: Cons:Nil
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
!EQ(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) → False, rt ∈ Ω(0)
remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(n366_0)) → gen_Cons:Nil4_0(n366_0), rt ∈ Ω(1 + n3660)
<(gen_S:0'5_0(n882_0), gen_S:0'5_0(+(1, n882_0))) → True, rt ∈ Ω(0)
appmin(gen_S:0'5_0(0), gen_Cons:Nil4_0(n1193_0), gen_Cons:Nil4_0(0)) → gen_Cons:Nil4_0(1), rt ∈ Ω(1 + n11930)
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
No more defined symbols left to analyse.
(21) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(n366_0)) → gen_Cons:Nil4_0(n366_0), rt ∈ Ω(1 + n3660)
(22) BOUNDS(n^1, INF)
(23) Obligation:
Innermost TRS:
Rules:
remove(
x',
Cons(
x,
xs)) →
remove[Ite][True][Ite](
!EQ(
x',
x),
x',
Cons(
x,
xs))
remove(
x,
Nil) →
Nilminsort(
Cons(
x,
xs)) →
appmin(
x,
xs,
Cons(
x,
xs))
minsort(
Nil) →
Nilappmin(
min,
Cons(
x,
xs),
xs') →
appmin[Ite][True][Ite](
<(
x,
min),
min,
Cons(
x,
xs),
xs')
appmin(
min,
Nil,
xs) →
Cons(
min,
minsort(
remove(
min,
xs)))
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
minsort(
xs)
!EQ(
S(
x),
S(
y)) →
!EQ(
x,
y)
!EQ(
0',
S(
y)) →
False!EQ(
S(
x),
0') →
False!EQ(
0',
0') →
True<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
Falseremove[Ite][True][Ite](
False,
x',
Cons(
x,
xs)) →
Cons(
x,
remove(
x',
xs))
appmin[Ite][True][Ite](
True,
min,
Cons(
x,
xs),
xs') →
appmin(
x,
xs,
xs')
remove[Ite][True][Ite](
True,
x',
Cons(
x,
xs)) →
xsappmin[Ite][True][Ite](
False,
min,
Cons(
x,
xs),
xs') →
appmin(
min,
xs,
xs')
Types:
remove :: S:0' → Cons:Nil → Cons:Nil
Cons :: S:0' → Cons:Nil → Cons:Nil
remove[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil
!EQ :: S:0' → S:0' → True:False
Nil :: Cons:Nil
minsort :: Cons:Nil → Cons:Nil
appmin :: S:0' → Cons:Nil → Cons:Nil → Cons:Nil
appmin[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil → Cons:Nil
< :: S:0' → S:0' → True:False
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil
S :: S:0' → S:0'
0' :: S:0'
hole_Cons:Nil1_0 :: Cons:Nil
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
!EQ(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) → False, rt ∈ Ω(0)
remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(n366_0)) → gen_Cons:Nil4_0(n366_0), rt ∈ Ω(1 + n3660)
<(gen_S:0'5_0(n882_0), gen_S:0'5_0(+(1, n882_0))) → True, rt ∈ Ω(0)
appmin(gen_S:0'5_0(0), gen_Cons:Nil4_0(n1193_0), gen_Cons:Nil4_0(0)) → gen_Cons:Nil4_0(1), rt ∈ Ω(1 + n11930)
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
No more defined symbols left to analyse.
(24) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(n366_0)) → gen_Cons:Nil4_0(n366_0), rt ∈ Ω(1 + n3660)
(25) BOUNDS(n^1, INF)
(26) Obligation:
Innermost TRS:
Rules:
remove(
x',
Cons(
x,
xs)) →
remove[Ite][True][Ite](
!EQ(
x',
x),
x',
Cons(
x,
xs))
remove(
x,
Nil) →
Nilminsort(
Cons(
x,
xs)) →
appmin(
x,
xs,
Cons(
x,
xs))
minsort(
Nil) →
Nilappmin(
min,
Cons(
x,
xs),
xs') →
appmin[Ite][True][Ite](
<(
x,
min),
min,
Cons(
x,
xs),
xs')
appmin(
min,
Nil,
xs) →
Cons(
min,
minsort(
remove(
min,
xs)))
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
minsort(
xs)
!EQ(
S(
x),
S(
y)) →
!EQ(
x,
y)
!EQ(
0',
S(
y)) →
False!EQ(
S(
x),
0') →
False!EQ(
0',
0') →
True<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
Falseremove[Ite][True][Ite](
False,
x',
Cons(
x,
xs)) →
Cons(
x,
remove(
x',
xs))
appmin[Ite][True][Ite](
True,
min,
Cons(
x,
xs),
xs') →
appmin(
x,
xs,
xs')
remove[Ite][True][Ite](
True,
x',
Cons(
x,
xs)) →
xsappmin[Ite][True][Ite](
False,
min,
Cons(
x,
xs),
xs') →
appmin(
min,
xs,
xs')
Types:
remove :: S:0' → Cons:Nil → Cons:Nil
Cons :: S:0' → Cons:Nil → Cons:Nil
remove[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil
!EQ :: S:0' → S:0' → True:False
Nil :: Cons:Nil
minsort :: Cons:Nil → Cons:Nil
appmin :: S:0' → Cons:Nil → Cons:Nil → Cons:Nil
appmin[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil → Cons:Nil
< :: S:0' → S:0' → True:False
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil
S :: S:0' → S:0'
0' :: S:0'
hole_Cons:Nil1_0 :: Cons:Nil
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
!EQ(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) → False, rt ∈ Ω(0)
remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(n366_0)) → gen_Cons:Nil4_0(n366_0), rt ∈ Ω(1 + n3660)
<(gen_S:0'5_0(n882_0), gen_S:0'5_0(+(1, n882_0))) → True, rt ∈ Ω(0)
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
No more defined symbols left to analyse.
(27) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(n366_0)) → gen_Cons:Nil4_0(n366_0), rt ∈ Ω(1 + n3660)
(28) BOUNDS(n^1, INF)
(29) Obligation:
Innermost TRS:
Rules:
remove(
x',
Cons(
x,
xs)) →
remove[Ite][True][Ite](
!EQ(
x',
x),
x',
Cons(
x,
xs))
remove(
x,
Nil) →
Nilminsort(
Cons(
x,
xs)) →
appmin(
x,
xs,
Cons(
x,
xs))
minsort(
Nil) →
Nilappmin(
min,
Cons(
x,
xs),
xs') →
appmin[Ite][True][Ite](
<(
x,
min),
min,
Cons(
x,
xs),
xs')
appmin(
min,
Nil,
xs) →
Cons(
min,
minsort(
remove(
min,
xs)))
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
minsort(
xs)
!EQ(
S(
x),
S(
y)) →
!EQ(
x,
y)
!EQ(
0',
S(
y)) →
False!EQ(
S(
x),
0') →
False!EQ(
0',
0') →
True<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
Falseremove[Ite][True][Ite](
False,
x',
Cons(
x,
xs)) →
Cons(
x,
remove(
x',
xs))
appmin[Ite][True][Ite](
True,
min,
Cons(
x,
xs),
xs') →
appmin(
x,
xs,
xs')
remove[Ite][True][Ite](
True,
x',
Cons(
x,
xs)) →
xsappmin[Ite][True][Ite](
False,
min,
Cons(
x,
xs),
xs') →
appmin(
min,
xs,
xs')
Types:
remove :: S:0' → Cons:Nil → Cons:Nil
Cons :: S:0' → Cons:Nil → Cons:Nil
remove[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil
!EQ :: S:0' → S:0' → True:False
Nil :: Cons:Nil
minsort :: Cons:Nil → Cons:Nil
appmin :: S:0' → Cons:Nil → Cons:Nil → Cons:Nil
appmin[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil → Cons:Nil
< :: S:0' → S:0' → True:False
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil
S :: S:0' → S:0'
0' :: S:0'
hole_Cons:Nil1_0 :: Cons:Nil
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
!EQ(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) → False, rt ∈ Ω(0)
remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(n366_0)) → gen_Cons:Nil4_0(n366_0), rt ∈ Ω(1 + n3660)
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
No more defined symbols left to analyse.
(30) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
remove(gen_S:0'5_0(1), gen_Cons:Nil4_0(n366_0)) → gen_Cons:Nil4_0(n366_0), rt ∈ Ω(1 + n3660)
(31) BOUNDS(n^1, INF)
(32) Obligation:
Innermost TRS:
Rules:
remove(
x',
Cons(
x,
xs)) →
remove[Ite][True][Ite](
!EQ(
x',
x),
x',
Cons(
x,
xs))
remove(
x,
Nil) →
Nilminsort(
Cons(
x,
xs)) →
appmin(
x,
xs,
Cons(
x,
xs))
minsort(
Nil) →
Nilappmin(
min,
Cons(
x,
xs),
xs') →
appmin[Ite][True][Ite](
<(
x,
min),
min,
Cons(
x,
xs),
xs')
appmin(
min,
Nil,
xs) →
Cons(
min,
minsort(
remove(
min,
xs)))
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
minsort(
xs)
!EQ(
S(
x),
S(
y)) →
!EQ(
x,
y)
!EQ(
0',
S(
y)) →
False!EQ(
S(
x),
0') →
False!EQ(
0',
0') →
True<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
Falseremove[Ite][True][Ite](
False,
x',
Cons(
x,
xs)) →
Cons(
x,
remove(
x',
xs))
appmin[Ite][True][Ite](
True,
min,
Cons(
x,
xs),
xs') →
appmin(
x,
xs,
xs')
remove[Ite][True][Ite](
True,
x',
Cons(
x,
xs)) →
xsappmin[Ite][True][Ite](
False,
min,
Cons(
x,
xs),
xs') →
appmin(
min,
xs,
xs')
Types:
remove :: S:0' → Cons:Nil → Cons:Nil
Cons :: S:0' → Cons:Nil → Cons:Nil
remove[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil
!EQ :: S:0' → S:0' → True:False
Nil :: Cons:Nil
minsort :: Cons:Nil → Cons:Nil
appmin :: S:0' → Cons:Nil → Cons:Nil → Cons:Nil
appmin[Ite][True][Ite] :: True:False → S:0' → Cons:Nil → Cons:Nil → Cons:Nil
< :: S:0' → S:0' → True:False
notEmpty :: Cons:Nil → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil → Cons:Nil
S :: S:0' → S:0'
0' :: S:0'
hole_Cons:Nil1_0 :: Cons:Nil
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil4_0 :: Nat → Cons:Nil
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
!EQ(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) → False, rt ∈ Ω(0)
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
No more defined symbols left to analyse.
(33) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(1) was proven with the following lemma:
!EQ(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) → False, rt ∈ Ω(0)
(34) BOUNDS(1, INF)