(0) Obligation:

Clauses:

append(nil, Y, Y).
append(cons(U, V), Y, cons(U, Z)) :- append(V, Y, Z).
lessleaves(nil, cons(W, Z)).
lessleaves(cons(U, V), cons(W, Z)) :- ','(append(U, V, U1), ','(append(W, Z, W1), lessleaves(U1, W1))).

Queries:

lessleaves(g,g).

(1) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
lessleaves_in: (b,b)
append_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(2) Obligation:

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

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)

(3) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V, U1))
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → APPEND_IN_GGA(U, V, U1)
APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → U1_GGA(U, V, Y, Z, append_in_gga(V, Y, Z))
APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → APPEND_IN_GGA(V, Y, Z)
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → APPEND_IN_GGA(W, Z, W1)
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_GG(U, V, W, Z, lessleaves_in_gg(U1, W1))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)

The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
LESSLEAVES_IN_GG(x1, x2)  =  LESSLEAVES_IN_GG(x1, x2)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x3, x4, x5)
APPEND_IN_GGA(x1, x2, x3)  =  APPEND_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4, x5)  =  U1_GGA(x1, x5)
U3_GG(x1, x2, x3, x4, x5, x6)  =  U3_GG(x5, x6)
U4_GG(x1, x2, x3, x4, x5)  =  U4_GG(x5)

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

(4) Obligation:

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

LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V, U1))
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → APPEND_IN_GGA(U, V, U1)
APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → U1_GGA(U, V, Y, Z, append_in_gga(V, Y, Z))
APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → APPEND_IN_GGA(V, Y, Z)
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → APPEND_IN_GGA(W, Z, W1)
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_GG(U, V, W, Z, lessleaves_in_gg(U1, W1))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)

The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
LESSLEAVES_IN_GG(x1, x2)  =  LESSLEAVES_IN_GG(x1, x2)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x3, x4, x5)
APPEND_IN_GGA(x1, x2, x3)  =  APPEND_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4, x5)  =  U1_GGA(x1, x5)
U3_GG(x1, x2, x3, x4, x5, x6)  =  U3_GG(x5, x6)
U4_GG(x1, x2, x3, x4, x5)  =  U4_GG(x5)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → APPEND_IN_GGA(V, Y, Z)

The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
APPEND_IN_GGA(x1, x2, x3)  =  APPEND_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:

APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → APPEND_IN_GGA(V, Y, Z)

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

APPEND_IN_GGA(cons(U, V), Y) → APPEND_IN_GGA(V, Y)

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:

  • APPEND_IN_GGA(cons(U, V), Y) → APPEND_IN_GGA(V, Y)
    The graph contains the following edges 1 > 1, 2 >= 2

(13) TRUE

(14) Obligation:

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

U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V, U1))

The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
LESSLEAVES_IN_GG(x1, x2)  =  LESSLEAVES_IN_GG(x1, x2)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x3, x4, x5)
U3_GG(x1, x2, x3, x4, x5, x6)  =  U3_GG(x5, x6)

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:

U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V, U1))

The TRS R consists of the following rules:

append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))

The argument filtering Pi contains the following mapping:
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
LESSLEAVES_IN_GG(x1, x2)  =  LESSLEAVES_IN_GG(x1, x2)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x3, x4, x5)
U3_GG(x1, x2, x3, x4, x5, x6)  =  U3_GG(x5, x6)

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:

U2_GG(W, Z, append_out_gga(U1)) → U3_GG(U1, append_in_gga(W, Z))
U3_GG(U1, append_out_gga(W1)) → LESSLEAVES_IN_GG(U1, W1)
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(W, Z, append_in_gga(U, V))

The TRS R consists of the following rules:

append_in_gga(nil, Y) → append_out_gga(Y)
append_in_gga(cons(U, V), Y) → U1_gga(U, append_in_gga(V, Y))
U1_gga(U, append_out_gga(Z)) → append_out_gga(cons(U, Z))

The set Q consists of the following terms:

append_in_gga(x0, x1)
U1_gga(x0, x1)

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

(19) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

append_in_gga(nil, Y) → append_out_gga(Y)
Used ordering: POLO with Polynomial interpretation [POLO]:

POL(LESSLEAVES_IN_GG(x1, x2)) = 1 + x1 + x2   
POL(U1_gga(x1, x2)) = 2·x1 + x2   
POL(U2_GG(x1, x2, x3)) = 1 + 2·x1 + x2 + x3   
POL(U3_GG(x1, x2)) = 1 + x1 + x2   
POL(append_in_gga(x1, x2)) = x1 + x2   
POL(append_out_gga(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(nil) = 2   

(20) Obligation:

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

U2_GG(W, Z, append_out_gga(U1)) → U3_GG(U1, append_in_gga(W, Z))
U3_GG(U1, append_out_gga(W1)) → LESSLEAVES_IN_GG(U1, W1)
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(W, Z, append_in_gga(U, V))

The TRS R consists of the following rules:

append_in_gga(cons(U, V), Y) → U1_gga(U, append_in_gga(V, Y))
U1_gga(U, append_out_gga(Z)) → append_out_gga(cons(U, Z))

The set Q consists of the following terms:

append_in_gga(x0, x1)
U1_gga(x0, x1)

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

(21) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

U2_GG(W, Z, append_out_gga(U1)) → U3_GG(U1, append_in_gga(W, Z))
U3_GG(U1, append_out_gga(W1)) → LESSLEAVES_IN_GG(U1, W1)
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(W, Z, append_in_gga(U, V))


Used ordering: Polynomial interpretation [POLO]:

POL(LESSLEAVES_IN_GG(x1, x2)) = 1 + x1 + x2   
POL(U1_gga(x1, x2)) = x1 + x2   
POL(U2_GG(x1, x2, x3)) = x1 + x2 + x3   
POL(U3_GG(x1, x2)) = x1 + x2   
POL(append_in_gga(x1, x2)) = x1 + x2   
POL(append_out_gga(x1)) = 2 + x1   
POL(cons(x1, x2)) = x1 + x2   

(22) Obligation:

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

append_in_gga(cons(U, V), Y) → U1_gga(U, append_in_gga(V, Y))
U1_gga(U, append_out_gga(Z)) → append_out_gga(cons(U, Z))

The set Q consists of the following terms:

append_in_gga(x0, x1)
U1_gga(x0, x1)

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

(23) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(24) TRUE

(25) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
lessleaves_in: (b,b)
append_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg(x1, x2)
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x1, x2, x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x2, x3, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x1, x2, x3, x4, x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x1, x2, x3, x4, x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(26) Obligation:

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

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg(x1, x2)
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x1, x2, x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x2, x3, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x1, x2, x3, x4, x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x1, x2, x3, x4, x5)

(27) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V, U1))
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → APPEND_IN_GGA(U, V, U1)
APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → U1_GGA(U, V, Y, Z, append_in_gga(V, Y, Z))
APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → APPEND_IN_GGA(V, Y, Z)
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → APPEND_IN_GGA(W, Z, W1)
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_GG(U, V, W, Z, lessleaves_in_gg(U1, W1))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)

The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg(x1, x2)
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x1, x2, x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x2, x3, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x1, x2, x3, x4, x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x1, x2, x3, x4, x5)
LESSLEAVES_IN_GG(x1, x2)  =  LESSLEAVES_IN_GG(x1, x2)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x1, x2, x3, x4, x5)
APPEND_IN_GGA(x1, x2, x3)  =  APPEND_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4, x5)  =  U1_GGA(x1, x2, x3, x5)
U3_GG(x1, x2, x3, x4, x5, x6)  =  U3_GG(x1, x2, x3, x4, x5, x6)
U4_GG(x1, x2, x3, x4, x5)  =  U4_GG(x1, x2, x3, x4, x5)

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

(28) Obligation:

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

LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V, U1))
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → APPEND_IN_GGA(U, V, U1)
APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → U1_GGA(U, V, Y, Z, append_in_gga(V, Y, Z))
APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → APPEND_IN_GGA(V, Y, Z)
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → APPEND_IN_GGA(W, Z, W1)
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_GG(U, V, W, Z, lessleaves_in_gg(U1, W1))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)

The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg(x1, x2)
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x1, x2, x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x2, x3, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x1, x2, x3, x4, x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x1, x2, x3, x4, x5)
LESSLEAVES_IN_GG(x1, x2)  =  LESSLEAVES_IN_GG(x1, x2)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x1, x2, x3, x4, x5)
APPEND_IN_GGA(x1, x2, x3)  =  APPEND_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4, x5)  =  U1_GGA(x1, x2, x3, x5)
U3_GG(x1, x2, x3, x4, x5, x6)  =  U3_GG(x1, x2, x3, x4, x5, x6)
U4_GG(x1, x2, x3, x4, x5)  =  U4_GG(x1, x2, x3, x4, x5)

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

(29) DependencyGraphProof (EQUIVALENT transformation)

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

(30) Complex Obligation (AND)

(31) Obligation:

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

APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → APPEND_IN_GGA(V, Y, Z)

The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg(x1, x2)
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x1, x2, x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x2, x3, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x1, x2, x3, x4, x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x1, x2, x3, x4, x5)
APPEND_IN_GGA(x1, x2, x3)  =  APPEND_IN_GGA(x1, x2)

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

(32) UsableRulesProof (EQUIVALENT transformation)

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

(33) Obligation:

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

APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → APPEND_IN_GGA(V, Y, Z)

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

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

(34) PiDPToQDPProof (SOUND transformation)

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

(35) Obligation:

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

APPEND_IN_GGA(cons(U, V), Y) → APPEND_IN_GGA(V, Y)

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

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

  • APPEND_IN_GGA(cons(U, V), Y) → APPEND_IN_GGA(V, Y)
    The graph contains the following edges 1 > 1, 2 >= 2

(37) TRUE

(38) Obligation:

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

U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V, U1))

The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg(x1, x2)
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x1, x2, x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x2, x3, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x1, x2, x3, x4, x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x1, x2, x3, x4, x5)
LESSLEAVES_IN_GG(x1, x2)  =  LESSLEAVES_IN_GG(x1, x2)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x1, x2, x3, x4, x5)
U3_GG(x1, x2, x3, x4, x5, x6)  =  U3_GG(x1, x2, x3, x4, x5, x6)

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

(39) UsableRulesProof (EQUIVALENT transformation)

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

(40) Obligation:

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

U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V, U1))

The TRS R consists of the following rules:

append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))

The argument filtering Pi contains the following mapping:
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x2, x3, x5)
LESSLEAVES_IN_GG(x1, x2)  =  LESSLEAVES_IN_GG(x1, x2)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x1, x2, x3, x4, x5)
U3_GG(x1, x2, x3, x4, x5, x6)  =  U3_GG(x1, x2, x3, x4, x5, x6)

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

(41) PiDPToQDPProof (SOUND transformation)

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

(42) Obligation:

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

U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V))

The TRS R consists of the following rules:

append_in_gga(nil, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y) → U1_gga(U, V, Y, append_in_gga(V, Y))
U1_gga(U, V, Y, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))

The set Q consists of the following terms:

append_in_gga(x0, x1)
U1_gga(x0, x1, x2, x3)

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

(43) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(LESSLEAVES_IN_GG(x1, x2)) = x1 + x2   
POL(U1_gga(x1, x2, x3, x4)) = x1 + x4   
POL(U2_GG(x1, x2, x3, x4, x5)) = x3 + x4 + x5   
POL(U3_GG(x1, x2, x3, x4, x5, x6)) = x5 + x6   
POL(append_in_gga(x1, x2)) = x1 + x2   
POL(append_out_gga(x1, x2, x3)) = 1 + x3   
POL(cons(x1, x2)) = x1 + x2   
POL(nil) = 1   

The following usable rules [FROCOS05] were oriented:

append_in_gga(nil, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y) → U1_gga(U, V, Y, append_in_gga(V, Y))
U1_gga(U, V, Y, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))

(44) Obligation:

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

LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V))

The TRS R consists of the following rules:

append_in_gga(nil, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y) → U1_gga(U, V, Y, append_in_gga(V, Y))
U1_gga(U, V, Y, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))

The set Q consists of the following terms:

append_in_gga(x0, x1)
U1_gga(x0, x1, x2, x3)

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