(0) Obligation:

Clauses:

le(0, Y, true).
le(s(X), 0, false).
le(s(X), s(Y), B) :- le(X, Y, B).
minus(X, 0, X).
minus(s(X), s(Y), Z) :- minus(X, Y, Z).
div(X, s(Y), Z) :- ','(le(s(Y), X, B), if(B, X, s(Y), Z)).
if(false, X, s(Y), 0).
if(true, X, s(Y), s(Z)) :- ','(minus(X, Y, U), div(U, s(Y), Z)).

Queries:

div(g,g,a).

(1) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
div_in: (b,b,f)
le_in: (b,b,f)
if_in: (b,b,b,f)
minus_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(2) Obligation:

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

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)

(3) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))
DIV_IN_GGA(X, s(Y), Z) → LE_IN_GGA(s(Y), X, B)
LE_IN_GGA(s(X), s(Y), B) → U1_GGA(X, Y, B, le_in_gga(X, Y, B))
LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_GGA(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
IF_IN_GGGA(true, X, s(Y), s(Z)) → MINUS_IN_GGA(X, Y, U)
MINUS_IN_GGA(s(X), s(Y), Z) → U2_GGA(X, Y, Z, minus_in_gga(X, Y, Z))
MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → U6_GGGA(X, Y, Z, div_in_gga(U, s(Y), Z))
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x4)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x2, x4)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x4)
U6_GGGA(x1, x2, x3, x4)  =  U6_GGGA(x4)

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

(4) Obligation:

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

DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))
DIV_IN_GGA(X, s(Y), Z) → LE_IN_GGA(s(Y), X, B)
LE_IN_GGA(s(X), s(Y), B) → U1_GGA(X, Y, B, le_in_gga(X, Y, B))
LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_GGA(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
IF_IN_GGGA(true, X, s(Y), s(Z)) → MINUS_IN_GGA(X, Y, U)
MINUS_IN_GGA(s(X), s(Y), Z) → U2_GGA(X, Y, Z, minus_in_gga(X, Y, Z))
MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → U6_GGGA(X, Y, Z, div_in_gga(U, s(Y), Z))
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x4)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x2, x4)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x4)
U6_GGGA(x1, x2, x3, x4)  =  U6_GGGA(x4)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 6 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)

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

(8) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(9) Obligation:

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

MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)

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

(10) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(11) Obligation:

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

MINUS_IN_GGA(s(X), s(Y)) → MINUS_IN_GGA(X, Y)

R is empty.
Q is empty.
We have to consider all (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_IN_GGA(s(X), s(Y)) → MINUS_IN_GGA(X, Y)
    The graph contains the following edges 1 > 1, 2 > 2

(13) TRUE

(14) Obligation:

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

LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)

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

(15) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(16) Obligation:

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

LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)

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

(17) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(18) Obligation:

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

LE_IN_GGA(s(X), s(Y)) → LE_IN_GGA(X, Y)

R is empty.
Q is empty.
We have to consider all (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_IN_GGA(s(X), s(Y)) → LE_IN_GGA(X, Y)
    The graph contains the following edges 1 > 1, 2 > 2

(20) TRUE

(21) Obligation:

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

U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)
DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x2, x4)

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

(22) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(23) Obligation:

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

U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)
DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))

The TRS R consists of the following rules:

minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
false  =  false
true  =  true
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x2, x4)

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

(24) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(25) Obligation:

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

U3_GGA(X, Y, le_out_gga(B)) → IF_IN_GGGA(B, X, s(Y))
IF_IN_GGGA(true, X, s(Y)) → U5_GGGA(Y, minus_in_gga(X, Y))
U5_GGGA(Y, minus_out_gga(U)) → DIV_IN_GGA(U, s(Y))
DIV_IN_GGA(X, s(Y)) → U3_GGA(X, Y, le_in_gga(s(Y), X))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(26) Narrowing (SOUND transformation)

By narrowing [LPAR04] the rule IF_IN_GGGA(true, X, s(Y)) → U5_GGGA(Y, minus_in_gga(X, Y)) at position [1] we obtained the following new rules [LPAR04]:

IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))

(27) Obligation:

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

U3_GGA(X, Y, le_out_gga(B)) → IF_IN_GGGA(B, X, s(Y))
U5_GGGA(Y, minus_out_gga(U)) → DIV_IN_GGA(U, s(Y))
DIV_IN_GGA(X, s(Y)) → U3_GGA(X, Y, le_in_gga(s(Y), X))
IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(28) Narrowing (SOUND transformation)

By narrowing [LPAR04] the rule DIV_IN_GGA(X, s(Y)) → U3_GGA(X, Y, le_in_gga(s(Y), X)) at position [2] we obtained the following new rules [LPAR04]:

DIV_IN_GGA(0, s(x0)) → U3_GGA(0, x0, le_out_gga(false))
DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(le_in_gga(x0, x1)))

(29) Obligation:

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

U3_GGA(X, Y, le_out_gga(B)) → IF_IN_GGGA(B, X, s(Y))
U5_GGGA(Y, minus_out_gga(U)) → DIV_IN_GGA(U, s(Y))
IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
DIV_IN_GGA(0, s(x0)) → U3_GGA(0, x0, le_out_gga(false))
DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(le_in_gga(x0, x1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(30) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U3_GGA(X, Y, le_out_gga(B)) → IF_IN_GGGA(B, X, s(Y)) we obtained the following new rules [LPAR04]:

U3_GGA(0, z0, le_out_gga(false)) → IF_IN_GGGA(false, 0, s(z0))
U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))

(31) Obligation:

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

U5_GGGA(Y, minus_out_gga(U)) → DIV_IN_GGA(U, s(Y))
IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
DIV_IN_GGA(0, s(x0)) → U3_GGA(0, x0, le_out_gga(false))
DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(le_in_gga(x0, x1)))
U3_GGA(0, z0, le_out_gga(false)) → IF_IN_GGGA(false, 0, s(z0))
U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(32) DependencyGraphProof (EQUIVALENT transformation)

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

(33) Obligation:

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

DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(le_in_gga(x0, x1)))
U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))
IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
U5_GGGA(Y, minus_out_gga(U)) → DIV_IN_GGA(U, s(Y))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(34) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0)) we obtained the following new rules [LPAR04]:

IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))

(35) Obligation:

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

DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(le_in_gga(x0, x1)))
U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))
U5_GGGA(Y, minus_out_gga(U)) → DIV_IN_GGA(U, s(Y))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(36) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U5_GGGA(Y, minus_out_gga(U)) → DIV_IN_GGA(U, s(Y)) we obtained the following new rules [LPAR04]:

U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
U5_GGGA(0, minus_out_gga(s(z0))) → DIV_IN_GGA(s(z0), s(0))

(37) Obligation:

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

DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(le_in_gga(x0, x1)))
U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
U5_GGGA(0, minus_out_gga(s(z0))) → DIV_IN_GGA(s(z0), s(0))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(38) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(le_in_gga(x0, x1))) we obtained the following new rules [LPAR04]:

DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, U1_gga(le_in_gga(0, z0)))

(39) Obligation:

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

U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
U5_GGGA(0, minus_out_gga(s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, U1_gga(le_in_gga(0, z0)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(40) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, U1_gga(le_in_gga(0, z0))) at position [2,0] we obtained the following new rules [LPAR04]:

DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, U1_gga(le_out_gga(true)))

(41) Obligation:

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

U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
U5_GGGA(0, minus_out_gga(s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, U1_gga(le_out_gga(true)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(42) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, U1_gga(le_out_gga(true))) at position [2] we obtained the following new rules [LPAR04]:

DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, le_out_gga(true))

(43) Obligation:

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

U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
U5_GGGA(0, minus_out_gga(s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, le_out_gga(true))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(44) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1)) we obtained the following new rules [LPAR04]:

U3_GGA(s(z0), s(z1), le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1)))
U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0))

(45) Obligation:

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

IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
U5_GGGA(0, minus_out_gga(s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, le_out_gga(true))
U3_GGA(s(z0), s(z1), le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1)))
U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(46) DependencyGraphProof (EQUIVALENT transformation)

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

(47) Complex Obligation (AND)

(48) Obligation:

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

U5_GGGA(0, minus_out_gga(s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, le_out_gga(true))
U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

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

(50) Obligation:

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

U5_GGGA(0, minus_out_gga(s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, le_out_gga(true))
U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))

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

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

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

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

(52) Obligation:

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

U5_GGGA(0, minus_out_gga(s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, le_out_gga(true))
U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))

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

(53) NonTerminationProof (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 = DIV_IN_GGA(s(z0'), s(0)) evaluates to t =DIV_IN_GGA(s(z0'), s(0))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
  • Semiunifier: [ ]
  • Matcher: [ ]




Rewriting sequence

DIV_IN_GGA(s(z0'), s(0))U3_GGA(s(z0'), 0, le_out_gga(true))
with rule DIV_IN_GGA(s(z0''), s(0)) → U3_GGA(s(z0''), 0, le_out_gga(true)) at position [] and matcher [z0'' / z0']

U3_GGA(s(z0'), 0, le_out_gga(true))IF_IN_GGGA(true, s(z0'), s(0))
with rule U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0)) at position [] and matcher [z0 / z0']

IF_IN_GGGA(true, s(z0'), s(0))U5_GGGA(0, minus_out_gga(s(z0')))
with rule IF_IN_GGGA(true, s(z0''), s(0)) → U5_GGGA(0, minus_out_gga(s(z0''))) at position [] and matcher [z0'' / z0']

U5_GGGA(0, minus_out_gga(s(z0')))DIV_IN_GGA(s(z0'), s(0))
with rule U5_GGGA(0, minus_out_gga(s(z0))) → DIV_IN_GGA(s(z0), s(0))

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.



(54) FALSE

(55) Obligation:

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

U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
U3_GGA(s(z0), s(z1), le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(56) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1))) we obtained the following new rules [LPAR04]:

U5_GGGA(s(x0), minus_out_gga(s(y_0))) → DIV_IN_GGA(s(y_0), s(s(x0)))

(57) Obligation:

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

DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
U3_GGA(s(z0), s(z1), le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
U5_GGGA(s(x0), minus_out_gga(s(y_0))) → DIV_IN_GGA(s(y_0), s(s(x0)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(58) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule U3_GGA(s(z0), s(z1), le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1))) we obtained the following new rules [LPAR04]:

U3_GGA(s(x0), s(x1), le_out_gga(true)) → IF_IN_GGGA(true, s(x0), s(s(x1)))

(59) Obligation:

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

DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
U5_GGGA(s(x0), minus_out_gga(s(y_0))) → DIV_IN_GGA(s(y_0), s(s(x0)))
U3_GGA(s(x0), s(x1), le_out_gga(true)) → IF_IN_GGGA(true, s(x0), s(s(x1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(60) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U3_GGA(s(x0), s(x1), le_out_gga(true)) → IF_IN_GGGA(true, s(x0), s(s(x1)))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(DIV_IN_GGA(x1, x2)) = 1 + x1   
POL(IF_IN_GGGA(x1, x2, x3)) = x2   
POL(U1_gga(x1)) = 0   
POL(U2_gga(x1)) = x1   
POL(U3_GGA(x1, x2, x3)) = 1 + x1   
POL(U5_GGGA(x1, x2)) = 1 + x2   
POL(false) = 0   
POL(le_in_gga(x1, x2)) = 0   
POL(le_out_gga(x1)) = 0   
POL(minus_in_gga(x1, x2)) = x1   
POL(minus_out_gga(x1)) = x1   
POL(s(x1)) = 1 + x1   
POL(true) = 0   

The following usable rules [FROCOS05] were oriented:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)

(61) Obligation:

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

DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
U5_GGGA(s(x0), minus_out_gga(s(y_0))) → DIV_IN_GGA(s(y_0), s(s(x0)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

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

(62) DependencyGraphProof (EQUIVALENT transformation)

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

(63) TRUE

(64) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
div_in: (b,b,f)
le_in: (b,b,f)
if_in: (b,b,b,f)
minus_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(65) Obligation:

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

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)

(66) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))
DIV_IN_GGA(X, s(Y), Z) → LE_IN_GGA(s(Y), X, B)
LE_IN_GGA(s(X), s(Y), B) → U1_GGA(X, Y, B, le_in_gga(X, Y, B))
LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_GGA(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
IF_IN_GGGA(true, X, s(Y), s(Z)) → MINUS_IN_GGA(X, Y, U)
MINUS_IN_GGA(s(X), s(Y), Z) → U2_GGA(X, Y, Z, minus_in_gga(X, Y, Z))
MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → U6_GGGA(X, Y, Z, div_in_gga(U, s(Y), Z))
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x1, x2, x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x2, x4)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x1, x2, x4)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x1, x2, x4)
U6_GGGA(x1, x2, x3, x4)  =  U6_GGGA(x1, x2, x4)

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

(67) Obligation:

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

DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))
DIV_IN_GGA(X, s(Y), Z) → LE_IN_GGA(s(Y), X, B)
LE_IN_GGA(s(X), s(Y), B) → U1_GGA(X, Y, B, le_in_gga(X, Y, B))
LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_GGA(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
IF_IN_GGGA(true, X, s(Y), s(Z)) → MINUS_IN_GGA(X, Y, U)
MINUS_IN_GGA(s(X), s(Y), Z) → U2_GGA(X, Y, Z, minus_in_gga(X, Y, Z))
MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → U6_GGGA(X, Y, Z, div_in_gga(U, s(Y), Z))
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x1, x2, x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x2, x4)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x1, x2, x4)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x1, x2, x4)
U6_GGGA(x1, x2, x3, x4)  =  U6_GGGA(x1, x2, x4)

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

(68) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 6 less nodes.

(69) Complex Obligation (AND)

(70) Obligation:

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

MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)

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

(71) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(72) Obligation:

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

MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)

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

(73) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(74) Obligation:

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

MINUS_IN_GGA(s(X), s(Y)) → MINUS_IN_GGA(X, Y)

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

(75) 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_IN_GGA(s(X), s(Y)) → MINUS_IN_GGA(X, Y)
    The graph contains the following edges 1 > 1, 2 > 2

(76) TRUE

(77) Obligation:

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

LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)

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

(78) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(79) Obligation:

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

LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)

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

(80) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(81) Obligation:

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

LE_IN_GGA(s(X), s(Y)) → LE_IN_GGA(X, Y)

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

(82) 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_IN_GGA(s(X), s(Y)) → LE_IN_GGA(X, Y)
    The graph contains the following edges 1 > 1, 2 > 2

(83) TRUE

(84) Obligation:

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

U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)
DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x1, x2, x4)

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

(85) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(86) Obligation:

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

U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)
DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))

The TRS R consists of the following rules:

minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
false  =  false
true  =  true
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x1, x2, x4)

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

(87) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(88) Obligation:

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

U3_GGA(X, Y, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y))
IF_IN_GGGA(true, X, s(Y)) → U5_GGGA(X, Y, minus_in_gga(X, Y))
U5_GGGA(X, Y, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y))
DIV_IN_GGA(X, s(Y)) → U3_GGA(X, Y, le_in_gga(s(Y), X))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(89) Narrowing (SOUND transformation)

By narrowing [LPAR04] the rule IF_IN_GGGA(true, X, s(Y)) → U5_GGGA(X, Y, minus_in_gga(X, Y)) at position [2] we obtained the following new rules [LPAR04]:

IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(x0, 0, minus_out_gga(x0, 0, x0))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))

(90) Obligation:

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

U3_GGA(X, Y, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y))
U5_GGGA(X, Y, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y))
DIV_IN_GGA(X, s(Y)) → U3_GGA(X, Y, le_in_gga(s(Y), X))
IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(x0, 0, minus_out_gga(x0, 0, x0))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(91) Narrowing (SOUND transformation)

By narrowing [LPAR04] the rule DIV_IN_GGA(X, s(Y)) → U3_GGA(X, Y, le_in_gga(s(Y), X)) at position [2] we obtained the following new rules [LPAR04]:

DIV_IN_GGA(0, s(x0)) → U3_GGA(0, x0, le_out_gga(s(x0), 0, false))
DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(x0, x1, le_in_gga(x0, x1)))

(92) Obligation:

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

U3_GGA(X, Y, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y))
U5_GGGA(X, Y, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y))
IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(x0, 0, minus_out_gga(x0, 0, x0))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
DIV_IN_GGA(0, s(x0)) → U3_GGA(0, x0, le_out_gga(s(x0), 0, false))
DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(x0, x1, le_in_gga(x0, x1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(93) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U3_GGA(X, Y, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y)) we obtained the following new rules [LPAR04]:

U3_GGA(0, z0, le_out_gga(s(z0), 0, false)) → IF_IN_GGGA(false, 0, s(z0))
U3_GGA(s(z0), z1, le_out_gga(s(z1), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(z1))

(94) Obligation:

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

U5_GGGA(X, Y, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y))
IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(x0, 0, minus_out_gga(x0, 0, x0))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
DIV_IN_GGA(0, s(x0)) → U3_GGA(0, x0, le_out_gga(s(x0), 0, false))
DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(x0, x1, le_in_gga(x0, x1)))
U3_GGA(0, z0, le_out_gga(s(z0), 0, false)) → IF_IN_GGGA(false, 0, s(z0))
U3_GGA(s(z0), z1, le_out_gga(s(z1), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(z1))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(95) DependencyGraphProof (EQUIVALENT transformation)

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

(96) Obligation:

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

DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(x0, x1, le_in_gga(x0, x1)))
U3_GGA(s(z0), z1, le_out_gga(s(z1), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(z1))
IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(x0, 0, minus_out_gga(x0, 0, x0))
U5_GGGA(X, Y, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(97) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(x0, 0, minus_out_gga(x0, 0, x0)) we obtained the following new rules [LPAR04]:

IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0)))

(98) Obligation:

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

DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(x0, x1, le_in_gga(x0, x1)))
U3_GGA(s(z0), z1, le_out_gga(s(z1), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(z1))
U5_GGGA(X, Y, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(99) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U5_GGGA(X, Y, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y)) we obtained the following new rules [LPAR04]:

U5_GGGA(s(z0), s(z1), minus_out_gga(s(z0), s(z1), x2)) → DIV_IN_GGA(x2, s(s(z1)))
U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0))) → DIV_IN_GGA(s(z0), s(0))

(100) Obligation:

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

DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(x0, x1, le_in_gga(x0, x1)))
U3_GGA(s(z0), z1, le_out_gga(s(z1), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(z1))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0)))
U5_GGGA(s(z0), s(z1), minus_out_gga(s(z0), s(z1), x2)) → DIV_IN_GGA(x2, s(s(z1)))
U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0))) → DIV_IN_GGA(s(z0), s(0))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(101) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(x0, x1, le_in_gga(x0, x1))) we obtained the following new rules [LPAR04]:

DIV_IN_GGA(s(x0), s(s(z1))) → U3_GGA(s(x0), s(z1), U1_gga(s(z1), x0, le_in_gga(s(z1), x0)))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, U1_gga(0, z0, le_in_gga(0, z0)))

(102) Obligation:

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

U3_GGA(s(z0), z1, le_out_gga(s(z1), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(z1))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0)))
U5_GGGA(s(z0), s(z1), minus_out_gga(s(z0), s(z1), x2)) → DIV_IN_GGA(x2, s(s(z1)))
U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(x0), s(s(z1))) → U3_GGA(s(x0), s(z1), U1_gga(s(z1), x0, le_in_gga(s(z1), x0)))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, U1_gga(0, z0, le_in_gga(0, z0)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(103) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, U1_gga(0, z0, le_in_gga(0, z0))) at position [2,2] we obtained the following new rules [LPAR04]:

DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, U1_gga(0, z0, le_out_gga(0, z0, true)))

(104) Obligation:

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

U3_GGA(s(z0), z1, le_out_gga(s(z1), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(z1))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0)))
U5_GGGA(s(z0), s(z1), minus_out_gga(s(z0), s(z1), x2)) → DIV_IN_GGA(x2, s(s(z1)))
U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(x0), s(s(z1))) → U3_GGA(s(x0), s(z1), U1_gga(s(z1), x0, le_in_gga(s(z1), x0)))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, U1_gga(0, z0, le_out_gga(0, z0, true)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(105) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, U1_gga(0, z0, le_out_gga(0, z0, true))) at position [2] we obtained the following new rules [LPAR04]:

DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, le_out_gga(s(0), s(z0), true))

(106) Obligation:

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

U3_GGA(s(z0), z1, le_out_gga(s(z1), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(z1))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0)))
U5_GGGA(s(z0), s(z1), minus_out_gga(s(z0), s(z1), x2)) → DIV_IN_GGA(x2, s(s(z1)))
U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(x0), s(s(z1))) → U3_GGA(s(x0), s(z1), U1_gga(s(z1), x0, le_in_gga(s(z1), x0)))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, le_out_gga(s(0), s(z0), true))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(107) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U3_GGA(s(z0), z1, le_out_gga(s(z1), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(z1)) we obtained the following new rules [LPAR04]:

U3_GGA(s(z0), s(z1), le_out_gga(s(s(z1)), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1)))
U3_GGA(s(z0), 0, le_out_gga(s(0), s(z0), true)) → IF_IN_GGGA(true, s(z0), s(0))

(108) Obligation:

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

IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0)))
U5_GGGA(s(z0), s(z1), minus_out_gga(s(z0), s(z1), x2)) → DIV_IN_GGA(x2, s(s(z1)))
U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(x0), s(s(z1))) → U3_GGA(s(x0), s(z1), U1_gga(s(z1), x0, le_in_gga(s(z1), x0)))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, le_out_gga(s(0), s(z0), true))
U3_GGA(s(z0), s(z1), le_out_gga(s(s(z1)), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1)))
U3_GGA(s(z0), 0, le_out_gga(s(0), s(z0), true)) → IF_IN_GGGA(true, s(z0), s(0))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(109) DependencyGraphProof (EQUIVALENT transformation)

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

(110) Complex Obligation (AND)

(111) Obligation:

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

U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, le_out_gga(s(0), s(z0), true))
U3_GGA(s(z0), 0, le_out_gga(s(0), s(z0), true)) → IF_IN_GGGA(true, s(z0), s(0))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

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

(113) Obligation:

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

U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, le_out_gga(s(0), s(z0), true))
U3_GGA(s(z0), 0, le_out_gga(s(0), s(z0), true)) → IF_IN_GGGA(true, s(z0), s(0))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0)))

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

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

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

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

(115) Obligation:

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

U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0))) → DIV_IN_GGA(s(z0), s(0))
DIV_IN_GGA(s(z0), s(0)) → U3_GGA(s(z0), 0, le_out_gga(s(0), s(z0), true))
U3_GGA(s(z0), 0, le_out_gga(s(0), s(z0), true)) → IF_IN_GGGA(true, s(z0), s(0))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0)))

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

(116) NonTerminationProof (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 = DIV_IN_GGA(s(z0'), s(0)) evaluates to t =DIV_IN_GGA(s(z0'), s(0))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
  • Semiunifier: [ ]
  • Matcher: [ ]




Rewriting sequence

DIV_IN_GGA(s(z0'), s(0))U3_GGA(s(z0'), 0, le_out_gga(s(0), s(z0'), true))
with rule DIV_IN_GGA(s(z0''), s(0)) → U3_GGA(s(z0''), 0, le_out_gga(s(0), s(z0''), true)) at position [] and matcher [z0'' / z0']

U3_GGA(s(z0'), 0, le_out_gga(s(0), s(z0'), true))IF_IN_GGGA(true, s(z0'), s(0))
with rule U3_GGA(s(z0), 0, le_out_gga(s(0), s(z0), true)) → IF_IN_GGGA(true, s(z0), s(0)) at position [] and matcher [z0 / z0']

IF_IN_GGGA(true, s(z0'), s(0))U5_GGGA(s(z0'), 0, minus_out_gga(s(z0'), 0, s(z0')))
with rule IF_IN_GGGA(true, s(z0''), s(0)) → U5_GGGA(s(z0''), 0, minus_out_gga(s(z0''), 0, s(z0''))) at position [] and matcher [z0'' / z0']

U5_GGGA(s(z0'), 0, minus_out_gga(s(z0'), 0, s(z0')))DIV_IN_GGA(s(z0'), s(0))
with rule U5_GGGA(s(z0), 0, minus_out_gga(s(z0), 0, s(z0))) → DIV_IN_GGA(s(z0), s(0))

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.



(117) FALSE

(118) Obligation:

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

U5_GGGA(s(z0), s(z1), minus_out_gga(s(z0), s(z1), x2)) → DIV_IN_GGA(x2, s(s(z1)))
DIV_IN_GGA(s(x0), s(s(z1))) → U3_GGA(s(x0), s(z1), U1_gga(s(z1), x0, le_in_gga(s(z1), x0)))
U3_GGA(s(z0), s(z1), le_out_gga(s(s(z1)), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(119) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule U5_GGGA(s(z0), s(z1), minus_out_gga(s(z0), s(z1), x2)) → DIV_IN_GGA(x2, s(s(z1))) we obtained the following new rules [LPAR04]:

U5_GGGA(s(x0), s(x1), minus_out_gga(s(x0), s(x1), s(y_0))) → DIV_IN_GGA(s(y_0), s(s(x1)))

(120) Obligation:

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

DIV_IN_GGA(s(x0), s(s(z1))) → U3_GGA(s(x0), s(z1), U1_gga(s(z1), x0, le_in_gga(s(z1), x0)))
U3_GGA(s(z0), s(z1), le_out_gga(s(s(z1)), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
U5_GGGA(s(x0), s(x1), minus_out_gga(s(x0), s(x1), s(y_0))) → DIV_IN_GGA(s(y_0), s(s(x1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(121) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule U3_GGA(s(z0), s(z1), le_out_gga(s(s(z1)), s(z0), x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1))) we obtained the following new rules [LPAR04]:

U3_GGA(s(x0), s(x1), le_out_gga(s(s(x1)), s(x0), true)) → IF_IN_GGGA(true, s(x0), s(s(x1)))

(122) Obligation:

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

DIV_IN_GGA(s(x0), s(s(z1))) → U3_GGA(s(x0), s(z1), U1_gga(s(z1), x0, le_in_gga(s(z1), x0)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
U5_GGGA(s(x0), s(x1), minus_out_gga(s(x0), s(x1), s(y_0))) → DIV_IN_GGA(s(y_0), s(s(x1)))
U3_GGA(s(x0), s(x1), le_out_gga(s(s(x1)), s(x0), true)) → IF_IN_GGGA(true, s(x0), s(s(x1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(123) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(DIV_IN_GGA(x1, x2)) = x1   
POL(IF_IN_GGGA(x1, x2, x3)) = x2   
POL(U1_gga(x1, x2, x3)) = 0   
POL(U2_gga(x1, x2, x3)) = x3   
POL(U3_GGA(x1, x2, x3)) = x1   
POL(U5_GGGA(x1, x2, x3)) = x3   
POL(false) = 0   
POL(le_in_gga(x1, x2)) = 0   
POL(le_out_gga(x1, x2, x3)) = 0   
POL(minus_in_gga(x1, x2)) = x1   
POL(minus_out_gga(x1, x2, x3)) = x3   
POL(s(x1)) = 1 + x1   
POL(true) = 0   

The following usable rules [FROCOS05] were oriented:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)

(124) Obligation:

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

DIV_IN_GGA(s(x0), s(s(z1))) → U3_GGA(s(x0), s(z1), U1_gga(s(z1), x0, le_in_gga(s(z1), x0)))
U5_GGGA(s(x0), s(x1), minus_out_gga(s(x0), s(x1), s(y_0))) → DIV_IN_GGA(s(y_0), s(s(x1)))
U3_GGA(s(x0), s(x1), le_out_gga(s(s(x1)), s(x0), true)) → IF_IN_GGGA(true, s(x0), s(s(x1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

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

(125) DependencyGraphProof (EQUIVALENT transformation)

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

(126) TRUE