(0) Obligation:

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

r(xs, ys, zs, nil) → xs
r(xs, nil, zs, cons(w, ws)) → r(xs, xs, cons(succ(zero), zs), ws)
r(xs, cons(y, ys), nil, cons(w, ws)) → r(xs, xs, cons(succ(zero), nil), ws)
r(xs, cons(y, ys), cons(z, zs), cons(w, ws)) → r(ys, cons(y, ys), zs, cons(succ(zero), cons(w, ws)))

Rewrite Strategy: INNERMOST

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

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

r(z0, z1, z2, nil) → z0
r(z0, nil, z1, cons(z2, z3)) → r(z0, z0, cons(succ(zero), z1), z3)
r(z0, cons(z1, z2), nil, cons(z3, z4)) → r(z0, z0, cons(succ(zero), nil), z4)
r(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → r(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6)))
Tuples:

R(z0, z1, z2, nil) → c
R(z0, nil, z1, cons(z2, z3)) → c1(R(z0, z0, cons(succ(zero), z1), z3))
R(z0, cons(z1, z2), nil, cons(z3, z4)) → c2(R(z0, z0, cons(succ(zero), nil), z4))
R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
S tuples:

R(z0, z1, z2, nil) → c
R(z0, nil, z1, cons(z2, z3)) → c1(R(z0, z0, cons(succ(zero), z1), z3))
R(z0, cons(z1, z2), nil, cons(z3, z4)) → c2(R(z0, z0, cons(succ(zero), nil), z4))
R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
K tuples:none
Defined Rule Symbols:

r

Defined Pair Symbols:

R

Compound Symbols:

c, c1, c2, c3

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

Removed 1 trailing nodes:

R(z0, z1, z2, nil) → c

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

r(z0, z1, z2, nil) → z0
r(z0, nil, z1, cons(z2, z3)) → r(z0, z0, cons(succ(zero), z1), z3)
r(z0, cons(z1, z2), nil, cons(z3, z4)) → r(z0, z0, cons(succ(zero), nil), z4)
r(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → r(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6)))
Tuples:

R(z0, nil, z1, cons(z2, z3)) → c1(R(z0, z0, cons(succ(zero), z1), z3))
R(z0, cons(z1, z2), nil, cons(z3, z4)) → c2(R(z0, z0, cons(succ(zero), nil), z4))
R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
S tuples:

R(z0, nil, z1, cons(z2, z3)) → c1(R(z0, z0, cons(succ(zero), z1), z3))
R(z0, cons(z1, z2), nil, cons(z3, z4)) → c2(R(z0, z0, cons(succ(zero), nil), z4))
R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
K tuples:none
Defined Rule Symbols:

r

Defined Pair Symbols:

R

Compound Symbols:

c1, c2, c3

(5) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

r(z0, z1, z2, nil) → z0
r(z0, nil, z1, cons(z2, z3)) → r(z0, z0, cons(succ(zero), z1), z3)
r(z0, cons(z1, z2), nil, cons(z3, z4)) → r(z0, z0, cons(succ(zero), nil), z4)
r(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → r(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6)))

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

R(z0, nil, z1, cons(z2, z3)) → c1(R(z0, z0, cons(succ(zero), z1), z3))
R(z0, cons(z1, z2), nil, cons(z3, z4)) → c2(R(z0, z0, cons(succ(zero), nil), z4))
R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
S tuples:

R(z0, nil, z1, cons(z2, z3)) → c1(R(z0, z0, cons(succ(zero), z1), z3))
R(z0, cons(z1, z2), nil, cons(z3, z4)) → c2(R(z0, z0, cons(succ(zero), nil), z4))
R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

R

Compound Symbols:

c1, c2, c3

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

Use instantiation to replace R(z0, nil, z1, cons(z2, z3)) → c1(R(z0, z0, cons(succ(zero), z1), z3)) by

R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

R(z0, cons(z1, z2), nil, cons(z3, z4)) → c2(R(z0, z0, cons(succ(zero), nil), z4))
R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
S tuples:

R(z0, cons(z1, z2), nil, cons(z3, z4)) → c2(R(z0, z0, cons(succ(zero), nil), z4))
R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

R

Compound Symbols:

c2, c3, c1

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

Use instantiation to replace R(z0, cons(z1, z2), nil, cons(z3, z4)) → c2(R(z0, z0, cons(succ(zero), nil), z4)) by

R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
S tuples:

R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

R

Compound Symbols:

c3, c1, c2

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

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

R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
We considered the (Usable) Rules:none
And the Tuples:

R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(R(x1, x2, x3, x4)) = x2   
POL(c1(x1)) = x1   
POL(c2(x1)) = x1   
POL(c3(x1)) = x1   
POL(cons(x1, x2)) = [2] + x2   
POL(nil) = [3]   
POL(succ(x1)) = 0   
POL(zero) = [1]   

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
S tuples:

R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
K tuples:

R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
Defined Rule Symbols:none

Defined Pair Symbols:

R

Compound Symbols:

c3, c1, c2

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

The following tuples could be moved from S to K by knowledge propagation:

R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
S tuples:

R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
K tuples:

R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
Defined Rule Symbols:none

Defined Pair Symbols:

R

Compound Symbols:

c3, c1, c2

(15) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

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

R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
We considered the (Usable) Rules:none
And the Tuples:

R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(R(x1, x2, x3, x4)) = [3]x2 + [2]x2·x3 + x22   
POL(c1(x1)) = x1   
POL(c2(x1)) = x1   
POL(c3(x1)) = x1   
POL(cons(x1, x2)) = [1] + x2   
POL(nil) = 0   
POL(succ(x1)) = 0   
POL(zero) = 0   

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
S tuples:

R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
K tuples:

R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
Defined Rule Symbols:none

Defined Pair Symbols:

R

Compound Symbols:

c3, c1, c2

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

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

R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
We considered the (Usable) Rules:none
And the Tuples:

R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(R(x1, x2, x3, x4)) = x4 + [2]x2·x3 + x22   
POL(c1(x1)) = x1   
POL(c2(x1)) = x1   
POL(c3(x1)) = x1   
POL(cons(x1, x2)) = [1] + x2   
POL(nil) = 0   
POL(succ(x1)) = 0   
POL(zero) = 0   

(18) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
S tuples:none
K tuples:

R(x2, cons(x1, x2), nil, cons(succ(zero), cons(x5, x6))) → c2(R(x2, x2, cons(succ(zero), nil), cons(x5, x6)))
R(nil, nil, cons(succ(zero), nil), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), nil)), z3))
R(z0, cons(z1, z2), cons(z3, z4), cons(z5, z6)) → c3(R(z2, cons(z1, z2), z4, cons(succ(zero), cons(z5, z6))))
R(nil, nil, cons(succ(zero), x1), cons(z2, z3)) → c1(R(nil, nil, cons(succ(zero), cons(succ(zero), x1)), z3))
Defined Rule Symbols:none

Defined Pair Symbols:

R

Compound Symbols:

c3, c1, c2

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

The set S is empty

(20) BOUNDS(1, 1)