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



PROLOG
  ↳ PrologToPiTRSProof

ap13(nil0, X, X).
ap13(cons2(H, X), Y, cons2(H, Z)) :- ap13(X, Y, Z).
ap23(nil0, X, X).
ap23(cons2(H, X), Y, cons2(H, Z)) :- ap23(X, Y, Z).
perm2(nil0, nil0).
perm2(Xs, cons2(X, Ys)) :- ap13(X1s, cons2(X, X2s), Xs), ap23(X1s, X2s, Zs), perm2(Zs, Ys).


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


perm_2_in_ga2(nil_0, nil_0) -> perm_2_out_ga2(nil_0, nil_0)
perm_2_in_ga2(Xs, cons_22(X, Ys)) -> if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_in_aag3(X1s, cons_22(X, X2s), Xs))
ap1_3_in_aag3(nil_0, X, X) -> ap1_3_out_aag3(nil_0, X, X)
ap1_3_in_aag3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_in_aag3(X, Y, Z))
if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_out_aag3(X, Y, Z)) -> ap1_3_out_aag3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_out_aag3(X1s, cons_22(X, X2s), Xs)) -> if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_in_gga3(X1s, X2s, Zs))
ap2_3_in_gga3(nil_0, X, X) -> ap2_3_out_gga3(nil_0, X, X)
ap2_3_in_gga3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_in_gga3(X, Y, Z))
if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_out_gga3(X, Y, Z)) -> ap2_3_out_gga3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_out_gga3(X1s, X2s, Zs)) -> if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_in_ga2(Zs, Ys))
if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_out_ga2(Zs, Ys)) -> perm_2_out_ga2(Xs, cons_22(X, Ys))

The argument filtering Pi contains the following mapping:
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga4(x1, x2, x3, x4)  =  if_perm_2_in_1_ga1(x4)
ap1_3_in_aag3(x1, x2, x3)  =  ap1_3_in_aag1(x3)
ap1_3_out_aag3(x1, x2, x3)  =  ap1_3_out_aag2(x1, x2)
if_ap1_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_ap1_3_in_1_aag2(x1, x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x2, x6)
ap2_3_in_gga3(x1, x2, x3)  =  ap2_3_in_gga2(x1, x2)
ap2_3_out_gga3(x1, x2, x3)  =  ap2_3_out_gga1(x3)
if_ap2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_ap2_3_in_1_gga2(x1, x5)
if_perm_2_in_3_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_3_ga2(x2, x5)

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:

perm_2_in_ga2(nil_0, nil_0) -> perm_2_out_ga2(nil_0, nil_0)
perm_2_in_ga2(Xs, cons_22(X, Ys)) -> if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_in_aag3(X1s, cons_22(X, X2s), Xs))
ap1_3_in_aag3(nil_0, X, X) -> ap1_3_out_aag3(nil_0, X, X)
ap1_3_in_aag3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_in_aag3(X, Y, Z))
if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_out_aag3(X, Y, Z)) -> ap1_3_out_aag3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_out_aag3(X1s, cons_22(X, X2s), Xs)) -> if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_in_gga3(X1s, X2s, Zs))
ap2_3_in_gga3(nil_0, X, X) -> ap2_3_out_gga3(nil_0, X, X)
ap2_3_in_gga3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_in_gga3(X, Y, Z))
if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_out_gga3(X, Y, Z)) -> ap2_3_out_gga3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_out_gga3(X1s, X2s, Zs)) -> if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_in_ga2(Zs, Ys))
if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_out_ga2(Zs, Ys)) -> perm_2_out_ga2(Xs, cons_22(X, Ys))

The argument filtering Pi contains the following mapping:
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga4(x1, x2, x3, x4)  =  if_perm_2_in_1_ga1(x4)
ap1_3_in_aag3(x1, x2, x3)  =  ap1_3_in_aag1(x3)
ap1_3_out_aag3(x1, x2, x3)  =  ap1_3_out_aag2(x1, x2)
if_ap1_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_ap1_3_in_1_aag2(x1, x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x2, x6)
ap2_3_in_gga3(x1, x2, x3)  =  ap2_3_in_gga2(x1, x2)
ap2_3_out_gga3(x1, x2, x3)  =  ap2_3_out_gga1(x3)
if_ap2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_ap2_3_in_1_gga2(x1, x5)
if_perm_2_in_3_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_3_ga2(x2, x5)


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

PERM_2_IN_GA2(Xs, cons_22(X, Ys)) -> IF_PERM_2_IN_1_GA4(Xs, X, Ys, ap1_3_in_aag3(X1s, cons_22(X, X2s), Xs))
PERM_2_IN_GA2(Xs, cons_22(X, Ys)) -> AP1_3_IN_AAG3(X1s, cons_22(X, X2s), Xs)
AP1_3_IN_AAG3(cons_22(H, X), Y, cons_22(H, Z)) -> IF_AP1_3_IN_1_AAG5(H, X, Y, Z, ap1_3_in_aag3(X, Y, Z))
AP1_3_IN_AAG3(cons_22(H, X), Y, cons_22(H, Z)) -> AP1_3_IN_AAG3(X, Y, Z)
IF_PERM_2_IN_1_GA4(Xs, X, Ys, ap1_3_out_aag3(X1s, cons_22(X, X2s), Xs)) -> IF_PERM_2_IN_2_GA6(Xs, X, Ys, X1s, X2s, ap2_3_in_gga3(X1s, X2s, Zs))
IF_PERM_2_IN_1_GA4(Xs, X, Ys, ap1_3_out_aag3(X1s, cons_22(X, X2s), Xs)) -> AP2_3_IN_GGA3(X1s, X2s, Zs)
AP2_3_IN_GGA3(cons_22(H, X), Y, cons_22(H, Z)) -> IF_AP2_3_IN_1_GGA5(H, X, Y, Z, ap2_3_in_gga3(X, Y, Z))
AP2_3_IN_GGA3(cons_22(H, X), Y, cons_22(H, Z)) -> AP2_3_IN_GGA3(X, Y, Z)
IF_PERM_2_IN_2_GA6(Xs, X, Ys, X1s, X2s, ap2_3_out_gga3(X1s, X2s, Zs)) -> IF_PERM_2_IN_3_GA5(Xs, X, Ys, Zs, perm_2_in_ga2(Zs, Ys))
IF_PERM_2_IN_2_GA6(Xs, X, Ys, X1s, X2s, ap2_3_out_gga3(X1s, X2s, Zs)) -> PERM_2_IN_GA2(Zs, Ys)

The TRS R consists of the following rules:

perm_2_in_ga2(nil_0, nil_0) -> perm_2_out_ga2(nil_0, nil_0)
perm_2_in_ga2(Xs, cons_22(X, Ys)) -> if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_in_aag3(X1s, cons_22(X, X2s), Xs))
ap1_3_in_aag3(nil_0, X, X) -> ap1_3_out_aag3(nil_0, X, X)
ap1_3_in_aag3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_in_aag3(X, Y, Z))
if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_out_aag3(X, Y, Z)) -> ap1_3_out_aag3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_out_aag3(X1s, cons_22(X, X2s), Xs)) -> if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_in_gga3(X1s, X2s, Zs))
ap2_3_in_gga3(nil_0, X, X) -> ap2_3_out_gga3(nil_0, X, X)
ap2_3_in_gga3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_in_gga3(X, Y, Z))
if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_out_gga3(X, Y, Z)) -> ap2_3_out_gga3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_out_gga3(X1s, X2s, Zs)) -> if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_in_ga2(Zs, Ys))
if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_out_ga2(Zs, Ys)) -> perm_2_out_ga2(Xs, cons_22(X, Ys))

The argument filtering Pi contains the following mapping:
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga4(x1, x2, x3, x4)  =  if_perm_2_in_1_ga1(x4)
ap1_3_in_aag3(x1, x2, x3)  =  ap1_3_in_aag1(x3)
ap1_3_out_aag3(x1, x2, x3)  =  ap1_3_out_aag2(x1, x2)
if_ap1_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_ap1_3_in_1_aag2(x1, x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x2, x6)
ap2_3_in_gga3(x1, x2, x3)  =  ap2_3_in_gga2(x1, x2)
ap2_3_out_gga3(x1, x2, x3)  =  ap2_3_out_gga1(x3)
if_ap2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_ap2_3_in_1_gga2(x1, x5)
if_perm_2_in_3_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_3_ga2(x2, x5)
AP2_3_IN_GGA3(x1, x2, x3)  =  AP2_3_IN_GGA2(x1, x2)
IF_PERM_2_IN_3_GA5(x1, x2, x3, x4, x5)  =  IF_PERM_2_IN_3_GA2(x2, x5)
AP1_3_IN_AAG3(x1, x2, x3)  =  AP1_3_IN_AAG1(x3)
IF_AP2_3_IN_1_GGA5(x1, x2, x3, x4, x5)  =  IF_AP2_3_IN_1_GGA2(x1, x5)
IF_AP1_3_IN_1_AAG5(x1, x2, x3, x4, x5)  =  IF_AP1_3_IN_1_AAG2(x1, x5)
PERM_2_IN_GA2(x1, x2)  =  PERM_2_IN_GA1(x1)
IF_PERM_2_IN_2_GA6(x1, x2, x3, x4, x5, x6)  =  IF_PERM_2_IN_2_GA2(x2, x6)
IF_PERM_2_IN_1_GA4(x1, x2, x3, x4)  =  IF_PERM_2_IN_1_GA1(x4)

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:

PERM_2_IN_GA2(Xs, cons_22(X, Ys)) -> IF_PERM_2_IN_1_GA4(Xs, X, Ys, ap1_3_in_aag3(X1s, cons_22(X, X2s), Xs))
PERM_2_IN_GA2(Xs, cons_22(X, Ys)) -> AP1_3_IN_AAG3(X1s, cons_22(X, X2s), Xs)
AP1_3_IN_AAG3(cons_22(H, X), Y, cons_22(H, Z)) -> IF_AP1_3_IN_1_AAG5(H, X, Y, Z, ap1_3_in_aag3(X, Y, Z))
AP1_3_IN_AAG3(cons_22(H, X), Y, cons_22(H, Z)) -> AP1_3_IN_AAG3(X, Y, Z)
IF_PERM_2_IN_1_GA4(Xs, X, Ys, ap1_3_out_aag3(X1s, cons_22(X, X2s), Xs)) -> IF_PERM_2_IN_2_GA6(Xs, X, Ys, X1s, X2s, ap2_3_in_gga3(X1s, X2s, Zs))
IF_PERM_2_IN_1_GA4(Xs, X, Ys, ap1_3_out_aag3(X1s, cons_22(X, X2s), Xs)) -> AP2_3_IN_GGA3(X1s, X2s, Zs)
AP2_3_IN_GGA3(cons_22(H, X), Y, cons_22(H, Z)) -> IF_AP2_3_IN_1_GGA5(H, X, Y, Z, ap2_3_in_gga3(X, Y, Z))
AP2_3_IN_GGA3(cons_22(H, X), Y, cons_22(H, Z)) -> AP2_3_IN_GGA3(X, Y, Z)
IF_PERM_2_IN_2_GA6(Xs, X, Ys, X1s, X2s, ap2_3_out_gga3(X1s, X2s, Zs)) -> IF_PERM_2_IN_3_GA5(Xs, X, Ys, Zs, perm_2_in_ga2(Zs, Ys))
IF_PERM_2_IN_2_GA6(Xs, X, Ys, X1s, X2s, ap2_3_out_gga3(X1s, X2s, Zs)) -> PERM_2_IN_GA2(Zs, Ys)

The TRS R consists of the following rules:

perm_2_in_ga2(nil_0, nil_0) -> perm_2_out_ga2(nil_0, nil_0)
perm_2_in_ga2(Xs, cons_22(X, Ys)) -> if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_in_aag3(X1s, cons_22(X, X2s), Xs))
ap1_3_in_aag3(nil_0, X, X) -> ap1_3_out_aag3(nil_0, X, X)
ap1_3_in_aag3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_in_aag3(X, Y, Z))
if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_out_aag3(X, Y, Z)) -> ap1_3_out_aag3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_out_aag3(X1s, cons_22(X, X2s), Xs)) -> if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_in_gga3(X1s, X2s, Zs))
ap2_3_in_gga3(nil_0, X, X) -> ap2_3_out_gga3(nil_0, X, X)
ap2_3_in_gga3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_in_gga3(X, Y, Z))
if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_out_gga3(X, Y, Z)) -> ap2_3_out_gga3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_out_gga3(X1s, X2s, Zs)) -> if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_in_ga2(Zs, Ys))
if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_out_ga2(Zs, Ys)) -> perm_2_out_ga2(Xs, cons_22(X, Ys))

The argument filtering Pi contains the following mapping:
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga4(x1, x2, x3, x4)  =  if_perm_2_in_1_ga1(x4)
ap1_3_in_aag3(x1, x2, x3)  =  ap1_3_in_aag1(x3)
ap1_3_out_aag3(x1, x2, x3)  =  ap1_3_out_aag2(x1, x2)
if_ap1_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_ap1_3_in_1_aag2(x1, x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x2, x6)
ap2_3_in_gga3(x1, x2, x3)  =  ap2_3_in_gga2(x1, x2)
ap2_3_out_gga3(x1, x2, x3)  =  ap2_3_out_gga1(x3)
if_ap2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_ap2_3_in_1_gga2(x1, x5)
if_perm_2_in_3_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_3_ga2(x2, x5)
AP2_3_IN_GGA3(x1, x2, x3)  =  AP2_3_IN_GGA2(x1, x2)
IF_PERM_2_IN_3_GA5(x1, x2, x3, x4, x5)  =  IF_PERM_2_IN_3_GA2(x2, x5)
AP1_3_IN_AAG3(x1, x2, x3)  =  AP1_3_IN_AAG1(x3)
IF_AP2_3_IN_1_GGA5(x1, x2, x3, x4, x5)  =  IF_AP2_3_IN_1_GGA2(x1, x5)
IF_AP1_3_IN_1_AAG5(x1, x2, x3, x4, x5)  =  IF_AP1_3_IN_1_AAG2(x1, x5)
PERM_2_IN_GA2(x1, x2)  =  PERM_2_IN_GA1(x1)
IF_PERM_2_IN_2_GA6(x1, x2, x3, x4, x5, x6)  =  IF_PERM_2_IN_2_GA2(x2, x6)
IF_PERM_2_IN_1_GA4(x1, x2, x3, x4)  =  IF_PERM_2_IN_1_GA1(x4)

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

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

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

AP2_3_IN_GGA3(cons_22(H, X), Y, cons_22(H, Z)) -> AP2_3_IN_GGA3(X, Y, Z)

The TRS R consists of the following rules:

perm_2_in_ga2(nil_0, nil_0) -> perm_2_out_ga2(nil_0, nil_0)
perm_2_in_ga2(Xs, cons_22(X, Ys)) -> if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_in_aag3(X1s, cons_22(X, X2s), Xs))
ap1_3_in_aag3(nil_0, X, X) -> ap1_3_out_aag3(nil_0, X, X)
ap1_3_in_aag3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_in_aag3(X, Y, Z))
if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_out_aag3(X, Y, Z)) -> ap1_3_out_aag3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_out_aag3(X1s, cons_22(X, X2s), Xs)) -> if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_in_gga3(X1s, X2s, Zs))
ap2_3_in_gga3(nil_0, X, X) -> ap2_3_out_gga3(nil_0, X, X)
ap2_3_in_gga3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_in_gga3(X, Y, Z))
if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_out_gga3(X, Y, Z)) -> ap2_3_out_gga3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_out_gga3(X1s, X2s, Zs)) -> if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_in_ga2(Zs, Ys))
if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_out_ga2(Zs, Ys)) -> perm_2_out_ga2(Xs, cons_22(X, Ys))

The argument filtering Pi contains the following mapping:
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga4(x1, x2, x3, x4)  =  if_perm_2_in_1_ga1(x4)
ap1_3_in_aag3(x1, x2, x3)  =  ap1_3_in_aag1(x3)
ap1_3_out_aag3(x1, x2, x3)  =  ap1_3_out_aag2(x1, x2)
if_ap1_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_ap1_3_in_1_aag2(x1, x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x2, x6)
ap2_3_in_gga3(x1, x2, x3)  =  ap2_3_in_gga2(x1, x2)
ap2_3_out_gga3(x1, x2, x3)  =  ap2_3_out_gga1(x3)
if_ap2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_ap2_3_in_1_gga2(x1, x5)
if_perm_2_in_3_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_3_ga2(x2, x5)
AP2_3_IN_GGA3(x1, x2, x3)  =  AP2_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
              ↳ PiDP

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

AP2_3_IN_GGA3(cons_22(H, X), Y, cons_22(H, Z)) -> AP2_3_IN_GGA3(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
cons_22(x1, x2)  =  cons_22(x1, x2)
AP2_3_IN_GGA3(x1, x2, x3)  =  AP2_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
              ↳ PiDP

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

AP2_3_IN_GGA2(cons_22(H, X), Y) -> AP2_3_IN_GGA2(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 {AP2_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
                ↳ UsableRulesProof
              ↳ PiDP

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

AP1_3_IN_AAG3(cons_22(H, X), Y, cons_22(H, Z)) -> AP1_3_IN_AAG3(X, Y, Z)

The TRS R consists of the following rules:

perm_2_in_ga2(nil_0, nil_0) -> perm_2_out_ga2(nil_0, nil_0)
perm_2_in_ga2(Xs, cons_22(X, Ys)) -> if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_in_aag3(X1s, cons_22(X, X2s), Xs))
ap1_3_in_aag3(nil_0, X, X) -> ap1_3_out_aag3(nil_0, X, X)
ap1_3_in_aag3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_in_aag3(X, Y, Z))
if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_out_aag3(X, Y, Z)) -> ap1_3_out_aag3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_out_aag3(X1s, cons_22(X, X2s), Xs)) -> if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_in_gga3(X1s, X2s, Zs))
ap2_3_in_gga3(nil_0, X, X) -> ap2_3_out_gga3(nil_0, X, X)
ap2_3_in_gga3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_in_gga3(X, Y, Z))
if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_out_gga3(X, Y, Z)) -> ap2_3_out_gga3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_out_gga3(X1s, X2s, Zs)) -> if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_in_ga2(Zs, Ys))
if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_out_ga2(Zs, Ys)) -> perm_2_out_ga2(Xs, cons_22(X, Ys))

The argument filtering Pi contains the following mapping:
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga4(x1, x2, x3, x4)  =  if_perm_2_in_1_ga1(x4)
ap1_3_in_aag3(x1, x2, x3)  =  ap1_3_in_aag1(x3)
ap1_3_out_aag3(x1, x2, x3)  =  ap1_3_out_aag2(x1, x2)
if_ap1_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_ap1_3_in_1_aag2(x1, x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x2, x6)
ap2_3_in_gga3(x1, x2, x3)  =  ap2_3_in_gga2(x1, x2)
ap2_3_out_gga3(x1, x2, x3)  =  ap2_3_out_gga1(x3)
if_ap2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_ap2_3_in_1_gga2(x1, x5)
if_perm_2_in_3_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_3_ga2(x2, x5)
AP1_3_IN_AAG3(x1, x2, x3)  =  AP1_3_IN_AAG1(x3)

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:

AP1_3_IN_AAG3(cons_22(H, X), Y, cons_22(H, Z)) -> AP1_3_IN_AAG3(X, Y, Z)

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

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:

AP1_3_IN_AAG1(cons_22(H, Z)) -> AP1_3_IN_AAG1(Z)

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

IF_PERM_2_IN_1_GA4(Xs, X, Ys, ap1_3_out_aag3(X1s, cons_22(X, X2s), Xs)) -> IF_PERM_2_IN_2_GA6(Xs, X, Ys, X1s, X2s, ap2_3_in_gga3(X1s, X2s, Zs))
PERM_2_IN_GA2(Xs, cons_22(X, Ys)) -> IF_PERM_2_IN_1_GA4(Xs, X, Ys, ap1_3_in_aag3(X1s, cons_22(X, X2s), Xs))
IF_PERM_2_IN_2_GA6(Xs, X, Ys, X1s, X2s, ap2_3_out_gga3(X1s, X2s, Zs)) -> PERM_2_IN_GA2(Zs, Ys)

The TRS R consists of the following rules:

perm_2_in_ga2(nil_0, nil_0) -> perm_2_out_ga2(nil_0, nil_0)
perm_2_in_ga2(Xs, cons_22(X, Ys)) -> if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_in_aag3(X1s, cons_22(X, X2s), Xs))
ap1_3_in_aag3(nil_0, X, X) -> ap1_3_out_aag3(nil_0, X, X)
ap1_3_in_aag3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_in_aag3(X, Y, Z))
if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_out_aag3(X, Y, Z)) -> ap1_3_out_aag3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_1_ga4(Xs, X, Ys, ap1_3_out_aag3(X1s, cons_22(X, X2s), Xs)) -> if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_in_gga3(X1s, X2s, Zs))
ap2_3_in_gga3(nil_0, X, X) -> ap2_3_out_gga3(nil_0, X, X)
ap2_3_in_gga3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_in_gga3(X, Y, Z))
if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_out_gga3(X, Y, Z)) -> ap2_3_out_gga3(cons_22(H, X), Y, cons_22(H, Z))
if_perm_2_in_2_ga6(Xs, X, Ys, X1s, X2s, ap2_3_out_gga3(X1s, X2s, Zs)) -> if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_in_ga2(Zs, Ys))
if_perm_2_in_3_ga5(Xs, X, Ys, Zs, perm_2_out_ga2(Zs, Ys)) -> perm_2_out_ga2(Xs, cons_22(X, Ys))

The argument filtering Pi contains the following mapping:
perm_2_in_ga2(x1, x2)  =  perm_2_in_ga1(x1)
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
perm_2_out_ga2(x1, x2)  =  perm_2_out_ga1(x2)
if_perm_2_in_1_ga4(x1, x2, x3, x4)  =  if_perm_2_in_1_ga1(x4)
ap1_3_in_aag3(x1, x2, x3)  =  ap1_3_in_aag1(x3)
ap1_3_out_aag3(x1, x2, x3)  =  ap1_3_out_aag2(x1, x2)
if_ap1_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_ap1_3_in_1_aag2(x1, x5)
if_perm_2_in_2_ga6(x1, x2, x3, x4, x5, x6)  =  if_perm_2_in_2_ga2(x2, x6)
ap2_3_in_gga3(x1, x2, x3)  =  ap2_3_in_gga2(x1, x2)
ap2_3_out_gga3(x1, x2, x3)  =  ap2_3_out_gga1(x3)
if_ap2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_ap2_3_in_1_gga2(x1, x5)
if_perm_2_in_3_ga5(x1, x2, x3, x4, x5)  =  if_perm_2_in_3_ga2(x2, x5)
PERM_2_IN_GA2(x1, x2)  =  PERM_2_IN_GA1(x1)
IF_PERM_2_IN_2_GA6(x1, x2, x3, x4, x5, x6)  =  IF_PERM_2_IN_2_GA2(x2, x6)
IF_PERM_2_IN_1_GA4(x1, x2, x3, x4)  =  IF_PERM_2_IN_1_GA1(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
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

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

IF_PERM_2_IN_1_GA4(Xs, X, Ys, ap1_3_out_aag3(X1s, cons_22(X, X2s), Xs)) -> IF_PERM_2_IN_2_GA6(Xs, X, Ys, X1s, X2s, ap2_3_in_gga3(X1s, X2s, Zs))
PERM_2_IN_GA2(Xs, cons_22(X, Ys)) -> IF_PERM_2_IN_1_GA4(Xs, X, Ys, ap1_3_in_aag3(X1s, cons_22(X, X2s), Xs))
IF_PERM_2_IN_2_GA6(Xs, X, Ys, X1s, X2s, ap2_3_out_gga3(X1s, X2s, Zs)) -> PERM_2_IN_GA2(Zs, Ys)

The TRS R consists of the following rules:

ap2_3_in_gga3(nil_0, X, X) -> ap2_3_out_gga3(nil_0, X, X)
ap2_3_in_gga3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_in_gga3(X, Y, Z))
ap1_3_in_aag3(nil_0, X, X) -> ap1_3_out_aag3(nil_0, X, X)
ap1_3_in_aag3(cons_22(H, X), Y, cons_22(H, Z)) -> if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_in_aag3(X, Y, Z))
if_ap2_3_in_1_gga5(H, X, Y, Z, ap2_3_out_gga3(X, Y, Z)) -> ap2_3_out_gga3(cons_22(H, X), Y, cons_22(H, Z))
if_ap1_3_in_1_aag5(H, X, Y, Z, ap1_3_out_aag3(X, Y, Z)) -> ap1_3_out_aag3(cons_22(H, X), Y, cons_22(H, Z))

The argument filtering Pi contains the following mapping:
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_22(x1, x2)
ap1_3_in_aag3(x1, x2, x3)  =  ap1_3_in_aag1(x3)
ap1_3_out_aag3(x1, x2, x3)  =  ap1_3_out_aag2(x1, x2)
if_ap1_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_ap1_3_in_1_aag2(x1, x5)
ap2_3_in_gga3(x1, x2, x3)  =  ap2_3_in_gga2(x1, x2)
ap2_3_out_gga3(x1, x2, x3)  =  ap2_3_out_gga1(x3)
if_ap2_3_in_1_gga5(x1, x2, x3, x4, x5)  =  if_ap2_3_in_1_gga2(x1, x5)
PERM_2_IN_GA2(x1, x2)  =  PERM_2_IN_GA1(x1)
IF_PERM_2_IN_2_GA6(x1, x2, x3, x4, x5, x6)  =  IF_PERM_2_IN_2_GA2(x2, x6)
IF_PERM_2_IN_1_GA4(x1, x2, x3, x4)  =  IF_PERM_2_IN_1_GA1(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
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ RuleRemovalProof

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

IF_PERM_2_IN_1_GA1(ap1_3_out_aag2(X1s, cons_22(X, X2s))) -> IF_PERM_2_IN_2_GA2(X, ap2_3_in_gga2(X1s, X2s))
PERM_2_IN_GA1(Xs) -> IF_PERM_2_IN_1_GA1(ap1_3_in_aag1(Xs))
IF_PERM_2_IN_2_GA2(X, ap2_3_out_gga1(Zs)) -> PERM_2_IN_GA1(Zs)

The TRS R consists of the following rules:

ap2_3_in_gga2(nil_0, X) -> ap2_3_out_gga1(X)
ap2_3_in_gga2(cons_22(H, X), Y) -> if_ap2_3_in_1_gga2(H, ap2_3_in_gga2(X, Y))
ap1_3_in_aag1(X) -> ap1_3_out_aag2(nil_0, X)
ap1_3_in_aag1(cons_22(H, Z)) -> if_ap1_3_in_1_aag2(H, ap1_3_in_aag1(Z))
if_ap2_3_in_1_gga2(H, ap2_3_out_gga1(Z)) -> ap2_3_out_gga1(cons_22(H, Z))
if_ap1_3_in_1_aag2(H, ap1_3_out_aag2(X, Y)) -> ap1_3_out_aag2(cons_22(H, X), Y)

The set Q consists of the following terms:

ap2_3_in_gga2(x0, x1)
ap1_3_in_aag1(x0)
if_ap2_3_in_1_gga2(x0, x1)
if_ap1_3_in_1_aag2(x0, x1)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {IF_PERM_2_IN_2_GA2, IF_PERM_2_IN_1_GA1, PERM_2_IN_GA1}.
By using a polynomial ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.

Strictly oriented rules of the TRS R:

ap2_3_in_gga2(nil_0, X) -> ap2_3_out_gga1(X)

Used ordering: POLO with Polynomial interpretation:

POL(nil_0) = 2   
POL(ap2_3_out_gga1(x1)) = 1 + x1   
POL(if_ap1_3_in_1_aag2(x1, x2)) = 1 + x1 + x2   
POL(IF_PERM_2_IN_2_GA2(x1, x2)) = 1 + x1 + x2   
POL(ap2_3_in_gga2(x1, x2)) = x1 + x2   
POL(IF_PERM_2_IN_1_GA1(x1)) = x1   
POL(ap1_3_in_aag1(x1)) = 2 + x1   
POL(if_ap2_3_in_1_gga2(x1, x2)) = 1 + x1 + x2   
POL(cons_22(x1, x2)) = 1 + x1 + x2   
POL(ap1_3_out_aag2(x1, x2)) = x1 + x2   
POL(PERM_2_IN_GA1(x1)) = 2 + x1   



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

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

IF_PERM_2_IN_1_GA1(ap1_3_out_aag2(X1s, cons_22(X, X2s))) -> IF_PERM_2_IN_2_GA2(X, ap2_3_in_gga2(X1s, X2s))
PERM_2_IN_GA1(Xs) -> IF_PERM_2_IN_1_GA1(ap1_3_in_aag1(Xs))
IF_PERM_2_IN_2_GA2(X, ap2_3_out_gga1(Zs)) -> PERM_2_IN_GA1(Zs)

The TRS R consists of the following rules:

ap2_3_in_gga2(cons_22(H, X), Y) -> if_ap2_3_in_1_gga2(H, ap2_3_in_gga2(X, Y))
ap1_3_in_aag1(X) -> ap1_3_out_aag2(nil_0, X)
ap1_3_in_aag1(cons_22(H, Z)) -> if_ap1_3_in_1_aag2(H, ap1_3_in_aag1(Z))
if_ap2_3_in_1_gga2(H, ap2_3_out_gga1(Z)) -> ap2_3_out_gga1(cons_22(H, Z))
if_ap1_3_in_1_aag2(H, ap1_3_out_aag2(X, Y)) -> ap1_3_out_aag2(cons_22(H, X), Y)

The set Q consists of the following terms:

ap2_3_in_gga2(x0, x1)
ap1_3_in_aag1(x0)
if_ap2_3_in_1_gga2(x0, x1)
if_ap1_3_in_1_aag2(x0, x1)

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

IF_PERM_2_IN_2_GA2(X, ap2_3_out_gga1(Zs)) -> PERM_2_IN_GA1(Zs)
The remaining Dependency Pairs were at least non-strictly be oriented.

IF_PERM_2_IN_1_GA1(ap1_3_out_aag2(X1s, cons_22(X, X2s))) -> IF_PERM_2_IN_2_GA2(X, ap2_3_in_gga2(X1s, X2s))
PERM_2_IN_GA1(Xs) -> IF_PERM_2_IN_1_GA1(ap1_3_in_aag1(Xs))
With the implicit AFS we had to orient the following set of usable rules non-strictly.

if_ap2_3_in_1_gga2(H, ap2_3_out_gga1(Z)) -> ap2_3_out_gga1(cons_22(H, Z))
ap2_3_in_gga2(cons_22(H, X), Y) -> if_ap2_3_in_1_gga2(H, ap2_3_in_gga2(X, Y))
Used ordering: POLO with Polynomial interpretation:

POL(nil_0) = 0   
POL(ap2_3_out_gga1(x1)) = 1   
POL(if_ap1_3_in_1_aag2(x1, x2)) = 0   
POL(IF_PERM_2_IN_2_GA2(x1, x2)) = x2   
POL(ap2_3_in_gga2(x1, x2)) = 0   
POL(IF_PERM_2_IN_1_GA1(x1)) = 0   
POL(ap1_3_in_aag1(x1)) = 0   
POL(if_ap2_3_in_1_gga2(x1, x2)) = x2   
POL(cons_22(x1, x2)) = 0   
POL(ap1_3_out_aag2(x1, x2)) = 0   
POL(PERM_2_IN_GA1(x1)) = 0   



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

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

IF_PERM_2_IN_1_GA1(ap1_3_out_aag2(X1s, cons_22(X, X2s))) -> IF_PERM_2_IN_2_GA2(X, ap2_3_in_gga2(X1s, X2s))
PERM_2_IN_GA1(Xs) -> IF_PERM_2_IN_1_GA1(ap1_3_in_aag1(Xs))

The TRS R consists of the following rules:

ap2_3_in_gga2(cons_22(H, X), Y) -> if_ap2_3_in_1_gga2(H, ap2_3_in_gga2(X, Y))
ap1_3_in_aag1(X) -> ap1_3_out_aag2(nil_0, X)
ap1_3_in_aag1(cons_22(H, Z)) -> if_ap1_3_in_1_aag2(H, ap1_3_in_aag1(Z))
if_ap2_3_in_1_gga2(H, ap2_3_out_gga1(Z)) -> ap2_3_out_gga1(cons_22(H, Z))
if_ap1_3_in_1_aag2(H, ap1_3_out_aag2(X, Y)) -> ap1_3_out_aag2(cons_22(H, X), Y)

The set Q consists of the following terms:

ap2_3_in_gga2(x0, x1)
ap1_3_in_aag1(x0)
if_ap2_3_in_1_gga2(x0, x1)
if_ap1_3_in_1_aag2(x0, x1)

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