(0) Obligation:

Clauses:

mult(0, Y, 0).
mult(s(X), Y, Z) :- ','(mult(X, Y, Z1), add(Z1, Y, Z)).
add(0, Y, Y).
add(s(X), Y, s(Z)) :- add(X, Y, Z).

Queries:

mult(g,g,a).

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(2) Obligation:

Triples:

mult23(s(T45), T46, X74) :- mult23(T45, T46, X73).
mult23(s(T45), T46, X74) :- ','(multc23(T45, T46, T49), add34(T49, T46, X74)).
add34(s(T63), T64, s(X101)) :- add34(T63, T64, X101).
add44(s(T85), T86, s(T88)) :- add44(T85, T86, T88).
mult1(s(s(T29)), T30, T12) :- mult23(T29, T30, X46).
mult1(s(s(T29)), T30, T12) :- ','(multc23(T29, T30, T33), add34(T33, T30, X47)).
mult1(s(s(T29)), T30, T12) :- ','(multc23(T29, T30, T33), ','(addc34(T33, T30, T69), add44(T69, T30, T12))).

Clauses:

multc23(0, T40, 0).
multc23(s(T45), T46, X74) :- ','(multc23(T45, T46, T49), addc34(T49, T46, X74)).
addc34(0, T58, T58).
addc34(s(T63), T64, s(X101)) :- addc34(T63, T64, X101).
addc44(0, T78, T78).
addc44(s(T85), T86, s(T88)) :- addc44(T85, T86, T88).

Afs:

mult1(x1, x2, x3)  =  mult1(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:
mult1_in: (b,b,f)
mult23_in: (b,b,f)
multc23_in: (b,b,f)
addc34_in: (b,b,f)
add34_in: (b,b,f)
add44_in: (b,b,f)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

MULT1_IN_GGA(s(s(T29)), T30, T12) → U6_GGA(T29, T30, T12, mult23_in_gga(T29, T30, X46))
MULT1_IN_GGA(s(s(T29)), T30, T12) → MULT23_IN_GGA(T29, T30, X46)
MULT23_IN_GGA(s(T45), T46, X74) → U1_GGA(T45, T46, X74, mult23_in_gga(T45, T46, X73))
MULT23_IN_GGA(s(T45), T46, X74) → MULT23_IN_GGA(T45, T46, X73)
MULT23_IN_GGA(s(T45), T46, X74) → U2_GGA(T45, T46, X74, multc23_in_gga(T45, T46, T49))
U2_GGA(T45, T46, X74, multc23_out_gga(T45, T46, T49)) → U3_GGA(T45, T46, X74, add34_in_gga(T49, T46, X74))
U2_GGA(T45, T46, X74, multc23_out_gga(T45, T46, T49)) → ADD34_IN_GGA(T49, T46, X74)
ADD34_IN_GGA(s(T63), T64, s(X101)) → U4_GGA(T63, T64, X101, add34_in_gga(T63, T64, X101))
ADD34_IN_GGA(s(T63), T64, s(X101)) → ADD34_IN_GGA(T63, T64, X101)
MULT1_IN_GGA(s(s(T29)), T30, T12) → U7_GGA(T29, T30, T12, multc23_in_gga(T29, T30, T33))
U7_GGA(T29, T30, T12, multc23_out_gga(T29, T30, T33)) → U8_GGA(T29, T30, T12, add34_in_gga(T33, T30, X47))
U7_GGA(T29, T30, T12, multc23_out_gga(T29, T30, T33)) → ADD34_IN_GGA(T33, T30, X47)
U7_GGA(T29, T30, T12, multc23_out_gga(T29, T30, T33)) → U9_GGA(T29, T30, T12, addc34_in_gga(T33, T30, T69))
U9_GGA(T29, T30, T12, addc34_out_gga(T33, T30, T69)) → U10_GGA(T29, T30, T12, add44_in_gga(T69, T30, T12))
U9_GGA(T29, T30, T12, addc34_out_gga(T33, T30, T69)) → ADD44_IN_GGA(T69, T30, T12)
ADD44_IN_GGA(s(T85), T86, s(T88)) → U5_GGA(T85, T86, T88, add44_in_gga(T85, T86, T88))
ADD44_IN_GGA(s(T85), T86, s(T88)) → ADD44_IN_GGA(T85, T86, T88)

The TRS R consists of the following rules:

multc23_in_gga(0, T40, 0) → multc23_out_gga(0, T40, 0)
multc23_in_gga(s(T45), T46, X74) → U12_gga(T45, T46, X74, multc23_in_gga(T45, T46, T49))
U12_gga(T45, T46, X74, multc23_out_gga(T45, T46, T49)) → U13_gga(T45, T46, X74, addc34_in_gga(T49, T46, X74))
addc34_in_gga(0, T58, T58) → addc34_out_gga(0, T58, T58)
addc34_in_gga(s(T63), T64, s(X101)) → U14_gga(T63, T64, X101, addc34_in_gga(T63, T64, X101))
U14_gga(T63, T64, X101, addc34_out_gga(T63, T64, X101)) → addc34_out_gga(s(T63), T64, s(X101))
U13_gga(T45, T46, X74, addc34_out_gga(T49, T46, X74)) → multc23_out_gga(s(T45), T46, X74)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
mult23_in_gga(x1, x2, x3)  =  mult23_in_gga(x1, x2)
multc23_in_gga(x1, x2, x3)  =  multc23_in_gga(x1, x2)
0  =  0
multc23_out_gga(x1, x2, x3)  =  multc23_out_gga(x1, x2, x3)
U12_gga(x1, x2, x3, x4)  =  U12_gga(x1, x2, x4)
U13_gga(x1, x2, x3, x4)  =  U13_gga(x1, x2, x4)
addc34_in_gga(x1, x2, x3)  =  addc34_in_gga(x1, x2)
addc34_out_gga(x1, x2, x3)  =  addc34_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
add34_in_gga(x1, x2, x3)  =  add34_in_gga(x1, x2)
add44_in_gga(x1, x2, x3)  =  add44_in_gga(x1, x2)
MULT1_IN_GGA(x1, x2, x3)  =  MULT1_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x1, x2, x4)
MULT23_IN_GGA(x1, x2, x3)  =  MULT23_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x1, x2, x4)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x1, x2, x4)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
ADD34_IN_GGA(x1, x2, x3)  =  ADD34_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x2, x4)
U7_GGA(x1, x2, x3, x4)  =  U7_GGA(x1, x2, x4)
U8_GGA(x1, x2, x3, x4)  =  U8_GGA(x1, x2, x4)
U9_GGA(x1, x2, x3, x4)  =  U9_GGA(x1, x2, x4)
U10_GGA(x1, x2, x3, x4)  =  U10_GGA(x1, x2, x4)
ADD44_IN_GGA(x1, x2, x3)  =  ADD44_IN_GGA(x1, x2)
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:

MULT1_IN_GGA(s(s(T29)), T30, T12) → U6_GGA(T29, T30, T12, mult23_in_gga(T29, T30, X46))
MULT1_IN_GGA(s(s(T29)), T30, T12) → MULT23_IN_GGA(T29, T30, X46)
MULT23_IN_GGA(s(T45), T46, X74) → U1_GGA(T45, T46, X74, mult23_in_gga(T45, T46, X73))
MULT23_IN_GGA(s(T45), T46, X74) → MULT23_IN_GGA(T45, T46, X73)
MULT23_IN_GGA(s(T45), T46, X74) → U2_GGA(T45, T46, X74, multc23_in_gga(T45, T46, T49))
U2_GGA(T45, T46, X74, multc23_out_gga(T45, T46, T49)) → U3_GGA(T45, T46, X74, add34_in_gga(T49, T46, X74))
U2_GGA(T45, T46, X74, multc23_out_gga(T45, T46, T49)) → ADD34_IN_GGA(T49, T46, X74)
ADD34_IN_GGA(s(T63), T64, s(X101)) → U4_GGA(T63, T64, X101, add34_in_gga(T63, T64, X101))
ADD34_IN_GGA(s(T63), T64, s(X101)) → ADD34_IN_GGA(T63, T64, X101)
MULT1_IN_GGA(s(s(T29)), T30, T12) → U7_GGA(T29, T30, T12, multc23_in_gga(T29, T30, T33))
U7_GGA(T29, T30, T12, multc23_out_gga(T29, T30, T33)) → U8_GGA(T29, T30, T12, add34_in_gga(T33, T30, X47))
U7_GGA(T29, T30, T12, multc23_out_gga(T29, T30, T33)) → ADD34_IN_GGA(T33, T30, X47)
U7_GGA(T29, T30, T12, multc23_out_gga(T29, T30, T33)) → U9_GGA(T29, T30, T12, addc34_in_gga(T33, T30, T69))
U9_GGA(T29, T30, T12, addc34_out_gga(T33, T30, T69)) → U10_GGA(T29, T30, T12, add44_in_gga(T69, T30, T12))
U9_GGA(T29, T30, T12, addc34_out_gga(T33, T30, T69)) → ADD44_IN_GGA(T69, T30, T12)
ADD44_IN_GGA(s(T85), T86, s(T88)) → U5_GGA(T85, T86, T88, add44_in_gga(T85, T86, T88))
ADD44_IN_GGA(s(T85), T86, s(T88)) → ADD44_IN_GGA(T85, T86, T88)

The TRS R consists of the following rules:

multc23_in_gga(0, T40, 0) → multc23_out_gga(0, T40, 0)
multc23_in_gga(s(T45), T46, X74) → U12_gga(T45, T46, X74, multc23_in_gga(T45, T46, T49))
U12_gga(T45, T46, X74, multc23_out_gga(T45, T46, T49)) → U13_gga(T45, T46, X74, addc34_in_gga(T49, T46, X74))
addc34_in_gga(0, T58, T58) → addc34_out_gga(0, T58, T58)
addc34_in_gga(s(T63), T64, s(X101)) → U14_gga(T63, T64, X101, addc34_in_gga(T63, T64, X101))
U14_gga(T63, T64, X101, addc34_out_gga(T63, T64, X101)) → addc34_out_gga(s(T63), T64, s(X101))
U13_gga(T45, T46, X74, addc34_out_gga(T49, T46, X74)) → multc23_out_gga(s(T45), T46, X74)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
mult23_in_gga(x1, x2, x3)  =  mult23_in_gga(x1, x2)
multc23_in_gga(x1, x2, x3)  =  multc23_in_gga(x1, x2)
0  =  0
multc23_out_gga(x1, x2, x3)  =  multc23_out_gga(x1, x2, x3)
U12_gga(x1, x2, x3, x4)  =  U12_gga(x1, x2, x4)
U13_gga(x1, x2, x3, x4)  =  U13_gga(x1, x2, x4)
addc34_in_gga(x1, x2, x3)  =  addc34_in_gga(x1, x2)
addc34_out_gga(x1, x2, x3)  =  addc34_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
add34_in_gga(x1, x2, x3)  =  add34_in_gga(x1, x2)
add44_in_gga(x1, x2, x3)  =  add44_in_gga(x1, x2)
MULT1_IN_GGA(x1, x2, x3)  =  MULT1_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x1, x2, x4)
MULT23_IN_GGA(x1, x2, x3)  =  MULT23_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x1, x2, x4)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x1, x2, x4)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
ADD34_IN_GGA(x1, x2, x3)  =  ADD34_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x2, x4)
U7_GGA(x1, x2, x3, x4)  =  U7_GGA(x1, x2, x4)
U8_GGA(x1, x2, x3, x4)  =  U8_GGA(x1, x2, x4)
U9_GGA(x1, x2, x3, x4)  =  U9_GGA(x1, x2, x4)
U10_GGA(x1, x2, x3, x4)  =  U10_GGA(x1, x2, x4)
ADD44_IN_GGA(x1, x2, x3)  =  ADD44_IN_GGA(x1, x2)
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 14 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

ADD44_IN_GGA(s(T85), T86, s(T88)) → ADD44_IN_GGA(T85, T86, T88)

The TRS R consists of the following rules:

multc23_in_gga(0, T40, 0) → multc23_out_gga(0, T40, 0)
multc23_in_gga(s(T45), T46, X74) → U12_gga(T45, T46, X74, multc23_in_gga(T45, T46, T49))
U12_gga(T45, T46, X74, multc23_out_gga(T45, T46, T49)) → U13_gga(T45, T46, X74, addc34_in_gga(T49, T46, X74))
addc34_in_gga(0, T58, T58) → addc34_out_gga(0, T58, T58)
addc34_in_gga(s(T63), T64, s(X101)) → U14_gga(T63, T64, X101, addc34_in_gga(T63, T64, X101))
U14_gga(T63, T64, X101, addc34_out_gga(T63, T64, X101)) → addc34_out_gga(s(T63), T64, s(X101))
U13_gga(T45, T46, X74, addc34_out_gga(T49, T46, X74)) → multc23_out_gga(s(T45), T46, X74)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
multc23_in_gga(x1, x2, x3)  =  multc23_in_gga(x1, x2)
0  =  0
multc23_out_gga(x1, x2, x3)  =  multc23_out_gga(x1, x2, x3)
U12_gga(x1, x2, x3, x4)  =  U12_gga(x1, x2, x4)
U13_gga(x1, x2, x3, x4)  =  U13_gga(x1, x2, x4)
addc34_in_gga(x1, x2, x3)  =  addc34_in_gga(x1, x2)
addc34_out_gga(x1, x2, x3)  =  addc34_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
ADD44_IN_GGA(x1, x2, x3)  =  ADD44_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:

ADD44_IN_GGA(s(T85), T86, s(T88)) → ADD44_IN_GGA(T85, T86, T88)

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

ADD44_IN_GGA(s(T85), T86) → ADD44_IN_GGA(T85, T86)

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:

  • ADD44_IN_GGA(s(T85), T86) → ADD44_IN_GGA(T85, T86)
    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:

ADD34_IN_GGA(s(T63), T64, s(X101)) → ADD34_IN_GGA(T63, T64, X101)

The TRS R consists of the following rules:

multc23_in_gga(0, T40, 0) → multc23_out_gga(0, T40, 0)
multc23_in_gga(s(T45), T46, X74) → U12_gga(T45, T46, X74, multc23_in_gga(T45, T46, T49))
U12_gga(T45, T46, X74, multc23_out_gga(T45, T46, T49)) → U13_gga(T45, T46, X74, addc34_in_gga(T49, T46, X74))
addc34_in_gga(0, T58, T58) → addc34_out_gga(0, T58, T58)
addc34_in_gga(s(T63), T64, s(X101)) → U14_gga(T63, T64, X101, addc34_in_gga(T63, T64, X101))
U14_gga(T63, T64, X101, addc34_out_gga(T63, T64, X101)) → addc34_out_gga(s(T63), T64, s(X101))
U13_gga(T45, T46, X74, addc34_out_gga(T49, T46, X74)) → multc23_out_gga(s(T45), T46, X74)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
multc23_in_gga(x1, x2, x3)  =  multc23_in_gga(x1, x2)
0  =  0
multc23_out_gga(x1, x2, x3)  =  multc23_out_gga(x1, x2, x3)
U12_gga(x1, x2, x3, x4)  =  U12_gga(x1, x2, x4)
U13_gga(x1, x2, x3, x4)  =  U13_gga(x1, x2, x4)
addc34_in_gga(x1, x2, x3)  =  addc34_in_gga(x1, x2)
addc34_out_gga(x1, x2, x3)  =  addc34_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
ADD34_IN_GGA(x1, x2, x3)  =  ADD34_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:

ADD34_IN_GGA(s(T63), T64, s(X101)) → ADD34_IN_GGA(T63, T64, X101)

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

ADD34_IN_GGA(s(T63), T64) → ADD34_IN_GGA(T63, T64)

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:

  • ADD34_IN_GGA(s(T63), T64) → ADD34_IN_GGA(T63, T64)
    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:

MULT23_IN_GGA(s(T45), T46, X74) → MULT23_IN_GGA(T45, T46, X73)

The TRS R consists of the following rules:

multc23_in_gga(0, T40, 0) → multc23_out_gga(0, T40, 0)
multc23_in_gga(s(T45), T46, X74) → U12_gga(T45, T46, X74, multc23_in_gga(T45, T46, T49))
U12_gga(T45, T46, X74, multc23_out_gga(T45, T46, T49)) → U13_gga(T45, T46, X74, addc34_in_gga(T49, T46, X74))
addc34_in_gga(0, T58, T58) → addc34_out_gga(0, T58, T58)
addc34_in_gga(s(T63), T64, s(X101)) → U14_gga(T63, T64, X101, addc34_in_gga(T63, T64, X101))
U14_gga(T63, T64, X101, addc34_out_gga(T63, T64, X101)) → addc34_out_gga(s(T63), T64, s(X101))
U13_gga(T45, T46, X74, addc34_out_gga(T49, T46, X74)) → multc23_out_gga(s(T45), T46, X74)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
multc23_in_gga(x1, x2, x3)  =  multc23_in_gga(x1, x2)
0  =  0
multc23_out_gga(x1, x2, x3)  =  multc23_out_gga(x1, x2, x3)
U12_gga(x1, x2, x3, x4)  =  U12_gga(x1, x2, x4)
U13_gga(x1, x2, x3, x4)  =  U13_gga(x1, x2, x4)
addc34_in_gga(x1, x2, x3)  =  addc34_in_gga(x1, x2)
addc34_out_gga(x1, x2, x3)  =  addc34_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
MULT23_IN_GGA(x1, x2, x3)  =  MULT23_IN_GGA(x1, x2)

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:

MULT23_IN_GGA(s(T45), T46, X74) → MULT23_IN_GGA(T45, T46, X73)

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

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:

MULT23_IN_GGA(s(T45), T46) → MULT23_IN_GGA(T45, T46)

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

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

  • MULT23_IN_GGA(s(T45), T46) → MULT23_IN_GGA(T45, T46)
    The graph contains the following edges 1 > 1, 2 >= 2

(27) YES