Runtime Complexity TRS:
The TRS R consists of the following rules:

duplicate(Cons(x, xs)) → Cons(x, Cons(x, duplicate(xs)))
duplicate(Nil) → Nil
goal(x) → duplicate(x)

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


Runtime Complexity TRS:
The TRS R consists of the following rules:


duplicate'(Cons'(x, xs)) → Cons'(x, Cons'(x, duplicate'(xs)))
duplicate'(Nil') → Nil'
goal'(x) → duplicate'(x)

Rewrite Strategy: INNERMOST


Sliced the following arguments:
Cons'/0


Runtime Complexity TRS:
The TRS R consists of the following rules:


duplicate'(Cons'(xs)) → Cons'(Cons'(duplicate'(xs)))
duplicate'(Nil') → Nil'
goal'(x) → duplicate'(x)

Rewrite Strategy: INNERMOST


Infered types.


Rules:
duplicate'(Cons'(xs)) → Cons'(Cons'(duplicate'(xs)))
duplicate'(Nil') → Nil'
goal'(x) → duplicate'(x)

Types:
duplicate' :: Cons':Nil' → Cons':Nil'
Cons' :: Cons':Nil' → Cons':Nil'
Nil' :: Cons':Nil'
goal' :: 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:
duplicate'


Rules:
duplicate'(Cons'(xs)) → Cons'(Cons'(duplicate'(xs)))
duplicate'(Nil') → Nil'
goal'(x) → duplicate'(x)

Types:
duplicate' :: Cons':Nil' → Cons':Nil'
Cons' :: Cons':Nil' → Cons':Nil'
Nil' :: Cons':Nil'
goal' :: 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:
duplicate'


Proved the following rewrite lemma:
duplicate'(_gen_Cons':Nil'2(_n4)) → _gen_Cons':Nil'2(*(2, _n4)), rt ∈ Ω(1 + n4)

Induction Base:
duplicate'(_gen_Cons':Nil'2(0)) →RΩ(1)
Nil'

Induction Step:
duplicate'(_gen_Cons':Nil'2(+(_$n5, 1))) →RΩ(1)
Cons'(Cons'(duplicate'(_gen_Cons':Nil'2(_$n5)))) →IH
Cons'(Cons'(_gen_Cons':Nil'2(*(2, _$n5))))

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


Rules:
duplicate'(Cons'(xs)) → Cons'(Cons'(duplicate'(xs)))
duplicate'(Nil') → Nil'
goal'(x) → duplicate'(x)

Types:
duplicate' :: Cons':Nil' → Cons':Nil'
Cons' :: Cons':Nil' → Cons':Nil'
Nil' :: Cons':Nil'
goal' :: Cons':Nil' → Cons':Nil'
_hole_Cons':Nil'1 :: Cons':Nil'
_gen_Cons':Nil'2 :: Nat → Cons':Nil'

Lemmas:
duplicate'(_gen_Cons':Nil'2(_n4)) → _gen_Cons':Nil'2(*(2, _n4)), 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:
duplicate'(_gen_Cons':Nil'2(_n4)) → _gen_Cons':Nil'2(*(2, _n4)), rt ∈ Ω(1 + n4)