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



PROLOG
  ↳ PrologToPiTRSProof

append3(nil0, Y, Y).
append3(cons2(U, V), Y, cons2(U, Z)) :- append3(V, Y, Z).
lessleaves2(nil0, cons2(W, Z)).
lessleaves2(cons2(U, V), cons2(W, Z)) :- append3(U, V, U1), append3(W, Z, W1), lessleaves2(U1, W1).


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


lessleaves_2_in_gg2(nil_0, cons_22(W, Z)) -> lessleaves_2_out_gg2(nil_0, cons_22(W, Z))
lessleaves_2_in_gg2(cons_22(U, V), cons_22(W, Z)) -> if_lessleaves_2_in_1_gg5(U, V, W, Z, append_3_in_gga3(U, V, U1))
append_3_in_gga3(nil_0, Y, Y) -> append_3_out_gga3(nil_0, Y, Y)
append_3_in_gga3(cons_22(U, V), Y, cons_22(U, Z)) -> if_append_3_in_1_gga5(U, V, Y, Z, append_3_in_gga3(V, Y, Z))
if_append_3_in_1_gga5(U, V, Y, Z, append_3_out_gga3(V, Y, Z)) -> append_3_out_gga3(cons_22(U, V), Y, cons_22(U, Z))
if_lessleaves_2_in_1_gg5(U, V, W, Z, append_3_out_gga3(U, V, U1)) -> if_lessleaves_2_in_2_gg6(U, V, W, Z, U1, append_3_in_gga3(W, Z, W1))
if_lessleaves_2_in_2_gg6(U, V, W, Z, U1, append_3_out_gga3(W, Z, W1)) -> if_lessleaves_2_in_3_gg7(U, V, W, Z, U1, W1, lessleaves_2_in_gg2(U1, W1))
if_lessleaves_2_in_3_gg7(U, V, W, Z, U1, W1, lessleaves_2_out_gg2(U1, W1)) -> lessleaves_2_out_gg2(cons_22(U, V), cons_22(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_2_in_gg2(x1, x2)  =  lessleaves_2_in_gg2(x1, x2)
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
lessleaves_2_out_gg2(x1, x2)  =  lessleaves_2_out_gg
if_lessleaves_2_in_1_gg5(x1, x2, x3, x4, x5)  =  if_lessleaves_2_in_1_gg3(x3, x4, x5)
append_3_in_gga3(x1, x2, x3)  =  append_3_in_gga2(x1, x2)
append_3_out_gga3(x1, x2, x3)  =  append_3_out_gga1(x3)
if_append_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_append_3_in_1_gga2(x1, x5)
if_lessleaves_2_in_2_gg6(x1, x2, x3, x4, x5, x6)  =  if_lessleaves_2_in_2_gg2(x5, x6)
if_lessleaves_2_in_3_gg7(x1, x2, x3, x4, x5, x6, x7)  =  if_lessleaves_2_in_3_gg1(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:

lessleaves_2_in_gg2(nil_0, cons_22(W, Z)) -> lessleaves_2_out_gg2(nil_0, cons_22(W, Z))
lessleaves_2_in_gg2(cons_22(U, V), cons_22(W, Z)) -> if_lessleaves_2_in_1_gg5(U, V, W, Z, append_3_in_gga3(U, V, U1))
append_3_in_gga3(nil_0, Y, Y) -> append_3_out_gga3(nil_0, Y, Y)
append_3_in_gga3(cons_22(U, V), Y, cons_22(U, Z)) -> if_append_3_in_1_gga5(U, V, Y, Z, append_3_in_gga3(V, Y, Z))
if_append_3_in_1_gga5(U, V, Y, Z, append_3_out_gga3(V, Y, Z)) -> append_3_out_gga3(cons_22(U, V), Y, cons_22(U, Z))
if_lessleaves_2_in_1_gg5(U, V, W, Z, append_3_out_gga3(U, V, U1)) -> if_lessleaves_2_in_2_gg6(U, V, W, Z, U1, append_3_in_gga3(W, Z, W1))
if_lessleaves_2_in_2_gg6(U, V, W, Z, U1, append_3_out_gga3(W, Z, W1)) -> if_lessleaves_2_in_3_gg7(U, V, W, Z, U1, W1, lessleaves_2_in_gg2(U1, W1))
if_lessleaves_2_in_3_gg7(U, V, W, Z, U1, W1, lessleaves_2_out_gg2(U1, W1)) -> lessleaves_2_out_gg2(cons_22(U, V), cons_22(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_2_in_gg2(x1, x2)  =  lessleaves_2_in_gg2(x1, x2)
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
lessleaves_2_out_gg2(x1, x2)  =  lessleaves_2_out_gg
if_lessleaves_2_in_1_gg5(x1, x2, x3, x4, x5)  =  if_lessleaves_2_in_1_gg3(x3, x4, x5)
append_3_in_gga3(x1, x2, x3)  =  append_3_in_gga2(x1, x2)
append_3_out_gga3(x1, x2, x3)  =  append_3_out_gga1(x3)
if_append_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_append_3_in_1_gga2(x1, x5)
if_lessleaves_2_in_2_gg6(x1, x2, x3, x4, x5, x6)  =  if_lessleaves_2_in_2_gg2(x5, x6)
if_lessleaves_2_in_3_gg7(x1, x2, x3, x4, x5, x6, x7)  =  if_lessleaves_2_in_3_gg1(x7)


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

LESSLEAVES_2_IN_GG2(cons_22(U, V), cons_22(W, Z)) -> IF_LESSLEAVES_2_IN_1_GG5(U, V, W, Z, append_3_in_gga3(U, V, U1))
LESSLEAVES_2_IN_GG2(cons_22(U, V), cons_22(W, Z)) -> APPEND_3_IN_GGA3(U, V, U1)
APPEND_3_IN_GGA3(cons_22(U, V), Y, cons_22(U, Z)) -> IF_APPEND_3_IN_1_GGA5(U, V, Y, Z, append_3_in_gga3(V, Y, Z))
APPEND_3_IN_GGA3(cons_22(U, V), Y, cons_22(U, Z)) -> APPEND_3_IN_GGA3(V, Y, Z)
IF_LESSLEAVES_2_IN_1_GG5(U, V, W, Z, append_3_out_gga3(U, V, U1)) -> IF_LESSLEAVES_2_IN_2_GG6(U, V, W, Z, U1, append_3_in_gga3(W, Z, W1))
IF_LESSLEAVES_2_IN_1_GG5(U, V, W, Z, append_3_out_gga3(U, V, U1)) -> APPEND_3_IN_GGA3(W, Z, W1)
IF_LESSLEAVES_2_IN_2_GG6(U, V, W, Z, U1, append_3_out_gga3(W, Z, W1)) -> IF_LESSLEAVES_2_IN_3_GG7(U, V, W, Z, U1, W1, lessleaves_2_in_gg2(U1, W1))
IF_LESSLEAVES_2_IN_2_GG6(U, V, W, Z, U1, append_3_out_gga3(W, Z, W1)) -> LESSLEAVES_2_IN_GG2(U1, W1)

The TRS R consists of the following rules:

lessleaves_2_in_gg2(nil_0, cons_22(W, Z)) -> lessleaves_2_out_gg2(nil_0, cons_22(W, Z))
lessleaves_2_in_gg2(cons_22(U, V), cons_22(W, Z)) -> if_lessleaves_2_in_1_gg5(U, V, W, Z, append_3_in_gga3(U, V, U1))
append_3_in_gga3(nil_0, Y, Y) -> append_3_out_gga3(nil_0, Y, Y)
append_3_in_gga3(cons_22(U, V), Y, cons_22(U, Z)) -> if_append_3_in_1_gga5(U, V, Y, Z, append_3_in_gga3(V, Y, Z))
if_append_3_in_1_gga5(U, V, Y, Z, append_3_out_gga3(V, Y, Z)) -> append_3_out_gga3(cons_22(U, V), Y, cons_22(U, Z))
if_lessleaves_2_in_1_gg5(U, V, W, Z, append_3_out_gga3(U, V, U1)) -> if_lessleaves_2_in_2_gg6(U, V, W, Z, U1, append_3_in_gga3(W, Z, W1))
if_lessleaves_2_in_2_gg6(U, V, W, Z, U1, append_3_out_gga3(W, Z, W1)) -> if_lessleaves_2_in_3_gg7(U, V, W, Z, U1, W1, lessleaves_2_in_gg2(U1, W1))
if_lessleaves_2_in_3_gg7(U, V, W, Z, U1, W1, lessleaves_2_out_gg2(U1, W1)) -> lessleaves_2_out_gg2(cons_22(U, V), cons_22(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_2_in_gg2(x1, x2)  =  lessleaves_2_in_gg2(x1, x2)
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
lessleaves_2_out_gg2(x1, x2)  =  lessleaves_2_out_gg
if_lessleaves_2_in_1_gg5(x1, x2, x3, x4, x5)  =  if_lessleaves_2_in_1_gg3(x3, x4, x5)
append_3_in_gga3(x1, x2, x3)  =  append_3_in_gga2(x1, x2)
append_3_out_gga3(x1, x2, x3)  =  append_3_out_gga1(x3)
if_append_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_append_3_in_1_gga2(x1, x5)
if_lessleaves_2_in_2_gg6(x1, x2, x3, x4, x5, x6)  =  if_lessleaves_2_in_2_gg2(x5, x6)
if_lessleaves_2_in_3_gg7(x1, x2, x3, x4, x5, x6, x7)  =  if_lessleaves_2_in_3_gg1(x7)
IF_APPEND_3_IN_1_GGA5(x1, x2, x3, x4, x5)  =  IF_APPEND_3_IN_1_GGA2(x1, x5)
IF_LESSLEAVES_2_IN_3_GG7(x1, x2, x3, x4, x5, x6, x7)  =  IF_LESSLEAVES_2_IN_3_GG1(x7)
IF_LESSLEAVES_2_IN_2_GG6(x1, x2, x3, x4, x5, x6)  =  IF_LESSLEAVES_2_IN_2_GG2(x5, x6)
IF_LESSLEAVES_2_IN_1_GG5(x1, x2, x3, x4, x5)  =  IF_LESSLEAVES_2_IN_1_GG3(x3, x4, x5)
LESSLEAVES_2_IN_GG2(x1, x2)  =  LESSLEAVES_2_IN_GG2(x1, x2)
APPEND_3_IN_GGA3(x1, x2, x3)  =  APPEND_3_IN_GGA2(x1, x2)

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:

LESSLEAVES_2_IN_GG2(cons_22(U, V), cons_22(W, Z)) -> IF_LESSLEAVES_2_IN_1_GG5(U, V, W, Z, append_3_in_gga3(U, V, U1))
LESSLEAVES_2_IN_GG2(cons_22(U, V), cons_22(W, Z)) -> APPEND_3_IN_GGA3(U, V, U1)
APPEND_3_IN_GGA3(cons_22(U, V), Y, cons_22(U, Z)) -> IF_APPEND_3_IN_1_GGA5(U, V, Y, Z, append_3_in_gga3(V, Y, Z))
APPEND_3_IN_GGA3(cons_22(U, V), Y, cons_22(U, Z)) -> APPEND_3_IN_GGA3(V, Y, Z)
IF_LESSLEAVES_2_IN_1_GG5(U, V, W, Z, append_3_out_gga3(U, V, U1)) -> IF_LESSLEAVES_2_IN_2_GG6(U, V, W, Z, U1, append_3_in_gga3(W, Z, W1))
IF_LESSLEAVES_2_IN_1_GG5(U, V, W, Z, append_3_out_gga3(U, V, U1)) -> APPEND_3_IN_GGA3(W, Z, W1)
IF_LESSLEAVES_2_IN_2_GG6(U, V, W, Z, U1, append_3_out_gga3(W, Z, W1)) -> IF_LESSLEAVES_2_IN_3_GG7(U, V, W, Z, U1, W1, lessleaves_2_in_gg2(U1, W1))
IF_LESSLEAVES_2_IN_2_GG6(U, V, W, Z, U1, append_3_out_gga3(W, Z, W1)) -> LESSLEAVES_2_IN_GG2(U1, W1)

The TRS R consists of the following rules:

lessleaves_2_in_gg2(nil_0, cons_22(W, Z)) -> lessleaves_2_out_gg2(nil_0, cons_22(W, Z))
lessleaves_2_in_gg2(cons_22(U, V), cons_22(W, Z)) -> if_lessleaves_2_in_1_gg5(U, V, W, Z, append_3_in_gga3(U, V, U1))
append_3_in_gga3(nil_0, Y, Y) -> append_3_out_gga3(nil_0, Y, Y)
append_3_in_gga3(cons_22(U, V), Y, cons_22(U, Z)) -> if_append_3_in_1_gga5(U, V, Y, Z, append_3_in_gga3(V, Y, Z))
if_append_3_in_1_gga5(U, V, Y, Z, append_3_out_gga3(V, Y, Z)) -> append_3_out_gga3(cons_22(U, V), Y, cons_22(U, Z))
if_lessleaves_2_in_1_gg5(U, V, W, Z, append_3_out_gga3(U, V, U1)) -> if_lessleaves_2_in_2_gg6(U, V, W, Z, U1, append_3_in_gga3(W, Z, W1))
if_lessleaves_2_in_2_gg6(U, V, W, Z, U1, append_3_out_gga3(W, Z, W1)) -> if_lessleaves_2_in_3_gg7(U, V, W, Z, U1, W1, lessleaves_2_in_gg2(U1, W1))
if_lessleaves_2_in_3_gg7(U, V, W, Z, U1, W1, lessleaves_2_out_gg2(U1, W1)) -> lessleaves_2_out_gg2(cons_22(U, V), cons_22(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_2_in_gg2(x1, x2)  =  lessleaves_2_in_gg2(x1, x2)
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
lessleaves_2_out_gg2(x1, x2)  =  lessleaves_2_out_gg
if_lessleaves_2_in_1_gg5(x1, x2, x3, x4, x5)  =  if_lessleaves_2_in_1_gg3(x3, x4, x5)
append_3_in_gga3(x1, x2, x3)  =  append_3_in_gga2(x1, x2)
append_3_out_gga3(x1, x2, x3)  =  append_3_out_gga1(x3)
if_append_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_append_3_in_1_gga2(x1, x5)
if_lessleaves_2_in_2_gg6(x1, x2, x3, x4, x5, x6)  =  if_lessleaves_2_in_2_gg2(x5, x6)
if_lessleaves_2_in_3_gg7(x1, x2, x3, x4, x5, x6, x7)  =  if_lessleaves_2_in_3_gg1(x7)
IF_APPEND_3_IN_1_GGA5(x1, x2, x3, x4, x5)  =  IF_APPEND_3_IN_1_GGA2(x1, x5)
IF_LESSLEAVES_2_IN_3_GG7(x1, x2, x3, x4, x5, x6, x7)  =  IF_LESSLEAVES_2_IN_3_GG1(x7)
IF_LESSLEAVES_2_IN_2_GG6(x1, x2, x3, x4, x5, x6)  =  IF_LESSLEAVES_2_IN_2_GG2(x5, x6)
IF_LESSLEAVES_2_IN_1_GG5(x1, x2, x3, x4, x5)  =  IF_LESSLEAVES_2_IN_1_GG3(x3, x4, x5)
LESSLEAVES_2_IN_GG2(x1, x2)  =  LESSLEAVES_2_IN_GG2(x1, x2)
APPEND_3_IN_GGA3(x1, x2, x3)  =  APPEND_3_IN_GGA2(x1, x2)

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

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

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

APPEND_3_IN_GGA3(cons_22(U, V), Y, cons_22(U, Z)) -> APPEND_3_IN_GGA3(V, Y, Z)

The TRS R consists of the following rules:

lessleaves_2_in_gg2(nil_0, cons_22(W, Z)) -> lessleaves_2_out_gg2(nil_0, cons_22(W, Z))
lessleaves_2_in_gg2(cons_22(U, V), cons_22(W, Z)) -> if_lessleaves_2_in_1_gg5(U, V, W, Z, append_3_in_gga3(U, V, U1))
append_3_in_gga3(nil_0, Y, Y) -> append_3_out_gga3(nil_0, Y, Y)
append_3_in_gga3(cons_22(U, V), Y, cons_22(U, Z)) -> if_append_3_in_1_gga5(U, V, Y, Z, append_3_in_gga3(V, Y, Z))
if_append_3_in_1_gga5(U, V, Y, Z, append_3_out_gga3(V, Y, Z)) -> append_3_out_gga3(cons_22(U, V), Y, cons_22(U, Z))
if_lessleaves_2_in_1_gg5(U, V, W, Z, append_3_out_gga3(U, V, U1)) -> if_lessleaves_2_in_2_gg6(U, V, W, Z, U1, append_3_in_gga3(W, Z, W1))
if_lessleaves_2_in_2_gg6(U, V, W, Z, U1, append_3_out_gga3(W, Z, W1)) -> if_lessleaves_2_in_3_gg7(U, V, W, Z, U1, W1, lessleaves_2_in_gg2(U1, W1))
if_lessleaves_2_in_3_gg7(U, V, W, Z, U1, W1, lessleaves_2_out_gg2(U1, W1)) -> lessleaves_2_out_gg2(cons_22(U, V), cons_22(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_2_in_gg2(x1, x2)  =  lessleaves_2_in_gg2(x1, x2)
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
lessleaves_2_out_gg2(x1, x2)  =  lessleaves_2_out_gg
if_lessleaves_2_in_1_gg5(x1, x2, x3, x4, x5)  =  if_lessleaves_2_in_1_gg3(x3, x4, x5)
append_3_in_gga3(x1, x2, x3)  =  append_3_in_gga2(x1, x2)
append_3_out_gga3(x1, x2, x3)  =  append_3_out_gga1(x3)
if_append_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_append_3_in_1_gga2(x1, x5)
if_lessleaves_2_in_2_gg6(x1, x2, x3, x4, x5, x6)  =  if_lessleaves_2_in_2_gg2(x5, x6)
if_lessleaves_2_in_3_gg7(x1, x2, x3, x4, x5, x6, x7)  =  if_lessleaves_2_in_3_gg1(x7)
APPEND_3_IN_GGA3(x1, x2, x3)  =  APPEND_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
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

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

APPEND_3_IN_GGA3(cons_22(U, V), Y, cons_22(U, Z)) -> APPEND_3_IN_GGA3(V, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
cons_22(x1, x2)  =  cons_22(x1, x2)
APPEND_3_IN_GGA3(x1, x2, x3)  =  APPEND_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
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

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

APPEND_3_IN_GGA2(cons_22(U, V), Y) -> APPEND_3_IN_GGA2(V, Y)

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

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

LESSLEAVES_2_IN_GG2(cons_22(U, V), cons_22(W, Z)) -> IF_LESSLEAVES_2_IN_1_GG5(U, V, W, Z, append_3_in_gga3(U, V, U1))
IF_LESSLEAVES_2_IN_1_GG5(U, V, W, Z, append_3_out_gga3(U, V, U1)) -> IF_LESSLEAVES_2_IN_2_GG6(U, V, W, Z, U1, append_3_in_gga3(W, Z, W1))
IF_LESSLEAVES_2_IN_2_GG6(U, V, W, Z, U1, append_3_out_gga3(W, Z, W1)) -> LESSLEAVES_2_IN_GG2(U1, W1)

The TRS R consists of the following rules:

lessleaves_2_in_gg2(nil_0, cons_22(W, Z)) -> lessleaves_2_out_gg2(nil_0, cons_22(W, Z))
lessleaves_2_in_gg2(cons_22(U, V), cons_22(W, Z)) -> if_lessleaves_2_in_1_gg5(U, V, W, Z, append_3_in_gga3(U, V, U1))
append_3_in_gga3(nil_0, Y, Y) -> append_3_out_gga3(nil_0, Y, Y)
append_3_in_gga3(cons_22(U, V), Y, cons_22(U, Z)) -> if_append_3_in_1_gga5(U, V, Y, Z, append_3_in_gga3(V, Y, Z))
if_append_3_in_1_gga5(U, V, Y, Z, append_3_out_gga3(V, Y, Z)) -> append_3_out_gga3(cons_22(U, V), Y, cons_22(U, Z))
if_lessleaves_2_in_1_gg5(U, V, W, Z, append_3_out_gga3(U, V, U1)) -> if_lessleaves_2_in_2_gg6(U, V, W, Z, U1, append_3_in_gga3(W, Z, W1))
if_lessleaves_2_in_2_gg6(U, V, W, Z, U1, append_3_out_gga3(W, Z, W1)) -> if_lessleaves_2_in_3_gg7(U, V, W, Z, U1, W1, lessleaves_2_in_gg2(U1, W1))
if_lessleaves_2_in_3_gg7(U, V, W, Z, U1, W1, lessleaves_2_out_gg2(U1, W1)) -> lessleaves_2_out_gg2(cons_22(U, V), cons_22(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_2_in_gg2(x1, x2)  =  lessleaves_2_in_gg2(x1, x2)
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
lessleaves_2_out_gg2(x1, x2)  =  lessleaves_2_out_gg
if_lessleaves_2_in_1_gg5(x1, x2, x3, x4, x5)  =  if_lessleaves_2_in_1_gg3(x3, x4, x5)
append_3_in_gga3(x1, x2, x3)  =  append_3_in_gga2(x1, x2)
append_3_out_gga3(x1, x2, x3)  =  append_3_out_gga1(x3)
if_append_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_append_3_in_1_gga2(x1, x5)
if_lessleaves_2_in_2_gg6(x1, x2, x3, x4, x5, x6)  =  if_lessleaves_2_in_2_gg2(x5, x6)
if_lessleaves_2_in_3_gg7(x1, x2, x3, x4, x5, x6, x7)  =  if_lessleaves_2_in_3_gg1(x7)
IF_LESSLEAVES_2_IN_2_GG6(x1, x2, x3, x4, x5, x6)  =  IF_LESSLEAVES_2_IN_2_GG2(x5, x6)
IF_LESSLEAVES_2_IN_1_GG5(x1, x2, x3, x4, x5)  =  IF_LESSLEAVES_2_IN_1_GG3(x3, x4, x5)
LESSLEAVES_2_IN_GG2(x1, x2)  =  LESSLEAVES_2_IN_GG2(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
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

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

LESSLEAVES_2_IN_GG2(cons_22(U, V), cons_22(W, Z)) -> IF_LESSLEAVES_2_IN_1_GG5(U, V, W, Z, append_3_in_gga3(U, V, U1))
IF_LESSLEAVES_2_IN_1_GG5(U, V, W, Z, append_3_out_gga3(U, V, U1)) -> IF_LESSLEAVES_2_IN_2_GG6(U, V, W, Z, U1, append_3_in_gga3(W, Z, W1))
IF_LESSLEAVES_2_IN_2_GG6(U, V, W, Z, U1, append_3_out_gga3(W, Z, W1)) -> LESSLEAVES_2_IN_GG2(U1, W1)

The TRS R consists of the following rules:

append_3_in_gga3(nil_0, Y, Y) -> append_3_out_gga3(nil_0, Y, Y)
append_3_in_gga3(cons_22(U, V), Y, cons_22(U, Z)) -> if_append_3_in_1_gga5(U, V, Y, Z, append_3_in_gga3(V, Y, Z))
if_append_3_in_1_gga5(U, V, Y, Z, append_3_out_gga3(V, Y, Z)) -> append_3_out_gga3(cons_22(U, V), Y, cons_22(U, Z))

The argument filtering Pi contains the following mapping:
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
append_3_in_gga3(x1, x2, x3)  =  append_3_in_gga2(x1, x2)
append_3_out_gga3(x1, x2, x3)  =  append_3_out_gga1(x3)
if_append_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_append_3_in_1_gga2(x1, x5)
IF_LESSLEAVES_2_IN_2_GG6(x1, x2, x3, x4, x5, x6)  =  IF_LESSLEAVES_2_IN_2_GG2(x5, x6)
IF_LESSLEAVES_2_IN_1_GG5(x1, x2, x3, x4, x5)  =  IF_LESSLEAVES_2_IN_1_GG3(x3, x4, x5)
LESSLEAVES_2_IN_GG2(x1, x2)  =  LESSLEAVES_2_IN_GG2(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
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ RuleRemovalProof

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

LESSLEAVES_2_IN_GG2(cons_22(U, V), cons_22(W, Z)) -> IF_LESSLEAVES_2_IN_1_GG3(W, Z, append_3_in_gga2(U, V))
IF_LESSLEAVES_2_IN_1_GG3(W, Z, append_3_out_gga1(U1)) -> IF_LESSLEAVES_2_IN_2_GG2(U1, append_3_in_gga2(W, Z))
IF_LESSLEAVES_2_IN_2_GG2(U1, append_3_out_gga1(W1)) -> LESSLEAVES_2_IN_GG2(U1, W1)

The TRS R consists of the following rules:

append_3_in_gga2(nil_0, Y) -> append_3_out_gga1(Y)
append_3_in_gga2(cons_22(U, V), Y) -> if_append_3_in_1_gga2(U, append_3_in_gga2(V, Y))
if_append_3_in_1_gga2(U, append_3_out_gga1(Z)) -> append_3_out_gga1(cons_22(U, Z))

The set Q consists of the following terms:

append_3_in_gga2(x0, x1)
if_append_3_in_1_gga2(x0, x1)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {IF_LESSLEAVES_2_IN_1_GG3, LESSLEAVES_2_IN_GG2, IF_LESSLEAVES_2_IN_2_GG2}.
By using a polynomial ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

IF_LESSLEAVES_2_IN_1_GG3(W, Z, append_3_out_gga1(U1)) -> IF_LESSLEAVES_2_IN_2_GG2(U1, append_3_in_gga2(W, Z))
IF_LESSLEAVES_2_IN_2_GG2(U1, append_3_out_gga1(W1)) -> LESSLEAVES_2_IN_GG2(U1, W1)

Strictly oriented rules of the TRS R:

append_3_in_gga2(nil_0, Y) -> append_3_out_gga1(Y)

Used ordering: POLO with Polynomial interpretation:

POL(nil_0) = 2   
POL(append_3_out_gga1(x1)) = 1 + x1   
POL(LESSLEAVES_2_IN_GG2(x1, x2)) = x1 + x2   
POL(if_append_3_in_1_gga2(x1, x2)) = x1 + x2   
POL(IF_LESSLEAVES_2_IN_2_GG2(x1, x2)) = x1 + x2   
POL(IF_LESSLEAVES_2_IN_1_GG3(x1, x2, x3)) = x1 + x2 + x3   
POL(append_3_in_gga2(x1, x2)) = x1 + x2   
POL(cons_22(x1, x2)) = x1 + x2   



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

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

LESSLEAVES_2_IN_GG2(cons_22(U, V), cons_22(W, Z)) -> IF_LESSLEAVES_2_IN_1_GG3(W, Z, append_3_in_gga2(U, V))

The TRS R consists of the following rules:

append_3_in_gga2(cons_22(U, V), Y) -> if_append_3_in_1_gga2(U, append_3_in_gga2(V, Y))
if_append_3_in_1_gga2(U, append_3_out_gga1(Z)) -> append_3_out_gga1(cons_22(U, Z))

The set Q consists of the following terms:

append_3_in_gga2(x0, x1)
if_append_3_in_1_gga2(x0, x1)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {IF_LESSLEAVES_2_IN_1_GG3, LESSLEAVES_2_IN_GG2}.
By using a polynomial ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

LESSLEAVES_2_IN_GG2(cons_22(U, V), cons_22(W, Z)) -> IF_LESSLEAVES_2_IN_1_GG3(W, Z, append_3_in_gga2(U, V))

Strictly oriented rules of the TRS R:

append_3_in_gga2(cons_22(U, V), Y) -> if_append_3_in_1_gga2(U, append_3_in_gga2(V, Y))

Used ordering: POLO with Polynomial interpretation:

POL(append_3_out_gga1(x1)) = x1   
POL(LESSLEAVES_2_IN_GG2(x1, x2)) = x1 + x2   
POL(if_append_3_in_1_gga2(x1, x2)) = 1 + 2·x1 + x2   
POL(IF_LESSLEAVES_2_IN_1_GG3(x1, x2, x3)) = x1 + x2 + x3   
POL(append_3_in_gga2(x1, x2)) = 1 + 2·x1 + x2   
POL(cons_22(x1, x2)) = 1 + 2·x1 + x2   



↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ RuleRemovalProof
QDP
                                ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

if_append_3_in_1_gga2(U, append_3_out_gga1(Z)) -> append_3_out_gga1(cons_22(U, Z))

The set Q consists of the following terms:

append_3_in_gga2(x0, x1)
if_append_3_in_1_gga2(x0, x1)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are empty set.
The TRS P is empty. Hence, there is no (P,Q,R) chain.