Left Termination of the query pattern div(b,b,f) w.r.t. the given Prolog program could successfully be proven:



PROLOG
  ↳ PrologToPiTRSProof

div3(X, Y, Z) :- quot4(X, Y, Y, Z).
quot4(00, s1(Y), s1(Z), 00).
quot4(s1(X), s1(Y), Z, U) :- quot4(X, Y, Z, U).
quot4(X, 00, s1(Z), s1(U)) :- quot4(X, s1(Z), s1(Z), U).


With regard to the inferred argument filtering the predicates were used in the following modes:
div3: (b,b,f)
quot4: (b,b,b,f)
Transforming PROLOG into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:


div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of PROLOG



↳ PROLOG
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)


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

DIV_3_IN_GGA3(X, Y, Z) -> IF_DIV_3_IN_1_GGA4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
DIV_3_IN_GGA3(X, Y, Z) -> QUOT_4_IN_GGGA4(X, Y, Y, Z)
QUOT_4_IN_GGGA4(s_11(X), s_11(Y), Z, U) -> IF_QUOT_4_IN_1_GGGA5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
QUOT_4_IN_GGGA4(s_11(X), s_11(Y), Z, U) -> QUOT_4_IN_GGGA4(X, Y, Z, U)
QUOT_4_IN_GGGA4(X, 0_0, s_11(Z), s_11(U)) -> IF_QUOT_4_IN_2_GGGA4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
QUOT_4_IN_GGGA4(X, 0_0, s_11(Z), s_11(U)) -> QUOT_4_IN_GGGA4(X, s_11(Z), s_11(Z), U)

The TRS R consists of the following rules:

div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)
DIV_3_IN_GGA3(x1, x2, x3)  =  DIV_3_IN_GGA2(x1, x2)
QUOT_4_IN_GGGA4(x1, x2, x3, x4)  =  QUOT_4_IN_GGGA3(x1, x2, x3)
IF_DIV_3_IN_1_GGA4(x1, x2, x3, x4)  =  IF_DIV_3_IN_1_GGA1(x4)
IF_QUOT_4_IN_2_GGGA4(x1, x2, x3, x4)  =  IF_QUOT_4_IN_2_GGGA1(x4)
IF_QUOT_4_IN_1_GGGA5(x1, x2, x3, x4, x5)  =  IF_QUOT_4_IN_1_GGGA1(x5)

We have to consider all (P,R,Pi)-chains

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

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

DIV_3_IN_GGA3(X, Y, Z) -> IF_DIV_3_IN_1_GGA4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
DIV_3_IN_GGA3(X, Y, Z) -> QUOT_4_IN_GGGA4(X, Y, Y, Z)
QUOT_4_IN_GGGA4(s_11(X), s_11(Y), Z, U) -> IF_QUOT_4_IN_1_GGGA5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
QUOT_4_IN_GGGA4(s_11(X), s_11(Y), Z, U) -> QUOT_4_IN_GGGA4(X, Y, Z, U)
QUOT_4_IN_GGGA4(X, 0_0, s_11(Z), s_11(U)) -> IF_QUOT_4_IN_2_GGGA4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
QUOT_4_IN_GGGA4(X, 0_0, s_11(Z), s_11(U)) -> QUOT_4_IN_GGGA4(X, s_11(Z), s_11(Z), U)

The TRS R consists of the following rules:

div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)
DIV_3_IN_GGA3(x1, x2, x3)  =  DIV_3_IN_GGA2(x1, x2)
QUOT_4_IN_GGGA4(x1, x2, x3, x4)  =  QUOT_4_IN_GGGA3(x1, x2, x3)
IF_DIV_3_IN_1_GGA4(x1, x2, x3, x4)  =  IF_DIV_3_IN_1_GGA1(x4)
IF_QUOT_4_IN_2_GGGA4(x1, x2, x3, x4)  =  IF_QUOT_4_IN_2_GGGA1(x4)
IF_QUOT_4_IN_1_GGGA5(x1, x2, x3, x4, x5)  =  IF_QUOT_4_IN_1_GGGA1(x5)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph contains 1 SCC with 4 less nodes.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
PiDP
              ↳ UsableRulesProof

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

QUOT_4_IN_GGGA4(X, 0_0, s_11(Z), s_11(U)) -> QUOT_4_IN_GGGA4(X, s_11(Z), s_11(Z), U)
QUOT_4_IN_GGGA4(s_11(X), s_11(Y), Z, U) -> QUOT_4_IN_GGGA4(X, Y, Z, U)

The TRS R consists of the following rules:

div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)

The argument filtering Pi contains the following mapping:
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)
QUOT_4_IN_GGGA4(x1, x2, x3, x4)  =  QUOT_4_IN_GGGA3(x1, x2, x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
PiDP
                  ↳ PiDPToQDPProof

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

QUOT_4_IN_GGGA4(X, 0_0, s_11(Z), s_11(U)) -> QUOT_4_IN_GGGA4(X, s_11(Z), s_11(Z), U)
QUOT_4_IN_GGGA4(s_11(X), s_11(Y), Z, U) -> QUOT_4_IN_GGGA4(X, Y, Z, U)

R is empty.
The argument filtering Pi contains the following mapping:
0_0  =  0_0
s_11(x1)  =  s_11(x1)
QUOT_4_IN_GGGA4(x1, x2, x3, x4)  =  QUOT_4_IN_GGGA3(x1, x2, x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
                ↳ PiDP
                  ↳ PiDPToQDPProof
QDP
                      ↳ QDPSizeChangeProof

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

QUOT_4_IN_GGGA3(X, 0_0, s_11(Z)) -> QUOT_4_IN_GGGA3(X, s_11(Z), s_11(Z))
QUOT_4_IN_GGGA3(s_11(X), s_11(Y), Z) -> QUOT_4_IN_GGGA3(X, Y, Z)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {QUOT_4_IN_GGGA3}.
By using the subterm criterion together with the size-change analysis 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: