(0) Obligation:

Clauses:

m(X, 0, Z) :- ','(!, =(Z, X)).
m(0, Y, Z) :- ','(!, =(Z, 0)).
m(X, Y, Z) :- ','(p(X, A), ','(p(Y, B), m(A, B, Z))).
p(0, 0).
p(s(0), 0).
p(s(s(X)), s(Y)) :- p(s(X), Y).
=(X, X).

Queries:

m(g,g,a).

(1) BuiltinConflictTransformerProof (SOUND transformation)

Renamed defined predicates conflicting with built-in predicates [PROLOG].

(2) Obligation:

Clauses:

m(X, 0, Z) :- ','(!, user_defined_=(Z, X)).
m(0, Y, Z) :- ','(!, user_defined_=(Z, 0)).
m(X, Y, Z) :- ','(p(X, A), ','(p(Y, B), m(A, B, Z))).
p(0, 0).
p(s(0), 0).
p(s(s(X)), s(Y)) :- p(s(X), Y).
user_defined_=(X, X).

Queries:

m(g,g,a).

(3) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(4) Obligation:

Triples:

p33(s(T33), s(X48)) :- p33(T33, X48).
m1(s(0), s(s(T30)), T26) :- p33(T30, X37).
m1(s(s(T55)), T24, T26) :- p33(T55, X83).
m1(s(s(T55)), s(s(T60)), T26) :- ','(pc33(T55, T56), p33(T60, X94)).
m1(s(s(T55)), T24, T26) :- ','(pc33(T55, T56), ','(pc62(T24, T57), m1(s(T56), T57, T26))).

Clauses:

pc33(0, 0).
pc33(s(T33), s(X48)) :- pc33(T33, X48).
mc1(T11, 0, T11).
mc1(0, T14, 0).
mc1(s(0), T24, 0) :- pc24(T24, 0).
mc1(s(0), T24, 0) :- pc24(T24, T47).
mc1(s(s(T55)), T24, T26) :- ','(pc33(T55, T56), ','(pc62(T24, T57), mc1(s(T56), T57, T26))).
pc24(s(0), 0).
pc24(s(s(T30)), s(X37)) :- pc33(T30, X37).
pc62(s(0), 0).
pc62(s(s(T60)), s(X94)) :- pc33(T60, X94).

Afs:

m1(x1, x2, x3)  =  m1(x1, x2)

(5) TriplesToPiDPProof (SOUND transformation)

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

M1_IN_GGA(s(0), s(s(T30)), T26) → U2_GGA(T30, T26, p33_in_ga(T30, X37))
M1_IN_GGA(s(0), s(s(T30)), T26) → P33_IN_GA(T30, X37)
P33_IN_GA(s(T33), s(X48)) → U1_GA(T33, X48, p33_in_ga(T33, X48))
P33_IN_GA(s(T33), s(X48)) → P33_IN_GA(T33, X48)
M1_IN_GGA(s(s(T55)), T24, T26) → U3_GGA(T55, T24, T26, p33_in_ga(T55, X83))
M1_IN_GGA(s(s(T55)), T24, T26) → P33_IN_GA(T55, X83)
M1_IN_GGA(s(s(T55)), s(s(T60)), T26) → U4_GGA(T55, T60, T26, pc33_in_ga(T55, T56))
U4_GGA(T55, T60, T26, pc33_out_ga(T55, T56)) → U5_GGA(T55, T60, T26, p33_in_ga(T60, X94))
U4_GGA(T55, T60, T26, pc33_out_ga(T55, T56)) → P33_IN_GA(T60, X94)
M1_IN_GGA(s(s(T55)), T24, T26) → U6_GGA(T55, T24, T26, pc33_in_ga(T55, T56))
U6_GGA(T55, T24, T26, pc33_out_ga(T55, T56)) → U7_GGA(T55, T24, T26, T56, pc62_in_ga(T24, T57))
U7_GGA(T55, T24, T26, T56, pc62_out_ga(T24, T57)) → U8_GGA(T55, T24, T26, m1_in_gga(s(T56), T57, T26))
U7_GGA(T55, T24, T26, T56, pc62_out_ga(T24, T57)) → M1_IN_GGA(s(T56), T57, T26)

The TRS R consists of the following rules:

pc33_in_ga(0, 0) → pc33_out_ga(0, 0)
pc33_in_ga(s(T33), s(X48)) → U10_ga(T33, X48, pc33_in_ga(T33, X48))
U10_ga(T33, X48, pc33_out_ga(T33, X48)) → pc33_out_ga(s(T33), s(X48))
pc62_in_ga(s(0), 0) → pc62_out_ga(s(0), 0)
pc62_in_ga(s(s(T60)), s(X94)) → U17_ga(T60, X94, pc33_in_ga(T60, X94))
U17_ga(T60, X94, pc33_out_ga(T60, X94)) → pc62_out_ga(s(s(T60)), s(X94))

The argument filtering Pi contains the following mapping:
m1_in_gga(x1, x2, x3)  =  m1_in_gga(x1, x2)
s(x1)  =  s(x1)
0  =  0
p33_in_ga(x1, x2)  =  p33_in_ga(x1)
pc33_in_ga(x1, x2)  =  pc33_in_ga(x1)
pc33_out_ga(x1, x2)  =  pc33_out_ga(x1, x2)
U10_ga(x1, x2, x3)  =  U10_ga(x1, x3)
pc62_in_ga(x1, x2)  =  pc62_in_ga(x1)
pc62_out_ga(x1, x2)  =  pc62_out_ga(x1, x2)
U17_ga(x1, x2, x3)  =  U17_ga(x1, x3)
M1_IN_GGA(x1, x2, x3)  =  M1_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3)  =  U2_GGA(x1, x3)
P33_IN_GA(x1, x2)  =  P33_IN_GA(x1)
U1_GA(x1, x2, x3)  =  U1_GA(x1, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_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)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x1, x2, x4)
U7_GGA(x1, x2, x3, x4, x5)  =  U7_GGA(x1, x2, x4, x5)
U8_GGA(x1, x2, x3, x4)  =  U8_GGA(x1, x2, x4)

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

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(6) Obligation:

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

M1_IN_GGA(s(0), s(s(T30)), T26) → U2_GGA(T30, T26, p33_in_ga(T30, X37))
M1_IN_GGA(s(0), s(s(T30)), T26) → P33_IN_GA(T30, X37)
P33_IN_GA(s(T33), s(X48)) → U1_GA(T33, X48, p33_in_ga(T33, X48))
P33_IN_GA(s(T33), s(X48)) → P33_IN_GA(T33, X48)
M1_IN_GGA(s(s(T55)), T24, T26) → U3_GGA(T55, T24, T26, p33_in_ga(T55, X83))
M1_IN_GGA(s(s(T55)), T24, T26) → P33_IN_GA(T55, X83)
M1_IN_GGA(s(s(T55)), s(s(T60)), T26) → U4_GGA(T55, T60, T26, pc33_in_ga(T55, T56))
U4_GGA(T55, T60, T26, pc33_out_ga(T55, T56)) → U5_GGA(T55, T60, T26, p33_in_ga(T60, X94))
U4_GGA(T55, T60, T26, pc33_out_ga(T55, T56)) → P33_IN_GA(T60, X94)
M1_IN_GGA(s(s(T55)), T24, T26) → U6_GGA(T55, T24, T26, pc33_in_ga(T55, T56))
U6_GGA(T55, T24, T26, pc33_out_ga(T55, T56)) → U7_GGA(T55, T24, T26, T56, pc62_in_ga(T24, T57))
U7_GGA(T55, T24, T26, T56, pc62_out_ga(T24, T57)) → U8_GGA(T55, T24, T26, m1_in_gga(s(T56), T57, T26))
U7_GGA(T55, T24, T26, T56, pc62_out_ga(T24, T57)) → M1_IN_GGA(s(T56), T57, T26)

The TRS R consists of the following rules:

pc33_in_ga(0, 0) → pc33_out_ga(0, 0)
pc33_in_ga(s(T33), s(X48)) → U10_ga(T33, X48, pc33_in_ga(T33, X48))
U10_ga(T33, X48, pc33_out_ga(T33, X48)) → pc33_out_ga(s(T33), s(X48))
pc62_in_ga(s(0), 0) → pc62_out_ga(s(0), 0)
pc62_in_ga(s(s(T60)), s(X94)) → U17_ga(T60, X94, pc33_in_ga(T60, X94))
U17_ga(T60, X94, pc33_out_ga(T60, X94)) → pc62_out_ga(s(s(T60)), s(X94))

The argument filtering Pi contains the following mapping:
m1_in_gga(x1, x2, x3)  =  m1_in_gga(x1, x2)
s(x1)  =  s(x1)
0  =  0
p33_in_ga(x1, x2)  =  p33_in_ga(x1)
pc33_in_ga(x1, x2)  =  pc33_in_ga(x1)
pc33_out_ga(x1, x2)  =  pc33_out_ga(x1, x2)
U10_ga(x1, x2, x3)  =  U10_ga(x1, x3)
pc62_in_ga(x1, x2)  =  pc62_in_ga(x1)
pc62_out_ga(x1, x2)  =  pc62_out_ga(x1, x2)
U17_ga(x1, x2, x3)  =  U17_ga(x1, x3)
M1_IN_GGA(x1, x2, x3)  =  M1_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3)  =  U2_GGA(x1, x3)
P33_IN_GA(x1, x2)  =  P33_IN_GA(x1)
U1_GA(x1, x2, x3)  =  U1_GA(x1, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_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)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x1, x2, x4)
U7_GGA(x1, x2, x3, x4, x5)  =  U7_GGA(x1, x2, x4, x5)
U8_GGA(x1, x2, x3, x4)  =  U8_GGA(x1, x2, x4)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 9 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

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

P33_IN_GA(s(T33), s(X48)) → P33_IN_GA(T33, X48)

The TRS R consists of the following rules:

pc33_in_ga(0, 0) → pc33_out_ga(0, 0)
pc33_in_ga(s(T33), s(X48)) → U10_ga(T33, X48, pc33_in_ga(T33, X48))
U10_ga(T33, X48, pc33_out_ga(T33, X48)) → pc33_out_ga(s(T33), s(X48))
pc62_in_ga(s(0), 0) → pc62_out_ga(s(0), 0)
pc62_in_ga(s(s(T60)), s(X94)) → U17_ga(T60, X94, pc33_in_ga(T60, X94))
U17_ga(T60, X94, pc33_out_ga(T60, X94)) → pc62_out_ga(s(s(T60)), s(X94))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
0  =  0
pc33_in_ga(x1, x2)  =  pc33_in_ga(x1)
pc33_out_ga(x1, x2)  =  pc33_out_ga(x1, x2)
U10_ga(x1, x2, x3)  =  U10_ga(x1, x3)
pc62_in_ga(x1, x2)  =  pc62_in_ga(x1)
pc62_out_ga(x1, x2)  =  pc62_out_ga(x1, x2)
U17_ga(x1, x2, x3)  =  U17_ga(x1, x3)
P33_IN_GA(x1, x2)  =  P33_IN_GA(x1)

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

(10) UsableRulesProof (EQUIVALENT transformation)

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

(11) Obligation:

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

P33_IN_GA(s(T33), s(X48)) → P33_IN_GA(T33, X48)

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

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

(12) PiDPToQDPProof (SOUND transformation)

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

(13) Obligation:

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

P33_IN_GA(s(T33)) → P33_IN_GA(T33)

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

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

  • P33_IN_GA(s(T33)) → P33_IN_GA(T33)
    The graph contains the following edges 1 > 1

(15) YES

(16) Obligation:

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

M1_IN_GGA(s(s(T55)), T24, T26) → U6_GGA(T55, T24, T26, pc33_in_ga(T55, T56))
U6_GGA(T55, T24, T26, pc33_out_ga(T55, T56)) → U7_GGA(T55, T24, T26, T56, pc62_in_ga(T24, T57))
U7_GGA(T55, T24, T26, T56, pc62_out_ga(T24, T57)) → M1_IN_GGA(s(T56), T57, T26)

The TRS R consists of the following rules:

pc33_in_ga(0, 0) → pc33_out_ga(0, 0)
pc33_in_ga(s(T33), s(X48)) → U10_ga(T33, X48, pc33_in_ga(T33, X48))
U10_ga(T33, X48, pc33_out_ga(T33, X48)) → pc33_out_ga(s(T33), s(X48))
pc62_in_ga(s(0), 0) → pc62_out_ga(s(0), 0)
pc62_in_ga(s(s(T60)), s(X94)) → U17_ga(T60, X94, pc33_in_ga(T60, X94))
U17_ga(T60, X94, pc33_out_ga(T60, X94)) → pc62_out_ga(s(s(T60)), s(X94))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
0  =  0
pc33_in_ga(x1, x2)  =  pc33_in_ga(x1)
pc33_out_ga(x1, x2)  =  pc33_out_ga(x1, x2)
U10_ga(x1, x2, x3)  =  U10_ga(x1, x3)
pc62_in_ga(x1, x2)  =  pc62_in_ga(x1)
pc62_out_ga(x1, x2)  =  pc62_out_ga(x1, x2)
U17_ga(x1, x2, x3)  =  U17_ga(x1, x3)
M1_IN_GGA(x1, x2, x3)  =  M1_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x1, x2, x4)
U7_GGA(x1, x2, x3, x4, x5)  =  U7_GGA(x1, x2, x4, x5)

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:

M1_IN_GGA(s(s(T55)), T24) → U6_GGA(T55, T24, pc33_in_ga(T55))
U6_GGA(T55, T24, pc33_out_ga(T55, T56)) → U7_GGA(T55, T24, T56, pc62_in_ga(T24))
U7_GGA(T55, T24, T56, pc62_out_ga(T24, T57)) → M1_IN_GGA(s(T56), T57)

The TRS R consists of the following rules:

pc33_in_ga(0) → pc33_out_ga(0, 0)
pc33_in_ga(s(T33)) → U10_ga(T33, pc33_in_ga(T33))
U10_ga(T33, pc33_out_ga(T33, X48)) → pc33_out_ga(s(T33), s(X48))
pc62_in_ga(s(0)) → pc62_out_ga(s(0), 0)
pc62_in_ga(s(s(T60))) → U17_ga(T60, pc33_in_ga(T60))
U17_ga(T60, pc33_out_ga(T60, X94)) → pc62_out_ga(s(s(T60)), s(X94))

The set Q consists of the following terms:

pc33_in_ga(x0)
U10_ga(x0, x1)
pc62_in_ga(x0)
U17_ga(x0, x1)

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

(19) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


M1_IN_GGA(s(s(T55)), T24) → U6_GGA(T55, T24, pc33_in_ga(T55))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(M1_IN_GGA(x1, x2)) = x1   
POL(U10_ga(x1, x2)) = 1 + x2   
POL(U17_ga(x1, x2)) = 0   
POL(U6_GGA(x1, x2, x3)) = 1 + x3   
POL(U7_GGA(x1, x2, x3, x4)) = 1 + x3   
POL(pc33_in_ga(x1)) = x1   
POL(pc33_out_ga(x1, x2)) = x2   
POL(pc62_in_ga(x1)) = 0   
POL(pc62_out_ga(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   

The following usable rules [FROCOS05] were oriented:

pc33_in_ga(0) → pc33_out_ga(0, 0)
pc33_in_ga(s(T33)) → U10_ga(T33, pc33_in_ga(T33))
U10_ga(T33, pc33_out_ga(T33, X48)) → pc33_out_ga(s(T33), s(X48))

(20) Obligation:

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

U6_GGA(T55, T24, pc33_out_ga(T55, T56)) → U7_GGA(T55, T24, T56, pc62_in_ga(T24))
U7_GGA(T55, T24, T56, pc62_out_ga(T24, T57)) → M1_IN_GGA(s(T56), T57)

The TRS R consists of the following rules:

pc33_in_ga(0) → pc33_out_ga(0, 0)
pc33_in_ga(s(T33)) → U10_ga(T33, pc33_in_ga(T33))
U10_ga(T33, pc33_out_ga(T33, X48)) → pc33_out_ga(s(T33), s(X48))
pc62_in_ga(s(0)) → pc62_out_ga(s(0), 0)
pc62_in_ga(s(s(T60))) → U17_ga(T60, pc33_in_ga(T60))
U17_ga(T60, pc33_out_ga(T60, X94)) → pc62_out_ga(s(s(T60)), s(X94))

The set Q consists of the following terms:

pc33_in_ga(x0)
U10_ga(x0, x1)
pc62_in_ga(x0)
U17_ga(x0, x1)

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

(21) DependencyGraphProof (EQUIVALENT transformation)

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

(22) TRUE