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



PROLOG
  ↳ PrologToPiTRSProof

bintree1(void0).
bintree1(tree3(underscore, Left, Right)) :- bintree1(Left), bintree1(Right).


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


bin_tree_1_in_g1(void_0) -> bin_tree_1_out_g1(void_0)
bin_tree_1_in_g1(tree_33(underscore, Left, Right)) -> if_bin_tree_1_in_1_g4(underscore, Left, Right, bin_tree_1_in_g1(Left))
if_bin_tree_1_in_1_g4(underscore, Left, Right, bin_tree_1_out_g1(Left)) -> if_bin_tree_1_in_2_g4(underscore, Left, Right, bin_tree_1_in_g1(Right))
if_bin_tree_1_in_2_g4(underscore, Left, Right, bin_tree_1_out_g1(Right)) -> bin_tree_1_out_g1(tree_33(underscore, Left, Right))

The argument filtering Pi contains the following mapping:
bin_tree_1_in_g1(x1)  =  bin_tree_1_in_g1(x1)
void_0  =  void_0
tree_33(x1, x2, x3)  =  tree_33(x1, x2, x3)
bin_tree_1_out_g1(x1)  =  bin_tree_1_out_g
if_bin_tree_1_in_1_g4(x1, x2, x3, x4)  =  if_bin_tree_1_in_1_g2(x3, x4)
if_bin_tree_1_in_2_g4(x1, x2, x3, x4)  =  if_bin_tree_1_in_2_g1(x4)

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:

bin_tree_1_in_g1(void_0) -> bin_tree_1_out_g1(void_0)
bin_tree_1_in_g1(tree_33(underscore, Left, Right)) -> if_bin_tree_1_in_1_g4(underscore, Left, Right, bin_tree_1_in_g1(Left))
if_bin_tree_1_in_1_g4(underscore, Left, Right, bin_tree_1_out_g1(Left)) -> if_bin_tree_1_in_2_g4(underscore, Left, Right, bin_tree_1_in_g1(Right))
if_bin_tree_1_in_2_g4(underscore, Left, Right, bin_tree_1_out_g1(Right)) -> bin_tree_1_out_g1(tree_33(underscore, Left, Right))

The argument filtering Pi contains the following mapping:
bin_tree_1_in_g1(x1)  =  bin_tree_1_in_g1(x1)
void_0  =  void_0
tree_33(x1, x2, x3)  =  tree_33(x1, x2, x3)
bin_tree_1_out_g1(x1)  =  bin_tree_1_out_g
if_bin_tree_1_in_1_g4(x1, x2, x3, x4)  =  if_bin_tree_1_in_1_g2(x3, x4)
if_bin_tree_1_in_2_g4(x1, x2, x3, x4)  =  if_bin_tree_1_in_2_g1(x4)


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

BIN_TREE_1_IN_G1(tree_33(underscore, Left, Right)) -> IF_BIN_TREE_1_IN_1_G4(underscore, Left, Right, bin_tree_1_in_g1(Left))
BIN_TREE_1_IN_G1(tree_33(underscore, Left, Right)) -> BIN_TREE_1_IN_G1(Left)
IF_BIN_TREE_1_IN_1_G4(underscore, Left, Right, bin_tree_1_out_g1(Left)) -> IF_BIN_TREE_1_IN_2_G4(underscore, Left, Right, bin_tree_1_in_g1(Right))
IF_BIN_TREE_1_IN_1_G4(underscore, Left, Right, bin_tree_1_out_g1(Left)) -> BIN_TREE_1_IN_G1(Right)

The TRS R consists of the following rules:

bin_tree_1_in_g1(void_0) -> bin_tree_1_out_g1(void_0)
bin_tree_1_in_g1(tree_33(underscore, Left, Right)) -> if_bin_tree_1_in_1_g4(underscore, Left, Right, bin_tree_1_in_g1(Left))
if_bin_tree_1_in_1_g4(underscore, Left, Right, bin_tree_1_out_g1(Left)) -> if_bin_tree_1_in_2_g4(underscore, Left, Right, bin_tree_1_in_g1(Right))
if_bin_tree_1_in_2_g4(underscore, Left, Right, bin_tree_1_out_g1(Right)) -> bin_tree_1_out_g1(tree_33(underscore, Left, Right))

The argument filtering Pi contains the following mapping:
bin_tree_1_in_g1(x1)  =  bin_tree_1_in_g1(x1)
void_0  =  void_0
tree_33(x1, x2, x3)  =  tree_33(x1, x2, x3)
bin_tree_1_out_g1(x1)  =  bin_tree_1_out_g
if_bin_tree_1_in_1_g4(x1, x2, x3, x4)  =  if_bin_tree_1_in_1_g2(x3, x4)
if_bin_tree_1_in_2_g4(x1, x2, x3, x4)  =  if_bin_tree_1_in_2_g1(x4)
IF_BIN_TREE_1_IN_2_G4(x1, x2, x3, x4)  =  IF_BIN_TREE_1_IN_2_G1(x4)
BIN_TREE_1_IN_G1(x1)  =  BIN_TREE_1_IN_G1(x1)
IF_BIN_TREE_1_IN_1_G4(x1, x2, x3, x4)  =  IF_BIN_TREE_1_IN_1_G2(x3, x4)

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

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

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

BIN_TREE_1_IN_G1(tree_33(underscore, Left, Right)) -> IF_BIN_TREE_1_IN_1_G4(underscore, Left, Right, bin_tree_1_in_g1(Left))
BIN_TREE_1_IN_G1(tree_33(underscore, Left, Right)) -> BIN_TREE_1_IN_G1(Left)
IF_BIN_TREE_1_IN_1_G4(underscore, Left, Right, bin_tree_1_out_g1(Left)) -> IF_BIN_TREE_1_IN_2_G4(underscore, Left, Right, bin_tree_1_in_g1(Right))
IF_BIN_TREE_1_IN_1_G4(underscore, Left, Right, bin_tree_1_out_g1(Left)) -> BIN_TREE_1_IN_G1(Right)

The TRS R consists of the following rules:

bin_tree_1_in_g1(void_0) -> bin_tree_1_out_g1(void_0)
bin_tree_1_in_g1(tree_33(underscore, Left, Right)) -> if_bin_tree_1_in_1_g4(underscore, Left, Right, bin_tree_1_in_g1(Left))
if_bin_tree_1_in_1_g4(underscore, Left, Right, bin_tree_1_out_g1(Left)) -> if_bin_tree_1_in_2_g4(underscore, Left, Right, bin_tree_1_in_g1(Right))
if_bin_tree_1_in_2_g4(underscore, Left, Right, bin_tree_1_out_g1(Right)) -> bin_tree_1_out_g1(tree_33(underscore, Left, Right))

The argument filtering Pi contains the following mapping:
bin_tree_1_in_g1(x1)  =  bin_tree_1_in_g1(x1)
void_0  =  void_0
tree_33(x1, x2, x3)  =  tree_33(x1, x2, x3)
bin_tree_1_out_g1(x1)  =  bin_tree_1_out_g
if_bin_tree_1_in_1_g4(x1, x2, x3, x4)  =  if_bin_tree_1_in_1_g2(x3, x4)
if_bin_tree_1_in_2_g4(x1, x2, x3, x4)  =  if_bin_tree_1_in_2_g1(x4)
IF_BIN_TREE_1_IN_2_G4(x1, x2, x3, x4)  =  IF_BIN_TREE_1_IN_2_G1(x4)
BIN_TREE_1_IN_G1(x1)  =  BIN_TREE_1_IN_G1(x1)
IF_BIN_TREE_1_IN_1_G4(x1, x2, x3, x4)  =  IF_BIN_TREE_1_IN_1_G2(x3, x4)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph contains 1 SCC with 1 less node.

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

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

IF_BIN_TREE_1_IN_1_G4(underscore, Left, Right, bin_tree_1_out_g1(Left)) -> BIN_TREE_1_IN_G1(Right)
BIN_TREE_1_IN_G1(tree_33(underscore, Left, Right)) -> BIN_TREE_1_IN_G1(Left)
BIN_TREE_1_IN_G1(tree_33(underscore, Left, Right)) -> IF_BIN_TREE_1_IN_1_G4(underscore, Left, Right, bin_tree_1_in_g1(Left))

The TRS R consists of the following rules:

bin_tree_1_in_g1(void_0) -> bin_tree_1_out_g1(void_0)
bin_tree_1_in_g1(tree_33(underscore, Left, Right)) -> if_bin_tree_1_in_1_g4(underscore, Left, Right, bin_tree_1_in_g1(Left))
if_bin_tree_1_in_1_g4(underscore, Left, Right, bin_tree_1_out_g1(Left)) -> if_bin_tree_1_in_2_g4(underscore, Left, Right, bin_tree_1_in_g1(Right))
if_bin_tree_1_in_2_g4(underscore, Left, Right, bin_tree_1_out_g1(Right)) -> bin_tree_1_out_g1(tree_33(underscore, Left, Right))

The argument filtering Pi contains the following mapping:
bin_tree_1_in_g1(x1)  =  bin_tree_1_in_g1(x1)
void_0  =  void_0
tree_33(x1, x2, x3)  =  tree_33(x1, x2, x3)
bin_tree_1_out_g1(x1)  =  bin_tree_1_out_g
if_bin_tree_1_in_1_g4(x1, x2, x3, x4)  =  if_bin_tree_1_in_1_g2(x3, x4)
if_bin_tree_1_in_2_g4(x1, x2, x3, x4)  =  if_bin_tree_1_in_2_g1(x4)
BIN_TREE_1_IN_G1(x1)  =  BIN_TREE_1_IN_G1(x1)
IF_BIN_TREE_1_IN_1_G4(x1, x2, x3, x4)  =  IF_BIN_TREE_1_IN_1_G2(x3, x4)

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

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

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

IF_BIN_TREE_1_IN_1_G2(Right, bin_tree_1_out_g) -> BIN_TREE_1_IN_G1(Right)
BIN_TREE_1_IN_G1(tree_33(underscore, Left, Right)) -> BIN_TREE_1_IN_G1(Left)
BIN_TREE_1_IN_G1(tree_33(underscore, Left, Right)) -> IF_BIN_TREE_1_IN_1_G2(Right, bin_tree_1_in_g1(Left))

The TRS R consists of the following rules:

bin_tree_1_in_g1(void_0) -> bin_tree_1_out_g
bin_tree_1_in_g1(tree_33(underscore, Left, Right)) -> if_bin_tree_1_in_1_g2(Right, bin_tree_1_in_g1(Left))
if_bin_tree_1_in_1_g2(Right, bin_tree_1_out_g) -> if_bin_tree_1_in_2_g1(bin_tree_1_in_g1(Right))
if_bin_tree_1_in_2_g1(bin_tree_1_out_g) -> bin_tree_1_out_g

The set Q consists of the following terms:

bin_tree_1_in_g1(x0)
if_bin_tree_1_in_1_g2(x0, x1)
if_bin_tree_1_in_2_g1(x0)

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