(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

+(X, 0) → X
+(X, s(Y)) → s(+(X, Y))
f(0, s(0), X) → f(X, +(X, X), X)
g(X, Y) → X
g(X, Y) → Y

Rewrite Strategy: INNERMOST

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

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

+'(z0, 0) → c
+'(z0, s(z1)) → c1(+'(z0, z1))
F(0, s(0), z0) → c2(F(z0, +(z0, z0), z0), +'(z0, z0))
G(z0, z1) → c3
G(z0, z1) → c4
S tuples:

+'(z0, 0) → c
+'(z0, s(z1)) → c1(+'(z0, z1))
F(0, s(0), z0) → c2(F(z0, +(z0, z0), z0), +'(z0, z0))
G(z0, z1) → c3
G(z0, z1) → c4
K tuples:none
Defined Rule Symbols:

+, f, g

Defined Pair Symbols:

+', F, G

Compound Symbols:

c, c1, c2, c3, c4

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

Removed 3 trailing nodes:

G(z0, z1) → c3
+'(z0, 0) → c
G(z0, z1) → c4

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

+'(z0, s(z1)) → c1(+'(z0, z1))
F(0, s(0), z0) → c2(F(z0, +(z0, z0), z0), +'(z0, z0))
S tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
F(0, s(0), z0) → c2(F(z0, +(z0, z0), z0), +'(z0, z0))
K tuples:none
Defined Rule Symbols:

+, f, g

Defined Pair Symbols:

+', F

Compound Symbols:

c1, c2

(5) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

f(0, s(0), z0) → f(z0, +(z0, z0), z0)
g(z0, z1) → z0
g(z0, z1) → z1

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(z0, 0) → z0
+(z0, s(z1)) → s(+(z0, z1))
Tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
F(0, s(0), z0) → c2(F(z0, +(z0, z0), z0), +'(z0, z0))
S tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
F(0, s(0), z0) → c2(F(z0, +(z0, z0), z0), +'(z0, z0))
K tuples:none
Defined Rule Symbols:

+

Defined Pair Symbols:

+', F

Compound Symbols:

c1, c2

(7) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace F(0, s(0), z0) → c2(F(z0, +(z0, z0), z0), +'(z0, z0)) by

F(0, s(0), 0) → c2(F(0, 0, 0), +'(0, 0))
F(0, s(0), s(z1)) → c2(F(s(z1), s(+(s(z1), z1)), s(z1)), +'(s(z1), s(z1)))

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(z0, 0) → z0
+(z0, s(z1)) → s(+(z0, z1))
Tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
F(0, s(0), 0) → c2(F(0, 0, 0), +'(0, 0))
F(0, s(0), s(z1)) → c2(F(s(z1), s(+(s(z1), z1)), s(z1)), +'(s(z1), s(z1)))
S tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
F(0, s(0), 0) → c2(F(0, 0, 0), +'(0, 0))
F(0, s(0), s(z1)) → c2(F(s(z1), s(+(s(z1), z1)), s(z1)), +'(s(z1), s(z1)))
K tuples:none
Defined Rule Symbols:

+

Defined Pair Symbols:

+', F

Compound Symbols:

c1, c2

(9) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing nodes:

F(0, s(0), 0) → c2(F(0, 0, 0), +'(0, 0))

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(z0, 0) → z0
+(z0, s(z1)) → s(+(z0, z1))
Tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
F(0, s(0), s(z1)) → c2(F(s(z1), s(+(s(z1), z1)), s(z1)), +'(s(z1), s(z1)))
S tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
F(0, s(0), s(z1)) → c2(F(s(z1), s(+(s(z1), z1)), s(z1)), +'(s(z1), s(z1)))
K tuples:none
Defined Rule Symbols:

+

Defined Pair Symbols:

+', F

Compound Symbols:

c1, c2

(11) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(z0, 0) → z0
+(z0, s(z1)) → s(+(z0, z1))
Tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
F(0, s(0), s(z1)) → c2(+'(s(z1), s(z1)))
S tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
F(0, s(0), s(z1)) → c2(+'(s(z1), s(z1)))
K tuples:none
Defined Rule Symbols:

+

Defined Pair Symbols:

+', F

Compound Symbols:

c1, c2

(13) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 1 leading nodes:

F(0, s(0), s(z1)) → c2(+'(s(z1), s(z1)))

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(z0, 0) → z0
+(z0, s(z1)) → s(+(z0, z1))
Tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
S tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
K tuples:none
Defined Rule Symbols:

+

Defined Pair Symbols:

+'

Compound Symbols:

c1

(15) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

+(z0, 0) → z0
+(z0, s(z1)) → s(+(z0, z1))

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
S tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

+'

Compound Symbols:

c1

(17) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

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

+'(z0, s(z1)) → c1(+'(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(+'(x1, x2)) = x2   
POL(c1(x1)) = x1   
POL(s(x1)) = [1] + x1   

(18) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
S tuples:none
K tuples:

+'(z0, s(z1)) → c1(+'(z0, z1))
Defined Rule Symbols:none

Defined Pair Symbols:

+'

Compound Symbols:

c1

(19) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(20) BOUNDS(1, 1)