YES
0 QTRS
↳1 Overlay + Local Confluence (⇔, 0 ms)
↳2 QTRS
↳3 DependencyPairsProof (⇔, 0 ms)
↳4 QDP
↳5 DependencyGraphProof (⇔, 0 ms)
↳6 AND
↳7 QDP
↳8 UsableRulesProof (⇔, 0 ms)
↳9 QDP
↳10 QReductionProof (⇔, 0 ms)
↳11 QDP
↳12 QDPSizeChangeProof (⇔, 0 ms)
↳13 YES
↳14 QDP
↳15 UsableRulesProof (⇔, 0 ms)
↳16 QDP
↳17 QReductionProof (⇔, 0 ms)
↳18 QDP
↳19 TransformationProof (⇔, 0 ms)
↳20 QDP
↳21 TransformationProof (⇔, 0 ms)
↳22 QDP
↳23 DependencyGraphProof (⇔, 0 ms)
↳24 QDP
↳25 TransformationProof (⇔, 0 ms)
↳26 QDP
↳27 TransformationProof (⇔, 0 ms)
↳28 QDP
↳29 TransformationProof (⇔, 0 ms)
↳30 QDP
↳31 TransformationProof (⇔, 0 ms)
↳32 QDP
↳33 TransformationProof (⇔, 0 ms)
↳34 QDP
↳35 TransformationProof (⇔, 0 ms)
↳36 QDP
↳37 TransformationProof (⇔, 0 ms)
↳38 QDP
↳39 TransformationProof (⇔, 0 ms)
↳40 QDP
↳41 TransformationProof (⇔, 0 ms)
↳42 QDP
↳43 TransformationProof (⇔, 0 ms)
↳44 QDP
↳45 TransformationProof (⇔, 0 ms)
↳46 QDP
↳47 TransformationProof (⇔, 0 ms)
↳48 QDP
↳49 TransformationProof (⇔, 0 ms)
↳50 QDP
↳51 TransformationProof (⇔, 0 ms)
↳52 QDP
↳53 TransformationProof (⇔, 0 ms)
↳54 QDP
↳55 TransformationProof (⇔, 0 ms)
↳56 QDP
↳57 TransformationProof (⇔, 0 ms)
↳58 QDP
↳59 TransformationProof (⇔, 0 ms)
↳60 QDP
↳61 TransformationProof (⇔, 0 ms)
↳62 QDP
↳63 TransformationProof (⇔, 0 ms)
↳64 QDP
↳65 TransformationProof (⇔, 0 ms)
↳66 QDP
↳67 DependencyGraphProof (⇔, 0 ms)
↳68 QDP
↳69 TransformationProof (⇔, 0 ms)
↳70 QDP
↳71 TransformationProof (⇔, 0 ms)
↳72 QDP
↳73 TransformationProof (⇔, 0 ms)
↳74 QDP
↳75 TransformationProof (⇔, 0 ms)
↳76 QDP
↳77 TransformationProof (⇔, 0 ms)
↳78 QDP
↳79 UsableRulesProof (⇔, 0 ms)
↳80 QDP
↳81 TransformationProof (⇔, 0 ms)
↳82 QDP
↳83 UsableRulesProof (⇔, 0 ms)
↳84 QDP
↳85 QReductionProof (⇔, 0 ms)
↳86 QDP
↳87 TransformationProof (⇔, 0 ms)
↳88 QDP
↳89 TransformationProof (⇔, 0 ms)
↳90 QDP
↳91 TransformationProof (⇔, 0 ms)
↳92 QDP
↳93 TransformationProof (⇔, 0 ms)
↳94 QDP
↳95 TransformationProof (⇔, 0 ms)
↳96 QDP
↳97 TransformationProof (⇔, 0 ms)
↳98 QDP
↳99 TransformationProof (⇔, 0 ms)
↳100 QDP
↳101 TransformationProof (⇔, 0 ms)
↳102 QDP
↳103 TransformationProof (⇔, 0 ms)
↳104 QDP
↳105 TransformationProof (⇔, 0 ms)
↳106 QDP
↳107 TransformationProof (⇔, 0 ms)
↳108 QDP
↳109 TransformationProof (⇔, 0 ms)
↳110 QDP
↳111 TransformationProof (⇔, 0 ms)
↳112 QDP
↳113 DependencyGraphProof (⇔, 0 ms)
↳114 AND
↳115 QDP
↳116 TransformationProof (⇔, 0 ms)
↳117 QDP
↳118 TransformationProof (⇔, 0 ms)
↳119 QDP
↳120 TransformationProof (⇔, 0 ms)
↳121 QDP
↳122 TransformationProof (⇔, 0 ms)
↳123 QDP
↳124 DependencyGraphProof (⇔, 0 ms)
↳125 QDP
↳126 TransformationProof (⇔, 0 ms)
↳127 QDP
↳128 TransformationProof (⇔, 0 ms)
↳129 QDP
↳130 TransformationProof (⇔, 0 ms)
↳131 QDP
↳132 TransformationProof (⇔, 0 ms)
↳133 QDP
↳134 UsableRulesProof (⇔, 0 ms)
↳135 QDP
↳136 TransformationProof (⇔, 0 ms)
↳137 QDP
↳138 TransformationProof (⇔, 0 ms)
↳139 QDP
↳140 QDPQMonotonicMRRProof (⇔, 4 ms)
↳141 QDP
↳142 DependencyGraphProof (⇔, 0 ms)
↳143 TRUE
↳144 QDP
↳145 UsableRulesProof (⇔, 0 ms)
↳146 QDP
↳147 QDPSizeChangeProof (⇔, 0 ms)
↳148 YES
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
average(x, y) → if(le(x, 0), le(y, 0), le(y, s(0)), le(y, s(s(0))), x, y)
if(true, b1, b2, b3, x, y) → if2(b1, b2, b3, x, y)
if(false, b1, b2, b3, x, y) → average(p(x), s(y))
if2(true, b2, b3, x, y) → 0
if2(false, b2, b3, x, y) → if3(b2, b3, x, y)
if3(true, b3, x, y) → 0
if3(false, b3, x, y) → if4(b3, x, y)
if4(true, x, y) → s(0)
if4(false, x, y) → average(s(x), p(p(y)))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
average(x, y) → if(le(x, 0), le(y, 0), le(y, s(0)), le(y, s(s(0))), x, y)
if(true, b1, b2, b3, x, y) → if2(b1, b2, b3, x, y)
if(false, b1, b2, b3, x, y) → average(p(x), s(y))
if2(true, b2, b3, x, y) → 0
if2(false, b2, b3, x, y) → if3(b2, b3, x, y)
if3(true, b3, x, y) → 0
if3(false, b3, x, y) → if4(b3, x, y)
if4(true, x, y) → s(0)
if4(false, x, y) → average(s(x), p(p(y)))
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
average(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
if3(true, x0, x1, x2)
if3(false, x0, x1, x2)
if4(true, x0, x1)
if4(false, x0, x1)
LE(s(x), s(y)) → LE(x, y)
AVERAGE(x, y) → IF(le(x, 0), le(y, 0), le(y, s(0)), le(y, s(s(0))), x, y)
AVERAGE(x, y) → LE(x, 0)
AVERAGE(x, y) → LE(y, 0)
AVERAGE(x, y) → LE(y, s(0))
AVERAGE(x, y) → LE(y, s(s(0)))
IF(true, b1, b2, b3, x, y) → IF2(b1, b2, b3, x, y)
IF(false, b1, b2, b3, x, y) → AVERAGE(p(x), s(y))
IF(false, b1, b2, b3, x, y) → P(x)
IF2(false, b2, b3, x, y) → IF3(b2, b3, x, y)
IF3(false, b3, x, y) → IF4(b3, x, y)
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
IF4(false, x, y) → P(p(y))
IF4(false, x, y) → P(y)
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
average(x, y) → if(le(x, 0), le(y, 0), le(y, s(0)), le(y, s(s(0))), x, y)
if(true, b1, b2, b3, x, y) → if2(b1, b2, b3, x, y)
if(false, b1, b2, b3, x, y) → average(p(x), s(y))
if2(true, b2, b3, x, y) → 0
if2(false, b2, b3, x, y) → if3(b2, b3, x, y)
if3(true, b3, x, y) → 0
if3(false, b3, x, y) → if4(b3, x, y)
if4(true, x, y) → s(0)
if4(false, x, y) → average(s(x), p(p(y)))
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
average(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
if3(true, x0, x1, x2)
if3(false, x0, x1, x2)
if4(true, x0, x1)
if4(false, x0, x1)
LE(s(x), s(y)) → LE(x, y)
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
average(x, y) → if(le(x, 0), le(y, 0), le(y, s(0)), le(y, s(s(0))), x, y)
if(true, b1, b2, b3, x, y) → if2(b1, b2, b3, x, y)
if(false, b1, b2, b3, x, y) → average(p(x), s(y))
if2(true, b2, b3, x, y) → 0
if2(false, b2, b3, x, y) → if3(b2, b3, x, y)
if3(true, b3, x, y) → 0
if3(false, b3, x, y) → if4(b3, x, y)
if4(true, x, y) → s(0)
if4(false, x, y) → average(s(x), p(p(y)))
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
average(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
if3(true, x0, x1, x2)
if3(false, x0, x1, x2)
if4(true, x0, x1)
if4(false, x0, x1)
LE(s(x), s(y)) → LE(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
average(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
if3(true, x0, x1, x2)
if3(false, x0, x1, x2)
if4(true, x0, x1)
if4(false, x0, x1)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
average(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
if3(true, x0, x1, x2)
if3(false, x0, x1, x2)
if4(true, x0, x1)
if4(false, x0, x1)
LE(s(x), s(y)) → LE(x, y)
From the DPs we obtained the following set of size-change graphs:
AVERAGE(x, y) → IF(le(x, 0), le(y, 0), le(y, s(0)), le(y, s(s(0))), x, y)
IF(true, b1, b2, b3, x, y) → IF2(b1, b2, b3, x, y)
IF2(false, b2, b3, x, y) → IF3(b2, b3, x, y)
IF3(false, b3, x, y) → IF4(b3, x, y)
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
IF(false, b1, b2, b3, x, y) → AVERAGE(p(x), s(y))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
average(x, y) → if(le(x, 0), le(y, 0), le(y, s(0)), le(y, s(s(0))), x, y)
if(true, b1, b2, b3, x, y) → if2(b1, b2, b3, x, y)
if(false, b1, b2, b3, x, y) → average(p(x), s(y))
if2(true, b2, b3, x, y) → 0
if2(false, b2, b3, x, y) → if3(b2, b3, x, y)
if3(true, b3, x, y) → 0
if3(false, b3, x, y) → if4(b3, x, y)
if4(true, x, y) → s(0)
if4(false, x, y) → average(s(x), p(p(y)))
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
average(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
if3(true, x0, x1, x2)
if3(false, x0, x1, x2)
if4(true, x0, x1)
if4(false, x0, x1)
AVERAGE(x, y) → IF(le(x, 0), le(y, 0), le(y, s(0)), le(y, s(s(0))), x, y)
IF(true, b1, b2, b3, x, y) → IF2(b1, b2, b3, x, y)
IF2(false, b2, b3, x, y) → IF3(b2, b3, x, y)
IF3(false, b3, x, y) → IF4(b3, x, y)
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
IF(false, b1, b2, b3, x, y) → AVERAGE(p(x), s(y))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
average(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
if3(true, x0, x1, x2)
if3(false, x0, x1, x2)
if4(true, x0, x1)
if4(false, x0, x1)
average(x0, x1)
if(true, x0, x1, x2, x3, x4)
if(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
if3(true, x0, x1, x2)
if3(false, x0, x1, x2)
if4(true, x0, x1)
if4(false, x0, x1)
AVERAGE(x, y) → IF(le(x, 0), le(y, 0), le(y, s(0)), le(y, s(s(0))), x, y)
IF(true, b1, b2, b3, x, y) → IF2(b1, b2, b3, x, y)
IF2(false, b2, b3, x, y) → IF3(b2, b3, x, y)
IF3(false, b3, x, y) → IF4(b3, x, y)
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
IF(false, b1, b2, b3, x, y) → AVERAGE(p(x), s(y))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(0, y1) → IF(true, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), 0, y1) → AVERAGE(0, y1) → IF(true, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), 0, y1)
AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1) → AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1)
IF(true, b1, b2, b3, x, y) → IF2(b1, b2, b3, x, y)
IF2(false, b2, b3, x, y) → IF3(b2, b3, x, y)
IF3(false, b3, x, y) → IF4(b3, x, y)
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
IF(false, b1, b2, b3, x, y) → AVERAGE(p(x), s(y))
AVERAGE(0, y1) → IF(true, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), 0, y1)
AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1)
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4)) → IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
IF(false, y0, y1, y2, 0, y4) → AVERAGE(0, s(y4)) → IF(false, y0, y1, y2, 0, y4) → AVERAGE(0, s(y4))
IF(true, b1, b2, b3, x, y) → IF2(b1, b2, b3, x, y)
IF2(false, b2, b3, x, y) → IF3(b2, b3, x, y)
IF3(false, b3, x, y) → IF4(b3, x, y)
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
AVERAGE(0, y1) → IF(true, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), 0, y1)
AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1)
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
IF(false, y0, y1, y2, 0, y4) → AVERAGE(0, s(y4))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF2(false, b2, b3, x, y) → IF3(b2, b3, x, y)
IF3(false, b3, x, y) → IF4(b3, x, y)
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1)
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
AVERAGE(0, y1) → IF(true, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), 0, y1)
IF(true, b1, b2, b3, x, y) → IF2(b1, b2, b3, x, y)
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(0, s(z4)) → IF(true, le(s(z4), 0), le(s(z4), s(0)), le(s(z4), s(s(0))), 0, s(z4)) → AVERAGE(0, s(z4)) → IF(true, le(s(z4), 0), le(s(z4), s(0)), le(s(z4), s(s(0))), 0, s(z4))
IF2(false, b2, b3, x, y) → IF3(b2, b3, x, y)
IF3(false, b3, x, y) → IF4(b3, x, y)
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1)
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
IF(true, b1, b2, b3, x, y) → IF2(b1, b2, b3, x, y)
AVERAGE(0, s(z4)) → IF(true, le(s(z4), 0), le(s(z4), s(0)), le(s(z4), s(s(0))), 0, s(z4))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(0, s(z4)) → IF(true, false, le(s(z4), s(0)), le(s(z4), s(s(0))), 0, s(z4)) → AVERAGE(0, s(z4)) → IF(true, false, le(s(z4), s(0)), le(s(z4), s(s(0))), 0, s(z4))
IF2(false, b2, b3, x, y) → IF3(b2, b3, x, y)
IF3(false, b3, x, y) → IF4(b3, x, y)
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1)
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
IF(true, b1, b2, b3, x, y) → IF2(b1, b2, b3, x, y)
AVERAGE(0, s(z4)) → IF(true, false, le(s(z4), s(0)), le(s(z4), s(s(0))), 0, s(z4))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(s(z4), s(s(0))), 0, s(z4)) → AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(s(z4), s(s(0))), 0, s(z4))
IF2(false, b2, b3, x, y) → IF3(b2, b3, x, y)
IF3(false, b3, x, y) → IF4(b3, x, y)
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1)
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
IF(true, b1, b2, b3, x, y) → IF2(b1, b2, b3, x, y)
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(s(z4), s(s(0))), 0, s(z4))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4)) → AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF2(false, b2, b3, x, y) → IF3(b2, b3, x, y)
IF3(false, b3, x, y) → IF4(b3, x, y)
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1)
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
IF(true, b1, b2, b3, x, y) → IF2(b1, b2, b3, x, y)
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0)) → IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, b2, b3, x, y) → IF3(b2, b3, x, y)
IF3(false, b3, x, y) → IF4(b3, x, y)
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1)
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2)) → IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
IF3(false, b3, x, y) → IF4(b3, x, y)
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1)
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2)) → IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, x, y) → AVERAGE(s(x), p(p(y)))
AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1)
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(p(s(z1)))) → IF4(false, 0, s(z1)) → AVERAGE(s(0), p(p(s(z1))))
AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1)
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(p(s(z1))))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1)) → IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1)
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(x0), s(z4)) → IF(false, le(s(z4), 0), le(s(z4), s(0)), le(s(z4), s(s(0))), s(x0), s(z4)) → AVERAGE(s(x0), s(z4)) → IF(false, le(s(z4), 0), le(s(z4), s(0)), le(s(z4), s(s(0))), s(x0), s(z4))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0) → AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(x0), s(z4)) → IF(false, le(s(z4), 0), le(s(z4), s(0)), le(s(z4), s(s(0))), s(x0), s(z4))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(x0), s(z4)) → IF(false, false, le(s(z4), s(0)), le(s(z4), s(s(0))), s(x0), s(z4)) → AVERAGE(s(x0), s(z4)) → IF(false, false, le(s(z4), s(0)), le(s(z4), s(s(0))), s(x0), s(z4))
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
AVERAGE(s(x0), s(z4)) → IF(false, false, le(s(z4), s(0)), le(s(z4), s(s(0))), s(x0), s(z4))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(x0), s(z4)) → IF(false, false, le(z4, 0), le(s(z4), s(s(0))), s(x0), s(z4)) → AVERAGE(s(x0), s(z4)) → IF(false, false, le(z4, 0), le(s(z4), s(s(0))), s(x0), s(z4))
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
AVERAGE(s(x0), s(z4)) → IF(false, false, le(z4, 0), le(s(z4), s(s(0))), s(x0), s(z4))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(x0), s(z4)) → IF(false, false, le(z4, 0), le(z4, s(0)), s(x0), s(z4)) → AVERAGE(s(x0), s(z4)) → IF(false, false, le(z4, 0), le(z4, s(0)), s(x0), s(z4))
IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
AVERAGE(s(x0), s(z4)) → IF(false, false, le(z4, 0), le(z4, s(0)), s(x0), s(z4))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0)) → IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF(false, false, y_0, y_1, s(z0), s(z1)) → AVERAGE(z0, s(s(z1))) → IF(false, false, y_0, y_1, s(z0), s(z1)) → AVERAGE(z0, s(s(z1)))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
AVERAGE(s(x0), s(z4)) → IF(false, false, le(z4, 0), le(z4, s(0)), s(x0), s(z4))
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF(false, false, y_0, y_1, s(z0), s(z1)) → AVERAGE(z0, s(s(z1)))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1)) → AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, le(s(z3), 0), le(s(z3), s(0)), s(x0), s(s(z3))) → AVERAGE(s(x0), s(s(z3))) → IF(false, false, le(s(z3), 0), le(s(z3), s(0)), s(x0), s(s(z3)))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF(false, false, y_0, y_1, s(z0), s(z1)) → AVERAGE(z0, s(s(z1)))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, le(s(z3), 0), le(s(z3), s(0)), s(x0), s(s(z3)))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(s(z3), s(0)), s(x0), s(s(z3))) → AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(s(z3), s(0)), s(x0), s(s(z3)))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF(false, false, y_0, y_1, s(z0), s(z1)) → AVERAGE(z0, s(s(z1)))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(s(z3), s(0)), s(x0), s(s(z3)))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3))) → AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF(false, false, y_0, y_1, s(z0), s(z1)) → AVERAGE(z0, s(s(z1)))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3))) → IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1)))) → IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF2(false, false, x1, 0, s(x2)) → IF3(false, x1, 0, s(x2)) → IF2(false, false, x1, 0, s(x2)) → IF3(false, x1, 0, s(x2))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
IF2(false, false, x1, 0, s(x2)) → IF3(false, x1, 0, s(x2))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(true, false, false, x1, 0, s(x2)) → IF2(false, false, x1, 0, s(x2)) → IF(true, false, false, x1, 0, s(x2)) → IF2(false, false, x1, 0, s(x2))
AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
IF2(false, false, x1, 0, s(x2)) → IF3(false, x1, 0, s(x2))
IF(true, false, false, x1, 0, s(x2)) → IF2(false, false, x1, 0, s(x2))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(0, s(0)) → IF(true, false, true, le(0, s(0)), 0, s(0)) → AVERAGE(0, s(0)) → IF(true, false, true, le(0, s(0)), 0, s(0))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(s(x0), s(0)), 0, s(s(x0))) → AVERAGE(0, s(s(x0))) → IF(true, false, false, le(s(x0), s(0)), 0, s(s(x0)))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
IF2(false, false, x1, 0, s(x2)) → IF3(false, x1, 0, s(x2))
IF(true, false, false, x1, 0, s(x2)) → IF2(false, false, x1, 0, s(x2))
AVERAGE(0, s(0)) → IF(true, false, true, le(0, s(0)), 0, s(0))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(s(x0), s(0)), 0, s(s(x0)))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(s(x0), s(0)), 0, s(s(x0)))
IF(true, false, false, x1, 0, s(x2)) → IF2(false, false, x1, 0, s(x2))
IF2(false, false, x1, 0, s(x2)) → IF3(false, x1, 0, s(x2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0))) → AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF(true, false, false, x1, 0, s(x2)) → IF2(false, false, x1, 0, s(x2))
IF2(false, false, x1, 0, s(x2)) → IF3(false, x1, 0, s(x2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0))) → IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF2(false, false, x1, 0, s(x2)) → IF3(false, x1, 0, s(x2))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1))) → IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), p(s(z1))) → IF4(false, 0, s(s(z1))) → AVERAGE(s(0), p(s(z1)))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), p(s(z1)))
p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), p(s(z1)))
p(s(x)) → x
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1) → IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
p(s(x)) → x
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
p(s(x0))
p(0)
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0))) → IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0)))
AVERAGE(s(0), y_0) → IF(false, le(y_0, 0), le(y_0, s(0)), le(y_0, s(s(0))), s(0), y_0)
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(y_4)) → IF(false, le(s(y_4), 0), le(s(y_4), s(0)), le(s(y_4), s(s(0))), s(0), s(y_4)) → AVERAGE(s(0), s(y_4)) → IF(false, le(s(y_4), 0), le(s(y_4), s(0)), le(s(y_4), s(s(0))), s(0), s(y_4))
AVERAGE(s(0), s(s(y_5))) → IF(false, le(s(s(y_5)), 0), le(s(s(y_5)), s(0)), le(s(s(y_5)), s(s(0))), s(0), s(s(y_5))) → AVERAGE(s(0), s(s(y_5))) → IF(false, le(s(s(y_5)), 0), le(s(s(y_5)), s(0)), le(s(s(y_5)), s(s(0))), s(0), s(s(y_5)))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0)))
AVERAGE(s(0), s(y_4)) → IF(false, le(s(y_4), 0), le(s(y_4), s(0)), le(s(y_4), s(s(0))), s(0), s(y_4))
AVERAGE(s(0), s(s(y_5))) → IF(false, le(s(s(y_5)), 0), le(s(s(y_5)), s(0)), le(s(s(y_5)), s(s(0))), s(0), s(s(y_5)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(y_4)) → IF(false, false, le(s(y_4), s(0)), le(s(y_4), s(s(0))), s(0), s(y_4)) → AVERAGE(s(0), s(y_4)) → IF(false, false, le(s(y_4), s(0)), le(s(y_4), s(s(0))), s(0), s(y_4))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0)))
AVERAGE(s(0), s(s(y_5))) → IF(false, le(s(s(y_5)), 0), le(s(s(y_5)), s(0)), le(s(s(y_5)), s(s(0))), s(0), s(s(y_5)))
AVERAGE(s(0), s(y_4)) → IF(false, false, le(s(y_4), s(0)), le(s(y_4), s(s(0))), s(0), s(y_4))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, le(s(s(y_5)), s(0)), le(s(s(y_5)), s(s(0))), s(0), s(s(y_5))) → AVERAGE(s(0), s(s(y_5))) → IF(false, false, le(s(s(y_5)), s(0)), le(s(s(y_5)), s(s(0))), s(0), s(s(y_5)))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0)))
AVERAGE(s(0), s(y_4)) → IF(false, false, le(s(y_4), s(0)), le(s(y_4), s(s(0))), s(0), s(y_4))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, le(s(s(y_5)), s(0)), le(s(s(y_5)), s(s(0))), s(0), s(s(y_5)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(y_4)) → IF(false, false, le(y_4, 0), le(s(y_4), s(s(0))), s(0), s(y_4)) → AVERAGE(s(0), s(y_4)) → IF(false, false, le(y_4, 0), le(s(y_4), s(s(0))), s(0), s(y_4))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0)))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, le(s(s(y_5)), s(0)), le(s(s(y_5)), s(s(0))), s(0), s(s(y_5)))
AVERAGE(s(0), s(y_4)) → IF(false, false, le(y_4, 0), le(s(y_4), s(s(0))), s(0), s(y_4))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, le(s(y_5), 0), le(s(s(y_5)), s(s(0))), s(0), s(s(y_5))) → AVERAGE(s(0), s(s(y_5))) → IF(false, false, le(s(y_5), 0), le(s(s(y_5)), s(s(0))), s(0), s(s(y_5)))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0)))
AVERAGE(s(0), s(y_4)) → IF(false, false, le(y_4, 0), le(s(y_4), s(s(0))), s(0), s(y_4))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, le(s(y_5), 0), le(s(s(y_5)), s(s(0))), s(0), s(s(y_5)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(y_4)) → IF(false, false, le(y_4, 0), le(y_4, s(0)), s(0), s(y_4)) → AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0)))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, le(s(y_5), 0), le(s(s(y_5)), s(s(0))), s(0), s(s(y_5)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(s(s(y_5)), s(s(0))), s(0), s(s(y_5))) → AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(s(s(y_5)), s(s(0))), s(0), s(s(y_5)))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0)))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(s(s(y_5)), s(s(0))), s(0), s(s(y_5)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(s(y_5), s(0)), s(0), s(s(y_5))) → AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(s(y_5), s(0)), s(0), s(s(y_5)))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0)))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(s(y_5), s(0)), s(0), s(s(y_5)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5))) → AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0)))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(false, false, y_0, y_1, s(0), s(z0)) → AVERAGE(0, s(s(z0))) → IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1)))) → IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(false, false, false, x0, s(s(0)), s(s(x2))) → AVERAGE(s(0), s(s(s(x2)))) → IF(false, false, false, x0, s(s(0)), s(s(x2))) → AVERAGE(s(0), s(s(s(x2))))
IF(false, false, false, x0, s(s(y_0)), s(s(x2))) → AVERAGE(s(y_0), s(s(s(x2)))) → IF(false, false, false, x0, s(s(y_0)), s(s(x2))) → AVERAGE(s(y_0), s(s(s(x2))))
IF(false, false, false, x0, s(0), s(s(x2))) → AVERAGE(0, s(s(s(x2)))) → IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
IF(false, false, false, x0, s(s(0)), s(s(x2))) → AVERAGE(s(0), s(s(s(x2))))
IF(false, false, false, x0, s(s(y_0)), s(s(x2))) → AVERAGE(s(y_0), s(s(s(x2))))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(s(x1))) → IF(false, false, false, le(x1, 0), s(0), s(s(x1))) → AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
AVERAGE(s(s(0)), s(s(x1))) → IF(false, false, false, le(x1, 0), s(s(0)), s(s(x1))) → AVERAGE(s(s(0)), s(s(x1))) → IF(false, false, false, le(x1, 0), s(s(0)), s(s(x1)))
AVERAGE(s(s(y_4)), s(s(x1))) → IF(false, false, false, le(x1, 0), s(s(y_4)), s(s(x1))) → AVERAGE(s(s(y_4)), s(s(x1))) → IF(false, false, false, le(x1, 0), s(s(y_4)), s(s(x1)))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
IF(false, false, false, x0, s(s(0)), s(s(x2))) → AVERAGE(s(0), s(s(s(x2))))
IF(false, false, false, x0, s(s(y_0)), s(s(x2))) → AVERAGE(s(y_0), s(s(s(x2))))
AVERAGE(s(s(0)), s(s(x1))) → IF(false, false, false, le(x1, 0), s(s(0)), s(s(x1)))
AVERAGE(s(s(y_4)), s(s(x1))) → IF(false, false, false, le(x1, 0), s(s(y_4)), s(s(x1)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1))) → IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1)))
AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))
IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(0, s(s(0))) → IF(true, false, false, true, 0, s(s(0))) → AVERAGE(0, s(s(0))) → IF(true, false, false, true, 0, s(s(0)))
AVERAGE(0, s(s(s(x0)))) → IF(true, false, false, false, 0, s(s(s(x0)))) → AVERAGE(0, s(s(s(x0)))) → IF(true, false, false, false, 0, s(s(s(x0))))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))
IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1)))
AVERAGE(0, s(s(0))) → IF(true, false, false, true, 0, s(s(0)))
AVERAGE(0, s(s(s(x0)))) → IF(true, false, false, false, 0, s(s(s(x0))))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3)))
AVERAGE(0, s(s(s(x0)))) → IF(true, false, false, false, 0, s(s(s(x0))))
IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1)))
IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(false, false, x0, x1, s(0), s(s(y_0))) → AVERAGE(0, s(s(s(y_0)))) → IF(false, false, x0, x1, s(0), s(s(y_0))) → AVERAGE(0, s(s(s(y_0))))
AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1))
AVERAGE(0, s(s(s(x0)))) → IF(true, false, false, false, 0, s(s(s(x0))))
IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1)))
IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
IF(false, false, x0, x1, s(0), s(s(y_0))) → AVERAGE(0, s(s(s(y_0))))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(s(y_4))) → IF(false, false, le(s(y_4), 0), le(s(y_4), s(0)), s(0), s(s(y_4))) → AVERAGE(s(0), s(s(y_4))) → IF(false, false, le(s(y_4), 0), le(s(y_4), s(0)), s(0), s(s(y_4)))
AVERAGE(0, s(s(s(x0)))) → IF(true, false, false, false, 0, s(s(s(x0))))
IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1)))
IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
IF(false, false, x0, x1, s(0), s(s(y_0))) → AVERAGE(0, s(s(s(y_0))))
AVERAGE(s(0), s(s(y_4))) → IF(false, false, le(s(y_4), 0), le(s(y_4), s(0)), s(0), s(s(y_4)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(s(y_4))) → IF(false, false, false, le(s(y_4), s(0)), s(0), s(s(y_4))) → AVERAGE(s(0), s(s(y_4))) → IF(false, false, false, le(s(y_4), s(0)), s(0), s(s(y_4)))
AVERAGE(0, s(s(s(x0)))) → IF(true, false, false, false, 0, s(s(s(x0))))
IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1)))
IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
IF(false, false, x0, x1, s(0), s(s(y_0))) → AVERAGE(0, s(s(s(y_0))))
AVERAGE(s(0), s(s(y_4))) → IF(false, false, false, le(s(y_4), s(0)), s(0), s(s(y_4)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(s(0), s(s(y_4))) → IF(false, false, false, le(y_4, 0), s(0), s(s(y_4))) → AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
AVERAGE(0, s(s(s(x0)))) → IF(true, false, false, false, 0, s(s(s(x0))))
IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1)))
IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
IF(false, false, x0, x1, s(0), s(s(y_0))) → AVERAGE(0, s(s(s(y_0))))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
AVERAGE(0, s(s(s(x0)))) → IF(true, false, false, false, 0, s(s(s(x0))))
IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1)))
IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
IF(false, false, x0, x1, s(0), s(s(y_0))) → AVERAGE(0, s(s(s(y_0))))
le(0, y) → true
le(s(x), 0) → false
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(false, false, false, y_0, s(0), s(s(z0))) → AVERAGE(0, s(s(s(z0)))) → IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
AVERAGE(0, s(s(s(x0)))) → IF(true, false, false, false, 0, s(s(s(x0))))
IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1)))
IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
le(0, y) → true
le(s(x), 0) → false
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF4(false, 0, s(s(s(s(y_0))))) → AVERAGE(s(0), s(s(y_0))) → IF4(false, 0, s(s(s(s(y_0))))) → AVERAGE(s(0), s(s(y_0)))
AVERAGE(0, s(s(s(x0)))) → IF(true, false, false, false, 0, s(s(s(x0))))
IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1)))
IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
IF4(false, 0, s(s(s(s(y_0))))) → AVERAGE(s(0), s(s(y_0)))
le(0, y) → true
le(s(x), 0) → false
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1)))
IF4(false, 0, s(s(s(s(y_0))))) → AVERAGE(s(0), s(s(y_0)))
POL(0) = 1
POL(AVERAGE(x1, x2)) = 2 + x1 + x2
POL(IF(x1, x2, x3, x4, x5, x6)) = 2·x1 + x5 + x6
POL(IF2(x1, x2, x3, x4, x5)) = 2·x4 + x5
POL(IF3(x1, x2, x3, x4)) = 2·x3 + x4
POL(IF4(x1, x2, x3)) = 2·x1 + x3
POL(false) = 1
POL(le(x1, x2)) = 1 + x1
POL(s(x1)) = 2 + x1
POL(true) = 1
AVERAGE(0, s(s(s(x0)))) → IF(true, false, false, false, 0, s(s(s(x0))))
IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))
IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))
AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))
le(0, y) → true
le(s(x), 0) → false
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(false, false, false, x0, s(s(y_0)), s(s(x2))) → AVERAGE(s(y_0), s(s(s(x2))))
AVERAGE(s(s(0)), s(s(x1))) → IF(false, false, false, le(x1, 0), s(s(0)), s(s(x1)))
AVERAGE(s(s(y_4)), s(s(x1))) → IF(false, false, false, le(x1, 0), s(s(y_4)), s(s(x1)))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
IF(false, false, false, x0, s(s(y_0)), s(s(x2))) → AVERAGE(s(y_0), s(s(s(x2))))
AVERAGE(s(s(0)), s(s(x1))) → IF(false, false, false, le(x1, 0), s(s(0)), s(s(x1)))
AVERAGE(s(s(y_4)), s(s(x1))) → IF(false, false, false, le(x1, 0), s(s(y_4)), s(s(x1)))
le(0, y) → true
le(s(x), 0) → false
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
From the DPs we obtained the following set of size-change graphs: