(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))).

Query: lessleaves(g,g)

(1) PrologToPiTRSViaGraphTransformerProof (SOUND transformation)

Transformed Prolog program to (Pi-)TRS.

(2) Obligation:

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

lessleavesA_in_gg(nil, cons(T5, T6)) → lessleavesA_out_gg(nil, cons(T5, T6))
lessleavesA_in_gg(cons(nil, T19), cons(T13, T14)) → U1_gg(T19, T13, T14, pB_in_ggag(T13, T14, X18, T19))
pB_in_ggag(T13, T14, T22, T19) → U4_ggag(T13, T14, T22, T19, appendD_in_gga(T13, T14, T22))
appendD_in_gga(nil, T29, T29) → appendD_out_gga(nil, T29, T29)
appendD_in_gga(cons(T36, T37), T38, cons(T36, X47)) → U3_gga(T36, T37, T38, X47, appendD_in_gga(T37, T38, X47))
U3_gga(T36, T37, T38, X47, appendD_out_gga(T37, T38, X47)) → appendD_out_gga(cons(T36, T37), T38, cons(T36, X47))
U4_ggag(T13, T14, T22, T19, appendD_out_gga(T13, T14, T22)) → U5_ggag(T13, T14, T22, T19, lessleavesA_in_gg(T19, T22))
lessleavesA_in_gg(cons(cons(T51, T52), T53), cons(T13, T14)) → U2_gg(T51, T52, T53, T13, T14, pC_in_ggaggag(T52, T53, X68, T13, T14, X18, T51))
pC_in_ggaggag(T52, T53, T56, T13, T14, X18, T51) → U6_ggaggag(T52, T53, T56, T13, T14, X18, T51, appendD_in_gga(T52, T53, T56))
U6_ggaggag(T52, T53, T56, T13, T14, X18, T51, appendD_out_gga(T52, T53, T56)) → U7_ggaggag(T52, T53, T56, T13, T14, X18, T51, pB_in_ggag(T13, T14, X18, cons(T51, T56)))
U7_ggaggag(T52, T53, T56, T13, T14, X18, T51, pB_out_ggag(T13, T14, X18, cons(T51, T56))) → pC_out_ggaggag(T52, T53, T56, T13, T14, X18, T51)
U2_gg(T51, T52, T53, T13, T14, pC_out_ggaggag(T52, T53, X68, T13, T14, X18, T51)) → lessleavesA_out_gg(cons(cons(T51, T52), T53), cons(T13, T14))
U5_ggag(T13, T14, T22, T19, lessleavesA_out_gg(T19, T22)) → pB_out_ggag(T13, T14, T22, T19)
U1_gg(T19, T13, T14, pB_out_ggag(T13, T14, X18, T19)) → lessleavesA_out_gg(cons(nil, T19), cons(T13, T14))

The argument filtering Pi contains the following mapping:
lessleavesA_in_gg(x1, x2)  =  lessleavesA_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleavesA_out_gg(x1, x2)  =  lessleavesA_out_gg(x1, x2)
U1_gg(x1, x2, x3, x4)  =  U1_gg(x1, x2, x3, x4)
pB_in_ggag(x1, x2, x3, x4)  =  pB_in_ggag(x1, x2, x4)
U4_ggag(x1, x2, x3, x4, x5)  =  U4_ggag(x1, x2, x4, x5)
appendD_in_gga(x1, x2, x3)  =  appendD_in_gga(x1, x2)
appendD_out_gga(x1, x2, x3)  =  appendD_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x1, x2, x3, x5)
U5_ggag(x1, x2, x3, x4, x5)  =  U5_ggag(x1, x2, x3, x4, x5)
U2_gg(x1, x2, x3, x4, x5, x6)  =  U2_gg(x1, x2, x3, x4, x5, x6)
pC_in_ggaggag(x1, x2, x3, x4, x5, x6, x7)  =  pC_in_ggaggag(x1, x2, x4, x5, x7)
U6_ggaggag(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_ggaggag(x1, x2, x4, x5, x7, x8)
U7_ggaggag(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_ggaggag(x1, x2, x3, x4, x5, x7, x8)
pB_out_ggag(x1, x2, x3, x4)  =  pB_out_ggag(x1, x2, x3, x4)
pC_out_ggaggag(x1, x2, x3, x4, x5, x6, x7)  =  pC_out_ggaggag(x1, x2, x3, x4, x5, x6, x7)

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

LESSLEAVESA_IN_GG(cons(nil, T19), cons(T13, T14)) → U1_GG(T19, T13, T14, pB_in_ggag(T13, T14, X18, T19))
LESSLEAVESA_IN_GG(cons(nil, T19), cons(T13, T14)) → PB_IN_GGAG(T13, T14, X18, T19)
PB_IN_GGAG(T13, T14, T22, T19) → U4_GGAG(T13, T14, T22, T19, appendD_in_gga(T13, T14, T22))
PB_IN_GGAG(T13, T14, T22, T19) → APPENDD_IN_GGA(T13, T14, T22)
APPENDD_IN_GGA(cons(T36, T37), T38, cons(T36, X47)) → U3_GGA(T36, T37, T38, X47, appendD_in_gga(T37, T38, X47))
APPENDD_IN_GGA(cons(T36, T37), T38, cons(T36, X47)) → APPENDD_IN_GGA(T37, T38, X47)
U4_GGAG(T13, T14, T22, T19, appendD_out_gga(T13, T14, T22)) → U5_GGAG(T13, T14, T22, T19, lessleavesA_in_gg(T19, T22))
U4_GGAG(T13, T14, T22, T19, appendD_out_gga(T13, T14, T22)) → LESSLEAVESA_IN_GG(T19, T22)
LESSLEAVESA_IN_GG(cons(cons(T51, T52), T53), cons(T13, T14)) → U2_GG(T51, T52, T53, T13, T14, pC_in_ggaggag(T52, T53, X68, T13, T14, X18, T51))
LESSLEAVESA_IN_GG(cons(cons(T51, T52), T53), cons(T13, T14)) → PC_IN_GGAGGAG(T52, T53, X68, T13, T14, X18, T51)
PC_IN_GGAGGAG(T52, T53, T56, T13, T14, X18, T51) → U6_GGAGGAG(T52, T53, T56, T13, T14, X18, T51, appendD_in_gga(T52, T53, T56))
PC_IN_GGAGGAG(T52, T53, T56, T13, T14, X18, T51) → APPENDD_IN_GGA(T52, T53, T56)
U6_GGAGGAG(T52, T53, T56, T13, T14, X18, T51, appendD_out_gga(T52, T53, T56)) → U7_GGAGGAG(T52, T53, T56, T13, T14, X18, T51, pB_in_ggag(T13, T14, X18, cons(T51, T56)))
U6_GGAGGAG(T52, T53, T56, T13, T14, X18, T51, appendD_out_gga(T52, T53, T56)) → PB_IN_GGAG(T13, T14, X18, cons(T51, T56))

The TRS R consists of the following rules:

lessleavesA_in_gg(nil, cons(T5, T6)) → lessleavesA_out_gg(nil, cons(T5, T6))
lessleavesA_in_gg(cons(nil, T19), cons(T13, T14)) → U1_gg(T19, T13, T14, pB_in_ggag(T13, T14, X18, T19))
pB_in_ggag(T13, T14, T22, T19) → U4_ggag(T13, T14, T22, T19, appendD_in_gga(T13, T14, T22))
appendD_in_gga(nil, T29, T29) → appendD_out_gga(nil, T29, T29)
appendD_in_gga(cons(T36, T37), T38, cons(T36, X47)) → U3_gga(T36, T37, T38, X47, appendD_in_gga(T37, T38, X47))
U3_gga(T36, T37, T38, X47, appendD_out_gga(T37, T38, X47)) → appendD_out_gga(cons(T36, T37), T38, cons(T36, X47))
U4_ggag(T13, T14, T22, T19, appendD_out_gga(T13, T14, T22)) → U5_ggag(T13, T14, T22, T19, lessleavesA_in_gg(T19, T22))
lessleavesA_in_gg(cons(cons(T51, T52), T53), cons(T13, T14)) → U2_gg(T51, T52, T53, T13, T14, pC_in_ggaggag(T52, T53, X68, T13, T14, X18, T51))
pC_in_ggaggag(T52, T53, T56, T13, T14, X18, T51) → U6_ggaggag(T52, T53, T56, T13, T14, X18, T51, appendD_in_gga(T52, T53, T56))
U6_ggaggag(T52, T53, T56, T13, T14, X18, T51, appendD_out_gga(T52, T53, T56)) → U7_ggaggag(T52, T53, T56, T13, T14, X18, T51, pB_in_ggag(T13, T14, X18, cons(T51, T56)))
U7_ggaggag(T52, T53, T56, T13, T14, X18, T51, pB_out_ggag(T13, T14, X18, cons(T51, T56))) → pC_out_ggaggag(T52, T53, T56, T13, T14, X18, T51)
U2_gg(T51, T52, T53, T13, T14, pC_out_ggaggag(T52, T53, X68, T13, T14, X18, T51)) → lessleavesA_out_gg(cons(cons(T51, T52), T53), cons(T13, T14))
U5_ggag(T13, T14, T22, T19, lessleavesA_out_gg(T19, T22)) → pB_out_ggag(T13, T14, T22, T19)
U1_gg(T19, T13, T14, pB_out_ggag(T13, T14, X18, T19)) → lessleavesA_out_gg(cons(nil, T19), cons(T13, T14))

The argument filtering Pi contains the following mapping:
lessleavesA_in_gg(x1, x2)  =  lessleavesA_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleavesA_out_gg(x1, x2)  =  lessleavesA_out_gg(x1, x2)
U1_gg(x1, x2, x3, x4)  =  U1_gg(x1, x2, x3, x4)
pB_in_ggag(x1, x2, x3, x4)  =  pB_in_ggag(x1, x2, x4)
U4_ggag(x1, x2, x3, x4, x5)  =  U4_ggag(x1, x2, x4, x5)
appendD_in_gga(x1, x2, x3)  =  appendD_in_gga(x1, x2)
appendD_out_gga(x1, x2, x3)  =  appendD_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x1, x2, x3, x5)
U5_ggag(x1, x2, x3, x4, x5)  =  U5_ggag(x1, x2, x3, x4, x5)
U2_gg(x1, x2, x3, x4, x5, x6)  =  U2_gg(x1, x2, x3, x4, x5, x6)
pC_in_ggaggag(x1, x2, x3, x4, x5, x6, x7)  =  pC_in_ggaggag(x1, x2, x4, x5, x7)
U6_ggaggag(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_ggaggag(x1, x2, x4, x5, x7, x8)
U7_ggaggag(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_ggaggag(x1, x2, x3, x4, x5, x7, x8)
pB_out_ggag(x1, x2, x3, x4)  =  pB_out_ggag(x1, x2, x3, x4)
pC_out_ggaggag(x1, x2, x3, x4, x5, x6, x7)  =  pC_out_ggaggag(x1, x2, x3, x4, x5, x6, x7)
LESSLEAVESA_IN_GG(x1, x2)  =  LESSLEAVESA_IN_GG(x1, x2)
U1_GG(x1, x2, x3, x4)  =  U1_GG(x1, x2, x3, x4)
PB_IN_GGAG(x1, x2, x3, x4)  =  PB_IN_GGAG(x1, x2, x4)
U4_GGAG(x1, x2, x3, x4, x5)  =  U4_GGAG(x1, x2, x4, x5)
APPENDD_IN_GGA(x1, x2, x3)  =  APPENDD_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4, x5)  =  U3_GGA(x1, x2, x3, x5)
U5_GGAG(x1, x2, x3, x4, x5)  =  U5_GGAG(x1, x2, x3, x4, x5)
U2_GG(x1, x2, x3, x4, x5, x6)  =  U2_GG(x1, x2, x3, x4, x5, x6)
PC_IN_GGAGGAG(x1, x2, x3, x4, x5, x6, x7)  =  PC_IN_GGAGGAG(x1, x2, x4, x5, x7)
U6_GGAGGAG(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GGAGGAG(x1, x2, x4, x5, x7, x8)
U7_GGAGGAG(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_GGAGGAG(x1, x2, x3, x4, x5, x7, x8)

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

(4) Obligation:

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

LESSLEAVESA_IN_GG(cons(nil, T19), cons(T13, T14)) → U1_GG(T19, T13, T14, pB_in_ggag(T13, T14, X18, T19))
LESSLEAVESA_IN_GG(cons(nil, T19), cons(T13, T14)) → PB_IN_GGAG(T13, T14, X18, T19)
PB_IN_GGAG(T13, T14, T22, T19) → U4_GGAG(T13, T14, T22, T19, appendD_in_gga(T13, T14, T22))
PB_IN_GGAG(T13, T14, T22, T19) → APPENDD_IN_GGA(T13, T14, T22)
APPENDD_IN_GGA(cons(T36, T37), T38, cons(T36, X47)) → U3_GGA(T36, T37, T38, X47, appendD_in_gga(T37, T38, X47))
APPENDD_IN_GGA(cons(T36, T37), T38, cons(T36, X47)) → APPENDD_IN_GGA(T37, T38, X47)
U4_GGAG(T13, T14, T22, T19, appendD_out_gga(T13, T14, T22)) → U5_GGAG(T13, T14, T22, T19, lessleavesA_in_gg(T19, T22))
U4_GGAG(T13, T14, T22, T19, appendD_out_gga(T13, T14, T22)) → LESSLEAVESA_IN_GG(T19, T22)
LESSLEAVESA_IN_GG(cons(cons(T51, T52), T53), cons(T13, T14)) → U2_GG(T51, T52, T53, T13, T14, pC_in_ggaggag(T52, T53, X68, T13, T14, X18, T51))
LESSLEAVESA_IN_GG(cons(cons(T51, T52), T53), cons(T13, T14)) → PC_IN_GGAGGAG(T52, T53, X68, T13, T14, X18, T51)
PC_IN_GGAGGAG(T52, T53, T56, T13, T14, X18, T51) → U6_GGAGGAG(T52, T53, T56, T13, T14, X18, T51, appendD_in_gga(T52, T53, T56))
PC_IN_GGAGGAG(T52, T53, T56, T13, T14, X18, T51) → APPENDD_IN_GGA(T52, T53, T56)
U6_GGAGGAG(T52, T53, T56, T13, T14, X18, T51, appendD_out_gga(T52, T53, T56)) → U7_GGAGGAG(T52, T53, T56, T13, T14, X18, T51, pB_in_ggag(T13, T14, X18, cons(T51, T56)))
U6_GGAGGAG(T52, T53, T56, T13, T14, X18, T51, appendD_out_gga(T52, T53, T56)) → PB_IN_GGAG(T13, T14, X18, cons(T51, T56))

The TRS R consists of the following rules:

lessleavesA_in_gg(nil, cons(T5, T6)) → lessleavesA_out_gg(nil, cons(T5, T6))
lessleavesA_in_gg(cons(nil, T19), cons(T13, T14)) → U1_gg(T19, T13, T14, pB_in_ggag(T13, T14, X18, T19))
pB_in_ggag(T13, T14, T22, T19) → U4_ggag(T13, T14, T22, T19, appendD_in_gga(T13, T14, T22))
appendD_in_gga(nil, T29, T29) → appendD_out_gga(nil, T29, T29)
appendD_in_gga(cons(T36, T37), T38, cons(T36, X47)) → U3_gga(T36, T37, T38, X47, appendD_in_gga(T37, T38, X47))
U3_gga(T36, T37, T38, X47, appendD_out_gga(T37, T38, X47)) → appendD_out_gga(cons(T36, T37), T38, cons(T36, X47))
U4_ggag(T13, T14, T22, T19, appendD_out_gga(T13, T14, T22)) → U5_ggag(T13, T14, T22, T19, lessleavesA_in_gg(T19, T22))
lessleavesA_in_gg(cons(cons(T51, T52), T53), cons(T13, T14)) → U2_gg(T51, T52, T53, T13, T14, pC_in_ggaggag(T52, T53, X68, T13, T14, X18, T51))
pC_in_ggaggag(T52, T53, T56, T13, T14, X18, T51) → U6_ggaggag(T52, T53, T56, T13, T14, X18, T51, appendD_in_gga(T52, T53, T56))
U6_ggaggag(T52, T53, T56, T13, T14, X18, T51, appendD_out_gga(T52, T53, T56)) → U7_ggaggag(T52, T53, T56, T13, T14, X18, T51, pB_in_ggag(T13, T14, X18, cons(T51, T56)))
U7_ggaggag(T52, T53, T56, T13, T14, X18, T51, pB_out_ggag(T13, T14, X18, cons(T51, T56))) → pC_out_ggaggag(T52, T53, T56, T13, T14, X18, T51)
U2_gg(T51, T52, T53, T13, T14, pC_out_ggaggag(T52, T53, X68, T13, T14, X18, T51)) → lessleavesA_out_gg(cons(cons(T51, T52), T53), cons(T13, T14))
U5_ggag(T13, T14, T22, T19, lessleavesA_out_gg(T19, T22)) → pB_out_ggag(T13, T14, T22, T19)
U1_gg(T19, T13, T14, pB_out_ggag(T13, T14, X18, T19)) → lessleavesA_out_gg(cons(nil, T19), cons(T13, T14))

The argument filtering Pi contains the following mapping:
lessleavesA_in_gg(x1, x2)  =  lessleavesA_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleavesA_out_gg(x1, x2)  =  lessleavesA_out_gg(x1, x2)
U1_gg(x1, x2, x3, x4)  =  U1_gg(x1, x2, x3, x4)
pB_in_ggag(x1, x2, x3, x4)  =  pB_in_ggag(x1, x2, x4)
U4_ggag(x1, x2, x3, x4, x5)  =  U4_ggag(x1, x2, x4, x5)
appendD_in_gga(x1, x2, x3)  =  appendD_in_gga(x1, x2)
appendD_out_gga(x1, x2, x3)  =  appendD_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x1, x2, x3, x5)
U5_ggag(x1, x2, x3, x4, x5)  =  U5_ggag(x1, x2, x3, x4, x5)
U2_gg(x1, x2, x3, x4, x5, x6)  =  U2_gg(x1, x2, x3, x4, x5, x6)
pC_in_ggaggag(x1, x2, x3, x4, x5, x6, x7)  =  pC_in_ggaggag(x1, x2, x4, x5, x7)
U6_ggaggag(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_ggaggag(x1, x2, x4, x5, x7, x8)
U7_ggaggag(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_ggaggag(x1, x2, x3, x4, x5, x7, x8)
pB_out_ggag(x1, x2, x3, x4)  =  pB_out_ggag(x1, x2, x3, x4)
pC_out_ggaggag(x1, x2, x3, x4, x5, x6, x7)  =  pC_out_ggaggag(x1, x2, x3, x4, x5, x6, x7)
LESSLEAVESA_IN_GG(x1, x2)  =  LESSLEAVESA_IN_GG(x1, x2)
U1_GG(x1, x2, x3, x4)  =  U1_GG(x1, x2, x3, x4)
PB_IN_GGAG(x1, x2, x3, x4)  =  PB_IN_GGAG(x1, x2, x4)
U4_GGAG(x1, x2, x3, x4, x5)  =  U4_GGAG(x1, x2, x4, x5)
APPENDD_IN_GGA(x1, x2, x3)  =  APPENDD_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4, x5)  =  U3_GGA(x1, x2, x3, x5)
U5_GGAG(x1, x2, x3, x4, x5)  =  U5_GGAG(x1, x2, x3, x4, x5)
U2_GG(x1, x2, x3, x4, x5, x6)  =  U2_GG(x1, x2, x3, x4, x5, x6)
PC_IN_GGAGGAG(x1, x2, x3, x4, x5, x6, x7)  =  PC_IN_GGAGGAG(x1, x2, x4, x5, x7)
U6_GGAGGAG(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GGAGGAG(x1, x2, x4, x5, x7, x8)
U7_GGAGGAG(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_GGAGGAG(x1, x2, x3, x4, x5, x7, x8)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

APPENDD_IN_GGA(cons(T36, T37), T38, cons(T36, X47)) → APPENDD_IN_GGA(T37, T38, X47)

The TRS R consists of the following rules:

lessleavesA_in_gg(nil, cons(T5, T6)) → lessleavesA_out_gg(nil, cons(T5, T6))
lessleavesA_in_gg(cons(nil, T19), cons(T13, T14)) → U1_gg(T19, T13, T14, pB_in_ggag(T13, T14, X18, T19))
pB_in_ggag(T13, T14, T22, T19) → U4_ggag(T13, T14, T22, T19, appendD_in_gga(T13, T14, T22))
appendD_in_gga(nil, T29, T29) → appendD_out_gga(nil, T29, T29)
appendD_in_gga(cons(T36, T37), T38, cons(T36, X47)) → U3_gga(T36, T37, T38, X47, appendD_in_gga(T37, T38, X47))
U3_gga(T36, T37, T38, X47, appendD_out_gga(T37, T38, X47)) → appendD_out_gga(cons(T36, T37), T38, cons(T36, X47))
U4_ggag(T13, T14, T22, T19, appendD_out_gga(T13, T14, T22)) → U5_ggag(T13, T14, T22, T19, lessleavesA_in_gg(T19, T22))
lessleavesA_in_gg(cons(cons(T51, T52), T53), cons(T13, T14)) → U2_gg(T51, T52, T53, T13, T14, pC_in_ggaggag(T52, T53, X68, T13, T14, X18, T51))
pC_in_ggaggag(T52, T53, T56, T13, T14, X18, T51) → U6_ggaggag(T52, T53, T56, T13, T14, X18, T51, appendD_in_gga(T52, T53, T56))
U6_ggaggag(T52, T53, T56, T13, T14, X18, T51, appendD_out_gga(T52, T53, T56)) → U7_ggaggag(T52, T53, T56, T13, T14, X18, T51, pB_in_ggag(T13, T14, X18, cons(T51, T56)))
U7_ggaggag(T52, T53, T56, T13, T14, X18, T51, pB_out_ggag(T13, T14, X18, cons(T51, T56))) → pC_out_ggaggag(T52, T53, T56, T13, T14, X18, T51)
U2_gg(T51, T52, T53, T13, T14, pC_out_ggaggag(T52, T53, X68, T13, T14, X18, T51)) → lessleavesA_out_gg(cons(cons(T51, T52), T53), cons(T13, T14))
U5_ggag(T13, T14, T22, T19, lessleavesA_out_gg(T19, T22)) → pB_out_ggag(T13, T14, T22, T19)
U1_gg(T19, T13, T14, pB_out_ggag(T13, T14, X18, T19)) → lessleavesA_out_gg(cons(nil, T19), cons(T13, T14))

The argument filtering Pi contains the following mapping:
lessleavesA_in_gg(x1, x2)  =  lessleavesA_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleavesA_out_gg(x1, x2)  =  lessleavesA_out_gg(x1, x2)
U1_gg(x1, x2, x3, x4)  =  U1_gg(x1, x2, x3, x4)
pB_in_ggag(x1, x2, x3, x4)  =  pB_in_ggag(x1, x2, x4)
U4_ggag(x1, x2, x3, x4, x5)  =  U4_ggag(x1, x2, x4, x5)
appendD_in_gga(x1, x2, x3)  =  appendD_in_gga(x1, x2)
appendD_out_gga(x1, x2, x3)  =  appendD_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x1, x2, x3, x5)
U5_ggag(x1, x2, x3, x4, x5)  =  U5_ggag(x1, x2, x3, x4, x5)
U2_gg(x1, x2, x3, x4, x5, x6)  =  U2_gg(x1, x2, x3, x4, x5, x6)
pC_in_ggaggag(x1, x2, x3, x4, x5, x6, x7)  =  pC_in_ggaggag(x1, x2, x4, x5, x7)
U6_ggaggag(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_ggaggag(x1, x2, x4, x5, x7, x8)
U7_ggaggag(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_ggaggag(x1, x2, x3, x4, x5, x7, x8)
pB_out_ggag(x1, x2, x3, x4)  =  pB_out_ggag(x1, x2, x3, x4)
pC_out_ggaggag(x1, x2, x3, x4, x5, x6, x7)  =  pC_out_ggaggag(x1, x2, x3, x4, x5, x6, x7)
APPENDD_IN_GGA(x1, x2, x3)  =  APPENDD_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:

APPENDD_IN_GGA(cons(T36, T37), T38, cons(T36, X47)) → APPENDD_IN_GGA(T37, T38, X47)

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

APPENDD_IN_GGA(cons(T36, T37), T38) → APPENDD_IN_GGA(T37, T38)

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:

  • APPENDD_IN_GGA(cons(T36, T37), T38) → APPENDD_IN_GGA(T37, T38)
    The graph contains the following edges 1 > 1, 2 >= 2

(13) YES

(14) Obligation:

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

LESSLEAVESA_IN_GG(cons(nil, T19), cons(T13, T14)) → PB_IN_GGAG(T13, T14, X18, T19)
PB_IN_GGAG(T13, T14, T22, T19) → U4_GGAG(T13, T14, T22, T19, appendD_in_gga(T13, T14, T22))
U4_GGAG(T13, T14, T22, T19, appendD_out_gga(T13, T14, T22)) → LESSLEAVESA_IN_GG(T19, T22)
LESSLEAVESA_IN_GG(cons(cons(T51, T52), T53), cons(T13, T14)) → PC_IN_GGAGGAG(T52, T53, X68, T13, T14, X18, T51)
PC_IN_GGAGGAG(T52, T53, T56, T13, T14, X18, T51) → U6_GGAGGAG(T52, T53, T56, T13, T14, X18, T51, appendD_in_gga(T52, T53, T56))
U6_GGAGGAG(T52, T53, T56, T13, T14, X18, T51, appendD_out_gga(T52, T53, T56)) → PB_IN_GGAG(T13, T14, X18, cons(T51, T56))

The TRS R consists of the following rules:

lessleavesA_in_gg(nil, cons(T5, T6)) → lessleavesA_out_gg(nil, cons(T5, T6))
lessleavesA_in_gg(cons(nil, T19), cons(T13, T14)) → U1_gg(T19, T13, T14, pB_in_ggag(T13, T14, X18, T19))
pB_in_ggag(T13, T14, T22, T19) → U4_ggag(T13, T14, T22, T19, appendD_in_gga(T13, T14, T22))
appendD_in_gga(nil, T29, T29) → appendD_out_gga(nil, T29, T29)
appendD_in_gga(cons(T36, T37), T38, cons(T36, X47)) → U3_gga(T36, T37, T38, X47, appendD_in_gga(T37, T38, X47))
U3_gga(T36, T37, T38, X47, appendD_out_gga(T37, T38, X47)) → appendD_out_gga(cons(T36, T37), T38, cons(T36, X47))
U4_ggag(T13, T14, T22, T19, appendD_out_gga(T13, T14, T22)) → U5_ggag(T13, T14, T22, T19, lessleavesA_in_gg(T19, T22))
lessleavesA_in_gg(cons(cons(T51, T52), T53), cons(T13, T14)) → U2_gg(T51, T52, T53, T13, T14, pC_in_ggaggag(T52, T53, X68, T13, T14, X18, T51))
pC_in_ggaggag(T52, T53, T56, T13, T14, X18, T51) → U6_ggaggag(T52, T53, T56, T13, T14, X18, T51, appendD_in_gga(T52, T53, T56))
U6_ggaggag(T52, T53, T56, T13, T14, X18, T51, appendD_out_gga(T52, T53, T56)) → U7_ggaggag(T52, T53, T56, T13, T14, X18, T51, pB_in_ggag(T13, T14, X18, cons(T51, T56)))
U7_ggaggag(T52, T53, T56, T13, T14, X18, T51, pB_out_ggag(T13, T14, X18, cons(T51, T56))) → pC_out_ggaggag(T52, T53, T56, T13, T14, X18, T51)
U2_gg(T51, T52, T53, T13, T14, pC_out_ggaggag(T52, T53, X68, T13, T14, X18, T51)) → lessleavesA_out_gg(cons(cons(T51, T52), T53), cons(T13, T14))
U5_ggag(T13, T14, T22, T19, lessleavesA_out_gg(T19, T22)) → pB_out_ggag(T13, T14, T22, T19)
U1_gg(T19, T13, T14, pB_out_ggag(T13, T14, X18, T19)) → lessleavesA_out_gg(cons(nil, T19), cons(T13, T14))

The argument filtering Pi contains the following mapping:
lessleavesA_in_gg(x1, x2)  =  lessleavesA_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleavesA_out_gg(x1, x2)  =  lessleavesA_out_gg(x1, x2)
U1_gg(x1, x2, x3, x4)  =  U1_gg(x1, x2, x3, x4)
pB_in_ggag(x1, x2, x3, x4)  =  pB_in_ggag(x1, x2, x4)
U4_ggag(x1, x2, x3, x4, x5)  =  U4_ggag(x1, x2, x4, x5)
appendD_in_gga(x1, x2, x3)  =  appendD_in_gga(x1, x2)
appendD_out_gga(x1, x2, x3)  =  appendD_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x1, x2, x3, x5)
U5_ggag(x1, x2, x3, x4, x5)  =  U5_ggag(x1, x2, x3, x4, x5)
U2_gg(x1, x2, x3, x4, x5, x6)  =  U2_gg(x1, x2, x3, x4, x5, x6)
pC_in_ggaggag(x1, x2, x3, x4, x5, x6, x7)  =  pC_in_ggaggag(x1, x2, x4, x5, x7)
U6_ggaggag(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_ggaggag(x1, x2, x4, x5, x7, x8)
U7_ggaggag(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_ggaggag(x1, x2, x3, x4, x5, x7, x8)
pB_out_ggag(x1, x2, x3, x4)  =  pB_out_ggag(x1, x2, x3, x4)
pC_out_ggaggag(x1, x2, x3, x4, x5, x6, x7)  =  pC_out_ggaggag(x1, x2, x3, x4, x5, x6, x7)
LESSLEAVESA_IN_GG(x1, x2)  =  LESSLEAVESA_IN_GG(x1, x2)
PB_IN_GGAG(x1, x2, x3, x4)  =  PB_IN_GGAG(x1, x2, x4)
U4_GGAG(x1, x2, x3, x4, x5)  =  U4_GGAG(x1, x2, x4, x5)
PC_IN_GGAGGAG(x1, x2, x3, x4, x5, x6, x7)  =  PC_IN_GGAGGAG(x1, x2, x4, x5, x7)
U6_GGAGGAG(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GGAGGAG(x1, x2, x4, x5, x7, x8)

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:

LESSLEAVESA_IN_GG(cons(nil, T19), cons(T13, T14)) → PB_IN_GGAG(T13, T14, X18, T19)
PB_IN_GGAG(T13, T14, T22, T19) → U4_GGAG(T13, T14, T22, T19, appendD_in_gga(T13, T14, T22))
U4_GGAG(T13, T14, T22, T19, appendD_out_gga(T13, T14, T22)) → LESSLEAVESA_IN_GG(T19, T22)
LESSLEAVESA_IN_GG(cons(cons(T51, T52), T53), cons(T13, T14)) → PC_IN_GGAGGAG(T52, T53, X68, T13, T14, X18, T51)
PC_IN_GGAGGAG(T52, T53, T56, T13, T14, X18, T51) → U6_GGAGGAG(T52, T53, T56, T13, T14, X18, T51, appendD_in_gga(T52, T53, T56))
U6_GGAGGAG(T52, T53, T56, T13, T14, X18, T51, appendD_out_gga(T52, T53, T56)) → PB_IN_GGAG(T13, T14, X18, cons(T51, T56))

The TRS R consists of the following rules:

appendD_in_gga(nil, T29, T29) → appendD_out_gga(nil, T29, T29)
appendD_in_gga(cons(T36, T37), T38, cons(T36, X47)) → U3_gga(T36, T37, T38, X47, appendD_in_gga(T37, T38, X47))
U3_gga(T36, T37, T38, X47, appendD_out_gga(T37, T38, X47)) → appendD_out_gga(cons(T36, T37), T38, cons(T36, X47))

The argument filtering Pi contains the following mapping:
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
appendD_in_gga(x1, x2, x3)  =  appendD_in_gga(x1, x2)
appendD_out_gga(x1, x2, x3)  =  appendD_out_gga(x1, x2, x3)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x1, x2, x3, x5)
LESSLEAVESA_IN_GG(x1, x2)  =  LESSLEAVESA_IN_GG(x1, x2)
PB_IN_GGAG(x1, x2, x3, x4)  =  PB_IN_GGAG(x1, x2, x4)
U4_GGAG(x1, x2, x3, x4, x5)  =  U4_GGAG(x1, x2, x4, x5)
PC_IN_GGAGGAG(x1, x2, x3, x4, x5, x6, x7)  =  PC_IN_GGAGGAG(x1, x2, x4, x5, x7)
U6_GGAGGAG(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GGAGGAG(x1, x2, x4, x5, x7, x8)

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:

LESSLEAVESA_IN_GG(cons(nil, T19), cons(T13, T14)) → PB_IN_GGAG(T13, T14, T19)
PB_IN_GGAG(T13, T14, T19) → U4_GGAG(T13, T14, T19, appendD_in_gga(T13, T14))
U4_GGAG(T13, T14, T19, appendD_out_gga(T13, T14, T22)) → LESSLEAVESA_IN_GG(T19, T22)
LESSLEAVESA_IN_GG(cons(cons(T51, T52), T53), cons(T13, T14)) → PC_IN_GGAGGAG(T52, T53, T13, T14, T51)
PC_IN_GGAGGAG(T52, T53, T13, T14, T51) → U6_GGAGGAG(T52, T53, T13, T14, T51, appendD_in_gga(T52, T53))
U6_GGAGGAG(T52, T53, T13, T14, T51, appendD_out_gga(T52, T53, T56)) → PB_IN_GGAG(T13, T14, cons(T51, T56))

The TRS R consists of the following rules:

appendD_in_gga(nil, T29) → appendD_out_gga(nil, T29, T29)
appendD_in_gga(cons(T36, T37), T38) → U3_gga(T36, T37, T38, appendD_in_gga(T37, T38))
U3_gga(T36, T37, T38, appendD_out_gga(T37, T38, X47)) → appendD_out_gga(cons(T36, T37), T38, cons(T36, X47))

The set Q consists of the following terms:

appendD_in_gga(x0, x1)
U3_gga(x0, x1, x2, x3)

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

(19) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


LESSLEAVESA_IN_GG(cons(nil, T19), cons(T13, T14)) → PB_IN_GGAG(T13, T14, T19)
LESSLEAVESA_IN_GG(cons(cons(T51, T52), T53), cons(T13, T14)) → PC_IN_GGAGGAG(T52, T53, T13, T14, T51)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(LESSLEAVESA_IN_GG(x1, x2)) = x2   
POL(PB_IN_GGAG(x1, x2, x3)) = x1 + x2   
POL(PC_IN_GGAGGAG(x1, x2, x3, x4, x5)) = x3 + x4   
POL(U3_gga(x1, x2, x3, x4)) = 1 + x1 + x4   
POL(U4_GGAG(x1, x2, x3, x4)) = x4   
POL(U6_GGAGGAG(x1, x2, x3, x4, x5, x6)) = x3 + x4   
POL(appendD_in_gga(x1, x2)) = x1 + x2   
POL(appendD_out_gga(x1, x2, x3)) = x3   
POL(cons(x1, x2)) = 1 + x1 + x2   
POL(nil) = 0   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

appendD_in_gga(nil, T29) → appendD_out_gga(nil, T29, T29)
appendD_in_gga(cons(T36, T37), T38) → U3_gga(T36, T37, T38, appendD_in_gga(T37, T38))
U3_gga(T36, T37, T38, appendD_out_gga(T37, T38, X47)) → appendD_out_gga(cons(T36, T37), T38, cons(T36, X47))

(20) Obligation:

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

PB_IN_GGAG(T13, T14, T19) → U4_GGAG(T13, T14, T19, appendD_in_gga(T13, T14))
U4_GGAG(T13, T14, T19, appendD_out_gga(T13, T14, T22)) → LESSLEAVESA_IN_GG(T19, T22)
PC_IN_GGAGGAG(T52, T53, T13, T14, T51) → U6_GGAGGAG(T52, T53, T13, T14, T51, appendD_in_gga(T52, T53))
U6_GGAGGAG(T52, T53, T13, T14, T51, appendD_out_gga(T52, T53, T56)) → PB_IN_GGAG(T13, T14, cons(T51, T56))

The TRS R consists of the following rules:

appendD_in_gga(nil, T29) → appendD_out_gga(nil, T29, T29)
appendD_in_gga(cons(T36, T37), T38) → U3_gga(T36, T37, T38, appendD_in_gga(T37, T38))
U3_gga(T36, T37, T38, appendD_out_gga(T37, T38, X47)) → appendD_out_gga(cons(T36, T37), T38, cons(T36, X47))

The set Q consists of the following terms:

appendD_in_gga(x0, x1)
U3_gga(x0, x1, x2, x3)

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

(21) DependencyGraphProof (EQUIVALENT transformation)

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

(22) TRUE