(0) Obligation:

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

gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)
divides(x, y) → div(x, y, y)
div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
prime(x) → test(x, s(s(0)))
test(x, y) → if1(gt(x, y), x, y)
if1(true, x, y) → if2(divides(x, y), x, y)
if1(false, x, y) → true
if2(true, x, y) → false
if2(false, x, y) → test(x, s(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:

gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)
divides(x, y) → div(x, y, y)
div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
prime(x) → test(x, s(s(0)))
test(x, y) → if1(gt(x, y), x, y)
if1(true, x, y) → if2(divides(x, y), x, y)
if1(false, x, y) → true
if2(true, x, y) → false
if2(false, x, y) → test(x, s(y))

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)
prime(x0)
test(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(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:

GT(s(x), s(y)) → GT(x, y)
DIVIDES(x, y) → DIV(x, y, y)
DIV(s(x), 0, s(z)) → DIV(s(x), s(z), s(z))
DIV(s(x), s(y), z) → DIV(x, y, z)
PRIME(x) → TEST(x, s(s(0)))
TEST(x, y) → IF1(gt(x, y), x, y)
TEST(x, y) → GT(x, y)
IF1(true, x, y) → IF2(divides(x, y), x, y)
IF1(true, x, y) → DIVIDES(x, y)
IF2(false, x, y) → TEST(x, s(y))

The TRS R consists of the following rules:

gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)
divides(x, y) → div(x, y, y)
div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
prime(x) → test(x, s(s(0)))
test(x, y) → if1(gt(x, y), x, y)
if1(true, x, y) → if2(divides(x, y), x, y)
if1(false, x, y) → true
if2(true, x, y) → false
if2(false, x, y) → test(x, s(y))

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)
prime(x0)
test(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(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 3 SCCs with 4 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

DIV(s(x), s(y), z) → DIV(x, y, z)
DIV(s(x), 0, s(z)) → DIV(s(x), s(z), s(z))

The TRS R consists of the following rules:

gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)
divides(x, y) → div(x, y, y)
div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
prime(x) → test(x, s(s(0)))
test(x, y) → if1(gt(x, y), x, y)
if1(true, x, y) → if2(divides(x, y), x, y)
if1(false, x, y) → true
if2(true, x, y) → false
if2(false, x, y) → test(x, s(y))

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)
prime(x0)
test(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(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:

DIV(s(x), s(y), z) → DIV(x, y, z)
DIV(s(x), 0, s(z)) → DIV(s(x), s(z), s(z))

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

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)
prime(x0)
test(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(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].

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)
prime(x0)
test(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

(11) Obligation:

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

DIV(s(x), s(y), z) → DIV(x, y, z)
DIV(s(x), 0, s(z)) → DIV(s(x), s(z), s(z))

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:

  • DIV(s(x), s(y), z) → DIV(x, y, z)
    The graph contains the following edges 1 > 1, 2 > 2, 3 >= 3

  • DIV(s(x), 0, s(z)) → DIV(s(x), s(z), s(z))
    The graph contains the following edges 1 >= 1, 3 >= 2, 3 >= 3

(13) TRUE

(14) Obligation:

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

GT(s(x), s(y)) → GT(x, y)

The TRS R consists of the following rules:

gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)
divides(x, y) → div(x, y, y)
div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
prime(x) → test(x, s(s(0)))
test(x, y) → if1(gt(x, y), x, y)
if1(true, x, y) → if2(divides(x, y), x, y)
if1(false, x, y) → true
if2(true, x, y) → false
if2(false, x, y) → test(x, s(y))

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)
prime(x0)
test(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(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:

GT(s(x), s(y)) → GT(x, y)

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

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)
prime(x0)
test(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(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].

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)
prime(x0)
test(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

(18) Obligation:

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

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

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

TEST(x, y) → IF1(gt(x, y), x, y)
IF1(true, x, y) → IF2(divides(x, y), x, y)
IF2(false, x, y) → TEST(x, s(y))

The TRS R consists of the following rules:

gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)
divides(x, y) → div(x, y, y)
div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
prime(x) → test(x, s(s(0)))
test(x, y) → if1(gt(x, y), x, y)
if1(true, x, y) → if2(divides(x, y), x, y)
if1(false, x, y) → true
if2(true, x, y) → false
if2(false, x, y) → test(x, s(y))

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)
prime(x0)
test(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

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:

TEST(x, y) → IF1(gt(x, y), x, y)
IF1(true, x, y) → IF2(divides(x, y), x, y)
IF2(false, x, y) → TEST(x, s(y))

The TRS R consists of the following rules:

divides(x, y) → div(x, y, y)
div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)
prime(x0)
test(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

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

prime(x0)
test(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

(25) Obligation:

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

TEST(x, y) → IF1(gt(x, y), x, y)
IF1(true, x, y) → IF2(divides(x, y), x, y)
IF2(false, x, y) → TEST(x, s(y))

The TRS R consists of the following rules:

divides(x, y) → div(x, y, y)
div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)

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

(26) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule TEST(x, y) → IF1(gt(x, y), x, y) we obtained the following new rules [LPAR04]:

TEST(z0, s(z1)) → IF1(gt(z0, s(z1)), z0, s(z1))

(27) Obligation:

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

IF1(true, x, y) → IF2(divides(x, y), x, y)
IF2(false, x, y) → TEST(x, s(y))
TEST(z0, s(z1)) → IF1(gt(z0, s(z1)), z0, s(z1))

The TRS R consists of the following rules:

divides(x, y) → div(x, y, y)
div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)

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

(28) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule IF1(true, x, y) → IF2(divides(x, y), x, y) at position [0] we obtained the following new rules [LPAR04]:

IF1(true, x, y) → IF2(div(x, y, y), x, y)

(29) Obligation:

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

TEST(x, y) → IF1(gt(x, y), x, y)
IF2(false, x, y) → TEST(x, s(y))
IF1(true, x, y) → IF2(div(x, y, y), x, y)

The TRS R consists of the following rules:

divides(x, y) → div(x, y, y)
div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)

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

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

(31) Obligation:

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

TEST(x, y) → IF1(gt(x, y), x, y)
IF2(false, x, y) → TEST(x, s(y))
IF1(true, x, y) → IF2(div(x, y, y), x, y)

The TRS R consists of the following rules:

div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
divides(x0, x1)
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)

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

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

divides(x0, x1)

(33) Obligation:

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

TEST(x, y) → IF1(gt(x, y), x, y)
IF2(false, x, y) → TEST(x, s(y))
IF1(true, x, y) → IF2(div(x, y, y), x, y)

The TRS R consists of the following rules:

div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)

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

(34) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule TEST(x, y) → IF1(gt(x, y), x, y) we obtained the following new rules [LPAR04]:

TEST(z0, s(z1)) → IF1(gt(z0, s(z1)), z0, s(z1))

(35) Obligation:

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

IF2(false, x, y) → TEST(x, s(y))
IF1(true, x, y) → IF2(div(x, y, y), x, y)
TEST(z0, s(z1)) → IF1(gt(z0, s(z1)), z0, s(z1))

The TRS R consists of the following rules:

div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)

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

(36) 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 TEST(x, y) → IF1(gt(x, y), x, y) the following chains were created:
  • We consider the chain IF2(false, x, y) → TEST(x, s(y)), TEST(x, y) → IF1(gt(x, y), x, y) which results in the following constraint:

    (1)    (TEST(x2, s(x3))=TEST(x4, x5) ⇒ TEST(x4, x5)≥IF1(gt(x4, x5), x4, x5))



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

    (2)    (TEST(x2, s(x3))≥IF1(gt(x2, s(x3)), x2, s(x3)))







For Pair IF2(false, x, y) → TEST(x, s(y)) the following chains were created:
  • We consider the chain IF1(true, x, y) → IF2(div(x, y, y), x, y), IF2(false, x, y) → TEST(x, s(y)) which results in the following constraint:

    (3)    (IF2(div(x12, x13, x13), x12, x13)=IF2(false, x14, x15) ⇒ IF2(false, x14, x15)≥TEST(x14, s(x15)))



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

    (4)    (x13=x24div(x12, x13, x24)=falseIF2(false, x12, x13)≥TEST(x12, s(x13)))



    We simplified constraint (4) using rule (V) (with possible (I) afterwards) using induction on div(x12, x13, x24)=false which results in the following new constraints:

    (5)    (false=falses(x27)=x26IF2(false, 0, s(x27))≥TEST(0, s(s(x27))))


    (6)    (div(s(x29), s(x28), s(x28))=false0=s(x28)∧(div(s(x29), s(x28), s(x28))=falses(x28)=s(x28) ⇒ IF2(false, s(x29), s(x28))≥TEST(s(x29), s(s(x28)))) ⇒ IF2(false, s(x29), 0)≥TEST(s(x29), s(0)))


    (7)    (div(x32, x31, x30)=falses(x31)=x30∧(div(x32, x31, x30)=falsex31=x30IF2(false, x32, x31)≥TEST(x32, s(x31))) ⇒ IF2(false, s(x32), s(x31))≥TEST(s(x32), s(s(x31))))



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

    (8)    (IF2(false, 0, s(x27))≥TEST(0, s(s(x27))))



    We solved constraint (6) using rules (I), (II).We simplified constraint (7) using rule (IV) which results in the following new constraint:

    (9)    (div(x32, x31, x30)=falses(x31)=x30IF2(false, s(x32), s(x31))≥TEST(s(x32), s(s(x31))))



    We simplified constraint (9) using rule (V) (with possible (I) afterwards) using induction on div(x32, x31, x30)=false which results in the following new constraints:

    (10)    (false=falses(s(x35))=x34IF2(false, s(0), s(s(x35)))≥TEST(s(0), s(s(s(x35)))))


    (11)    (div(s(x37), s(x36), s(x36))=falses(0)=s(x36)∧(div(s(x37), s(x36), s(x36))=falses(s(x36))=s(x36) ⇒ IF2(false, s(s(x37)), s(s(x36)))≥TEST(s(s(x37)), s(s(s(x36))))) ⇒ IF2(false, s(s(x37)), s(0))≥TEST(s(s(x37)), s(s(0))))


    (12)    (div(x40, x39, x38)=falses(s(x39))=x38∧(div(x40, x39, x38)=falses(x39)=x38IF2(false, s(x40), s(x39))≥TEST(s(x40), s(s(x39)))) ⇒ IF2(false, s(s(x40)), s(s(x39)))≥TEST(s(s(x40)), s(s(s(x39)))))



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

    (13)    (IF2(false, s(0), s(s(x35)))≥TEST(s(0), s(s(s(x35)))))



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

    (14)    (IF2(false, s(s(x37)), s(0))≥TEST(s(s(x37)), s(s(0))))



    We simplified constraint (12) using rules (III), (IV) which results in the following new constraint:

    (15)    (IF2(false, s(s(x40)), s(s(x39)))≥TEST(s(s(x40)), s(s(s(x39)))))







For Pair IF1(true, x, y) → IF2(div(x, y, y), x, y) the following chains were created:
  • We consider the chain TEST(x, y) → IF1(gt(x, y), x, y), IF1(true, x, y) → IF2(div(x, y, y), x, y) which results in the following constraint:

    (16)    (IF1(gt(x16, x17), x16, x17)=IF1(true, x18, x19) ⇒ IF1(true, x18, x19)≥IF2(div(x18, x19, x19), x18, x19))



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

    (17)    (gt(x16, x17)=trueIF1(true, x16, x17)≥IF2(div(x16, x17, x17), x16, x17))



    We simplified constraint (17) using rule (V) (with possible (I) afterwards) using induction on gt(x16, x17)=true which results in the following new constraints:

    (18)    (true=trueIF1(true, s(x44), 0)≥IF2(div(s(x44), 0, 0), s(x44), 0))


    (19)    (gt(x47, x46)=true∧(gt(x47, x46)=trueIF1(true, x47, x46)≥IF2(div(x47, x46, x46), x47, x46)) ⇒ IF1(true, s(x47), s(x46))≥IF2(div(s(x47), s(x46), s(x46)), s(x47), s(x46)))



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

    (20)    (IF1(true, s(x44), 0)≥IF2(div(s(x44), 0, 0), s(x44), 0))



    We simplified constraint (19) using rule (VI) where we applied the induction hypothesis (gt(x47, x46)=trueIF1(true, x47, x46)≥IF2(div(x47, x46, x46), x47, x46)) with σ = [ ] which results in the following new constraint:

    (21)    (IF1(true, x47, x46)≥IF2(div(x47, x46, x46), x47, x46) ⇒ IF1(true, s(x47), s(x46))≥IF2(div(s(x47), s(x46), s(x46)), s(x47), s(x46)))







To summarize, we get the following constraints P for the following pairs.
  • TEST(x, y) → IF1(gt(x, y), x, y)
    • (TEST(x2, s(x3))≥IF1(gt(x2, s(x3)), x2, s(x3)))

  • IF2(false, x, y) → TEST(x, s(y))
    • (IF2(false, 0, s(x27))≥TEST(0, s(s(x27))))
    • (IF2(false, s(0), s(s(x35)))≥TEST(s(0), s(s(s(x35)))))
    • (IF2(false, s(s(x37)), s(0))≥TEST(s(s(x37)), s(s(0))))
    • (IF2(false, s(s(x40)), s(s(x39)))≥TEST(s(s(x40)), s(s(s(x39)))))

  • IF1(true, x, y) → IF2(div(x, y, y), x, y)
    • (IF1(true, s(x44), 0)≥IF2(div(s(x44), 0, 0), s(x44), 0))
    • (IF1(true, x47, x46)≥IF2(div(x47, x46, x46), x47, x46) ⇒ IF1(true, s(x47), s(x46))≥IF2(div(s(x47), s(x46), s(x46)), s(x47), s(x46)))




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(IF1(x1, x2, x3)) = -1 - x1 + x2 - x3   
POL(IF2(x1, x2, x3)) = -1 - x1 + x2 - x3   
POL(TEST(x1, x2)) = -1 + x1 - x2   
POL(c) = -2   
POL(div(x1, x2, x3)) = 0   
POL(false) = 0   
POL(gt(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   
POL(true) = 0   

The following pairs are in P>:

IF2(false, x, y) → TEST(x, s(y))
The following pairs are in Pbound:

IF1(true, x, y) → IF2(div(x, y, y), x, y)
The following rules are usable:

truediv(0, 0, z)
truegt(s(x), 0)
div(s(x), s(z), s(z)) → div(s(x), 0, s(z))
div(x, y, z) → div(s(x), s(y), z)
falsediv(0, s(x), z)
falsegt(0, y)
gt(x, y) → gt(s(x), s(y))

(37) Complex Obligation (AND)

(38) Obligation:

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

TEST(x, y) → IF1(gt(x, y), x, y)
IF1(true, x, y) → IF2(div(x, y, y), x, y)

The TRS R consists of the following rules:

div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)

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

(39) DependencyGraphProof (EQUIVALENT transformation)

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

(40) TRUE

(41) Obligation:

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

TEST(x, y) → IF1(gt(x, y), x, y)
IF2(false, x, y) → TEST(x, s(y))

The TRS R consists of the following rules:

div(0, 0, z) → true
div(0, s(x), z) → false
div(s(x), 0, s(z)) → div(s(x), s(z), s(z))
div(s(x), s(y), z) → div(x, y, z)
gt(s(x), 0) → true
gt(0, y) → false
gt(s(x), s(y)) → gt(x, y)

The set Q consists of the following terms:

gt(s(x0), 0)
gt(0, x0)
gt(s(x0), s(x1))
div(0, 0, x0)
div(0, s(x0), x1)
div(s(x0), 0, s(x1))
div(s(x0), s(x1), x2)

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

(42) DependencyGraphProof (EQUIVALENT transformation)

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

(43) TRUE