(0) Obligation:

Clauses:

tree_member(X, tree(X, X1, X2)).
tree_member(X, tree(X3, Left, X4)) :- tree_member(X, Left).
tree_member(X, tree(X5, X6, Right)) :- tree_member(X, Right).

Query: tree_member(a,g)

(1) PrologToTRSTransformerProof (SOUND transformation)

Transformed Prolog program to TRS.

(2) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

f1_in(tree(T15, T16, T17)) → f1_out1(T15)
f1_in(tree(T35, T36, T37)) → U1(f1_in(T36), tree(T35, T36, T37))
U1(f1_out1(T38), tree(T35, T36, T37)) → f1_out1(T38)
f1_in(tree(T54, T55, T56)) → U2(f1_in(T56), tree(T54, T55, T56))
U2(f1_out1(T57), tree(T54, T55, T56)) → f1_out1(T57)

Q is empty.

(3) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(U1(x1, x2)) = 2 + x1 + x2   
POL(U2(x1, x2)) = 1 + x1 + x2   
POL(f1_in(x1)) = 2·x1   
POL(f1_out1(x1)) = 2·x1   
POL(tree(x1, x2, x3)) = 2 + 2·x1 + 2·x2 + 2·x3   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

f1_in(tree(T15, T16, T17)) → f1_out1(T15)
U1(f1_out1(T38), tree(T35, T36, T37)) → f1_out1(T38)
f1_in(tree(T54, T55, T56)) → U2(f1_in(T56), tree(T54, T55, T56))
U2(f1_out1(T57), tree(T54, T55, T56)) → f1_out1(T57)


(4) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

f1_in(tree(T35, T36, T37)) → U1(f1_in(T36), tree(T35, T36, T37))

Q is empty.

(5) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(U1(x1, x2)) = 1 + x1 + x2   
POL(f1_in(x1)) = 2·x1   
POL(tree(x1, x2, x3)) = 2 + x1 + 2·x2 + x3   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

f1_in(tree(T35, T36, T37)) → U1(f1_in(T36), tree(T35, T36, T37))


(6) Obligation:

Q restricted rewrite system:
R is empty.
Q is empty.

(7) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(8) YES