(0) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
rw(Val(n), c) → Op(Val(n), rewrite(c))
rewrite(Op(x, y)) → rw(x, y)
rw(Op(x, y), c) → rw[Let](Op(x, y), c, rewrite(x))
rewrite(Val(n)) → Val(n)
second(Op(x, y)) → y
isOp(Val(n)) → False
isOp(Op(x, y)) → True
first(Val(n)) → Val(n)
first(Op(x, y)) → x
assrewrite(exp) → rewrite(exp)
The (relative) TRS S consists of the following rules:
rw[Let](Op(x, y), c, a1) → rw[Let][Let](Op(x, y), c, a1, rewrite(y))
rw[Let][Let](ab, c, a1, b1) → rw[Let][Let][Let](c, a1, b1, rewrite(c))
rw[Let][Let][Let](c, a1, b1, c1) → rw(a1, Op(b1, c1))
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:
rw(Val(n), c) → Op(Val(n), rewrite(c))
rewrite(Op(x, y)) → rw(x, y)
rw(Op(x, y), c) → rw[Let](Op(x, y), c, rewrite(x))
rewrite(Val(n)) → Val(n)
second(Op(x, y)) → y
isOp(Val(n)) → False
isOp(Op(x, y)) → True
first(Val(n)) → Val(n)
first(Op(x, y)) → x
assrewrite(exp) → rewrite(exp)
The (relative) TRS S consists of the following rules:
rw[Let](Op(x, y), c, a1) → rw[Let][Let](Op(x, y), c, a1, rewrite(y))
rw[Let][Let](ab, c, a1, b1) → rw[Let][Let][Let](c, a1, b1, rewrite(c))
rw[Let][Let][Let](c, a1, b1, c1) → rw(a1, Op(b1, c1))
Rewrite Strategy: INNERMOST
(3) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
Val/0
rw[Let][Let]/0
rw[Let][Let][Let]/0
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
rw(Val, c) → Op(Val, rewrite(c))
rewrite(Op(x, y)) → rw(x, y)
rw(Op(x, y), c) → rw[Let](Op(x, y), c, rewrite(x))
rewrite(Val) → Val
second(Op(x, y)) → y
isOp(Val) → False
isOp(Op(x, y)) → True
first(Val) → Val
first(Op(x, y)) → x
assrewrite(exp) → rewrite(exp)
The (relative) TRS S consists of the following rules:
rw[Let](Op(x, y), c, a1) → rw[Let][Let](c, a1, rewrite(y))
rw[Let][Let](c, a1, b1) → rw[Let][Let][Let](a1, b1, rewrite(c))
rw[Let][Let][Let](a1, b1, c1) → rw(a1, Op(b1, c1))
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
rw(Val, c) → Op(Val, rewrite(c))
rewrite(Op(x, y)) → rw(x, y)
rw(Op(x, y), c) → rw[Let](Op(x, y), c, rewrite(x))
rewrite(Val) → Val
second(Op(x, y)) → y
isOp(Val) → False
isOp(Op(x, y)) → True
first(Val) → Val
first(Op(x, y)) → x
assrewrite(exp) → rewrite(exp)
rw[Let](Op(x, y), c, a1) → rw[Let][Let](c, a1, rewrite(y))
rw[Let][Let](c, a1, b1) → rw[Let][Let][Let](a1, b1, rewrite(c))
rw[Let][Let][Let](a1, b1, c1) → rw(a1, Op(b1, c1))
Types:
rw :: Val:Op → Val:Op → Val:Op
Val :: Val:Op
Op :: Val:Op → Val:Op → Val:Op
rewrite :: Val:Op → Val:Op
rw[Let] :: Val:Op → Val:Op → Val:Op → Val:Op
second :: Val:Op → Val:Op
isOp :: Val:Op → False:True
False :: False:True
True :: False:True
first :: Val:Op → Val:Op
assrewrite :: Val:Op → Val:Op
rw[Let][Let] :: Val:Op → Val:Op → Val:Op → Val:Op
rw[Let][Let][Let] :: Val:Op → Val:Op → Val:Op → Val:Op
hole_Val:Op1_0 :: Val:Op
hole_False:True2_0 :: False:True
gen_Val:Op3_0 :: Nat → Val:Op
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
rw,
rewriteThey will be analysed ascendingly in the following order:
rw = rewrite
(8) Obligation:
Innermost TRS:
Rules:
rw(
Val,
c) →
Op(
Val,
rewrite(
c))
rewrite(
Op(
x,
y)) →
rw(
x,
y)
rw(
Op(
x,
y),
c) →
rw[Let](
Op(
x,
y),
c,
rewrite(
x))
rewrite(
Val) →
Valsecond(
Op(
x,
y)) →
yisOp(
Val) →
FalseisOp(
Op(
x,
y)) →
Truefirst(
Val) →
Valfirst(
Op(
x,
y)) →
xassrewrite(
exp) →
rewrite(
exp)
rw[Let](
Op(
x,
y),
c,
a1) →
rw[Let][Let](
c,
a1,
rewrite(
y))
rw[Let][Let](
c,
a1,
b1) →
rw[Let][Let][Let](
a1,
b1,
rewrite(
c))
rw[Let][Let][Let](
a1,
b1,
c1) →
rw(
a1,
Op(
b1,
c1))
Types:
rw :: Val:Op → Val:Op → Val:Op
Val :: Val:Op
Op :: Val:Op → Val:Op → Val:Op
rewrite :: Val:Op → Val:Op
rw[Let] :: Val:Op → Val:Op → Val:Op → Val:Op
second :: Val:Op → Val:Op
isOp :: Val:Op → False:True
False :: False:True
True :: False:True
first :: Val:Op → Val:Op
assrewrite :: Val:Op → Val:Op
rw[Let][Let] :: Val:Op → Val:Op → Val:Op → Val:Op
rw[Let][Let][Let] :: Val:Op → Val:Op → Val:Op → Val:Op
hole_Val:Op1_0 :: Val:Op
hole_False:True2_0 :: False:True
gen_Val:Op3_0 :: Nat → Val:Op
Generator Equations:
gen_Val:Op3_0(0) ⇔ Val
gen_Val:Op3_0(+(x, 1)) ⇔ Op(Val, gen_Val:Op3_0(x))
The following defined symbols remain to be analysed:
rewrite, rw
They will be analysed ascendingly in the following order:
rw = rewrite
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
rewrite(
gen_Val:Op3_0(
n5_0)) →
gen_Val:Op3_0(
n5_0), rt ∈ Ω(1 + n5
0)
Induction Base:
rewrite(gen_Val:Op3_0(0)) →RΩ(1)
Val
Induction Step:
rewrite(gen_Val:Op3_0(+(n5_0, 1))) →RΩ(1)
rw(Val, gen_Val:Op3_0(n5_0)) →RΩ(1)
Op(Val, rewrite(gen_Val:Op3_0(n5_0))) →IH
Op(Val, gen_Val:Op3_0(c6_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
Innermost TRS:
Rules:
rw(
Val,
c) →
Op(
Val,
rewrite(
c))
rewrite(
Op(
x,
y)) →
rw(
x,
y)
rw(
Op(
x,
y),
c) →
rw[Let](
Op(
x,
y),
c,
rewrite(
x))
rewrite(
Val) →
Valsecond(
Op(
x,
y)) →
yisOp(
Val) →
FalseisOp(
Op(
x,
y)) →
Truefirst(
Val) →
Valfirst(
Op(
x,
y)) →
xassrewrite(
exp) →
rewrite(
exp)
rw[Let](
Op(
x,
y),
c,
a1) →
rw[Let][Let](
c,
a1,
rewrite(
y))
rw[Let][Let](
c,
a1,
b1) →
rw[Let][Let][Let](
a1,
b1,
rewrite(
c))
rw[Let][Let][Let](
a1,
b1,
c1) →
rw(
a1,
Op(
b1,
c1))
Types:
rw :: Val:Op → Val:Op → Val:Op
Val :: Val:Op
Op :: Val:Op → Val:Op → Val:Op
rewrite :: Val:Op → Val:Op
rw[Let] :: Val:Op → Val:Op → Val:Op → Val:Op
second :: Val:Op → Val:Op
isOp :: Val:Op → False:True
False :: False:True
True :: False:True
first :: Val:Op → Val:Op
assrewrite :: Val:Op → Val:Op
rw[Let][Let] :: Val:Op → Val:Op → Val:Op → Val:Op
rw[Let][Let][Let] :: Val:Op → Val:Op → Val:Op → Val:Op
hole_Val:Op1_0 :: Val:Op
hole_False:True2_0 :: False:True
gen_Val:Op3_0 :: Nat → Val:Op
Lemmas:
rewrite(gen_Val:Op3_0(n5_0)) → gen_Val:Op3_0(n5_0), rt ∈ Ω(1 + n50)
Generator Equations:
gen_Val:Op3_0(0) ⇔ Val
gen_Val:Op3_0(+(x, 1)) ⇔ Op(Val, gen_Val:Op3_0(x))
The following defined symbols remain to be analysed:
rw
They will be analysed ascendingly in the following order:
rw = rewrite
(12) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol rw.
(13) Obligation:
Innermost TRS:
Rules:
rw(
Val,
c) →
Op(
Val,
rewrite(
c))
rewrite(
Op(
x,
y)) →
rw(
x,
y)
rw(
Op(
x,
y),
c) →
rw[Let](
Op(
x,
y),
c,
rewrite(
x))
rewrite(
Val) →
Valsecond(
Op(
x,
y)) →
yisOp(
Val) →
FalseisOp(
Op(
x,
y)) →
Truefirst(
Val) →
Valfirst(
Op(
x,
y)) →
xassrewrite(
exp) →
rewrite(
exp)
rw[Let](
Op(
x,
y),
c,
a1) →
rw[Let][Let](
c,
a1,
rewrite(
y))
rw[Let][Let](
c,
a1,
b1) →
rw[Let][Let][Let](
a1,
b1,
rewrite(
c))
rw[Let][Let][Let](
a1,
b1,
c1) →
rw(
a1,
Op(
b1,
c1))
Types:
rw :: Val:Op → Val:Op → Val:Op
Val :: Val:Op
Op :: Val:Op → Val:Op → Val:Op
rewrite :: Val:Op → Val:Op
rw[Let] :: Val:Op → Val:Op → Val:Op → Val:Op
second :: Val:Op → Val:Op
isOp :: Val:Op → False:True
False :: False:True
True :: False:True
first :: Val:Op → Val:Op
assrewrite :: Val:Op → Val:Op
rw[Let][Let] :: Val:Op → Val:Op → Val:Op → Val:Op
rw[Let][Let][Let] :: Val:Op → Val:Op → Val:Op → Val:Op
hole_Val:Op1_0 :: Val:Op
hole_False:True2_0 :: False:True
gen_Val:Op3_0 :: Nat → Val:Op
Lemmas:
rewrite(gen_Val:Op3_0(n5_0)) → gen_Val:Op3_0(n5_0), rt ∈ Ω(1 + n50)
Generator Equations:
gen_Val:Op3_0(0) ⇔ Val
gen_Val:Op3_0(+(x, 1)) ⇔ Op(Val, gen_Val:Op3_0(x))
No more defined symbols left to analyse.
(14) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
rewrite(gen_Val:Op3_0(n5_0)) → gen_Val:Op3_0(n5_0), rt ∈ Ω(1 + n50)
(15) BOUNDS(n^1, INF)
(16) Obligation:
Innermost TRS:
Rules:
rw(
Val,
c) →
Op(
Val,
rewrite(
c))
rewrite(
Op(
x,
y)) →
rw(
x,
y)
rw(
Op(
x,
y),
c) →
rw[Let](
Op(
x,
y),
c,
rewrite(
x))
rewrite(
Val) →
Valsecond(
Op(
x,
y)) →
yisOp(
Val) →
FalseisOp(
Op(
x,
y)) →
Truefirst(
Val) →
Valfirst(
Op(
x,
y)) →
xassrewrite(
exp) →
rewrite(
exp)
rw[Let](
Op(
x,
y),
c,
a1) →
rw[Let][Let](
c,
a1,
rewrite(
y))
rw[Let][Let](
c,
a1,
b1) →
rw[Let][Let][Let](
a1,
b1,
rewrite(
c))
rw[Let][Let][Let](
a1,
b1,
c1) →
rw(
a1,
Op(
b1,
c1))
Types:
rw :: Val:Op → Val:Op → Val:Op
Val :: Val:Op
Op :: Val:Op → Val:Op → Val:Op
rewrite :: Val:Op → Val:Op
rw[Let] :: Val:Op → Val:Op → Val:Op → Val:Op
second :: Val:Op → Val:Op
isOp :: Val:Op → False:True
False :: False:True
True :: False:True
first :: Val:Op → Val:Op
assrewrite :: Val:Op → Val:Op
rw[Let][Let] :: Val:Op → Val:Op → Val:Op → Val:Op
rw[Let][Let][Let] :: Val:Op → Val:Op → Val:Op → Val:Op
hole_Val:Op1_0 :: Val:Op
hole_False:True2_0 :: False:True
gen_Val:Op3_0 :: Nat → Val:Op
Lemmas:
rewrite(gen_Val:Op3_0(n5_0)) → gen_Val:Op3_0(n5_0), rt ∈ Ω(1 + n50)
Generator Equations:
gen_Val:Op3_0(0) ⇔ Val
gen_Val:Op3_0(+(x, 1)) ⇔ Op(Val, gen_Val:Op3_0(x))
No more defined symbols left to analyse.
(17) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
rewrite(gen_Val:Op3_0(n5_0)) → gen_Val:Op3_0(n5_0), rt ∈ Ω(1 + n50)
(18) BOUNDS(n^1, INF)