Left Termination of the query pattern sum(b,f,b) w.r.t. the given Prolog program could successfully be proven:



PROLOG
  ↳ PrologToPiTRSProof

sum3({}0, {}0, {}0).
sum3(.2(X1, Y1), .2(X2, Y2), .2(X3, Y3)) :- add3(X1, X2, X3), sum3(Y1, Y2, Y3).
add3(00, X, X).
add3(s1(X), Y, s1(Z)) :- add3(X, Y, Z).


With regard to the inferred argument filtering the predicates were used in the following modes:
sum3: (b,f,b)
add3: (b,f,b)
Transforming PROLOG into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:


sum_3_in_gag3([]_0, []_0, []_0) -> sum_3_out_gag3([]_0, []_0, []_0)
sum_3_in_gag3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3)) -> if_sum_3_in_1_gag7(X1, Y1, X2, Y2, X3, Y3, add_3_in_gag3(X1, X2, X3))
add_3_in_gag3(0_0, X, X) -> add_3_out_gag3(0_0, X, X)
add_3_in_gag3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gag4(X, Y, Z, add_3_in_gag3(X, Y, Z))
if_add_3_in_1_gag4(X, Y, Z, add_3_out_gag3(X, Y, Z)) -> add_3_out_gag3(s_11(X), Y, s_11(Z))
if_sum_3_in_1_gag7(X1, Y1, X2, Y2, X3, Y3, add_3_out_gag3(X1, X2, X3)) -> if_sum_3_in_2_gag7(X1, Y1, X2, Y2, X3, Y3, sum_3_in_gag3(Y1, Y2, Y3))
if_sum_3_in_2_gag7(X1, Y1, X2, Y2, X3, Y3, sum_3_out_gag3(Y1, Y2, Y3)) -> sum_3_out_gag3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3))

The argument filtering Pi contains the following mapping:
sum_3_in_gag3(x1, x2, x3)  =  sum_3_in_gag2(x1, x3)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
sum_3_out_gag3(x1, x2, x3)  =  sum_3_out_gag1(x2)
if_sum_3_in_1_gag7(x1, x2, x3, x4, x5, x6, x7)  =  if_sum_3_in_1_gag3(x2, x6, x7)
add_3_in_gag3(x1, x2, x3)  =  add_3_in_gag2(x1, x3)
add_3_out_gag3(x1, x2, x3)  =  add_3_out_gag1(x2)
if_add_3_in_1_gag4(x1, x2, x3, x4)  =  if_add_3_in_1_gag1(x4)
if_sum_3_in_2_gag7(x1, x2, x3, x4, x5, x6, x7)  =  if_sum_3_in_2_gag2(x3, x7)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of PROLOG



↳ PROLOG
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

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

sum_3_in_gag3([]_0, []_0, []_0) -> sum_3_out_gag3([]_0, []_0, []_0)
sum_3_in_gag3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3)) -> if_sum_3_in_1_gag7(X1, Y1, X2, Y2, X3, Y3, add_3_in_gag3(X1, X2, X3))
add_3_in_gag3(0_0, X, X) -> add_3_out_gag3(0_0, X, X)
add_3_in_gag3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gag4(X, Y, Z, add_3_in_gag3(X, Y, Z))
if_add_3_in_1_gag4(X, Y, Z, add_3_out_gag3(X, Y, Z)) -> add_3_out_gag3(s_11(X), Y, s_11(Z))
if_sum_3_in_1_gag7(X1, Y1, X2, Y2, X3, Y3, add_3_out_gag3(X1, X2, X3)) -> if_sum_3_in_2_gag7(X1, Y1, X2, Y2, X3, Y3, sum_3_in_gag3(Y1, Y2, Y3))
if_sum_3_in_2_gag7(X1, Y1, X2, Y2, X3, Y3, sum_3_out_gag3(Y1, Y2, Y3)) -> sum_3_out_gag3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3))

The argument filtering Pi contains the following mapping:
sum_3_in_gag3(x1, x2, x3)  =  sum_3_in_gag2(x1, x3)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
sum_3_out_gag3(x1, x2, x3)  =  sum_3_out_gag1(x2)
if_sum_3_in_1_gag7(x1, x2, x3, x4, x5, x6, x7)  =  if_sum_3_in_1_gag3(x2, x6, x7)
add_3_in_gag3(x1, x2, x3)  =  add_3_in_gag2(x1, x3)
add_3_out_gag3(x1, x2, x3)  =  add_3_out_gag1(x2)
if_add_3_in_1_gag4(x1, x2, x3, x4)  =  if_add_3_in_1_gag1(x4)
if_sum_3_in_2_gag7(x1, x2, x3, x4, x5, x6, x7)  =  if_sum_3_in_2_gag2(x3, x7)


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

SUM_3_IN_GAG3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3)) -> IF_SUM_3_IN_1_GAG7(X1, Y1, X2, Y2, X3, Y3, add_3_in_gag3(X1, X2, X3))
SUM_3_IN_GAG3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3)) -> ADD_3_IN_GAG3(X1, X2, X3)
ADD_3_IN_GAG3(s_11(X), Y, s_11(Z)) -> IF_ADD_3_IN_1_GAG4(X, Y, Z, add_3_in_gag3(X, Y, Z))
ADD_3_IN_GAG3(s_11(X), Y, s_11(Z)) -> ADD_3_IN_GAG3(X, Y, Z)
IF_SUM_3_IN_1_GAG7(X1, Y1, X2, Y2, X3, Y3, add_3_out_gag3(X1, X2, X3)) -> IF_SUM_3_IN_2_GAG7(X1, Y1, X2, Y2, X3, Y3, sum_3_in_gag3(Y1, Y2, Y3))
IF_SUM_3_IN_1_GAG7(X1, Y1, X2, Y2, X3, Y3, add_3_out_gag3(X1, X2, X3)) -> SUM_3_IN_GAG3(Y1, Y2, Y3)

The TRS R consists of the following rules:

sum_3_in_gag3([]_0, []_0, []_0) -> sum_3_out_gag3([]_0, []_0, []_0)
sum_3_in_gag3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3)) -> if_sum_3_in_1_gag7(X1, Y1, X2, Y2, X3, Y3, add_3_in_gag3(X1, X2, X3))
add_3_in_gag3(0_0, X, X) -> add_3_out_gag3(0_0, X, X)
add_3_in_gag3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gag4(X, Y, Z, add_3_in_gag3(X, Y, Z))
if_add_3_in_1_gag4(X, Y, Z, add_3_out_gag3(X, Y, Z)) -> add_3_out_gag3(s_11(X), Y, s_11(Z))
if_sum_3_in_1_gag7(X1, Y1, X2, Y2, X3, Y3, add_3_out_gag3(X1, X2, X3)) -> if_sum_3_in_2_gag7(X1, Y1, X2, Y2, X3, Y3, sum_3_in_gag3(Y1, Y2, Y3))
if_sum_3_in_2_gag7(X1, Y1, X2, Y2, X3, Y3, sum_3_out_gag3(Y1, Y2, Y3)) -> sum_3_out_gag3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3))

The argument filtering Pi contains the following mapping:
sum_3_in_gag3(x1, x2, x3)  =  sum_3_in_gag2(x1, x3)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
sum_3_out_gag3(x1, x2, x3)  =  sum_3_out_gag1(x2)
if_sum_3_in_1_gag7(x1, x2, x3, x4, x5, x6, x7)  =  if_sum_3_in_1_gag3(x2, x6, x7)
add_3_in_gag3(x1, x2, x3)  =  add_3_in_gag2(x1, x3)
add_3_out_gag3(x1, x2, x3)  =  add_3_out_gag1(x2)
if_add_3_in_1_gag4(x1, x2, x3, x4)  =  if_add_3_in_1_gag1(x4)
if_sum_3_in_2_gag7(x1, x2, x3, x4, x5, x6, x7)  =  if_sum_3_in_2_gag2(x3, x7)
IF_SUM_3_IN_2_GAG7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SUM_3_IN_2_GAG2(x3, x7)
IF_ADD_3_IN_1_GAG4(x1, x2, x3, x4)  =  IF_ADD_3_IN_1_GAG1(x4)
SUM_3_IN_GAG3(x1, x2, x3)  =  SUM_3_IN_GAG2(x1, x3)
IF_SUM_3_IN_1_GAG7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SUM_3_IN_1_GAG3(x2, x6, x7)
ADD_3_IN_GAG3(x1, x2, x3)  =  ADD_3_IN_GAG2(x1, x3)

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

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

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

SUM_3_IN_GAG3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3)) -> IF_SUM_3_IN_1_GAG7(X1, Y1, X2, Y2, X3, Y3, add_3_in_gag3(X1, X2, X3))
SUM_3_IN_GAG3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3)) -> ADD_3_IN_GAG3(X1, X2, X3)
ADD_3_IN_GAG3(s_11(X), Y, s_11(Z)) -> IF_ADD_3_IN_1_GAG4(X, Y, Z, add_3_in_gag3(X, Y, Z))
ADD_3_IN_GAG3(s_11(X), Y, s_11(Z)) -> ADD_3_IN_GAG3(X, Y, Z)
IF_SUM_3_IN_1_GAG7(X1, Y1, X2, Y2, X3, Y3, add_3_out_gag3(X1, X2, X3)) -> IF_SUM_3_IN_2_GAG7(X1, Y1, X2, Y2, X3, Y3, sum_3_in_gag3(Y1, Y2, Y3))
IF_SUM_3_IN_1_GAG7(X1, Y1, X2, Y2, X3, Y3, add_3_out_gag3(X1, X2, X3)) -> SUM_3_IN_GAG3(Y1, Y2, Y3)

The TRS R consists of the following rules:

sum_3_in_gag3([]_0, []_0, []_0) -> sum_3_out_gag3([]_0, []_0, []_0)
sum_3_in_gag3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3)) -> if_sum_3_in_1_gag7(X1, Y1, X2, Y2, X3, Y3, add_3_in_gag3(X1, X2, X3))
add_3_in_gag3(0_0, X, X) -> add_3_out_gag3(0_0, X, X)
add_3_in_gag3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gag4(X, Y, Z, add_3_in_gag3(X, Y, Z))
if_add_3_in_1_gag4(X, Y, Z, add_3_out_gag3(X, Y, Z)) -> add_3_out_gag3(s_11(X), Y, s_11(Z))
if_sum_3_in_1_gag7(X1, Y1, X2, Y2, X3, Y3, add_3_out_gag3(X1, X2, X3)) -> if_sum_3_in_2_gag7(X1, Y1, X2, Y2, X3, Y3, sum_3_in_gag3(Y1, Y2, Y3))
if_sum_3_in_2_gag7(X1, Y1, X2, Y2, X3, Y3, sum_3_out_gag3(Y1, Y2, Y3)) -> sum_3_out_gag3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3))

The argument filtering Pi contains the following mapping:
sum_3_in_gag3(x1, x2, x3)  =  sum_3_in_gag2(x1, x3)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
sum_3_out_gag3(x1, x2, x3)  =  sum_3_out_gag1(x2)
if_sum_3_in_1_gag7(x1, x2, x3, x4, x5, x6, x7)  =  if_sum_3_in_1_gag3(x2, x6, x7)
add_3_in_gag3(x1, x2, x3)  =  add_3_in_gag2(x1, x3)
add_3_out_gag3(x1, x2, x3)  =  add_3_out_gag1(x2)
if_add_3_in_1_gag4(x1, x2, x3, x4)  =  if_add_3_in_1_gag1(x4)
if_sum_3_in_2_gag7(x1, x2, x3, x4, x5, x6, x7)  =  if_sum_3_in_2_gag2(x3, x7)
IF_SUM_3_IN_2_GAG7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SUM_3_IN_2_GAG2(x3, x7)
IF_ADD_3_IN_1_GAG4(x1, x2, x3, x4)  =  IF_ADD_3_IN_1_GAG1(x4)
SUM_3_IN_GAG3(x1, x2, x3)  =  SUM_3_IN_GAG2(x1, x3)
IF_SUM_3_IN_1_GAG7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SUM_3_IN_1_GAG3(x2, x6, x7)
ADD_3_IN_GAG3(x1, x2, x3)  =  ADD_3_IN_GAG2(x1, x3)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph contains 2 SCCs with 3 less nodes.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

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

ADD_3_IN_GAG3(s_11(X), Y, s_11(Z)) -> ADD_3_IN_GAG3(X, Y, Z)

The TRS R consists of the following rules:

sum_3_in_gag3([]_0, []_0, []_0) -> sum_3_out_gag3([]_0, []_0, []_0)
sum_3_in_gag3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3)) -> if_sum_3_in_1_gag7(X1, Y1, X2, Y2, X3, Y3, add_3_in_gag3(X1, X2, X3))
add_3_in_gag3(0_0, X, X) -> add_3_out_gag3(0_0, X, X)
add_3_in_gag3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gag4(X, Y, Z, add_3_in_gag3(X, Y, Z))
if_add_3_in_1_gag4(X, Y, Z, add_3_out_gag3(X, Y, Z)) -> add_3_out_gag3(s_11(X), Y, s_11(Z))
if_sum_3_in_1_gag7(X1, Y1, X2, Y2, X3, Y3, add_3_out_gag3(X1, X2, X3)) -> if_sum_3_in_2_gag7(X1, Y1, X2, Y2, X3, Y3, sum_3_in_gag3(Y1, Y2, Y3))
if_sum_3_in_2_gag7(X1, Y1, X2, Y2, X3, Y3, sum_3_out_gag3(Y1, Y2, Y3)) -> sum_3_out_gag3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3))

The argument filtering Pi contains the following mapping:
sum_3_in_gag3(x1, x2, x3)  =  sum_3_in_gag2(x1, x3)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
sum_3_out_gag3(x1, x2, x3)  =  sum_3_out_gag1(x2)
if_sum_3_in_1_gag7(x1, x2, x3, x4, x5, x6, x7)  =  if_sum_3_in_1_gag3(x2, x6, x7)
add_3_in_gag3(x1, x2, x3)  =  add_3_in_gag2(x1, x3)
add_3_out_gag3(x1, x2, x3)  =  add_3_out_gag1(x2)
if_add_3_in_1_gag4(x1, x2, x3, x4)  =  if_add_3_in_1_gag1(x4)
if_sum_3_in_2_gag7(x1, x2, x3, x4, x5, x6, x7)  =  if_sum_3_in_2_gag2(x3, x7)
ADD_3_IN_GAG3(x1, x2, x3)  =  ADD_3_IN_GAG2(x1, x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

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

ADD_3_IN_GAG3(s_11(X), Y, s_11(Z)) -> ADD_3_IN_GAG3(X, Y, Z)

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

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

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

ADD_3_IN_GAG2(s_11(X), s_11(Z)) -> ADD_3_IN_GAG2(X, Z)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {ADD_3_IN_GAG2}.
By using the subterm criterion together with the size-change analysis 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:



↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

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

SUM_3_IN_GAG3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3)) -> IF_SUM_3_IN_1_GAG7(X1, Y1, X2, Y2, X3, Y3, add_3_in_gag3(X1, X2, X3))
IF_SUM_3_IN_1_GAG7(X1, Y1, X2, Y2, X3, Y3, add_3_out_gag3(X1, X2, X3)) -> SUM_3_IN_GAG3(Y1, Y2, Y3)

The TRS R consists of the following rules:

sum_3_in_gag3([]_0, []_0, []_0) -> sum_3_out_gag3([]_0, []_0, []_0)
sum_3_in_gag3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3)) -> if_sum_3_in_1_gag7(X1, Y1, X2, Y2, X3, Y3, add_3_in_gag3(X1, X2, X3))
add_3_in_gag3(0_0, X, X) -> add_3_out_gag3(0_0, X, X)
add_3_in_gag3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gag4(X, Y, Z, add_3_in_gag3(X, Y, Z))
if_add_3_in_1_gag4(X, Y, Z, add_3_out_gag3(X, Y, Z)) -> add_3_out_gag3(s_11(X), Y, s_11(Z))
if_sum_3_in_1_gag7(X1, Y1, X2, Y2, X3, Y3, add_3_out_gag3(X1, X2, X3)) -> if_sum_3_in_2_gag7(X1, Y1, X2, Y2, X3, Y3, sum_3_in_gag3(Y1, Y2, Y3))
if_sum_3_in_2_gag7(X1, Y1, X2, Y2, X3, Y3, sum_3_out_gag3(Y1, Y2, Y3)) -> sum_3_out_gag3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3))

The argument filtering Pi contains the following mapping:
sum_3_in_gag3(x1, x2, x3)  =  sum_3_in_gag2(x1, x3)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
sum_3_out_gag3(x1, x2, x3)  =  sum_3_out_gag1(x2)
if_sum_3_in_1_gag7(x1, x2, x3, x4, x5, x6, x7)  =  if_sum_3_in_1_gag3(x2, x6, x7)
add_3_in_gag3(x1, x2, x3)  =  add_3_in_gag2(x1, x3)
add_3_out_gag3(x1, x2, x3)  =  add_3_out_gag1(x2)
if_add_3_in_1_gag4(x1, x2, x3, x4)  =  if_add_3_in_1_gag1(x4)
if_sum_3_in_2_gag7(x1, x2, x3, x4, x5, x6, x7)  =  if_sum_3_in_2_gag2(x3, x7)
SUM_3_IN_GAG3(x1, x2, x3)  =  SUM_3_IN_GAG2(x1, x3)
IF_SUM_3_IN_1_GAG7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SUM_3_IN_1_GAG3(x2, x6, x7)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

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

SUM_3_IN_GAG3(._22(X1, Y1), ._22(X2, Y2), ._22(X3, Y3)) -> IF_SUM_3_IN_1_GAG7(X1, Y1, X2, Y2, X3, Y3, add_3_in_gag3(X1, X2, X3))
IF_SUM_3_IN_1_GAG7(X1, Y1, X2, Y2, X3, Y3, add_3_out_gag3(X1, X2, X3)) -> SUM_3_IN_GAG3(Y1, Y2, Y3)

The TRS R consists of the following rules:

add_3_in_gag3(0_0, X, X) -> add_3_out_gag3(0_0, X, X)
add_3_in_gag3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gag4(X, Y, Z, add_3_in_gag3(X, Y, Z))
if_add_3_in_1_gag4(X, Y, Z, add_3_out_gag3(X, Y, Z)) -> add_3_out_gag3(s_11(X), Y, s_11(Z))

The argument filtering Pi contains the following mapping:
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
add_3_in_gag3(x1, x2, x3)  =  add_3_in_gag2(x1, x3)
add_3_out_gag3(x1, x2, x3)  =  add_3_out_gag1(x2)
if_add_3_in_1_gag4(x1, x2, x3, x4)  =  if_add_3_in_1_gag1(x4)
SUM_3_IN_GAG3(x1, x2, x3)  =  SUM_3_IN_GAG2(x1, x3)
IF_SUM_3_IN_1_GAG7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SUM_3_IN_1_GAG3(x2, x6, x7)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof

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

SUM_3_IN_GAG2(._22(X1, Y1), ._22(X3, Y3)) -> IF_SUM_3_IN_1_GAG3(Y1, Y3, add_3_in_gag2(X1, X3))
IF_SUM_3_IN_1_GAG3(Y1, Y3, add_3_out_gag1(X2)) -> SUM_3_IN_GAG2(Y1, Y3)

The TRS R consists of the following rules:

add_3_in_gag2(0_0, X) -> add_3_out_gag1(X)
add_3_in_gag2(s_11(X), s_11(Z)) -> if_add_3_in_1_gag1(add_3_in_gag2(X, Z))
if_add_3_in_1_gag1(add_3_out_gag1(Y)) -> add_3_out_gag1(Y)

The set Q consists of the following terms:

add_3_in_gag2(x0, x1)
if_add_3_in_1_gag1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {IF_SUM_3_IN_1_GAG3, SUM_3_IN_GAG2}.
By using the subterm criterion together with the size-change analysis 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: