(0) Obligation:

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

gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
double(0) → 0
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0)
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Rewrite Strategy: FULL

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

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

gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

S is empty.
Rewrite Strategy: FULL

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

(5) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
gt, plus, double, aver

They will be analysed ascendingly in the following order:
gt < aver
double < aver

(6) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
gt, plus, double, aver

They will be analysed ascendingly in the following order:
gt < aver
double < aver

(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

Induction Base:
gt(gen_0':s3_0(0), gen_0':s3_0(0)) →RΩ(1)
false

Induction Step:
gt(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(+(n5_0, 1))) →RΩ(1)
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) →IH
false

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

(8) Complex Obligation (BEST)

(9) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
plus, double, aver

They will be analysed ascendingly in the following order:
double < aver

(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
plus(gen_0':s3_0(n282_0), gen_0':s3_0(b)) → gen_0':s3_0(+(n282_0, b)), rt ∈ Ω(1 + n2820)

Induction Base:
plus(gen_0':s3_0(0), gen_0':s3_0(b)) →RΩ(1)
gen_0':s3_0(b)

Induction Step:
plus(gen_0':s3_0(+(n282_0, 1)), gen_0':s3_0(b)) →RΩ(1)
s(plus(gen_0':s3_0(n282_0), gen_0':s3_0(b))) →IH
s(gen_0':s3_0(+(b, c283_0)))

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

(11) Complex Obligation (BEST)

(12) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
plus(gen_0':s3_0(n282_0), gen_0':s3_0(b)) → gen_0':s3_0(+(n282_0, b)), rt ∈ Ω(1 + n2820)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
double, aver

They will be analysed ascendingly in the following order:
double < aver

(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
double(gen_0':s3_0(n825_0)) → gen_0':s3_0(*(2, n825_0)), rt ∈ Ω(1 + n8250)

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

Induction Step:
double(gen_0':s3_0(+(n825_0, 1))) →RΩ(1)
s(s(double(gen_0':s3_0(n825_0)))) →IH
s(s(gen_0':s3_0(*(2, c826_0))))

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

(14) Complex Obligation (BEST)

(15) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
plus(gen_0':s3_0(n282_0), gen_0':s3_0(b)) → gen_0':s3_0(+(n282_0, b)), rt ∈ Ω(1 + n2820)
double(gen_0':s3_0(n825_0)) → gen_0':s3_0(*(2, n825_0)), rt ∈ Ω(1 + n8250)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
aver

(16) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

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

(17) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
plus(gen_0':s3_0(n282_0), gen_0':s3_0(b)) → gen_0':s3_0(+(n282_0, b)), rt ∈ Ω(1 + n2820)
double(gen_0':s3_0(n825_0)) → gen_0':s3_0(*(2, n825_0)), rt ∈ Ω(1 + n8250)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(18) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

(19) BOUNDS(n^1, INF)

(20) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
plus(gen_0':s3_0(n282_0), gen_0':s3_0(b)) → gen_0':s3_0(+(n282_0, b)), rt ∈ Ω(1 + n2820)
double(gen_0':s3_0(n825_0)) → gen_0':s3_0(*(2, n825_0)), rt ∈ Ω(1 + n8250)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(21) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

(22) BOUNDS(n^1, INF)

(23) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
plus(gen_0':s3_0(n282_0), gen_0':s3_0(b)) → gen_0':s3_0(+(n282_0, b)), rt ∈ Ω(1 + n2820)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(24) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

(25) BOUNDS(n^1, INF)

(26) Obligation:

TRS:
Rules:
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
plus(0', y) → y
plus(s(x), y) → s(plus(x, y))
double(0') → 0'
double(s(x)) → s(s(double(x)))
average(x, y) → aver(plus(x, y), 0')
aver(sum, z) → if(gt(sum, double(z)), sum, z)
if(true, sum, z) → aver(sum, s(z))
if(false, sum, z) → z

Types:
gt :: 0':s → 0':s → false:true
0' :: 0':s
false :: false:true
s :: 0':s → 0':s
true :: false:true
plus :: 0':s → 0':s → 0':s
double :: 0':s → 0':s
average :: 0':s → 0':s → 0':s
aver :: 0':s → 0':s → 0':s
if :: false:true → 0':s → 0':s → 0':s
hole_false:true1_0 :: false:true
hole_0':s2_0 :: 0':s
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(27) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

(28) BOUNDS(n^1, INF)