(0) Obligation:

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


The TRS R consists of the following rules:

f(x, 0) → s(0)
f(s(x), s(y)) → s(f(x, y))
g(0, x) → g(f(x, x), x)

Rewrite Strategy: FULL

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

Converted rc-obligation to irc-obligation.

The duplicating contexts are:
g(0, [])

The defined contexts are:
g([], x1)

As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc.

(2) 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:

f(x, 0) → s(0)
f(s(x), s(y)) → s(f(x, y))
g(0, x) → g(f(x, x), x)

Rewrite Strategy: INNERMOST

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

Converted Cpx (relative) TRS to CDT

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

F(z0, 0) → c
F(s(z0), s(z1)) → c1(F(z0, z1))
G(0, z0) → c2(G(f(z0, z0), z0), F(z0, z0))
S tuples:

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

f, g

Defined Pair Symbols:

F, G

Compound Symbols:

c, c1, c2

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

Removed 1 trailing nodes:

F(z0, 0) → c

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

F(s(z0), s(z1)) → c1(F(z0, z1))
G(0, z0) → c2(G(f(z0, z0), z0), F(z0, z0))
S tuples:

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

f, g

Defined Pair Symbols:

F, G

Compound Symbols:

c1, c2

(7) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

g(0, z0) → g(f(z0, z0), z0)

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

F(s(z0), s(z1)) → c1(F(z0, z1))
G(0, z0) → c2(G(f(z0, z0), z0), F(z0, z0))
S tuples:

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

f

Defined Pair Symbols:

F, G

Compound Symbols:

c1, c2

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

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

G(0, z0) → c2(G(f(z0, z0), z0), F(z0, z0))
We considered the (Usable) Rules:

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

F(s(z0), s(z1)) → c1(F(z0, z1))
G(0, z0) → c2(G(f(z0, z0), z0), F(z0, z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [1]   
POL(F(x1, x2)) = 0   
POL(G(x1, x2)) = x1   
POL(c1(x1)) = x1   
POL(c2(x1, x2)) = x1 + x2   
POL(f(x1, x2)) = 0   
POL(s(x1)) = 0   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

F(s(z0), s(z1)) → c1(F(z0, z1))
G(0, z0) → c2(G(f(z0, z0), z0), F(z0, z0))
S tuples:

F(s(z0), s(z1)) → c1(F(z0, z1))
K tuples:

G(0, z0) → c2(G(f(z0, z0), z0), F(z0, z0))
Defined Rule Symbols:

f

Defined Pair Symbols:

F, G

Compound Symbols:

c1, c2

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

Use narrowing to replace G(0, z0) → c2(G(f(z0, z0), z0), F(z0, z0)) by

G(0, 0) → c2(G(s(0), 0), F(0, 0))
G(0, s(z0)) → c2(G(s(f(z0, z0)), s(z0)), F(s(z0), s(z0)))

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

F(s(z0), s(z1)) → c1(F(z0, z1))
G(0, 0) → c2(G(s(0), 0), F(0, 0))
G(0, s(z0)) → c2(G(s(f(z0, z0)), s(z0)), F(s(z0), s(z0)))
S tuples:

F(s(z0), s(z1)) → c1(F(z0, z1))
K tuples:

G(0, z0) → c2(G(f(z0, z0), z0), F(z0, z0))
Defined Rule Symbols:

f

Defined Pair Symbols:

F, G

Compound Symbols:

c1, c2

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

Removed 1 trailing nodes:

G(0, 0) → c2(G(s(0), 0), F(0, 0))

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

F(s(z0), s(z1)) → c1(F(z0, z1))
G(0, s(z0)) → c2(G(s(f(z0, z0)), s(z0)), F(s(z0), s(z0)))
S tuples:

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

f

Defined Pair Symbols:

F, G

Compound Symbols:

c1, c2

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

Removed 1 trailing tuple parts

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

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

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

f

Defined Pair Symbols:

F, G

Compound Symbols:

c1, c2

(17) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 1 leading nodes:

G(0, s(z0)) → c2(F(s(z0), s(z0)))

(18) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

F(s(z0), s(z1)) → c1(F(z0, z1))
S tuples:

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

f

Defined Pair Symbols:

F

Compound Symbols:

c1

(19) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

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

(20) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

F(s(z0), s(z1)) → c1(F(z0, z1))
S tuples:

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

Defined Pair Symbols:

F

Compound Symbols:

c1

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

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

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

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

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

(22) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

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

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

Defined Pair Symbols:

F

Compound Symbols:

c1

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

The set S is empty

(24) BOUNDS(1, 1)