(0) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
lte(Cons(x', xs'), Cons(x, xs)) → lte(xs', xs)
lte(Cons(x, xs), Nil) → False
even(Cons(x, Nil)) → False
even(Cons(x', Cons(x, xs))) → even(xs)
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
lte(Nil, y) → True
even(Nil) → True
goal(x, y) → and(lte(x, y), even(x))
The (relative) TRS S consists of the following rules:
and(False, False) → False
and(True, False) → False
and(False, True) → False
and(True, True) → True
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:
lte(Cons(x', xs'), Cons(x, xs)) → lte(xs', xs)
lte(Cons(x, xs), Nil) → False
even(Cons(x, Nil)) → False
even(Cons(x', Cons(x, xs))) → even(xs)
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
lte(Nil, y) → True
even(Nil) → True
goal(x, y) → and(lte(x, y), even(x))
The (relative) TRS S consists of the following rules:
and(False, False) → False
and(True, False) → False
and(False, True) → False
and(True, True) → True
Rewrite Strategy: INNERMOST
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
Innermost TRS:
Rules:
lte(Cons(x', xs'), Cons(x, xs)) → lte(xs', xs)
lte(Cons(x, xs), Nil) → False
even(Cons(x, Nil)) → False
even(Cons(x', Cons(x, xs))) → even(xs)
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
lte(Nil, y) → True
even(Nil) → True
goal(x, y) → and(lte(x, y), even(x))
and(False, False) → False
and(True, False) → False
and(False, True) → False
and(True, True) → True
Types:
lte :: Cons:Nil → Cons:Nil → False:True
Cons :: a → Cons:Nil → Cons:Nil
Nil :: Cons:Nil
False :: False:True
even :: Cons:Nil → False:True
notEmpty :: Cons:Nil → False:True
True :: False:True
goal :: Cons:Nil → Cons:Nil → False:True
and :: False:True → False:True → False:True
hole_False:True1_0 :: False:True
hole_Cons:Nil2_0 :: Cons:Nil
hole_a3_0 :: a
gen_Cons:Nil4_0 :: Nat → Cons:Nil
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
lte, even
(6) Obligation:
Innermost TRS:
Rules:
lte(
Cons(
x',
xs'),
Cons(
x,
xs)) →
lte(
xs',
xs)
lte(
Cons(
x,
xs),
Nil) →
Falseeven(
Cons(
x,
Nil)) →
Falseeven(
Cons(
x',
Cons(
x,
xs))) →
even(
xs)
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falselte(
Nil,
y) →
Trueeven(
Nil) →
Truegoal(
x,
y) →
and(
lte(
x,
y),
even(
x))
and(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
lte :: Cons:Nil → Cons:Nil → False:True
Cons :: a → Cons:Nil → Cons:Nil
Nil :: Cons:Nil
False :: False:True
even :: Cons:Nil → False:True
notEmpty :: Cons:Nil → False:True
True :: False:True
goal :: Cons:Nil → Cons:Nil → False:True
and :: False:True → False:True → False:True
hole_False:True1_0 :: False:True
hole_Cons:Nil2_0 :: Cons:Nil
hole_a3_0 :: a
gen_Cons:Nil4_0 :: Nat → Cons:Nil
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(hole_a3_0, gen_Cons:Nil4_0(x))
The following defined symbols remain to be analysed:
lte, even
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
lte(
gen_Cons:Nil4_0(
+(
1,
n6_0)),
gen_Cons:Nil4_0(
n6_0)) →
False, rt ∈ Ω(1 + n6
0)
Induction Base:
lte(gen_Cons:Nil4_0(+(1, 0)), gen_Cons:Nil4_0(0)) →RΩ(1)
False
Induction Step:
lte(gen_Cons:Nil4_0(+(1, +(n6_0, 1))), gen_Cons:Nil4_0(+(n6_0, 1))) →RΩ(1)
lte(gen_Cons:Nil4_0(+(1, n6_0)), gen_Cons:Nil4_0(n6_0)) →IH
False
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
Innermost TRS:
Rules:
lte(
Cons(
x',
xs'),
Cons(
x,
xs)) →
lte(
xs',
xs)
lte(
Cons(
x,
xs),
Nil) →
Falseeven(
Cons(
x,
Nil)) →
Falseeven(
Cons(
x',
Cons(
x,
xs))) →
even(
xs)
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falselte(
Nil,
y) →
Trueeven(
Nil) →
Truegoal(
x,
y) →
and(
lte(
x,
y),
even(
x))
and(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
lte :: Cons:Nil → Cons:Nil → False:True
Cons :: a → Cons:Nil → Cons:Nil
Nil :: Cons:Nil
False :: False:True
even :: Cons:Nil → False:True
notEmpty :: Cons:Nil → False:True
True :: False:True
goal :: Cons:Nil → Cons:Nil → False:True
and :: False:True → False:True → False:True
hole_False:True1_0 :: False:True
hole_Cons:Nil2_0 :: Cons:Nil
hole_a3_0 :: a
gen_Cons:Nil4_0 :: Nat → Cons:Nil
Lemmas:
lte(gen_Cons:Nil4_0(+(1, n6_0)), gen_Cons:Nil4_0(n6_0)) → False, rt ∈ Ω(1 + n60)
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(hole_a3_0, gen_Cons:Nil4_0(x))
The following defined symbols remain to be analysed:
even
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
even(
gen_Cons:Nil4_0(
+(
1,
*(
2,
n295_0)))) →
False, rt ∈ Ω(1 + n295
0)
Induction Base:
even(gen_Cons:Nil4_0(+(1, *(2, 0)))) →RΩ(1)
False
Induction Step:
even(gen_Cons:Nil4_0(+(1, *(2, +(n295_0, 1))))) →RΩ(1)
even(gen_Cons:Nil4_0(+(1, *(2, n295_0)))) →IH
False
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
Innermost TRS:
Rules:
lte(
Cons(
x',
xs'),
Cons(
x,
xs)) →
lte(
xs',
xs)
lte(
Cons(
x,
xs),
Nil) →
Falseeven(
Cons(
x,
Nil)) →
Falseeven(
Cons(
x',
Cons(
x,
xs))) →
even(
xs)
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falselte(
Nil,
y) →
Trueeven(
Nil) →
Truegoal(
x,
y) →
and(
lte(
x,
y),
even(
x))
and(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
lte :: Cons:Nil → Cons:Nil → False:True
Cons :: a → Cons:Nil → Cons:Nil
Nil :: Cons:Nil
False :: False:True
even :: Cons:Nil → False:True
notEmpty :: Cons:Nil → False:True
True :: False:True
goal :: Cons:Nil → Cons:Nil → False:True
and :: False:True → False:True → False:True
hole_False:True1_0 :: False:True
hole_Cons:Nil2_0 :: Cons:Nil
hole_a3_0 :: a
gen_Cons:Nil4_0 :: Nat → Cons:Nil
Lemmas:
lte(gen_Cons:Nil4_0(+(1, n6_0)), gen_Cons:Nil4_0(n6_0)) → False, rt ∈ Ω(1 + n60)
even(gen_Cons:Nil4_0(+(1, *(2, n295_0)))) → False, rt ∈ Ω(1 + n2950)
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(hole_a3_0, gen_Cons:Nil4_0(x))
No more defined symbols left to analyse.
(13) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
lte(gen_Cons:Nil4_0(+(1, n6_0)), gen_Cons:Nil4_0(n6_0)) → False, rt ∈ Ω(1 + n60)
(14) BOUNDS(n^1, INF)
(15) Obligation:
Innermost TRS:
Rules:
lte(
Cons(
x',
xs'),
Cons(
x,
xs)) →
lte(
xs',
xs)
lte(
Cons(
x,
xs),
Nil) →
Falseeven(
Cons(
x,
Nil)) →
Falseeven(
Cons(
x',
Cons(
x,
xs))) →
even(
xs)
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falselte(
Nil,
y) →
Trueeven(
Nil) →
Truegoal(
x,
y) →
and(
lte(
x,
y),
even(
x))
and(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
lte :: Cons:Nil → Cons:Nil → False:True
Cons :: a → Cons:Nil → Cons:Nil
Nil :: Cons:Nil
False :: False:True
even :: Cons:Nil → False:True
notEmpty :: Cons:Nil → False:True
True :: False:True
goal :: Cons:Nil → Cons:Nil → False:True
and :: False:True → False:True → False:True
hole_False:True1_0 :: False:True
hole_Cons:Nil2_0 :: Cons:Nil
hole_a3_0 :: a
gen_Cons:Nil4_0 :: Nat → Cons:Nil
Lemmas:
lte(gen_Cons:Nil4_0(+(1, n6_0)), gen_Cons:Nil4_0(n6_0)) → False, rt ∈ Ω(1 + n60)
even(gen_Cons:Nil4_0(+(1, *(2, n295_0)))) → False, rt ∈ Ω(1 + n2950)
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(hole_a3_0, gen_Cons:Nil4_0(x))
No more defined symbols left to analyse.
(16) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
lte(gen_Cons:Nil4_0(+(1, n6_0)), gen_Cons:Nil4_0(n6_0)) → False, rt ∈ Ω(1 + n60)
(17) BOUNDS(n^1, INF)
(18) Obligation:
Innermost TRS:
Rules:
lte(
Cons(
x',
xs'),
Cons(
x,
xs)) →
lte(
xs',
xs)
lte(
Cons(
x,
xs),
Nil) →
Falseeven(
Cons(
x,
Nil)) →
Falseeven(
Cons(
x',
Cons(
x,
xs))) →
even(
xs)
notEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falselte(
Nil,
y) →
Trueeven(
Nil) →
Truegoal(
x,
y) →
and(
lte(
x,
y),
even(
x))
and(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
lte :: Cons:Nil → Cons:Nil → False:True
Cons :: a → Cons:Nil → Cons:Nil
Nil :: Cons:Nil
False :: False:True
even :: Cons:Nil → False:True
notEmpty :: Cons:Nil → False:True
True :: False:True
goal :: Cons:Nil → Cons:Nil → False:True
and :: False:True → False:True → False:True
hole_False:True1_0 :: False:True
hole_Cons:Nil2_0 :: Cons:Nil
hole_a3_0 :: a
gen_Cons:Nil4_0 :: Nat → Cons:Nil
Lemmas:
lte(gen_Cons:Nil4_0(+(1, n6_0)), gen_Cons:Nil4_0(n6_0)) → False, rt ∈ Ω(1 + n60)
Generator Equations:
gen_Cons:Nil4_0(0) ⇔ Nil
gen_Cons:Nil4_0(+(x, 1)) ⇔ Cons(hole_a3_0, gen_Cons:Nil4_0(x))
No more defined symbols left to analyse.
(19) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
lte(gen_Cons:Nil4_0(+(1, n6_0)), gen_Cons:Nil4_0(n6_0)) → False, rt ∈ Ω(1 + n60)
(20) BOUNDS(n^1, INF)