(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
lt(0, s(x)) → true
lt(x, 0) → false
lt(s(x), s(y)) → lt(x, y)
fibo(0) → fib(0)
fibo(s(0)) → fib(s(0))
fibo(s(s(x))) → sum(fibo(s(x)), fibo(x))
fib(0) → s(0)
fib(s(0)) → s(0)
fib(s(s(x))) → if(true, 0, s(s(x)), 0, 0)
if(true, c, s(s(x)), a, b) → if(lt(s(c), s(s(x))), s(c), s(s(x)), b, c)
if(false, c, s(s(x)), a, b) → sum(fibo(a), fibo(b))
sum(x, 0) → x
sum(x, s(y)) → s(sum(x, y))
Rewrite Strategy: FULL
(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:
lt(0', s(x)) → true
lt(x, 0') → false
lt(s(x), s(y)) → lt(x, y)
fibo(0') → fib(0')
fibo(s(0')) → fib(s(0'))
fibo(s(s(x))) → sum(fibo(s(x)), fibo(x))
fib(0') → s(0')
fib(s(0')) → s(0')
fib(s(s(x))) → if(true, 0', s(s(x)), 0', 0')
if(true, c, s(s(x)), a, b) → if(lt(s(c), s(s(x))), s(c), s(s(x)), b, c)
if(false, c, s(s(x)), a, b) → sum(fibo(a), fibo(b))
sum(x, 0') → x
sum(x, s(y)) → s(sum(x, y))
S is empty.
Rewrite Strategy: FULL
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
TRS:
Rules:
lt(0', s(x)) → true
lt(x, 0') → false
lt(s(x), s(y)) → lt(x, y)
fibo(0') → fib(0')
fibo(s(0')) → fib(s(0'))
fibo(s(s(x))) → sum(fibo(s(x)), fibo(x))
fib(0') → s(0')
fib(s(0')) → s(0')
fib(s(s(x))) → if(true, 0', s(s(x)), 0', 0')
if(true, c, s(s(x)), a, b) → if(lt(s(c), s(s(x))), s(c), s(s(x)), b, c)
if(false, c, s(s(x)), a, b) → sum(fibo(a), fibo(b))
sum(x, 0') → x
sum(x, s(y)) → s(sum(x, y))
Types:
lt :: 0':s → 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
true :: true:false
false :: true:false
fibo :: 0':s → 0':s
fib :: 0':s → 0':s
sum :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
lt,
fibo,
fib,
sum,
ifThey will be analysed ascendingly in the following order:
lt < if
fibo = fib
sum < fibo
fibo = if
fib = if
sum < if
(6) Obligation:
TRS:
Rules:
lt(
0',
s(
x)) →
truelt(
x,
0') →
falselt(
s(
x),
s(
y)) →
lt(
x,
y)
fibo(
0') →
fib(
0')
fibo(
s(
0')) →
fib(
s(
0'))
fibo(
s(
s(
x))) →
sum(
fibo(
s(
x)),
fibo(
x))
fib(
0') →
s(
0')
fib(
s(
0')) →
s(
0')
fib(
s(
s(
x))) →
if(
true,
0',
s(
s(
x)),
0',
0')
if(
true,
c,
s(
s(
x)),
a,
b) →
if(
lt(
s(
c),
s(
s(
x))),
s(
c),
s(
s(
x)),
b,
c)
if(
false,
c,
s(
s(
x)),
a,
b) →
sum(
fibo(
a),
fibo(
b))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
Types:
lt :: 0':s → 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
true :: true:false
false :: true:false
fibo :: 0':s → 0':s
fib :: 0':s → 0':s
sum :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
The following defined symbols remain to be analysed:
lt, fibo, fib, sum, if
They will be analysed ascendingly in the following order:
lt < if
fibo = fib
sum < fibo
fibo = if
fib = if
sum < if
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
lt(
gen_0':s3_0(
n5_0),
gen_0':s3_0(
+(
1,
n5_0))) →
true, rt ∈ Ω(1 + n5
0)
Induction Base:
lt(gen_0':s3_0(0), gen_0':s3_0(+(1, 0))) →RΩ(1)
true
Induction Step:
lt(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(+(1, +(n5_0, 1)))) →RΩ(1)
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) →IH
true
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
TRS:
Rules:
lt(
0',
s(
x)) →
truelt(
x,
0') →
falselt(
s(
x),
s(
y)) →
lt(
x,
y)
fibo(
0') →
fib(
0')
fibo(
s(
0')) →
fib(
s(
0'))
fibo(
s(
s(
x))) →
sum(
fibo(
s(
x)),
fibo(
x))
fib(
0') →
s(
0')
fib(
s(
0')) →
s(
0')
fib(
s(
s(
x))) →
if(
true,
0',
s(
s(
x)),
0',
0')
if(
true,
c,
s(
s(
x)),
a,
b) →
if(
lt(
s(
c),
s(
s(
x))),
s(
c),
s(
s(
x)),
b,
c)
if(
false,
c,
s(
s(
x)),
a,
b) →
sum(
fibo(
a),
fibo(
b))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
Types:
lt :: 0':s → 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
true :: true:false
false :: true:false
fibo :: 0':s → 0':s
fib :: 0':s → 0':s
sum :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s
Lemmas:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
The following defined symbols remain to be analysed:
sum, fibo, fib, if
They will be analysed ascendingly in the following order:
fibo = fib
sum < fibo
fibo = if
fib = if
sum < if
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
sum(
gen_0':s3_0(
a),
gen_0':s3_0(
n294_0)) →
gen_0':s3_0(
+(
n294_0,
a)), rt ∈ Ω(1 + n294
0)
Induction Base:
sum(gen_0':s3_0(a), gen_0':s3_0(0)) →RΩ(1)
gen_0':s3_0(a)
Induction Step:
sum(gen_0':s3_0(a), gen_0':s3_0(+(n294_0, 1))) →RΩ(1)
s(sum(gen_0':s3_0(a), gen_0':s3_0(n294_0))) →IH
s(gen_0':s3_0(+(a, c295_0)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
TRS:
Rules:
lt(
0',
s(
x)) →
truelt(
x,
0') →
falselt(
s(
x),
s(
y)) →
lt(
x,
y)
fibo(
0') →
fib(
0')
fibo(
s(
0')) →
fib(
s(
0'))
fibo(
s(
s(
x))) →
sum(
fibo(
s(
x)),
fibo(
x))
fib(
0') →
s(
0')
fib(
s(
0')) →
s(
0')
fib(
s(
s(
x))) →
if(
true,
0',
s(
s(
x)),
0',
0')
if(
true,
c,
s(
s(
x)),
a,
b) →
if(
lt(
s(
c),
s(
s(
x))),
s(
c),
s(
s(
x)),
b,
c)
if(
false,
c,
s(
s(
x)),
a,
b) →
sum(
fibo(
a),
fibo(
b))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
Types:
lt :: 0':s → 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
true :: true:false
false :: true:false
fibo :: 0':s → 0':s
fib :: 0':s → 0':s
sum :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s
Lemmas:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
sum(gen_0':s3_0(a), gen_0':s3_0(n294_0)) → gen_0':s3_0(+(n294_0, a)), rt ∈ Ω(1 + n2940)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
The following defined symbols remain to be analysed:
fib, fibo, if
They will be analysed ascendingly in the following order:
fibo = fib
fibo = if
fib = if
(13) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol fib.
(14) Obligation:
TRS:
Rules:
lt(
0',
s(
x)) →
truelt(
x,
0') →
falselt(
s(
x),
s(
y)) →
lt(
x,
y)
fibo(
0') →
fib(
0')
fibo(
s(
0')) →
fib(
s(
0'))
fibo(
s(
s(
x))) →
sum(
fibo(
s(
x)),
fibo(
x))
fib(
0') →
s(
0')
fib(
s(
0')) →
s(
0')
fib(
s(
s(
x))) →
if(
true,
0',
s(
s(
x)),
0',
0')
if(
true,
c,
s(
s(
x)),
a,
b) →
if(
lt(
s(
c),
s(
s(
x))),
s(
c),
s(
s(
x)),
b,
c)
if(
false,
c,
s(
s(
x)),
a,
b) →
sum(
fibo(
a),
fibo(
b))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
Types:
lt :: 0':s → 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
true :: true:false
false :: true:false
fibo :: 0':s → 0':s
fib :: 0':s → 0':s
sum :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s
Lemmas:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
sum(gen_0':s3_0(a), gen_0':s3_0(n294_0)) → gen_0':s3_0(+(n294_0, a)), rt ∈ Ω(1 + n2940)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
The following defined symbols remain to be analysed:
if, fibo
They will be analysed ascendingly in the following order:
fibo = fib
fibo = if
fib = if
(15) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol if.
(16) Obligation:
TRS:
Rules:
lt(
0',
s(
x)) →
truelt(
x,
0') →
falselt(
s(
x),
s(
y)) →
lt(
x,
y)
fibo(
0') →
fib(
0')
fibo(
s(
0')) →
fib(
s(
0'))
fibo(
s(
s(
x))) →
sum(
fibo(
s(
x)),
fibo(
x))
fib(
0') →
s(
0')
fib(
s(
0')) →
s(
0')
fib(
s(
s(
x))) →
if(
true,
0',
s(
s(
x)),
0',
0')
if(
true,
c,
s(
s(
x)),
a,
b) →
if(
lt(
s(
c),
s(
s(
x))),
s(
c),
s(
s(
x)),
b,
c)
if(
false,
c,
s(
s(
x)),
a,
b) →
sum(
fibo(
a),
fibo(
b))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
Types:
lt :: 0':s → 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
true :: true:false
false :: true:false
fibo :: 0':s → 0':s
fib :: 0':s → 0':s
sum :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s
Lemmas:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
sum(gen_0':s3_0(a), gen_0':s3_0(n294_0)) → gen_0':s3_0(+(n294_0, a)), rt ∈ Ω(1 + n2940)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
The following defined symbols remain to be analysed:
fibo
They will be analysed ascendingly in the following order:
fibo = fib
fibo = if
fib = if
(17) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
fibo(
gen_0':s3_0(
+(
2,
n2727_0))) →
*4_0, rt ∈ Ω(n2727
0)
Induction Base:
fibo(gen_0':s3_0(+(2, 0)))
Induction Step:
fibo(gen_0':s3_0(+(2, +(n2727_0, 1)))) →RΩ(1)
sum(fibo(s(gen_0':s3_0(+(1, n2727_0)))), fibo(gen_0':s3_0(+(1, n2727_0)))) →IH
sum(*4_0, fibo(gen_0':s3_0(+(1, n2727_0))))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(18) Complex Obligation (BEST)
(19) Obligation:
TRS:
Rules:
lt(
0',
s(
x)) →
truelt(
x,
0') →
falselt(
s(
x),
s(
y)) →
lt(
x,
y)
fibo(
0') →
fib(
0')
fibo(
s(
0')) →
fib(
s(
0'))
fibo(
s(
s(
x))) →
sum(
fibo(
s(
x)),
fibo(
x))
fib(
0') →
s(
0')
fib(
s(
0')) →
s(
0')
fib(
s(
s(
x))) →
if(
true,
0',
s(
s(
x)),
0',
0')
if(
true,
c,
s(
s(
x)),
a,
b) →
if(
lt(
s(
c),
s(
s(
x))),
s(
c),
s(
s(
x)),
b,
c)
if(
false,
c,
s(
s(
x)),
a,
b) →
sum(
fibo(
a),
fibo(
b))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
Types:
lt :: 0':s → 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
true :: true:false
false :: true:false
fibo :: 0':s → 0':s
fib :: 0':s → 0':s
sum :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s
Lemmas:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
sum(gen_0':s3_0(a), gen_0':s3_0(n294_0)) → gen_0':s3_0(+(n294_0, a)), rt ∈ Ω(1 + n2940)
fibo(gen_0':s3_0(+(2, n2727_0))) → *4_0, rt ∈ Ω(n27270)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
The following defined symbols remain to be analysed:
fib, if
They will be analysed ascendingly in the following order:
fibo = fib
fibo = if
fib = if
(20) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol fib.
(21) Obligation:
TRS:
Rules:
lt(
0',
s(
x)) →
truelt(
x,
0') →
falselt(
s(
x),
s(
y)) →
lt(
x,
y)
fibo(
0') →
fib(
0')
fibo(
s(
0')) →
fib(
s(
0'))
fibo(
s(
s(
x))) →
sum(
fibo(
s(
x)),
fibo(
x))
fib(
0') →
s(
0')
fib(
s(
0')) →
s(
0')
fib(
s(
s(
x))) →
if(
true,
0',
s(
s(
x)),
0',
0')
if(
true,
c,
s(
s(
x)),
a,
b) →
if(
lt(
s(
c),
s(
s(
x))),
s(
c),
s(
s(
x)),
b,
c)
if(
false,
c,
s(
s(
x)),
a,
b) →
sum(
fibo(
a),
fibo(
b))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
Types:
lt :: 0':s → 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
true :: true:false
false :: true:false
fibo :: 0':s → 0':s
fib :: 0':s → 0':s
sum :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s
Lemmas:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
sum(gen_0':s3_0(a), gen_0':s3_0(n294_0)) → gen_0':s3_0(+(n294_0, a)), rt ∈ Ω(1 + n2940)
fibo(gen_0':s3_0(+(2, n2727_0))) → *4_0, rt ∈ Ω(n27270)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
The following defined symbols remain to be analysed:
if
They will be analysed ascendingly in the following order:
fibo = fib
fibo = if
fib = if
(22) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol if.
(23) Obligation:
TRS:
Rules:
lt(
0',
s(
x)) →
truelt(
x,
0') →
falselt(
s(
x),
s(
y)) →
lt(
x,
y)
fibo(
0') →
fib(
0')
fibo(
s(
0')) →
fib(
s(
0'))
fibo(
s(
s(
x))) →
sum(
fibo(
s(
x)),
fibo(
x))
fib(
0') →
s(
0')
fib(
s(
0')) →
s(
0')
fib(
s(
s(
x))) →
if(
true,
0',
s(
s(
x)),
0',
0')
if(
true,
c,
s(
s(
x)),
a,
b) →
if(
lt(
s(
c),
s(
s(
x))),
s(
c),
s(
s(
x)),
b,
c)
if(
false,
c,
s(
s(
x)),
a,
b) →
sum(
fibo(
a),
fibo(
b))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
Types:
lt :: 0':s → 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
true :: true:false
false :: true:false
fibo :: 0':s → 0':s
fib :: 0':s → 0':s
sum :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s
Lemmas:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
sum(gen_0':s3_0(a), gen_0':s3_0(n294_0)) → gen_0':s3_0(+(n294_0, a)), rt ∈ Ω(1 + n2940)
fibo(gen_0':s3_0(+(2, n2727_0))) → *4_0, rt ∈ Ω(n27270)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
No more defined symbols left to analyse.
(24) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
(25) BOUNDS(n^1, INF)
(26) Obligation:
TRS:
Rules:
lt(
0',
s(
x)) →
truelt(
x,
0') →
falselt(
s(
x),
s(
y)) →
lt(
x,
y)
fibo(
0') →
fib(
0')
fibo(
s(
0')) →
fib(
s(
0'))
fibo(
s(
s(
x))) →
sum(
fibo(
s(
x)),
fibo(
x))
fib(
0') →
s(
0')
fib(
s(
0')) →
s(
0')
fib(
s(
s(
x))) →
if(
true,
0',
s(
s(
x)),
0',
0')
if(
true,
c,
s(
s(
x)),
a,
b) →
if(
lt(
s(
c),
s(
s(
x))),
s(
c),
s(
s(
x)),
b,
c)
if(
false,
c,
s(
s(
x)),
a,
b) →
sum(
fibo(
a),
fibo(
b))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
Types:
lt :: 0':s → 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
true :: true:false
false :: true:false
fibo :: 0':s → 0':s
fib :: 0':s → 0':s
sum :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s
Lemmas:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
sum(gen_0':s3_0(a), gen_0':s3_0(n294_0)) → gen_0':s3_0(+(n294_0, a)), rt ∈ Ω(1 + n2940)
fibo(gen_0':s3_0(+(2, n2727_0))) → *4_0, rt ∈ Ω(n27270)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
No more defined symbols left to analyse.
(27) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
(28) BOUNDS(n^1, INF)
(29) Obligation:
TRS:
Rules:
lt(
0',
s(
x)) →
truelt(
x,
0') →
falselt(
s(
x),
s(
y)) →
lt(
x,
y)
fibo(
0') →
fib(
0')
fibo(
s(
0')) →
fib(
s(
0'))
fibo(
s(
s(
x))) →
sum(
fibo(
s(
x)),
fibo(
x))
fib(
0') →
s(
0')
fib(
s(
0')) →
s(
0')
fib(
s(
s(
x))) →
if(
true,
0',
s(
s(
x)),
0',
0')
if(
true,
c,
s(
s(
x)),
a,
b) →
if(
lt(
s(
c),
s(
s(
x))),
s(
c),
s(
s(
x)),
b,
c)
if(
false,
c,
s(
s(
x)),
a,
b) →
sum(
fibo(
a),
fibo(
b))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
Types:
lt :: 0':s → 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
true :: true:false
false :: true:false
fibo :: 0':s → 0':s
fib :: 0':s → 0':s
sum :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s
Lemmas:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
sum(gen_0':s3_0(a), gen_0':s3_0(n294_0)) → gen_0':s3_0(+(n294_0, a)), rt ∈ Ω(1 + n2940)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
No more defined symbols left to analyse.
(30) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
(31) BOUNDS(n^1, INF)
(32) Obligation:
TRS:
Rules:
lt(
0',
s(
x)) →
truelt(
x,
0') →
falselt(
s(
x),
s(
y)) →
lt(
x,
y)
fibo(
0') →
fib(
0')
fibo(
s(
0')) →
fib(
s(
0'))
fibo(
s(
s(
x))) →
sum(
fibo(
s(
x)),
fibo(
x))
fib(
0') →
s(
0')
fib(
s(
0')) →
s(
0')
fib(
s(
s(
x))) →
if(
true,
0',
s(
s(
x)),
0',
0')
if(
true,
c,
s(
s(
x)),
a,
b) →
if(
lt(
s(
c),
s(
s(
x))),
s(
c),
s(
s(
x)),
b,
c)
if(
false,
c,
s(
s(
x)),
a,
b) →
sum(
fibo(
a),
fibo(
b))
sum(
x,
0') →
xsum(
x,
s(
y)) →
s(
sum(
x,
y))
Types:
lt :: 0':s → 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
true :: true:false
false :: true:false
fibo :: 0':s → 0':s
fib :: 0':s → 0':s
sum :: 0':s → 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s → 0':s → 0':s
hole_true:false1_0 :: true:false
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s
Lemmas:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
No more defined symbols left to analyse.
(33) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
lt(gen_0':s3_0(n5_0), gen_0':s3_0(+(1, n5_0))) → true, rt ∈ Ω(1 + n50)
(34) BOUNDS(n^1, INF)