### (0) Obligation:

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

double(0) → 0
double(s(x)) → s(s(double(x)))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
first(nil) → 0
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

Rewrite Strategy: FULL

### (1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
double(s(x)) →+ s(s(double(x)))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0,0].
The pumping substitution is [x / s(x)].
The result substitution is [ ].

### (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:

double(0') → 0'
double(s(x)) → s(s(double(x)))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
eq(0', 0') → true
eq(0', s(y)) → false
eq(s(x), 0') → false
eq(s(x), s(y)) → eq(x, y)
first(nil) → 0'
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

S is empty.
Rewrite Strategy: FULL

Infered types.

### (6) Obligation:

TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
eq(0', 0') → true
eq(0', s(y)) → false
eq(s(x), 0') → false
eq(s(x), s(y)) → eq(x, y)
first(nil) → 0'
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
del :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons
eq :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
first :: nil:cons → 0':s
doublelist :: nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons

### (7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
double, del, eq, doublelist

They will be analysed ascendingly in the following order:
double < doublelist
eq < del
del < doublelist

### (8) Obligation:

TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
eq(0', 0') → true
eq(0', s(y)) → false
eq(s(x), 0') → false
eq(s(x), s(y)) → eq(x, y)
first(nil) → 0'
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
del :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons
eq :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
first :: nil:cons → 0':s
doublelist :: nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))

The following defined symbols remain to be analysed:
double, del, eq, doublelist

They will be analysed ascendingly in the following order:
double < doublelist
eq < del
del < doublelist

### (9) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
double(gen_0':s4_0(n7_0)) → gen_0':s4_0(*(2, n7_0)), rt ∈ Ω(1 + n70)

Induction Base:
double(gen_0':s4_0(0)) →RΩ(1)
0'

Induction Step:
double(gen_0':s4_0(+(n7_0, 1))) →RΩ(1)
s(s(double(gen_0':s4_0(n7_0)))) →IH
s(s(gen_0':s4_0(*(2, c8_0))))

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

### (11) Obligation:

TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
eq(0', 0') → true
eq(0', s(y)) → false
eq(s(x), 0') → false
eq(s(x), s(y)) → eq(x, y)
first(nil) → 0'
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
del :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons
eq :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
first :: nil:cons → 0':s
doublelist :: nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons

Lemmas:
double(gen_0':s4_0(n7_0)) → gen_0':s4_0(*(2, n7_0)), rt ∈ Ω(1 + n70)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))

The following defined symbols remain to be analysed:
eq, del, doublelist

They will be analysed ascendingly in the following order:
eq < del
del < doublelist

### (12) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
eq(gen_0':s4_0(n275_0), gen_0':s4_0(n275_0)) → true, rt ∈ Ω(1 + n2750)

Induction Base:
eq(gen_0':s4_0(0), gen_0':s4_0(0)) →RΩ(1)
true

Induction Step:
eq(gen_0':s4_0(+(n275_0, 1)), gen_0':s4_0(+(n275_0, 1))) →RΩ(1)
eq(gen_0':s4_0(n275_0), gen_0':s4_0(n275_0)) →IH
true

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

### (14) Obligation:

TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
eq(0', 0') → true
eq(0', s(y)) → false
eq(s(x), 0') → false
eq(s(x), s(y)) → eq(x, y)
first(nil) → 0'
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
del :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons
eq :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
first :: nil:cons → 0':s
doublelist :: nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons

Lemmas:
double(gen_0':s4_0(n7_0)) → gen_0':s4_0(*(2, n7_0)), rt ∈ Ω(1 + n70)
eq(gen_0':s4_0(n275_0), gen_0':s4_0(n275_0)) → true, rt ∈ Ω(1 + n2750)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))

The following defined symbols remain to be analysed:
del, doublelist

They will be analysed ascendingly in the following order:
del < doublelist

### (15) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol del.

### (16) Obligation:

TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
eq(0', 0') → true
eq(0', s(y)) → false
eq(s(x), 0') → false
eq(s(x), s(y)) → eq(x, y)
first(nil) → 0'
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
del :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons
eq :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
first :: nil:cons → 0':s
doublelist :: nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons

Lemmas:
double(gen_0':s4_0(n7_0)) → gen_0':s4_0(*(2, n7_0)), rt ∈ Ω(1 + n70)
eq(gen_0':s4_0(n275_0), gen_0':s4_0(n275_0)) → true, rt ∈ Ω(1 + n2750)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))

The following defined symbols remain to be analysed:
doublelist

### (17) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
doublelist(gen_nil:cons5_0(n976_0)) → gen_nil:cons5_0(n976_0), rt ∈ Ω(1 + n9760)

Induction Base:
doublelist(gen_nil:cons5_0(0)) →RΩ(1)
nil

Induction Step:
doublelist(gen_nil:cons5_0(+(n976_0, 1))) →RΩ(1)
cons(double(0'), doublelist(del(first(cons(0', gen_nil:cons5_0(n976_0))), cons(0', gen_nil:cons5_0(n976_0))))) →LΩ(1)
cons(gen_0':s4_0(*(2, 0)), doublelist(del(first(cons(0', gen_nil:cons5_0(n976_0))), cons(0', gen_nil:cons5_0(n976_0))))) →RΩ(1)
cons(gen_0':s4_0(0), doublelist(del(0', cons(0', gen_nil:cons5_0(n976_0))))) →RΩ(1)
cons(gen_0':s4_0(0), doublelist(if(eq(0', 0'), 0', 0', gen_nil:cons5_0(n976_0)))) →LΩ(1)
cons(gen_0':s4_0(0), doublelist(if(true, 0', 0', gen_nil:cons5_0(n976_0)))) →RΩ(1)
cons(gen_0':s4_0(0), doublelist(gen_nil:cons5_0(n976_0))) →IH
cons(gen_0':s4_0(0), gen_nil:cons5_0(c977_0))

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

### (19) Obligation:

TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
eq(0', 0') → true
eq(0', s(y)) → false
eq(s(x), 0') → false
eq(s(x), s(y)) → eq(x, y)
first(nil) → 0'
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
del :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons
eq :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
first :: nil:cons → 0':s
doublelist :: nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons

Lemmas:
double(gen_0':s4_0(n7_0)) → gen_0':s4_0(*(2, n7_0)), rt ∈ Ω(1 + n70)
eq(gen_0':s4_0(n275_0), gen_0':s4_0(n275_0)) → true, rt ∈ Ω(1 + n2750)
doublelist(gen_nil:cons5_0(n976_0)) → gen_nil:cons5_0(n976_0), rt ∈ Ω(1 + n9760)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))

No more defined symbols left to analyse.

### (20) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s4_0(n7_0)) → gen_0':s4_0(*(2, n7_0)), rt ∈ Ω(1 + n70)

### (22) Obligation:

TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
eq(0', 0') → true
eq(0', s(y)) → false
eq(s(x), 0') → false
eq(s(x), s(y)) → eq(x, y)
first(nil) → 0'
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
del :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons
eq :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
first :: nil:cons → 0':s
doublelist :: nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons

Lemmas:
double(gen_0':s4_0(n7_0)) → gen_0':s4_0(*(2, n7_0)), rt ∈ Ω(1 + n70)
eq(gen_0':s4_0(n275_0), gen_0':s4_0(n275_0)) → true, rt ∈ Ω(1 + n2750)
doublelist(gen_nil:cons5_0(n976_0)) → gen_nil:cons5_0(n976_0), rt ∈ Ω(1 + n9760)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))

No more defined symbols left to analyse.

### (23) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s4_0(n7_0)) → gen_0':s4_0(*(2, n7_0)), rt ∈ Ω(1 + n70)

### (25) Obligation:

TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
eq(0', 0') → true
eq(0', s(y)) → false
eq(s(x), 0') → false
eq(s(x), s(y)) → eq(x, y)
first(nil) → 0'
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
del :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons
eq :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
first :: nil:cons → 0':s
doublelist :: nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons

Lemmas:
double(gen_0':s4_0(n7_0)) → gen_0':s4_0(*(2, n7_0)), rt ∈ Ω(1 + n70)
eq(gen_0':s4_0(n275_0), gen_0':s4_0(n275_0)) → true, rt ∈ Ω(1 + n2750)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))

No more defined symbols left to analyse.

### (26) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s4_0(n7_0)) → gen_0':s4_0(*(2, n7_0)), rt ∈ Ω(1 + n70)

### (28) Obligation:

TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
eq(0', 0') → true
eq(0', s(y)) → false
eq(s(x), 0') → false
eq(s(x), s(y)) → eq(x, y)
first(nil) → 0'
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
del :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons
eq :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
first :: nil:cons → 0':s
doublelist :: nil:cons → nil:cons
hole_0':s1_0 :: 0':s
hole_nil:cons2_0 :: nil:cons
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_nil:cons5_0 :: Nat → nil:cons

Lemmas:
double(gen_0':s4_0(n7_0)) → gen_0':s4_0(*(2, n7_0)), rt ∈ Ω(1 + n70)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(0', gen_nil:cons5_0(x))

No more defined symbols left to analyse.

### (29) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s4_0(n7_0)) → gen_0':s4_0(*(2, n7_0)), rt ∈ Ω(1 + n70)