(0) Obligation:

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

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

Q is empty.

(1) AAECC Innermost (EQUIVALENT transformation)

We have applied [NOC,AAECCNOC] to switch to innermost. The TRS R 1 is

if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError

The TRS R 2 is

ac
ad

The signature Sigma is {c, a, d}

(2) Obligation:

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

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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

DIV(x, y) → DIV2(x, y, 0)
DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
DIV2(x, y, i) → LE(y, 0)
DIV2(x, y, i) → LE(y, x)
DIV2(x, y, i) → PLUS(i, 0)
DIV2(x, y, i) → INC(i)
IF1(false, b, x, y, i, j) → IF2(b, x, y, i, j)
IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j)
IF2(true, x, y, i, j) → MINUS(x, y)
INC(s(i)) → INC(i)
LE(s(x), s(y)) → LE(x, y)
MINUS(s(x), s(y)) → MINUS(x, y)
PLUS(x, y) → PLUSITER(x, y, 0)
PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z)
PLUSITER(x, y, z) → LE(x, z)
IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z))

The TRS R consists of the following rules:

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

MINUS(s(x), s(y)) → MINUS(x, y)

The TRS R consists of the following rules:

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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:

MINUS(s(x), s(y)) → MINUS(x, y)

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

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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].

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

(11) Obligation:

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

MINUS(s(x), s(y)) → MINUS(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:

  • MINUS(s(x), s(y)) → MINUS(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:

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

The TRS R consists of the following rules:

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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:

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

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

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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].

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

(18) 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.

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

(20) TRUE

(21) Obligation:

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

PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z)
IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z))

The TRS R consists of the following rules:

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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

(22) 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.

(23) Obligation:

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

PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z)
IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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

(24) 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].

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

(25) Obligation:

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

PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z)
IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

(26) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z) we obtained the following new rules [LPAR04]:

PLUSITER(z0, s(z1), s(z2)) → IFPLUS(le(z0, s(z2)), z0, s(z1), s(z2))

(27) Obligation:

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

IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z))
PLUSITER(z0, s(z1), s(z2)) → IFPLUS(le(z0, s(z2)), z0, s(z1), s(z2))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

(28) NonInfProof (EQUIVALENT transformation)

The DP Problem is simplified using the Induction Calculus [NONINF] with the following steps:
Note that final constraints are written in bold face.


For Pair PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z) the following chains were created:
  • We consider the chain IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z)), PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z) which results in the following constraint:

    (1)    (PLUSITER(x3, s(x4), s(x5))=PLUSITER(x6, x7, x8) ⇒ PLUSITER(x6, x7, x8)≥IFPLUS(le(x6, x8), x6, x7, x8))



    We simplified constraint (1) using rules (I), (II), (III) which results in the following new constraint:

    (2)    (PLUSITER(x3, s(x4), s(x5))≥IFPLUS(le(x3, s(x5)), x3, s(x4), s(x5)))







For Pair IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z)) the following chains were created:
  • We consider the chain PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z), IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z)) which results in the following constraint:

    (3)    (IFPLUS(le(x9, x11), x9, x10, x11)=IFPLUS(false, x12, x13, x14) ⇒ IFPLUS(false, x12, x13, x14)≥PLUSITER(x12, s(x13), s(x14)))



    We simplified constraint (3) using rules (I), (II), (III) which results in the following new constraint:

    (4)    (le(x9, x11)=falseIFPLUS(false, x9, x10, x11)≥PLUSITER(x9, s(x10), s(x11)))



    We simplified constraint (4) using rule (V) (with possible (I) afterwards) using induction on le(x9, x11)=false which results in the following new constraints:

    (5)    (false=falseIFPLUS(false, s(x18), x10, 0)≥PLUSITER(s(x18), s(x10), s(0)))


    (6)    (le(x21, x20)=false∧(∀x22:le(x21, x20)=falseIFPLUS(false, x21, x22, x20)≥PLUSITER(x21, s(x22), s(x20))) ⇒ IFPLUS(false, s(x21), x10, s(x20))≥PLUSITER(s(x21), s(x10), s(s(x20))))



    We simplified constraint (5) using rules (I), (II) which results in the following new constraint:

    (7)    (IFPLUS(false, s(x18), x10, 0)≥PLUSITER(s(x18), s(x10), s(0)))



    We simplified constraint (6) using rule (VI) where we applied the induction hypothesis (∀x22:le(x21, x20)=falseIFPLUS(false, x21, x22, x20)≥PLUSITER(x21, s(x22), s(x20))) with σ = [x22 / x10] which results in the following new constraint:

    (8)    (IFPLUS(false, x21, x10, x20)≥PLUSITER(x21, s(x10), s(x20)) ⇒ IFPLUS(false, s(x21), x10, s(x20))≥PLUSITER(s(x21), s(x10), s(s(x20))))







To summarize, we get the following constraints P for the following pairs.
  • PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z)
    • (PLUSITER(x3, s(x4), s(x5))≥IFPLUS(le(x3, s(x5)), x3, s(x4), s(x5)))

  • IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z))
    • (IFPLUS(false, s(x18), x10, 0)≥PLUSITER(s(x18), s(x10), s(0)))
    • (IFPLUS(false, x21, x10, x20)≥PLUSITER(x21, s(x10), s(x20)) ⇒ IFPLUS(false, s(x21), x10, s(x20))≥PLUSITER(s(x21), s(x10), s(s(x20))))




The constraints for P> respective Pbound are constructed from P where we just replace every occurence of "t ≥ s" in P by "t > s" respective "t ≥ c". Here c stands for the fresh constant used for Pbound.
Using the following integer polynomial ordering the resulting constraints can be solved
Polynomial interpretation [NONINF]:

POL(0) = 0   
POL(IFPLUS(x1, x2, x3, x4)) = -1 - x1 + x2 - x4   
POL(PLUSITER(x1, x2, x3)) = -1 + x1 - x3   
POL(c) = -2   
POL(false) = 0   
POL(le(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   
POL(true) = 1   

The following pairs are in P>:

IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z))
The following pairs are in Pbound:

IFPLUS(false, x, y, z) → PLUSITER(x, s(y), s(z))
The following rules are usable:

le(x, y) → le(s(x), s(y))
falsele(s(x), 0)
truele(0, y)

(29) Obligation:

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

PLUSITER(x, y, z) → IFPLUS(le(x, z), x, y, z)

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

(30) DependencyGraphProof (EQUIVALENT transformation)

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

(31) TRUE

(32) Obligation:

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

INC(s(i)) → INC(i)

The TRS R consists of the following rules:

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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

(33) 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.

(34) Obligation:

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

INC(s(i)) → INC(i)

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

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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

(35) 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].

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

(36) Obligation:

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

INC(s(i)) → INC(i)

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

(37) 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:

  • INC(s(i)) → INC(i)
    The graph contains the following edges 1 > 1

(38) TRUE

(39) Obligation:

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

IF1(false, b, x, y, i, j) → IF2(b, x, y, i, j)
IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j)
DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))

The TRS R consists of the following rules:

div(x, y) → div2(x, y, 0)
div2(x, y, i) → if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))
if1(true, b, x, y, i, j) → divZeroError
if1(false, b, x, y, i, j) → if2(b, x, y, i, j)
if2(true, x, y, i, j) → div2(minus(x, y), y, j)
if2(false, x, y, i, j) → i
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, y) → plusIter(x, y, 0)
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
ac
ad

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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

(40) 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.

(41) Obligation:

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

IF1(false, b, x, y, i, j) → IF2(b, x, y, i, j)
IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j)
DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
plus(x, y) → plusIter(x, y, 0)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)
a

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

(42) 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].

div(x0, x1)
div2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, x3)
if2(false, x0, x1, x2, x3)
a

(43) Obligation:

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

IF1(false, b, x, y, i, j) → IF2(b, x, y, i, j)
IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j)
DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i))

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
plus(x, y) → plusIter(x, y, 0)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(44) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) at position [4] we obtained the following new rules [LPAR04]:

DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, plusIter(i, 0, 0), inc(i))

(45) Obligation:

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

IF1(false, b, x, y, i, j) → IF2(b, x, y, i, j)
IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j)
DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, plusIter(i, 0, 0), inc(i))

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
plus(x, y) → plusIter(x, y, 0)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(46) 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.

(47) Obligation:

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

IF1(false, b, x, y, i, j) → IF2(b, x, y, i, j)
IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j)
DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, plusIter(i, 0, 0), inc(i))

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plus(x0, x1)
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(48) 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].

plus(x0, x1)

(49) Obligation:

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

IF1(false, b, x, y, i, j) → IF2(b, x, y, i, j)
IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j)
DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, plusIter(i, 0, 0), inc(i))

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(50) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, plusIter(i, 0, 0), inc(i)) at position [4] we obtained the following new rules [LPAR04]:

DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, ifPlus(le(i, 0), i, 0, 0), inc(i))

(51) Obligation:

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

IF1(false, b, x, y, i, j) → IF2(b, x, y, i, j)
IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j)
DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, ifPlus(le(i, 0), i, 0, 0), inc(i))

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(52) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule DIV2(x, y, i) → IF1(le(y, 0), le(y, x), x, y, ifPlus(le(i, 0), i, 0, 0), inc(i)) at position [0] we obtained the following new rules [LPAR04]:

DIV2(y0, s(x0), y2) → IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))
DIV2(y0, 0, y2) → IF1(true, le(0, y0), y0, 0, ifPlus(le(y2, 0), y2, 0, 0), inc(y2))

(53) Obligation:

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

IF1(false, b, x, y, i, j) → IF2(b, x, y, i, j)
IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j)
DIV2(y0, s(x0), y2) → IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))
DIV2(y0, 0, y2) → IF1(true, le(0, y0), y0, 0, ifPlus(le(y2, 0), y2, 0, 0), inc(y2))

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(54) DependencyGraphProof (EQUIVALENT transformation)

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

(55) Obligation:

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

IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j)
DIV2(y0, s(x0), y2) → IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))
IF1(false, b, x, y, i, j) → IF2(b, x, y, i, j)

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(56) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF1(false, b, x, y, i, j) → IF2(b, x, y, i, j) we obtained the following new rules [LPAR04]:

IF1(false, y_0, z0, s(z1), y_2, y_3) → IF2(y_0, z0, s(z1), y_2, y_3)

(57) Obligation:

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

IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j)
DIV2(y0, s(x0), y2) → IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))
IF1(false, y_0, z0, s(z1), y_2, y_3) → IF2(y_0, z0, s(z1), y_2, y_3)

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(58) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF2(true, x, y, i, j) → DIV2(minus(x, y), y, j) we obtained the following new rules [LPAR04]:

IF2(true, z1, s(z2), z3, z4) → DIV2(minus(z1, s(z2)), s(z2), z4)

(59) Obligation:

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

DIV2(y0, s(x0), y2) → IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))
IF1(false, y_0, z0, s(z1), y_2, y_3) → IF2(y_0, z0, s(z1), y_2, y_3)
IF2(true, z1, s(z2), z3, z4) → DIV2(minus(z1, s(z2)), s(z2), z4)

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(60) ForwardInstantiation (EQUIVALENT transformation)

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

IF1(false, true, x1, s(x2), x3, x4) → IF2(true, x1, s(x2), x3, x4)

(61) Obligation:

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

DIV2(y0, s(x0), y2) → IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))
IF2(true, z1, s(z2), z3, z4) → DIV2(minus(z1, s(z2)), s(z2), z4)
IF1(false, true, x1, s(x2), x3, x4) → IF2(true, x1, s(x2), x3, x4)

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(62) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule DIV2(y0, s(x0), y2) → IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) at position [1] we obtained the following new rules [LPAR04]:

DIV2(0, s(x0), y2) → IF1(false, false, 0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))
DIV2(s(x1), s(x0), y2) → IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))

(63) Obligation:

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

IF2(true, z1, s(z2), z3, z4) → DIV2(minus(z1, s(z2)), s(z2), z4)
IF1(false, true, x1, s(x2), x3, x4) → IF2(true, x1, s(x2), x3, x4)
DIV2(0, s(x0), y2) → IF1(false, false, 0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))
DIV2(s(x1), s(x0), y2) → IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(64) DependencyGraphProof (EQUIVALENT transformation)

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

(65) Obligation:

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

DIV2(s(x1), s(x0), y2) → IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))
IF1(false, true, x1, s(x2), x3, x4) → IF2(true, x1, s(x2), x3, x4)
IF2(true, z1, s(z2), z3, z4) → DIV2(minus(z1, s(z2)), s(z2), z4)

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(66) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule IF2(true, z1, s(z2), z3, z4) → DIV2(minus(z1, s(z2)), s(z2), z4) at position [0] we obtained the following new rules [LPAR04]:

IF2(true, 0, s(y1), y2, y3) → DIV2(0, s(y1), y3)
IF2(true, s(x0), s(x1), y2, y3) → DIV2(minus(x0, x1), s(x1), y3)

(67) Obligation:

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

DIV2(s(x1), s(x0), y2) → IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))
IF1(false, true, x1, s(x2), x3, x4) → IF2(true, x1, s(x2), x3, x4)
IF2(true, 0, s(y1), y2, y3) → DIV2(0, s(y1), y3)
IF2(true, s(x0), s(x1), y2, y3) → DIV2(minus(x0, x1), s(x1), y3)

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(68) DependencyGraphProof (EQUIVALENT transformation)

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

(69) Obligation:

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

IF1(false, true, x1, s(x2), x3, x4) → IF2(true, x1, s(x2), x3, x4)
IF2(true, s(x0), s(x1), y2, y3) → DIV2(minus(x0, x1), s(x1), y3)
DIV2(s(x1), s(x0), y2) → IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(70) Instantiation (EQUIVALENT transformation)

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

IF1(false, true, s(z0), s(z1), y_2, y_3) → IF2(true, s(z0), s(z1), y_2, y_3)

(71) Obligation:

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

IF2(true, s(x0), s(x1), y2, y3) → DIV2(minus(x0, x1), s(x1), y3)
DIV2(s(x1), s(x0), y2) → IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))
IF1(false, true, s(z0), s(z1), y_2, y_3) → IF2(true, s(z0), s(z1), y_2, y_3)

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(72) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF2(true, s(x0), s(x1), y2, y3) → DIV2(minus(x0, x1), s(x1), y3)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(DIV2(x1, x2, x3)) = x1   
POL(IF1(x1, x2, x3, x4, x5, x6)) = x3   
POL(IF2(x1, x2, x3, x4, x5)) = x2   
POL(false) = 0   
POL(ifPlus(x1, x2, x3, x4)) = 0   
POL(inc(x1)) = 0   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(plusIter(x1, x2, x3)) = 0   
POL(s(x1)) = 1 + x1   
POL(true) = 0   

The following usable rules [FROCOS05] were oriented:

minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
minus(0, y) → 0

(73) Obligation:

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

DIV2(s(x1), s(x0), y2) → IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))
IF1(false, true, s(z0), s(z1), y_2, y_3) → IF2(true, s(z0), s(z1), y_2, y_3)

The TRS R consists of the following rules:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
ifPlus(false, x, y, z) → plusIter(x, s(y), s(z))
plusIter(x, y, z) → ifPlus(le(x, z), x, y, z)
inc(0) → 0
inc(s(i)) → s(inc(i))
ifPlus(true, x, y, z) → y
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
plusIter(x0, x1, x2)
ifPlus(true, x0, x1, x2)
ifPlus(false, x0, x1, x2)

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

(74) DependencyGraphProof (EQUIVALENT transformation)

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

(75) TRUE