(0) Obligation:

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

ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
id_inc(x) → x
id_inc(x) → s(x)
div(x, y) → if(ge(y, s(0)), ge(x, y), x, y)
if(false, b, x, y) → div_by_zero
if(true, false, x, y) → 0
if(true, true, x, y) → id_inc(div(minus(x, y), y))

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

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

(2) Obligation:

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

GE(s(x), s(y)) → GE(x, y)
MINUS(s(x), s(y)) → MINUS(x, y)
DIV(x, y) → IF(ge(y, s(0)), ge(x, y), x, y)
DIV(x, y) → GE(y, s(0))
DIV(x, y) → GE(x, y)
IF(true, true, x, y) → ID_INC(div(minus(x, y), y))
IF(true, true, x, y) → DIV(minus(x, y), y)
IF(true, true, x, y) → MINUS(x, y)

The TRS R consists of the following rules:

ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
id_inc(x) → x
id_inc(x) → s(x)
div(x, y) → if(ge(y, s(0)), ge(x, y), x, y)
if(false, b, x, y) → div_by_zero
if(true, false, x, y) → 0
if(true, true, x, y) → id_inc(div(minus(x, y), y))

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

(3) DependencyGraphProof (EQUIVALENT transformation)

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

(4) Complex Obligation (AND)

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

ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
id_inc(x) → x
id_inc(x) → s(x)
div(x, y) → if(ge(y, s(0)), ge(x, y), x, y)
if(false, b, x, y) → div_by_zero
if(true, false, x, y) → 0
if(true, true, x, y) → id_inc(div(minus(x, y), y))

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

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

(7) YES

(8) Obligation:

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

GE(s(x), s(y)) → GE(x, y)

The TRS R consists of the following rules:

ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
id_inc(x) → x
id_inc(x) → s(x)
div(x, y) → if(ge(y, s(0)), ge(x, y), x, y)
if(false, b, x, y) → div_by_zero
if(true, false, x, y) → 0
if(true, true, x, y) → id_inc(div(minus(x, y), y))

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

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

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

(10) YES

(11) Obligation:

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

DIV(x, y) → IF(ge(y, s(0)), ge(x, y), x, y)
IF(true, true, x, y) → DIV(minus(x, y), y)

The TRS R consists of the following rules:

ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
id_inc(x) → x
id_inc(x) → s(x)
div(x, y) → if(ge(y, s(0)), ge(x, y), x, y)
if(false, b, x, y) → div_by_zero
if(true, false, x, y) → 0
if(true, true, x, y) → id_inc(div(minus(x, y), y))

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

(12) NonTerminationLoopProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = IF(ge(id_inc(x), s(0)), ge(x'', id_inc(0)), x', y') evaluates to t =IF(ge(y', s(0)), ge(minus(x', y'), y'), minus(x', y'), y')

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
  • Matcher: [x / 0, x'' / minus(x', id_inc(0)), x' / minus(x', id_inc(0))]
  • Semiunifier: [y' / id_inc(0)]




Rewriting sequence

IF(ge(id_inc(x), s(0)), ge(x'', id_inc(0)), x', id_inc(0))IF(ge(id_inc(x), s(0)), ge(x'', 0), x', id_inc(0))
with rule id_inc(x1) → x1 at position [1,1] and matcher [x1 / 0]

IF(ge(id_inc(x), s(0)), ge(x'', 0), x', id_inc(0))IF(ge(id_inc(x), s(0)), true, x', id_inc(0))
with rule ge(x''', 0) → true at position [1] and matcher [x''' / x'']

IF(ge(id_inc(x), s(0)), true, x', id_inc(0))IF(ge(s(x), s(0)), true, x', id_inc(0))
with rule id_inc(x'') → s(x'') at position [0,0] and matcher [x'' / x]

IF(ge(s(x), s(0)), true, x', id_inc(0))IF(ge(x, 0), true, x', id_inc(0))
with rule ge(s(x''), s(y)) → ge(x'', y) at position [0] and matcher [x'' / x, y / 0]

IF(ge(x, 0), true, x', id_inc(0))IF(true, true, x', id_inc(0))
with rule ge(x'', 0) → true at position [0] and matcher [x'' / x]

IF(true, true, x', id_inc(0))DIV(minus(x', id_inc(0)), id_inc(0))
with rule IF(true, true, x'', y') → DIV(minus(x'', y'), y') at position [] and matcher [x'' / x', y' / id_inc(0)]

DIV(minus(x', id_inc(0)), id_inc(0))IF(ge(id_inc(0), s(0)), ge(minus(x', id_inc(0)), id_inc(0)), minus(x', id_inc(0)), id_inc(0))
with rule DIV(x, y) → IF(ge(y, s(0)), ge(x, y), x, y)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.



(13) NO