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



PROLOG
  ↳ PrologToPiTRSProof

goal3(A, B, C) :- s2l2(A, D), applast3(D, B, C).
applast3(L, X, Last) :- append3(L, .2(X, {}0), LX), last2(Last, LX).
last2(X, .2(X, {}0)).
last2(X, .2(H, T)) :- last2(X, T).
append3({}0, L, L).
append3(.2(H, L1), L2, .2(H, L3)) :- append3(L1, L2, L3).
s2l2(s1(X), .2(Y, Xs)) :- s2l2(X, Xs).
s2l2(00, {}0).


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


goal_3_in_gaa3(A, B, C) -> if_goal_3_in_1_gaa4(A, B, C, s2l_2_in_ga2(A, D))
s2l_2_in_ga2(s_11(X), ._22(Y, Xs)) -> if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_in_ga2(X, Xs))
s2l_2_in_ga2(0_0, []_0) -> s2l_2_out_ga2(0_0, []_0)
if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_out_ga2(X, Xs)) -> s2l_2_out_ga2(s_11(X), ._22(Y, Xs))
if_goal_3_in_1_gaa4(A, B, C, s2l_2_out_ga2(A, D)) -> if_goal_3_in_2_gaa5(A, B, C, D, applast_3_in_gaa3(D, B, C))
applast_3_in_gaa3(L, X, Last) -> if_applast_3_in_1_gaa4(L, X, Last, append_3_in_gga3(L, ._22(X, []_0), LX))
append_3_in_gga3([]_0, L, L) -> append_3_out_gga3([]_0, L, L)
append_3_in_gga3(._22(H, L1), L2, ._22(H, L3)) -> if_append_3_in_1_gga5(H, L1, L2, L3, append_3_in_gga3(L1, L2, L3))
if_append_3_in_1_gga5(H, L1, L2, L3, append_3_out_gga3(L1, L2, L3)) -> append_3_out_gga3(._22(H, L1), L2, ._22(H, L3))
if_applast_3_in_1_gaa4(L, X, Last, append_3_out_gga3(L, ._22(X, []_0), LX)) -> if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_in_ag2(Last, LX))
last_2_in_ag2(X, ._22(X, []_0)) -> last_2_out_ag2(X, ._22(X, []_0))
last_2_in_ag2(X, ._22(H, T)) -> if_last_2_in_1_ag4(X, H, T, last_2_in_ag2(X, T))
if_last_2_in_1_ag4(X, H, T, last_2_out_ag2(X, T)) -> last_2_out_ag2(X, ._22(H, T))
if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_out_ag2(Last, LX)) -> applast_3_out_gaa3(L, X, Last)
if_goal_3_in_2_gaa5(A, B, C, D, applast_3_out_gaa3(D, B, C)) -> goal_3_out_gaa3(A, B, C)

The argument filtering Pi contains the following mapping:
goal_3_in_gaa3(x1, x2, x3)  =  goal_3_in_gaa1(x1)
._22(x1, x2)  =  ._21(x2)
[]_0  =  []_0
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_goal_3_in_1_gaa4(x1, x2, x3, x4)  =  if_goal_3_in_1_gaa1(x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_goal_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_goal_3_in_2_gaa1(x5)
applast_3_in_gaa3(x1, x2, x3)  =  applast_3_in_gaa1(x1)
if_applast_3_in_1_gaa4(x1, x2, x3, x4)  =  if_applast_3_in_1_gaa1(x4)
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_gga1(x5)
if_applast_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_applast_3_in_2_gaa1(x5)
last_2_in_ag2(x1, x2)  =  last_2_in_ag1(x2)
last_2_out_ag2(x1, x2)  =  last_2_out_ag
if_last_2_in_1_ag4(x1, x2, x3, x4)  =  if_last_2_in_1_ag1(x4)
applast_3_out_gaa3(x1, x2, x3)  =  applast_3_out_gaa
goal_3_out_gaa3(x1, x2, x3)  =  goal_3_out_gaa

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:

goal_3_in_gaa3(A, B, C) -> if_goal_3_in_1_gaa4(A, B, C, s2l_2_in_ga2(A, D))
s2l_2_in_ga2(s_11(X), ._22(Y, Xs)) -> if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_in_ga2(X, Xs))
s2l_2_in_ga2(0_0, []_0) -> s2l_2_out_ga2(0_0, []_0)
if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_out_ga2(X, Xs)) -> s2l_2_out_ga2(s_11(X), ._22(Y, Xs))
if_goal_3_in_1_gaa4(A, B, C, s2l_2_out_ga2(A, D)) -> if_goal_3_in_2_gaa5(A, B, C, D, applast_3_in_gaa3(D, B, C))
applast_3_in_gaa3(L, X, Last) -> if_applast_3_in_1_gaa4(L, X, Last, append_3_in_gga3(L, ._22(X, []_0), LX))
append_3_in_gga3([]_0, L, L) -> append_3_out_gga3([]_0, L, L)
append_3_in_gga3(._22(H, L1), L2, ._22(H, L3)) -> if_append_3_in_1_gga5(H, L1, L2, L3, append_3_in_gga3(L1, L2, L3))
if_append_3_in_1_gga5(H, L1, L2, L3, append_3_out_gga3(L1, L2, L3)) -> append_3_out_gga3(._22(H, L1), L2, ._22(H, L3))
if_applast_3_in_1_gaa4(L, X, Last, append_3_out_gga3(L, ._22(X, []_0), LX)) -> if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_in_ag2(Last, LX))
last_2_in_ag2(X, ._22(X, []_0)) -> last_2_out_ag2(X, ._22(X, []_0))
last_2_in_ag2(X, ._22(H, T)) -> if_last_2_in_1_ag4(X, H, T, last_2_in_ag2(X, T))
if_last_2_in_1_ag4(X, H, T, last_2_out_ag2(X, T)) -> last_2_out_ag2(X, ._22(H, T))
if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_out_ag2(Last, LX)) -> applast_3_out_gaa3(L, X, Last)
if_goal_3_in_2_gaa5(A, B, C, D, applast_3_out_gaa3(D, B, C)) -> goal_3_out_gaa3(A, B, C)

The argument filtering Pi contains the following mapping:
goal_3_in_gaa3(x1, x2, x3)  =  goal_3_in_gaa1(x1)
._22(x1, x2)  =  ._21(x2)
[]_0  =  []_0
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_goal_3_in_1_gaa4(x1, x2, x3, x4)  =  if_goal_3_in_1_gaa1(x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_goal_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_goal_3_in_2_gaa1(x5)
applast_3_in_gaa3(x1, x2, x3)  =  applast_3_in_gaa1(x1)
if_applast_3_in_1_gaa4(x1, x2, x3, x4)  =  if_applast_3_in_1_gaa1(x4)
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_gga1(x5)
if_applast_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_applast_3_in_2_gaa1(x5)
last_2_in_ag2(x1, x2)  =  last_2_in_ag1(x2)
last_2_out_ag2(x1, x2)  =  last_2_out_ag
if_last_2_in_1_ag4(x1, x2, x3, x4)  =  if_last_2_in_1_ag1(x4)
applast_3_out_gaa3(x1, x2, x3)  =  applast_3_out_gaa
goal_3_out_gaa3(x1, x2, x3)  =  goal_3_out_gaa


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

GOAL_3_IN_GAA3(A, B, C) -> IF_GOAL_3_IN_1_GAA4(A, B, C, s2l_2_in_ga2(A, D))
GOAL_3_IN_GAA3(A, B, C) -> S2L_2_IN_GA2(A, D)
S2L_2_IN_GA2(s_11(X), ._22(Y, Xs)) -> IF_S2L_2_IN_1_GA4(X, Y, Xs, s2l_2_in_ga2(X, Xs))
S2L_2_IN_GA2(s_11(X), ._22(Y, Xs)) -> S2L_2_IN_GA2(X, Xs)
IF_GOAL_3_IN_1_GAA4(A, B, C, s2l_2_out_ga2(A, D)) -> IF_GOAL_3_IN_2_GAA5(A, B, C, D, applast_3_in_gaa3(D, B, C))
IF_GOAL_3_IN_1_GAA4(A, B, C, s2l_2_out_ga2(A, D)) -> APPLAST_3_IN_GAA3(D, B, C)
APPLAST_3_IN_GAA3(L, X, Last) -> IF_APPLAST_3_IN_1_GAA4(L, X, Last, append_3_in_gga3(L, ._22(X, []_0), LX))
APPLAST_3_IN_GAA3(L, X, Last) -> APPEND_3_IN_GGA3(L, ._22(X, []_0), LX)
APPEND_3_IN_GGA3(._22(H, L1), L2, ._22(H, L3)) -> IF_APPEND_3_IN_1_GGA5(H, L1, L2, L3, append_3_in_gga3(L1, L2, L3))
APPEND_3_IN_GGA3(._22(H, L1), L2, ._22(H, L3)) -> APPEND_3_IN_GGA3(L1, L2, L3)
IF_APPLAST_3_IN_1_GAA4(L, X, Last, append_3_out_gga3(L, ._22(X, []_0), LX)) -> IF_APPLAST_3_IN_2_GAA5(L, X, Last, LX, last_2_in_ag2(Last, LX))
IF_APPLAST_3_IN_1_GAA4(L, X, Last, append_3_out_gga3(L, ._22(X, []_0), LX)) -> LAST_2_IN_AG2(Last, LX)
LAST_2_IN_AG2(X, ._22(H, T)) -> IF_LAST_2_IN_1_AG4(X, H, T, last_2_in_ag2(X, T))
LAST_2_IN_AG2(X, ._22(H, T)) -> LAST_2_IN_AG2(X, T)

The TRS R consists of the following rules:

goal_3_in_gaa3(A, B, C) -> if_goal_3_in_1_gaa4(A, B, C, s2l_2_in_ga2(A, D))
s2l_2_in_ga2(s_11(X), ._22(Y, Xs)) -> if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_in_ga2(X, Xs))
s2l_2_in_ga2(0_0, []_0) -> s2l_2_out_ga2(0_0, []_0)
if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_out_ga2(X, Xs)) -> s2l_2_out_ga2(s_11(X), ._22(Y, Xs))
if_goal_3_in_1_gaa4(A, B, C, s2l_2_out_ga2(A, D)) -> if_goal_3_in_2_gaa5(A, B, C, D, applast_3_in_gaa3(D, B, C))
applast_3_in_gaa3(L, X, Last) -> if_applast_3_in_1_gaa4(L, X, Last, append_3_in_gga3(L, ._22(X, []_0), LX))
append_3_in_gga3([]_0, L, L) -> append_3_out_gga3([]_0, L, L)
append_3_in_gga3(._22(H, L1), L2, ._22(H, L3)) -> if_append_3_in_1_gga5(H, L1, L2, L3, append_3_in_gga3(L1, L2, L3))
if_append_3_in_1_gga5(H, L1, L2, L3, append_3_out_gga3(L1, L2, L3)) -> append_3_out_gga3(._22(H, L1), L2, ._22(H, L3))
if_applast_3_in_1_gaa4(L, X, Last, append_3_out_gga3(L, ._22(X, []_0), LX)) -> if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_in_ag2(Last, LX))
last_2_in_ag2(X, ._22(X, []_0)) -> last_2_out_ag2(X, ._22(X, []_0))
last_2_in_ag2(X, ._22(H, T)) -> if_last_2_in_1_ag4(X, H, T, last_2_in_ag2(X, T))
if_last_2_in_1_ag4(X, H, T, last_2_out_ag2(X, T)) -> last_2_out_ag2(X, ._22(H, T))
if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_out_ag2(Last, LX)) -> applast_3_out_gaa3(L, X, Last)
if_goal_3_in_2_gaa5(A, B, C, D, applast_3_out_gaa3(D, B, C)) -> goal_3_out_gaa3(A, B, C)

The argument filtering Pi contains the following mapping:
goal_3_in_gaa3(x1, x2, x3)  =  goal_3_in_gaa1(x1)
._22(x1, x2)  =  ._21(x2)
[]_0  =  []_0
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_goal_3_in_1_gaa4(x1, x2, x3, x4)  =  if_goal_3_in_1_gaa1(x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_goal_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_goal_3_in_2_gaa1(x5)
applast_3_in_gaa3(x1, x2, x3)  =  applast_3_in_gaa1(x1)
if_applast_3_in_1_gaa4(x1, x2, x3, x4)  =  if_applast_3_in_1_gaa1(x4)
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_gga1(x5)
if_applast_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_applast_3_in_2_gaa1(x5)
last_2_in_ag2(x1, x2)  =  last_2_in_ag1(x2)
last_2_out_ag2(x1, x2)  =  last_2_out_ag
if_last_2_in_1_ag4(x1, x2, x3, x4)  =  if_last_2_in_1_ag1(x4)
applast_3_out_gaa3(x1, x2, x3)  =  applast_3_out_gaa
goal_3_out_gaa3(x1, x2, x3)  =  goal_3_out_gaa
S2L_2_IN_GA2(x1, x2)  =  S2L_2_IN_GA1(x1)
IF_APPLAST_3_IN_1_GAA4(x1, x2, x3, x4)  =  IF_APPLAST_3_IN_1_GAA1(x4)
IF_GOAL_3_IN_1_GAA4(x1, x2, x3, x4)  =  IF_GOAL_3_IN_1_GAA1(x4)
IF_APPEND_3_IN_1_GGA5(x1, x2, x3, x4, x5)  =  IF_APPEND_3_IN_1_GGA1(x5)
IF_APPLAST_3_IN_2_GAA5(x1, x2, x3, x4, x5)  =  IF_APPLAST_3_IN_2_GAA1(x5)
APPLAST_3_IN_GAA3(x1, x2, x3)  =  APPLAST_3_IN_GAA1(x1)
IF_GOAL_3_IN_2_GAA5(x1, x2, x3, x4, x5)  =  IF_GOAL_3_IN_2_GAA1(x5)
GOAL_3_IN_GAA3(x1, x2, x3)  =  GOAL_3_IN_GAA1(x1)
IF_S2L_2_IN_1_GA4(x1, x2, x3, x4)  =  IF_S2L_2_IN_1_GA1(x4)
IF_LAST_2_IN_1_AG4(x1, x2, x3, x4)  =  IF_LAST_2_IN_1_AG1(x4)
LAST_2_IN_AG2(x1, x2)  =  LAST_2_IN_AG1(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:

GOAL_3_IN_GAA3(A, B, C) -> IF_GOAL_3_IN_1_GAA4(A, B, C, s2l_2_in_ga2(A, D))
GOAL_3_IN_GAA3(A, B, C) -> S2L_2_IN_GA2(A, D)
S2L_2_IN_GA2(s_11(X), ._22(Y, Xs)) -> IF_S2L_2_IN_1_GA4(X, Y, Xs, s2l_2_in_ga2(X, Xs))
S2L_2_IN_GA2(s_11(X), ._22(Y, Xs)) -> S2L_2_IN_GA2(X, Xs)
IF_GOAL_3_IN_1_GAA4(A, B, C, s2l_2_out_ga2(A, D)) -> IF_GOAL_3_IN_2_GAA5(A, B, C, D, applast_3_in_gaa3(D, B, C))
IF_GOAL_3_IN_1_GAA4(A, B, C, s2l_2_out_ga2(A, D)) -> APPLAST_3_IN_GAA3(D, B, C)
APPLAST_3_IN_GAA3(L, X, Last) -> IF_APPLAST_3_IN_1_GAA4(L, X, Last, append_3_in_gga3(L, ._22(X, []_0), LX))
APPLAST_3_IN_GAA3(L, X, Last) -> APPEND_3_IN_GGA3(L, ._22(X, []_0), LX)
APPEND_3_IN_GGA3(._22(H, L1), L2, ._22(H, L3)) -> IF_APPEND_3_IN_1_GGA5(H, L1, L2, L3, append_3_in_gga3(L1, L2, L3))
APPEND_3_IN_GGA3(._22(H, L1), L2, ._22(H, L3)) -> APPEND_3_IN_GGA3(L1, L2, L3)
IF_APPLAST_3_IN_1_GAA4(L, X, Last, append_3_out_gga3(L, ._22(X, []_0), LX)) -> IF_APPLAST_3_IN_2_GAA5(L, X, Last, LX, last_2_in_ag2(Last, LX))
IF_APPLAST_3_IN_1_GAA4(L, X, Last, append_3_out_gga3(L, ._22(X, []_0), LX)) -> LAST_2_IN_AG2(Last, LX)
LAST_2_IN_AG2(X, ._22(H, T)) -> IF_LAST_2_IN_1_AG4(X, H, T, last_2_in_ag2(X, T))
LAST_2_IN_AG2(X, ._22(H, T)) -> LAST_2_IN_AG2(X, T)

The TRS R consists of the following rules:

goal_3_in_gaa3(A, B, C) -> if_goal_3_in_1_gaa4(A, B, C, s2l_2_in_ga2(A, D))
s2l_2_in_ga2(s_11(X), ._22(Y, Xs)) -> if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_in_ga2(X, Xs))
s2l_2_in_ga2(0_0, []_0) -> s2l_2_out_ga2(0_0, []_0)
if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_out_ga2(X, Xs)) -> s2l_2_out_ga2(s_11(X), ._22(Y, Xs))
if_goal_3_in_1_gaa4(A, B, C, s2l_2_out_ga2(A, D)) -> if_goal_3_in_2_gaa5(A, B, C, D, applast_3_in_gaa3(D, B, C))
applast_3_in_gaa3(L, X, Last) -> if_applast_3_in_1_gaa4(L, X, Last, append_3_in_gga3(L, ._22(X, []_0), LX))
append_3_in_gga3([]_0, L, L) -> append_3_out_gga3([]_0, L, L)
append_3_in_gga3(._22(H, L1), L2, ._22(H, L3)) -> if_append_3_in_1_gga5(H, L1, L2, L3, append_3_in_gga3(L1, L2, L3))
if_append_3_in_1_gga5(H, L1, L2, L3, append_3_out_gga3(L1, L2, L3)) -> append_3_out_gga3(._22(H, L1), L2, ._22(H, L3))
if_applast_3_in_1_gaa4(L, X, Last, append_3_out_gga3(L, ._22(X, []_0), LX)) -> if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_in_ag2(Last, LX))
last_2_in_ag2(X, ._22(X, []_0)) -> last_2_out_ag2(X, ._22(X, []_0))
last_2_in_ag2(X, ._22(H, T)) -> if_last_2_in_1_ag4(X, H, T, last_2_in_ag2(X, T))
if_last_2_in_1_ag4(X, H, T, last_2_out_ag2(X, T)) -> last_2_out_ag2(X, ._22(H, T))
if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_out_ag2(Last, LX)) -> applast_3_out_gaa3(L, X, Last)
if_goal_3_in_2_gaa5(A, B, C, D, applast_3_out_gaa3(D, B, C)) -> goal_3_out_gaa3(A, B, C)

The argument filtering Pi contains the following mapping:
goal_3_in_gaa3(x1, x2, x3)  =  goal_3_in_gaa1(x1)
._22(x1, x2)  =  ._21(x2)
[]_0  =  []_0
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_goal_3_in_1_gaa4(x1, x2, x3, x4)  =  if_goal_3_in_1_gaa1(x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_goal_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_goal_3_in_2_gaa1(x5)
applast_3_in_gaa3(x1, x2, x3)  =  applast_3_in_gaa1(x1)
if_applast_3_in_1_gaa4(x1, x2, x3, x4)  =  if_applast_3_in_1_gaa1(x4)
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_gga1(x5)
if_applast_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_applast_3_in_2_gaa1(x5)
last_2_in_ag2(x1, x2)  =  last_2_in_ag1(x2)
last_2_out_ag2(x1, x2)  =  last_2_out_ag
if_last_2_in_1_ag4(x1, x2, x3, x4)  =  if_last_2_in_1_ag1(x4)
applast_3_out_gaa3(x1, x2, x3)  =  applast_3_out_gaa
goal_3_out_gaa3(x1, x2, x3)  =  goal_3_out_gaa
S2L_2_IN_GA2(x1, x2)  =  S2L_2_IN_GA1(x1)
IF_APPLAST_3_IN_1_GAA4(x1, x2, x3, x4)  =  IF_APPLAST_3_IN_1_GAA1(x4)
IF_GOAL_3_IN_1_GAA4(x1, x2, x3, x4)  =  IF_GOAL_3_IN_1_GAA1(x4)
IF_APPEND_3_IN_1_GGA5(x1, x2, x3, x4, x5)  =  IF_APPEND_3_IN_1_GGA1(x5)
IF_APPLAST_3_IN_2_GAA5(x1, x2, x3, x4, x5)  =  IF_APPLAST_3_IN_2_GAA1(x5)
APPLAST_3_IN_GAA3(x1, x2, x3)  =  APPLAST_3_IN_GAA1(x1)
IF_GOAL_3_IN_2_GAA5(x1, x2, x3, x4, x5)  =  IF_GOAL_3_IN_2_GAA1(x5)
GOAL_3_IN_GAA3(x1, x2, x3)  =  GOAL_3_IN_GAA1(x1)
IF_S2L_2_IN_1_GA4(x1, x2, x3, x4)  =  IF_S2L_2_IN_1_GA1(x4)
IF_LAST_2_IN_1_AG4(x1, x2, x3, x4)  =  IF_LAST_2_IN_1_AG1(x4)
LAST_2_IN_AG2(x1, x2)  =  LAST_2_IN_AG1(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 3 SCCs with 11 less nodes.

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

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

LAST_2_IN_AG2(X, ._22(H, T)) -> LAST_2_IN_AG2(X, T)

The TRS R consists of the following rules:

goal_3_in_gaa3(A, B, C) -> if_goal_3_in_1_gaa4(A, B, C, s2l_2_in_ga2(A, D))
s2l_2_in_ga2(s_11(X), ._22(Y, Xs)) -> if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_in_ga2(X, Xs))
s2l_2_in_ga2(0_0, []_0) -> s2l_2_out_ga2(0_0, []_0)
if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_out_ga2(X, Xs)) -> s2l_2_out_ga2(s_11(X), ._22(Y, Xs))
if_goal_3_in_1_gaa4(A, B, C, s2l_2_out_ga2(A, D)) -> if_goal_3_in_2_gaa5(A, B, C, D, applast_3_in_gaa3(D, B, C))
applast_3_in_gaa3(L, X, Last) -> if_applast_3_in_1_gaa4(L, X, Last, append_3_in_gga3(L, ._22(X, []_0), LX))
append_3_in_gga3([]_0, L, L) -> append_3_out_gga3([]_0, L, L)
append_3_in_gga3(._22(H, L1), L2, ._22(H, L3)) -> if_append_3_in_1_gga5(H, L1, L2, L3, append_3_in_gga3(L1, L2, L3))
if_append_3_in_1_gga5(H, L1, L2, L3, append_3_out_gga3(L1, L2, L3)) -> append_3_out_gga3(._22(H, L1), L2, ._22(H, L3))
if_applast_3_in_1_gaa4(L, X, Last, append_3_out_gga3(L, ._22(X, []_0), LX)) -> if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_in_ag2(Last, LX))
last_2_in_ag2(X, ._22(X, []_0)) -> last_2_out_ag2(X, ._22(X, []_0))
last_2_in_ag2(X, ._22(H, T)) -> if_last_2_in_1_ag4(X, H, T, last_2_in_ag2(X, T))
if_last_2_in_1_ag4(X, H, T, last_2_out_ag2(X, T)) -> last_2_out_ag2(X, ._22(H, T))
if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_out_ag2(Last, LX)) -> applast_3_out_gaa3(L, X, Last)
if_goal_3_in_2_gaa5(A, B, C, D, applast_3_out_gaa3(D, B, C)) -> goal_3_out_gaa3(A, B, C)

The argument filtering Pi contains the following mapping:
goal_3_in_gaa3(x1, x2, x3)  =  goal_3_in_gaa1(x1)
._22(x1, x2)  =  ._21(x2)
[]_0  =  []_0
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_goal_3_in_1_gaa4(x1, x2, x3, x4)  =  if_goal_3_in_1_gaa1(x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_goal_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_goal_3_in_2_gaa1(x5)
applast_3_in_gaa3(x1, x2, x3)  =  applast_3_in_gaa1(x1)
if_applast_3_in_1_gaa4(x1, x2, x3, x4)  =  if_applast_3_in_1_gaa1(x4)
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_gga1(x5)
if_applast_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_applast_3_in_2_gaa1(x5)
last_2_in_ag2(x1, x2)  =  last_2_in_ag1(x2)
last_2_out_ag2(x1, x2)  =  last_2_out_ag
if_last_2_in_1_ag4(x1, x2, x3, x4)  =  if_last_2_in_1_ag1(x4)
applast_3_out_gaa3(x1, x2, x3)  =  applast_3_out_gaa
goal_3_out_gaa3(x1, x2, x3)  =  goal_3_out_gaa
LAST_2_IN_AG2(x1, x2)  =  LAST_2_IN_AG1(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
              ↳ PiDP

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

LAST_2_IN_AG2(X, ._22(H, T)) -> LAST_2_IN_AG2(X, T)

R is empty.
The argument filtering Pi contains the following mapping:
._22(x1, x2)  =  ._21(x2)
LAST_2_IN_AG2(x1, x2)  =  LAST_2_IN_AG1(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
              ↳ PiDP

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

LAST_2_IN_AG1(._21(T)) -> LAST_2_IN_AG1(T)

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

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

APPEND_3_IN_GGA3(._22(H, L1), L2, ._22(H, L3)) -> APPEND_3_IN_GGA3(L1, L2, L3)

The TRS R consists of the following rules:

goal_3_in_gaa3(A, B, C) -> if_goal_3_in_1_gaa4(A, B, C, s2l_2_in_ga2(A, D))
s2l_2_in_ga2(s_11(X), ._22(Y, Xs)) -> if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_in_ga2(X, Xs))
s2l_2_in_ga2(0_0, []_0) -> s2l_2_out_ga2(0_0, []_0)
if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_out_ga2(X, Xs)) -> s2l_2_out_ga2(s_11(X), ._22(Y, Xs))
if_goal_3_in_1_gaa4(A, B, C, s2l_2_out_ga2(A, D)) -> if_goal_3_in_2_gaa5(A, B, C, D, applast_3_in_gaa3(D, B, C))
applast_3_in_gaa3(L, X, Last) -> if_applast_3_in_1_gaa4(L, X, Last, append_3_in_gga3(L, ._22(X, []_0), LX))
append_3_in_gga3([]_0, L, L) -> append_3_out_gga3([]_0, L, L)
append_3_in_gga3(._22(H, L1), L2, ._22(H, L3)) -> if_append_3_in_1_gga5(H, L1, L2, L3, append_3_in_gga3(L1, L2, L3))
if_append_3_in_1_gga5(H, L1, L2, L3, append_3_out_gga3(L1, L2, L3)) -> append_3_out_gga3(._22(H, L1), L2, ._22(H, L3))
if_applast_3_in_1_gaa4(L, X, Last, append_3_out_gga3(L, ._22(X, []_0), LX)) -> if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_in_ag2(Last, LX))
last_2_in_ag2(X, ._22(X, []_0)) -> last_2_out_ag2(X, ._22(X, []_0))
last_2_in_ag2(X, ._22(H, T)) -> if_last_2_in_1_ag4(X, H, T, last_2_in_ag2(X, T))
if_last_2_in_1_ag4(X, H, T, last_2_out_ag2(X, T)) -> last_2_out_ag2(X, ._22(H, T))
if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_out_ag2(Last, LX)) -> applast_3_out_gaa3(L, X, Last)
if_goal_3_in_2_gaa5(A, B, C, D, applast_3_out_gaa3(D, B, C)) -> goal_3_out_gaa3(A, B, C)

The argument filtering Pi contains the following mapping:
goal_3_in_gaa3(x1, x2, x3)  =  goal_3_in_gaa1(x1)
._22(x1, x2)  =  ._21(x2)
[]_0  =  []_0
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_goal_3_in_1_gaa4(x1, x2, x3, x4)  =  if_goal_3_in_1_gaa1(x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_goal_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_goal_3_in_2_gaa1(x5)
applast_3_in_gaa3(x1, x2, x3)  =  applast_3_in_gaa1(x1)
if_applast_3_in_1_gaa4(x1, x2, x3, x4)  =  if_applast_3_in_1_gaa1(x4)
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_gga1(x5)
if_applast_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_applast_3_in_2_gaa1(x5)
last_2_in_ag2(x1, x2)  =  last_2_in_ag1(x2)
last_2_out_ag2(x1, x2)  =  last_2_out_ag
if_last_2_in_1_ag4(x1, x2, x3, x4)  =  if_last_2_in_1_ag1(x4)
applast_3_out_gaa3(x1, x2, x3)  =  applast_3_out_gaa
goal_3_out_gaa3(x1, x2, x3)  =  goal_3_out_gaa
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
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

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

APPEND_3_IN_GGA3(._22(H, L1), L2, ._22(H, L3)) -> APPEND_3_IN_GGA3(L1, L2, L3)

R is empty.
The argument filtering Pi contains the following mapping:
._22(x1, x2)  =  ._21(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
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

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

APPEND_3_IN_GGA2(._21(L1), L2) -> APPEND_3_IN_GGA2(L1, L2)

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
PiDP
                ↳ UsableRulesProof

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

S2L_2_IN_GA2(s_11(X), ._22(Y, Xs)) -> S2L_2_IN_GA2(X, Xs)

The TRS R consists of the following rules:

goal_3_in_gaa3(A, B, C) -> if_goal_3_in_1_gaa4(A, B, C, s2l_2_in_ga2(A, D))
s2l_2_in_ga2(s_11(X), ._22(Y, Xs)) -> if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_in_ga2(X, Xs))
s2l_2_in_ga2(0_0, []_0) -> s2l_2_out_ga2(0_0, []_0)
if_s2l_2_in_1_ga4(X, Y, Xs, s2l_2_out_ga2(X, Xs)) -> s2l_2_out_ga2(s_11(X), ._22(Y, Xs))
if_goal_3_in_1_gaa4(A, B, C, s2l_2_out_ga2(A, D)) -> if_goal_3_in_2_gaa5(A, B, C, D, applast_3_in_gaa3(D, B, C))
applast_3_in_gaa3(L, X, Last) -> if_applast_3_in_1_gaa4(L, X, Last, append_3_in_gga3(L, ._22(X, []_0), LX))
append_3_in_gga3([]_0, L, L) -> append_3_out_gga3([]_0, L, L)
append_3_in_gga3(._22(H, L1), L2, ._22(H, L3)) -> if_append_3_in_1_gga5(H, L1, L2, L3, append_3_in_gga3(L1, L2, L3))
if_append_3_in_1_gga5(H, L1, L2, L3, append_3_out_gga3(L1, L2, L3)) -> append_3_out_gga3(._22(H, L1), L2, ._22(H, L3))
if_applast_3_in_1_gaa4(L, X, Last, append_3_out_gga3(L, ._22(X, []_0), LX)) -> if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_in_ag2(Last, LX))
last_2_in_ag2(X, ._22(X, []_0)) -> last_2_out_ag2(X, ._22(X, []_0))
last_2_in_ag2(X, ._22(H, T)) -> if_last_2_in_1_ag4(X, H, T, last_2_in_ag2(X, T))
if_last_2_in_1_ag4(X, H, T, last_2_out_ag2(X, T)) -> last_2_out_ag2(X, ._22(H, T))
if_applast_3_in_2_gaa5(L, X, Last, LX, last_2_out_ag2(Last, LX)) -> applast_3_out_gaa3(L, X, Last)
if_goal_3_in_2_gaa5(A, B, C, D, applast_3_out_gaa3(D, B, C)) -> goal_3_out_gaa3(A, B, C)

The argument filtering Pi contains the following mapping:
goal_3_in_gaa3(x1, x2, x3)  =  goal_3_in_gaa1(x1)
._22(x1, x2)  =  ._21(x2)
[]_0  =  []_0
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_goal_3_in_1_gaa4(x1, x2, x3, x4)  =  if_goal_3_in_1_gaa1(x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_goal_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_goal_3_in_2_gaa1(x5)
applast_3_in_gaa3(x1, x2, x3)  =  applast_3_in_gaa1(x1)
if_applast_3_in_1_gaa4(x1, x2, x3, x4)  =  if_applast_3_in_1_gaa1(x4)
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_gga1(x5)
if_applast_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_applast_3_in_2_gaa1(x5)
last_2_in_ag2(x1, x2)  =  last_2_in_ag1(x2)
last_2_out_ag2(x1, x2)  =  last_2_out_ag
if_last_2_in_1_ag4(x1, x2, x3, x4)  =  if_last_2_in_1_ag1(x4)
applast_3_out_gaa3(x1, x2, x3)  =  applast_3_out_gaa
goal_3_out_gaa3(x1, x2, x3)  =  goal_3_out_gaa
S2L_2_IN_GA2(x1, x2)  =  S2L_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
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

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

S2L_2_IN_GA2(s_11(X), ._22(Y, Xs)) -> S2L_2_IN_GA2(X, Xs)

R is empty.
The argument filtering Pi contains the following mapping:
._22(x1, x2)  =  ._21(x2)
s_11(x1)  =  s_11(x1)
S2L_2_IN_GA2(x1, x2)  =  S2L_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
  ↳ 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:

S2L_2_IN_GA1(s_11(X)) -> S2L_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 {S2L_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: