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



PROLOG
  ↳ PrologToPiTRSProof

searchtree1(void0).
searchtree1(T) :- searchtree3(T, underscore, underscore1).
searchtree3(tree3(X, void0, void0), X, X).
searchtree3(tree3(X, void0, Right), X, Max) :- searchtree3(Right, Min, Max), less2(X, Min).
searchtree3(tree3(X, Left, void0), Min, X) :- searchtree3(Left, Min, Max), less2(Max, X).
searchtree3(tree3(X, Left, Right), Min1, Max2) :- searchtree3(Left, Min1, Max1), less2(Max1, X), searchtree3(Right, Min2, Max2), less2(X, Min2).
less2(00, s1(underscore2)).
less2(s1(X), s1(Y)) :- less2(X, Y).


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


search_tree_1_in_g1(void_0) -> search_tree_1_out_g1(void_0)
search_tree_1_in_g1(T) -> if_search_tree_1_in_1_g2(T, search_tree_3_in_gaa3(T, underscore, underscore1))
search_tree_3_in_gaa3(tree_33(X, void_0, void_0), X, X) -> search_tree_3_out_gaa3(tree_33(X, void_0, void_0), X, X)
search_tree_3_in_gaa3(tree_33(X, void_0, Right), X, Max) -> if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_in_gaa3(Right, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, void_0), Min, X) -> if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_in_gaa3(Left, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, Right), Min1, Max2) -> if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Left, Min1, Max1))
if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Left, Min1, Max1)) -> if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_in_gg2(Max1, X))
less_2_in_gg2(0_0, s_11(underscore2)) -> less_2_out_gg2(0_0, s_11(underscore2))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_out_gg2(Max1, X)) -> if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Right, Min2, Max2))
if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Right, Min2, Max2)) -> if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_in_gg2(X, Min2))
if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_out_gg2(X, Min2)) -> search_tree_3_out_gaa3(tree_33(X, Left, Right), Min1, Max2)
if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_out_gaa3(Left, Min, Max)) -> if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_in_gg2(Max, X))
if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_out_gg2(Max, X)) -> search_tree_3_out_gaa3(tree_33(X, Left, void_0), Min, X)
if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_out_gaa3(Right, Min, Max)) -> if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_in_gg2(X, Min))
if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_out_gg2(X, Min)) -> search_tree_3_out_gaa3(tree_33(X, void_0, Right), X, Max)
if_search_tree_1_in_1_g2(T, search_tree_3_out_gaa3(T, underscore, underscore1)) -> search_tree_1_out_g1(T)

The argument filtering Pi contains the following mapping:
search_tree_1_in_g1(x1)  =  search_tree_1_in_g1(x1)
void_0  =  void_0
tree_33(x1, x2, x3)  =  tree_33(x1, x2, x3)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
search_tree_1_out_g1(x1)  =  search_tree_1_out_g
if_search_tree_1_in_1_g2(x1, x2)  =  if_search_tree_1_in_1_g1(x2)
search_tree_3_in_gaa3(x1, x2, x3)  =  search_tree_3_in_gaa1(x1)
search_tree_3_out_gaa3(x1, x2, x3)  =  search_tree_3_out_gaa2(x2, x3)
if_search_tree_3_in_1_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_1_gaa2(x1, x4)
if_search_tree_3_in_3_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_3_gaa2(x1, x4)
if_search_tree_3_in_5_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_5_gaa3(x1, x3, x6)
if_search_tree_3_in_6_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_6_gaa4(x1, x3, x4, x7)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_search_tree_3_in_7_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_7_gaa3(x1, x4, x6)
if_search_tree_3_in_8_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_8_gaa3(x4, x5, x7)
if_search_tree_3_in_4_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_4_gaa3(x1, x3, x5)
if_search_tree_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_2_gaa3(x1, x3, 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:

search_tree_1_in_g1(void_0) -> search_tree_1_out_g1(void_0)
search_tree_1_in_g1(T) -> if_search_tree_1_in_1_g2(T, search_tree_3_in_gaa3(T, underscore, underscore1))
search_tree_3_in_gaa3(tree_33(X, void_0, void_0), X, X) -> search_tree_3_out_gaa3(tree_33(X, void_0, void_0), X, X)
search_tree_3_in_gaa3(tree_33(X, void_0, Right), X, Max) -> if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_in_gaa3(Right, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, void_0), Min, X) -> if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_in_gaa3(Left, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, Right), Min1, Max2) -> if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Left, Min1, Max1))
if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Left, Min1, Max1)) -> if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_in_gg2(Max1, X))
less_2_in_gg2(0_0, s_11(underscore2)) -> less_2_out_gg2(0_0, s_11(underscore2))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_out_gg2(Max1, X)) -> if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Right, Min2, Max2))
if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Right, Min2, Max2)) -> if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_in_gg2(X, Min2))
if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_out_gg2(X, Min2)) -> search_tree_3_out_gaa3(tree_33(X, Left, Right), Min1, Max2)
if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_out_gaa3(Left, Min, Max)) -> if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_in_gg2(Max, X))
if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_out_gg2(Max, X)) -> search_tree_3_out_gaa3(tree_33(X, Left, void_0), Min, X)
if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_out_gaa3(Right, Min, Max)) -> if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_in_gg2(X, Min))
if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_out_gg2(X, Min)) -> search_tree_3_out_gaa3(tree_33(X, void_0, Right), X, Max)
if_search_tree_1_in_1_g2(T, search_tree_3_out_gaa3(T, underscore, underscore1)) -> search_tree_1_out_g1(T)

The argument filtering Pi contains the following mapping:
search_tree_1_in_g1(x1)  =  search_tree_1_in_g1(x1)
void_0  =  void_0
tree_33(x1, x2, x3)  =  tree_33(x1, x2, x3)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
search_tree_1_out_g1(x1)  =  search_tree_1_out_g
if_search_tree_1_in_1_g2(x1, x2)  =  if_search_tree_1_in_1_g1(x2)
search_tree_3_in_gaa3(x1, x2, x3)  =  search_tree_3_in_gaa1(x1)
search_tree_3_out_gaa3(x1, x2, x3)  =  search_tree_3_out_gaa2(x2, x3)
if_search_tree_3_in_1_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_1_gaa2(x1, x4)
if_search_tree_3_in_3_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_3_gaa2(x1, x4)
if_search_tree_3_in_5_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_5_gaa3(x1, x3, x6)
if_search_tree_3_in_6_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_6_gaa4(x1, x3, x4, x7)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_search_tree_3_in_7_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_7_gaa3(x1, x4, x6)
if_search_tree_3_in_8_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_8_gaa3(x4, x5, x7)
if_search_tree_3_in_4_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_4_gaa3(x1, x3, x5)
if_search_tree_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_2_gaa3(x1, x3, x5)


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

SEARCH_TREE_1_IN_G1(T) -> IF_SEARCH_TREE_1_IN_1_G2(T, search_tree_3_in_gaa3(T, underscore, underscore1))
SEARCH_TREE_1_IN_G1(T) -> SEARCH_TREE_3_IN_GAA3(T, underscore, underscore1)
SEARCH_TREE_3_IN_GAA3(tree_33(X, void_0, Right), X, Max) -> IF_SEARCH_TREE_3_IN_1_GAA4(X, Right, Max, search_tree_3_in_gaa3(Right, Min, Max))
SEARCH_TREE_3_IN_GAA3(tree_33(X, void_0, Right), X, Max) -> SEARCH_TREE_3_IN_GAA3(Right, Min, Max)
SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, void_0), Min, X) -> IF_SEARCH_TREE_3_IN_3_GAA4(X, Left, Min, search_tree_3_in_gaa3(Left, Min, Max))
SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, void_0), Min, X) -> SEARCH_TREE_3_IN_GAA3(Left, Min, Max)
SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, Right), Min1, Max2) -> IF_SEARCH_TREE_3_IN_5_GAA6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Left, Min1, Max1))
SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, Right), Min1, Max2) -> SEARCH_TREE_3_IN_GAA3(Left, Min1, Max1)
IF_SEARCH_TREE_3_IN_5_GAA6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Left, Min1, Max1)) -> IF_SEARCH_TREE_3_IN_6_GAA7(X, Left, Right, Min1, Max2, Max1, less_2_in_gg2(Max1, X))
IF_SEARCH_TREE_3_IN_5_GAA6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Left, Min1, Max1)) -> LESS_2_IN_GG2(Max1, X)
LESS_2_IN_GG2(s_11(X), s_11(Y)) -> IF_LESS_2_IN_1_GG3(X, Y, less_2_in_gg2(X, Y))
LESS_2_IN_GG2(s_11(X), s_11(Y)) -> LESS_2_IN_GG2(X, Y)
IF_SEARCH_TREE_3_IN_6_GAA7(X, Left, Right, Min1, Max2, Max1, less_2_out_gg2(Max1, X)) -> IF_SEARCH_TREE_3_IN_7_GAA6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Right, Min2, Max2))
IF_SEARCH_TREE_3_IN_6_GAA7(X, Left, Right, Min1, Max2, Max1, less_2_out_gg2(Max1, X)) -> SEARCH_TREE_3_IN_GAA3(Right, Min2, Max2)
IF_SEARCH_TREE_3_IN_7_GAA6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Right, Min2, Max2)) -> IF_SEARCH_TREE_3_IN_8_GAA7(X, Left, Right, Min1, Max2, Min2, less_2_in_gg2(X, Min2))
IF_SEARCH_TREE_3_IN_7_GAA6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Right, Min2, Max2)) -> LESS_2_IN_GG2(X, Min2)
IF_SEARCH_TREE_3_IN_3_GAA4(X, Left, Min, search_tree_3_out_gaa3(Left, Min, Max)) -> IF_SEARCH_TREE_3_IN_4_GAA5(X, Left, Min, Max, less_2_in_gg2(Max, X))
IF_SEARCH_TREE_3_IN_3_GAA4(X, Left, Min, search_tree_3_out_gaa3(Left, Min, Max)) -> LESS_2_IN_GG2(Max, X)
IF_SEARCH_TREE_3_IN_1_GAA4(X, Right, Max, search_tree_3_out_gaa3(Right, Min, Max)) -> IF_SEARCH_TREE_3_IN_2_GAA5(X, Right, Max, Min, less_2_in_gg2(X, Min))
IF_SEARCH_TREE_3_IN_1_GAA4(X, Right, Max, search_tree_3_out_gaa3(Right, Min, Max)) -> LESS_2_IN_GG2(X, Min)

The TRS R consists of the following rules:

search_tree_1_in_g1(void_0) -> search_tree_1_out_g1(void_0)
search_tree_1_in_g1(T) -> if_search_tree_1_in_1_g2(T, search_tree_3_in_gaa3(T, underscore, underscore1))
search_tree_3_in_gaa3(tree_33(X, void_0, void_0), X, X) -> search_tree_3_out_gaa3(tree_33(X, void_0, void_0), X, X)
search_tree_3_in_gaa3(tree_33(X, void_0, Right), X, Max) -> if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_in_gaa3(Right, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, void_0), Min, X) -> if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_in_gaa3(Left, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, Right), Min1, Max2) -> if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Left, Min1, Max1))
if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Left, Min1, Max1)) -> if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_in_gg2(Max1, X))
less_2_in_gg2(0_0, s_11(underscore2)) -> less_2_out_gg2(0_0, s_11(underscore2))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_out_gg2(Max1, X)) -> if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Right, Min2, Max2))
if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Right, Min2, Max2)) -> if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_in_gg2(X, Min2))
if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_out_gg2(X, Min2)) -> search_tree_3_out_gaa3(tree_33(X, Left, Right), Min1, Max2)
if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_out_gaa3(Left, Min, Max)) -> if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_in_gg2(Max, X))
if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_out_gg2(Max, X)) -> search_tree_3_out_gaa3(tree_33(X, Left, void_0), Min, X)
if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_out_gaa3(Right, Min, Max)) -> if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_in_gg2(X, Min))
if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_out_gg2(X, Min)) -> search_tree_3_out_gaa3(tree_33(X, void_0, Right), X, Max)
if_search_tree_1_in_1_g2(T, search_tree_3_out_gaa3(T, underscore, underscore1)) -> search_tree_1_out_g1(T)

The argument filtering Pi contains the following mapping:
search_tree_1_in_g1(x1)  =  search_tree_1_in_g1(x1)
void_0  =  void_0
tree_33(x1, x2, x3)  =  tree_33(x1, x2, x3)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
search_tree_1_out_g1(x1)  =  search_tree_1_out_g
if_search_tree_1_in_1_g2(x1, x2)  =  if_search_tree_1_in_1_g1(x2)
search_tree_3_in_gaa3(x1, x2, x3)  =  search_tree_3_in_gaa1(x1)
search_tree_3_out_gaa3(x1, x2, x3)  =  search_tree_3_out_gaa2(x2, x3)
if_search_tree_3_in_1_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_1_gaa2(x1, x4)
if_search_tree_3_in_3_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_3_gaa2(x1, x4)
if_search_tree_3_in_5_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_5_gaa3(x1, x3, x6)
if_search_tree_3_in_6_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_6_gaa4(x1, x3, x4, x7)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_search_tree_3_in_7_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_7_gaa3(x1, x4, x6)
if_search_tree_3_in_8_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_8_gaa3(x4, x5, x7)
if_search_tree_3_in_4_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_4_gaa3(x1, x3, x5)
if_search_tree_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_2_gaa3(x1, x3, x5)
IF_SEARCH_TREE_3_IN_1_GAA4(x1, x2, x3, x4)  =  IF_SEARCH_TREE_3_IN_1_GAA2(x1, x4)
IF_SEARCH_TREE_3_IN_5_GAA6(x1, x2, x3, x4, x5, x6)  =  IF_SEARCH_TREE_3_IN_5_GAA3(x1, x3, x6)
IF_SEARCH_TREE_3_IN_8_GAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SEARCH_TREE_3_IN_8_GAA3(x4, x5, x7)
SEARCH_TREE_3_IN_GAA3(x1, x2, x3)  =  SEARCH_TREE_3_IN_GAA1(x1)
IF_SEARCH_TREE_3_IN_6_GAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SEARCH_TREE_3_IN_6_GAA4(x1, x3, x4, x7)
IF_SEARCH_TREE_3_IN_3_GAA4(x1, x2, x3, x4)  =  IF_SEARCH_TREE_3_IN_3_GAA2(x1, x4)
IF_SEARCH_TREE_1_IN_1_G2(x1, x2)  =  IF_SEARCH_TREE_1_IN_1_G1(x2)
IF_LESS_2_IN_1_GG3(x1, x2, x3)  =  IF_LESS_2_IN_1_GG1(x3)
IF_SEARCH_TREE_3_IN_4_GAA5(x1, x2, x3, x4, x5)  =  IF_SEARCH_TREE_3_IN_4_GAA3(x1, x3, x5)
IF_SEARCH_TREE_3_IN_2_GAA5(x1, x2, x3, x4, x5)  =  IF_SEARCH_TREE_3_IN_2_GAA3(x1, x3, x5)
IF_SEARCH_TREE_3_IN_7_GAA6(x1, x2, x3, x4, x5, x6)  =  IF_SEARCH_TREE_3_IN_7_GAA3(x1, x4, x6)
SEARCH_TREE_1_IN_G1(x1)  =  SEARCH_TREE_1_IN_G1(x1)
LESS_2_IN_GG2(x1, x2)  =  LESS_2_IN_GG2(x1, x2)

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

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

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

SEARCH_TREE_1_IN_G1(T) -> IF_SEARCH_TREE_1_IN_1_G2(T, search_tree_3_in_gaa3(T, underscore, underscore1))
SEARCH_TREE_1_IN_G1(T) -> SEARCH_TREE_3_IN_GAA3(T, underscore, underscore1)
SEARCH_TREE_3_IN_GAA3(tree_33(X, void_0, Right), X, Max) -> IF_SEARCH_TREE_3_IN_1_GAA4(X, Right, Max, search_tree_3_in_gaa3(Right, Min, Max))
SEARCH_TREE_3_IN_GAA3(tree_33(X, void_0, Right), X, Max) -> SEARCH_TREE_3_IN_GAA3(Right, Min, Max)
SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, void_0), Min, X) -> IF_SEARCH_TREE_3_IN_3_GAA4(X, Left, Min, search_tree_3_in_gaa3(Left, Min, Max))
SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, void_0), Min, X) -> SEARCH_TREE_3_IN_GAA3(Left, Min, Max)
SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, Right), Min1, Max2) -> IF_SEARCH_TREE_3_IN_5_GAA6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Left, Min1, Max1))
SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, Right), Min1, Max2) -> SEARCH_TREE_3_IN_GAA3(Left, Min1, Max1)
IF_SEARCH_TREE_3_IN_5_GAA6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Left, Min1, Max1)) -> IF_SEARCH_TREE_3_IN_6_GAA7(X, Left, Right, Min1, Max2, Max1, less_2_in_gg2(Max1, X))
IF_SEARCH_TREE_3_IN_5_GAA6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Left, Min1, Max1)) -> LESS_2_IN_GG2(Max1, X)
LESS_2_IN_GG2(s_11(X), s_11(Y)) -> IF_LESS_2_IN_1_GG3(X, Y, less_2_in_gg2(X, Y))
LESS_2_IN_GG2(s_11(X), s_11(Y)) -> LESS_2_IN_GG2(X, Y)
IF_SEARCH_TREE_3_IN_6_GAA7(X, Left, Right, Min1, Max2, Max1, less_2_out_gg2(Max1, X)) -> IF_SEARCH_TREE_3_IN_7_GAA6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Right, Min2, Max2))
IF_SEARCH_TREE_3_IN_6_GAA7(X, Left, Right, Min1, Max2, Max1, less_2_out_gg2(Max1, X)) -> SEARCH_TREE_3_IN_GAA3(Right, Min2, Max2)
IF_SEARCH_TREE_3_IN_7_GAA6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Right, Min2, Max2)) -> IF_SEARCH_TREE_3_IN_8_GAA7(X, Left, Right, Min1, Max2, Min2, less_2_in_gg2(X, Min2))
IF_SEARCH_TREE_3_IN_7_GAA6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Right, Min2, Max2)) -> LESS_2_IN_GG2(X, Min2)
IF_SEARCH_TREE_3_IN_3_GAA4(X, Left, Min, search_tree_3_out_gaa3(Left, Min, Max)) -> IF_SEARCH_TREE_3_IN_4_GAA5(X, Left, Min, Max, less_2_in_gg2(Max, X))
IF_SEARCH_TREE_3_IN_3_GAA4(X, Left, Min, search_tree_3_out_gaa3(Left, Min, Max)) -> LESS_2_IN_GG2(Max, X)
IF_SEARCH_TREE_3_IN_1_GAA4(X, Right, Max, search_tree_3_out_gaa3(Right, Min, Max)) -> IF_SEARCH_TREE_3_IN_2_GAA5(X, Right, Max, Min, less_2_in_gg2(X, Min))
IF_SEARCH_TREE_3_IN_1_GAA4(X, Right, Max, search_tree_3_out_gaa3(Right, Min, Max)) -> LESS_2_IN_GG2(X, Min)

The TRS R consists of the following rules:

search_tree_1_in_g1(void_0) -> search_tree_1_out_g1(void_0)
search_tree_1_in_g1(T) -> if_search_tree_1_in_1_g2(T, search_tree_3_in_gaa3(T, underscore, underscore1))
search_tree_3_in_gaa3(tree_33(X, void_0, void_0), X, X) -> search_tree_3_out_gaa3(tree_33(X, void_0, void_0), X, X)
search_tree_3_in_gaa3(tree_33(X, void_0, Right), X, Max) -> if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_in_gaa3(Right, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, void_0), Min, X) -> if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_in_gaa3(Left, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, Right), Min1, Max2) -> if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Left, Min1, Max1))
if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Left, Min1, Max1)) -> if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_in_gg2(Max1, X))
less_2_in_gg2(0_0, s_11(underscore2)) -> less_2_out_gg2(0_0, s_11(underscore2))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_out_gg2(Max1, X)) -> if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Right, Min2, Max2))
if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Right, Min2, Max2)) -> if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_in_gg2(X, Min2))
if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_out_gg2(X, Min2)) -> search_tree_3_out_gaa3(tree_33(X, Left, Right), Min1, Max2)
if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_out_gaa3(Left, Min, Max)) -> if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_in_gg2(Max, X))
if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_out_gg2(Max, X)) -> search_tree_3_out_gaa3(tree_33(X, Left, void_0), Min, X)
if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_out_gaa3(Right, Min, Max)) -> if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_in_gg2(X, Min))
if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_out_gg2(X, Min)) -> search_tree_3_out_gaa3(tree_33(X, void_0, Right), X, Max)
if_search_tree_1_in_1_g2(T, search_tree_3_out_gaa3(T, underscore, underscore1)) -> search_tree_1_out_g1(T)

The argument filtering Pi contains the following mapping:
search_tree_1_in_g1(x1)  =  search_tree_1_in_g1(x1)
void_0  =  void_0
tree_33(x1, x2, x3)  =  tree_33(x1, x2, x3)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
search_tree_1_out_g1(x1)  =  search_tree_1_out_g
if_search_tree_1_in_1_g2(x1, x2)  =  if_search_tree_1_in_1_g1(x2)
search_tree_3_in_gaa3(x1, x2, x3)  =  search_tree_3_in_gaa1(x1)
search_tree_3_out_gaa3(x1, x2, x3)  =  search_tree_3_out_gaa2(x2, x3)
if_search_tree_3_in_1_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_1_gaa2(x1, x4)
if_search_tree_3_in_3_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_3_gaa2(x1, x4)
if_search_tree_3_in_5_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_5_gaa3(x1, x3, x6)
if_search_tree_3_in_6_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_6_gaa4(x1, x3, x4, x7)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_search_tree_3_in_7_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_7_gaa3(x1, x4, x6)
if_search_tree_3_in_8_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_8_gaa3(x4, x5, x7)
if_search_tree_3_in_4_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_4_gaa3(x1, x3, x5)
if_search_tree_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_2_gaa3(x1, x3, x5)
IF_SEARCH_TREE_3_IN_1_GAA4(x1, x2, x3, x4)  =  IF_SEARCH_TREE_3_IN_1_GAA2(x1, x4)
IF_SEARCH_TREE_3_IN_5_GAA6(x1, x2, x3, x4, x5, x6)  =  IF_SEARCH_TREE_3_IN_5_GAA3(x1, x3, x6)
IF_SEARCH_TREE_3_IN_8_GAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SEARCH_TREE_3_IN_8_GAA3(x4, x5, x7)
SEARCH_TREE_3_IN_GAA3(x1, x2, x3)  =  SEARCH_TREE_3_IN_GAA1(x1)
IF_SEARCH_TREE_3_IN_6_GAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SEARCH_TREE_3_IN_6_GAA4(x1, x3, x4, x7)
IF_SEARCH_TREE_3_IN_3_GAA4(x1, x2, x3, x4)  =  IF_SEARCH_TREE_3_IN_3_GAA2(x1, x4)
IF_SEARCH_TREE_1_IN_1_G2(x1, x2)  =  IF_SEARCH_TREE_1_IN_1_G1(x2)
IF_LESS_2_IN_1_GG3(x1, x2, x3)  =  IF_LESS_2_IN_1_GG1(x3)
IF_SEARCH_TREE_3_IN_4_GAA5(x1, x2, x3, x4, x5)  =  IF_SEARCH_TREE_3_IN_4_GAA3(x1, x3, x5)
IF_SEARCH_TREE_3_IN_2_GAA5(x1, x2, x3, x4, x5)  =  IF_SEARCH_TREE_3_IN_2_GAA3(x1, x3, x5)
IF_SEARCH_TREE_3_IN_7_GAA6(x1, x2, x3, x4, x5, x6)  =  IF_SEARCH_TREE_3_IN_7_GAA3(x1, x4, x6)
SEARCH_TREE_1_IN_G1(x1)  =  SEARCH_TREE_1_IN_G1(x1)
LESS_2_IN_GG2(x1, x2)  =  LESS_2_IN_GG2(x1, x2)

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

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

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

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

The TRS R consists of the following rules:

search_tree_1_in_g1(void_0) -> search_tree_1_out_g1(void_0)
search_tree_1_in_g1(T) -> if_search_tree_1_in_1_g2(T, search_tree_3_in_gaa3(T, underscore, underscore1))
search_tree_3_in_gaa3(tree_33(X, void_0, void_0), X, X) -> search_tree_3_out_gaa3(tree_33(X, void_0, void_0), X, X)
search_tree_3_in_gaa3(tree_33(X, void_0, Right), X, Max) -> if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_in_gaa3(Right, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, void_0), Min, X) -> if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_in_gaa3(Left, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, Right), Min1, Max2) -> if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Left, Min1, Max1))
if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Left, Min1, Max1)) -> if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_in_gg2(Max1, X))
less_2_in_gg2(0_0, s_11(underscore2)) -> less_2_out_gg2(0_0, s_11(underscore2))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_out_gg2(Max1, X)) -> if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Right, Min2, Max2))
if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Right, Min2, Max2)) -> if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_in_gg2(X, Min2))
if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_out_gg2(X, Min2)) -> search_tree_3_out_gaa3(tree_33(X, Left, Right), Min1, Max2)
if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_out_gaa3(Left, Min, Max)) -> if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_in_gg2(Max, X))
if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_out_gg2(Max, X)) -> search_tree_3_out_gaa3(tree_33(X, Left, void_0), Min, X)
if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_out_gaa3(Right, Min, Max)) -> if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_in_gg2(X, Min))
if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_out_gg2(X, Min)) -> search_tree_3_out_gaa3(tree_33(X, void_0, Right), X, Max)
if_search_tree_1_in_1_g2(T, search_tree_3_out_gaa3(T, underscore, underscore1)) -> search_tree_1_out_g1(T)

The argument filtering Pi contains the following mapping:
search_tree_1_in_g1(x1)  =  search_tree_1_in_g1(x1)
void_0  =  void_0
tree_33(x1, x2, x3)  =  tree_33(x1, x2, x3)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
search_tree_1_out_g1(x1)  =  search_tree_1_out_g
if_search_tree_1_in_1_g2(x1, x2)  =  if_search_tree_1_in_1_g1(x2)
search_tree_3_in_gaa3(x1, x2, x3)  =  search_tree_3_in_gaa1(x1)
search_tree_3_out_gaa3(x1, x2, x3)  =  search_tree_3_out_gaa2(x2, x3)
if_search_tree_3_in_1_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_1_gaa2(x1, x4)
if_search_tree_3_in_3_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_3_gaa2(x1, x4)
if_search_tree_3_in_5_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_5_gaa3(x1, x3, x6)
if_search_tree_3_in_6_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_6_gaa4(x1, x3, x4, x7)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_search_tree_3_in_7_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_7_gaa3(x1, x4, x6)
if_search_tree_3_in_8_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_8_gaa3(x4, x5, x7)
if_search_tree_3_in_4_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_4_gaa3(x1, x3, x5)
if_search_tree_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_2_gaa3(x1, x3, x5)
LESS_2_IN_GG2(x1, x2)  =  LESS_2_IN_GG2(x1, x2)

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

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

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

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

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

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

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

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

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {LESS_2_IN_GG2}.
By using the subterm criterion together with the size-change analysis we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



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

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

SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, Right), Min1, Max2) -> IF_SEARCH_TREE_3_IN_5_GAA6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Left, Min1, Max1))
SEARCH_TREE_3_IN_GAA3(tree_33(X, void_0, Right), X, Max) -> SEARCH_TREE_3_IN_GAA3(Right, Min, Max)
SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, void_0), Min, X) -> SEARCH_TREE_3_IN_GAA3(Left, Min, Max)
IF_SEARCH_TREE_3_IN_6_GAA7(X, Left, Right, Min1, Max2, Max1, less_2_out_gg2(Max1, X)) -> SEARCH_TREE_3_IN_GAA3(Right, Min2, Max2)
IF_SEARCH_TREE_3_IN_5_GAA6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Left, Min1, Max1)) -> IF_SEARCH_TREE_3_IN_6_GAA7(X, Left, Right, Min1, Max2, Max1, less_2_in_gg2(Max1, X))
SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, Right), Min1, Max2) -> SEARCH_TREE_3_IN_GAA3(Left, Min1, Max1)

The TRS R consists of the following rules:

search_tree_1_in_g1(void_0) -> search_tree_1_out_g1(void_0)
search_tree_1_in_g1(T) -> if_search_tree_1_in_1_g2(T, search_tree_3_in_gaa3(T, underscore, underscore1))
search_tree_3_in_gaa3(tree_33(X, void_0, void_0), X, X) -> search_tree_3_out_gaa3(tree_33(X, void_0, void_0), X, X)
search_tree_3_in_gaa3(tree_33(X, void_0, Right), X, Max) -> if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_in_gaa3(Right, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, void_0), Min, X) -> if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_in_gaa3(Left, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, Right), Min1, Max2) -> if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Left, Min1, Max1))
if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Left, Min1, Max1)) -> if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_in_gg2(Max1, X))
less_2_in_gg2(0_0, s_11(underscore2)) -> less_2_out_gg2(0_0, s_11(underscore2))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_out_gg2(Max1, X)) -> if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Right, Min2, Max2))
if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Right, Min2, Max2)) -> if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_in_gg2(X, Min2))
if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_out_gg2(X, Min2)) -> search_tree_3_out_gaa3(tree_33(X, Left, Right), Min1, Max2)
if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_out_gaa3(Left, Min, Max)) -> if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_in_gg2(Max, X))
if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_out_gg2(Max, X)) -> search_tree_3_out_gaa3(tree_33(X, Left, void_0), Min, X)
if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_out_gaa3(Right, Min, Max)) -> if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_in_gg2(X, Min))
if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_out_gg2(X, Min)) -> search_tree_3_out_gaa3(tree_33(X, void_0, Right), X, Max)
if_search_tree_1_in_1_g2(T, search_tree_3_out_gaa3(T, underscore, underscore1)) -> search_tree_1_out_g1(T)

The argument filtering Pi contains the following mapping:
search_tree_1_in_g1(x1)  =  search_tree_1_in_g1(x1)
void_0  =  void_0
tree_33(x1, x2, x3)  =  tree_33(x1, x2, x3)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
search_tree_1_out_g1(x1)  =  search_tree_1_out_g
if_search_tree_1_in_1_g2(x1, x2)  =  if_search_tree_1_in_1_g1(x2)
search_tree_3_in_gaa3(x1, x2, x3)  =  search_tree_3_in_gaa1(x1)
search_tree_3_out_gaa3(x1, x2, x3)  =  search_tree_3_out_gaa2(x2, x3)
if_search_tree_3_in_1_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_1_gaa2(x1, x4)
if_search_tree_3_in_3_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_3_gaa2(x1, x4)
if_search_tree_3_in_5_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_5_gaa3(x1, x3, x6)
if_search_tree_3_in_6_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_6_gaa4(x1, x3, x4, x7)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_search_tree_3_in_7_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_7_gaa3(x1, x4, x6)
if_search_tree_3_in_8_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_8_gaa3(x4, x5, x7)
if_search_tree_3_in_4_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_4_gaa3(x1, x3, x5)
if_search_tree_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_2_gaa3(x1, x3, x5)
IF_SEARCH_TREE_3_IN_5_GAA6(x1, x2, x3, x4, x5, x6)  =  IF_SEARCH_TREE_3_IN_5_GAA3(x1, x3, x6)
SEARCH_TREE_3_IN_GAA3(x1, x2, x3)  =  SEARCH_TREE_3_IN_GAA1(x1)
IF_SEARCH_TREE_3_IN_6_GAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SEARCH_TREE_3_IN_6_GAA4(x1, x3, x4, x7)

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

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

SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, Right), Min1, Max2) -> IF_SEARCH_TREE_3_IN_5_GAA6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Left, Min1, Max1))
SEARCH_TREE_3_IN_GAA3(tree_33(X, void_0, Right), X, Max) -> SEARCH_TREE_3_IN_GAA3(Right, Min, Max)
SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, void_0), Min, X) -> SEARCH_TREE_3_IN_GAA3(Left, Min, Max)
IF_SEARCH_TREE_3_IN_6_GAA7(X, Left, Right, Min1, Max2, Max1, less_2_out_gg2(Max1, X)) -> SEARCH_TREE_3_IN_GAA3(Right, Min2, Max2)
IF_SEARCH_TREE_3_IN_5_GAA6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Left, Min1, Max1)) -> IF_SEARCH_TREE_3_IN_6_GAA7(X, Left, Right, Min1, Max2, Max1, less_2_in_gg2(Max1, X))
SEARCH_TREE_3_IN_GAA3(tree_33(X, Left, Right), Min1, Max2) -> SEARCH_TREE_3_IN_GAA3(Left, Min1, Max1)

The TRS R consists of the following rules:

search_tree_3_in_gaa3(tree_33(X, void_0, void_0), X, X) -> search_tree_3_out_gaa3(tree_33(X, void_0, void_0), X, X)
search_tree_3_in_gaa3(tree_33(X, void_0, Right), X, Max) -> if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_in_gaa3(Right, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, void_0), Min, X) -> if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_in_gaa3(Left, Min, Max))
search_tree_3_in_gaa3(tree_33(X, Left, Right), Min1, Max2) -> if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Left, Min1, Max1))
less_2_in_gg2(0_0, s_11(underscore2)) -> less_2_out_gg2(0_0, s_11(underscore2))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_search_tree_3_in_1_gaa4(X, Right, Max, search_tree_3_out_gaa3(Right, Min, Max)) -> if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_in_gg2(X, Min))
if_search_tree_3_in_3_gaa4(X, Left, Min, search_tree_3_out_gaa3(Left, Min, Max)) -> if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_in_gg2(Max, X))
if_search_tree_3_in_5_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Left, Min1, Max1)) -> if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_in_gg2(Max1, X))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_search_tree_3_in_2_gaa5(X, Right, Max, Min, less_2_out_gg2(X, Min)) -> search_tree_3_out_gaa3(tree_33(X, void_0, Right), X, Max)
if_search_tree_3_in_4_gaa5(X, Left, Min, Max, less_2_out_gg2(Max, X)) -> search_tree_3_out_gaa3(tree_33(X, Left, void_0), Min, X)
if_search_tree_3_in_6_gaa7(X, Left, Right, Min1, Max2, Max1, less_2_out_gg2(Max1, X)) -> if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_in_gaa3(Right, Min2, Max2))
if_search_tree_3_in_7_gaa6(X, Left, Right, Min1, Max2, search_tree_3_out_gaa3(Right, Min2, Max2)) -> if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_in_gg2(X, Min2))
if_search_tree_3_in_8_gaa7(X, Left, Right, Min1, Max2, Min2, less_2_out_gg2(X, Min2)) -> search_tree_3_out_gaa3(tree_33(X, Left, Right), Min1, Max2)

The argument filtering Pi contains the following mapping:
void_0  =  void_0
tree_33(x1, x2, x3)  =  tree_33(x1, x2, x3)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
search_tree_3_in_gaa3(x1, x2, x3)  =  search_tree_3_in_gaa1(x1)
search_tree_3_out_gaa3(x1, x2, x3)  =  search_tree_3_out_gaa2(x2, x3)
if_search_tree_3_in_1_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_1_gaa2(x1, x4)
if_search_tree_3_in_3_gaa4(x1, x2, x3, x4)  =  if_search_tree_3_in_3_gaa2(x1, x4)
if_search_tree_3_in_5_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_5_gaa3(x1, x3, x6)
if_search_tree_3_in_6_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_6_gaa4(x1, x3, x4, x7)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_search_tree_3_in_7_gaa6(x1, x2, x3, x4, x5, x6)  =  if_search_tree_3_in_7_gaa3(x1, x4, x6)
if_search_tree_3_in_8_gaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_search_tree_3_in_8_gaa3(x4, x5, x7)
if_search_tree_3_in_4_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_4_gaa3(x1, x3, x5)
if_search_tree_3_in_2_gaa5(x1, x2, x3, x4, x5)  =  if_search_tree_3_in_2_gaa3(x1, x3, x5)
IF_SEARCH_TREE_3_IN_5_GAA6(x1, x2, x3, x4, x5, x6)  =  IF_SEARCH_TREE_3_IN_5_GAA3(x1, x3, x6)
SEARCH_TREE_3_IN_GAA3(x1, x2, x3)  =  SEARCH_TREE_3_IN_GAA1(x1)
IF_SEARCH_TREE_3_IN_6_GAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_SEARCH_TREE_3_IN_6_GAA4(x1, x3, x4, x7)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

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

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

SEARCH_TREE_3_IN_GAA1(tree_33(X, Left, Right)) -> IF_SEARCH_TREE_3_IN_5_GAA3(X, Right, search_tree_3_in_gaa1(Left))
SEARCH_TREE_3_IN_GAA1(tree_33(X, void_0, Right)) -> SEARCH_TREE_3_IN_GAA1(Right)
SEARCH_TREE_3_IN_GAA1(tree_33(X, Left, void_0)) -> SEARCH_TREE_3_IN_GAA1(Left)
IF_SEARCH_TREE_3_IN_6_GAA4(X, Right, Min1, less_2_out_gg) -> SEARCH_TREE_3_IN_GAA1(Right)
IF_SEARCH_TREE_3_IN_5_GAA3(X, Right, search_tree_3_out_gaa2(Min1, Max1)) -> IF_SEARCH_TREE_3_IN_6_GAA4(X, Right, Min1, less_2_in_gg2(Max1, X))
SEARCH_TREE_3_IN_GAA1(tree_33(X, Left, Right)) -> SEARCH_TREE_3_IN_GAA1(Left)

The TRS R consists of the following rules:

search_tree_3_in_gaa1(tree_33(X, void_0, void_0)) -> search_tree_3_out_gaa2(X, X)
search_tree_3_in_gaa1(tree_33(X, void_0, Right)) -> if_search_tree_3_in_1_gaa2(X, search_tree_3_in_gaa1(Right))
search_tree_3_in_gaa1(tree_33(X, Left, void_0)) -> if_search_tree_3_in_3_gaa2(X, search_tree_3_in_gaa1(Left))
search_tree_3_in_gaa1(tree_33(X, Left, Right)) -> if_search_tree_3_in_5_gaa3(X, Right, search_tree_3_in_gaa1(Left))
less_2_in_gg2(0_0, s_11(underscore2)) -> less_2_out_gg
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg1(less_2_in_gg2(X, Y))
if_search_tree_3_in_1_gaa2(X, search_tree_3_out_gaa2(Min, Max)) -> if_search_tree_3_in_2_gaa3(X, Max, less_2_in_gg2(X, Min))
if_search_tree_3_in_3_gaa2(X, search_tree_3_out_gaa2(Min, Max)) -> if_search_tree_3_in_4_gaa3(X, Min, less_2_in_gg2(Max, X))
if_search_tree_3_in_5_gaa3(X, Right, search_tree_3_out_gaa2(Min1, Max1)) -> if_search_tree_3_in_6_gaa4(X, Right, Min1, less_2_in_gg2(Max1, X))
if_less_2_in_1_gg1(less_2_out_gg) -> less_2_out_gg
if_search_tree_3_in_2_gaa3(X, Max, less_2_out_gg) -> search_tree_3_out_gaa2(X, Max)
if_search_tree_3_in_4_gaa3(X, Min, less_2_out_gg) -> search_tree_3_out_gaa2(Min, X)
if_search_tree_3_in_6_gaa4(X, Right, Min1, less_2_out_gg) -> if_search_tree_3_in_7_gaa3(X, Min1, search_tree_3_in_gaa1(Right))
if_search_tree_3_in_7_gaa3(X, Min1, search_tree_3_out_gaa2(Min2, Max2)) -> if_search_tree_3_in_8_gaa3(Min1, Max2, less_2_in_gg2(X, Min2))
if_search_tree_3_in_8_gaa3(Min1, Max2, less_2_out_gg) -> search_tree_3_out_gaa2(Min1, Max2)

The set Q consists of the following terms:

search_tree_3_in_gaa1(x0)
less_2_in_gg2(x0, x1)
if_search_tree_3_in_1_gaa2(x0, x1)
if_search_tree_3_in_3_gaa2(x0, x1)
if_search_tree_3_in_5_gaa3(x0, x1, x2)
if_less_2_in_1_gg1(x0)
if_search_tree_3_in_2_gaa3(x0, x1, x2)
if_search_tree_3_in_4_gaa3(x0, x1, x2)
if_search_tree_3_in_6_gaa4(x0, x1, x2, x3)
if_search_tree_3_in_7_gaa3(x0, x1, x2)
if_search_tree_3_in_8_gaa3(x0, x1, x2)

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