Runtime Complexity TRS:
The TRS R consists of the following rules:
append(Cons(x, xs), ys) → Cons(x, append(xs, ys))
append(Nil, ys) → ys
goal(x, y) → append(x, y)
Renamed function symbols to avoid clashes with predefined symbol.
Runtime Complexity TRS:
The TRS R consists of the following rules:
append'(Cons'(x, xs), ys) → Cons'(x, append'(xs, ys))
append'(Nil', ys) → ys
goal'(x, y) → append'(x, y)
Sliced the following arguments:
Cons'/0
Runtime Complexity TRS:
The TRS R consists of the following rules:
append'(Cons'(xs), ys) → Cons'(append'(xs, ys))
append'(Nil', ys) → ys
goal'(x, y) → append'(x, y)
Infered types.
Rules:
append'(Cons'(xs), ys) → Cons'(append'(xs, ys))
append'(Nil', ys) → ys
goal'(x, y) → append'(x, y)
Types:
append' :: Cons':Nil' → Cons':Nil' → Cons':Nil'
Cons' :: Cons':Nil' → Cons':Nil'
Nil' :: Cons':Nil'
goal' :: Cons':Nil' → Cons':Nil' → Cons':Nil'
_hole_Cons':Nil'1 :: Cons':Nil'
_gen_Cons':Nil'2 :: Nat → Cons':Nil'
Heuristically decided to analyse the following defined symbols:
append'
Rules:
append'(Cons'(xs), ys) → Cons'(append'(xs, ys))
append'(Nil', ys) → ys
goal'(x, y) → append'(x, y)
Types:
append' :: Cons':Nil' → Cons':Nil' → Cons':Nil'
Cons' :: Cons':Nil' → Cons':Nil'
Nil' :: Cons':Nil'
goal' :: Cons':Nil' → Cons':Nil' → Cons':Nil'
_hole_Cons':Nil'1 :: Cons':Nil'
_gen_Cons':Nil'2 :: Nat → Cons':Nil'
Generator Equations:
_gen_Cons':Nil'2(0) ⇔ Nil'
_gen_Cons':Nil'2(+(x, 1)) ⇔ Cons'(_gen_Cons':Nil'2(x))
The following defined symbols remain to be analysed:
append'
Proved the following rewrite lemma:
append'(_gen_Cons':Nil'2(_n4), _gen_Cons':Nil'2(b)) → _gen_Cons':Nil'2(+(_n4, b)), rt ∈ Ω(1 + n4)
Induction Base:
append'(_gen_Cons':Nil'2(0), _gen_Cons':Nil'2(b)) →RΩ(1)
_gen_Cons':Nil'2(b)
Induction Step:
append'(_gen_Cons':Nil'2(+(_$n5, 1)), _gen_Cons':Nil'2(_b139)) →RΩ(1)
Cons'(append'(_gen_Cons':Nil'2(_$n5), _gen_Cons':Nil'2(_b139))) →IH
Cons'(_gen_Cons':Nil'2(+(_$n5, _b139)))
We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
Rules:
append'(Cons'(xs), ys) → Cons'(append'(xs, ys))
append'(Nil', ys) → ys
goal'(x, y) → append'(x, y)
Types:
append' :: Cons':Nil' → Cons':Nil' → Cons':Nil'
Cons' :: Cons':Nil' → Cons':Nil'
Nil' :: Cons':Nil'
goal' :: Cons':Nil' → Cons':Nil' → Cons':Nil'
_hole_Cons':Nil'1 :: Cons':Nil'
_gen_Cons':Nil'2 :: Nat → Cons':Nil'
Lemmas:
append'(_gen_Cons':Nil'2(_n4), _gen_Cons':Nil'2(b)) → _gen_Cons':Nil'2(+(_n4, b)), rt ∈ Ω(1 + n4)
Generator Equations:
_gen_Cons':Nil'2(0) ⇔ Nil'
_gen_Cons':Nil'2(+(x, 1)) ⇔ Cons'(_gen_Cons':Nil'2(x))
No more defined symbols left to analyse.
The lowerbound Ω(n) was proven with the following lemma:
append'(_gen_Cons':Nil'2(_n4), _gen_Cons':Nil'2(b)) → _gen_Cons':Nil'2(+(_n4, b)), rt ∈ Ω(1 + n4)