Termination w.r.t. Q of the following Term Rewriting System could be disproven:

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.


QTRS
  ↳ DependencyPairsProof

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.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

IF(true, true, x, y) → ID_INC(div(minus(x, y), y))
MINUS(s(x), s(y)) → MINUS(x, y)
IF(true, true, x, y) → DIV(minus(x, y), y)
DIV(x, y) → GE(x, y)
DIV(x, y) → IF(ge(y, s(0)), ge(x, y), x, y)
DIV(x, y) → GE(y, s(0))
GE(s(x), s(y)) → GE(x, 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.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

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

IF(true, true, x, y) → ID_INC(div(minus(x, y), y))
MINUS(s(x), s(y)) → MINUS(x, y)
IF(true, true, x, y) → DIV(minus(x, y), y)
DIV(x, y) → GE(x, y)
DIV(x, y) → IF(ge(y, s(0)), ge(x, y), x, y)
DIV(x, y) → GE(y, s(0))
GE(s(x), s(y)) → GE(x, 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.
The approximation of the Dependency Graph [15,17,22] contains 3 SCCs with 4 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP

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.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP

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.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP

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.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP

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

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

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] 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:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ NonTerminationProof

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

IF(true, true, x, y) → DIV(minus(x, y), y)
DIV(x, y) → IF(ge(y, s(0)), ge(x, y), 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.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

IF(true, true, x, y) → DIV(minus(x, y), y)
DIV(x, y) → IF(ge(y, s(0)), ge(x, y), 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))


s = DIV(x0, id_inc(0)) evaluates to t =DIV(minus(x0, id_inc(0)), id_inc(0))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

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

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

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

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

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

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

IF(true, true, x0, id_inc(0))DIV(minus(x0, id_inc(0)), id_inc(0))
with rule IF(true, true, x, y) → DIV(minus(x, y), 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.