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



PROLOG
  ↳ UnrequestedClauseRemoverProof

isNat1(s1(X)) :- isNat1(X).
isNat1(00).
notEq2(s1(X), s1(Y)) :- notEq2(X, Y).
notEq2(s1(X), 00).
notEq2(00, s1(X)).
lt2(s1(X), s1(Y)) :- lt2(X, Y).
lt2(00, s1(Y)).
gt2(s1(X), s1(Y)) :- gt2(X, Y).
gt2(s1(X), 00).
le2(s1(X), s1(Y)) :- le2(X, Y).
le2(00, s1(Y)).
le2(00, 00).
even1(s1(X)) :- odd1(X).
even1(00).
odd1(s1(X)) :- even1(X).
odd1(s1(00)).
add3(s1(X), Y, s1(Z)) :- add3(X, Y, Z).
add3(00, X, X).
mult3(s1(X), Y, R) :- mult3(X, Y, Z), add3(Y, Z, R).
mult3(00, Y, 00).
factorial2(s1(X), R) :- factorial2(X, Y), mult3(s1(X), Y, R).
factorial2(00, s1(00)).


The clauses

isNat1(s1(X)) :- isNat1(X).
isNat1(00).
notEq2(s1(X), s1(Y)) :- notEq2(X, Y).
notEq2(s1(X), 00).
notEq2(00, s1(X)).
lt2(s1(X), s1(Y)) :- lt2(X, Y).
lt2(00, s1(Y)).
gt2(s1(X), s1(Y)) :- gt2(X, Y).
gt2(s1(X), 00).
le2(s1(X), s1(Y)) :- le2(X, Y).
le2(00, s1(Y)).
le2(00, 00).
even1(s1(X)) :- odd1(X).
even1(00).
odd1(s1(X)) :- even1(X).
odd1(s1(00)).

can be ignored, as they are not needed by any of the given querys.

Deleting these clauses results in the following prolog program:

add3(s1(X), Y, s1(Z)) :- add3(X, Y, Z).
add3(00, X, X).
mult3(s1(X), Y, R) :- mult3(X, Y, Z), add3(Y, Z, R).
mult3(00, Y, 00).
factorial2(s1(X), R) :- factorial2(X, Y), mult3(s1(X), Y, R).
factorial2(00, s1(00)).



↳ PROLOG
  ↳ UnrequestedClauseRemoverProof
PROLOG
      ↳ PrologToPiTRSProof

add3(s1(X), Y, s1(Z)) :- add3(X, Y, Z).
add3(00, X, X).
mult3(s1(X), Y, R) :- mult3(X, Y, Z), add3(Y, Z, R).
mult3(00, Y, 00).
factorial2(s1(X), R) :- factorial2(X, Y), mult3(s1(X), Y, R).
factorial2(00, s1(00)).


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


factorial_2_in_ga2(s_11(X), R) -> if_factorial_2_in_1_ga3(X, R, factorial_2_in_ga2(X, Y))
factorial_2_in_ga2(0_0, s_11(0_0)) -> factorial_2_out_ga2(0_0, s_11(0_0))
if_factorial_2_in_1_ga3(X, R, factorial_2_out_ga2(X, Y)) -> if_factorial_2_in_2_ga4(X, R, Y, mult_3_in_gga3(s_11(X), Y, R))
mult_3_in_gga3(s_11(X), Y, R) -> if_mult_3_in_1_gga4(X, Y, R, mult_3_in_gga3(X, Y, Z))
mult_3_in_gga3(0_0, Y, 0_0) -> mult_3_out_gga3(0_0, Y, 0_0)
if_mult_3_in_1_gga4(X, Y, R, mult_3_out_gga3(X, Y, Z)) -> if_mult_3_in_2_gga5(X, Y, R, Z, add_3_in_gga3(Y, Z, R))
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_mult_3_in_2_gga5(X, Y, R, Z, add_3_out_gga3(Y, Z, R)) -> mult_3_out_gga3(s_11(X), Y, R)
if_factorial_2_in_2_ga4(X, R, Y, mult_3_out_gga3(s_11(X), Y, R)) -> factorial_2_out_ga2(s_11(X), R)

The argument filtering Pi contains the following mapping:
factorial_2_in_ga2(x1, x2)  =  factorial_2_in_ga1(x1)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_factorial_2_in_1_ga3(x1, x2, x3)  =  if_factorial_2_in_1_ga2(x1, x3)
factorial_2_out_ga2(x1, x2)  =  factorial_2_out_ga1(x2)
if_factorial_2_in_2_ga4(x1, x2, x3, x4)  =  if_factorial_2_in_2_ga1(x4)
mult_3_in_gga3(x1, x2, x3)  =  mult_3_in_gga2(x1, x2)
if_mult_3_in_1_gga4(x1, x2, x3, x4)  =  if_mult_3_in_1_gga2(x2, x4)
mult_3_out_gga3(x1, x2, x3)  =  mult_3_out_gga1(x3)
if_mult_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_mult_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of PROLOG



↳ PROLOG
  ↳ UnrequestedClauseRemoverProof
    ↳ PROLOG
      ↳ PrologToPiTRSProof
PiTRS
          ↳ DependencyPairsProof

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

factorial_2_in_ga2(s_11(X), R) -> if_factorial_2_in_1_ga3(X, R, factorial_2_in_ga2(X, Y))
factorial_2_in_ga2(0_0, s_11(0_0)) -> factorial_2_out_ga2(0_0, s_11(0_0))
if_factorial_2_in_1_ga3(X, R, factorial_2_out_ga2(X, Y)) -> if_factorial_2_in_2_ga4(X, R, Y, mult_3_in_gga3(s_11(X), Y, R))
mult_3_in_gga3(s_11(X), Y, R) -> if_mult_3_in_1_gga4(X, Y, R, mult_3_in_gga3(X, Y, Z))
mult_3_in_gga3(0_0, Y, 0_0) -> mult_3_out_gga3(0_0, Y, 0_0)
if_mult_3_in_1_gga4(X, Y, R, mult_3_out_gga3(X, Y, Z)) -> if_mult_3_in_2_gga5(X, Y, R, Z, add_3_in_gga3(Y, Z, R))
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_mult_3_in_2_gga5(X, Y, R, Z, add_3_out_gga3(Y, Z, R)) -> mult_3_out_gga3(s_11(X), Y, R)
if_factorial_2_in_2_ga4(X, R, Y, mult_3_out_gga3(s_11(X), Y, R)) -> factorial_2_out_ga2(s_11(X), R)

The argument filtering Pi contains the following mapping:
factorial_2_in_ga2(x1, x2)  =  factorial_2_in_ga1(x1)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_factorial_2_in_1_ga3(x1, x2, x3)  =  if_factorial_2_in_1_ga2(x1, x3)
factorial_2_out_ga2(x1, x2)  =  factorial_2_out_ga1(x2)
if_factorial_2_in_2_ga4(x1, x2, x3, x4)  =  if_factorial_2_in_2_ga1(x4)
mult_3_in_gga3(x1, x2, x3)  =  mult_3_in_gga2(x1, x2)
if_mult_3_in_1_gga4(x1, x2, x3, x4)  =  if_mult_3_in_1_gga2(x2, x4)
mult_3_out_gga3(x1, x2, x3)  =  mult_3_out_gga1(x3)
if_mult_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_mult_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)


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

FACTORIAL_2_IN_GA2(s_11(X), R) -> IF_FACTORIAL_2_IN_1_GA3(X, R, factorial_2_in_ga2(X, Y))
FACTORIAL_2_IN_GA2(s_11(X), R) -> FACTORIAL_2_IN_GA2(X, Y)
IF_FACTORIAL_2_IN_1_GA3(X, R, factorial_2_out_ga2(X, Y)) -> IF_FACTORIAL_2_IN_2_GA4(X, R, Y, mult_3_in_gga3(s_11(X), Y, R))
IF_FACTORIAL_2_IN_1_GA3(X, R, factorial_2_out_ga2(X, Y)) -> MULT_3_IN_GGA3(s_11(X), Y, R)
MULT_3_IN_GGA3(s_11(X), Y, R) -> IF_MULT_3_IN_1_GGA4(X, Y, R, mult_3_in_gga3(X, Y, Z))
MULT_3_IN_GGA3(s_11(X), Y, R) -> MULT_3_IN_GGA3(X, Y, Z)
IF_MULT_3_IN_1_GGA4(X, Y, R, mult_3_out_gga3(X, Y, Z)) -> IF_MULT_3_IN_2_GGA5(X, Y, R, Z, add_3_in_gga3(Y, Z, R))
IF_MULT_3_IN_1_GGA4(X, Y, R, mult_3_out_gga3(X, Y, Z)) -> ADD_3_IN_GGA3(Y, Z, R)
ADD_3_IN_GGA3(s_11(X), Y, s_11(Z)) -> IF_ADD_3_IN_1_GGA4(X, Y, Z, add_3_in_gga3(X, Y, Z))
ADD_3_IN_GGA3(s_11(X), Y, s_11(Z)) -> ADD_3_IN_GGA3(X, Y, Z)

The TRS R consists of the following rules:

factorial_2_in_ga2(s_11(X), R) -> if_factorial_2_in_1_ga3(X, R, factorial_2_in_ga2(X, Y))
factorial_2_in_ga2(0_0, s_11(0_0)) -> factorial_2_out_ga2(0_0, s_11(0_0))
if_factorial_2_in_1_ga3(X, R, factorial_2_out_ga2(X, Y)) -> if_factorial_2_in_2_ga4(X, R, Y, mult_3_in_gga3(s_11(X), Y, R))
mult_3_in_gga3(s_11(X), Y, R) -> if_mult_3_in_1_gga4(X, Y, R, mult_3_in_gga3(X, Y, Z))
mult_3_in_gga3(0_0, Y, 0_0) -> mult_3_out_gga3(0_0, Y, 0_0)
if_mult_3_in_1_gga4(X, Y, R, mult_3_out_gga3(X, Y, Z)) -> if_mult_3_in_2_gga5(X, Y, R, Z, add_3_in_gga3(Y, Z, R))
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_mult_3_in_2_gga5(X, Y, R, Z, add_3_out_gga3(Y, Z, R)) -> mult_3_out_gga3(s_11(X), Y, R)
if_factorial_2_in_2_ga4(X, R, Y, mult_3_out_gga3(s_11(X), Y, R)) -> factorial_2_out_ga2(s_11(X), R)

The argument filtering Pi contains the following mapping:
factorial_2_in_ga2(x1, x2)  =  factorial_2_in_ga1(x1)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_factorial_2_in_1_ga3(x1, x2, x3)  =  if_factorial_2_in_1_ga2(x1, x3)
factorial_2_out_ga2(x1, x2)  =  factorial_2_out_ga1(x2)
if_factorial_2_in_2_ga4(x1, x2, x3, x4)  =  if_factorial_2_in_2_ga1(x4)
mult_3_in_gga3(x1, x2, x3)  =  mult_3_in_gga2(x1, x2)
if_mult_3_in_1_gga4(x1, x2, x3, x4)  =  if_mult_3_in_1_gga2(x2, x4)
mult_3_out_gga3(x1, x2, x3)  =  mult_3_out_gga1(x3)
if_mult_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_mult_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
IF_FACTORIAL_2_IN_1_GA3(x1, x2, x3)  =  IF_FACTORIAL_2_IN_1_GA2(x1, x3)
IF_ADD_3_IN_1_GGA4(x1, x2, x3, x4)  =  IF_ADD_3_IN_1_GGA1(x4)
IF_MULT_3_IN_2_GGA5(x1, x2, x3, x4, x5)  =  IF_MULT_3_IN_2_GGA1(x5)
MULT_3_IN_GGA3(x1, x2, x3)  =  MULT_3_IN_GGA2(x1, x2)
IF_FACTORIAL_2_IN_2_GA4(x1, x2, x3, x4)  =  IF_FACTORIAL_2_IN_2_GA1(x4)
ADD_3_IN_GGA3(x1, x2, x3)  =  ADD_3_IN_GGA2(x1, x2)
IF_MULT_3_IN_1_GGA4(x1, x2, x3, x4)  =  IF_MULT_3_IN_1_GGA2(x2, x4)
FACTORIAL_2_IN_GA2(x1, x2)  =  FACTORIAL_2_IN_GA1(x1)

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

↳ PROLOG
  ↳ UnrequestedClauseRemoverProof
    ↳ PROLOG
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
PiDP
              ↳ DependencyGraphProof

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

FACTORIAL_2_IN_GA2(s_11(X), R) -> IF_FACTORIAL_2_IN_1_GA3(X, R, factorial_2_in_ga2(X, Y))
FACTORIAL_2_IN_GA2(s_11(X), R) -> FACTORIAL_2_IN_GA2(X, Y)
IF_FACTORIAL_2_IN_1_GA3(X, R, factorial_2_out_ga2(X, Y)) -> IF_FACTORIAL_2_IN_2_GA4(X, R, Y, mult_3_in_gga3(s_11(X), Y, R))
IF_FACTORIAL_2_IN_1_GA3(X, R, factorial_2_out_ga2(X, Y)) -> MULT_3_IN_GGA3(s_11(X), Y, R)
MULT_3_IN_GGA3(s_11(X), Y, R) -> IF_MULT_3_IN_1_GGA4(X, Y, R, mult_3_in_gga3(X, Y, Z))
MULT_3_IN_GGA3(s_11(X), Y, R) -> MULT_3_IN_GGA3(X, Y, Z)
IF_MULT_3_IN_1_GGA4(X, Y, R, mult_3_out_gga3(X, Y, Z)) -> IF_MULT_3_IN_2_GGA5(X, Y, R, Z, add_3_in_gga3(Y, Z, R))
IF_MULT_3_IN_1_GGA4(X, Y, R, mult_3_out_gga3(X, Y, Z)) -> ADD_3_IN_GGA3(Y, Z, R)
ADD_3_IN_GGA3(s_11(X), Y, s_11(Z)) -> IF_ADD_3_IN_1_GGA4(X, Y, Z, add_3_in_gga3(X, Y, Z))
ADD_3_IN_GGA3(s_11(X), Y, s_11(Z)) -> ADD_3_IN_GGA3(X, Y, Z)

The TRS R consists of the following rules:

factorial_2_in_ga2(s_11(X), R) -> if_factorial_2_in_1_ga3(X, R, factorial_2_in_ga2(X, Y))
factorial_2_in_ga2(0_0, s_11(0_0)) -> factorial_2_out_ga2(0_0, s_11(0_0))
if_factorial_2_in_1_ga3(X, R, factorial_2_out_ga2(X, Y)) -> if_factorial_2_in_2_ga4(X, R, Y, mult_3_in_gga3(s_11(X), Y, R))
mult_3_in_gga3(s_11(X), Y, R) -> if_mult_3_in_1_gga4(X, Y, R, mult_3_in_gga3(X, Y, Z))
mult_3_in_gga3(0_0, Y, 0_0) -> mult_3_out_gga3(0_0, Y, 0_0)
if_mult_3_in_1_gga4(X, Y, R, mult_3_out_gga3(X, Y, Z)) -> if_mult_3_in_2_gga5(X, Y, R, Z, add_3_in_gga3(Y, Z, R))
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_mult_3_in_2_gga5(X, Y, R, Z, add_3_out_gga3(Y, Z, R)) -> mult_3_out_gga3(s_11(X), Y, R)
if_factorial_2_in_2_ga4(X, R, Y, mult_3_out_gga3(s_11(X), Y, R)) -> factorial_2_out_ga2(s_11(X), R)

The argument filtering Pi contains the following mapping:
factorial_2_in_ga2(x1, x2)  =  factorial_2_in_ga1(x1)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_factorial_2_in_1_ga3(x1, x2, x3)  =  if_factorial_2_in_1_ga2(x1, x3)
factorial_2_out_ga2(x1, x2)  =  factorial_2_out_ga1(x2)
if_factorial_2_in_2_ga4(x1, x2, x3, x4)  =  if_factorial_2_in_2_ga1(x4)
mult_3_in_gga3(x1, x2, x3)  =  mult_3_in_gga2(x1, x2)
if_mult_3_in_1_gga4(x1, x2, x3, x4)  =  if_mult_3_in_1_gga2(x2, x4)
mult_3_out_gga3(x1, x2, x3)  =  mult_3_out_gga1(x3)
if_mult_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_mult_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
IF_FACTORIAL_2_IN_1_GA3(x1, x2, x3)  =  IF_FACTORIAL_2_IN_1_GA2(x1, x3)
IF_ADD_3_IN_1_GGA4(x1, x2, x3, x4)  =  IF_ADD_3_IN_1_GGA1(x4)
IF_MULT_3_IN_2_GGA5(x1, x2, x3, x4, x5)  =  IF_MULT_3_IN_2_GGA1(x5)
MULT_3_IN_GGA3(x1, x2, x3)  =  MULT_3_IN_GGA2(x1, x2)
IF_FACTORIAL_2_IN_2_GA4(x1, x2, x3, x4)  =  IF_FACTORIAL_2_IN_2_GA1(x4)
ADD_3_IN_GGA3(x1, x2, x3)  =  ADD_3_IN_GGA2(x1, x2)
IF_MULT_3_IN_1_GGA4(x1, x2, x3, x4)  =  IF_MULT_3_IN_1_GGA2(x2, x4)
FACTORIAL_2_IN_GA2(x1, x2)  =  FACTORIAL_2_IN_GA1(x1)

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

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

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

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

The TRS R consists of the following rules:

factorial_2_in_ga2(s_11(X), R) -> if_factorial_2_in_1_ga3(X, R, factorial_2_in_ga2(X, Y))
factorial_2_in_ga2(0_0, s_11(0_0)) -> factorial_2_out_ga2(0_0, s_11(0_0))
if_factorial_2_in_1_ga3(X, R, factorial_2_out_ga2(X, Y)) -> if_factorial_2_in_2_ga4(X, R, Y, mult_3_in_gga3(s_11(X), Y, R))
mult_3_in_gga3(s_11(X), Y, R) -> if_mult_3_in_1_gga4(X, Y, R, mult_3_in_gga3(X, Y, Z))
mult_3_in_gga3(0_0, Y, 0_0) -> mult_3_out_gga3(0_0, Y, 0_0)
if_mult_3_in_1_gga4(X, Y, R, mult_3_out_gga3(X, Y, Z)) -> if_mult_3_in_2_gga5(X, Y, R, Z, add_3_in_gga3(Y, Z, R))
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_mult_3_in_2_gga5(X, Y, R, Z, add_3_out_gga3(Y, Z, R)) -> mult_3_out_gga3(s_11(X), Y, R)
if_factorial_2_in_2_ga4(X, R, Y, mult_3_out_gga3(s_11(X), Y, R)) -> factorial_2_out_ga2(s_11(X), R)

The argument filtering Pi contains the following mapping:
factorial_2_in_ga2(x1, x2)  =  factorial_2_in_ga1(x1)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_factorial_2_in_1_ga3(x1, x2, x3)  =  if_factorial_2_in_1_ga2(x1, x3)
factorial_2_out_ga2(x1, x2)  =  factorial_2_out_ga1(x2)
if_factorial_2_in_2_ga4(x1, x2, x3, x4)  =  if_factorial_2_in_2_ga1(x4)
mult_3_in_gga3(x1, x2, x3)  =  mult_3_in_gga2(x1, x2)
if_mult_3_in_1_gga4(x1, x2, x3, x4)  =  if_mult_3_in_1_gga2(x2, x4)
mult_3_out_gga3(x1, x2, x3)  =  mult_3_out_gga1(x3)
if_mult_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_mult_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
ADD_3_IN_GGA3(x1, x2, x3)  =  ADD_3_IN_GGA2(x1, x2)

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

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

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

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

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

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
  ↳ UnrequestedClauseRemoverProof
    ↳ PROLOG
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
QDP
                            ↳ QDPSizeChangeProof
                  ↳ PiDP
                  ↳ PiDP

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

ADD_3_IN_GGA2(s_11(X), Y) -> ADD_3_IN_GGA2(X, Y)

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_GGA2}.
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
  ↳ UnrequestedClauseRemoverProof
    ↳ PROLOG
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
PiDP
                    ↳ UsableRulesProof
                  ↳ PiDP

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

MULT_3_IN_GGA3(s_11(X), Y, R) -> MULT_3_IN_GGA3(X, Y, Z)

The TRS R consists of the following rules:

factorial_2_in_ga2(s_11(X), R) -> if_factorial_2_in_1_ga3(X, R, factorial_2_in_ga2(X, Y))
factorial_2_in_ga2(0_0, s_11(0_0)) -> factorial_2_out_ga2(0_0, s_11(0_0))
if_factorial_2_in_1_ga3(X, R, factorial_2_out_ga2(X, Y)) -> if_factorial_2_in_2_ga4(X, R, Y, mult_3_in_gga3(s_11(X), Y, R))
mult_3_in_gga3(s_11(X), Y, R) -> if_mult_3_in_1_gga4(X, Y, R, mult_3_in_gga3(X, Y, Z))
mult_3_in_gga3(0_0, Y, 0_0) -> mult_3_out_gga3(0_0, Y, 0_0)
if_mult_3_in_1_gga4(X, Y, R, mult_3_out_gga3(X, Y, Z)) -> if_mult_3_in_2_gga5(X, Y, R, Z, add_3_in_gga3(Y, Z, R))
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_mult_3_in_2_gga5(X, Y, R, Z, add_3_out_gga3(Y, Z, R)) -> mult_3_out_gga3(s_11(X), Y, R)
if_factorial_2_in_2_ga4(X, R, Y, mult_3_out_gga3(s_11(X), Y, R)) -> factorial_2_out_ga2(s_11(X), R)

The argument filtering Pi contains the following mapping:
factorial_2_in_ga2(x1, x2)  =  factorial_2_in_ga1(x1)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_factorial_2_in_1_ga3(x1, x2, x3)  =  if_factorial_2_in_1_ga2(x1, x3)
factorial_2_out_ga2(x1, x2)  =  factorial_2_out_ga1(x2)
if_factorial_2_in_2_ga4(x1, x2, x3, x4)  =  if_factorial_2_in_2_ga1(x4)
mult_3_in_gga3(x1, x2, x3)  =  mult_3_in_gga2(x1, x2)
if_mult_3_in_1_gga4(x1, x2, x3, x4)  =  if_mult_3_in_1_gga2(x2, x4)
mult_3_out_gga3(x1, x2, x3)  =  mult_3_out_gga1(x3)
if_mult_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_mult_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
MULT_3_IN_GGA3(x1, x2, x3)  =  MULT_3_IN_GGA2(x1, x2)

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

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

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

MULT_3_IN_GGA3(s_11(X), Y, R) -> MULT_3_IN_GGA3(X, Y, Z)

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

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
  ↳ UnrequestedClauseRemoverProof
    ↳ PROLOG
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
QDP
                            ↳ QDPSizeChangeProof
                  ↳ PiDP

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

MULT_3_IN_GGA2(s_11(X), Y) -> MULT_3_IN_GGA2(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {MULT_3_IN_GGA2}.
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
  ↳ UnrequestedClauseRemoverProof
    ↳ PROLOG
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
PiDP
                    ↳ UsableRulesProof

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

FACTORIAL_2_IN_GA2(s_11(X), R) -> FACTORIAL_2_IN_GA2(X, Y)

The TRS R consists of the following rules:

factorial_2_in_ga2(s_11(X), R) -> if_factorial_2_in_1_ga3(X, R, factorial_2_in_ga2(X, Y))
factorial_2_in_ga2(0_0, s_11(0_0)) -> factorial_2_out_ga2(0_0, s_11(0_0))
if_factorial_2_in_1_ga3(X, R, factorial_2_out_ga2(X, Y)) -> if_factorial_2_in_2_ga4(X, R, Y, mult_3_in_gga3(s_11(X), Y, R))
mult_3_in_gga3(s_11(X), Y, R) -> if_mult_3_in_1_gga4(X, Y, R, mult_3_in_gga3(X, Y, Z))
mult_3_in_gga3(0_0, Y, 0_0) -> mult_3_out_gga3(0_0, Y, 0_0)
if_mult_3_in_1_gga4(X, Y, R, mult_3_out_gga3(X, Y, Z)) -> if_mult_3_in_2_gga5(X, Y, R, Z, add_3_in_gga3(Y, Z, R))
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_mult_3_in_2_gga5(X, Y, R, Z, add_3_out_gga3(Y, Z, R)) -> mult_3_out_gga3(s_11(X), Y, R)
if_factorial_2_in_2_ga4(X, R, Y, mult_3_out_gga3(s_11(X), Y, R)) -> factorial_2_out_ga2(s_11(X), R)

The argument filtering Pi contains the following mapping:
factorial_2_in_ga2(x1, x2)  =  factorial_2_in_ga1(x1)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_factorial_2_in_1_ga3(x1, x2, x3)  =  if_factorial_2_in_1_ga2(x1, x3)
factorial_2_out_ga2(x1, x2)  =  factorial_2_out_ga1(x2)
if_factorial_2_in_2_ga4(x1, x2, x3, x4)  =  if_factorial_2_in_2_ga1(x4)
mult_3_in_gga3(x1, x2, x3)  =  mult_3_in_gga2(x1, x2)
if_mult_3_in_1_gga4(x1, x2, x3, x4)  =  if_mult_3_in_1_gga2(x2, x4)
mult_3_out_gga3(x1, x2, x3)  =  mult_3_out_gga1(x3)
if_mult_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_mult_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
FACTORIAL_2_IN_GA2(x1, x2)  =  FACTORIAL_2_IN_GA1(x1)

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

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

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

FACTORIAL_2_IN_GA2(s_11(X), R) -> FACTORIAL_2_IN_GA2(X, Y)

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

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
  ↳ UnrequestedClauseRemoverProof
    ↳ PROLOG
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
QDP
                            ↳ QDPSizeChangeProof

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

FACTORIAL_2_IN_GA1(s_11(X)) -> FACTORIAL_2_IN_GA1(X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {FACTORIAL_2_IN_GA1}.
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: