(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) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(2) Obligation:

Triples:

lss13(s(T36), s(T37)) :- lss13(T36, T37).
div_s3(s(T24), T25, 0) :- lss13(T24, T25).
div_s3(s(T49), T50, s(T52)) :- sub25(T49, T50, X58).
div_s3(s(T49), T50, s(T52)) :- ','(subc25(T49, T50, T55), div_s3(T55, T50, T52)).
sub25(s(T66), s(T67), X89) :- sub25(T66, T67, X89).
div1(T7, s(T8), T10) :- div_s3(T7, T8, T10).

Clauses:

lssc13(s(T36), s(T37)) :- lssc13(T36, T37).
lssc13(0, s(T42)).
div_sc3(0, T15, 0).
div_sc3(s(T24), T25, 0) :- lssc13(T24, T25).
div_sc3(s(T49), T50, s(T52)) :- ','(subc25(T49, T50, T55), div_sc3(T55, T50, T52)).
subc25(s(T66), s(T67), X89) :- subc25(T66, T67, X89).
subc25(T72, 0, T72).

Afs:

div1(x1, x2, x3)  =  div1(x1, x2)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
div1_in: (b,b,f)
div_s3_in: (b,b,f)
lss13_in: (b,b)
sub25_in: (b,b,f)
subc25_in: (b,b,f)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

DIV1_IN_GGA(T7, s(T8), T10) → U7_GGA(T7, T8, T10, div_s3_in_gga(T7, T8, T10))
DIV1_IN_GGA(T7, s(T8), T10) → DIV_S3_IN_GGA(T7, T8, T10)
DIV_S3_IN_GGA(s(T24), T25, 0) → U2_GGA(T24, T25, lss13_in_gg(T24, T25))
DIV_S3_IN_GGA(s(T24), T25, 0) → LSS13_IN_GG(T24, T25)
LSS13_IN_GG(s(T36), s(T37)) → U1_GG(T36, T37, lss13_in_gg(T36, T37))
LSS13_IN_GG(s(T36), s(T37)) → LSS13_IN_GG(T36, T37)
DIV_S3_IN_GGA(s(T49), T50, s(T52)) → U3_GGA(T49, T50, T52, sub25_in_gga(T49, T50, X58))
DIV_S3_IN_GGA(s(T49), T50, s(T52)) → SUB25_IN_GGA(T49, T50, X58)
SUB25_IN_GGA(s(T66), s(T67), X89) → U6_GGA(T66, T67, X89, sub25_in_gga(T66, T67, X89))
SUB25_IN_GGA(s(T66), s(T67), X89) → SUB25_IN_GGA(T66, T67, X89)
DIV_S3_IN_GGA(s(T49), T50, s(T52)) → U4_GGA(T49, T50, T52, subc25_in_gga(T49, T50, T55))
U4_GGA(T49, T50, T52, subc25_out_gga(T49, T50, T55)) → U5_GGA(T49, T50, T52, div_s3_in_gga(T55, T50, T52))
U4_GGA(T49, T50, T52, subc25_out_gga(T49, T50, T55)) → DIV_S3_IN_GGA(T55, T50, T52)

The TRS R consists of the following rules:

subc25_in_gga(s(T66), s(T67), X89) → U13_gga(T66, T67, X89, subc25_in_gga(T66, T67, X89))
subc25_in_gga(T72, 0, T72) → subc25_out_gga(T72, 0, T72)
U13_gga(T66, T67, X89, subc25_out_gga(T66, T67, X89)) → subc25_out_gga(s(T66), s(T67), X89)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
div_s3_in_gga(x1, x2, x3)  =  div_s3_in_gga(x1, x2)
lss13_in_gg(x1, x2)  =  lss13_in_gg(x1, x2)
sub25_in_gga(x1, x2, x3)  =  sub25_in_gga(x1, x2)
subc25_in_gga(x1, x2, x3)  =  subc25_in_gga(x1, x2)
U13_gga(x1, x2, x3, x4)  =  U13_gga(x1, x2, x4)
0  =  0
subc25_out_gga(x1, x2, x3)  =  subc25_out_gga(x1, x2, x3)
DIV1_IN_GGA(x1, x2, x3)  =  DIV1_IN_GGA(x1, x2)
U7_GGA(x1, x2, x3, x4)  =  U7_GGA(x1, x2, x4)
DIV_S3_IN_GGA(x1, x2, x3)  =  DIV_S3_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3)  =  U2_GGA(x1, x2, x3)
LSS13_IN_GG(x1, x2)  =  LSS13_IN_GG(x1, x2)
U1_GG(x1, x2, x3)  =  U1_GG(x1, x2, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
SUB25_IN_GGA(x1, x2, x3)  =  SUB25_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)
U5_GGA(x1, x2, x3, x4)  =  U5_GGA(x1, x2, x4)

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

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

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

DIV1_IN_GGA(T7, s(T8), T10) → U7_GGA(T7, T8, T10, div_s3_in_gga(T7, T8, T10))
DIV1_IN_GGA(T7, s(T8), T10) → DIV_S3_IN_GGA(T7, T8, T10)
DIV_S3_IN_GGA(s(T24), T25, 0) → U2_GGA(T24, T25, lss13_in_gg(T24, T25))
DIV_S3_IN_GGA(s(T24), T25, 0) → LSS13_IN_GG(T24, T25)
LSS13_IN_GG(s(T36), s(T37)) → U1_GG(T36, T37, lss13_in_gg(T36, T37))
LSS13_IN_GG(s(T36), s(T37)) → LSS13_IN_GG(T36, T37)
DIV_S3_IN_GGA(s(T49), T50, s(T52)) → U3_GGA(T49, T50, T52, sub25_in_gga(T49, T50, X58))
DIV_S3_IN_GGA(s(T49), T50, s(T52)) → SUB25_IN_GGA(T49, T50, X58)
SUB25_IN_GGA(s(T66), s(T67), X89) → U6_GGA(T66, T67, X89, sub25_in_gga(T66, T67, X89))
SUB25_IN_GGA(s(T66), s(T67), X89) → SUB25_IN_GGA(T66, T67, X89)
DIV_S3_IN_GGA(s(T49), T50, s(T52)) → U4_GGA(T49, T50, T52, subc25_in_gga(T49, T50, T55))
U4_GGA(T49, T50, T52, subc25_out_gga(T49, T50, T55)) → U5_GGA(T49, T50, T52, div_s3_in_gga(T55, T50, T52))
U4_GGA(T49, T50, T52, subc25_out_gga(T49, T50, T55)) → DIV_S3_IN_GGA(T55, T50, T52)

The TRS R consists of the following rules:

subc25_in_gga(s(T66), s(T67), X89) → U13_gga(T66, T67, X89, subc25_in_gga(T66, T67, X89))
subc25_in_gga(T72, 0, T72) → subc25_out_gga(T72, 0, T72)
U13_gga(T66, T67, X89, subc25_out_gga(T66, T67, X89)) → subc25_out_gga(s(T66), s(T67), X89)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
div_s3_in_gga(x1, x2, x3)  =  div_s3_in_gga(x1, x2)
lss13_in_gg(x1, x2)  =  lss13_in_gg(x1, x2)
sub25_in_gga(x1, x2, x3)  =  sub25_in_gga(x1, x2)
subc25_in_gga(x1, x2, x3)  =  subc25_in_gga(x1, x2)
U13_gga(x1, x2, x3, x4)  =  U13_gga(x1, x2, x4)
0  =  0
subc25_out_gga(x1, x2, x3)  =  subc25_out_gga(x1, x2, x3)
DIV1_IN_GGA(x1, x2, x3)  =  DIV1_IN_GGA(x1, x2)
U7_GGA(x1, x2, x3, x4)  =  U7_GGA(x1, x2, x4)
DIV_S3_IN_GGA(x1, x2, x3)  =  DIV_S3_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3)  =  U2_GGA(x1, x2, x3)
LSS13_IN_GG(x1, x2)  =  LSS13_IN_GG(x1, x2)
U1_GG(x1, x2, x3)  =  U1_GG(x1, x2, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
SUB25_IN_GGA(x1, x2, x3)  =  SUB25_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)
U5_GGA(x1, x2, x3, x4)  =  U5_GGA(x1, x2, 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 9 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

SUB25_IN_GGA(s(T66), s(T67), X89) → SUB25_IN_GGA(T66, T67, X89)

The TRS R consists of the following rules:

subc25_in_gga(s(T66), s(T67), X89) → U13_gga(T66, T67, X89, subc25_in_gga(T66, T67, X89))
subc25_in_gga(T72, 0, T72) → subc25_out_gga(T72, 0, T72)
U13_gga(T66, T67, X89, subc25_out_gga(T66, T67, X89)) → subc25_out_gga(s(T66), s(T67), X89)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
subc25_in_gga(x1, x2, x3)  =  subc25_in_gga(x1, x2)
U13_gga(x1, x2, x3, x4)  =  U13_gga(x1, x2, x4)
0  =  0
subc25_out_gga(x1, x2, x3)  =  subc25_out_gga(x1, x2, x3)
SUB25_IN_GGA(x1, x2, x3)  =  SUB25_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:

SUB25_IN_GGA(s(T66), s(T67), X89) → SUB25_IN_GGA(T66, T67, X89)

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

SUB25_IN_GGA(s(T66), s(T67)) → SUB25_IN_GGA(T66, T67)

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:

  • SUB25_IN_GGA(s(T66), s(T67)) → SUB25_IN_GGA(T66, T67)
    The graph contains the following edges 1 > 1, 2 > 2

(13) YES

(14) Obligation:

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

LSS13_IN_GG(s(T36), s(T37)) → LSS13_IN_GG(T36, T37)

The TRS R consists of the following rules:

subc25_in_gga(s(T66), s(T67), X89) → U13_gga(T66, T67, X89, subc25_in_gga(T66, T67, X89))
subc25_in_gga(T72, 0, T72) → subc25_out_gga(T72, 0, T72)
U13_gga(T66, T67, X89, subc25_out_gga(T66, T67, X89)) → subc25_out_gga(s(T66), s(T67), X89)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
subc25_in_gga(x1, x2, x3)  =  subc25_in_gga(x1, x2)
U13_gga(x1, x2, x3, x4)  =  U13_gga(x1, x2, x4)
0  =  0
subc25_out_gga(x1, x2, x3)  =  subc25_out_gga(x1, x2, x3)
LSS13_IN_GG(x1, x2)  =  LSS13_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:

LSS13_IN_GG(s(T36), s(T37)) → LSS13_IN_GG(T36, T37)

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:

LSS13_IN_GG(s(T36), s(T37)) → LSS13_IN_GG(T36, T37)

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:

  • LSS13_IN_GG(s(T36), s(T37)) → LSS13_IN_GG(T36, T37)
    The graph contains the following edges 1 > 1, 2 > 2

(20) YES

(21) Obligation:

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

DIV_S3_IN_GGA(s(T49), T50, s(T52)) → U4_GGA(T49, T50, T52, subc25_in_gga(T49, T50, T55))
U4_GGA(T49, T50, T52, subc25_out_gga(T49, T50, T55)) → DIV_S3_IN_GGA(T55, T50, T52)

The TRS R consists of the following rules:

subc25_in_gga(s(T66), s(T67), X89) → U13_gga(T66, T67, X89, subc25_in_gga(T66, T67, X89))
subc25_in_gga(T72, 0, T72) → subc25_out_gga(T72, 0, T72)
U13_gga(T66, T67, X89, subc25_out_gga(T66, T67, X89)) → subc25_out_gga(s(T66), s(T67), X89)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
subc25_in_gga(x1, x2, x3)  =  subc25_in_gga(x1, x2)
U13_gga(x1, x2, x3, x4)  =  U13_gga(x1, x2, x4)
0  =  0
subc25_out_gga(x1, x2, x3)  =  subc25_out_gga(x1, x2, x3)
DIV_S3_IN_GGA(x1, x2, x3)  =  DIV_S3_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x2, x4)

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

(22) PiDPToQDPProof (SOUND transformation)

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

(23) Obligation:

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

DIV_S3_IN_GGA(s(T49), T50) → U4_GGA(T49, T50, subc25_in_gga(T49, T50))
U4_GGA(T49, T50, subc25_out_gga(T49, T50, T55)) → DIV_S3_IN_GGA(T55, T50)

The TRS R consists of the following rules:

subc25_in_gga(s(T66), s(T67)) → U13_gga(T66, T67, subc25_in_gga(T66, T67))
subc25_in_gga(T72, 0) → subc25_out_gga(T72, 0, T72)
U13_gga(T66, T67, subc25_out_gga(T66, T67, X89)) → subc25_out_gga(s(T66), s(T67), X89)

The set Q consists of the following terms:

subc25_in_gga(x0, x1)
U13_gga(x0, x1, x2)

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

(24) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


DIV_S3_IN_GGA(s(T49), T50) → U4_GGA(T49, T50, subc25_in_gga(T49, T50))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(DIV_S3_IN_GGA(x1, x2)) = x1 + x2   
POL(U13_gga(x1, x2, x3)) = 1 + x3   
POL(U4_GGA(x1, x2, x3)) = x3   
POL(s(x1)) = 1 + x1   
POL(subc25_in_gga(x1, x2)) = x1   
POL(subc25_out_gga(x1, x2, x3)) = x2 + x3   

The following usable rules [FROCOS05] were oriented:

subc25_in_gga(s(T66), s(T67)) → U13_gga(T66, T67, subc25_in_gga(T66, T67))
subc25_in_gga(T72, 0) → subc25_out_gga(T72, 0, T72)
U13_gga(T66, T67, subc25_out_gga(T66, T67, X89)) → subc25_out_gga(s(T66), s(T67), X89)

(25) Obligation:

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

U4_GGA(T49, T50, subc25_out_gga(T49, T50, T55)) → DIV_S3_IN_GGA(T55, T50)

The TRS R consists of the following rules:

subc25_in_gga(s(T66), s(T67)) → U13_gga(T66, T67, subc25_in_gga(T66, T67))
subc25_in_gga(T72, 0) → subc25_out_gga(T72, 0, T72)
U13_gga(T66, T67, subc25_out_gga(T66, T67, X89)) → subc25_out_gga(s(T66), s(T67), X89)

The set Q consists of the following terms:

subc25_in_gga(x0, x1)
U13_gga(x0, x1, x2)

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

(26) DependencyGraphProof (EQUIVALENT transformation)

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

(27) TRUE