(0) Obligation:

Clauses:

div(X, s(Y), Z) :- div_s(X, Y, Z).
div_s(0, Y, 0).
div_s(s(X), Y, 0) :- lss(X, Y).
div_s(s(X), Y, s(Z)) :- ','(sub(X, Y, R), div_s(R, Y, Z)).
lss(s(X), s(Y)) :- lss(X, Y).
lss(0, s(Y)).
sub(s(X), s(Y), Z) :- sub(X, Y, Z).
sub(X, 0, X).

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)
div_s_in: (b,b,f)
lss_in: (b,b)
sub_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) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x3)
U2_gga(x1, x2, x3)  =  U2_gga(x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x3)
lss_out_gg(x1, x2)  =  lss_out_gg
U3_gga(x1, x2, x3, x4)  =  U3_gga(x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(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) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x3)
U2_gga(x1, x2, x3)  =  U2_gga(x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x3)
lss_out_gg(x1, x2)  =  lss_out_gg
U3_gga(x1, x2, x3, x4)  =  U3_gga(x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(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) → U1_GGA(X, Y, Z, div_s_in_gga(X, Y, Z))
DIV_IN_GGA(X, s(Y), Z) → DIV_S_IN_GGA(X, Y, Z)
DIV_S_IN_GGA(s(X), Y, 0) → U2_GGA(X, Y, lss_in_gg(X, Y))
DIV_S_IN_GGA(s(X), Y, 0) → LSS_IN_GG(X, Y)
LSS_IN_GG(s(X), s(Y)) → U5_GG(X, Y, lss_in_gg(X, Y))
LSS_IN_GG(s(X), s(Y)) → LSS_IN_GG(X, Y)
DIV_S_IN_GGA(s(X), Y, s(Z)) → U3_GGA(X, Y, Z, sub_in_gga(X, Y, R))
DIV_S_IN_GGA(s(X), Y, s(Z)) → SUB_IN_GGA(X, Y, R)
SUB_IN_GGA(s(X), s(Y), Z) → U6_GGA(X, Y, Z, sub_in_gga(X, Y, Z))
SUB_IN_GGA(s(X), s(Y), Z) → SUB_IN_GGA(X, Y, Z)
U3_GGA(X, Y, Z, sub_out_gga(X, Y, R)) → U4_GGA(X, Y, Z, div_s_in_gga(R, Y, Z))
U3_GGA(X, Y, Z, sub_out_gga(X, Y, R)) → DIV_S_IN_GGA(R, Y, Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x3)
U2_gga(x1, x2, x3)  =  U2_gga(x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x3)
lss_out_gg(x1, x2)  =  lss_out_gg
U3_gga(x1, x2, x3, x4)  =  U3_gga(x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x4)
DIV_S_IN_GGA(x1, x2, x3)  =  DIV_S_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3)  =  U2_GGA(x3)
LSS_IN_GG(x1, x2)  =  LSS_IN_GG(x1, x2)
U5_GG(x1, x2, x3)  =  U5_GG(x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x2, x4)
SUB_IN_GGA(x1, x2, x3)  =  SUB_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(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) → U1_GGA(X, Y, Z, div_s_in_gga(X, Y, Z))
DIV_IN_GGA(X, s(Y), Z) → DIV_S_IN_GGA(X, Y, Z)
DIV_S_IN_GGA(s(X), Y, 0) → U2_GGA(X, Y, lss_in_gg(X, Y))
DIV_S_IN_GGA(s(X), Y, 0) → LSS_IN_GG(X, Y)
LSS_IN_GG(s(X), s(Y)) → U5_GG(X, Y, lss_in_gg(X, Y))
LSS_IN_GG(s(X), s(Y)) → LSS_IN_GG(X, Y)
DIV_S_IN_GGA(s(X), Y, s(Z)) → U3_GGA(X, Y, Z, sub_in_gga(X, Y, R))
DIV_S_IN_GGA(s(X), Y, s(Z)) → SUB_IN_GGA(X, Y, R)
SUB_IN_GGA(s(X), s(Y), Z) → U6_GGA(X, Y, Z, sub_in_gga(X, Y, Z))
SUB_IN_GGA(s(X), s(Y), Z) → SUB_IN_GGA(X, Y, Z)
U3_GGA(X, Y, Z, sub_out_gga(X, Y, R)) → U4_GGA(X, Y, Z, div_s_in_gga(R, Y, Z))
U3_GGA(X, Y, Z, sub_out_gga(X, Y, R)) → DIV_S_IN_GGA(R, Y, Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x3)
U2_gga(x1, x2, x3)  =  U2_gga(x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x3)
lss_out_gg(x1, x2)  =  lss_out_gg
U3_gga(x1, x2, x3, x4)  =  U3_gga(x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x4)
DIV_S_IN_GGA(x1, x2, x3)  =  DIV_S_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3)  =  U2_GGA(x3)
LSS_IN_GG(x1, x2)  =  LSS_IN_GG(x1, x2)
U5_GG(x1, x2, x3)  =  U5_GG(x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x2, x4)
SUB_IN_GGA(x1, x2, x3)  =  SUB_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(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 8 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

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

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x3)
U2_gga(x1, x2, x3)  =  U2_gga(x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x3)
lss_out_gg(x1, x2)  =  lss_out_gg
U3_gga(x1, x2, x3, x4)  =  U3_gga(x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
SUB_IN_GGA(x1, x2, x3)  =  SUB_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:

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

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
SUB_IN_GGA(x1, x2, x3)  =  SUB_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:

SUB_IN_GGA(s(X), s(Y)) → SUB_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:

  • SUB_IN_GGA(s(X), s(Y)) → SUB_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:

LSS_IN_GG(s(X), s(Y)) → LSS_IN_GG(X, Y)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x3)
U2_gga(x1, x2, x3)  =  U2_gga(x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x3)
lss_out_gg(x1, x2)  =  lss_out_gg
U3_gga(x1, x2, x3, x4)  =  U3_gga(x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
LSS_IN_GG(x1, x2)  =  LSS_IN_GG(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:

LSS_IN_GG(s(X), s(Y)) → LSS_IN_GG(X, Y)

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

(17) PiDPToQDPProof (EQUIVALENT 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:

LSS_IN_GG(s(X), s(Y)) → LSS_IN_GG(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:

  • LSS_IN_GG(s(X), s(Y)) → LSS_IN_GG(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:

DIV_S_IN_GGA(s(X), Y, s(Z)) → U3_GGA(X, Y, Z, sub_in_gga(X, Y, R))
U3_GGA(X, Y, Z, sub_out_gga(X, Y, R)) → DIV_S_IN_GGA(R, Y, Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x3)
U2_gga(x1, x2, x3)  =  U2_gga(x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x3)
lss_out_gg(x1, x2)  =  lss_out_gg
U3_gga(x1, x2, x3, x4)  =  U3_gga(x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
DIV_S_IN_GGA(x1, x2, x3)  =  DIV_S_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(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:

DIV_S_IN_GGA(s(X), Y, s(Z)) → U3_GGA(X, Y, Z, sub_in_gga(X, Y, R))
U3_GGA(X, Y, Z, sub_out_gga(X, Y, R)) → DIV_S_IN_GGA(R, Y, Z)

The TRS R consists of the following rules:

sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
0  =  0
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x3)
DIV_S_IN_GGA(x1, x2, x3)  =  DIV_S_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(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:

DIV_S_IN_GGA(s(X), Y) → U3_GGA(Y, sub_in_gga(X, Y))
U3_GGA(Y, sub_out_gga(R)) → DIV_S_IN_GGA(R, Y)

The TRS R consists of the following rules:

sub_in_gga(s(X), s(Y)) → U6_gga(sub_in_gga(X, Y))
sub_in_gga(X, 0) → sub_out_gga(X)
U6_gga(sub_out_gga(Z)) → sub_out_gga(Z)

The set Q consists of the following terms:

sub_in_gga(x0, x1)
U6_gga(x0)

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

(26) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


DIV_S_IN_GGA(s(X), Y) → U3_GGA(Y, sub_in_gga(X, Y))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(DIV_S_IN_GGA(x1, x2)) = x1   
POL(U3_GGA(x1, x2)) = x2   
POL(U6_gga(x1)) = 1 + x1   
POL(s(x1)) = 1 + x1   
POL(sub_in_gga(x1, x2)) = x1   
POL(sub_out_gga(x1)) = x1   

The following usable rules [FROCOS05] were oriented:

sub_in_gga(s(X), s(Y)) → U6_gga(sub_in_gga(X, Y))
sub_in_gga(X, 0) → sub_out_gga(X)
U6_gga(sub_out_gga(Z)) → sub_out_gga(Z)

(27) Obligation:

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

U3_GGA(Y, sub_out_gga(R)) → DIV_S_IN_GGA(R, Y)

The TRS R consists of the following rules:

sub_in_gga(s(X), s(Y)) → U6_gga(sub_in_gga(X, Y))
sub_in_gga(X, 0) → sub_out_gga(X)
U6_gga(sub_out_gga(Z)) → sub_out_gga(Z)

The set Q consists of the following terms:

sub_in_gga(x0, x1)
U6_gga(x0)

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

(28) DependencyGraphProof (EQUIVALENT transformation)

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

(29) TRUE

(30) 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)
div_s_in: (b,b,f)
lss_in: (b,b)
sub_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) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3)  =  U2_gga(x1, x2, x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x1, x2, x3)
lss_out_gg(x1, x2)  =  lss_out_gg(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(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

(31) Obligation:

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

div_in_gga(X, s(Y), Z) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3)  =  U2_gga(x1, x2, x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x1, x2, x3)
lss_out_gg(x1, x2)  =  lss_out_gg(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)

(32) 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) → U1_GGA(X, Y, Z, div_s_in_gga(X, Y, Z))
DIV_IN_GGA(X, s(Y), Z) → DIV_S_IN_GGA(X, Y, Z)
DIV_S_IN_GGA(s(X), Y, 0) → U2_GGA(X, Y, lss_in_gg(X, Y))
DIV_S_IN_GGA(s(X), Y, 0) → LSS_IN_GG(X, Y)
LSS_IN_GG(s(X), s(Y)) → U5_GG(X, Y, lss_in_gg(X, Y))
LSS_IN_GG(s(X), s(Y)) → LSS_IN_GG(X, Y)
DIV_S_IN_GGA(s(X), Y, s(Z)) → U3_GGA(X, Y, Z, sub_in_gga(X, Y, R))
DIV_S_IN_GGA(s(X), Y, s(Z)) → SUB_IN_GGA(X, Y, R)
SUB_IN_GGA(s(X), s(Y), Z) → U6_GGA(X, Y, Z, sub_in_gga(X, Y, Z))
SUB_IN_GGA(s(X), s(Y), Z) → SUB_IN_GGA(X, Y, Z)
U3_GGA(X, Y, Z, sub_out_gga(X, Y, R)) → U4_GGA(X, Y, Z, div_s_in_gga(R, Y, Z))
U3_GGA(X, Y, Z, sub_out_gga(X, Y, R)) → DIV_S_IN_GGA(R, Y, Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3)  =  U2_gga(x1, x2, x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x1, x2, x3)
lss_out_gg(x1, x2)  =  lss_out_gg(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(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)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x1, x2, x4)
DIV_S_IN_GGA(x1, x2, x3)  =  DIV_S_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3)  =  U2_GGA(x1, x2, x3)
LSS_IN_GG(x1, x2)  =  LSS_IN_GG(x1, x2)
U5_GG(x1, x2, x3)  =  U5_GG(x1, x2, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
SUB_IN_GGA(x1, x2, x3)  =  SUB_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x1, x2, x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x2, x4)

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

(33) Obligation:

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

DIV_IN_GGA(X, s(Y), Z) → U1_GGA(X, Y, Z, div_s_in_gga(X, Y, Z))
DIV_IN_GGA(X, s(Y), Z) → DIV_S_IN_GGA(X, Y, Z)
DIV_S_IN_GGA(s(X), Y, 0) → U2_GGA(X, Y, lss_in_gg(X, Y))
DIV_S_IN_GGA(s(X), Y, 0) → LSS_IN_GG(X, Y)
LSS_IN_GG(s(X), s(Y)) → U5_GG(X, Y, lss_in_gg(X, Y))
LSS_IN_GG(s(X), s(Y)) → LSS_IN_GG(X, Y)
DIV_S_IN_GGA(s(X), Y, s(Z)) → U3_GGA(X, Y, Z, sub_in_gga(X, Y, R))
DIV_S_IN_GGA(s(X), Y, s(Z)) → SUB_IN_GGA(X, Y, R)
SUB_IN_GGA(s(X), s(Y), Z) → U6_GGA(X, Y, Z, sub_in_gga(X, Y, Z))
SUB_IN_GGA(s(X), s(Y), Z) → SUB_IN_GGA(X, Y, Z)
U3_GGA(X, Y, Z, sub_out_gga(X, Y, R)) → U4_GGA(X, Y, Z, div_s_in_gga(R, Y, Z))
U3_GGA(X, Y, Z, sub_out_gga(X, Y, R)) → DIV_S_IN_GGA(R, Y, Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3)  =  U2_gga(x1, x2, x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x1, x2, x3)
lss_out_gg(x1, x2)  =  lss_out_gg(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(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)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x1, x2, x4)
DIV_S_IN_GGA(x1, x2, x3)  =  DIV_S_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3)  =  U2_GGA(x1, x2, x3)
LSS_IN_GG(x1, x2)  =  LSS_IN_GG(x1, x2)
U5_GG(x1, x2, x3)  =  U5_GG(x1, x2, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
SUB_IN_GGA(x1, x2, x3)  =  SUB_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x1, x2, x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x2, x4)

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

(34) DependencyGraphProof (EQUIVALENT transformation)

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

(35) Complex Obligation (AND)

(36) Obligation:

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

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

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3)  =  U2_gga(x1, x2, x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x1, x2, x3)
lss_out_gg(x1, x2)  =  lss_out_gg(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)
SUB_IN_GGA(x1, x2, x3)  =  SUB_IN_GGA(x1, x2)

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

(37) UsableRulesProof (EQUIVALENT transformation)

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

(38) Obligation:

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

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

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

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

(39) PiDPToQDPProof (SOUND transformation)

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

(40) Obligation:

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

SUB_IN_GGA(s(X), s(Y)) → SUB_IN_GGA(X, Y)

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

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

  • SUB_IN_GGA(s(X), s(Y)) → SUB_IN_GGA(X, Y)
    The graph contains the following edges 1 > 1, 2 > 2

(42) TRUE

(43) Obligation:

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

LSS_IN_GG(s(X), s(Y)) → LSS_IN_GG(X, Y)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3)  =  U2_gga(x1, x2, x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x1, x2, x3)
lss_out_gg(x1, x2)  =  lss_out_gg(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)
LSS_IN_GG(x1, x2)  =  LSS_IN_GG(x1, x2)

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

(44) UsableRulesProof (EQUIVALENT transformation)

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

(45) Obligation:

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

LSS_IN_GG(s(X), s(Y)) → LSS_IN_GG(X, Y)

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

(46) PiDPToQDPProof (EQUIVALENT transformation)

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

(47) Obligation:

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

LSS_IN_GG(s(X), s(Y)) → LSS_IN_GG(X, Y)

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

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

  • LSS_IN_GG(s(X), s(Y)) → LSS_IN_GG(X, Y)
    The graph contains the following edges 1 > 1, 2 > 2

(49) TRUE

(50) Obligation:

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

DIV_S_IN_GGA(s(X), Y, s(Z)) → U3_GGA(X, Y, Z, sub_in_gga(X, Y, R))
U3_GGA(X, Y, Z, sub_out_gga(X, Y, R)) → DIV_S_IN_GGA(R, Y, Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U1_gga(X, Y, Z, div_s_in_gga(X, Y, Z))
div_s_in_gga(0, Y, 0) → div_s_out_gga(0, Y, 0)
div_s_in_gga(s(X), Y, 0) → U2_gga(X, Y, lss_in_gg(X, Y))
lss_in_gg(s(X), s(Y)) → U5_gg(X, Y, lss_in_gg(X, Y))
lss_in_gg(0, s(Y)) → lss_out_gg(0, s(Y))
U5_gg(X, Y, lss_out_gg(X, Y)) → lss_out_gg(s(X), s(Y))
U2_gga(X, Y, lss_out_gg(X, Y)) → div_s_out_gga(s(X), Y, 0)
div_s_in_gga(s(X), Y, s(Z)) → U3_gga(X, Y, Z, sub_in_gga(X, Y, R))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
U3_gga(X, Y, Z, sub_out_gga(X, Y, R)) → U4_gga(X, Y, Z, div_s_in_gga(R, Y, Z))
U4_gga(X, Y, Z, div_s_out_gga(R, Y, Z)) → div_s_out_gga(s(X), Y, s(Z))
U1_gga(X, Y, Z, div_s_out_gga(X, 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)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
div_s_in_gga(x1, x2, x3)  =  div_s_in_gga(x1, x2)
0  =  0
div_s_out_gga(x1, x2, x3)  =  div_s_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3)  =  U2_gga(x1, x2, x3)
lss_in_gg(x1, x2)  =  lss_in_gg(x1, x2)
U5_gg(x1, x2, x3)  =  U5_gg(x1, x2, x3)
lss_out_gg(x1, x2)  =  lss_out_gg(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2, x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)
DIV_S_IN_GGA(x1, x2, x3)  =  DIV_S_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)

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

(51) UsableRulesProof (EQUIVALENT transformation)

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

(52) Obligation:

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

DIV_S_IN_GGA(s(X), Y, s(Z)) → U3_GGA(X, Y, Z, sub_in_gga(X, Y, R))
U3_GGA(X, Y, Z, sub_out_gga(X, Y, R)) → DIV_S_IN_GGA(R, Y, Z)

The TRS R consists of the following rules:

sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_gga(X, Y, Z))
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U6_gga(X, Y, Z, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
0  =  0
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2, x3)
DIV_S_IN_GGA(x1, x2, x3)  =  DIV_S_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)

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

(53) PiDPToQDPProof (SOUND transformation)

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

(54) Obligation:

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

DIV_S_IN_GGA(s(X), Y) → U3_GGA(X, Y, sub_in_gga(X, Y))
U3_GGA(X, Y, sub_out_gga(X, Y, R)) → DIV_S_IN_GGA(R, Y)

The TRS R consists of the following rules:

sub_in_gga(s(X), s(Y)) → U6_gga(X, Y, sub_in_gga(X, Y))
sub_in_gga(X, 0) → sub_out_gga(X, 0, X)
U6_gga(X, Y, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)

The set Q consists of the following terms:

sub_in_gga(x0, x1)
U6_gga(x0, x1, x2)

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

(55) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


DIV_S_IN_GGA(s(X), Y) → U3_GGA(X, Y, sub_in_gga(X, Y))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(DIV_S_IN_GGA(x1, x2)) = x1   
POL(U3_GGA(x1, x2, x3)) = x3   
POL(U6_gga(x1, x2, x3)) = x3   
POL(s(x1)) = 1 + x1   
POL(sub_in_gga(x1, x2)) = x1   
POL(sub_out_gga(x1, x2, x3)) = x3   

The following usable rules [FROCOS05] were oriented:

sub_in_gga(s(X), s(Y)) → U6_gga(X, Y, sub_in_gga(X, Y))
sub_in_gga(X, 0) → sub_out_gga(X, 0, X)
U6_gga(X, Y, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)

(56) Obligation:

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

U3_GGA(X, Y, sub_out_gga(X, Y, R)) → DIV_S_IN_GGA(R, Y)

The TRS R consists of the following rules:

sub_in_gga(s(X), s(Y)) → U6_gga(X, Y, sub_in_gga(X, Y))
sub_in_gga(X, 0) → sub_out_gga(X, 0, X)
U6_gga(X, Y, sub_out_gga(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)

The set Q consists of the following terms:

sub_in_gga(x0, x1)
U6_gga(x0, x1, x2)

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