### (0) Obligation:

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

f(0) → true
f(1) → false
f(s(x)) → f(x)
if(true, s(x), s(y)) → s(x)
if(false, s(x), s(y)) → s(y)
g(x, c(y)) → c(g(x, y))
g(x, c(y)) → g(x, if(f(x), c(g(s(x), y)), c(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(0) → true
f(1) → false
f(s(z0)) → f(z0)
if(true, s(z0), s(z1)) → s(z0)
if(false, s(z0), s(z1)) → s(z1)
g(z0, c(z1)) → c(g(z0, z1))
g(z0, c(z1)) → g(z0, if(f(z0), c(g(s(z0), z1)), c(z1)))
Tuples:

F(0) → c1
F(1) → c2
F(s(z0)) → c3(F(z0))
IF(true, s(z0), s(z1)) → c4
IF(false, s(z0), s(z1)) → c5
G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(G(z0, if(f(z0), c(g(s(z0), z1)), c(z1))), IF(f(z0), c(g(s(z0), z1)), c(z1)), F(z0), G(s(z0), z1))
S tuples:

F(0) → c1
F(1) → c2
F(s(z0)) → c3(F(z0))
IF(true, s(z0), s(z1)) → c4
IF(false, s(z0), s(z1)) → c5
G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(G(z0, if(f(z0), c(g(s(z0), z1)), c(z1))), IF(f(z0), c(g(s(z0), z1)), c(z1)), F(z0), G(s(z0), z1))
K tuples:none
Defined Rule Symbols:

f, if, g

Defined Pair Symbols:

F, IF, G

Compound Symbols:

c1, c2, c3, c4, c5, c6, c7

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

Removed 4 trailing nodes:

F(0) → c1
F(1) → c2
IF(true, s(z0), s(z1)) → c4
IF(false, s(z0), s(z1)) → c5

### (4) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(0) → true
f(1) → false
f(s(z0)) → f(z0)
if(true, s(z0), s(z1)) → s(z0)
if(false, s(z0), s(z1)) → s(z1)
g(z0, c(z1)) → c(g(z0, z1))
g(z0, c(z1)) → g(z0, if(f(z0), c(g(s(z0), z1)), c(z1)))
Tuples:

F(s(z0)) → c3(F(z0))
G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(G(z0, if(f(z0), c(g(s(z0), z1)), c(z1))), IF(f(z0), c(g(s(z0), z1)), c(z1)), F(z0), G(s(z0), z1))
S tuples:

F(s(z0)) → c3(F(z0))
G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(G(z0, if(f(z0), c(g(s(z0), z1)), c(z1))), IF(f(z0), c(g(s(z0), z1)), c(z1)), F(z0), G(s(z0), z1))
K tuples:none
Defined Rule Symbols:

f, if, g

Defined Pair Symbols:

F, G

Compound Symbols:

c3, c6, c7

### (5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing tuple parts

### (6) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(0) → true
f(1) → false
f(s(z0)) → f(z0)
if(true, s(z0), s(z1)) → s(z0)
if(false, s(z0), s(z1)) → s(z1)
g(z0, c(z1)) → c(g(z0, z1))
g(z0, c(z1)) → g(z0, if(f(z0), c(g(s(z0), z1)), c(z1)))
Tuples:

F(s(z0)) → c3(F(z0))
G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(F(z0), G(s(z0), z1))
S tuples:

F(s(z0)) → c3(F(z0))
G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(F(z0), G(s(z0), z1))
K tuples:none
Defined Rule Symbols:

f, if, g

Defined Pair Symbols:

F, G

Compound Symbols:

c3, c6, c7

### (7) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

f(0) → true
f(1) → false
f(s(z0)) → f(z0)
if(true, s(z0), s(z1)) → s(z0)
if(false, s(z0), s(z1)) → s(z1)
g(z0, c(z1)) → c(g(z0, z1))
g(z0, c(z1)) → g(z0, if(f(z0), c(g(s(z0), z1)), c(z1)))

### (8) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

F(s(z0)) → c3(F(z0))
G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(F(z0), G(s(z0), z1))
S tuples:

F(s(z0)) → c3(F(z0))
G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(F(z0), G(s(z0), z1))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

F, G

Compound Symbols:

c3, c6, c7

### (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(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(F(z0), G(s(z0), z1))
We considered the (Usable) Rules:none
And the Tuples:

F(s(z0)) → c3(F(z0))
G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(F(z0), G(s(z0), z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(F(x1)) = [4]
POL(G(x1, x2)) = [4]x1 + [2]x2
POL(c(x1)) = [4] + x1
POL(c3(x1)) = x1
POL(c6(x1)) = x1
POL(c7(x1, x2)) = x1 + x2
POL(s(x1)) = 0

### (10) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

F(s(z0)) → c3(F(z0))
G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(F(z0), G(s(z0), z1))
S tuples:

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

G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(F(z0), G(s(z0), z1))
Defined Rule Symbols:none

Defined Pair Symbols:

F, G

Compound Symbols:

c3, c6, c7

### (11) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^2))) transformation)

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

F(s(z0)) → c3(F(z0))
We considered the (Usable) Rules:none
And the Tuples:

F(s(z0)) → c3(F(z0))
G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(F(z0), G(s(z0), z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(F(x1)) = x1
POL(G(x1, x2)) = x22 + x1·x2
POL(c(x1)) = [1] + x1
POL(c3(x1)) = x1
POL(c6(x1)) = x1
POL(c7(x1, x2)) = x1 + x2
POL(s(x1)) = [1] + x1

### (12) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

F(s(z0)) → c3(F(z0))
G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(F(z0), G(s(z0), z1))
S tuples:none
K tuples:

G(z0, c(z1)) → c6(G(z0, z1))
G(z0, c(z1)) → c7(F(z0), G(s(z0), z1))
F(s(z0)) → c3(F(z0))
Defined Rule Symbols:none

Defined Pair Symbols:

F, G

Compound Symbols:

c3, c6, c7

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

The set S is empty