(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
admit(x, nil) → nil
admit(x, .(u, .(v, .(w, z)))) → cond(=(sum(x, u, v), w), .(u, .(v, .(w, admit(carry(x, u, v), z)))))
cond(true, y) → 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:
admit(x, nil) → nil
admit(x, .(u, .(v, .(w, z)))) → cond(='(sum(x, u, v), w), .(u, .(v, .(w, admit(carry(x, u, v), z)))))
cond(true, y) → y
S is empty.
Rewrite Strategy: FULL
(3) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
admit/0
='/0
='/1
sum/0
sum/1
sum/2
carry/0
carry/1
carry/2
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
admit(nil) → nil
admit(.(u, .(v, .(w, z)))) → cond(=', .(u, .(v, .(w, admit(z)))))
cond(true, y) → y
S is empty.
Rewrite Strategy: FULL
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
TRS:
Rules:
admit(nil) → nil
admit(.(u, .(v, .(w, z)))) → cond(=', .(u, .(v, .(w, admit(z)))))
cond(true, y) → y
Types:
admit :: nil:. → nil:.
nil :: nil:.
. :: w → nil:. → nil:.
w :: w
cond :: =':true → nil:. → nil:.
=' :: =':true
true :: =':true
hole_nil:.1_0 :: nil:.
hole_w2_0 :: w
hole_=':true3_0 :: =':true
gen_nil:.4_0 :: Nat → nil:.
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
admit
(8) Obligation:
TRS:
Rules:
admit(
nil) →
niladmit(
.(
u,
.(
v,
.(
w,
z)))) →
cond(
=',
.(
u,
.(
v,
.(
w,
admit(
z)))))
cond(
true,
y) →
yTypes:
admit :: nil:. → nil:.
nil :: nil:.
. :: w → nil:. → nil:.
w :: w
cond :: =':true → nil:. → nil:.
=' :: =':true
true :: =':true
hole_nil:.1_0 :: nil:.
hole_w2_0 :: w
hole_=':true3_0 :: =':true
gen_nil:.4_0 :: Nat → nil:.
Generator Equations:
gen_nil:.4_0(0) ⇔ nil
gen_nil:.4_0(+(x, 1)) ⇔ .(w, gen_nil:.4_0(x))
The following defined symbols remain to be analysed:
admit
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
admit(
gen_nil:.4_0(
+(
3,
*(
3,
n6_0)))) →
*5_0, rt ∈ Ω(n6
0)
Induction Base:
admit(gen_nil:.4_0(+(3, *(3, 0))))
Induction Step:
admit(gen_nil:.4_0(+(3, *(3, +(n6_0, 1))))) →RΩ(1)
cond(=', .(w, .(w, .(w, admit(gen_nil:.4_0(+(3, *(3, n6_0)))))))) →IH
cond(=', .(w, .(w, .(w, *5_0))))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
TRS:
Rules:
admit(
nil) →
niladmit(
.(
u,
.(
v,
.(
w,
z)))) →
cond(
=',
.(
u,
.(
v,
.(
w,
admit(
z)))))
cond(
true,
y) →
yTypes:
admit :: nil:. → nil:.
nil :: nil:.
. :: w → nil:. → nil:.
w :: w
cond :: =':true → nil:. → nil:.
=' :: =':true
true :: =':true
hole_nil:.1_0 :: nil:.
hole_w2_0 :: w
hole_=':true3_0 :: =':true
gen_nil:.4_0 :: Nat → nil:.
Lemmas:
admit(gen_nil:.4_0(+(3, *(3, n6_0)))) → *5_0, rt ∈ Ω(n60)
Generator Equations:
gen_nil:.4_0(0) ⇔ nil
gen_nil:.4_0(+(x, 1)) ⇔ .(w, gen_nil:.4_0(x))
No more defined symbols left to analyse.
(12) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
admit(gen_nil:.4_0(+(3, *(3, n6_0)))) → *5_0, rt ∈ Ω(n60)
(13) BOUNDS(n^1, INF)
(14) Obligation:
TRS:
Rules:
admit(
nil) →
niladmit(
.(
u,
.(
v,
.(
w,
z)))) →
cond(
=',
.(
u,
.(
v,
.(
w,
admit(
z)))))
cond(
true,
y) →
yTypes:
admit :: nil:. → nil:.
nil :: nil:.
. :: w → nil:. → nil:.
w :: w
cond :: =':true → nil:. → nil:.
=' :: =':true
true :: =':true
hole_nil:.1_0 :: nil:.
hole_w2_0 :: w
hole_=':true3_0 :: =':true
gen_nil:.4_0 :: Nat → nil:.
Lemmas:
admit(gen_nil:.4_0(+(3, *(3, n6_0)))) → *5_0, rt ∈ Ω(n60)
Generator Equations:
gen_nil:.4_0(0) ⇔ nil
gen_nil:.4_0(+(x, 1)) ⇔ .(w, gen_nil:.4_0(x))
No more defined symbols left to analyse.
(15) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
admit(gen_nil:.4_0(+(3, *(3, n6_0)))) → *5_0, rt ∈ Ω(n60)
(16) BOUNDS(n^1, INF)