### (0) Obligation:

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

f(s(X)) → f(X)
g(cons(0, Y)) → g(Y)
g(cons(s(X), Y)) → s(X)
h(cons(X, Y)) → h(g(cons(X, Y)))

Rewrite Strategy: INNERMOST

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

Converted Cpx (relative) TRS to CDT

### (2) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(s(z0)) → f(z0)
g(cons(0, z0)) → g(z0)
g(cons(s(z0), z1)) → s(z0)
h(cons(z0, z1)) → h(g(cons(z0, z1)))
Tuples:

F(s(z0)) → c(F(z0))
G(cons(0, z0)) → c1(G(z0))
G(cons(s(z0), z1)) → c2
H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
S tuples:

F(s(z0)) → c(F(z0))
G(cons(0, z0)) → c1(G(z0))
G(cons(s(z0), z1)) → c2
H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
K tuples:none
Defined Rule Symbols:

f, g, h

Defined Pair Symbols:

F, G, H

Compound Symbols:

c, c1, c2, c3

### (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing nodes:

G(cons(s(z0), z1)) → c2

### (4) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(s(z0)) → f(z0)
g(cons(0, z0)) → g(z0)
g(cons(s(z0), z1)) → s(z0)
h(cons(z0, z1)) → h(g(cons(z0, z1)))
Tuples:

F(s(z0)) → c(F(z0))
G(cons(0, z0)) → c1(G(z0))
H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
S tuples:

F(s(z0)) → c(F(z0))
G(cons(0, z0)) → c1(G(z0))
H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
K tuples:none
Defined Rule Symbols:

f, g, h

Defined Pair Symbols:

F, G, H

Compound Symbols:

c, c1, c3

### (5) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

f(s(z0)) → f(z0)
h(cons(z0, z1)) → h(g(cons(z0, z1)))

### (6) Obligation:

Complexity Dependency Tuples Problem
Rules:

g(cons(0, z0)) → g(z0)
g(cons(s(z0), z1)) → s(z0)
Tuples:

F(s(z0)) → c(F(z0))
G(cons(0, z0)) → c1(G(z0))
H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
S tuples:

F(s(z0)) → c(F(z0))
G(cons(0, z0)) → c1(G(z0))
H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
K tuples:none
Defined Rule Symbols:

g

Defined Pair Symbols:

F, G, H

Compound Symbols:

c, c1, c3

### (7) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^1))) transformation)

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

H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
We considered the (Usable) Rules:

g(cons(s(z0), z1)) → s(z0)
g(cons(0, z0)) → g(z0)
And the Tuples:

F(s(z0)) → c(F(z0))
G(cons(0, z0)) → c1(G(z0))
H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [2]
POL(F(x1)) = 0
POL(G(x1)) = [2]
POL(H(x1)) = [4]x1
POL(c(x1)) = x1
POL(c1(x1)) = x1
POL(c3(x1, x2)) = x1 + x2
POL(cons(x1, x2)) = [5] + x1 + x2
POL(g(x1)) = [4]
POL(s(x1)) = [3]

### (8) Obligation:

Complexity Dependency Tuples Problem
Rules:

g(cons(0, z0)) → g(z0)
g(cons(s(z0), z1)) → s(z0)
Tuples:

F(s(z0)) → c(F(z0))
G(cons(0, z0)) → c1(G(z0))
H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
S tuples:

F(s(z0)) → c(F(z0))
G(cons(0, z0)) → c1(G(z0))
K tuples:

H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
Defined Rule Symbols:

g

Defined Pair Symbols:

F, G, H

Compound Symbols:

c, c1, c3

### (9) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^1))) transformation)

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

G(cons(0, z0)) → c1(G(z0))
We considered the (Usable) Rules:

g(cons(s(z0), z1)) → s(z0)
g(cons(0, z0)) → g(z0)
And the Tuples:

F(s(z0)) → c(F(z0))
G(cons(0, z0)) → c1(G(z0))
H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [1]
POL(F(x1)) = 0
POL(G(x1)) = x1
POL(H(x1)) = [4]x1
POL(c(x1)) = x1
POL(c1(x1)) = x1
POL(c3(x1, x2)) = x1 + x2
POL(cons(x1, x2)) = x1 + x2
POL(g(x1)) = 0
POL(s(x1)) = 0

### (10) Obligation:

Complexity Dependency Tuples Problem
Rules:

g(cons(0, z0)) → g(z0)
g(cons(s(z0), z1)) → s(z0)
Tuples:

F(s(z0)) → c(F(z0))
G(cons(0, z0)) → c1(G(z0))
H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
S tuples:

F(s(z0)) → c(F(z0))
K tuples:

H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
G(cons(0, z0)) → c1(G(z0))
Defined Rule Symbols:

g

Defined Pair Symbols:

F, G, H

Compound Symbols:

c, c1, c3

### (11) CdtRuleRemovalProof (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(s(z0)) → c(F(z0))
We considered the (Usable) Rules:none
And the Tuples:

F(s(z0)) → c(F(z0))
G(cons(0, z0)) → c1(G(z0))
H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0
POL(F(x1)) = [2]x1
POL(G(x1)) = 0
POL(H(x1)) = 0
POL(c(x1)) = x1
POL(c1(x1)) = x1
POL(c3(x1, x2)) = x1 + x2
POL(cons(x1, x2)) = 0
POL(g(x1)) = [1]
POL(s(x1)) = [3] + x1

### (12) Obligation:

Complexity Dependency Tuples Problem
Rules:

g(cons(0, z0)) → g(z0)
g(cons(s(z0), z1)) → s(z0)
Tuples:

F(s(z0)) → c(F(z0))
G(cons(0, z0)) → c1(G(z0))
H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
S tuples:none
K tuples:

H(cons(z0, z1)) → c3(H(g(cons(z0, z1))), G(cons(z0, z1)))
G(cons(0, z0)) → c1(G(z0))
F(s(z0)) → c(F(z0))
Defined Rule Symbols:

g

Defined Pair Symbols:

F, G, H

Compound Symbols:

c, c1, c3

### (13) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty