(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
int(0, 0) → .(0, nil)
int(0, s(y)) → .(0, int(s(0), s(y)))
int(s(x), 0) → nil
int(s(x), s(y)) → int_list(int(x, y))
int_list(nil) → nil
int_list(.(x, y)) → .(s(x), int_list(y))
Rewrite Strategy: FULL
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
int(0, s(y)) →+ .(0, int_list(int(0, y)))
gives rise to a decreasing loop by considering the right hand sides subterm at position [1,0].
The pumping substitution is [y / s(y)].
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:
int(0', 0') → .(0', nil)
int(0', s(y)) → .(0', int(s(0'), s(y)))
int(s(x), 0') → nil
int(s(x), s(y)) → int_list(int(x, y))
int_list(nil) → nil
int_list(.(x, y)) → .(s(x), int_list(y))
S is empty.
Rewrite Strategy: FULL
(5) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
./0
(6) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
int(0', 0') → .(nil)
int(0', s(y)) → .(int(s(0'), s(y)))
int(s(x), 0') → nil
int(s(x), s(y)) → int_list(int(x, y))
int_list(nil) → nil
int_list(.(y)) → .(int_list(y))
S is empty.
Rewrite Strategy: FULL
(7) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(8) Obligation:
TRS:
Rules:
int(0', 0') → .(nil)
int(0', s(y)) → .(int(s(0'), s(y)))
int(s(x), 0') → nil
int(s(x), s(y)) → int_list(int(x, y))
int_list(nil) → nil
int_list(.(y)) → .(int_list(y))
Types:
int :: 0':s → 0':s → nil:.
0' :: 0':s
. :: nil:. → nil:.
nil :: nil:.
s :: 0':s → 0':s
int_list :: nil:. → nil:.
hole_nil:.1_0 :: nil:.
hole_0':s2_0 :: 0':s
gen_nil:.3_0 :: Nat → nil:.
gen_0':s4_0 :: Nat → 0':s
(9) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
int,
int_listThey will be analysed ascendingly in the following order:
int_list < int
(10) Obligation:
TRS:
Rules:
int(
0',
0') →
.(
nil)
int(
0',
s(
y)) →
.(
int(
s(
0'),
s(
y)))
int(
s(
x),
0') →
nilint(
s(
x),
s(
y)) →
int_list(
int(
x,
y))
int_list(
nil) →
nilint_list(
.(
y)) →
.(
int_list(
y))
Types:
int :: 0':s → 0':s → nil:.
0' :: 0':s
. :: nil:. → nil:.
nil :: nil:.
s :: 0':s → 0':s
int_list :: nil:. → nil:.
hole_nil:.1_0 :: nil:.
hole_0':s2_0 :: 0':s
gen_nil:.3_0 :: Nat → nil:.
gen_0':s4_0 :: Nat → 0':s
Generator Equations:
gen_nil:.3_0(0) ⇔ nil
gen_nil:.3_0(+(x, 1)) ⇔ .(gen_nil:.3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
int_list, int
They will be analysed ascendingly in the following order:
int_list < int
(11) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
int_list(
gen_nil:.3_0(
n6_0)) →
gen_nil:.3_0(
n6_0), rt ∈ Ω(1 + n6
0)
Induction Base:
int_list(gen_nil:.3_0(0)) →RΩ(1)
nil
Induction Step:
int_list(gen_nil:.3_0(+(n6_0, 1))) →RΩ(1)
.(int_list(gen_nil:.3_0(n6_0))) →IH
.(gen_nil:.3_0(c7_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(12) Complex Obligation (BEST)
(13) Obligation:
TRS:
Rules:
int(
0',
0') →
.(
nil)
int(
0',
s(
y)) →
.(
int(
s(
0'),
s(
y)))
int(
s(
x),
0') →
nilint(
s(
x),
s(
y)) →
int_list(
int(
x,
y))
int_list(
nil) →
nilint_list(
.(
y)) →
.(
int_list(
y))
Types:
int :: 0':s → 0':s → nil:.
0' :: 0':s
. :: nil:. → nil:.
nil :: nil:.
s :: 0':s → 0':s
int_list :: nil:. → nil:.
hole_nil:.1_0 :: nil:.
hole_0':s2_0 :: 0':s
gen_nil:.3_0 :: Nat → nil:.
gen_0':s4_0 :: Nat → 0':s
Lemmas:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
Generator Equations:
gen_nil:.3_0(0) ⇔ nil
gen_nil:.3_0(+(x, 1)) ⇔ .(gen_nil:.3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
The following defined symbols remain to be analysed:
int
(14) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
int(
gen_0':s4_0(
n184_0),
gen_0':s4_0(
n184_0)) →
gen_nil:.3_0(
1), rt ∈ Ω(1 + n184
0)
Induction Base:
int(gen_0':s4_0(0), gen_0':s4_0(0)) →RΩ(1)
.(nil)
Induction Step:
int(gen_0':s4_0(+(n184_0, 1)), gen_0':s4_0(+(n184_0, 1))) →RΩ(1)
int_list(int(gen_0':s4_0(n184_0), gen_0':s4_0(n184_0))) →IH
int_list(gen_nil:.3_0(1)) →LΩ(2)
gen_nil:.3_0(1)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(15) Complex Obligation (BEST)
(16) Obligation:
TRS:
Rules:
int(
0',
0') →
.(
nil)
int(
0',
s(
y)) →
.(
int(
s(
0'),
s(
y)))
int(
s(
x),
0') →
nilint(
s(
x),
s(
y)) →
int_list(
int(
x,
y))
int_list(
nil) →
nilint_list(
.(
y)) →
.(
int_list(
y))
Types:
int :: 0':s → 0':s → nil:.
0' :: 0':s
. :: nil:. → nil:.
nil :: nil:.
s :: 0':s → 0':s
int_list :: nil:. → nil:.
hole_nil:.1_0 :: nil:.
hole_0':s2_0 :: 0':s
gen_nil:.3_0 :: Nat → nil:.
gen_0':s4_0 :: Nat → 0':s
Lemmas:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
int(gen_0':s4_0(n184_0), gen_0':s4_0(n184_0)) → gen_nil:.3_0(1), rt ∈ Ω(1 + n1840)
Generator Equations:
gen_nil:.3_0(0) ⇔ nil
gen_nil:.3_0(+(x, 1)) ⇔ .(gen_nil:.3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
No more defined symbols left to analyse.
(17) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
(18) BOUNDS(n^1, INF)
(19) Obligation:
TRS:
Rules:
int(
0',
0') →
.(
nil)
int(
0',
s(
y)) →
.(
int(
s(
0'),
s(
y)))
int(
s(
x),
0') →
nilint(
s(
x),
s(
y)) →
int_list(
int(
x,
y))
int_list(
nil) →
nilint_list(
.(
y)) →
.(
int_list(
y))
Types:
int :: 0':s → 0':s → nil:.
0' :: 0':s
. :: nil:. → nil:.
nil :: nil:.
s :: 0':s → 0':s
int_list :: nil:. → nil:.
hole_nil:.1_0 :: nil:.
hole_0':s2_0 :: 0':s
gen_nil:.3_0 :: Nat → nil:.
gen_0':s4_0 :: Nat → 0':s
Lemmas:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
int(gen_0':s4_0(n184_0), gen_0':s4_0(n184_0)) → gen_nil:.3_0(1), rt ∈ Ω(1 + n1840)
Generator Equations:
gen_nil:.3_0(0) ⇔ nil
gen_nil:.3_0(+(x, 1)) ⇔ .(gen_nil:.3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
No more defined symbols left to analyse.
(20) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
(21) BOUNDS(n^1, INF)
(22) Obligation:
TRS:
Rules:
int(
0',
0') →
.(
nil)
int(
0',
s(
y)) →
.(
int(
s(
0'),
s(
y)))
int(
s(
x),
0') →
nilint(
s(
x),
s(
y)) →
int_list(
int(
x,
y))
int_list(
nil) →
nilint_list(
.(
y)) →
.(
int_list(
y))
Types:
int :: 0':s → 0':s → nil:.
0' :: 0':s
. :: nil:. → nil:.
nil :: nil:.
s :: 0':s → 0':s
int_list :: nil:. → nil:.
hole_nil:.1_0 :: nil:.
hole_0':s2_0 :: 0':s
gen_nil:.3_0 :: Nat → nil:.
gen_0':s4_0 :: Nat → 0':s
Lemmas:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
Generator Equations:
gen_nil:.3_0(0) ⇔ nil
gen_nil:.3_0(+(x, 1)) ⇔ .(gen_nil:.3_0(x))
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
No more defined symbols left to analyse.
(23) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
int_list(gen_nil:.3_0(n6_0)) → gen_nil:.3_0(n6_0), rt ∈ Ω(1 + n60)
(24) BOUNDS(n^1, INF)