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



PROLOG
  ↳ PrologToPiTRSProof

sort2(X, Y) :- perm2(X, Y), sorted1(Y).
sorted1({}0).
sorted1(.2(X, {}0)).
sorted1(.2(X, .2(Y, Z))) :- le2(X, Y), sorted1(.2(Y, Z)).
perm2({}0, {}0).
perm2(.2(X, .2(Y, {}0)), .2(U, .2(V, {}0))) :- delete3(U, .2(X, Y), Z), perm2(Z, V).
delete3(X, .2(X, Y), Y).
delete3(X, .2(Y, Z), W) :- delete3(X, Z, W).
le2(s1(X), s1(Y)) :- le2(X, Y).
le2(00, s1(X)).
le2(00, 00).


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


sort_2_in_ga2(X, Y) -> if_sort_2_in_1_ga3(X, Y, perm_2_in_ga2(X, Y))
perm_2_in_ga2([]_0, []_0) -> perm_2_out_ga2([]_0, []_0)
perm_2_in_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> if_perm_2_in_1_ga5(X, Y, U, V, delete_3_in_aga3(U, ._22(X, Y), Z))
delete_3_in_aga3(X, ._22(X, Y), Y) -> delete_3_out_aga3(X, ._22(X, Y), Y)
delete_3_in_aga3(X, ._22(Y, Z), W) -> if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_in_aga3(X, Z, W))
if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_out_aga3(X, Z, W)) -> delete_3_out_aga3(X, ._22(Y, Z), W)
if_perm_2_in_1_ga5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_in_ga2(Z, V))
if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_out_ga2(Z, V)) -> perm_2_out_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0)))
if_sort_2_in_1_ga3(X, Y, perm_2_out_ga2(X, Y)) -> if_sort_2_in_2_ga3(X, Y, sorted_1_in_g1(Y))
sorted_1_in_g1([]_0) -> sorted_1_out_g1([]_0)
sorted_1_in_g1(._22(X, []_0)) -> sorted_1_out_g1(._22(X, []_0))
sorted_1_in_g1(._22(X, ._22(Y, Z))) -> if_sorted_1_in_1_g4(X, Y, Z, le_2_in_gg2(X, Y))
le_2_in_gg2(s_11(X), s_11(Y)) -> if_le_2_in_1_gg3(X, Y, le_2_in_gg2(X, Y))
le_2_in_gg2(0_0, s_11(X)) -> le_2_out_gg2(0_0, s_11(X))
le_2_in_gg2(0_0, 0_0) -> le_2_out_gg2(0_0, 0_0)
if_le_2_in_1_gg3(X, Y, le_2_out_gg2(X, Y)) -> le_2_out_gg2(s_11(X), s_11(Y))
if_sorted_1_in_1_g4(X, Y, Z, le_2_out_gg2(X, Y)) -> if_sorted_1_in_2_g4(X, Y, Z, sorted_1_in_g1(._22(Y, Z)))
if_sorted_1_in_2_g4(X, Y, Z, sorted_1_out_g1(._22(Y, Z))) -> sorted_1_out_g1(._22(X, ._22(Y, Z)))
if_sort_2_in_2_ga3(X, Y, sorted_1_out_g1(Y)) -> sort_2_out_ga2(X, Y)

The argument filtering Pi contains the following mapping:
sort_2_in_ga2(x1, x2)  =  sort_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_sort_2_in_1_ga3(x1, x2, x3)  =  if_sort_2_in_1_ga1(x3)
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_1_ga1(x5)
delete_3_in_aga3(x1, x2, x3)  =  delete_3_in_aga1(x2)
delete_3_out_aga3(x1, x2, x3)  =  delete_3_out_aga2(x1, x3)
if_delete_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_delete_3_in_1_aga1(x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x3, x6)
if_sort_2_in_2_ga3(x1, x2, x3)  =  if_sort_2_in_2_ga2(x2, x3)
sorted_1_in_g1(x1)  =  sorted_1_in_g1(x1)
sorted_1_out_g1(x1)  =  sorted_1_out_g
if_sorted_1_in_1_g4(x1, x2, x3, x4)  =  if_sorted_1_in_1_g3(x2, x3, x4)
le_2_in_gg2(x1, x2)  =  le_2_in_gg2(x1, x2)
if_le_2_in_1_gg3(x1, x2, x3)  =  if_le_2_in_1_gg1(x3)
le_2_out_gg2(x1, x2)  =  le_2_out_gg
if_sorted_1_in_2_g4(x1, x2, x3, x4)  =  if_sorted_1_in_2_g1(x4)
sort_2_out_ga2(x1, x2)  =  sort_2_out_ga1(x2)

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:

sort_2_in_ga2(X, Y) -> if_sort_2_in_1_ga3(X, Y, perm_2_in_ga2(X, Y))
perm_2_in_ga2([]_0, []_0) -> perm_2_out_ga2([]_0, []_0)
perm_2_in_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> if_perm_2_in_1_ga5(X, Y, U, V, delete_3_in_aga3(U, ._22(X, Y), Z))
delete_3_in_aga3(X, ._22(X, Y), Y) -> delete_3_out_aga3(X, ._22(X, Y), Y)
delete_3_in_aga3(X, ._22(Y, Z), W) -> if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_in_aga3(X, Z, W))
if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_out_aga3(X, Z, W)) -> delete_3_out_aga3(X, ._22(Y, Z), W)
if_perm_2_in_1_ga5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_in_ga2(Z, V))
if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_out_ga2(Z, V)) -> perm_2_out_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0)))
if_sort_2_in_1_ga3(X, Y, perm_2_out_ga2(X, Y)) -> if_sort_2_in_2_ga3(X, Y, sorted_1_in_g1(Y))
sorted_1_in_g1([]_0) -> sorted_1_out_g1([]_0)
sorted_1_in_g1(._22(X, []_0)) -> sorted_1_out_g1(._22(X, []_0))
sorted_1_in_g1(._22(X, ._22(Y, Z))) -> if_sorted_1_in_1_g4(X, Y, Z, le_2_in_gg2(X, Y))
le_2_in_gg2(s_11(X), s_11(Y)) -> if_le_2_in_1_gg3(X, Y, le_2_in_gg2(X, Y))
le_2_in_gg2(0_0, s_11(X)) -> le_2_out_gg2(0_0, s_11(X))
le_2_in_gg2(0_0, 0_0) -> le_2_out_gg2(0_0, 0_0)
if_le_2_in_1_gg3(X, Y, le_2_out_gg2(X, Y)) -> le_2_out_gg2(s_11(X), s_11(Y))
if_sorted_1_in_1_g4(X, Y, Z, le_2_out_gg2(X, Y)) -> if_sorted_1_in_2_g4(X, Y, Z, sorted_1_in_g1(._22(Y, Z)))
if_sorted_1_in_2_g4(X, Y, Z, sorted_1_out_g1(._22(Y, Z))) -> sorted_1_out_g1(._22(X, ._22(Y, Z)))
if_sort_2_in_2_ga3(X, Y, sorted_1_out_g1(Y)) -> sort_2_out_ga2(X, Y)

The argument filtering Pi contains the following mapping:
sort_2_in_ga2(x1, x2)  =  sort_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_sort_2_in_1_ga3(x1, x2, x3)  =  if_sort_2_in_1_ga1(x3)
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_1_ga1(x5)
delete_3_in_aga3(x1, x2, x3)  =  delete_3_in_aga1(x2)
delete_3_out_aga3(x1, x2, x3)  =  delete_3_out_aga2(x1, x3)
if_delete_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_delete_3_in_1_aga1(x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x3, x6)
if_sort_2_in_2_ga3(x1, x2, x3)  =  if_sort_2_in_2_ga2(x2, x3)
sorted_1_in_g1(x1)  =  sorted_1_in_g1(x1)
sorted_1_out_g1(x1)  =  sorted_1_out_g
if_sorted_1_in_1_g4(x1, x2, x3, x4)  =  if_sorted_1_in_1_g3(x2, x3, x4)
le_2_in_gg2(x1, x2)  =  le_2_in_gg2(x1, x2)
if_le_2_in_1_gg3(x1, x2, x3)  =  if_le_2_in_1_gg1(x3)
le_2_out_gg2(x1, x2)  =  le_2_out_gg
if_sorted_1_in_2_g4(x1, x2, x3, x4)  =  if_sorted_1_in_2_g1(x4)
sort_2_out_ga2(x1, x2)  =  sort_2_out_ga1(x2)


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

SORT_2_IN_GA2(X, Y) -> IF_SORT_2_IN_1_GA3(X, Y, perm_2_in_ga2(X, Y))
SORT_2_IN_GA2(X, Y) -> PERM_2_IN_GA2(X, Y)
PERM_2_IN_GA2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> IF_PERM_2_IN_1_GA5(X, Y, U, V, delete_3_in_aga3(U, ._22(X, Y), Z))
PERM_2_IN_GA2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> DELETE_3_IN_AGA3(U, ._22(X, Y), Z)
DELETE_3_IN_AGA3(X, ._22(Y, Z), W) -> IF_DELETE_3_IN_1_AGA5(X, Y, Z, W, delete_3_in_aga3(X, Z, W))
DELETE_3_IN_AGA3(X, ._22(Y, Z), W) -> DELETE_3_IN_AGA3(X, Z, W)
IF_PERM_2_IN_1_GA5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> IF_PERM_2_IN_2_GA6(X, Y, U, V, Z, perm_2_in_ga2(Z, V))
IF_PERM_2_IN_1_GA5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> PERM_2_IN_GA2(Z, V)
IF_SORT_2_IN_1_GA3(X, Y, perm_2_out_ga2(X, Y)) -> IF_SORT_2_IN_2_GA3(X, Y, sorted_1_in_g1(Y))
IF_SORT_2_IN_1_GA3(X, Y, perm_2_out_ga2(X, Y)) -> SORTED_1_IN_G1(Y)
SORTED_1_IN_G1(._22(X, ._22(Y, Z))) -> IF_SORTED_1_IN_1_G4(X, Y, Z, le_2_in_gg2(X, Y))
SORTED_1_IN_G1(._22(X, ._22(Y, Z))) -> LE_2_IN_GG2(X, Y)
LE_2_IN_GG2(s_11(X), s_11(Y)) -> IF_LE_2_IN_1_GG3(X, Y, le_2_in_gg2(X, Y))
LE_2_IN_GG2(s_11(X), s_11(Y)) -> LE_2_IN_GG2(X, Y)
IF_SORTED_1_IN_1_G4(X, Y, Z, le_2_out_gg2(X, Y)) -> IF_SORTED_1_IN_2_G4(X, Y, Z, sorted_1_in_g1(._22(Y, Z)))
IF_SORTED_1_IN_1_G4(X, Y, Z, le_2_out_gg2(X, Y)) -> SORTED_1_IN_G1(._22(Y, Z))

The TRS R consists of the following rules:

sort_2_in_ga2(X, Y) -> if_sort_2_in_1_ga3(X, Y, perm_2_in_ga2(X, Y))
perm_2_in_ga2([]_0, []_0) -> perm_2_out_ga2([]_0, []_0)
perm_2_in_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> if_perm_2_in_1_ga5(X, Y, U, V, delete_3_in_aga3(U, ._22(X, Y), Z))
delete_3_in_aga3(X, ._22(X, Y), Y) -> delete_3_out_aga3(X, ._22(X, Y), Y)
delete_3_in_aga3(X, ._22(Y, Z), W) -> if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_in_aga3(X, Z, W))
if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_out_aga3(X, Z, W)) -> delete_3_out_aga3(X, ._22(Y, Z), W)
if_perm_2_in_1_ga5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_in_ga2(Z, V))
if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_out_ga2(Z, V)) -> perm_2_out_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0)))
if_sort_2_in_1_ga3(X, Y, perm_2_out_ga2(X, Y)) -> if_sort_2_in_2_ga3(X, Y, sorted_1_in_g1(Y))
sorted_1_in_g1([]_0) -> sorted_1_out_g1([]_0)
sorted_1_in_g1(._22(X, []_0)) -> sorted_1_out_g1(._22(X, []_0))
sorted_1_in_g1(._22(X, ._22(Y, Z))) -> if_sorted_1_in_1_g4(X, Y, Z, le_2_in_gg2(X, Y))
le_2_in_gg2(s_11(X), s_11(Y)) -> if_le_2_in_1_gg3(X, Y, le_2_in_gg2(X, Y))
le_2_in_gg2(0_0, s_11(X)) -> le_2_out_gg2(0_0, s_11(X))
le_2_in_gg2(0_0, 0_0) -> le_2_out_gg2(0_0, 0_0)
if_le_2_in_1_gg3(X, Y, le_2_out_gg2(X, Y)) -> le_2_out_gg2(s_11(X), s_11(Y))
if_sorted_1_in_1_g4(X, Y, Z, le_2_out_gg2(X, Y)) -> if_sorted_1_in_2_g4(X, Y, Z, sorted_1_in_g1(._22(Y, Z)))
if_sorted_1_in_2_g4(X, Y, Z, sorted_1_out_g1(._22(Y, Z))) -> sorted_1_out_g1(._22(X, ._22(Y, Z)))
if_sort_2_in_2_ga3(X, Y, sorted_1_out_g1(Y)) -> sort_2_out_ga2(X, Y)

The argument filtering Pi contains the following mapping:
sort_2_in_ga2(x1, x2)  =  sort_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_sort_2_in_1_ga3(x1, x2, x3)  =  if_sort_2_in_1_ga1(x3)
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_1_ga1(x5)
delete_3_in_aga3(x1, x2, x3)  =  delete_3_in_aga1(x2)
delete_3_out_aga3(x1, x2, x3)  =  delete_3_out_aga2(x1, x3)
if_delete_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_delete_3_in_1_aga1(x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x3, x6)
if_sort_2_in_2_ga3(x1, x2, x3)  =  if_sort_2_in_2_ga2(x2, x3)
sorted_1_in_g1(x1)  =  sorted_1_in_g1(x1)
sorted_1_out_g1(x1)  =  sorted_1_out_g
if_sorted_1_in_1_g4(x1, x2, x3, x4)  =  if_sorted_1_in_1_g3(x2, x3, x4)
le_2_in_gg2(x1, x2)  =  le_2_in_gg2(x1, x2)
if_le_2_in_1_gg3(x1, x2, x3)  =  if_le_2_in_1_gg1(x3)
le_2_out_gg2(x1, x2)  =  le_2_out_gg
if_sorted_1_in_2_g4(x1, x2, x3, x4)  =  if_sorted_1_in_2_g1(x4)
sort_2_out_ga2(x1, x2)  =  sort_2_out_ga1(x2)
IF_SORTED_1_IN_2_G4(x1, x2, x3, x4)  =  IF_SORTED_1_IN_2_G1(x4)
SORT_2_IN_GA2(x1, x2)  =  SORT_2_IN_GA1(x1)
IF_DELETE_3_IN_1_AGA5(x1, x2, x3, x4, x5)  =  IF_DELETE_3_IN_1_AGA1(x5)
IF_SORT_2_IN_1_GA3(x1, x2, x3)  =  IF_SORT_2_IN_1_GA1(x3)
PERM_2_IN_GA2(x1, x2)  =  PERM_2_IN_GA1(x1)
IF_PERM_2_IN_1_GA5(x1, x2, x3, x4, x5)  =  IF_PERM_2_IN_1_GA1(x5)
SORTED_1_IN_G1(x1)  =  SORTED_1_IN_G1(x1)
IF_SORT_2_IN_2_GA3(x1, x2, x3)  =  IF_SORT_2_IN_2_GA2(x2, x3)
IF_LE_2_IN_1_GG3(x1, x2, x3)  =  IF_LE_2_IN_1_GG1(x3)
DELETE_3_IN_AGA3(x1, x2, x3)  =  DELETE_3_IN_AGA1(x2)
LE_2_IN_GG2(x1, x2)  =  LE_2_IN_GG2(x1, x2)
IF_SORTED_1_IN_1_G4(x1, x2, x3, x4)  =  IF_SORTED_1_IN_1_G3(x2, x3, x4)
IF_PERM_2_IN_2_GA6(x1, x2, x3, x4, x5, x6)  =  IF_PERM_2_IN_2_GA2(x3, x6)

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:

SORT_2_IN_GA2(X, Y) -> IF_SORT_2_IN_1_GA3(X, Y, perm_2_in_ga2(X, Y))
SORT_2_IN_GA2(X, Y) -> PERM_2_IN_GA2(X, Y)
PERM_2_IN_GA2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> IF_PERM_2_IN_1_GA5(X, Y, U, V, delete_3_in_aga3(U, ._22(X, Y), Z))
PERM_2_IN_GA2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> DELETE_3_IN_AGA3(U, ._22(X, Y), Z)
DELETE_3_IN_AGA3(X, ._22(Y, Z), W) -> IF_DELETE_3_IN_1_AGA5(X, Y, Z, W, delete_3_in_aga3(X, Z, W))
DELETE_3_IN_AGA3(X, ._22(Y, Z), W) -> DELETE_3_IN_AGA3(X, Z, W)
IF_PERM_2_IN_1_GA5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> IF_PERM_2_IN_2_GA6(X, Y, U, V, Z, perm_2_in_ga2(Z, V))
IF_PERM_2_IN_1_GA5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> PERM_2_IN_GA2(Z, V)
IF_SORT_2_IN_1_GA3(X, Y, perm_2_out_ga2(X, Y)) -> IF_SORT_2_IN_2_GA3(X, Y, sorted_1_in_g1(Y))
IF_SORT_2_IN_1_GA3(X, Y, perm_2_out_ga2(X, Y)) -> SORTED_1_IN_G1(Y)
SORTED_1_IN_G1(._22(X, ._22(Y, Z))) -> IF_SORTED_1_IN_1_G4(X, Y, Z, le_2_in_gg2(X, Y))
SORTED_1_IN_G1(._22(X, ._22(Y, Z))) -> LE_2_IN_GG2(X, Y)
LE_2_IN_GG2(s_11(X), s_11(Y)) -> IF_LE_2_IN_1_GG3(X, Y, le_2_in_gg2(X, Y))
LE_2_IN_GG2(s_11(X), s_11(Y)) -> LE_2_IN_GG2(X, Y)
IF_SORTED_1_IN_1_G4(X, Y, Z, le_2_out_gg2(X, Y)) -> IF_SORTED_1_IN_2_G4(X, Y, Z, sorted_1_in_g1(._22(Y, Z)))
IF_SORTED_1_IN_1_G4(X, Y, Z, le_2_out_gg2(X, Y)) -> SORTED_1_IN_G1(._22(Y, Z))

The TRS R consists of the following rules:

sort_2_in_ga2(X, Y) -> if_sort_2_in_1_ga3(X, Y, perm_2_in_ga2(X, Y))
perm_2_in_ga2([]_0, []_0) -> perm_2_out_ga2([]_0, []_0)
perm_2_in_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> if_perm_2_in_1_ga5(X, Y, U, V, delete_3_in_aga3(U, ._22(X, Y), Z))
delete_3_in_aga3(X, ._22(X, Y), Y) -> delete_3_out_aga3(X, ._22(X, Y), Y)
delete_3_in_aga3(X, ._22(Y, Z), W) -> if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_in_aga3(X, Z, W))
if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_out_aga3(X, Z, W)) -> delete_3_out_aga3(X, ._22(Y, Z), W)
if_perm_2_in_1_ga5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_in_ga2(Z, V))
if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_out_ga2(Z, V)) -> perm_2_out_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0)))
if_sort_2_in_1_ga3(X, Y, perm_2_out_ga2(X, Y)) -> if_sort_2_in_2_ga3(X, Y, sorted_1_in_g1(Y))
sorted_1_in_g1([]_0) -> sorted_1_out_g1([]_0)
sorted_1_in_g1(._22(X, []_0)) -> sorted_1_out_g1(._22(X, []_0))
sorted_1_in_g1(._22(X, ._22(Y, Z))) -> if_sorted_1_in_1_g4(X, Y, Z, le_2_in_gg2(X, Y))
le_2_in_gg2(s_11(X), s_11(Y)) -> if_le_2_in_1_gg3(X, Y, le_2_in_gg2(X, Y))
le_2_in_gg2(0_0, s_11(X)) -> le_2_out_gg2(0_0, s_11(X))
le_2_in_gg2(0_0, 0_0) -> le_2_out_gg2(0_0, 0_0)
if_le_2_in_1_gg3(X, Y, le_2_out_gg2(X, Y)) -> le_2_out_gg2(s_11(X), s_11(Y))
if_sorted_1_in_1_g4(X, Y, Z, le_2_out_gg2(X, Y)) -> if_sorted_1_in_2_g4(X, Y, Z, sorted_1_in_g1(._22(Y, Z)))
if_sorted_1_in_2_g4(X, Y, Z, sorted_1_out_g1(._22(Y, Z))) -> sorted_1_out_g1(._22(X, ._22(Y, Z)))
if_sort_2_in_2_ga3(X, Y, sorted_1_out_g1(Y)) -> sort_2_out_ga2(X, Y)

The argument filtering Pi contains the following mapping:
sort_2_in_ga2(x1, x2)  =  sort_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_sort_2_in_1_ga3(x1, x2, x3)  =  if_sort_2_in_1_ga1(x3)
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_1_ga1(x5)
delete_3_in_aga3(x1, x2, x3)  =  delete_3_in_aga1(x2)
delete_3_out_aga3(x1, x2, x3)  =  delete_3_out_aga2(x1, x3)
if_delete_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_delete_3_in_1_aga1(x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x3, x6)
if_sort_2_in_2_ga3(x1, x2, x3)  =  if_sort_2_in_2_ga2(x2, x3)
sorted_1_in_g1(x1)  =  sorted_1_in_g1(x1)
sorted_1_out_g1(x1)  =  sorted_1_out_g
if_sorted_1_in_1_g4(x1, x2, x3, x4)  =  if_sorted_1_in_1_g3(x2, x3, x4)
le_2_in_gg2(x1, x2)  =  le_2_in_gg2(x1, x2)
if_le_2_in_1_gg3(x1, x2, x3)  =  if_le_2_in_1_gg1(x3)
le_2_out_gg2(x1, x2)  =  le_2_out_gg
if_sorted_1_in_2_g4(x1, x2, x3, x4)  =  if_sorted_1_in_2_g1(x4)
sort_2_out_ga2(x1, x2)  =  sort_2_out_ga1(x2)
IF_SORTED_1_IN_2_G4(x1, x2, x3, x4)  =  IF_SORTED_1_IN_2_G1(x4)
SORT_2_IN_GA2(x1, x2)  =  SORT_2_IN_GA1(x1)
IF_DELETE_3_IN_1_AGA5(x1, x2, x3, x4, x5)  =  IF_DELETE_3_IN_1_AGA1(x5)
IF_SORT_2_IN_1_GA3(x1, x2, x3)  =  IF_SORT_2_IN_1_GA1(x3)
PERM_2_IN_GA2(x1, x2)  =  PERM_2_IN_GA1(x1)
IF_PERM_2_IN_1_GA5(x1, x2, x3, x4, x5)  =  IF_PERM_2_IN_1_GA1(x5)
SORTED_1_IN_G1(x1)  =  SORTED_1_IN_G1(x1)
IF_SORT_2_IN_2_GA3(x1, x2, x3)  =  IF_SORT_2_IN_2_GA2(x2, x3)
IF_LE_2_IN_1_GG3(x1, x2, x3)  =  IF_LE_2_IN_1_GG1(x3)
DELETE_3_IN_AGA3(x1, x2, x3)  =  DELETE_3_IN_AGA1(x2)
LE_2_IN_GG2(x1, x2)  =  LE_2_IN_GG2(x1, x2)
IF_SORTED_1_IN_1_G4(x1, x2, x3, x4)  =  IF_SORTED_1_IN_1_G3(x2, x3, x4)
IF_PERM_2_IN_2_GA6(x1, x2, x3, x4, x5, x6)  =  IF_PERM_2_IN_2_GA2(x3, x6)

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

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

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

LE_2_IN_GG2(s_11(X), s_11(Y)) -> LE_2_IN_GG2(X, Y)

The TRS R consists of the following rules:

sort_2_in_ga2(X, Y) -> if_sort_2_in_1_ga3(X, Y, perm_2_in_ga2(X, Y))
perm_2_in_ga2([]_0, []_0) -> perm_2_out_ga2([]_0, []_0)
perm_2_in_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> if_perm_2_in_1_ga5(X, Y, U, V, delete_3_in_aga3(U, ._22(X, Y), Z))
delete_3_in_aga3(X, ._22(X, Y), Y) -> delete_3_out_aga3(X, ._22(X, Y), Y)
delete_3_in_aga3(X, ._22(Y, Z), W) -> if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_in_aga3(X, Z, W))
if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_out_aga3(X, Z, W)) -> delete_3_out_aga3(X, ._22(Y, Z), W)
if_perm_2_in_1_ga5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_in_ga2(Z, V))
if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_out_ga2(Z, V)) -> perm_2_out_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0)))
if_sort_2_in_1_ga3(X, Y, perm_2_out_ga2(X, Y)) -> if_sort_2_in_2_ga3(X, Y, sorted_1_in_g1(Y))
sorted_1_in_g1([]_0) -> sorted_1_out_g1([]_0)
sorted_1_in_g1(._22(X, []_0)) -> sorted_1_out_g1(._22(X, []_0))
sorted_1_in_g1(._22(X, ._22(Y, Z))) -> if_sorted_1_in_1_g4(X, Y, Z, le_2_in_gg2(X, Y))
le_2_in_gg2(s_11(X), s_11(Y)) -> if_le_2_in_1_gg3(X, Y, le_2_in_gg2(X, Y))
le_2_in_gg2(0_0, s_11(X)) -> le_2_out_gg2(0_0, s_11(X))
le_2_in_gg2(0_0, 0_0) -> le_2_out_gg2(0_0, 0_0)
if_le_2_in_1_gg3(X, Y, le_2_out_gg2(X, Y)) -> le_2_out_gg2(s_11(X), s_11(Y))
if_sorted_1_in_1_g4(X, Y, Z, le_2_out_gg2(X, Y)) -> if_sorted_1_in_2_g4(X, Y, Z, sorted_1_in_g1(._22(Y, Z)))
if_sorted_1_in_2_g4(X, Y, Z, sorted_1_out_g1(._22(Y, Z))) -> sorted_1_out_g1(._22(X, ._22(Y, Z)))
if_sort_2_in_2_ga3(X, Y, sorted_1_out_g1(Y)) -> sort_2_out_ga2(X, Y)

The argument filtering Pi contains the following mapping:
sort_2_in_ga2(x1, x2)  =  sort_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_sort_2_in_1_ga3(x1, x2, x3)  =  if_sort_2_in_1_ga1(x3)
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_1_ga1(x5)
delete_3_in_aga3(x1, x2, x3)  =  delete_3_in_aga1(x2)
delete_3_out_aga3(x1, x2, x3)  =  delete_3_out_aga2(x1, x3)
if_delete_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_delete_3_in_1_aga1(x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x3, x6)
if_sort_2_in_2_ga3(x1, x2, x3)  =  if_sort_2_in_2_ga2(x2, x3)
sorted_1_in_g1(x1)  =  sorted_1_in_g1(x1)
sorted_1_out_g1(x1)  =  sorted_1_out_g
if_sorted_1_in_1_g4(x1, x2, x3, x4)  =  if_sorted_1_in_1_g3(x2, x3, x4)
le_2_in_gg2(x1, x2)  =  le_2_in_gg2(x1, x2)
if_le_2_in_1_gg3(x1, x2, x3)  =  if_le_2_in_1_gg1(x3)
le_2_out_gg2(x1, x2)  =  le_2_out_gg
if_sorted_1_in_2_g4(x1, x2, x3, x4)  =  if_sorted_1_in_2_g1(x4)
sort_2_out_ga2(x1, x2)  =  sort_2_out_ga1(x2)
LE_2_IN_GG2(x1, x2)  =  LE_2_IN_GG2(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

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

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

LE_2_IN_GG2(s_11(X), s_11(Y)) -> LE_2_IN_GG2(X, Y)

R is empty.
Pi is empty.
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
              ↳ PiDP

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

LE_2_IN_GG2(s_11(X), s_11(Y)) -> LE_2_IN_GG2(X, Y)

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

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

IF_SORTED_1_IN_1_G4(X, Y, Z, le_2_out_gg2(X, Y)) -> SORTED_1_IN_G1(._22(Y, Z))
SORTED_1_IN_G1(._22(X, ._22(Y, Z))) -> IF_SORTED_1_IN_1_G4(X, Y, Z, le_2_in_gg2(X, Y))

The TRS R consists of the following rules:

sort_2_in_ga2(X, Y) -> if_sort_2_in_1_ga3(X, Y, perm_2_in_ga2(X, Y))
perm_2_in_ga2([]_0, []_0) -> perm_2_out_ga2([]_0, []_0)
perm_2_in_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> if_perm_2_in_1_ga5(X, Y, U, V, delete_3_in_aga3(U, ._22(X, Y), Z))
delete_3_in_aga3(X, ._22(X, Y), Y) -> delete_3_out_aga3(X, ._22(X, Y), Y)
delete_3_in_aga3(X, ._22(Y, Z), W) -> if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_in_aga3(X, Z, W))
if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_out_aga3(X, Z, W)) -> delete_3_out_aga3(X, ._22(Y, Z), W)
if_perm_2_in_1_ga5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_in_ga2(Z, V))
if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_out_ga2(Z, V)) -> perm_2_out_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0)))
if_sort_2_in_1_ga3(X, Y, perm_2_out_ga2(X, Y)) -> if_sort_2_in_2_ga3(X, Y, sorted_1_in_g1(Y))
sorted_1_in_g1([]_0) -> sorted_1_out_g1([]_0)
sorted_1_in_g1(._22(X, []_0)) -> sorted_1_out_g1(._22(X, []_0))
sorted_1_in_g1(._22(X, ._22(Y, Z))) -> if_sorted_1_in_1_g4(X, Y, Z, le_2_in_gg2(X, Y))
le_2_in_gg2(s_11(X), s_11(Y)) -> if_le_2_in_1_gg3(X, Y, le_2_in_gg2(X, Y))
le_2_in_gg2(0_0, s_11(X)) -> le_2_out_gg2(0_0, s_11(X))
le_2_in_gg2(0_0, 0_0) -> le_2_out_gg2(0_0, 0_0)
if_le_2_in_1_gg3(X, Y, le_2_out_gg2(X, Y)) -> le_2_out_gg2(s_11(X), s_11(Y))
if_sorted_1_in_1_g4(X, Y, Z, le_2_out_gg2(X, Y)) -> if_sorted_1_in_2_g4(X, Y, Z, sorted_1_in_g1(._22(Y, Z)))
if_sorted_1_in_2_g4(X, Y, Z, sorted_1_out_g1(._22(Y, Z))) -> sorted_1_out_g1(._22(X, ._22(Y, Z)))
if_sort_2_in_2_ga3(X, Y, sorted_1_out_g1(Y)) -> sort_2_out_ga2(X, Y)

The argument filtering Pi contains the following mapping:
sort_2_in_ga2(x1, x2)  =  sort_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_sort_2_in_1_ga3(x1, x2, x3)  =  if_sort_2_in_1_ga1(x3)
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_1_ga1(x5)
delete_3_in_aga3(x1, x2, x3)  =  delete_3_in_aga1(x2)
delete_3_out_aga3(x1, x2, x3)  =  delete_3_out_aga2(x1, x3)
if_delete_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_delete_3_in_1_aga1(x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x3, x6)
if_sort_2_in_2_ga3(x1, x2, x3)  =  if_sort_2_in_2_ga2(x2, x3)
sorted_1_in_g1(x1)  =  sorted_1_in_g1(x1)
sorted_1_out_g1(x1)  =  sorted_1_out_g
if_sorted_1_in_1_g4(x1, x2, x3, x4)  =  if_sorted_1_in_1_g3(x2, x3, x4)
le_2_in_gg2(x1, x2)  =  le_2_in_gg2(x1, x2)
if_le_2_in_1_gg3(x1, x2, x3)  =  if_le_2_in_1_gg1(x3)
le_2_out_gg2(x1, x2)  =  le_2_out_gg
if_sorted_1_in_2_g4(x1, x2, x3, x4)  =  if_sorted_1_in_2_g1(x4)
sort_2_out_ga2(x1, x2)  =  sort_2_out_ga1(x2)
SORTED_1_IN_G1(x1)  =  SORTED_1_IN_G1(x1)
IF_SORTED_1_IN_1_G4(x1, x2, x3, x4)  =  IF_SORTED_1_IN_1_G3(x2, x3, x4)

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

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

IF_SORTED_1_IN_1_G4(X, Y, Z, le_2_out_gg2(X, Y)) -> SORTED_1_IN_G1(._22(Y, Z))
SORTED_1_IN_G1(._22(X, ._22(Y, Z))) -> IF_SORTED_1_IN_1_G4(X, Y, Z, le_2_in_gg2(X, Y))

The TRS R consists of the following rules:

le_2_in_gg2(s_11(X), s_11(Y)) -> if_le_2_in_1_gg3(X, Y, le_2_in_gg2(X, Y))
le_2_in_gg2(0_0, s_11(X)) -> le_2_out_gg2(0_0, s_11(X))
le_2_in_gg2(0_0, 0_0) -> le_2_out_gg2(0_0, 0_0)
if_le_2_in_1_gg3(X, Y, le_2_out_gg2(X, Y)) -> le_2_out_gg2(s_11(X), s_11(Y))

The argument filtering Pi contains the following mapping:
._22(x1, x2)  =  ._22(x1, x2)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
le_2_in_gg2(x1, x2)  =  le_2_in_gg2(x1, x2)
if_le_2_in_1_gg3(x1, x2, x3)  =  if_le_2_in_1_gg1(x3)
le_2_out_gg2(x1, x2)  =  le_2_out_gg
SORTED_1_IN_G1(x1)  =  SORTED_1_IN_G1(x1)
IF_SORTED_1_IN_1_G4(x1, x2, x3, x4)  =  IF_SORTED_1_IN_1_G3(x2, x3, x4)

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

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

IF_SORTED_1_IN_1_G3(Y, Z, le_2_out_gg) -> SORTED_1_IN_G1(._22(Y, Z))
SORTED_1_IN_G1(._22(X, ._22(Y, Z))) -> IF_SORTED_1_IN_1_G3(Y, Z, le_2_in_gg2(X, Y))

The TRS R consists of the following rules:

le_2_in_gg2(s_11(X), s_11(Y)) -> if_le_2_in_1_gg1(le_2_in_gg2(X, Y))
le_2_in_gg2(0_0, s_11(X)) -> le_2_out_gg
le_2_in_gg2(0_0, 0_0) -> le_2_out_gg
if_le_2_in_1_gg1(le_2_out_gg) -> le_2_out_gg

The set Q consists of the following terms:

le_2_in_gg2(x0, x1)
if_le_2_in_1_gg1(x0)

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

SORTED_1_IN_G1(._22(X, ._22(Y, Z))) -> IF_SORTED_1_IN_1_G3(Y, Z, le_2_in_gg2(X, Y))
The remaining Dependency Pairs were at least non-strictly be oriented.

IF_SORTED_1_IN_1_G3(Y, Z, le_2_out_gg) -> SORTED_1_IN_G1(._22(Y, Z))
With the implicit AFS there is no usable rule.

Used ordering: POLO with Polynomial interpretation:


POL(0_0) = 0   
POL(SORTED_1_IN_G1(x1)) = x1   
POL(._22(x1, x2)) = 1 + x2   
POL(le_2_out_gg) = 0   
POL(IF_SORTED_1_IN_1_G3(x1, x2, x3)) = 1 + x2   
POL(le_2_in_gg2(x1, x2)) = 0   
POL(s_11(x1)) = 0   
POL(if_le_2_in_1_gg1(x1)) = 0   



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

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

IF_SORTED_1_IN_1_G3(Y, Z, le_2_out_gg) -> SORTED_1_IN_G1(._22(Y, Z))

The TRS R consists of the following rules:

le_2_in_gg2(s_11(X), s_11(Y)) -> if_le_2_in_1_gg1(le_2_in_gg2(X, Y))
le_2_in_gg2(0_0, s_11(X)) -> le_2_out_gg
le_2_in_gg2(0_0, 0_0) -> le_2_out_gg
if_le_2_in_1_gg1(le_2_out_gg) -> le_2_out_gg

The set Q consists of the following terms:

le_2_in_gg2(x0, x1)
if_le_2_in_1_gg1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {SORTED_1_IN_G1, IF_SORTED_1_IN_1_G3}.
The approximation of the Dependency Graph contains 0 SCCs with 1 less node.

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

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

DELETE_3_IN_AGA3(X, ._22(Y, Z), W) -> DELETE_3_IN_AGA3(X, Z, W)

The TRS R consists of the following rules:

sort_2_in_ga2(X, Y) -> if_sort_2_in_1_ga3(X, Y, perm_2_in_ga2(X, Y))
perm_2_in_ga2([]_0, []_0) -> perm_2_out_ga2([]_0, []_0)
perm_2_in_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> if_perm_2_in_1_ga5(X, Y, U, V, delete_3_in_aga3(U, ._22(X, Y), Z))
delete_3_in_aga3(X, ._22(X, Y), Y) -> delete_3_out_aga3(X, ._22(X, Y), Y)
delete_3_in_aga3(X, ._22(Y, Z), W) -> if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_in_aga3(X, Z, W))
if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_out_aga3(X, Z, W)) -> delete_3_out_aga3(X, ._22(Y, Z), W)
if_perm_2_in_1_ga5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_in_ga2(Z, V))
if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_out_ga2(Z, V)) -> perm_2_out_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0)))
if_sort_2_in_1_ga3(X, Y, perm_2_out_ga2(X, Y)) -> if_sort_2_in_2_ga3(X, Y, sorted_1_in_g1(Y))
sorted_1_in_g1([]_0) -> sorted_1_out_g1([]_0)
sorted_1_in_g1(._22(X, []_0)) -> sorted_1_out_g1(._22(X, []_0))
sorted_1_in_g1(._22(X, ._22(Y, Z))) -> if_sorted_1_in_1_g4(X, Y, Z, le_2_in_gg2(X, Y))
le_2_in_gg2(s_11(X), s_11(Y)) -> if_le_2_in_1_gg3(X, Y, le_2_in_gg2(X, Y))
le_2_in_gg2(0_0, s_11(X)) -> le_2_out_gg2(0_0, s_11(X))
le_2_in_gg2(0_0, 0_0) -> le_2_out_gg2(0_0, 0_0)
if_le_2_in_1_gg3(X, Y, le_2_out_gg2(X, Y)) -> le_2_out_gg2(s_11(X), s_11(Y))
if_sorted_1_in_1_g4(X, Y, Z, le_2_out_gg2(X, Y)) -> if_sorted_1_in_2_g4(X, Y, Z, sorted_1_in_g1(._22(Y, Z)))
if_sorted_1_in_2_g4(X, Y, Z, sorted_1_out_g1(._22(Y, Z))) -> sorted_1_out_g1(._22(X, ._22(Y, Z)))
if_sort_2_in_2_ga3(X, Y, sorted_1_out_g1(Y)) -> sort_2_out_ga2(X, Y)

The argument filtering Pi contains the following mapping:
sort_2_in_ga2(x1, x2)  =  sort_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_sort_2_in_1_ga3(x1, x2, x3)  =  if_sort_2_in_1_ga1(x3)
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_1_ga1(x5)
delete_3_in_aga3(x1, x2, x3)  =  delete_3_in_aga1(x2)
delete_3_out_aga3(x1, x2, x3)  =  delete_3_out_aga2(x1, x3)
if_delete_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_delete_3_in_1_aga1(x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x3, x6)
if_sort_2_in_2_ga3(x1, x2, x3)  =  if_sort_2_in_2_ga2(x2, x3)
sorted_1_in_g1(x1)  =  sorted_1_in_g1(x1)
sorted_1_out_g1(x1)  =  sorted_1_out_g
if_sorted_1_in_1_g4(x1, x2, x3, x4)  =  if_sorted_1_in_1_g3(x2, x3, x4)
le_2_in_gg2(x1, x2)  =  le_2_in_gg2(x1, x2)
if_le_2_in_1_gg3(x1, x2, x3)  =  if_le_2_in_1_gg1(x3)
le_2_out_gg2(x1, x2)  =  le_2_out_gg
if_sorted_1_in_2_g4(x1, x2, x3, x4)  =  if_sorted_1_in_2_g1(x4)
sort_2_out_ga2(x1, x2)  =  sort_2_out_ga1(x2)
DELETE_3_IN_AGA3(x1, x2, x3)  =  DELETE_3_IN_AGA1(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
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

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

DELETE_3_IN_AGA3(X, ._22(Y, Z), W) -> DELETE_3_IN_AGA3(X, Z, W)

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

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

DELETE_3_IN_AGA1(._22(Y, Z)) -> DELETE_3_IN_AGA1(Z)

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

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

IF_PERM_2_IN_1_GA5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> PERM_2_IN_GA2(Z, V)
PERM_2_IN_GA2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> IF_PERM_2_IN_1_GA5(X, Y, U, V, delete_3_in_aga3(U, ._22(X, Y), Z))

The TRS R consists of the following rules:

sort_2_in_ga2(X, Y) -> if_sort_2_in_1_ga3(X, Y, perm_2_in_ga2(X, Y))
perm_2_in_ga2([]_0, []_0) -> perm_2_out_ga2([]_0, []_0)
perm_2_in_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> if_perm_2_in_1_ga5(X, Y, U, V, delete_3_in_aga3(U, ._22(X, Y), Z))
delete_3_in_aga3(X, ._22(X, Y), Y) -> delete_3_out_aga3(X, ._22(X, Y), Y)
delete_3_in_aga3(X, ._22(Y, Z), W) -> if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_in_aga3(X, Z, W))
if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_out_aga3(X, Z, W)) -> delete_3_out_aga3(X, ._22(Y, Z), W)
if_perm_2_in_1_ga5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_in_ga2(Z, V))
if_perm_2_in_2_ga6(X, Y, U, V, Z, perm_2_out_ga2(Z, V)) -> perm_2_out_ga2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0)))
if_sort_2_in_1_ga3(X, Y, perm_2_out_ga2(X, Y)) -> if_sort_2_in_2_ga3(X, Y, sorted_1_in_g1(Y))
sorted_1_in_g1([]_0) -> sorted_1_out_g1([]_0)
sorted_1_in_g1(._22(X, []_0)) -> sorted_1_out_g1(._22(X, []_0))
sorted_1_in_g1(._22(X, ._22(Y, Z))) -> if_sorted_1_in_1_g4(X, Y, Z, le_2_in_gg2(X, Y))
le_2_in_gg2(s_11(X), s_11(Y)) -> if_le_2_in_1_gg3(X, Y, le_2_in_gg2(X, Y))
le_2_in_gg2(0_0, s_11(X)) -> le_2_out_gg2(0_0, s_11(X))
le_2_in_gg2(0_0, 0_0) -> le_2_out_gg2(0_0, 0_0)
if_le_2_in_1_gg3(X, Y, le_2_out_gg2(X, Y)) -> le_2_out_gg2(s_11(X), s_11(Y))
if_sorted_1_in_1_g4(X, Y, Z, le_2_out_gg2(X, Y)) -> if_sorted_1_in_2_g4(X, Y, Z, sorted_1_in_g1(._22(Y, Z)))
if_sorted_1_in_2_g4(X, Y, Z, sorted_1_out_g1(._22(Y, Z))) -> sorted_1_out_g1(._22(X, ._22(Y, Z)))
if_sort_2_in_2_ga3(X, Y, sorted_1_out_g1(Y)) -> sort_2_out_ga2(X, Y)

The argument filtering Pi contains the following mapping:
sort_2_in_ga2(x1, x2)  =  sort_2_in_ga1(x1)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
s_11(x1)  =  s_11(x1)
0_0  =  0_0
if_sort_2_in_1_ga3(x1, x2, x3)  =  if_sort_2_in_1_ga1(x3)
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_1_ga1(x5)
delete_3_in_aga3(x1, x2, x3)  =  delete_3_in_aga1(x2)
delete_3_out_aga3(x1, x2, x3)  =  delete_3_out_aga2(x1, x3)
if_delete_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_delete_3_in_1_aga1(x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x3, x6)
if_sort_2_in_2_ga3(x1, x2, x3)  =  if_sort_2_in_2_ga2(x2, x3)
sorted_1_in_g1(x1)  =  sorted_1_in_g1(x1)
sorted_1_out_g1(x1)  =  sorted_1_out_g
if_sorted_1_in_1_g4(x1, x2, x3, x4)  =  if_sorted_1_in_1_g3(x2, x3, x4)
le_2_in_gg2(x1, x2)  =  le_2_in_gg2(x1, x2)
if_le_2_in_1_gg3(x1, x2, x3)  =  if_le_2_in_1_gg1(x3)
le_2_out_gg2(x1, x2)  =  le_2_out_gg
if_sorted_1_in_2_g4(x1, x2, x3, x4)  =  if_sorted_1_in_2_g1(x4)
sort_2_out_ga2(x1, x2)  =  sort_2_out_ga1(x2)
PERM_2_IN_GA2(x1, x2)  =  PERM_2_IN_GA1(x1)
IF_PERM_2_IN_1_GA5(x1, x2, x3, x4, x5)  =  IF_PERM_2_IN_1_GA1(x5)

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

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

IF_PERM_2_IN_1_GA5(X, Y, U, V, delete_3_out_aga3(U, ._22(X, Y), Z)) -> PERM_2_IN_GA2(Z, V)
PERM_2_IN_GA2(._22(X, ._22(Y, []_0)), ._22(U, ._22(V, []_0))) -> IF_PERM_2_IN_1_GA5(X, Y, U, V, delete_3_in_aga3(U, ._22(X, Y), Z))

The TRS R consists of the following rules:

delete_3_in_aga3(X, ._22(X, Y), Y) -> delete_3_out_aga3(X, ._22(X, Y), Y)
delete_3_in_aga3(X, ._22(Y, Z), W) -> if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_in_aga3(X, Z, W))
if_delete_3_in_1_aga5(X, Y, Z, W, delete_3_out_aga3(X, Z, W)) -> delete_3_out_aga3(X, ._22(Y, Z), W)

The argument filtering Pi contains the following mapping:
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
delete_3_in_aga3(x1, x2, x3)  =  delete_3_in_aga1(x2)
delete_3_out_aga3(x1, x2, x3)  =  delete_3_out_aga2(x1, x3)
if_delete_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_delete_3_in_1_aga1(x5)
PERM_2_IN_GA2(x1, x2)  =  PERM_2_IN_GA1(x1)
IF_PERM_2_IN_1_GA5(x1, x2, x3, x4, x5)  =  IF_PERM_2_IN_1_GA1(x5)

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

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

IF_PERM_2_IN_1_GA1(delete_3_out_aga2(U, Z)) -> PERM_2_IN_GA1(Z)
PERM_2_IN_GA1(._22(X, ._22(Y, []_0))) -> IF_PERM_2_IN_1_GA1(delete_3_in_aga1(._22(X, Y)))

The TRS R consists of the following rules:

delete_3_in_aga1(._22(X, Y)) -> delete_3_out_aga2(X, Y)
delete_3_in_aga1(._22(Y, Z)) -> if_delete_3_in_1_aga1(delete_3_in_aga1(Z))
if_delete_3_in_1_aga1(delete_3_out_aga2(X, W)) -> delete_3_out_aga2(X, W)

The set Q consists of the following terms:

delete_3_in_aga1(x0)
if_delete_3_in_1_aga1(x0)

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

PERM_2_IN_GA1(._22(X, ._22(Y, []_0))) -> IF_PERM_2_IN_1_GA1(delete_3_in_aga1(._22(X, Y)))
The remaining Dependency Pairs were at least non-strictly be oriented.

IF_PERM_2_IN_1_GA1(delete_3_out_aga2(U, Z)) -> PERM_2_IN_GA1(Z)
With the implicit AFS we had to orient the following set of usable rules non-strictly.

if_delete_3_in_1_aga1(delete_3_out_aga2(X, W)) -> delete_3_out_aga2(X, W)
delete_3_in_aga1(._22(Y, Z)) -> if_delete_3_in_1_aga1(delete_3_in_aga1(Z))
delete_3_in_aga1(._22(X, Y)) -> delete_3_out_aga2(X, Y)
Used ordering: POLO with Polynomial interpretation:

POL(._22(x1, x2)) = x1 + x2   
POL(IF_PERM_2_IN_1_GA1(x1)) = x1   
POL(delete_3_in_aga1(x1)) = x1   
POL(if_delete_3_in_1_aga1(x1)) = x1   
POL(delete_3_out_aga2(x1, x2)) = x2   
POL([]_0) = 1   
POL(PERM_2_IN_GA1(x1)) = x1   



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

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

IF_PERM_2_IN_1_GA1(delete_3_out_aga2(U, Z)) -> PERM_2_IN_GA1(Z)

The TRS R consists of the following rules:

delete_3_in_aga1(._22(X, Y)) -> delete_3_out_aga2(X, Y)
delete_3_in_aga1(._22(Y, Z)) -> if_delete_3_in_1_aga1(delete_3_in_aga1(Z))
if_delete_3_in_1_aga1(delete_3_out_aga2(X, W)) -> delete_3_out_aga2(X, W)

The set Q consists of the following terms:

delete_3_in_aga1(x0)
if_delete_3_in_1_aga1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {PERM_2_IN_GA1, IF_PERM_2_IN_1_GA1}.
The approximation of the Dependency Graph contains 0 SCCs with 1 less node.