(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

f(0, y) → y
f(x, 0) → x
f(i(x), y) → i(x)
f(f(x, y), z) → f(x, f(y, z))
f(g(x, y), z) → g(f(x, z), f(y, z))
f(1, g(x, y)) → x
f(2, g(x, y)) → y

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(0, z0) → z0
f(z0, 0) → z0
f(i(z0), z1) → i(z0)
f(f(z0, z1), z2) → f(z0, f(z1, z2))
f(g(z0, z1), z2) → g(f(z0, z2), f(z1, z2))
f(1, g(z0, z1)) → z0
f(2, g(z0, z1)) → z1
Tuples:

F(f(z0, z1), z2) → c3(F(z0, f(z1, z2)), F(z1, z2))
F(g(z0, z1), z2) → c4(F(z0, z2), F(z1, z2))
S tuples:

F(f(z0, z1), z2) → c3(F(z0, f(z1, z2)), F(z1, z2))
F(g(z0, z1), z2) → c4(F(z0, z2), F(z1, z2))
K tuples:none
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c3, c4

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

F(g(z0, z1), z2) → c4(F(z0, z2), F(z1, z2))
We considered the (Usable) Rules:

f(z0, 0) → z0
f(i(z0), z1) → i(z0)
f(f(z0, z1), z2) → f(z0, f(z1, z2))
f(g(z0, z1), z2) → g(f(z0, z2), f(z1, z2))
f(1, g(z0, z1)) → z0
f(2, g(z0, z1)) → z1
f(0, z0) → z0
And the Tuples:

F(f(z0, z1), z2) → c3(F(z0, f(z1, z2)), F(z1, z2))
F(g(z0, z1), z2) → c4(F(z0, z2), F(z1, z2))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(1) = 0   
POL(2) = 0   
POL(F(x1, x2)) = [3] + [3]x1   
POL(c3(x1, x2)) = x1 + x2   
POL(c4(x1, x2)) = x1 + x2   
POL(f(x1, x2)) = [1] + x1 + [2]x2   
POL(g(x1, x2)) = [5] + x1 + x2   
POL(i(x1)) = [3]   

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(0, z0) → z0
f(z0, 0) → z0
f(i(z0), z1) → i(z0)
f(f(z0, z1), z2) → f(z0, f(z1, z2))
f(g(z0, z1), z2) → g(f(z0, z2), f(z1, z2))
f(1, g(z0, z1)) → z0
f(2, g(z0, z1)) → z1
Tuples:

F(f(z0, z1), z2) → c3(F(z0, f(z1, z2)), F(z1, z2))
F(g(z0, z1), z2) → c4(F(z0, z2), F(z1, z2))
S tuples:

F(f(z0, z1), z2) → c3(F(z0, f(z1, z2)), F(z1, z2))
K tuples:

F(g(z0, z1), z2) → c4(F(z0, z2), F(z1, z2))
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c3, 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.

F(f(z0, z1), z2) → c3(F(z0, f(z1, z2)), F(z1, z2))
We considered the (Usable) Rules:

f(z0, 0) → z0
f(i(z0), z1) → i(z0)
f(f(z0, z1), z2) → f(z0, f(z1, z2))
f(g(z0, z1), z2) → g(f(z0, z2), f(z1, z2))
f(1, g(z0, z1)) → z0
f(2, g(z0, z1)) → z1
f(0, z0) → z0
And the Tuples:

F(f(z0, z1), z2) → c3(F(z0, f(z1, z2)), F(z1, z2))
F(g(z0, z1), z2) → c4(F(z0, z2), F(z1, z2))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(1) = 0   
POL(2) = 0   
POL(F(x1, x2)) = [2] + [4]x1   
POL(c3(x1, x2)) = x1 + x2   
POL(c4(x1, x2)) = x1 + x2   
POL(f(x1, x2)) = [4] + [3]x1 + x2   
POL(g(x1, x2)) = [2] + x1 + x2   
POL(i(x1)) = [5]   

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(0, z0) → z0
f(z0, 0) → z0
f(i(z0), z1) → i(z0)
f(f(z0, z1), z2) → f(z0, f(z1, z2))
f(g(z0, z1), z2) → g(f(z0, z2), f(z1, z2))
f(1, g(z0, z1)) → z0
f(2, g(z0, z1)) → z1
Tuples:

F(f(z0, z1), z2) → c3(F(z0, f(z1, z2)), F(z1, z2))
F(g(z0, z1), z2) → c4(F(z0, z2), F(z1, z2))
S tuples:none
K tuples:

F(g(z0, z1), z2) → c4(F(z0, z2), F(z1, z2))
F(f(z0, z1), z2) → c3(F(z0, f(z1, z2)), F(z1, z2))
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c3, c4

(7) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(8) BOUNDS(O(1), O(1))