(0) Obligation:

Clauses:

bin_tree(void).
bin_tree(tree(X1, Left, Right)) :- ','(bin_tree(Left), bin_tree(Right)).

Query: bin_tree(g)

(1) PrologToCdtProblemTransformerProof (UPPER BOUND (ID) transformation)

Built complexity over-approximating cdt problems from derivation graph.

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

f1_in(void) → f1_out1
f1_in(tree(z0, z1, z2)) → U1(f17_in(z1, z2), tree(z0, z1, z2))
U1(f17_out1, tree(z0, z1, z2)) → f1_out1
f17_in(z0, z1) → U2(f1_in(z0), z0, z1)
U2(f1_out1, z0, z1) → U3(f1_in(z1), z0, z1)
U3(f1_out1, z0, z1) → f17_out1
Tuples:

F1_IN(tree(z0, z1, z2)) → c1(U1'(f17_in(z1, z2), tree(z0, z1, z2)), F17_IN(z1, z2))
F17_IN(z0, z1) → c3(U2'(f1_in(z0), z0, z1), F1_IN(z0))
U2'(f1_out1, z0, z1) → c4(U3'(f1_in(z1), z0, z1), F1_IN(z1))
S tuples:

F1_IN(tree(z0, z1, z2)) → c1(U1'(f17_in(z1, z2), tree(z0, z1, z2)), F17_IN(z1, z2))
F17_IN(z0, z1) → c3(U2'(f1_in(z0), z0, z1), F1_IN(z0))
U2'(f1_out1, z0, z1) → c4(U3'(f1_in(z1), z0, z1), F1_IN(z1))
K tuples:none
Defined Rule Symbols:

f1_in, U1, f17_in, U2, U3

Defined Pair Symbols:

F1_IN, F17_IN, U2'

Compound Symbols:

c1, c3, c4

(3) CdtGraphRemoveTrailingTuplepartsProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing tuple parts

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

f1_in(void) → f1_out1
f1_in(tree(z0, z1, z2)) → U1(f17_in(z1, z2), tree(z0, z1, z2))
U1(f17_out1, tree(z0, z1, z2)) → f1_out1
f17_in(z0, z1) → U2(f1_in(z0), z0, z1)
U2(f1_out1, z0, z1) → U3(f1_in(z1), z0, z1)
U3(f1_out1, z0, z1) → f17_out1
Tuples:

F17_IN(z0, z1) → c3(U2'(f1_in(z0), z0, z1), F1_IN(z0))
F1_IN(tree(z0, z1, z2)) → c1(F17_IN(z1, z2))
U2'(f1_out1, z0, z1) → c4(F1_IN(z1))
S tuples:

F17_IN(z0, z1) → c3(U2'(f1_in(z0), z0, z1), F1_IN(z0))
F1_IN(tree(z0, z1, z2)) → c1(F17_IN(z1, z2))
U2'(f1_out1, z0, z1) → c4(F1_IN(z1))
K tuples:none
Defined Rule Symbols:

f1_in, U1, f17_in, U2, U3

Defined Pair Symbols:

F17_IN, F1_IN, U2'

Compound Symbols:

c3, c1, c4

(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

U2'(f1_out1, z0, z1) → c4(F1_IN(z1))
We considered the (Usable) Rules:

f1_in(void) → f1_out1
f1_in(tree(z0, z1, z2)) → U1(f17_in(z1, z2), tree(z0, z1, z2))
f17_in(z0, z1) → U2(f1_in(z0), z0, z1)
U1(f17_out1, tree(z0, z1, z2)) → f1_out1
U2(f1_out1, z0, z1) → U3(f1_in(z1), z0, z1)
U3(f1_out1, z0, z1) → f17_out1
And the Tuples:

F17_IN(z0, z1) → c3(U2'(f1_in(z0), z0, z1), F1_IN(z0))
F1_IN(tree(z0, z1, z2)) → c1(F17_IN(z1, z2))
U2'(f1_out1, z0, z1) → c4(F1_IN(z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(F17_IN(x1, x2)) = [2] + x1 + x2   
POL(F1_IN(x1)) = x1   
POL(U1(x1, x2)) = 0   
POL(U2(x1, x2, x3)) = 0   
POL(U2'(x1, x2, x3)) = [2] + x3   
POL(U3(x1, x2, x3)) = 0   
POL(c1(x1)) = x1   
POL(c3(x1, x2)) = x1 + x2   
POL(c4(x1)) = x1   
POL(f17_in(x1, x2)) = 0   
POL(f17_out1) = 0   
POL(f1_in(x1)) = 0   
POL(f1_out1) = 0   
POL(tree(x1, x2, x3)) = [2] + x2 + x3   
POL(void) = 0   

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

f1_in(void) → f1_out1
f1_in(tree(z0, z1, z2)) → U1(f17_in(z1, z2), tree(z0, z1, z2))
U1(f17_out1, tree(z0, z1, z2)) → f1_out1
f17_in(z0, z1) → U2(f1_in(z0), z0, z1)
U2(f1_out1, z0, z1) → U3(f1_in(z1), z0, z1)
U3(f1_out1, z0, z1) → f17_out1
Tuples:

F17_IN(z0, z1) → c3(U2'(f1_in(z0), z0, z1), F1_IN(z0))
F1_IN(tree(z0, z1, z2)) → c1(F17_IN(z1, z2))
U2'(f1_out1, z0, z1) → c4(F1_IN(z1))
S tuples:

F17_IN(z0, z1) → c3(U2'(f1_in(z0), z0, z1), F1_IN(z0))
F1_IN(tree(z0, z1, z2)) → c1(F17_IN(z1, z2))
K tuples:

U2'(f1_out1, z0, z1) → c4(F1_IN(z1))
Defined Rule Symbols:

f1_in, U1, f17_in, U2, U3

Defined Pair Symbols:

F17_IN, F1_IN, U2'

Compound Symbols:

c3, c1, c4

(7) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

F1_IN(tree(z0, z1, z2)) → c1(F17_IN(z1, z2))
We considered the (Usable) Rules:

f1_in(void) → f1_out1
f1_in(tree(z0, z1, z2)) → U1(f17_in(z1, z2), tree(z0, z1, z2))
f17_in(z0, z1) → U2(f1_in(z0), z0, z1)
U1(f17_out1, tree(z0, z1, z2)) → f1_out1
U2(f1_out1, z0, z1) → U3(f1_in(z1), z0, z1)
U3(f1_out1, z0, z1) → f17_out1
And the Tuples:

F17_IN(z0, z1) → c3(U2'(f1_in(z0), z0, z1), F1_IN(z0))
F1_IN(tree(z0, z1, z2)) → c1(F17_IN(z1, z2))
U2'(f1_out1, z0, z1) → c4(F1_IN(z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(F17_IN(x1, x2)) = [2]x1 + [2]x2   
POL(F1_IN(x1)) = [2]x1   
POL(U1(x1, x2)) = 0   
POL(U2(x1, x2, x3)) = [3] + [3]x1 + x3   
POL(U2'(x1, x2, x3)) = [2]x3   
POL(U3(x1, x2, x3)) = x3   
POL(c1(x1)) = x1   
POL(c3(x1, x2)) = x1 + x2   
POL(c4(x1)) = x1   
POL(f17_in(x1, x2)) = [3] + x1 + [2]x2   
POL(f17_out1) = 0   
POL(f1_in(x1)) = 0   
POL(f1_out1) = [2]   
POL(tree(x1, x2, x3)) = [1] + x2 + x3   
POL(void) = 0   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

f1_in(void) → f1_out1
f1_in(tree(z0, z1, z2)) → U1(f17_in(z1, z2), tree(z0, z1, z2))
U1(f17_out1, tree(z0, z1, z2)) → f1_out1
f17_in(z0, z1) → U2(f1_in(z0), z0, z1)
U2(f1_out1, z0, z1) → U3(f1_in(z1), z0, z1)
U3(f1_out1, z0, z1) → f17_out1
Tuples:

F17_IN(z0, z1) → c3(U2'(f1_in(z0), z0, z1), F1_IN(z0))
F1_IN(tree(z0, z1, z2)) → c1(F17_IN(z1, z2))
U2'(f1_out1, z0, z1) → c4(F1_IN(z1))
S tuples:

F17_IN(z0, z1) → c3(U2'(f1_in(z0), z0, z1), F1_IN(z0))
K tuples:

U2'(f1_out1, z0, z1) → c4(F1_IN(z1))
F1_IN(tree(z0, z1, z2)) → c1(F17_IN(z1, z2))
Defined Rule Symbols:

f1_in, U1, f17_in, U2, U3

Defined Pair Symbols:

F17_IN, F1_IN, U2'

Compound Symbols:

c3, c1, c4

(9) CdtKnowledgeProof (EQUIVALENT transformation)

The following tuples could be moved from S to K by knowledge propagation:

F17_IN(z0, z1) → c3(U2'(f1_in(z0), z0, z1), F1_IN(z0))
F1_IN(tree(z0, z1, z2)) → c1(F17_IN(z1, z2))
U2'(f1_out1, z0, z1) → c4(F1_IN(z1))
Now S is empty

(10) BOUNDS(O(1), O(1))