(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
tower(x) → f(a, x, s(0))
f(a, 0, y) → y
f(a, s(x), y) → f(b, y, s(x))
f(b, y, x) → f(a, half(x), exp(y))
exp(0) → s(0)
exp(s(x)) → double(exp(x))
double(0) → 0
double(s(x)) → s(s(double(x)))
half(0) → double(0)
half(s(0)) → half(0)
half(s(s(x))) → s(half(x))
Rewrite Strategy: FULL
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
exp(s(x)) →+ double(exp(x))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [x / s(x)].
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:
tower(x) → f(a, x, s(0'))
f(a, 0', y) → y
f(a, s(x), y) → f(b, y, s(x))
f(b, y, x) → f(a, half(x), exp(y))
exp(0') → s(0')
exp(s(x)) → double(exp(x))
double(0') → 0'
double(s(x)) → s(s(double(x)))
half(0') → double(0')
half(s(0')) → half(0')
half(s(s(x))) → s(half(x))
S is empty.
Rewrite Strategy: FULL
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
TRS:
Rules:
tower(x) → f(a, x, s(0'))
f(a, 0', y) → y
f(a, s(x), y) → f(b, y, s(x))
f(b, y, x) → f(a, half(x), exp(y))
exp(0') → s(0')
exp(s(x)) → double(exp(x))
double(0') → 0'
double(s(x)) → s(s(double(x)))
half(0') → double(0')
half(s(0')) → half(0')
half(s(s(x))) → s(half(x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
f,
half,
exp,
doubleThey will be analysed ascendingly in the following order:
half < f
exp < f
double < half
double < exp
(8) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
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:
double, f, half, exp
They will be analysed ascendingly in the following order:
half < f
exp < f
double < half
double < exp
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
double(
gen_0':s3_0(
n5_0)) →
gen_0':s3_0(
*(
2,
n5_0)), rt ∈ Ω(1 + n5
0)
Induction Base:
double(gen_0':s3_0(0)) →RΩ(1)
0'
Induction Step:
double(gen_0':s3_0(+(n5_0, 1))) →RΩ(1)
s(s(double(gen_0':s3_0(n5_0)))) →IH
s(s(gen_0':s3_0(*(2, c6_0))))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), 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:
half, f, exp
They will be analysed ascendingly in the following order:
half < f
exp < f
(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
half(
gen_0':s3_0(
*(
2,
n253_0))) →
gen_0':s3_0(
n253_0), rt ∈ Ω(1 + n253
0)
Induction Base:
half(gen_0':s3_0(*(2, 0))) →RΩ(1)
double(0') →LΩ(1)
gen_0':s3_0(*(2, 0))
Induction Step:
half(gen_0':s3_0(*(2, +(n253_0, 1)))) →RΩ(1)
s(half(gen_0':s3_0(*(2, n253_0)))) →IH
s(gen_0':s3_0(c254_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(13) Complex Obligation (BEST)
(14) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
half(gen_0':s3_0(*(2, n253_0))) → gen_0':s3_0(n253_0), rt ∈ Ω(1 + n2530)
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:
exp, f
They will be analysed ascendingly in the following order:
exp < f
(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
exp(
gen_0':s3_0(
+(
1,
n586_0))) →
*4_0, rt ∈ Ω(n586
0)
Induction Base:
exp(gen_0':s3_0(+(1, 0)))
Induction Step:
exp(gen_0':s3_0(+(1, +(n586_0, 1)))) →RΩ(1)
double(exp(gen_0':s3_0(+(1, n586_0)))) →IH
double(*4_0)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(16) Complex Obligation (BEST)
(17) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
half(gen_0':s3_0(*(2, n253_0))) → gen_0':s3_0(n253_0), rt ∈ Ω(1 + n2530)
exp(gen_0':s3_0(+(1, n586_0))) → *4_0, rt ∈ Ω(n5860)
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:
f
(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol f.
(19) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
half(gen_0':s3_0(*(2, n253_0))) → gen_0':s3_0(n253_0), rt ∈ Ω(1 + n2530)
exp(gen_0':s3_0(+(1, n586_0))) → *4_0, rt ∈ Ω(n5860)
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.
(20) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
(21) BOUNDS(n^1, INF)
(22) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
half(gen_0':s3_0(*(2, n253_0))) → gen_0':s3_0(n253_0), rt ∈ Ω(1 + n2530)
exp(gen_0':s3_0(+(1, n586_0))) → *4_0, rt ∈ Ω(n5860)
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.
(23) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
(24) BOUNDS(n^1, INF)
(25) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
half(gen_0':s3_0(*(2, n253_0))) → gen_0':s3_0(n253_0), rt ∈ Ω(1 + n2530)
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.
(26) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
(27) BOUNDS(n^1, INF)
(28) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), 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.
(29) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
(30) BOUNDS(n^1, INF)