(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

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)))

Q is empty.

(1) Overlay + Local Confluence (EQUIVALENT transformation)

The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.

(2) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

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)))

The set Q consists of the following terms:

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)

(3) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(4) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)

The TRS R consists of the following rules:

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)))

The set Q consists of the following terms:

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)

We have to consider all minimal (P,Q,R)-chains.

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs with 7 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LE(s(x), s(y)) → LE(x, y)

The TRS R consists of the following rules:

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)))

The set Q consists of the following terms:

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)

We have to consider all minimal (P,Q,R)-chains.

(8) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(9) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LE(s(x), s(y)) → LE(x, y)

R is empty.
The set Q consists of the following terms:

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)

We have to consider all minimal (P,Q,R)-chains.

(10) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

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)

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LE(s(x), s(y)) → LE(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LE(s(x), s(y)) → LE(x, y)
    The graph contains the following edges 1 > 1, 2 > 2

(13) TRUE

(14) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

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)))

The set Q consists of the following terms:

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)

We have to consider all minimal (P,Q,R)-chains.

(15) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(16) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

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)

We have to consider all minimal (P,Q,R)-chains.

(17) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

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)

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(19) RemovalProof (SOUND transformation)

In the following pairs the term without variables s(s(0)) is replaced by the fresh variable x_removed.
Pair: AVERAGE(x, y) → IF(le(x, 0), le(y, 0), le(y, s(0)), le(y, s(s(0))), x, y)
Positions in right side of the pair:
  • [3,1]
The new variable was added to all pairs as a new argument[CONREM].

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

AVERAGE(x, y, x_removed) → IF(le(x, 0), le(y, 0), le(y, s(0)), le(y, x_removed), x, y, x_removed)
IF(true, b1, b2, b3, x, y, x_removed) → IF2(b1, b2, b3, x, y, x_removed)
IF(false, b1, b2, b3, x, y, x_removed) → AVERAGE(p(x), s(y), x_removed)
IF2(false, b2, b3, x, y, x_removed) → IF3(b2, b3, x, y, x_removed)
IF3(false, b3, x, y, x_removed) → IF4(b3, x, y, x_removed)
IF4(false, x, y, x_removed) → AVERAGE(s(x), p(p(y)), x_removed)

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(21) RemovalProof (SOUND transformation)

In the following pairs the term without variables s(s(0)) is replaced by the fresh variable x_removed.
Pair: AVERAGE(x, y) → IF(le(x, 0), le(y, 0), le(y, s(0)), le(y, s(s(0))), x, y)
Positions in right side of the pair:
  • [3,1]
The new variable was added to all pairs as a new argument[CONREM].

(22) Obligation:

Q DP problem:
The TRS P consists of the following rules:

AVERAGE(x, y, x_removed) → IF(le(x, 0), le(y, 0), le(y, s(0)), le(y, x_removed), x, y, x_removed)
IF(true, b1, b2, b3, x, y, x_removed) → IF2(b1, b2, b3, x, y, x_removed)
IF(false, b1, b2, b3, x, y, x_removed) → AVERAGE(p(x), s(y), x_removed)
IF2(false, b2, b3, x, y, x_removed) → IF3(b2, b3, x, y, x_removed)
IF3(false, b3, x, y, x_removed) → IF4(b3, x, y, x_removed)
IF4(false, x, y, x_removed) → AVERAGE(s(x), p(p(y)), x_removed)

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(23) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule AVERAGE(x, y) → IF(le(x, 0), le(y, 0), le(y, s(0)), le(y, s(s(0))), x, y) at position [0] we obtained the following new rules [LPAR04]:

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)

(24) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(25) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule IF(false, b1, b2, b3, x, y) → AVERAGE(p(x), s(y)) at position [0] we obtained the following new rules [LPAR04]:

IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4))
IF(false, y0, y1, y2, 0, y4) → AVERAGE(0, s(y4))

(26) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(27) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(28) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(29) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule AVERAGE(0, y1) → IF(true, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), 0, y1) we obtained the following new rules [LPAR04]:

AVERAGE(0, s(z4)) → IF(true, le(s(z4), 0), le(s(z4), s(0)), le(s(z4), s(s(0))), 0, s(z4))

(30) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(31) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule AVERAGE(0, s(z4)) → IF(true, le(s(z4), 0), le(s(z4), s(0)), le(s(z4), s(s(0))), 0, s(z4)) at position [1] we obtained the following new rules [LPAR04]:

AVERAGE(0, s(z4)) → IF(true, false, le(s(z4), s(0)), le(s(z4), s(s(0))), 0, s(z4))

(32) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(33) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule AVERAGE(0, s(z4)) → IF(true, false, le(s(z4), s(0)), le(s(z4), s(s(0))), 0, s(z4)) at position [2] we obtained the following new rules [LPAR04]:

AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(s(z4), s(s(0))), 0, s(z4))

(34) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(35) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(s(z4), s(s(0))), 0, s(z4)) at position [3] we obtained the following new rules [LPAR04]:

AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4))

(36) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(37) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF(true, b1, b2, b3, x, y) → IF2(b1, b2, b3, x, y) we obtained the following new rules [LPAR04]:

IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0))

(38) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(39) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF2(false, b2, b3, x, y) → IF3(b2, b3, x, y) we obtained the following new rules [LPAR04]:

IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2))

(40) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(41) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF3(false, b3, x, y) → IF4(b3, x, y) we obtained the following new rules [LPAR04]:

IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2))

(42) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(43) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF4(false, x, y) → AVERAGE(s(x), p(p(y))) we obtained the following new rules [LPAR04]:

IF4(false, 0, s(z1)) → AVERAGE(s(0), p(p(s(z1))))

(44) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(45) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule IF4(false, 0, s(z1)) → AVERAGE(s(0), p(p(s(z1)))) at position [1,0] we obtained the following new rules [LPAR04]:

IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1))

(46) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(47) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule AVERAGE(s(x0), y1) → IF(false, le(y1, 0), le(y1, s(0)), le(y1, s(s(0))), s(x0), y1) we obtained the following new rules [LPAR04]:

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)

(48) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(49) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule 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)) at position [1] we obtained the following new rules [LPAR04]:

AVERAGE(s(x0), s(z4)) → IF(false, false, le(s(z4), s(0)), le(s(z4), s(s(0))), s(x0), s(z4))

(50) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(51) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule AVERAGE(s(x0), s(z4)) → IF(false, false, le(s(z4), s(0)), le(s(z4), s(s(0))), s(x0), s(z4)) at position [2] we obtained the following new rules [LPAR04]:

AVERAGE(s(x0), s(z4)) → IF(false, false, le(z4, 0), le(s(z4), s(s(0))), s(x0), s(z4))

(52) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(53) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule AVERAGE(s(x0), s(z4)) → IF(false, false, le(z4, 0), le(s(z4), s(s(0))), s(x0), s(z4)) at position [3] we obtained the following new rules [LPAR04]:

AVERAGE(s(x0), s(z4)) → IF(false, false, le(z4, 0), le(z4, s(0)), s(x0), s(z4))

(54) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(55) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF(false, y0, y1, y2, s(x0), y4) → AVERAGE(x0, s(y4)) we obtained the following new rules [LPAR04]:

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)))

(56) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(57) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule AVERAGE(s(x0), s(z4)) → IF(false, false, le(z4, 0), le(z4, s(0)), s(x0), s(z4)) we obtained the following new rules [LPAR04]:

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)))

(58) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(59) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule AVERAGE(s(x0), s(s(z3))) → IF(false, false, le(s(z3), 0), le(s(z3), s(0)), s(x0), s(s(z3))) at position [2] we obtained the following new rules [LPAR04]:

AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(s(z3), s(0)), s(x0), s(s(z3)))

(60) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(61) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(s(z3), s(0)), s(x0), s(s(z3))) at position [3] we obtained the following new rules [LPAR04]:

AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3)))

(62) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(63) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF(false, false, y_0, y_1, s(z0), s(z1)) → AVERAGE(z0, s(s(z1))) we obtained the following new rules [LPAR04]:

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))))

(64) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(65) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF2(false, z0, z1, 0, s(z2)) → IF3(z0, z1, 0, s(z2)) we obtained the following new rules [LPAR04]:

IF2(false, false, x1, 0, s(x2)) → IF3(false, x1, 0, s(x2))

(66) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(67) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF(true, false, y_0, y_1, 0, s(z0)) → IF2(false, y_0, y_1, 0, s(z0)) we obtained the following new rules [LPAR04]:

IF(true, false, false, x1, 0, s(x2)) → IF2(false, false, x1, 0, s(x2))

(68) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(69) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule AVERAGE(0, s(z4)) → IF(true, false, le(z4, 0), le(z4, s(0)), 0, s(z4)) at position [2] we obtained the following new rules [LPAR04]:

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)))

(70) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(71) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(72) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(73) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule AVERAGE(0, s(s(x0))) → IF(true, false, false, le(s(x0), s(0)), 0, s(s(x0))) at position [3] we obtained the following new rules [LPAR04]:

AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0)))

(74) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(75) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF(true, false, false, x1, 0, s(x2)) → IF2(false, false, x1, 0, s(x2)) we obtained the following new rules [LPAR04]:

IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0)))

(76) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(77) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF2(false, false, x1, 0, s(x2)) → IF3(false, x1, 0, s(x2)) we obtained the following new rules [LPAR04]:

IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1)))

(78) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(79) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF3(false, z1, 0, s(z2)) → IF4(z1, 0, s(z2)) we obtained the following new rules [LPAR04]:

IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1)))

(80) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(81) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF4(false, 0, s(z1)) → AVERAGE(s(0), p(z1)) we obtained the following new rules [LPAR04]:

IF4(false, 0, s(s(z1))) → AVERAGE(s(0), p(s(z1)))

(82) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

p(s(x)) → x
p(0) → 0
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(83) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(84) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

p(s(x)) → x
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(85) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule IF4(false, 0, s(s(z1))) → AVERAGE(s(0), p(s(z1))) at position [1] we obtained the following new rules [LPAR04]:

IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1)

(86) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)

The TRS R consists of the following rules:

p(s(x)) → x
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(87) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(88) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(s(x0))
p(0)
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(89) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

p(s(x0))
p(0)

(90) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(91) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF(false, y_0, y_1, y_2, s(0), z0) → AVERAGE(0, s(z0)) we obtained the following new rules [LPAR04]:

IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0)))

(92) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(93) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule 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) we obtained the following new rules [LPAR04]:

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)))

(94) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(95) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule 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)) at position [1] we obtained the following new rules [LPAR04]:

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))

(96) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(97) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule 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))) at position [1] we obtained the following new rules [LPAR04]:

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)))

(98) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(99) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule 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)) at position [2] we obtained the following new rules [LPAR04]:

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))

(100) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(101) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule 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))) at position [2] we obtained the following new rules [LPAR04]:

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)))

(102) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(103) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule 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)) at position [3] we obtained the following new rules [LPAR04]:

AVERAGE(s(0), s(y_4)) → IF(false, false, le(y_4, 0), le(y_4, s(0)), s(0), s(y_4))

(104) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(105) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule 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))) at position [2] we obtained the following new rules [LPAR04]:

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)))

(106) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(107) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule 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))) at position [3] we obtained the following new rules [LPAR04]:

AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(s(y_5), s(0)), s(0), s(s(y_5)))

(108) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(109) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(s(y_5), s(0)), s(0), s(s(y_5))) at position [3] we obtained the following new rules [LPAR04]:

AVERAGE(s(0), s(s(y_5))) → IF(false, false, false, le(y_5, 0), s(0), s(s(y_5)))

(110) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(111) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF(false, x0, x1, x2, s(0), s(y_0)) → AVERAGE(0, s(s(y_0))) we obtained the following new rules [LPAR04]:

IF(false, false, y_0, y_1, s(0), s(z0)) → AVERAGE(0, s(s(z0)))
IF(false, false, false, y_0, s(0), s(s(z1))) → AVERAGE(0, s(s(s(z1))))

(112) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(113) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF(false, false, false, y_0, s(z0), s(s(z1))) → AVERAGE(z0, s(s(s(z1)))) we obtained the following new rules [LPAR04]:

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(0), s(s(x2))) → AVERAGE(0, s(s(s(x2))))

(114) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(115) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule AVERAGE(s(x0), s(s(z3))) → IF(false, false, false, le(z3, 0), s(x0), s(s(z3))) we obtained the following new rules [LPAR04]:

AVERAGE(s(0), s(s(x1))) → IF(false, false, false, le(x1, 0), 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)))

(116) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(117) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs with 1 less node.

(118) Complex Obligation (AND)

(119) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(120) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF3(false, z0, 0, s(s(z1))) → IF4(z0, 0, s(s(z1))) we obtained the following new rules [LPAR04]:

IF3(false, false, 0, s(s(x1))) → IF4(false, 0, s(s(x1)))

(121) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(122) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF2(false, false, z0, 0, s(s(z1))) → IF3(false, z0, 0, s(s(z1))) we obtained the following new rules [LPAR04]:

IF2(false, false, false, 0, s(s(x1))) → IF3(false, false, 0, s(s(x1)))

(123) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(124) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF(true, false, false, y_0, 0, s(s(z0))) → IF2(false, false, y_0, 0, s(s(z0))) we obtained the following new rules [LPAR04]:

IF(true, false, false, false, 0, s(s(x1))) → IF2(false, false, false, 0, s(s(x1)))

(125) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(126) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule AVERAGE(0, s(s(x0))) → IF(true, false, false, le(x0, 0), 0, s(s(x0))) at position [3] we obtained the following new rules [LPAR04]:

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))))

(127) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(128) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(129) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(130) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF(false, false, y_1, y_2, s(0), s(x3)) → AVERAGE(0, s(s(x3))) we obtained the following new rules [LPAR04]:

IF(false, false, x0, x1, s(0), s(s(y_0))) → AVERAGE(0, s(s(s(y_0))))

(131) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(132) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule AVERAGE(s(0), s(x1)) → IF(false, false, le(x1, 0), le(x1, s(0)), s(0), s(x1)) we obtained the following new rules [LPAR04]:

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)))

(133) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(134) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule 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))) at position [2] we obtained the following new rules [LPAR04]:

AVERAGE(s(0), s(s(y_4))) → IF(false, false, false, le(s(y_4), s(0)), s(0), s(s(y_4)))

(135) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(136) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule AVERAGE(s(0), s(s(y_4))) → IF(false, false, false, le(s(y_4), s(0)), s(0), s(s(y_4))) at position [3] we obtained the following new rules [LPAR04]:

AVERAGE(s(0), s(s(y_4))) → IF(false, false, false, le(y_4, 0), s(0), s(s(y_4)))

(137) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(138) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(139) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(140) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF(false, false, x0, x1, s(0), s(s(y_0))) → AVERAGE(0, s(s(s(y_0)))) we obtained the following new rules [LPAR04]:

IF(false, false, false, y_0, s(0), s(s(z0))) → AVERAGE(0, s(s(s(z0))))

(141) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(142) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF4(false, 0, s(s(z1))) → AVERAGE(s(0), z1) we obtained the following new rules [LPAR04]:

IF4(false, 0, s(s(s(s(y_0))))) → AVERAGE(s(0), s(s(y_0)))

(143) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(144) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF4(false, 0, s(s(s(s(y_0))))) → AVERAGE(s(0), s(s(y_0)))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(AVERAGE(x1, x2)) = x1 + x2   
POL(IF(x1, x2, x3, x4, x5, x6)) = x1 + x6   
POL(IF2(x1, x2, x3, x4, x5)) = x5   
POL(IF3(x1, x2, x3, x4)) = x4   
POL(IF4(x1, x2, x3)) = x3   
POL(false) = 1   
POL(le(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   
POL(true) = 0   

The following usable rules [FROCOS05] were oriented: none

(145) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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))))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(146) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 6 less nodes.

(147) TRUE

(148) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(149) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(150) Obligation:

Q DP problem:
The TRS P consists of the following rules:

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)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(151) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • IF(false, false, false, x0, s(s(y_0)), s(s(x2))) → AVERAGE(s(y_0), s(s(s(x2))))
    The graph contains the following edges 5 > 1

  • AVERAGE(s(s(0)), s(s(x1))) → IF(false, false, false, le(x1, 0), s(s(0)), s(s(x1)))
    The graph contains the following edges 1 >= 5, 2 >= 6

  • AVERAGE(s(s(y_4)), s(s(x1))) → IF(false, false, false, le(x1, 0), s(s(y_4)), s(s(x1)))
    The graph contains the following edges 1 >= 5, 2 >= 6

(152) TRUE