(0) Obligation:

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


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: FULL

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

Converted rc-obligation to irc-obligation.

As the TRS does not nest defined symbols, we have rc = irc.

(2) Obligation:

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


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

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

Converted Cpx (relative) TRS to CDT

(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, 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

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

Removed 1 trailing nodes:

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

(6) 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

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

(8) 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

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

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

R(nil, nil, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
R(cons(y1, y2), nil, z1, cons(z2, cons(y5, y6))) → c1(R(cons(y1, y2), cons(y1, y2), cons(succ(zero), z1), cons(y5, y6)))

(10) 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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
R(cons(y1, y2), nil, z1, cons(z2, cons(y5, y6))) → c1(R(cons(y1, y2), cons(y1, y2), cons(succ(zero), z1), cons(y5, y6)))
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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
R(cons(y1, y2), nil, z1, cons(z2, cons(y5, y6))) → c1(R(cons(y1, y2), cons(y1, y2), cons(succ(zero), z1), cons(y5, y6)))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

R

Compound Symbols:

c2, c3, c1

(11) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 1 leading nodes:

R(cons(y1, y2), nil, z1, cons(z2, cons(y5, y6))) → c1(R(cons(y1, y2), cons(y1, y2), cons(succ(zero), z1), cons(y5, y6)))

(12) 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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

R

Compound Symbols:

c2, c3, c1

(13) 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)))

(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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
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

(15) 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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
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)) = [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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
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

(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(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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
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·x3 + [2]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) = [2]   

(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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
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(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

(19) 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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
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)) = [2]x2 + [2]x4 + [2]x2·x3 + x22   
POL(c1(x1)) = x1   
POL(c2(x1)) = x1   
POL(c3(x1)) = x1   
POL(cons(x1, x2)) = [2] + x2   
POL(nil) = 0   
POL(succ(x1)) = 0   
POL(zero) = [2]   

(20) 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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
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(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, z1, cons(z2, cons(y2, y3))) → c1(R(nil, nil, cons(succ(zero), z1), cons(y2, y3)))
Defined Rule Symbols:none

Defined Pair Symbols:

R

Compound Symbols:

c3, c1, c2

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

The set S is empty

(22) BOUNDS(1, 1)