### (0) Obligation:

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

isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0) → true
isZero(s(x)) → false
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0)) → 0
p(0) → 0
inc(s(x)) → s(inc(x))
inc(0) → s(0)
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0)

Rewrite Strategy: FULL

### (1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
p(s(s(x))) →+ s(p(s(x)))
gives rise to a decreasing loop by considering the right hand sides subterm at position [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:

isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0') → true
isZero(s(x)) → false
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0')) → 0'
p(0') → 0'
inc(s(x)) → s(inc(x))
inc(0') → s(0')
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0')

S is empty.
Rewrite Strategy: FULL

Infered types.

### (6) Obligation:

TRS:
Rules:
isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0') → true
isZero(s(x)) → false
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0')) → 0'
p(0') → 0'
inc(s(x)) → s(inc(x))
inc(0') → s(0')
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0')

Types:
isEmpty :: cons:nil → false:true
cons :: 0':s → cons:nil → cons:nil
false :: false:true
nil :: cons:nil
true :: false:true
isZero :: 0':s → false:true
0' :: 0':s
s :: 0':s → 0':s
tail :: cons:nil → cons:nil
p :: 0':s → 0':s
inc :: 0':s → 0':s
sumList :: cons:nil → 0':s → 0':s
if :: false:true → false:true → 0':s → cons:nil → cons:nil → 0':s → 0':s
sum :: cons:nil → 0':s
hole_false:true1_0 :: false:true
hole_cons:nil2_0 :: cons:nil
hole_0':s3_0 :: 0':s
gen_cons:nil4_0 :: Nat → cons:nil
gen_0':s5_0 :: Nat → 0':s

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

Heuristically decided to analyse the following defined symbols:
p, inc, sumList

They will be analysed ascendingly in the following order:
p < sumList
inc < sumList

### (8) Obligation:

TRS:
Rules:
isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0') → true
isZero(s(x)) → false
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0')) → 0'
p(0') → 0'
inc(s(x)) → s(inc(x))
inc(0') → s(0')
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0')

Types:
isEmpty :: cons:nil → false:true
cons :: 0':s → cons:nil → cons:nil
false :: false:true
nil :: cons:nil
true :: false:true
isZero :: 0':s → false:true
0' :: 0':s
s :: 0':s → 0':s
tail :: cons:nil → cons:nil
p :: 0':s → 0':s
inc :: 0':s → 0':s
sumList :: cons:nil → 0':s → 0':s
if :: false:true → false:true → 0':s → cons:nil → cons:nil → 0':s → 0':s
sum :: cons:nil → 0':s
hole_false:true1_0 :: false:true
hole_cons:nil2_0 :: cons:nil
hole_0':s3_0 :: 0':s
gen_cons:nil4_0 :: Nat → cons:nil
gen_0':s5_0 :: Nat → 0':s

Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(0', gen_cons:nil4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
p, inc, sumList

They will be analysed ascendingly in the following order:
p < sumList
inc < sumList

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

Proved the following rewrite lemma:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

Induction Base:
p(gen_0':s5_0(+(1, 0))) →RΩ(1)
0'

Induction Step:
p(gen_0':s5_0(+(1, +(n7_0, 1)))) →RΩ(1)
s(p(s(gen_0':s5_0(n7_0)))) →IH
s(gen_0':s5_0(c8_0))

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

### (11) Obligation:

TRS:
Rules:
isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0') → true
isZero(s(x)) → false
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0')) → 0'
p(0') → 0'
inc(s(x)) → s(inc(x))
inc(0') → s(0')
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0')

Types:
isEmpty :: cons:nil → false:true
cons :: 0':s → cons:nil → cons:nil
false :: false:true
nil :: cons:nil
true :: false:true
isZero :: 0':s → false:true
0' :: 0':s
s :: 0':s → 0':s
tail :: cons:nil → cons:nil
p :: 0':s → 0':s
inc :: 0':s → 0':s
sumList :: cons:nil → 0':s → 0':s
if :: false:true → false:true → 0':s → cons:nil → cons:nil → 0':s → 0':s
sum :: cons:nil → 0':s
hole_false:true1_0 :: false:true
hole_cons:nil2_0 :: cons:nil
hole_0':s3_0 :: 0':s
gen_cons:nil4_0 :: Nat → cons:nil
gen_0':s5_0 :: Nat → 0':s

Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(0', gen_cons:nil4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
inc, sumList

They will be analysed ascendingly in the following order:
inc < sumList

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

Proved the following rewrite lemma:
inc(gen_0':s5_0(n264_0)) → gen_0':s5_0(+(1, n264_0)), rt ∈ Ω(1 + n2640)

Induction Base:
inc(gen_0':s5_0(0)) →RΩ(1)
s(0')

Induction Step:
inc(gen_0':s5_0(+(n264_0, 1))) →RΩ(1)
s(inc(gen_0':s5_0(n264_0))) →IH
s(gen_0':s5_0(+(1, c265_0)))

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

### (14) Obligation:

TRS:
Rules:
isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0') → true
isZero(s(x)) → false
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0')) → 0'
p(0') → 0'
inc(s(x)) → s(inc(x))
inc(0') → s(0')
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0')

Types:
isEmpty :: cons:nil → false:true
cons :: 0':s → cons:nil → cons:nil
false :: false:true
nil :: cons:nil
true :: false:true
isZero :: 0':s → false:true
0' :: 0':s
s :: 0':s → 0':s
tail :: cons:nil → cons:nil
p :: 0':s → 0':s
inc :: 0':s → 0':s
sumList :: cons:nil → 0':s → 0':s
if :: false:true → false:true → 0':s → cons:nil → cons:nil → 0':s → 0':s
sum :: cons:nil → 0':s
hole_false:true1_0 :: false:true
hole_cons:nil2_0 :: cons:nil
hole_0':s3_0 :: 0':s
gen_cons:nil4_0 :: Nat → cons:nil
gen_0':s5_0 :: Nat → 0':s

Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n264_0)) → gen_0':s5_0(+(1, n264_0)), rt ∈ Ω(1 + n2640)

Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(0', gen_cons:nil4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
sumList

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

Proved the following rewrite lemma:
sumList(gen_cons:nil4_0(n531_0), gen_0':s5_0(b)) → gen_0':s5_0(b), rt ∈ Ω(1 + b + b·n5310 + n5310)

Induction Base:
sumList(gen_cons:nil4_0(0), gen_0':s5_0(b)) →RΩ(1)
gen_0':s5_0(b)

Induction Step:
sumList(gen_cons:nil4_0(+(n531_0, 1)), gen_0':s5_0(b)) →RΩ(1)
if(isEmpty(gen_cons:nil4_0(+(n531_0, 1))), isZero(head(gen_cons:nil4_0(+(n531_0, 1)))), gen_0':s5_0(b), tail(gen_cons:nil4_0(+(n531_0, 1))), cons(p(head(gen_cons:nil4_0(+(n531_0, 1)))), tail(gen_cons:nil4_0(+(n531_0, 1)))), inc(gen_0':s5_0(b))) →RΩ(1)
if(false, isZero(head(gen_cons:nil4_0(+(1, n531_0)))), gen_0':s5_0(b), tail(gen_cons:nil4_0(+(1, n531_0))), cons(p(head(gen_cons:nil4_0(+(1, n531_0)))), tail(gen_cons:nil4_0(+(1, n531_0)))), inc(gen_0':s5_0(b))) →RΩ(1)
if(false, isZero(0'), gen_0':s5_0(b), tail(gen_cons:nil4_0(+(1, n531_0))), cons(p(head(gen_cons:nil4_0(+(1, n531_0)))), tail(gen_cons:nil4_0(+(1, n531_0)))), inc(gen_0':s5_0(b))) →RΩ(1)
if(false, true, gen_0':s5_0(b), tail(gen_cons:nil4_0(+(1, n531_0))), cons(p(head(gen_cons:nil4_0(+(1, n531_0)))), tail(gen_cons:nil4_0(+(1, n531_0)))), inc(gen_0':s5_0(b))) →RΩ(1)
if(false, true, gen_0':s5_0(b), gen_cons:nil4_0(n531_0), cons(p(head(gen_cons:nil4_0(+(1, n531_0)))), tail(gen_cons:nil4_0(+(1, n531_0)))), inc(gen_0':s5_0(b))) →RΩ(1)
if(false, true, gen_0':s5_0(b), gen_cons:nil4_0(n531_0), cons(p(0'), tail(gen_cons:nil4_0(+(1, n531_0)))), inc(gen_0':s5_0(b))) →RΩ(1)
if(false, true, gen_0':s5_0(b), gen_cons:nil4_0(n531_0), cons(0', tail(gen_cons:nil4_0(+(1, n531_0)))), inc(gen_0':s5_0(b))) →RΩ(1)
if(false, true, gen_0':s5_0(b), gen_cons:nil4_0(n531_0), cons(0', gen_cons:nil4_0(n531_0)), inc(gen_0':s5_0(b))) →LΩ(1 + b)
if(false, true, gen_0':s5_0(b), gen_cons:nil4_0(n531_0), cons(0', gen_cons:nil4_0(n531_0)), gen_0':s5_0(+(1, b))) →RΩ(1)
sumList(gen_cons:nil4_0(n531_0), gen_0':s5_0(b)) →IH
gen_0':s5_0(b)

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

### (17) Obligation:

TRS:
Rules:
isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0') → true
isZero(s(x)) → false
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0')) → 0'
p(0') → 0'
inc(s(x)) → s(inc(x))
inc(0') → s(0')
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0')

Types:
isEmpty :: cons:nil → false:true
cons :: 0':s → cons:nil → cons:nil
false :: false:true
nil :: cons:nil
true :: false:true
isZero :: 0':s → false:true
0' :: 0':s
s :: 0':s → 0':s
tail :: cons:nil → cons:nil
p :: 0':s → 0':s
inc :: 0':s → 0':s
sumList :: cons:nil → 0':s → 0':s
if :: false:true → false:true → 0':s → cons:nil → cons:nil → 0':s → 0':s
sum :: cons:nil → 0':s
hole_false:true1_0 :: false:true
hole_cons:nil2_0 :: cons:nil
hole_0':s3_0 :: 0':s
gen_cons:nil4_0 :: Nat → cons:nil
gen_0':s5_0 :: Nat → 0':s

Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n264_0)) → gen_0':s5_0(+(1, n264_0)), rt ∈ Ω(1 + n2640)
sumList(gen_cons:nil4_0(n531_0), gen_0':s5_0(b)) → gen_0':s5_0(b), rt ∈ Ω(1 + b + b·n5310 + n5310)

Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(0', gen_cons:nil4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

### (18) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n2) was proven with the following lemma:
sumList(gen_cons:nil4_0(n531_0), gen_0':s5_0(b)) → gen_0':s5_0(b), rt ∈ Ω(1 + b + b·n5310 + n5310)

### (20) Obligation:

TRS:
Rules:
isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0') → true
isZero(s(x)) → false
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0')) → 0'
p(0') → 0'
inc(s(x)) → s(inc(x))
inc(0') → s(0')
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0')

Types:
isEmpty :: cons:nil → false:true
cons :: 0':s → cons:nil → cons:nil
false :: false:true
nil :: cons:nil
true :: false:true
isZero :: 0':s → false:true
0' :: 0':s
s :: 0':s → 0':s
tail :: cons:nil → cons:nil
p :: 0':s → 0':s
inc :: 0':s → 0':s
sumList :: cons:nil → 0':s → 0':s
if :: false:true → false:true → 0':s → cons:nil → cons:nil → 0':s → 0':s
sum :: cons:nil → 0':s
hole_false:true1_0 :: false:true
hole_cons:nil2_0 :: cons:nil
hole_0':s3_0 :: 0':s
gen_cons:nil4_0 :: Nat → cons:nil
gen_0':s5_0 :: Nat → 0':s

Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n264_0)) → gen_0':s5_0(+(1, n264_0)), rt ∈ Ω(1 + n2640)
sumList(gen_cons:nil4_0(n531_0), gen_0':s5_0(b)) → gen_0':s5_0(b), rt ∈ Ω(1 + b + b·n5310 + n5310)

Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(0', gen_cons:nil4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

### (21) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n2) was proven with the following lemma:
sumList(gen_cons:nil4_0(n531_0), gen_0':s5_0(b)) → gen_0':s5_0(b), rt ∈ Ω(1 + b + b·n5310 + n5310)

### (23) Obligation:

TRS:
Rules:
isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0') → true
isZero(s(x)) → false
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0')) → 0'
p(0') → 0'
inc(s(x)) → s(inc(x))
inc(0') → s(0')
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0')

Types:
isEmpty :: cons:nil → false:true
cons :: 0':s → cons:nil → cons:nil
false :: false:true
nil :: cons:nil
true :: false:true
isZero :: 0':s → false:true
0' :: 0':s
s :: 0':s → 0':s
tail :: cons:nil → cons:nil
p :: 0':s → 0':s
inc :: 0':s → 0':s
sumList :: cons:nil → 0':s → 0':s
if :: false:true → false:true → 0':s → cons:nil → cons:nil → 0':s → 0':s
sum :: cons:nil → 0':s
hole_false:true1_0 :: false:true
hole_cons:nil2_0 :: cons:nil
hole_0':s3_0 :: 0':s
gen_cons:nil4_0 :: Nat → cons:nil
gen_0':s5_0 :: Nat → 0':s

Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
inc(gen_0':s5_0(n264_0)) → gen_0':s5_0(+(1, n264_0)), rt ∈ Ω(1 + n2640)

Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(0', gen_cons:nil4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

### (24) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

### (26) Obligation:

TRS:
Rules:
isEmpty(cons(x, xs)) → false
isEmpty(nil) → true
isZero(0') → true
isZero(s(x)) → false
tail(cons(x, xs)) → xs
tail(nil) → nil
p(s(s(x))) → s(p(s(x)))
p(s(0')) → 0'
p(0') → 0'
inc(s(x)) → s(inc(x))
inc(0') → s(0')
if(true, b, y, xs, ys, x) → y
if(false, true, y, xs, ys, x) → sumList(xs, y)
if(false, false, y, xs, ys, x) → sumList(ys, x)
sum(xs) → sumList(xs, 0')

Types:
isEmpty :: cons:nil → false:true
cons :: 0':s → cons:nil → cons:nil
false :: false:true
nil :: cons:nil
true :: false:true
isZero :: 0':s → false:true
0' :: 0':s
s :: 0':s → 0':s
tail :: cons:nil → cons:nil
p :: 0':s → 0':s
inc :: 0':s → 0':s
sumList :: cons:nil → 0':s → 0':s
if :: false:true → false:true → 0':s → cons:nil → cons:nil → 0':s → 0':s
sum :: cons:nil → 0':s
hole_false:true1_0 :: false:true
hole_cons:nil2_0 :: cons:nil
hole_0':s3_0 :: 0':s
gen_cons:nil4_0 :: Nat → cons:nil
gen_0':s5_0 :: Nat → 0':s

Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)

Generator Equations:
gen_cons:nil4_0(0) ⇔ nil
gen_cons:nil4_0(+(x, 1)) ⇔ cons(0', gen_cons:nil4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

### (27) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)