Left Termination of the query pattern in_order(f,b) w.r.t. the given Prolog program could not be shown:



PROLOG
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

inorder2(void0, {}0).
inorder2(tree3(X, Left, Right), Xs) :- inorder2(Left, Ls), inorder2(Right, Rs), app3(Ls, .2(X, Rs), Xs).
app3({}0, X, X).
app3(.2(X, Xs), Ys, .2(X, Zs)) :- app3(Xs, Ys, Zs).


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


in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag1(x1)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag3(x2, x3, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag2(x1, x2)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag1(x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of PROLOG



↳ PROLOG
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

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

in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag1(x1)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag3(x2, x3, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag2(x1, x2)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag1(x5)


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

IN_ORDER_2_IN_AG2(tree_33(X, Left, Right), Xs) -> IF_IN_ORDER_2_IN_1_AG5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
IN_ORDER_2_IN_AG2(tree_33(X, Left, Right), Xs) -> IN_ORDER_2_IN_AA2(Left, Ls)
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IN_ORDER_2_IN_AA2(Left, Ls)
IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IF_IN_ORDER_2_IN_2_AA6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IN_ORDER_2_IN_AA2(Right, Rs)
IF_IN_ORDER_2_IN_2_AA6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> IF_IN_ORDER_2_IN_3_AA7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
IF_IN_ORDER_2_IN_2_AA6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> APP_3_IN_AAA3(Ls, ._22(X, Rs), Xs)
APP_3_IN_AAA3(._22(X, Xs), Ys, ._22(X, Zs)) -> IF_APP_3_IN_1_AAA5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
APP_3_IN_AAA3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAA3(Xs, Ys, Zs)
IF_IN_ORDER_2_IN_1_AG5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IF_IN_ORDER_2_IN_2_AG6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
IF_IN_ORDER_2_IN_1_AG5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IN_ORDER_2_IN_AA2(Right, Rs)
IF_IN_ORDER_2_IN_2_AG6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> IF_IN_ORDER_2_IN_3_AG7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
IF_IN_ORDER_2_IN_2_AG6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> APP_3_IN_AAG3(Ls, ._22(X, Rs), Xs)
APP_3_IN_AAG3(._22(X, Xs), Ys, ._22(X, Zs)) -> IF_APP_3_IN_1_AAG5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
APP_3_IN_AAG3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAG3(Xs, Ys, Zs)

The TRS R consists of the following rules:

in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag1(x1)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag3(x2, x3, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag2(x1, x2)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag1(x5)
IF_IN_ORDER_2_IN_3_AA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_IN_ORDER_2_IN_3_AA3(x2, x3, x7)
IN_ORDER_2_IN_AA2(x1, x2)  =  IN_ORDER_2_IN_AA
IF_IN_ORDER_2_IN_2_AG6(x1, x2, x3, x4, x5, x6)  =  IF_IN_ORDER_2_IN_2_AG3(x2, x4, x6)
IF_IN_ORDER_2_IN_1_AA5(x1, x2, x3, x4, x5)  =  IF_IN_ORDER_2_IN_1_AA1(x5)
IN_ORDER_2_IN_AG2(x1, x2)  =  IN_ORDER_2_IN_AG1(x2)
IF_IN_ORDER_2_IN_3_AG7(x1, x2, x3, x4, x5, x6, x7)  =  IF_IN_ORDER_2_IN_3_AG3(x2, x3, x7)
IF_APP_3_IN_1_AAG5(x1, x2, x3, x4, x5)  =  IF_APP_3_IN_1_AAG1(x5)
APP_3_IN_AAG3(x1, x2, x3)  =  APP_3_IN_AAG1(x3)
IF_IN_ORDER_2_IN_2_AA6(x1, x2, x3, x4, x5, x6)  =  IF_IN_ORDER_2_IN_2_AA2(x2, x6)
APP_3_IN_AAA3(x1, x2, x3)  =  APP_3_IN_AAA
IF_APP_3_IN_1_AAA5(x1, x2, x3, x4, x5)  =  IF_APP_3_IN_1_AAA1(x5)
IF_IN_ORDER_2_IN_1_AG5(x1, x2, x3, x4, x5)  =  IF_IN_ORDER_2_IN_1_AG2(x4, x5)

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

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

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

IN_ORDER_2_IN_AG2(tree_33(X, Left, Right), Xs) -> IF_IN_ORDER_2_IN_1_AG5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
IN_ORDER_2_IN_AG2(tree_33(X, Left, Right), Xs) -> IN_ORDER_2_IN_AA2(Left, Ls)
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IN_ORDER_2_IN_AA2(Left, Ls)
IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IF_IN_ORDER_2_IN_2_AA6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IN_ORDER_2_IN_AA2(Right, Rs)
IF_IN_ORDER_2_IN_2_AA6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> IF_IN_ORDER_2_IN_3_AA7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
IF_IN_ORDER_2_IN_2_AA6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> APP_3_IN_AAA3(Ls, ._22(X, Rs), Xs)
APP_3_IN_AAA3(._22(X, Xs), Ys, ._22(X, Zs)) -> IF_APP_3_IN_1_AAA5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
APP_3_IN_AAA3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAA3(Xs, Ys, Zs)
IF_IN_ORDER_2_IN_1_AG5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IF_IN_ORDER_2_IN_2_AG6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
IF_IN_ORDER_2_IN_1_AG5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IN_ORDER_2_IN_AA2(Right, Rs)
IF_IN_ORDER_2_IN_2_AG6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> IF_IN_ORDER_2_IN_3_AG7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
IF_IN_ORDER_2_IN_2_AG6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> APP_3_IN_AAG3(Ls, ._22(X, Rs), Xs)
APP_3_IN_AAG3(._22(X, Xs), Ys, ._22(X, Zs)) -> IF_APP_3_IN_1_AAG5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
APP_3_IN_AAG3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAG3(Xs, Ys, Zs)

The TRS R consists of the following rules:

in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag1(x1)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag3(x2, x3, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag2(x1, x2)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag1(x5)
IF_IN_ORDER_2_IN_3_AA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_IN_ORDER_2_IN_3_AA3(x2, x3, x7)
IN_ORDER_2_IN_AA2(x1, x2)  =  IN_ORDER_2_IN_AA
IF_IN_ORDER_2_IN_2_AG6(x1, x2, x3, x4, x5, x6)  =  IF_IN_ORDER_2_IN_2_AG3(x2, x4, x6)
IF_IN_ORDER_2_IN_1_AA5(x1, x2, x3, x4, x5)  =  IF_IN_ORDER_2_IN_1_AA1(x5)
IN_ORDER_2_IN_AG2(x1, x2)  =  IN_ORDER_2_IN_AG1(x2)
IF_IN_ORDER_2_IN_3_AG7(x1, x2, x3, x4, x5, x6, x7)  =  IF_IN_ORDER_2_IN_3_AG3(x2, x3, x7)
IF_APP_3_IN_1_AAG5(x1, x2, x3, x4, x5)  =  IF_APP_3_IN_1_AAG1(x5)
APP_3_IN_AAG3(x1, x2, x3)  =  APP_3_IN_AAG1(x3)
IF_IN_ORDER_2_IN_2_AA6(x1, x2, x3, x4, x5, x6)  =  IF_IN_ORDER_2_IN_2_AA2(x2, x6)
APP_3_IN_AAA3(x1, x2, x3)  =  APP_3_IN_AAA
IF_APP_3_IN_1_AAA5(x1, x2, x3, x4, x5)  =  IF_APP_3_IN_1_AAA1(x5)
IF_IN_ORDER_2_IN_1_AG5(x1, x2, x3, x4, x5)  =  IF_IN_ORDER_2_IN_1_AG2(x4, x5)

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

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

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

APP_3_IN_AAG3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAG3(Xs, Ys, Zs)

The TRS R consists of the following rules:

in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag1(x1)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag3(x2, x3, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag2(x1, x2)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag1(x5)
APP_3_IN_AAG3(x1, x2, x3)  =  APP_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
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

APP_3_IN_AAG3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAG3(Xs, Ys, Zs)

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

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

APP_3_IN_AAG1(._21(Zs)) -> APP_3_IN_AAG1(Zs)

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

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

APP_3_IN_AAA3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAA3(Xs, Ys, Zs)

The TRS R consists of the following rules:

in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag1(x1)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag3(x2, x3, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag2(x1, x2)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag1(x5)
APP_3_IN_AAA3(x1, x2, x3)  =  APP_3_IN_AAA

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

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

APP_3_IN_AAA3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAA3(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
._22(x1, x2)  =  ._21(x2)
APP_3_IN_AAA3(x1, x2, x3)  =  APP_3_IN_AAA

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

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

APP_3_IN_AAA -> APP_3_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {APP_3_IN_AAA}.

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

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

IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IN_ORDER_2_IN_AA2(Right, Rs)
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IN_ORDER_2_IN_AA2(Left, Ls)

The TRS R consists of the following rules:

in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag1(x1)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag3(x2, x3, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag2(x1, x2)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag1(x5)
IN_ORDER_2_IN_AA2(x1, x2)  =  IN_ORDER_2_IN_AA
IF_IN_ORDER_2_IN_1_AA5(x1, x2, x3, x4, x5)  =  IF_IN_ORDER_2_IN_1_AA1(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
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

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

IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IN_ORDER_2_IN_AA2(Right, Rs)
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IN_ORDER_2_IN_AA2(Left, Ls)

The TRS R consists of the following rules:

in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))

The argument filtering Pi contains the following mapping:
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
IN_ORDER_2_IN_AA2(x1, x2)  =  IN_ORDER_2_IN_AA
IF_IN_ORDER_2_IN_1_AA5(x1, x2, x3, x4, x5)  =  IF_IN_ORDER_2_IN_1_AA1(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
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
  ↳ PrologToPiTRSProof

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

IF_IN_ORDER_2_IN_1_AA1(in_order_2_out_aa1(Left)) -> IN_ORDER_2_IN_AA
IN_ORDER_2_IN_AA -> IF_IN_ORDER_2_IN_1_AA1(in_order_2_in_aa)
IN_ORDER_2_IN_AA -> IN_ORDER_2_IN_AA

The TRS R consists of the following rules:

in_order_2_in_aa -> in_order_2_out_aa1(void_0)
in_order_2_in_aa -> if_in_order_2_in_1_aa1(in_order_2_in_aa)
if_in_order_2_in_1_aa1(in_order_2_out_aa1(Left)) -> if_in_order_2_in_2_aa2(Left, in_order_2_in_aa)
if_in_order_2_in_2_aa2(Left, in_order_2_out_aa1(Right)) -> if_in_order_2_in_3_aa3(Left, Right, app_3_in_aaa)
if_in_order_2_in_3_aa3(Left, Right, app_3_out_aaa1(Ls)) -> in_order_2_out_aa1(tree_32(Left, Right))
app_3_in_aaa -> app_3_out_aaa1([]_0)
app_3_in_aaa -> if_app_3_in_1_aaa1(app_3_in_aaa)
if_app_3_in_1_aaa1(app_3_out_aaa1(Xs)) -> app_3_out_aaa1(._21(Xs))

The set Q consists of the following terms:

in_order_2_in_aa
if_in_order_2_in_1_aa1(x0)
if_in_order_2_in_2_aa2(x0, x1)
if_in_order_2_in_3_aa3(x0, x1, x2)
app_3_in_aaa
if_app_3_in_1_aaa1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {IN_ORDER_2_IN_AA, IF_IN_ORDER_2_IN_1_AA1}.
With regard to the inferred argument filtering the predicates were used in the following modes:
in_order2: (f,b) (f,f)
app3: (f,f,f) (f,f,b)
Transforming PROLOG into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag2(x1, x2)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag4(x2, x3, x4, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag3(x1, x2, x3)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag2(x4, x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of PROLOG



↳ PROLOG
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

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

in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag2(x1, x2)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag4(x2, x3, x4, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag3(x1, x2, x3)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag2(x4, x5)


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

IN_ORDER_2_IN_AG2(tree_33(X, Left, Right), Xs) -> IF_IN_ORDER_2_IN_1_AG5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
IN_ORDER_2_IN_AG2(tree_33(X, Left, Right), Xs) -> IN_ORDER_2_IN_AA2(Left, Ls)
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IN_ORDER_2_IN_AA2(Left, Ls)
IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IF_IN_ORDER_2_IN_2_AA6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IN_ORDER_2_IN_AA2(Right, Rs)
IF_IN_ORDER_2_IN_2_AA6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> IF_IN_ORDER_2_IN_3_AA7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
IF_IN_ORDER_2_IN_2_AA6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> APP_3_IN_AAA3(Ls, ._22(X, Rs), Xs)
APP_3_IN_AAA3(._22(X, Xs), Ys, ._22(X, Zs)) -> IF_APP_3_IN_1_AAA5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
APP_3_IN_AAA3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAA3(Xs, Ys, Zs)
IF_IN_ORDER_2_IN_1_AG5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IF_IN_ORDER_2_IN_2_AG6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
IF_IN_ORDER_2_IN_1_AG5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IN_ORDER_2_IN_AA2(Right, Rs)
IF_IN_ORDER_2_IN_2_AG6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> IF_IN_ORDER_2_IN_3_AG7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
IF_IN_ORDER_2_IN_2_AG6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> APP_3_IN_AAG3(Ls, ._22(X, Rs), Xs)
APP_3_IN_AAG3(._22(X, Xs), Ys, ._22(X, Zs)) -> IF_APP_3_IN_1_AAG5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
APP_3_IN_AAG3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAG3(Xs, Ys, Zs)

The TRS R consists of the following rules:

in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag2(x1, x2)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag4(x2, x3, x4, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag3(x1, x2, x3)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag2(x4, x5)
IF_IN_ORDER_2_IN_3_AA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_IN_ORDER_2_IN_3_AA3(x2, x3, x7)
IN_ORDER_2_IN_AA2(x1, x2)  =  IN_ORDER_2_IN_AA
IF_IN_ORDER_2_IN_2_AG6(x1, x2, x3, x4, x5, x6)  =  IF_IN_ORDER_2_IN_2_AG3(x2, x4, x6)
IF_IN_ORDER_2_IN_1_AA5(x1, x2, x3, x4, x5)  =  IF_IN_ORDER_2_IN_1_AA1(x5)
IN_ORDER_2_IN_AG2(x1, x2)  =  IN_ORDER_2_IN_AG1(x2)
IF_IN_ORDER_2_IN_3_AG7(x1, x2, x3, x4, x5, x6, x7)  =  IF_IN_ORDER_2_IN_3_AG4(x2, x3, x4, x7)
IF_APP_3_IN_1_AAG5(x1, x2, x3, x4, x5)  =  IF_APP_3_IN_1_AAG2(x4, x5)
APP_3_IN_AAG3(x1, x2, x3)  =  APP_3_IN_AAG1(x3)
IF_IN_ORDER_2_IN_2_AA6(x1, x2, x3, x4, x5, x6)  =  IF_IN_ORDER_2_IN_2_AA2(x2, x6)
APP_3_IN_AAA3(x1, x2, x3)  =  APP_3_IN_AAA
IF_APP_3_IN_1_AAA5(x1, x2, x3, x4, x5)  =  IF_APP_3_IN_1_AAA1(x5)
IF_IN_ORDER_2_IN_1_AG5(x1, x2, x3, x4, x5)  =  IF_IN_ORDER_2_IN_1_AG2(x4, x5)

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

↳ PROLOG
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

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

IN_ORDER_2_IN_AG2(tree_33(X, Left, Right), Xs) -> IF_IN_ORDER_2_IN_1_AG5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
IN_ORDER_2_IN_AG2(tree_33(X, Left, Right), Xs) -> IN_ORDER_2_IN_AA2(Left, Ls)
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IN_ORDER_2_IN_AA2(Left, Ls)
IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IF_IN_ORDER_2_IN_2_AA6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IN_ORDER_2_IN_AA2(Right, Rs)
IF_IN_ORDER_2_IN_2_AA6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> IF_IN_ORDER_2_IN_3_AA7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
IF_IN_ORDER_2_IN_2_AA6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> APP_3_IN_AAA3(Ls, ._22(X, Rs), Xs)
APP_3_IN_AAA3(._22(X, Xs), Ys, ._22(X, Zs)) -> IF_APP_3_IN_1_AAA5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
APP_3_IN_AAA3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAA3(Xs, Ys, Zs)
IF_IN_ORDER_2_IN_1_AG5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IF_IN_ORDER_2_IN_2_AG6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
IF_IN_ORDER_2_IN_1_AG5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IN_ORDER_2_IN_AA2(Right, Rs)
IF_IN_ORDER_2_IN_2_AG6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> IF_IN_ORDER_2_IN_3_AG7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
IF_IN_ORDER_2_IN_2_AG6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> APP_3_IN_AAG3(Ls, ._22(X, Rs), Xs)
APP_3_IN_AAG3(._22(X, Xs), Ys, ._22(X, Zs)) -> IF_APP_3_IN_1_AAG5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
APP_3_IN_AAG3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAG3(Xs, Ys, Zs)

The TRS R consists of the following rules:

in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag2(x1, x2)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag4(x2, x3, x4, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag3(x1, x2, x3)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag2(x4, x5)
IF_IN_ORDER_2_IN_3_AA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_IN_ORDER_2_IN_3_AA3(x2, x3, x7)
IN_ORDER_2_IN_AA2(x1, x2)  =  IN_ORDER_2_IN_AA
IF_IN_ORDER_2_IN_2_AG6(x1, x2, x3, x4, x5, x6)  =  IF_IN_ORDER_2_IN_2_AG3(x2, x4, x6)
IF_IN_ORDER_2_IN_1_AA5(x1, x2, x3, x4, x5)  =  IF_IN_ORDER_2_IN_1_AA1(x5)
IN_ORDER_2_IN_AG2(x1, x2)  =  IN_ORDER_2_IN_AG1(x2)
IF_IN_ORDER_2_IN_3_AG7(x1, x2, x3, x4, x5, x6, x7)  =  IF_IN_ORDER_2_IN_3_AG4(x2, x3, x4, x7)
IF_APP_3_IN_1_AAG5(x1, x2, x3, x4, x5)  =  IF_APP_3_IN_1_AAG2(x4, x5)
APP_3_IN_AAG3(x1, x2, x3)  =  APP_3_IN_AAG1(x3)
IF_IN_ORDER_2_IN_2_AA6(x1, x2, x3, x4, x5, x6)  =  IF_IN_ORDER_2_IN_2_AA2(x2, x6)
APP_3_IN_AAA3(x1, x2, x3)  =  APP_3_IN_AAA
IF_APP_3_IN_1_AAA5(x1, x2, x3, x4, x5)  =  IF_APP_3_IN_1_AAA1(x5)
IF_IN_ORDER_2_IN_1_AG5(x1, x2, x3, x4, x5)  =  IF_IN_ORDER_2_IN_1_AG2(x4, x5)

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

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

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

APP_3_IN_AAG3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAG3(Xs, Ys, Zs)

The TRS R consists of the following rules:

in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag2(x1, x2)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag4(x2, x3, x4, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag3(x1, x2, x3)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag2(x4, x5)
APP_3_IN_AAG3(x1, x2, x3)  =  APP_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
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
              ↳ PiDP
              ↳ PiDP

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

APP_3_IN_AAG3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAG3(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
._22(x1, x2)  =  ._21(x2)
APP_3_IN_AAG3(x1, x2, x3)  =  APP_3_IN_AAG1(x3)

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

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

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

APP_3_IN_AAA3(._22(X, Xs), Ys, ._22(X, Zs)) -> APP_3_IN_AAA3(Xs, Ys, Zs)

The TRS R consists of the following rules:

in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag2(x1, x2)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag4(x2, x3, x4, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag3(x1, x2, x3)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag2(x4, x5)
APP_3_IN_AAA3(x1, x2, x3)  =  APP_3_IN_AAA

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

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

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

IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> IN_ORDER_2_IN_AA2(Right, Rs)
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IF_IN_ORDER_2_IN_1_AA5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
IN_ORDER_2_IN_AA2(tree_33(X, Left, Right), Xs) -> IN_ORDER_2_IN_AA2(Left, Ls)

The TRS R consists of the following rules:

in_order_2_in_ag2(void_0, []_0) -> in_order_2_out_ag2(void_0, []_0)
in_order_2_in_ag2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
in_order_2_in_aa2(void_0, []_0) -> in_order_2_out_aa2(void_0, []_0)
in_order_2_in_aa2(tree_33(X, Left, Right), Xs) -> if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_in_aa2(Left, Ls))
if_in_order_2_in_1_aa5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_aa6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_in_aaa3(Ls, ._22(X, Rs), Xs))
app_3_in_aaa3([]_0, X, X) -> app_3_out_aaa3([]_0, X, X)
app_3_in_aaa3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_in_aaa3(Xs, Ys, Zs))
if_app_3_in_1_aaa5(X, Xs, Ys, Zs, app_3_out_aaa3(Xs, Ys, Zs)) -> app_3_out_aaa3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_aa7(X, Left, Right, Xs, Ls, Rs, app_3_out_aaa3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_aa2(tree_33(X, Left, Right), Xs)
if_in_order_2_in_1_ag5(X, Left, Right, Xs, in_order_2_out_aa2(Left, Ls)) -> if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_in_aa2(Right, Rs))
if_in_order_2_in_2_ag6(X, Left, Right, Xs, Ls, in_order_2_out_aa2(Right, Rs)) -> if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_in_aag3(Ls, ._22(X, Rs), Xs))
app_3_in_aag3([]_0, X, X) -> app_3_out_aag3([]_0, X, X)
app_3_in_aag3(._22(X, Xs), Ys, ._22(X, Zs)) -> if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_in_aag3(Xs, Ys, Zs))
if_app_3_in_1_aag5(X, Xs, Ys, Zs, app_3_out_aag3(Xs, Ys, Zs)) -> app_3_out_aag3(._22(X, Xs), Ys, ._22(X, Zs))
if_in_order_2_in_3_ag7(X, Left, Right, Xs, Ls, Rs, app_3_out_aag3(Ls, ._22(X, Rs), Xs)) -> in_order_2_out_ag2(tree_33(X, Left, Right), Xs)

The argument filtering Pi contains the following mapping:
in_order_2_in_ag2(x1, x2)  =  in_order_2_in_ag1(x2)
void_0  =  void_0
[]_0  =  []_0
tree_33(x1, x2, x3)  =  tree_32(x2, x3)
._22(x1, x2)  =  ._21(x2)
in_order_2_out_ag2(x1, x2)  =  in_order_2_out_ag2(x1, x2)
if_in_order_2_in_1_ag5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_ag2(x4, x5)
in_order_2_in_aa2(x1, x2)  =  in_order_2_in_aa
in_order_2_out_aa2(x1, x2)  =  in_order_2_out_aa1(x1)
if_in_order_2_in_1_aa5(x1, x2, x3, x4, x5)  =  if_in_order_2_in_1_aa1(x5)
if_in_order_2_in_2_aa6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_aa2(x2, x6)
if_in_order_2_in_3_aa7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_aa3(x2, x3, x7)
app_3_in_aaa3(x1, x2, x3)  =  app_3_in_aaa
app_3_out_aaa3(x1, x2, x3)  =  app_3_out_aaa1(x1)
if_app_3_in_1_aaa5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aaa1(x5)
if_in_order_2_in_2_ag6(x1, x2, x3, x4, x5, x6)  =  if_in_order_2_in_2_ag3(x2, x4, x6)
if_in_order_2_in_3_ag7(x1, x2, x3, x4, x5, x6, x7)  =  if_in_order_2_in_3_ag4(x2, x3, x4, x7)
app_3_in_aag3(x1, x2, x3)  =  app_3_in_aag1(x3)
app_3_out_aag3(x1, x2, x3)  =  app_3_out_aag3(x1, x2, x3)
if_app_3_in_1_aag5(x1, x2, x3, x4, x5)  =  if_app_3_in_1_aag2(x4, x5)
IN_ORDER_2_IN_AA2(x1, x2)  =  IN_ORDER_2_IN_AA
IF_IN_ORDER_2_IN_1_AA5(x1, x2, x3, x4, x5)  =  IF_IN_ORDER_2_IN_1_AA1(x5)

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