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



PROLOG
  ↳ PrologToPiTRSProof

shanoi5(s1(00), A, B, C, .2(mv2(A, C), {}0)).
shanoi5(s12 (X), A, B, C, M) :- eq2(N1, s1(X)), shanoi5(N1, A, C, B, M1), shanoi5(N1, B, A, C, M2), append3(M1, .2(mv2(A, C), {}0), T), append3(T, M2, M).
append3({}0, L, L).
append3(.2(H, L), L1, .2(H, R)) :- append3(L, L1, R).
eq2(X, X).


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


shanoi_5_in_gggga5(s_11(0_0), A, B, C, ._22(mv_22(A, C), []_0)) -> shanoi_5_out_gggga5(s_11(0_0), A, B, C, ._22(mv_22(A, C), []_0))
shanoi_5_in_gggga5(s_11(s_11(X)), A, B, C, M) -> if_shanoi_5_in_1_gggga6(X, A, B, C, M, eq_2_in_ag2(N1, s_11(X)))
eq_2_in_ag2(X, X) -> eq_2_out_ag2(X, X)
if_shanoi_5_in_1_gggga6(X, A, B, C, M, eq_2_out_ag2(N1, s_11(X))) -> if_shanoi_5_in_2_gggga7(X, A, B, C, M, N1, shanoi_5_in_gggga5(N1, A, C, B, M1))
if_shanoi_5_in_2_gggga7(X, A, B, C, M, N1, shanoi_5_out_gggga5(N1, A, C, B, M1)) -> if_shanoi_5_in_3_gggga8(X, A, B, C, M, N1, M1, shanoi_5_in_gggga5(N1, B, A, C, M2))
if_shanoi_5_in_3_gggga8(X, A, B, C, M, N1, M1, shanoi_5_out_gggga5(N1, B, A, C, M2)) -> if_shanoi_5_in_4_gggga8(X, A, B, C, M, M1, M2, append_3_in_gga3(M1, ._22(mv_22(A, C), []_0), T))
append_3_in_gga3([]_0, L, L) -> append_3_out_gga3([]_0, L, L)
append_3_in_gga3(._22(H, L), L1, ._22(H, R)) -> if_append_3_in_1_gga5(H, L, L1, R, append_3_in_gga3(L, L1, R))
if_append_3_in_1_gga5(H, L, L1, R, append_3_out_gga3(L, L1, R)) -> append_3_out_gga3(._22(H, L), L1, ._22(H, R))
if_shanoi_5_in_4_gggga8(X, A, B, C, M, M1, M2, append_3_out_gga3(M1, ._22(mv_22(A, C), []_0), T)) -> if_shanoi_5_in_5_gggga8(X, A, B, C, M, M2, T, append_3_in_gga3(T, M2, M))
if_shanoi_5_in_5_gggga8(X, A, B, C, M, M2, T, append_3_out_gga3(T, M2, M)) -> shanoi_5_out_gggga5(s_11(s_11(X)), A, B, C, M)

The argument filtering Pi contains the following mapping:
shanoi_5_in_gggga5(x1, x2, x3, x4, x5)  =  shanoi_5_in_gggga4(x1, x2, x3, x4)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
._22(x1, x2)  =  ._22(x1, x2)
mv_22(x1, x2)  =  mv_22(x1, x2)
[]_0  =  []_0
shanoi_5_out_gggga5(x1, x2, x3, x4, x5)  =  shanoi_5_out_gggga1(x5)
if_shanoi_5_in_1_gggga6(x1, x2, x3, x4, x5, x6)  =  if_shanoi_5_in_1_gggga4(x2, x3, x4, x6)
eq_2_in_ag2(x1, x2)  =  eq_2_in_ag1(x2)
eq_2_out_ag2(x1, x2)  =  eq_2_out_ag1(x1)
if_shanoi_5_in_2_gggga7(x1, x2, x3, x4, x5, x6, x7)  =  if_shanoi_5_in_2_gggga5(x2, x3, x4, x6, x7)
if_shanoi_5_in_3_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_3_gggga4(x2, x4, x7, x8)
if_shanoi_5_in_4_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_4_gggga2(x7, x8)
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_shanoi_5_in_5_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_5_gggga1(x8)

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:

shanoi_5_in_gggga5(s_11(0_0), A, B, C, ._22(mv_22(A, C), []_0)) -> shanoi_5_out_gggga5(s_11(0_0), A, B, C, ._22(mv_22(A, C), []_0))
shanoi_5_in_gggga5(s_11(s_11(X)), A, B, C, M) -> if_shanoi_5_in_1_gggga6(X, A, B, C, M, eq_2_in_ag2(N1, s_11(X)))
eq_2_in_ag2(X, X) -> eq_2_out_ag2(X, X)
if_shanoi_5_in_1_gggga6(X, A, B, C, M, eq_2_out_ag2(N1, s_11(X))) -> if_shanoi_5_in_2_gggga7(X, A, B, C, M, N1, shanoi_5_in_gggga5(N1, A, C, B, M1))
if_shanoi_5_in_2_gggga7(X, A, B, C, M, N1, shanoi_5_out_gggga5(N1, A, C, B, M1)) -> if_shanoi_5_in_3_gggga8(X, A, B, C, M, N1, M1, shanoi_5_in_gggga5(N1, B, A, C, M2))
if_shanoi_5_in_3_gggga8(X, A, B, C, M, N1, M1, shanoi_5_out_gggga5(N1, B, A, C, M2)) -> if_shanoi_5_in_4_gggga8(X, A, B, C, M, M1, M2, append_3_in_gga3(M1, ._22(mv_22(A, C), []_0), T))
append_3_in_gga3([]_0, L, L) -> append_3_out_gga3([]_0, L, L)
append_3_in_gga3(._22(H, L), L1, ._22(H, R)) -> if_append_3_in_1_gga5(H, L, L1, R, append_3_in_gga3(L, L1, R))
if_append_3_in_1_gga5(H, L, L1, R, append_3_out_gga3(L, L1, R)) -> append_3_out_gga3(._22(H, L), L1, ._22(H, R))
if_shanoi_5_in_4_gggga8(X, A, B, C, M, M1, M2, append_3_out_gga3(M1, ._22(mv_22(A, C), []_0), T)) -> if_shanoi_5_in_5_gggga8(X, A, B, C, M, M2, T, append_3_in_gga3(T, M2, M))
if_shanoi_5_in_5_gggga8(X, A, B, C, M, M2, T, append_3_out_gga3(T, M2, M)) -> shanoi_5_out_gggga5(s_11(s_11(X)), A, B, C, M)

The argument filtering Pi contains the following mapping:
shanoi_5_in_gggga5(x1, x2, x3, x4, x5)  =  shanoi_5_in_gggga4(x1, x2, x3, x4)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
._22(x1, x2)  =  ._22(x1, x2)
mv_22(x1, x2)  =  mv_22(x1, x2)
[]_0  =  []_0
shanoi_5_out_gggga5(x1, x2, x3, x4, x5)  =  shanoi_5_out_gggga1(x5)
if_shanoi_5_in_1_gggga6(x1, x2, x3, x4, x5, x6)  =  if_shanoi_5_in_1_gggga4(x2, x3, x4, x6)
eq_2_in_ag2(x1, x2)  =  eq_2_in_ag1(x2)
eq_2_out_ag2(x1, x2)  =  eq_2_out_ag1(x1)
if_shanoi_5_in_2_gggga7(x1, x2, x3, x4, x5, x6, x7)  =  if_shanoi_5_in_2_gggga5(x2, x3, x4, x6, x7)
if_shanoi_5_in_3_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_3_gggga4(x2, x4, x7, x8)
if_shanoi_5_in_4_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_4_gggga2(x7, x8)
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_shanoi_5_in_5_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_5_gggga1(x8)


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

SHANOI_5_IN_GGGGA5(s_11(s_11(X)), A, B, C, M) -> IF_SHANOI_5_IN_1_GGGGA6(X, A, B, C, M, eq_2_in_ag2(N1, s_11(X)))
SHANOI_5_IN_GGGGA5(s_11(s_11(X)), A, B, C, M) -> EQ_2_IN_AG2(N1, s_11(X))
IF_SHANOI_5_IN_1_GGGGA6(X, A, B, C, M, eq_2_out_ag2(N1, s_11(X))) -> IF_SHANOI_5_IN_2_GGGGA7(X, A, B, C, M, N1, shanoi_5_in_gggga5(N1, A, C, B, M1))
IF_SHANOI_5_IN_1_GGGGA6(X, A, B, C, M, eq_2_out_ag2(N1, s_11(X))) -> SHANOI_5_IN_GGGGA5(N1, A, C, B, M1)
IF_SHANOI_5_IN_2_GGGGA7(X, A, B, C, M, N1, shanoi_5_out_gggga5(N1, A, C, B, M1)) -> IF_SHANOI_5_IN_3_GGGGA8(X, A, B, C, M, N1, M1, shanoi_5_in_gggga5(N1, B, A, C, M2))
IF_SHANOI_5_IN_2_GGGGA7(X, A, B, C, M, N1, shanoi_5_out_gggga5(N1, A, C, B, M1)) -> SHANOI_5_IN_GGGGA5(N1, B, A, C, M2)
IF_SHANOI_5_IN_3_GGGGA8(X, A, B, C, M, N1, M1, shanoi_5_out_gggga5(N1, B, A, C, M2)) -> IF_SHANOI_5_IN_4_GGGGA8(X, A, B, C, M, M1, M2, append_3_in_gga3(M1, ._22(mv_22(A, C), []_0), T))
IF_SHANOI_5_IN_3_GGGGA8(X, A, B, C, M, N1, M1, shanoi_5_out_gggga5(N1, B, A, C, M2)) -> APPEND_3_IN_GGA3(M1, ._22(mv_22(A, C), []_0), T)
APPEND_3_IN_GGA3(._22(H, L), L1, ._22(H, R)) -> IF_APPEND_3_IN_1_GGA5(H, L, L1, R, append_3_in_gga3(L, L1, R))
APPEND_3_IN_GGA3(._22(H, L), L1, ._22(H, R)) -> APPEND_3_IN_GGA3(L, L1, R)
IF_SHANOI_5_IN_4_GGGGA8(X, A, B, C, M, M1, M2, append_3_out_gga3(M1, ._22(mv_22(A, C), []_0), T)) -> IF_SHANOI_5_IN_5_GGGGA8(X, A, B, C, M, M2, T, append_3_in_gga3(T, M2, M))
IF_SHANOI_5_IN_4_GGGGA8(X, A, B, C, M, M1, M2, append_3_out_gga3(M1, ._22(mv_22(A, C), []_0), T)) -> APPEND_3_IN_GGA3(T, M2, M)

The TRS R consists of the following rules:

shanoi_5_in_gggga5(s_11(0_0), A, B, C, ._22(mv_22(A, C), []_0)) -> shanoi_5_out_gggga5(s_11(0_0), A, B, C, ._22(mv_22(A, C), []_0))
shanoi_5_in_gggga5(s_11(s_11(X)), A, B, C, M) -> if_shanoi_5_in_1_gggga6(X, A, B, C, M, eq_2_in_ag2(N1, s_11(X)))
eq_2_in_ag2(X, X) -> eq_2_out_ag2(X, X)
if_shanoi_5_in_1_gggga6(X, A, B, C, M, eq_2_out_ag2(N1, s_11(X))) -> if_shanoi_5_in_2_gggga7(X, A, B, C, M, N1, shanoi_5_in_gggga5(N1, A, C, B, M1))
if_shanoi_5_in_2_gggga7(X, A, B, C, M, N1, shanoi_5_out_gggga5(N1, A, C, B, M1)) -> if_shanoi_5_in_3_gggga8(X, A, B, C, M, N1, M1, shanoi_5_in_gggga5(N1, B, A, C, M2))
if_shanoi_5_in_3_gggga8(X, A, B, C, M, N1, M1, shanoi_5_out_gggga5(N1, B, A, C, M2)) -> if_shanoi_5_in_4_gggga8(X, A, B, C, M, M1, M2, append_3_in_gga3(M1, ._22(mv_22(A, C), []_0), T))
append_3_in_gga3([]_0, L, L) -> append_3_out_gga3([]_0, L, L)
append_3_in_gga3(._22(H, L), L1, ._22(H, R)) -> if_append_3_in_1_gga5(H, L, L1, R, append_3_in_gga3(L, L1, R))
if_append_3_in_1_gga5(H, L, L1, R, append_3_out_gga3(L, L1, R)) -> append_3_out_gga3(._22(H, L), L1, ._22(H, R))
if_shanoi_5_in_4_gggga8(X, A, B, C, M, M1, M2, append_3_out_gga3(M1, ._22(mv_22(A, C), []_0), T)) -> if_shanoi_5_in_5_gggga8(X, A, B, C, M, M2, T, append_3_in_gga3(T, M2, M))
if_shanoi_5_in_5_gggga8(X, A, B, C, M, M2, T, append_3_out_gga3(T, M2, M)) -> shanoi_5_out_gggga5(s_11(s_11(X)), A, B, C, M)

The argument filtering Pi contains the following mapping:
shanoi_5_in_gggga5(x1, x2, x3, x4, x5)  =  shanoi_5_in_gggga4(x1, x2, x3, x4)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
._22(x1, x2)  =  ._22(x1, x2)
mv_22(x1, x2)  =  mv_22(x1, x2)
[]_0  =  []_0
shanoi_5_out_gggga5(x1, x2, x3, x4, x5)  =  shanoi_5_out_gggga1(x5)
if_shanoi_5_in_1_gggga6(x1, x2, x3, x4, x5, x6)  =  if_shanoi_5_in_1_gggga4(x2, x3, x4, x6)
eq_2_in_ag2(x1, x2)  =  eq_2_in_ag1(x2)
eq_2_out_ag2(x1, x2)  =  eq_2_out_ag1(x1)
if_shanoi_5_in_2_gggga7(x1, x2, x3, x4, x5, x6, x7)  =  if_shanoi_5_in_2_gggga5(x2, x3, x4, x6, x7)
if_shanoi_5_in_3_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_3_gggga4(x2, x4, x7, x8)
if_shanoi_5_in_4_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_4_gggga2(x7, x8)
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_shanoi_5_in_5_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_5_gggga1(x8)
IF_SHANOI_5_IN_3_GGGGA8(x1, x2, x3, x4, x5, x6, x7, x8)  =  IF_SHANOI_5_IN_3_GGGGA4(x2, x4, x7, x8)
IF_APPEND_3_IN_1_GGA5(x1, x2, x3, x4, x5)  =  IF_APPEND_3_IN_1_GGA2(x1, x5)
EQ_2_IN_AG2(x1, x2)  =  EQ_2_IN_AG1(x2)
SHANOI_5_IN_GGGGA5(x1, x2, x3, x4, x5)  =  SHANOI_5_IN_GGGGA4(x1, x2, x3, x4)
IF_SHANOI_5_IN_5_GGGGA8(x1, x2, x3, x4, x5, x6, x7, x8)  =  IF_SHANOI_5_IN_5_GGGGA1(x8)
IF_SHANOI_5_IN_1_GGGGA6(x1, x2, x3, x4, x5, x6)  =  IF_SHANOI_5_IN_1_GGGGA4(x2, x3, x4, x6)
IF_SHANOI_5_IN_4_GGGGA8(x1, x2, x3, x4, x5, x6, x7, x8)  =  IF_SHANOI_5_IN_4_GGGGA2(x7, x8)
IF_SHANOI_5_IN_2_GGGGA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SHANOI_5_IN_2_GGGGA5(x2, x3, x4, x6, x7)
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:

SHANOI_5_IN_GGGGA5(s_11(s_11(X)), A, B, C, M) -> IF_SHANOI_5_IN_1_GGGGA6(X, A, B, C, M, eq_2_in_ag2(N1, s_11(X)))
SHANOI_5_IN_GGGGA5(s_11(s_11(X)), A, B, C, M) -> EQ_2_IN_AG2(N1, s_11(X))
IF_SHANOI_5_IN_1_GGGGA6(X, A, B, C, M, eq_2_out_ag2(N1, s_11(X))) -> IF_SHANOI_5_IN_2_GGGGA7(X, A, B, C, M, N1, shanoi_5_in_gggga5(N1, A, C, B, M1))
IF_SHANOI_5_IN_1_GGGGA6(X, A, B, C, M, eq_2_out_ag2(N1, s_11(X))) -> SHANOI_5_IN_GGGGA5(N1, A, C, B, M1)
IF_SHANOI_5_IN_2_GGGGA7(X, A, B, C, M, N1, shanoi_5_out_gggga5(N1, A, C, B, M1)) -> IF_SHANOI_5_IN_3_GGGGA8(X, A, B, C, M, N1, M1, shanoi_5_in_gggga5(N1, B, A, C, M2))
IF_SHANOI_5_IN_2_GGGGA7(X, A, B, C, M, N1, shanoi_5_out_gggga5(N1, A, C, B, M1)) -> SHANOI_5_IN_GGGGA5(N1, B, A, C, M2)
IF_SHANOI_5_IN_3_GGGGA8(X, A, B, C, M, N1, M1, shanoi_5_out_gggga5(N1, B, A, C, M2)) -> IF_SHANOI_5_IN_4_GGGGA8(X, A, B, C, M, M1, M2, append_3_in_gga3(M1, ._22(mv_22(A, C), []_0), T))
IF_SHANOI_5_IN_3_GGGGA8(X, A, B, C, M, N1, M1, shanoi_5_out_gggga5(N1, B, A, C, M2)) -> APPEND_3_IN_GGA3(M1, ._22(mv_22(A, C), []_0), T)
APPEND_3_IN_GGA3(._22(H, L), L1, ._22(H, R)) -> IF_APPEND_3_IN_1_GGA5(H, L, L1, R, append_3_in_gga3(L, L1, R))
APPEND_3_IN_GGA3(._22(H, L), L1, ._22(H, R)) -> APPEND_3_IN_GGA3(L, L1, R)
IF_SHANOI_5_IN_4_GGGGA8(X, A, B, C, M, M1, M2, append_3_out_gga3(M1, ._22(mv_22(A, C), []_0), T)) -> IF_SHANOI_5_IN_5_GGGGA8(X, A, B, C, M, M2, T, append_3_in_gga3(T, M2, M))
IF_SHANOI_5_IN_4_GGGGA8(X, A, B, C, M, M1, M2, append_3_out_gga3(M1, ._22(mv_22(A, C), []_0), T)) -> APPEND_3_IN_GGA3(T, M2, M)

The TRS R consists of the following rules:

shanoi_5_in_gggga5(s_11(0_0), A, B, C, ._22(mv_22(A, C), []_0)) -> shanoi_5_out_gggga5(s_11(0_0), A, B, C, ._22(mv_22(A, C), []_0))
shanoi_5_in_gggga5(s_11(s_11(X)), A, B, C, M) -> if_shanoi_5_in_1_gggga6(X, A, B, C, M, eq_2_in_ag2(N1, s_11(X)))
eq_2_in_ag2(X, X) -> eq_2_out_ag2(X, X)
if_shanoi_5_in_1_gggga6(X, A, B, C, M, eq_2_out_ag2(N1, s_11(X))) -> if_shanoi_5_in_2_gggga7(X, A, B, C, M, N1, shanoi_5_in_gggga5(N1, A, C, B, M1))
if_shanoi_5_in_2_gggga7(X, A, B, C, M, N1, shanoi_5_out_gggga5(N1, A, C, B, M1)) -> if_shanoi_5_in_3_gggga8(X, A, B, C, M, N1, M1, shanoi_5_in_gggga5(N1, B, A, C, M2))
if_shanoi_5_in_3_gggga8(X, A, B, C, M, N1, M1, shanoi_5_out_gggga5(N1, B, A, C, M2)) -> if_shanoi_5_in_4_gggga8(X, A, B, C, M, M1, M2, append_3_in_gga3(M1, ._22(mv_22(A, C), []_0), T))
append_3_in_gga3([]_0, L, L) -> append_3_out_gga3([]_0, L, L)
append_3_in_gga3(._22(H, L), L1, ._22(H, R)) -> if_append_3_in_1_gga5(H, L, L1, R, append_3_in_gga3(L, L1, R))
if_append_3_in_1_gga5(H, L, L1, R, append_3_out_gga3(L, L1, R)) -> append_3_out_gga3(._22(H, L), L1, ._22(H, R))
if_shanoi_5_in_4_gggga8(X, A, B, C, M, M1, M2, append_3_out_gga3(M1, ._22(mv_22(A, C), []_0), T)) -> if_shanoi_5_in_5_gggga8(X, A, B, C, M, M2, T, append_3_in_gga3(T, M2, M))
if_shanoi_5_in_5_gggga8(X, A, B, C, M, M2, T, append_3_out_gga3(T, M2, M)) -> shanoi_5_out_gggga5(s_11(s_11(X)), A, B, C, M)

The argument filtering Pi contains the following mapping:
shanoi_5_in_gggga5(x1, x2, x3, x4, x5)  =  shanoi_5_in_gggga4(x1, x2, x3, x4)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
._22(x1, x2)  =  ._22(x1, x2)
mv_22(x1, x2)  =  mv_22(x1, x2)
[]_0  =  []_0
shanoi_5_out_gggga5(x1, x2, x3, x4, x5)  =  shanoi_5_out_gggga1(x5)
if_shanoi_5_in_1_gggga6(x1, x2, x3, x4, x5, x6)  =  if_shanoi_5_in_1_gggga4(x2, x3, x4, x6)
eq_2_in_ag2(x1, x2)  =  eq_2_in_ag1(x2)
eq_2_out_ag2(x1, x2)  =  eq_2_out_ag1(x1)
if_shanoi_5_in_2_gggga7(x1, x2, x3, x4, x5, x6, x7)  =  if_shanoi_5_in_2_gggga5(x2, x3, x4, x6, x7)
if_shanoi_5_in_3_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_3_gggga4(x2, x4, x7, x8)
if_shanoi_5_in_4_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_4_gggga2(x7, x8)
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_shanoi_5_in_5_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_5_gggga1(x8)
IF_SHANOI_5_IN_3_GGGGA8(x1, x2, x3, x4, x5, x6, x7, x8)  =  IF_SHANOI_5_IN_3_GGGGA4(x2, x4, x7, x8)
IF_APPEND_3_IN_1_GGA5(x1, x2, x3, x4, x5)  =  IF_APPEND_3_IN_1_GGA2(x1, x5)
EQ_2_IN_AG2(x1, x2)  =  EQ_2_IN_AG1(x2)
SHANOI_5_IN_GGGGA5(x1, x2, x3, x4, x5)  =  SHANOI_5_IN_GGGGA4(x1, x2, x3, x4)
IF_SHANOI_5_IN_5_GGGGA8(x1, x2, x3, x4, x5, x6, x7, x8)  =  IF_SHANOI_5_IN_5_GGGGA1(x8)
IF_SHANOI_5_IN_1_GGGGA6(x1, x2, x3, x4, x5, x6)  =  IF_SHANOI_5_IN_1_GGGGA4(x2, x3, x4, x6)
IF_SHANOI_5_IN_4_GGGGA8(x1, x2, x3, x4, x5, x6, x7, x8)  =  IF_SHANOI_5_IN_4_GGGGA2(x7, x8)
IF_SHANOI_5_IN_2_GGGGA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SHANOI_5_IN_2_GGGGA5(x2, x3, x4, x6, x7)
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 7 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(._22(H, L), L1, ._22(H, R)) -> APPEND_3_IN_GGA3(L, L1, R)

The TRS R consists of the following rules:

shanoi_5_in_gggga5(s_11(0_0), A, B, C, ._22(mv_22(A, C), []_0)) -> shanoi_5_out_gggga5(s_11(0_0), A, B, C, ._22(mv_22(A, C), []_0))
shanoi_5_in_gggga5(s_11(s_11(X)), A, B, C, M) -> if_shanoi_5_in_1_gggga6(X, A, B, C, M, eq_2_in_ag2(N1, s_11(X)))
eq_2_in_ag2(X, X) -> eq_2_out_ag2(X, X)
if_shanoi_5_in_1_gggga6(X, A, B, C, M, eq_2_out_ag2(N1, s_11(X))) -> if_shanoi_5_in_2_gggga7(X, A, B, C, M, N1, shanoi_5_in_gggga5(N1, A, C, B, M1))
if_shanoi_5_in_2_gggga7(X, A, B, C, M, N1, shanoi_5_out_gggga5(N1, A, C, B, M1)) -> if_shanoi_5_in_3_gggga8(X, A, B, C, M, N1, M1, shanoi_5_in_gggga5(N1, B, A, C, M2))
if_shanoi_5_in_3_gggga8(X, A, B, C, M, N1, M1, shanoi_5_out_gggga5(N1, B, A, C, M2)) -> if_shanoi_5_in_4_gggga8(X, A, B, C, M, M1, M2, append_3_in_gga3(M1, ._22(mv_22(A, C), []_0), T))
append_3_in_gga3([]_0, L, L) -> append_3_out_gga3([]_0, L, L)
append_3_in_gga3(._22(H, L), L1, ._22(H, R)) -> if_append_3_in_1_gga5(H, L, L1, R, append_3_in_gga3(L, L1, R))
if_append_3_in_1_gga5(H, L, L1, R, append_3_out_gga3(L, L1, R)) -> append_3_out_gga3(._22(H, L), L1, ._22(H, R))
if_shanoi_5_in_4_gggga8(X, A, B, C, M, M1, M2, append_3_out_gga3(M1, ._22(mv_22(A, C), []_0), T)) -> if_shanoi_5_in_5_gggga8(X, A, B, C, M, M2, T, append_3_in_gga3(T, M2, M))
if_shanoi_5_in_5_gggga8(X, A, B, C, M, M2, T, append_3_out_gga3(T, M2, M)) -> shanoi_5_out_gggga5(s_11(s_11(X)), A, B, C, M)

The argument filtering Pi contains the following mapping:
shanoi_5_in_gggga5(x1, x2, x3, x4, x5)  =  shanoi_5_in_gggga4(x1, x2, x3, x4)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
._22(x1, x2)  =  ._22(x1, x2)
mv_22(x1, x2)  =  mv_22(x1, x2)
[]_0  =  []_0
shanoi_5_out_gggga5(x1, x2, x3, x4, x5)  =  shanoi_5_out_gggga1(x5)
if_shanoi_5_in_1_gggga6(x1, x2, x3, x4, x5, x6)  =  if_shanoi_5_in_1_gggga4(x2, x3, x4, x6)
eq_2_in_ag2(x1, x2)  =  eq_2_in_ag1(x2)
eq_2_out_ag2(x1, x2)  =  eq_2_out_ag1(x1)
if_shanoi_5_in_2_gggga7(x1, x2, x3, x4, x5, x6, x7)  =  if_shanoi_5_in_2_gggga5(x2, x3, x4, x6, x7)
if_shanoi_5_in_3_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_3_gggga4(x2, x4, x7, x8)
if_shanoi_5_in_4_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_4_gggga2(x7, x8)
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_shanoi_5_in_5_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_5_gggga1(x8)
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(._22(H, L), L1, ._22(H, R)) -> APPEND_3_IN_GGA3(L, L1, R)

R is empty.
The argument filtering Pi contains the following mapping:
._22(x1, x2)  =  ._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(._22(H, L), L1) -> APPEND_3_IN_GGA2(L, L1)

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
                ↳ PiDPToQDPProof

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

SHANOI_5_IN_GGGGA5(s_11(s_11(X)), A, B, C, M) -> IF_SHANOI_5_IN_1_GGGGA6(X, A, B, C, M, eq_2_in_ag2(N1, s_11(X)))
IF_SHANOI_5_IN_2_GGGGA7(X, A, B, C, M, N1, shanoi_5_out_gggga5(N1, A, C, B, M1)) -> SHANOI_5_IN_GGGGA5(N1, B, A, C, M2)
IF_SHANOI_5_IN_1_GGGGA6(X, A, B, C, M, eq_2_out_ag2(N1, s_11(X))) -> IF_SHANOI_5_IN_2_GGGGA7(X, A, B, C, M, N1, shanoi_5_in_gggga5(N1, A, C, B, M1))
IF_SHANOI_5_IN_1_GGGGA6(X, A, B, C, M, eq_2_out_ag2(N1, s_11(X))) -> SHANOI_5_IN_GGGGA5(N1, A, C, B, M1)

The TRS R consists of the following rules:

shanoi_5_in_gggga5(s_11(0_0), A, B, C, ._22(mv_22(A, C), []_0)) -> shanoi_5_out_gggga5(s_11(0_0), A, B, C, ._22(mv_22(A, C), []_0))
shanoi_5_in_gggga5(s_11(s_11(X)), A, B, C, M) -> if_shanoi_5_in_1_gggga6(X, A, B, C, M, eq_2_in_ag2(N1, s_11(X)))
eq_2_in_ag2(X, X) -> eq_2_out_ag2(X, X)
if_shanoi_5_in_1_gggga6(X, A, B, C, M, eq_2_out_ag2(N1, s_11(X))) -> if_shanoi_5_in_2_gggga7(X, A, B, C, M, N1, shanoi_5_in_gggga5(N1, A, C, B, M1))
if_shanoi_5_in_2_gggga7(X, A, B, C, M, N1, shanoi_5_out_gggga5(N1, A, C, B, M1)) -> if_shanoi_5_in_3_gggga8(X, A, B, C, M, N1, M1, shanoi_5_in_gggga5(N1, B, A, C, M2))
if_shanoi_5_in_3_gggga8(X, A, B, C, M, N1, M1, shanoi_5_out_gggga5(N1, B, A, C, M2)) -> if_shanoi_5_in_4_gggga8(X, A, B, C, M, M1, M2, append_3_in_gga3(M1, ._22(mv_22(A, C), []_0), T))
append_3_in_gga3([]_0, L, L) -> append_3_out_gga3([]_0, L, L)
append_3_in_gga3(._22(H, L), L1, ._22(H, R)) -> if_append_3_in_1_gga5(H, L, L1, R, append_3_in_gga3(L, L1, R))
if_append_3_in_1_gga5(H, L, L1, R, append_3_out_gga3(L, L1, R)) -> append_3_out_gga3(._22(H, L), L1, ._22(H, R))
if_shanoi_5_in_4_gggga8(X, A, B, C, M, M1, M2, append_3_out_gga3(M1, ._22(mv_22(A, C), []_0), T)) -> if_shanoi_5_in_5_gggga8(X, A, B, C, M, M2, T, append_3_in_gga3(T, M2, M))
if_shanoi_5_in_5_gggga8(X, A, B, C, M, M2, T, append_3_out_gga3(T, M2, M)) -> shanoi_5_out_gggga5(s_11(s_11(X)), A, B, C, M)

The argument filtering Pi contains the following mapping:
shanoi_5_in_gggga5(x1, x2, x3, x4, x5)  =  shanoi_5_in_gggga4(x1, x2, x3, x4)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
._22(x1, x2)  =  ._22(x1, x2)
mv_22(x1, x2)  =  mv_22(x1, x2)
[]_0  =  []_0
shanoi_5_out_gggga5(x1, x2, x3, x4, x5)  =  shanoi_5_out_gggga1(x5)
if_shanoi_5_in_1_gggga6(x1, x2, x3, x4, x5, x6)  =  if_shanoi_5_in_1_gggga4(x2, x3, x4, x6)
eq_2_in_ag2(x1, x2)  =  eq_2_in_ag1(x2)
eq_2_out_ag2(x1, x2)  =  eq_2_out_ag1(x1)
if_shanoi_5_in_2_gggga7(x1, x2, x3, x4, x5, x6, x7)  =  if_shanoi_5_in_2_gggga5(x2, x3, x4, x6, x7)
if_shanoi_5_in_3_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_3_gggga4(x2, x4, x7, x8)
if_shanoi_5_in_4_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_4_gggga2(x7, x8)
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_shanoi_5_in_5_gggga8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_shanoi_5_in_5_gggga1(x8)
SHANOI_5_IN_GGGGA5(x1, x2, x3, x4, x5)  =  SHANOI_5_IN_GGGGA4(x1, x2, x3, x4)
IF_SHANOI_5_IN_1_GGGGA6(x1, x2, x3, x4, x5, x6)  =  IF_SHANOI_5_IN_1_GGGGA4(x2, x3, x4, x6)
IF_SHANOI_5_IN_2_GGGGA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SHANOI_5_IN_2_GGGGA5(x2, x3, x4, x6, x7)

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
                ↳ PiDPToQDPProof
QDP
                    ↳ QDPPoloProof

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

SHANOI_5_IN_GGGGA4(s_11(s_11(X)), A, B, C) -> IF_SHANOI_5_IN_1_GGGGA4(A, B, C, eq_2_in_ag1(s_11(X)))
IF_SHANOI_5_IN_2_GGGGA5(A, B, C, N1, shanoi_5_out_gggga1(M1)) -> SHANOI_5_IN_GGGGA4(N1, B, A, C)
IF_SHANOI_5_IN_1_GGGGA4(A, B, C, eq_2_out_ag1(N1)) -> IF_SHANOI_5_IN_2_GGGGA5(A, B, C, N1, shanoi_5_in_gggga4(N1, A, C, B))
IF_SHANOI_5_IN_1_GGGGA4(A, B, C, eq_2_out_ag1(N1)) -> SHANOI_5_IN_GGGGA4(N1, A, C, B)

The TRS R consists of the following rules:

shanoi_5_in_gggga4(s_11(0_0), A, B, C) -> shanoi_5_out_gggga1(._22(mv_22(A, C), []_0))
shanoi_5_in_gggga4(s_11(s_11(X)), A, B, C) -> if_shanoi_5_in_1_gggga4(A, B, C, eq_2_in_ag1(s_11(X)))
eq_2_in_ag1(X) -> eq_2_out_ag1(X)
if_shanoi_5_in_1_gggga4(A, B, C, eq_2_out_ag1(N1)) -> if_shanoi_5_in_2_gggga5(A, B, C, N1, shanoi_5_in_gggga4(N1, A, C, B))
if_shanoi_5_in_2_gggga5(A, B, C, N1, shanoi_5_out_gggga1(M1)) -> if_shanoi_5_in_3_gggga4(A, C, M1, shanoi_5_in_gggga4(N1, B, A, C))
if_shanoi_5_in_3_gggga4(A, C, M1, shanoi_5_out_gggga1(M2)) -> if_shanoi_5_in_4_gggga2(M2, append_3_in_gga2(M1, ._22(mv_22(A, C), []_0)))
append_3_in_gga2([]_0, L) -> append_3_out_gga1(L)
append_3_in_gga2(._22(H, L), L1) -> if_append_3_in_1_gga2(H, append_3_in_gga2(L, L1))
if_append_3_in_1_gga2(H, append_3_out_gga1(R)) -> append_3_out_gga1(._22(H, R))
if_shanoi_5_in_4_gggga2(M2, append_3_out_gga1(T)) -> if_shanoi_5_in_5_gggga1(append_3_in_gga2(T, M2))
if_shanoi_5_in_5_gggga1(append_3_out_gga1(M)) -> shanoi_5_out_gggga1(M)

The set Q consists of the following terms:

shanoi_5_in_gggga4(x0, x1, x2, x3)
eq_2_in_ag1(x0)
if_shanoi_5_in_1_gggga4(x0, x1, x2, x3)
if_shanoi_5_in_2_gggga5(x0, x1, x2, x3, x4)
if_shanoi_5_in_3_gggga4(x0, x1, x2, x3)
append_3_in_gga2(x0, x1)
if_append_3_in_1_gga2(x0, x1)
if_shanoi_5_in_4_gggga2(x0, x1)
if_shanoi_5_in_5_gggga1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {IF_SHANOI_5_IN_1_GGGGA4, SHANOI_5_IN_GGGGA4, IF_SHANOI_5_IN_2_GGGGA5}.
By using a polynomial ordering, the following set of Dependency Pairs of this DP problem can be strictly oriented.

SHANOI_5_IN_GGGGA4(s_11(s_11(X)), A, B, C) -> IF_SHANOI_5_IN_1_GGGGA4(A, B, C, eq_2_in_ag1(s_11(X)))
The remaining Dependency Pairs were at least non-strictly be oriented.

IF_SHANOI_5_IN_2_GGGGA5(A, B, C, N1, shanoi_5_out_gggga1(M1)) -> SHANOI_5_IN_GGGGA4(N1, B, A, C)
IF_SHANOI_5_IN_1_GGGGA4(A, B, C, eq_2_out_ag1(N1)) -> IF_SHANOI_5_IN_2_GGGGA5(A, B, C, N1, shanoi_5_in_gggga4(N1, A, C, B))
IF_SHANOI_5_IN_1_GGGGA4(A, B, C, eq_2_out_ag1(N1)) -> SHANOI_5_IN_GGGGA4(N1, A, C, B)
With the implicit AFS we had to orient the following set of usable rules non-strictly.

eq_2_in_ag1(X) -> eq_2_out_ag1(X)
Used ordering: POLO with Polynomial interpretation:

POL(append_3_out_gga1(x1)) = 0   
POL(0_0) = 0   
POL(eq_2_in_ag1(x1)) = x1   
POL(if_append_3_in_1_gga2(x1, x2)) = 0   
POL(SHANOI_5_IN_GGGGA4(x1, x2, x3, x4)) = x1   
POL(shanoi_5_out_gggga1(x1)) = 0   
POL(eq_2_out_ag1(x1)) = x1   
POL(if_shanoi_5_in_4_gggga2(x1, x2)) = 0   
POL([]_0) = 0   
POL(if_shanoi_5_in_1_gggga4(x1, x2, x3, x4)) = 0   
POL(if_shanoi_5_in_2_gggga5(x1, x2, x3, x4, x5)) = 0   
POL(if_shanoi_5_in_5_gggga1(x1)) = 0   
POL(._22(x1, x2)) = 0   
POL(IF_SHANOI_5_IN_2_GGGGA5(x1, x2, x3, x4, x5)) = x4   
POL(if_shanoi_5_in_3_gggga4(x1, x2, x3, x4)) = 0   
POL(IF_SHANOI_5_IN_1_GGGGA4(x1, x2, x3, x4)) = x4   
POL(shanoi_5_in_gggga4(x1, x2, x3, x4)) = 0   
POL(s_11(x1)) = 1 + x1   
POL(append_3_in_gga2(x1, x2)) = 0   
POL(mv_22(x1, x2)) = 0   



↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ PiDPToQDPProof
                  ↳ QDP
                    ↳ QDPPoloProof
QDP
                        ↳ DependencyGraphProof

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

IF_SHANOI_5_IN_2_GGGGA5(A, B, C, N1, shanoi_5_out_gggga1(M1)) -> SHANOI_5_IN_GGGGA4(N1, B, A, C)
IF_SHANOI_5_IN_1_GGGGA4(A, B, C, eq_2_out_ag1(N1)) -> IF_SHANOI_5_IN_2_GGGGA5(A, B, C, N1, shanoi_5_in_gggga4(N1, A, C, B))
IF_SHANOI_5_IN_1_GGGGA4(A, B, C, eq_2_out_ag1(N1)) -> SHANOI_5_IN_GGGGA4(N1, A, C, B)

The TRS R consists of the following rules:

shanoi_5_in_gggga4(s_11(0_0), A, B, C) -> shanoi_5_out_gggga1(._22(mv_22(A, C), []_0))
shanoi_5_in_gggga4(s_11(s_11(X)), A, B, C) -> if_shanoi_5_in_1_gggga4(A, B, C, eq_2_in_ag1(s_11(X)))
eq_2_in_ag1(X) -> eq_2_out_ag1(X)
if_shanoi_5_in_1_gggga4(A, B, C, eq_2_out_ag1(N1)) -> if_shanoi_5_in_2_gggga5(A, B, C, N1, shanoi_5_in_gggga4(N1, A, C, B))
if_shanoi_5_in_2_gggga5(A, B, C, N1, shanoi_5_out_gggga1(M1)) -> if_shanoi_5_in_3_gggga4(A, C, M1, shanoi_5_in_gggga4(N1, B, A, C))
if_shanoi_5_in_3_gggga4(A, C, M1, shanoi_5_out_gggga1(M2)) -> if_shanoi_5_in_4_gggga2(M2, append_3_in_gga2(M1, ._22(mv_22(A, C), []_0)))
append_3_in_gga2([]_0, L) -> append_3_out_gga1(L)
append_3_in_gga2(._22(H, L), L1) -> if_append_3_in_1_gga2(H, append_3_in_gga2(L, L1))
if_append_3_in_1_gga2(H, append_3_out_gga1(R)) -> append_3_out_gga1(._22(H, R))
if_shanoi_5_in_4_gggga2(M2, append_3_out_gga1(T)) -> if_shanoi_5_in_5_gggga1(append_3_in_gga2(T, M2))
if_shanoi_5_in_5_gggga1(append_3_out_gga1(M)) -> shanoi_5_out_gggga1(M)

The set Q consists of the following terms:

shanoi_5_in_gggga4(x0, x1, x2, x3)
eq_2_in_ag1(x0)
if_shanoi_5_in_1_gggga4(x0, x1, x2, x3)
if_shanoi_5_in_2_gggga5(x0, x1, x2, x3, x4)
if_shanoi_5_in_3_gggga4(x0, x1, x2, x3)
append_3_in_gga2(x0, x1)
if_append_3_in_1_gga2(x0, x1)
if_shanoi_5_in_4_gggga2(x0, x1)
if_shanoi_5_in_5_gggga1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {SHANOI_5_IN_GGGGA4, IF_SHANOI_5_IN_2_GGGGA5, IF_SHANOI_5_IN_1_GGGGA4}.
The approximation of the Dependency Graph contains 0 SCCs with 3 less nodes.