(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) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
lte(Cons(x', xs'), Cons(x, xs)) →+ lte(xs', xs)
gives rise to a decreasing loop by considering the right hand sides subterm at position [].
The pumping substitution is [xs' / Cons(x', xs'), xs / Cons(x, xs)].
The result substitution is [ ].
(2) BOUNDS(n^1, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) 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
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) 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
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
lte, even
(8) 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
(9) 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).
(10) Complex Obligation (BEST)
(11) 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
(12) 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).
(13) Complex Obligation (BEST)
(14) 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.
(15) 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)
(16) BOUNDS(n^1, INF)
(17) 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.
(18) 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)
(19) BOUNDS(n^1, INF)
(20) 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.
(21) 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)
(22) BOUNDS(n^1, INF)