Runtime Complexity TRS:
The TRS R consists of the following rules:
a__from(X) → cons(mark(X), from(s(X)))
a__length(nil) → 0
a__length(cons(X, Y)) → s(a__length1(Y))
a__length1(X) → a__length(X)
mark(from(X)) → a__from(mark(X))
mark(length(X)) → a__length(X)
mark(length1(X)) → a__length1(X)
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
mark(nil) → nil
mark(0) → 0
a__from(X) → from(X)
a__length(X) → length(X)
a__length1(X) → length1(X)
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
a__from'(X) → cons'(mark'(X), from'(s'(X)))
a__length'(nil') → 0'
a__length'(cons'(X, Y)) → s'(a__length1'(Y))
a__length1'(X) → a__length'(X)
mark'(from'(X)) → a__from'(mark'(X))
mark'(length'(X)) → a__length'(X)
mark'(length1'(X)) → a__length1'(X)
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(s'(X)) → s'(mark'(X))
mark'(nil') → nil'
mark'(0') → 0'
a__from'(X) → from'(X)
a__length'(X) → length'(X)
a__length1'(X) → length1'(X)
Infered types.
Rules:
a__from'(X) → cons'(mark'(X), from'(s'(X)))
a__length'(nil') → 0'
a__length'(cons'(X, Y)) → s'(a__length1'(Y))
a__length1'(X) → a__length'(X)
mark'(from'(X)) → a__from'(mark'(X))
mark'(length'(X)) → a__length'(X)
mark'(length1'(X)) → a__length1'(X)
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(s'(X)) → s'(mark'(X))
mark'(nil') → nil'
mark'(0') → 0'
a__from'(X) → from'(X)
a__length'(X) → length'(X)
a__length1'(X) → length1'(X)
Types:
a__from' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
cons' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
mark' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
from' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
s' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
a__length' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
nil' :: s':from':cons':nil':0':length':length1'
0' :: s':from':cons':nil':0':length':length1'
a__length1' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
length' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
length1' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
_hole_s':from':cons':nil':0':length':length1'1 :: s':from':cons':nil':0':length':length1'
_gen_s':from':cons':nil':0':length':length1'2 :: Nat → s':from':cons':nil':0':length':length1'
Heuristically decided to analyse the following defined symbols:
a__from', mark', a__length', a__length1'
They will be analysed ascendingly in the following order:
a__from' = mark'
a__length' < mark'
a__length1' < mark'
a__length' = a__length1'
Rules:
a__from'(X) → cons'(mark'(X), from'(s'(X)))
a__length'(nil') → 0'
a__length'(cons'(X, Y)) → s'(a__length1'(Y))
a__length1'(X) → a__length'(X)
mark'(from'(X)) → a__from'(mark'(X))
mark'(length'(X)) → a__length'(X)
mark'(length1'(X)) → a__length1'(X)
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(s'(X)) → s'(mark'(X))
mark'(nil') → nil'
mark'(0') → 0'
a__from'(X) → from'(X)
a__length'(X) → length'(X)
a__length1'(X) → length1'(X)
Types:
a__from' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
cons' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
mark' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
from' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
s' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
a__length' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
nil' :: s':from':cons':nil':0':length':length1'
0' :: s':from':cons':nil':0':length':length1'
a__length1' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
length' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
length1' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
_hole_s':from':cons':nil':0':length':length1'1 :: s':from':cons':nil':0':length':length1'
_gen_s':from':cons':nil':0':length':length1'2 :: Nat → s':from':cons':nil':0':length':length1'
Generator Equations:
_gen_s':from':cons':nil':0':length':length1'2(0) ⇔ nil'
_gen_s':from':cons':nil':0':length':length1'2(+(x, 1)) ⇔ cons'(_gen_s':from':cons':nil':0':length':length1'2(x), nil')
The following defined symbols remain to be analysed:
a__length1', a__from', mark', a__length'
They will be analysed ascendingly in the following order:
a__from' = mark'
a__length' < mark'
a__length1' < mark'
a__length' = a__length1'
Could not prove a rewrite lemma for the defined symbol a__length1'.
Rules:
a__from'(X) → cons'(mark'(X), from'(s'(X)))
a__length'(nil') → 0'
a__length'(cons'(X, Y)) → s'(a__length1'(Y))
a__length1'(X) → a__length'(X)
mark'(from'(X)) → a__from'(mark'(X))
mark'(length'(X)) → a__length'(X)
mark'(length1'(X)) → a__length1'(X)
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(s'(X)) → s'(mark'(X))
mark'(nil') → nil'
mark'(0') → 0'
a__from'(X) → from'(X)
a__length'(X) → length'(X)
a__length1'(X) → length1'(X)
Types:
a__from' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
cons' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
mark' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
from' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
s' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
a__length' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
nil' :: s':from':cons':nil':0':length':length1'
0' :: s':from':cons':nil':0':length':length1'
a__length1' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
length' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
length1' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
_hole_s':from':cons':nil':0':length':length1'1 :: s':from':cons':nil':0':length':length1'
_gen_s':from':cons':nil':0':length':length1'2 :: Nat → s':from':cons':nil':0':length':length1'
Generator Equations:
_gen_s':from':cons':nil':0':length':length1'2(0) ⇔ nil'
_gen_s':from':cons':nil':0':length':length1'2(+(x, 1)) ⇔ cons'(_gen_s':from':cons':nil':0':length':length1'2(x), nil')
The following defined symbols remain to be analysed:
a__length', a__from', mark'
They will be analysed ascendingly in the following order:
a__from' = mark'
a__length' < mark'
a__length1' < mark'
a__length' = a__length1'
Could not prove a rewrite lemma for the defined symbol a__length'.
Rules:
a__from'(X) → cons'(mark'(X), from'(s'(X)))
a__length'(nil') → 0'
a__length'(cons'(X, Y)) → s'(a__length1'(Y))
a__length1'(X) → a__length'(X)
mark'(from'(X)) → a__from'(mark'(X))
mark'(length'(X)) → a__length'(X)
mark'(length1'(X)) → a__length1'(X)
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(s'(X)) → s'(mark'(X))
mark'(nil') → nil'
mark'(0') → 0'
a__from'(X) → from'(X)
a__length'(X) → length'(X)
a__length1'(X) → length1'(X)
Types:
a__from' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
cons' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
mark' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
from' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
s' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
a__length' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
nil' :: s':from':cons':nil':0':length':length1'
0' :: s':from':cons':nil':0':length':length1'
a__length1' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
length' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
length1' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
_hole_s':from':cons':nil':0':length':length1'1 :: s':from':cons':nil':0':length':length1'
_gen_s':from':cons':nil':0':length':length1'2 :: Nat → s':from':cons':nil':0':length':length1'
Generator Equations:
_gen_s':from':cons':nil':0':length':length1'2(0) ⇔ nil'
_gen_s':from':cons':nil':0':length':length1'2(+(x, 1)) ⇔ cons'(_gen_s':from':cons':nil':0':length':length1'2(x), nil')
The following defined symbols remain to be analysed:
mark', a__from'
They will be analysed ascendingly in the following order:
a__from' = mark'
Proved the following rewrite lemma:
mark'(_gen_s':from':cons':nil':0':length':length1'2(_n109)) → _gen_s':from':cons':nil':0':length':length1'2(_n109), rt ∈ Ω(1 + n109)
Induction Base:
mark'(_gen_s':from':cons':nil':0':length':length1'2(0)) →RΩ(1)
nil'
Induction Step:
mark'(_gen_s':from':cons':nil':0':length':length1'2(+(_$n110, 1))) →RΩ(1)
cons'(mark'(_gen_s':from':cons':nil':0':length':length1'2(_$n110)), nil') →IH
cons'(_gen_s':from':cons':nil':0':length':length1'2(_$n110), nil')
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
a__from'(X) → cons'(mark'(X), from'(s'(X)))
a__length'(nil') → 0'
a__length'(cons'(X, Y)) → s'(a__length1'(Y))
a__length1'(X) → a__length'(X)
mark'(from'(X)) → a__from'(mark'(X))
mark'(length'(X)) → a__length'(X)
mark'(length1'(X)) → a__length1'(X)
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(s'(X)) → s'(mark'(X))
mark'(nil') → nil'
mark'(0') → 0'
a__from'(X) → from'(X)
a__length'(X) → length'(X)
a__length1'(X) → length1'(X)
Types:
a__from' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
cons' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
mark' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
from' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
s' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
a__length' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
nil' :: s':from':cons':nil':0':length':length1'
0' :: s':from':cons':nil':0':length':length1'
a__length1' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
length' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
length1' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
_hole_s':from':cons':nil':0':length':length1'1 :: s':from':cons':nil':0':length':length1'
_gen_s':from':cons':nil':0':length':length1'2 :: Nat → s':from':cons':nil':0':length':length1'
Lemmas:
mark'(_gen_s':from':cons':nil':0':length':length1'2(_n109)) → _gen_s':from':cons':nil':0':length':length1'2(_n109), rt ∈ Ω(1 + n109)
Generator Equations:
_gen_s':from':cons':nil':0':length':length1'2(0) ⇔ nil'
_gen_s':from':cons':nil':0':length':length1'2(+(x, 1)) ⇔ cons'(_gen_s':from':cons':nil':0':length':length1'2(x), nil')
The following defined symbols remain to be analysed:
a__from'
They will be analysed ascendingly in the following order:
a__from' = mark'
Could not prove a rewrite lemma for the defined symbol a__from'.
Rules:
a__from'(X) → cons'(mark'(X), from'(s'(X)))
a__length'(nil') → 0'
a__length'(cons'(X, Y)) → s'(a__length1'(Y))
a__length1'(X) → a__length'(X)
mark'(from'(X)) → a__from'(mark'(X))
mark'(length'(X)) → a__length'(X)
mark'(length1'(X)) → a__length1'(X)
mark'(cons'(X1, X2)) → cons'(mark'(X1), X2)
mark'(s'(X)) → s'(mark'(X))
mark'(nil') → nil'
mark'(0') → 0'
a__from'(X) → from'(X)
a__length'(X) → length'(X)
a__length1'(X) → length1'(X)
Types:
a__from' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
cons' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
mark' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
from' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
s' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
a__length' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
nil' :: s':from':cons':nil':0':length':length1'
0' :: s':from':cons':nil':0':length':length1'
a__length1' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
length' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
length1' :: s':from':cons':nil':0':length':length1' → s':from':cons':nil':0':length':length1'
_hole_s':from':cons':nil':0':length':length1'1 :: s':from':cons':nil':0':length':length1'
_gen_s':from':cons':nil':0':length':length1'2 :: Nat → s':from':cons':nil':0':length':length1'
Lemmas:
mark'(_gen_s':from':cons':nil':0':length':length1'2(_n109)) → _gen_s':from':cons':nil':0':length':length1'2(_n109), rt ∈ Ω(1 + n109)
Generator Equations:
_gen_s':from':cons':nil':0':length':length1'2(0) ⇔ nil'
_gen_s':from':cons':nil':0':length':length1'2(+(x, 1)) ⇔ cons'(_gen_s':from':cons':nil':0':length':length1'2(x), nil')
No more defined symbols left to analyse.
The lowerbound Ω(n) was proven with the following lemma:
mark'(_gen_s':from':cons':nil':0':length':length1'2(_n109)) → _gen_s':from':cons':nil':0':length':length1'2(_n109), rt ∈ Ω(1 + n109)