(0) Obligation:

Clauses:

sum(X, s(Y), s(Z)) :- sum(X, Y, Z).
sum(X, 0, X).

Query: sum(a,a,g)

(1) LPReorderTransformerProof (EQUIVALENT transformation)

Reordered facts before rules in definite LP [PROLOG].

(2) Obligation:

Clauses:

sum(X, 0, X).
sum(X, s(Y), s(Z)) :- sum(X, Y, Z).

Query: sum(a,a,g)

(3) PrologToCdtProblemTransformerProof (UPPER BOUND (ID) transformation)

Built complexity over-approximating cdt problems from derivation graph.

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

f1_in(z0) → f1_out1(z0, 0)
f1_in(s(z0)) → U1(f1_in(z0), s(z0))
f1_in(s(z0)) → U2(f1_in(z0), s(z0))
U1(f1_out1(z0, z1), s(z2)) → f1_out1(z0, s(z1))
U2(f1_out1(z0, z1), s(z2)) → f1_out1(z0, s(z1))
Tuples:

F1_IN(s(z0)) → c1(U1'(f1_in(z0), s(z0)), F1_IN(z0))
F1_IN(s(z0)) → c2(U2'(f1_in(z0), s(z0)), F1_IN(z0))
S tuples:

F1_IN(s(z0)) → c1(U1'(f1_in(z0), s(z0)), F1_IN(z0))
F1_IN(s(z0)) → c2(U2'(f1_in(z0), s(z0)), F1_IN(z0))
K tuples:none
Defined Rule Symbols:

f1_in, U1, U2

Defined Pair Symbols:

F1_IN

Compound Symbols:

c1, c2

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

Removed 2 trailing tuple parts

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

f1_in(z0) → f1_out1(z0, 0)
f1_in(s(z0)) → U1(f1_in(z0), s(z0))
f1_in(s(z0)) → U2(f1_in(z0), s(z0))
U1(f1_out1(z0, z1), s(z2)) → f1_out1(z0, s(z1))
U2(f1_out1(z0, z1), s(z2)) → f1_out1(z0, s(z1))
Tuples:

F1_IN(s(z0)) → c1(F1_IN(z0))
F1_IN(s(z0)) → c2(F1_IN(z0))
S tuples:

F1_IN(s(z0)) → c1(F1_IN(z0))
F1_IN(s(z0)) → c2(F1_IN(z0))
K tuples:none
Defined Rule Symbols:

f1_in, U1, U2

Defined Pair Symbols:

F1_IN

Compound Symbols:

c1, c2

(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(s(z0)) → c1(F1_IN(z0))
F1_IN(s(z0)) → c2(F1_IN(z0))
We considered the (Usable) Rules:none
And the Tuples:

F1_IN(s(z0)) → c1(F1_IN(z0))
F1_IN(s(z0)) → c2(F1_IN(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(F1_IN(x1)) = x1   
POL(c1(x1)) = x1   
POL(c2(x1)) = x1   
POL(s(x1)) = [2] + x1   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

f1_in(z0) → f1_out1(z0, 0)
f1_in(s(z0)) → U1(f1_in(z0), s(z0))
f1_in(s(z0)) → U2(f1_in(z0), s(z0))
U1(f1_out1(z0, z1), s(z2)) → f1_out1(z0, s(z1))
U2(f1_out1(z0, z1), s(z2)) → f1_out1(z0, s(z1))
Tuples:

F1_IN(s(z0)) → c1(F1_IN(z0))
F1_IN(s(z0)) → c2(F1_IN(z0))
S tuples:none
K tuples:

F1_IN(s(z0)) → c1(F1_IN(z0))
F1_IN(s(z0)) → c2(F1_IN(z0))
Defined Rule Symbols:

f1_in, U1, U2

Defined Pair Symbols:

F1_IN

Compound Symbols:

c1, c2

(9) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

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

(11) PrologToCdtProblemTransformerProof (UPPER BOUND (ID) transformation)

Built complexity over-approximating cdt problems from derivation graph.

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

f2_in(z0) → f2_out1(z0, 0)
f2_in(s(z0)) → f2_out1(z0, s(0))
f2_in(s(s(z0))) → U1(f2_in(z0), s(s(z0)))
f2_in(s(s(z0))) → U2(f2_in(z0), s(s(z0)))
f2_in(s(s(z0))) → U3(f2_in(z0), s(s(z0)))
f2_in(s(s(z0))) → U4(f2_in(z0), s(s(z0)))
U1(f2_out1(z0, z1), s(s(z2))) → f2_out1(z0, s(s(z1)))
U2(f2_out1(z0, z1), s(s(z2))) → f2_out1(z0, s(s(z1)))
U3(f2_out1(z0, z1), s(s(z2))) → f2_out1(z0, s(s(z1)))
U4(f2_out1(z0, z1), s(s(z2))) → f2_out1(z0, s(s(z1)))
Tuples:

F2_IN(s(s(z0))) → c2(U1'(f2_in(z0), s(s(z0))), F2_IN(z0))
F2_IN(s(s(z0))) → c3(U2'(f2_in(z0), s(s(z0))), F2_IN(z0))
F2_IN(s(s(z0))) → c4(U3'(f2_in(z0), s(s(z0))), F2_IN(z0))
F2_IN(s(s(z0))) → c5(U4'(f2_in(z0), s(s(z0))), F2_IN(z0))
S tuples:

F2_IN(s(s(z0))) → c2(U1'(f2_in(z0), s(s(z0))), F2_IN(z0))
F2_IN(s(s(z0))) → c3(U2'(f2_in(z0), s(s(z0))), F2_IN(z0))
F2_IN(s(s(z0))) → c4(U3'(f2_in(z0), s(s(z0))), F2_IN(z0))
F2_IN(s(s(z0))) → c5(U4'(f2_in(z0), s(s(z0))), F2_IN(z0))
K tuples:none
Defined Rule Symbols:

f2_in, U1, U2, U3, U4

Defined Pair Symbols:

F2_IN

Compound Symbols:

c2, c3, c4, c5

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

Removed 4 trailing tuple parts

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

f2_in(z0) → f2_out1(z0, 0)
f2_in(s(z0)) → f2_out1(z0, s(0))
f2_in(s(s(z0))) → U1(f2_in(z0), s(s(z0)))
f2_in(s(s(z0))) → U2(f2_in(z0), s(s(z0)))
f2_in(s(s(z0))) → U3(f2_in(z0), s(s(z0)))
f2_in(s(s(z0))) → U4(f2_in(z0), s(s(z0)))
U1(f2_out1(z0, z1), s(s(z2))) → f2_out1(z0, s(s(z1)))
U2(f2_out1(z0, z1), s(s(z2))) → f2_out1(z0, s(s(z1)))
U3(f2_out1(z0, z1), s(s(z2))) → f2_out1(z0, s(s(z1)))
U4(f2_out1(z0, z1), s(s(z2))) → f2_out1(z0, s(s(z1)))
Tuples:

F2_IN(s(s(z0))) → c2(F2_IN(z0))
F2_IN(s(s(z0))) → c3(F2_IN(z0))
F2_IN(s(s(z0))) → c4(F2_IN(z0))
F2_IN(s(s(z0))) → c5(F2_IN(z0))
S tuples:

F2_IN(s(s(z0))) → c2(F2_IN(z0))
F2_IN(s(s(z0))) → c3(F2_IN(z0))
F2_IN(s(s(z0))) → c4(F2_IN(z0))
F2_IN(s(s(z0))) → c5(F2_IN(z0))
K tuples:none
Defined Rule Symbols:

f2_in, U1, U2, U3, U4

Defined Pair Symbols:

F2_IN

Compound Symbols:

c2, c3, c4, c5

(15) 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.

F2_IN(s(s(z0))) → c2(F2_IN(z0))
F2_IN(s(s(z0))) → c3(F2_IN(z0))
F2_IN(s(s(z0))) → c4(F2_IN(z0))
F2_IN(s(s(z0))) → c5(F2_IN(z0))
We considered the (Usable) Rules:none
And the Tuples:

F2_IN(s(s(z0))) → c2(F2_IN(z0))
F2_IN(s(s(z0))) → c3(F2_IN(z0))
F2_IN(s(s(z0))) → c4(F2_IN(z0))
F2_IN(s(s(z0))) → c5(F2_IN(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(F2_IN(x1)) = x1   
POL(c2(x1)) = x1   
POL(c3(x1)) = x1   
POL(c4(x1)) = x1   
POL(c5(x1)) = x1   
POL(s(x1)) = [1] + x1   

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

f2_in(z0) → f2_out1(z0, 0)
f2_in(s(z0)) → f2_out1(z0, s(0))
f2_in(s(s(z0))) → U1(f2_in(z0), s(s(z0)))
f2_in(s(s(z0))) → U2(f2_in(z0), s(s(z0)))
f2_in(s(s(z0))) → U3(f2_in(z0), s(s(z0)))
f2_in(s(s(z0))) → U4(f2_in(z0), s(s(z0)))
U1(f2_out1(z0, z1), s(s(z2))) → f2_out1(z0, s(s(z1)))
U2(f2_out1(z0, z1), s(s(z2))) → f2_out1(z0, s(s(z1)))
U3(f2_out1(z0, z1), s(s(z2))) → f2_out1(z0, s(s(z1)))
U4(f2_out1(z0, z1), s(s(z2))) → f2_out1(z0, s(s(z1)))
Tuples:

F2_IN(s(s(z0))) → c2(F2_IN(z0))
F2_IN(s(s(z0))) → c3(F2_IN(z0))
F2_IN(s(s(z0))) → c4(F2_IN(z0))
F2_IN(s(s(z0))) → c5(F2_IN(z0))
S tuples:none
K tuples:

F2_IN(s(s(z0))) → c2(F2_IN(z0))
F2_IN(s(s(z0))) → c3(F2_IN(z0))
F2_IN(s(s(z0))) → c4(F2_IN(z0))
F2_IN(s(s(z0))) → c5(F2_IN(z0))
Defined Rule Symbols:

f2_in, U1, U2, U3, U4

Defined Pair Symbols:

F2_IN

Compound Symbols:

c2, c3, c4, c5